@burdenoff/microfe-mybodyshield 2026.821.2 → 2026.830.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 (90) hide show
  1. package/dist/mybodyshield/MyBodyShieldRoot.d.ts.map +1 -1
  2. package/dist/mybodyshield/MyBodyShieldRoot.js +54 -56
  3. package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
  4. package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
  5. package/dist/mybodyshield/MyBodyShieldRoutes.js +121 -62
  6. package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
  7. package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -1
  8. package/dist/mybodyshield/components/EvidenceUpload.js +46 -45
  9. package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
  10. package/dist/mybodyshield/components/FileLink.d.ts.map +1 -1
  11. package/dist/mybodyshield/components/FileLink.js +27 -18
  12. package/dist/mybodyshield/components/FileLink.js.map +1 -1
  13. package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
  14. package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -1
  15. package/dist/mybodyshield/components/MybDiscussion.js +59 -58
  16. package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
  17. package/dist/mybodyshield/components/MybTags.d.ts +1 -1
  18. package/dist/mybodyshield/components/MybTags.d.ts.map +1 -1
  19. package/dist/mybodyshield/components/MybTags.js +83 -74
  20. package/dist/mybodyshield/components/MybTags.js.map +1 -1
  21. package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -1
  22. package/dist/mybodyshield/components/PageDisabled.js +16 -11
  23. package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
  24. package/dist/mybodyshield/components/Pagination.d.ts.map +1 -1
  25. package/dist/mybodyshield/components/Pagination.js +36 -27
  26. package/dist/mybodyshield/components/Pagination.js.map +1 -1
  27. package/dist/mybodyshield/components/StateViews.d.ts.map +1 -1
  28. package/dist/mybodyshield/components/StateViews.js +42 -34
  29. package/dist/mybodyshield/components/StateViews.js.map +1 -1
  30. package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -1
  31. package/dist/mybodyshield/components/UserSearchSelect.js +66 -68
  32. package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
  33. package/dist/mybodyshield/hooks/index.d.ts +1 -0
  34. package/dist/mybodyshield/hooks/index.d.ts.map +1 -1
  35. package/dist/mybodyshield/hooks/index.js +1 -0
  36. package/dist/mybodyshield/hooks/useTr.d.ts +5 -0
  37. package/dist/mybodyshield/hooks/useTr.d.ts.map +1 -0
  38. package/dist/mybodyshield/hooks/useTr.js +12 -0
  39. package/dist/mybodyshield/hooks/useTr.js.map +1 -0
  40. package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
  41. package/dist/mybodyshield/pages/DashboardPage.js +157 -136
  42. package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
  43. package/dist/mybodyshield/pages/SettingsPage.d.ts.map +1 -1
  44. package/dist/mybodyshield/pages/SettingsPage.js +50 -59
  45. package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
  46. package/dist/mybodyshield/pages/_shared/visuals.d.ts +2 -1
  47. package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -1
  48. package/dist/mybodyshield/pages/_shared/visuals.js +91 -81
  49. package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
  50. package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts.map +1 -1
  51. package/dist/mybodyshield/pages/ai/AiControlsPage.js +279 -231
  52. package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
  53. package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -1
  54. package/dist/mybodyshield/pages/coaching/CoachingPage.js +349 -258
  55. package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
  56. package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -1
  57. package/dist/mybodyshield/pages/goals/GoalsPage.js +247 -251
  58. package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
  59. package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts.map +1 -1
  60. package/dist/mybodyshield/pages/insights/InsightsCharts.js +216 -213
  61. package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
  62. package/dist/mybodyshield/pages/insights/InsightsPage.d.ts.map +1 -1
  63. package/dist/mybodyshield/pages/insights/InsightsPage.js +327 -220
  64. package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
  65. package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
  66. package/dist/mybodyshield/pages/nutrition/NutritionPage.js +575 -529
  67. package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
  68. package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -1
  69. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +333 -275
  70. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
  71. package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
  72. package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -253
  73. package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
  74. package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -1
  75. package/dist/mybodyshield/pages/progress/ProgressPage.js +271 -254
  76. package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
  77. package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -1
  78. package/dist/mybodyshield/pages/recovery/RecoveryPage.js +206 -200
  79. package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
  80. package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
  81. package/dist/mybodyshield/pages/train/SessionDetailPage.js +327 -294
  82. package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
  83. package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
  84. package/dist/mybodyshield/pages/train/SessionsPage.js +180 -163
  85. package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
  86. package/dist/mybodyshield/utils/i18n.d.ts +1 -2
  87. package/dist/mybodyshield/utils/i18n.d.ts.map +1 -1
  88. package/dist/mybodyshield/utils/i18n.js +15 -0
  89. package/dist/mybodyshield/utils/i18n.js.map +1 -0
  90. package/package.json +1 -1
@@ -1,23 +1,25 @@
1
1
  import { cn as e } from "../../utils/cn.js";
2
2
  import { formatDate as t, formatGrams as n, formatKcal as r, formatNumber as i, formatWeight as a } from "../../utils/formatters.js";
3
- import { IconChip as o, MACRO_HUE as s } from "../_shared/visuals.js";
4
- import { Legend as c } from "../../../node_modules/recharts/es6/component/Legend.js";
5
- import { Tooltip as l } from "../../../node_modules/recharts/es6/component/Tooltip.js";
6
- import { ResponsiveContainer as u } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
7
- import { Bar as d } from "../../../node_modules/recharts/es6/cartesian/Bar.js";
8
- import { CartesianGrid as f } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
9
- import { Line as p } from "../../../node_modules/recharts/es6/cartesian/Line.js";
10
- import { Area as m } from "../../../node_modules/recharts/es6/cartesian/Area.js";
11
- import { XAxis as h } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
12
- import { YAxis as g } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
13
- import { BarChart as _ } from "../../../node_modules/recharts/es6/chart/BarChart.js";
14
- import { ComposedChart as v } from "../../../node_modules/recharts/es6/chart/ComposedChart.js";
15
- import { useMemo as y } from "react";
16
- import { Activity as b, Dumbbell as x, HeartPulse as S, Moon as C, Scale as w, Utensils as T } from "lucide-react";
17
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
18
- import { GlassCard as O } from "@burdenoff/fe-libs/ui";
3
+ import { useTr as o } from "../../hooks/useTr.js";
4
+ import "../../hooks/index.js";
5
+ import { IconChip as s, MACRO_HUE as c } from "../_shared/visuals.js";
6
+ import { Legend as l } from "../../../node_modules/recharts/es6/component/Legend.js";
7
+ import { Tooltip as u } from "../../../node_modules/recharts/es6/component/Tooltip.js";
8
+ import { ResponsiveContainer as d } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
9
+ import { Bar as f } from "../../../node_modules/recharts/es6/cartesian/Bar.js";
10
+ import { CartesianGrid as p } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
11
+ import { Line as m } from "../../../node_modules/recharts/es6/cartesian/Line.js";
12
+ import { Area as h } from "../../../node_modules/recharts/es6/cartesian/Area.js";
13
+ import { XAxis as g } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
14
+ import { YAxis as _ } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
15
+ import { BarChart as v } from "../../../node_modules/recharts/es6/chart/BarChart.js";
16
+ import { ComposedChart as y } from "../../../node_modules/recharts/es6/chart/ComposedChart.js";
17
+ import { useMemo as b } from "react";
18
+ import { Activity as x, Dumbbell as S, HeartPulse as C, Moon as w, Scale as T, Utensils as E } from "lucide-react";
19
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
20
+ import { GlassCard as k } from "@burdenoff/fe-libs/ui";
19
21
  //#region src/mybodyshield/pages/insights/InsightsCharts.tsx
20
- var k = {
22
+ var A = {
21
23
  primary: "var(--color-action-primary-bg)",
22
24
  secondary: "var(--color-accent-primary)",
23
25
  success: "var(--color-status-success-text)",
@@ -27,21 +29,21 @@ var k = {
27
29
  chart2: "var(--color-chart-2)",
28
30
  chart3: "var(--color-chart-3)",
29
31
  chart4: "var(--color-chart-4)"
30
- }, A = {
32
+ }, j = {
31
33
  background: "var(--color-bg-surface)",
32
34
  border: "1px solid var(--color-border-seam)",
33
35
  borderRadius: 12,
34
36
  color: "var(--color-text-primary)",
35
37
  fontSize: 12
36
- }, j = {
38
+ }, M = {
37
39
  stroke: "var(--color-border-seam)",
38
40
  strokeDasharray: "4 4"
39
- }, M = {
41
+ }, N = {
40
42
  fill: "var(--color-text-tertiary)",
41
43
  fontSize: 12
42
44
  };
43
- function N(e) {
44
- return y(() => [...e].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()).map((e) => ({
45
+ function P(e) {
46
+ return b(() => [...e].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()).map((e) => ({
45
47
  label: t(e.date),
46
48
  date: e.date,
47
49
  sessions: e.sessions,
@@ -55,49 +57,49 @@ function N(e) {
55
57
  weight: e.weight ?? null
56
58
  })), [e]);
57
59
  }
58
- function P({ message: e = "No data for the selected range" }) {
59
- return /* @__PURE__ */ D("div", {
60
+ function F({ message: e = "No data for the selected range" }) {
61
+ return /* @__PURE__ */ O("div", {
60
62
  className: "flex h-[240px] flex-col items-center justify-center gap-2 text-center",
61
- children: [/* @__PURE__ */ E(b, { className: "h-8 w-8 text-text-tertiary" }), /* @__PURE__ */ E("p", {
63
+ children: [/* @__PURE__ */ D(x, { className: "h-8 w-8 text-text-tertiary" }), /* @__PURE__ */ D("p", {
62
64
  className: "text-sm text-text-secondary",
63
65
  children: e
64
66
  })]
65
67
  });
66
68
  }
67
- function F({ title: t, icon: n, children: r, className: i }) {
68
- return /* @__PURE__ */ D(O, {
69
+ function I({ title: t, icon: n, children: r, className: i }) {
70
+ return /* @__PURE__ */ O(k, {
69
71
  treatment: "plain",
70
72
  className: e("overflow-hidden p-5", i),
71
- children: [/* @__PURE__ */ D("div", {
73
+ children: [/* @__PURE__ */ O("div", {
72
74
  className: "mb-4 flex items-center gap-2.5",
73
- children: [n, /* @__PURE__ */ E("h3", {
75
+ children: [n, /* @__PURE__ */ D("h3", {
74
76
  className: "text-sm font-semibold text-text-primary",
75
77
  children: t
76
78
  })]
77
79
  }), r]
78
80
  });
79
81
  }
80
- function I({ daily: e }) {
81
- let t = N(e);
82
- return t.length === 0 ? /* @__PURE__ */ E(F, {
83
- title: "Training volume",
84
- icon: /* @__PURE__ */ E(o, {
85
- icon: /* @__PURE__ */ E(x, { className: "h-4 w-4" }),
86
- tint: k.primary
82
+ function L({ daily: e }) {
83
+ let t = P(e), n = o();
84
+ return t.length === 0 ? /* @__PURE__ */ D(I, {
85
+ title: n("mybodyshield.pages.insights.volumeChartTitle", "Training volume"),
86
+ icon: /* @__PURE__ */ D(s, {
87
+ icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" }),
88
+ tint: A.primary
87
89
  }),
88
- children: /* @__PURE__ */ E(P, { message: "Log completed sessions to see volume trends." })
89
- }) : /* @__PURE__ */ E(F, {
90
- title: "Training volume",
91
- icon: /* @__PURE__ */ E(o, {
92
- icon: /* @__PURE__ */ E(x, { className: "h-4 w-4" }),
93
- tint: k.primary
90
+ children: /* @__PURE__ */ D(F, { message: n("mybodyshield.pages.insights.volumeChartEmpty", "Log completed sessions to see volume trends.") })
91
+ }) : /* @__PURE__ */ D(I, {
92
+ title: n("mybodyshield.pages.insights.volumeChartTitle", "Training volume"),
93
+ icon: /* @__PURE__ */ D(s, {
94
+ icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" }),
95
+ tint: A.primary
94
96
  }),
95
- children: /* @__PURE__ */ E("div", {
97
+ children: /* @__PURE__ */ D("div", {
96
98
  className: "h-[260px] w-full",
97
- children: /* @__PURE__ */ E(u, {
99
+ children: /* @__PURE__ */ D(d, {
98
100
  width: "100%",
99
101
  height: "100%",
100
- children: /* @__PURE__ */ D(v, {
102
+ children: /* @__PURE__ */ O(y, {
101
103
  data: t,
102
104
  margin: {
103
105
  top: 4,
@@ -106,49 +108,49 @@ function I({ daily: e }) {
106
108
  left: 4
107
109
  },
108
110
  children: [
109
- /* @__PURE__ */ E(f, {
110
- ...j,
111
+ /* @__PURE__ */ D(p, {
112
+ ...M,
111
113
  vertical: !1
112
114
  }),
113
- /* @__PURE__ */ E(h, {
115
+ /* @__PURE__ */ D(g, {
114
116
  dataKey: "label",
115
117
  tickLine: !1,
116
118
  axisLine: !1,
117
- tick: M,
119
+ tick: N,
118
120
  tickMargin: 8,
119
121
  minTickGap: 24
120
122
  }),
121
- /* @__PURE__ */ E(g, {
123
+ /* @__PURE__ */ D(_, {
122
124
  yAxisId: "left",
123
125
  tickLine: !1,
124
126
  axisLine: !1,
125
- tick: M,
127
+ tick: N,
126
128
  width: 52,
127
129
  tickFormatter: (e) => a(Number(e))
128
130
  }),
129
- /* @__PURE__ */ E(g, {
131
+ /* @__PURE__ */ D(_, {
130
132
  yAxisId: "right",
131
133
  orientation: "right",
132
134
  tickLine: !1,
133
135
  axisLine: !1,
134
- tick: M,
136
+ tick: N,
135
137
  width: 36,
136
138
  allowDecimals: !1
137
139
  }),
138
- /* @__PURE__ */ E(l, {
139
- contentStyle: A,
140
+ /* @__PURE__ */ D(u, {
141
+ contentStyle: j,
140
142
  labelStyle: { color: "var(--color-text-tertiary)" },
141
- formatter: (e, t) => t === "Volume" ? [a(Number(e)), t] : [i(Number(e)), "Sessions"]
143
+ formatter: (e, t, n) => n.dataKey === "volumeKg" ? [a(Number(e)), t] : [i(Number(e)), t]
142
144
  }),
143
- /* @__PURE__ */ E(c, { wrapperStyle: {
145
+ /* @__PURE__ */ D(l, { wrapperStyle: {
144
146
  fontSize: 12,
145
147
  paddingTop: 8
146
148
  } }),
147
- /* @__PURE__ */ E(d, {
149
+ /* @__PURE__ */ D(f, {
148
150
  yAxisId: "left",
149
151
  dataKey: "volumeKg",
150
- name: "Volume",
151
- fill: k.primary,
152
+ name: n("mybodyshield.common.volume", "Volume"),
153
+ fill: A.primary,
152
154
  radius: [
153
155
  4,
154
156
  4,
@@ -157,12 +159,12 @@ function I({ daily: e }) {
157
159
  ],
158
160
  opacity: .85
159
161
  }),
160
- /* @__PURE__ */ E(p, {
162
+ /* @__PURE__ */ D(m, {
161
163
  yAxisId: "right",
162
164
  type: "monotone",
163
165
  dataKey: "sessions",
164
- name: "Sessions",
165
- stroke: k.secondary,
166
+ name: n("mybodyshield.common.sessions", "Sessions"),
167
+ stroke: A.secondary,
166
168
  strokeWidth: 2.5,
167
169
  dot: !1,
168
170
  activeDot: {
@@ -177,20 +179,20 @@ function I({ daily: e }) {
177
179
  })
178
180
  });
179
181
  }
180
- function L({ daily: e }) {
181
- let t = N(e);
182
- return t.some((e) => e.readiness != null || e.sleepHours != null) ? /* @__PURE__ */ E(F, {
183
- title: "Recovery & sleep",
184
- icon: /* @__PURE__ */ E(o, {
185
- icon: /* @__PURE__ */ E(S, { className: "h-4 w-4" }),
186
- tint: k.success
182
+ function R({ daily: e }) {
183
+ let t = P(e), n = o();
184
+ return t.some((e) => e.readiness != null || e.sleepHours != null) ? /* @__PURE__ */ D(I, {
185
+ title: n("mybodyshield.pages.insights.readinessSleepChartTitle", "Recovery & sleep"),
186
+ icon: /* @__PURE__ */ D(s, {
187
+ icon: /* @__PURE__ */ D(C, { className: "h-4 w-4" }),
188
+ tint: A.success
187
189
  }),
188
- children: /* @__PURE__ */ E("div", {
190
+ children: /* @__PURE__ */ D("div", {
189
191
  className: "h-[260px] w-full",
190
- children: /* @__PURE__ */ E(u, {
192
+ children: /* @__PURE__ */ D(d, {
191
193
  width: "100%",
192
194
  height: "100%",
193
- children: /* @__PURE__ */ D(v, {
195
+ children: /* @__PURE__ */ O(y, {
194
196
  data: t,
195
197
  margin: {
196
198
  top: 4,
@@ -199,54 +201,54 @@ function L({ daily: e }) {
199
201
  left: 4
200
202
  },
201
203
  children: [
202
- /* @__PURE__ */ E(f, {
203
- ...j,
204
+ /* @__PURE__ */ D(p, {
205
+ ...M,
204
206
  vertical: !1
205
207
  }),
206
- /* @__PURE__ */ E(h, {
208
+ /* @__PURE__ */ D(g, {
207
209
  dataKey: "label",
208
210
  tickLine: !1,
209
211
  axisLine: !1,
210
- tick: M,
212
+ tick: N,
211
213
  tickMargin: 8,
212
214
  minTickGap: 24
213
215
  }),
214
- /* @__PURE__ */ E(g, {
216
+ /* @__PURE__ */ D(_, {
215
217
  yAxisId: "left",
216
218
  tickLine: !1,
217
219
  axisLine: !1,
218
- tick: M,
220
+ tick: N,
219
221
  width: 36,
220
222
  domain: [0, 100],
221
223
  hide: !t.some((e) => e.readiness != null)
222
224
  }),
223
- /* @__PURE__ */ E(g, {
225
+ /* @__PURE__ */ D(_, {
224
226
  yAxisId: "right",
225
227
  orientation: "right",
226
228
  tickLine: !1,
227
229
  axisLine: !1,
228
- tick: M,
230
+ tick: N,
229
231
  width: 44,
230
232
  tickFormatter: (e) => `${i(Number(e))} h`,
231
233
  hide: !t.some((e) => e.sleepHours != null)
232
234
  }),
233
- /* @__PURE__ */ E(l, {
234
- contentStyle: A,
235
+ /* @__PURE__ */ D(u, {
236
+ contentStyle: j,
235
237
  labelStyle: { color: "var(--color-text-tertiary)" },
236
- formatter: (e, t) => t === "Readiness" ? [i(Number(e)), t] : [`${i(Number(e))} h`, t]
238
+ formatter: (e, t, n) => n.dataKey === "readiness" ? [i(Number(e)), t] : [`${i(Number(e))} h`, t]
237
239
  }),
238
- /* @__PURE__ */ E(c, { wrapperStyle: {
240
+ /* @__PURE__ */ D(l, { wrapperStyle: {
239
241
  fontSize: 12,
240
242
  paddingTop: 8
241
243
  } }),
242
- /* @__PURE__ */ E(m, {
244
+ /* @__PURE__ */ D(h, {
243
245
  yAxisId: "right",
244
246
  type: "monotone",
245
247
  dataKey: "sleepHours",
246
- name: "Sleep",
247
- stroke: k.secondary,
248
+ name: n("mybodyshield.common.sleep", "Sleep"),
249
+ stroke: A.secondary,
248
250
  strokeWidth: 2,
249
- fill: k.secondary,
251
+ fill: A.secondary,
250
252
  fillOpacity: .12,
251
253
  dot: !1,
252
254
  activeDot: {
@@ -256,12 +258,12 @@ function L({ daily: e }) {
256
258
  },
257
259
  connectNulls: !0
258
260
  }),
259
- /* @__PURE__ */ E(p, {
261
+ /* @__PURE__ */ D(m, {
260
262
  yAxisId: "left",
261
263
  type: "monotone",
262
264
  dataKey: "readiness",
263
- name: "Readiness",
264
- stroke: k.success,
265
+ name: n("mybodyshield.common.readiness", "Readiness"),
266
+ stroke: A.success,
265
267
  strokeWidth: 2.5,
266
268
  dot: !1,
267
269
  activeDot: {
@@ -275,36 +277,36 @@ function L({ daily: e }) {
275
277
  })
276
278
  })
277
279
  })
278
- }) : /* @__PURE__ */ E(F, {
279
- title: "Recovery & sleep",
280
- icon: /* @__PURE__ */ E(o, {
281
- icon: /* @__PURE__ */ E(S, { className: "h-4 w-4" }),
282
- tint: k.success
280
+ }) : /* @__PURE__ */ D(I, {
281
+ title: n("mybodyshield.pages.insights.readinessSleepChartTitle", "Recovery & sleep"),
282
+ icon: /* @__PURE__ */ D(s, {
283
+ icon: /* @__PURE__ */ D(C, { className: "h-4 w-4" }),
284
+ tint: A.success
283
285
  }),
284
- children: /* @__PURE__ */ E(P, { message: "Log recovery entries to see readiness and sleep trends." })
286
+ children: /* @__PURE__ */ D(F, { message: n("mybodyshield.pages.insights.readinessSleepChartEmpty", "Log recovery entries to see readiness and sleep trends.") })
285
287
  });
286
288
  }
287
- function R({ daily: e }) {
288
- let t = N(e);
289
- return t.length === 0 ? /* @__PURE__ */ E(F, {
290
- title: "Macro adherence",
291
- icon: /* @__PURE__ */ E(o, {
292
- icon: /* @__PURE__ */ E(T, { className: "h-4 w-4" }),
293
- tint: k.warning
289
+ function z({ daily: e }) {
290
+ let t = P(e), r = o();
291
+ return t.length === 0 ? /* @__PURE__ */ D(I, {
292
+ title: r("mybodyshield.pages.insights.macroChartTitle", "Macro adherence"),
293
+ icon: /* @__PURE__ */ D(s, {
294
+ icon: /* @__PURE__ */ D(E, { className: "h-4 w-4" }),
295
+ tint: A.warning
294
296
  }),
295
- children: /* @__PURE__ */ E(P, { message: "Log meals to see macro trends." })
296
- }) : /* @__PURE__ */ E(F, {
297
- title: "Macro adherence",
298
- icon: /* @__PURE__ */ E(o, {
299
- icon: /* @__PURE__ */ E(T, { className: "h-4 w-4" }),
300
- tint: k.warning
297
+ children: /* @__PURE__ */ D(F, { message: r("mybodyshield.pages.insights.macroChartEmpty", "Log meals to see macro trends.") })
298
+ }) : /* @__PURE__ */ D(I, {
299
+ title: r("mybodyshield.pages.insights.macroChartTitle", "Macro adherence"),
300
+ icon: /* @__PURE__ */ D(s, {
301
+ icon: /* @__PURE__ */ D(E, { className: "h-4 w-4" }),
302
+ tint: A.warning
301
303
  }),
302
- children: /* @__PURE__ */ E("div", {
304
+ children: /* @__PURE__ */ D("div", {
303
305
  className: "h-[260px] w-full",
304
- children: /* @__PURE__ */ E(u, {
306
+ children: /* @__PURE__ */ D(d, {
305
307
  width: "100%",
306
308
  height: "100%",
307
- children: /* @__PURE__ */ D(_, {
309
+ children: /* @__PURE__ */ O(v, {
308
310
  data: t,
309
311
  margin: {
310
312
  top: 4,
@@ -313,51 +315,51 @@ function R({ daily: e }) {
313
315
  left: 4
314
316
  },
315
317
  children: [
316
- /* @__PURE__ */ E(f, {
317
- ...j,
318
+ /* @__PURE__ */ D(p, {
319
+ ...M,
318
320
  vertical: !1
319
321
  }),
320
- /* @__PURE__ */ E(h, {
322
+ /* @__PURE__ */ D(g, {
321
323
  dataKey: "label",
322
324
  tickLine: !1,
323
325
  axisLine: !1,
324
- tick: M,
326
+ tick: N,
325
327
  tickMargin: 8,
326
328
  minTickGap: 24
327
329
  }),
328
- /* @__PURE__ */ E(g, {
330
+ /* @__PURE__ */ D(_, {
329
331
  tickLine: !1,
330
332
  axisLine: !1,
331
- tick: M,
333
+ tick: N,
332
334
  width: 44,
333
335
  tickFormatter: (e) => n(Number(e))
334
336
  }),
335
- /* @__PURE__ */ E(l, {
336
- contentStyle: A,
337
+ /* @__PURE__ */ D(u, {
338
+ contentStyle: j,
337
339
  labelStyle: { color: "var(--color-text-tertiary)" },
338
340
  formatter: (e, t) => [n(Number(e)), t]
339
341
  }),
340
- /* @__PURE__ */ E(c, { wrapperStyle: {
342
+ /* @__PURE__ */ D(l, { wrapperStyle: {
341
343
  fontSize: 12,
342
344
  paddingTop: 8
343
345
  } }),
344
- /* @__PURE__ */ E(d, {
346
+ /* @__PURE__ */ D(f, {
345
347
  dataKey: "proteinG",
346
- name: "Protein",
348
+ name: r("mybodyshield.common.protein", "Protein"),
347
349
  stackId: "macros",
348
- fill: s.protein
350
+ fill: c.protein
349
351
  }),
350
- /* @__PURE__ */ E(d, {
352
+ /* @__PURE__ */ D(f, {
351
353
  dataKey: "carbsG",
352
- name: "Carbs",
354
+ name: r("mybodyshield.common.carbs", "Carbs"),
353
355
  stackId: "macros",
354
- fill: s.carbs
356
+ fill: c.carbs
355
357
  }),
356
- /* @__PURE__ */ E(d, {
358
+ /* @__PURE__ */ D(f, {
357
359
  dataKey: "fatG",
358
- name: "Fat",
360
+ name: r("mybodyshield.common.fat", "Fat"),
359
361
  stackId: "macros",
360
- fill: s.fat
362
+ fill: c.fat
361
363
  })
362
364
  ]
363
365
  })
@@ -365,27 +367,27 @@ function R({ daily: e }) {
365
367
  })
366
368
  });
367
369
  }
368
- function z({ daily: e }) {
369
- let t = N(e);
370
- return t.length === 0 ? /* @__PURE__ */ E(F, {
371
- title: "Calorie trend",
372
- icon: /* @__PURE__ */ E(o, {
373
- icon: /* @__PURE__ */ E(w, { className: "h-4 w-4" }),
374
- tint: k.chart1
370
+ function B({ daily: e }) {
371
+ let t = P(e), n = o();
372
+ return t.length === 0 ? /* @__PURE__ */ D(I, {
373
+ title: n("mybodyshield.pages.insights.calorieChartTitle", "Calorie trend"),
374
+ icon: /* @__PURE__ */ D(s, {
375
+ icon: /* @__PURE__ */ D(T, { className: "h-4 w-4" }),
376
+ tint: A.chart1
375
377
  }),
376
- children: /* @__PURE__ */ E(P, { message: "Log meals to see calorie trends." })
377
- }) : /* @__PURE__ */ E(F, {
378
- title: "Calorie trend",
379
- icon: /* @__PURE__ */ E(o, {
380
- icon: /* @__PURE__ */ E(w, { className: "h-4 w-4" }),
381
- tint: k.chart1
378
+ children: /* @__PURE__ */ D(F, { message: n("mybodyshield.pages.insights.calorieChartEmpty", "Log meals to see calorie trends.") })
379
+ }) : /* @__PURE__ */ D(I, {
380
+ title: n("mybodyshield.pages.insights.calorieChartTitle", "Calorie trend"),
381
+ icon: /* @__PURE__ */ D(s, {
382
+ icon: /* @__PURE__ */ D(T, { className: "h-4 w-4" }),
383
+ tint: A.chart1
382
384
  }),
383
- children: /* @__PURE__ */ E("div", {
385
+ children: /* @__PURE__ */ D("div", {
384
386
  className: "h-[260px] w-full",
385
- children: /* @__PURE__ */ E(u, {
387
+ children: /* @__PURE__ */ D(d, {
386
388
  width: "100%",
387
389
  height: "100%",
388
- children: /* @__PURE__ */ D(v, {
390
+ children: /* @__PURE__ */ O(y, {
389
391
  data: t,
390
392
  margin: {
391
393
  top: 4,
@@ -394,37 +396,37 @@ function z({ daily: e }) {
394
396
  left: 4
395
397
  },
396
398
  children: [
397
- /* @__PURE__ */ E(f, {
398
- ...j,
399
+ /* @__PURE__ */ D(p, {
400
+ ...M,
399
401
  vertical: !1
400
402
  }),
401
- /* @__PURE__ */ E(h, {
403
+ /* @__PURE__ */ D(g, {
402
404
  dataKey: "label",
403
405
  tickLine: !1,
404
406
  axisLine: !1,
405
- tick: M,
407
+ tick: N,
406
408
  tickMargin: 8,
407
409
  minTickGap: 24
408
410
  }),
409
- /* @__PURE__ */ E(g, {
411
+ /* @__PURE__ */ D(_, {
410
412
  tickLine: !1,
411
413
  axisLine: !1,
412
- tick: M,
414
+ tick: N,
413
415
  width: 52,
414
416
  tickFormatter: (e) => r(Number(e))
415
417
  }),
416
- /* @__PURE__ */ E(l, {
417
- contentStyle: A,
418
+ /* @__PURE__ */ D(u, {
419
+ contentStyle: j,
418
420
  labelStyle: { color: "var(--color-text-tertiary)" },
419
- formatter: (e) => [r(Number(e)), "Calories"]
421
+ formatter: (e, t) => [r(Number(e)), t]
420
422
  }),
421
- /* @__PURE__ */ E(m, {
423
+ /* @__PURE__ */ D(h, {
422
424
  type: "monotone",
423
425
  dataKey: "calories",
424
- name: "Calories",
425
- stroke: k.chart1,
426
+ name: n("mybodyshield.common.calories", "Calories"),
427
+ stroke: A.chart1,
426
428
  strokeWidth: 2,
427
- fill: k.chart1,
429
+ fill: A.chart1,
428
430
  fillOpacity: .12,
429
431
  dot: !1,
430
432
  activeDot: {
@@ -439,7 +441,7 @@ function z({ daily: e }) {
439
441
  })
440
442
  });
441
443
  }
442
- function B(e, t) {
444
+ function V(e, t) {
443
445
  let n = e.map((e, n) => [e, t[n]]).filter(([e, t]) => e != null && t != null);
444
446
  if (n.length < 3) return {
445
447
  r: null,
@@ -454,96 +456,97 @@ function B(e, t) {
454
456
  n: r
455
457
  };
456
458
  }
457
- function V(e) {
458
- return y(() => {
459
- let t = e.map((e) => e.readiness ?? null), n = e.map((e) => e.sleepHours ?? null), r = e.map((e) => e.volumeKg), i = e.map((e) => e.sessions), a = e.map((e) => e.proteinG), o = e.map((e) => e.calories), s = (e, t, n, r, i) => {
460
- let { r: a, n: o } = B(r, i);
459
+ function H(e) {
460
+ return b(() => {
461
+ let t = e.map((e) => e.readiness ?? null), n = e.map((e) => e.sleepHours ?? null), r = e.map((e) => e.volumeKg), i = e.map((e) => e.sessions), a = e.map((e) => e.proteinG), o = e.map((e) => e.calories), s = (e, t, n, r, i, a) => {
462
+ let { r: o, n: s } = V(i, a);
461
463
  return {
462
- label: e,
463
- x: t,
464
- y: n,
465
- r: a,
466
- n: o
464
+ labelKey: e,
465
+ labelFallback: t,
466
+ x: n,
467
+ y: r,
468
+ r: o,
469
+ n: s
467
470
  };
468
471
  };
469
472
  return [
470
- s("Sleep → Readiness", "Sleep", "Readiness", n, t),
471
- s("Volume → Readiness", "Volume", "Readiness", r, t),
472
- s("Sessions → Sleep", "Sessions", "Sleep", i, n),
473
- s("Protein → Readiness", "Protein", "Readiness", a, t),
474
- s("Calories → Volume", "Calories", "Volume", o, r)
473
+ s("mybodyshield.pages.insights.correlationSleepReadiness", "Sleep → Readiness", "Sleep", "Readiness", n, t),
474
+ s("mybodyshield.pages.insights.correlationVolumeReadiness", "Volume → Readiness", "Volume", "Readiness", r, t),
475
+ s("mybodyshield.pages.insights.correlationSessionsSleep", "Sessions → Sleep", "Sessions", "Sleep", i, n),
476
+ s("mybodyshield.pages.insights.correlationProteinReadiness", "Protein → Readiness", "Protein", "Readiness", a, t),
477
+ s("mybodyshield.pages.insights.correlationCaloriesVolume", "Calories → Volume", "Calories", "Volume", o, r)
475
478
  ];
476
479
  }, [e]);
477
480
  }
478
- function H(e) {
479
- let t = Math.abs(e);
480
- return t >= .7 ? "Strong" : t >= .4 ? "Moderate" : t >= .2 ? "Weak" : "None";
481
+ function U(e, t) {
482
+ let n = Math.abs(e);
483
+ return n >= .7 ? t("mybodyshield.pages.insights.correlationStrong", "Strong") : n >= .4 ? t("mybodyshield.pages.insights.correlationModerate", "Moderate") : n >= .2 ? t("mybodyshield.pages.insights.correlationWeak", "Weak") : t("mybodyshield.pages.insights.correlationNone", "None");
481
484
  }
482
- function U(e) {
485
+ function W(e) {
483
486
  return e > 0 ? "var(--color-status-success-text)" : e < 0 ? "var(--color-status-error-text)" : "var(--color-text-tertiary)";
484
487
  }
485
- function W({ daily: e }) {
486
- let t = V(e).filter((e) => e.r != null);
487
- return t.length === 0 ? /* @__PURE__ */ D(O, {
488
+ function G({ daily: e }) {
489
+ let t = o(), n = H(e).filter((e) => e.r != null);
490
+ return n.length === 0 ? /* @__PURE__ */ O(k, {
488
491
  treatment: "plain",
489
492
  className: "p-6",
490
- children: [/* @__PURE__ */ D("div", {
493
+ children: [/* @__PURE__ */ O("div", {
491
494
  className: "flex items-center gap-2.5",
492
- children: [/* @__PURE__ */ E(o, {
493
- icon: /* @__PURE__ */ E(C, { className: "h-4 w-4" }),
494
- tint: k.secondary
495
- }), /* @__PURE__ */ E("h3", {
495
+ children: [/* @__PURE__ */ D(s, {
496
+ icon: /* @__PURE__ */ D(w, { className: "h-4 w-4" }),
497
+ tint: A.secondary
498
+ }), /* @__PURE__ */ D("h3", {
496
499
  className: "text-sm font-semibold text-text-primary",
497
- children: "Correlations"
500
+ children: t("mybodyshield.pages.insights.correlationsTitle", "Correlations")
498
501
  })]
499
- }), /* @__PURE__ */ E("p", {
502
+ }), /* @__PURE__ */ D("p", {
500
503
  className: "mt-3 text-sm text-text-secondary",
501
- children: "Log a few more recovery, training and nutrition days to surface correlations."
504
+ children: t("mybodyshield.pages.insights.correlationsEmpty", "Log a few more recovery, training and nutrition days to surface correlations.")
502
505
  })]
503
- }) : /* @__PURE__ */ D(O, {
506
+ }) : /* @__PURE__ */ O(k, {
504
507
  treatment: "plain",
505
508
  className: "overflow-hidden p-0",
506
- children: [/* @__PURE__ */ D("div", {
509
+ children: [/* @__PURE__ */ O("div", {
507
510
  className: "border-b border-border-seam px-5 py-4",
508
- children: [/* @__PURE__ */ D("div", {
511
+ children: [/* @__PURE__ */ O("div", {
509
512
  className: "flex items-center gap-2.5",
510
- children: [/* @__PURE__ */ E(o, {
511
- icon: /* @__PURE__ */ E(C, { className: "h-4 w-4" }),
512
- tint: k.secondary
513
- }), /* @__PURE__ */ E("h3", {
513
+ children: [/* @__PURE__ */ D(s, {
514
+ icon: /* @__PURE__ */ D(w, { className: "h-4 w-4" }),
515
+ tint: A.secondary
516
+ }), /* @__PURE__ */ D("h3", {
514
517
  className: "text-sm font-semibold text-text-primary",
515
- children: "Correlations"
518
+ children: t("mybodyshield.pages.insights.correlationsTitle", "Correlations")
516
519
  })]
517
- }), /* @__PURE__ */ E("p", {
520
+ }), /* @__PURE__ */ D("p", {
518
521
  className: "mt-1 text-xs text-text-secondary",
519
- children: "Pearson correlation across the selected range. More data gives more reliable signals."
522
+ children: t("mybodyshield.pages.insights.correlationsSubtitle", "Pearson correlation across the selected range. More data gives more reliable signals.")
520
523
  })]
521
- }), /* @__PURE__ */ E("div", {
524
+ }), /* @__PURE__ */ D("div", {
522
525
  className: "divide-y divide-border-seam/60",
523
- children: t.map((e) => /* @__PURE__ */ D("div", {
526
+ children: n.map((e) => /* @__PURE__ */ O("div", {
524
527
  className: "flex items-center justify-between px-5 py-3",
525
- children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
528
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
526
529
  className: "text-sm font-medium text-text-primary",
527
- children: e.label
530
+ children: t(e.labelKey, e.labelFallback)
528
531
  }), /* @__PURE__ */ D("p", {
529
532
  className: "text-xs text-text-tertiary",
530
- children: [e.n, " days with both metrics"]
531
- })] }), /* @__PURE__ */ D("div", {
533
+ children: t("mybodyshield.pages.insights.correlationDaysWithMetrics", "{{count}} days with both metrics", { count: e.n })
534
+ })] }), /* @__PURE__ */ O("div", {
532
535
  className: "text-right",
533
- children: [/* @__PURE__ */ E("p", {
536
+ children: [/* @__PURE__ */ D("p", {
534
537
  className: "text-sm font-semibold tabular-nums",
535
- style: { color: U(e.r ?? 0) },
538
+ style: { color: W(e.r ?? 0) },
536
539
  children: (e.r ?? 0).toFixed(2)
537
- }), /* @__PURE__ */ E("p", {
540
+ }), /* @__PURE__ */ D("p", {
538
541
  className: "text-xs text-text-tertiary",
539
- children: H(e.r ?? 0)
542
+ children: U(e.r ?? 0, t)
540
543
  })]
541
544
  })]
542
- }, e.label))
545
+ }, e.labelKey))
543
546
  })]
544
547
  });
545
548
  }
546
549
  //#endregion
547
- export { z as CalorieChart, W as CorrelationView, R as MacroChart, L as ReadinessSleepChart, I as VolumeChart };
550
+ export { B as CalorieChart, G as CorrelationView, z as MacroChart, R as ReadinessSleepChart, L as VolumeChart };
548
551
 
549
552
  //# sourceMappingURL=InsightsCharts.js.map