@dofek/training 0.1.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.
- package/LICENSE +21 -0
- package/README.md +123 -0
- package/dist/activity-icons.d.ts +10 -0
- package/dist/activity-icons.d.ts.map +1 -0
- package/dist/activity-icons.js +102 -0
- package/dist/activity-icons.js.map +1 -0
- package/dist/climbing-grades.d.ts +8 -0
- package/dist/climbing-grades.d.ts.map +1 -0
- package/dist/climbing-grades.js +80 -0
- package/dist/climbing-grades.js.map +1 -0
- package/dist/derived-cardio.d.ts +17 -0
- package/dist/derived-cardio.d.ts.map +1 -0
- package/dist/derived-cardio.js +84 -0
- package/dist/derived-cardio.js.map +1 -0
- package/dist/endurance-types.d.ts +21 -0
- package/dist/endurance-types.d.ts.map +1 -0
- package/dist/endurance-types.js +39 -0
- package/dist/endurance-types.js.map +1 -0
- package/dist/grade-adjusted-pace.d.ts +34 -0
- package/dist/grade-adjusted-pace.d.ts.map +1 -0
- package/dist/grade-adjusted-pace.js +41 -0
- package/dist/grade-adjusted-pace.js.map +1 -0
- package/dist/muscle-groups.d.ts +35 -0
- package/dist/muscle-groups.d.ts.map +1 -0
- package/dist/muscle-groups.js +135 -0
- package/dist/muscle-groups.js.map +1 -0
- package/dist/pmc.d.ts +77 -0
- package/dist/pmc.d.ts.map +1 -0
- package/dist/pmc.js +83 -0
- package/dist/pmc.js.map +1 -0
- package/dist/power-analysis.d.ts +82 -0
- package/dist/power-analysis.d.ts.map +1 -0
- package/dist/power-analysis.js +162 -0
- package/dist/power-analysis.js.map +1 -0
- package/dist/training-distribution.d.ts +43 -0
- package/dist/training-distribution.d.ts.map +1 -0
- package/dist/training-distribution.js +68 -0
- package/dist/training-distribution.js.map +1 -0
- package/dist/training-load.d.ts +66 -0
- package/dist/training-load.d.ts.map +1 -0
- package/dist/training-load.js +89 -0
- package/dist/training-load.js.map +1 -0
- package/dist/training.d.ts +61 -0
- package/dist/training.d.ts.map +1 -0
- package/dist/training.js +564 -0
- package/dist/training.js.map +1 -0
- package/dist/workout-recommendation.d.ts +86 -0
- package/dist/workout-recommendation.d.ts.map +1 -0
- package/dist/workout-recommendation.js +338 -0
- package/dist/workout-recommendation.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Next workout recommendation engine.
|
|
3
|
+
*
|
|
4
|
+
* Pure function: takes a snapshot of the user's training state and returns
|
|
5
|
+
* an evidence-based recommendation for what to do next.
|
|
6
|
+
*
|
|
7
|
+
* Based on:
|
|
8
|
+
* - Polarized training model (Seiler, Stoggl & Sperlich 2014): 80/20 zone split
|
|
9
|
+
* - Muscle group recovery (Schoenfeld 2016): 48h+ per group, 2x/week target
|
|
10
|
+
* - HRV-guided training (Plews 2013): modulate intensity by recovery
|
|
11
|
+
* - Hard/easy alternation (Seiler 2010): never stack high-intensity days
|
|
12
|
+
* - HIIT capping: max 2-3x/week with 48h spacing
|
|
13
|
+
*/
|
|
14
|
+
import { computeHrRange as computeHrRangeFromZones } from "@dofek/zones/zones";
|
|
15
|
+
// ── Constants ────────────────────────────────────────────────────────
|
|
16
|
+
const MUSCLE_RECOVERY_HOURS = 48;
|
|
17
|
+
const HIIT_SPACING_DAYS = 2;
|
|
18
|
+
const MAX_HIIT_PER_WEEK = 3;
|
|
19
|
+
/** Target: ≤20% of endurance time in zones 4+5 (polarized 80/20 model) */
|
|
20
|
+
const HIGH_INTENSITY_RATIO_TARGET = 0.2;
|
|
21
|
+
/** Readiness thresholds */
|
|
22
|
+
const READINESS_REST = 33;
|
|
23
|
+
const READINESS_EASY = 50;
|
|
24
|
+
const READINESS_MODERATE = 65;
|
|
25
|
+
/** Grouping of muscle groups into training sessions */
|
|
26
|
+
const UPPER_PUSH = ["chest", "shoulders", "triceps"];
|
|
27
|
+
const UPPER_PULL = ["back", "biceps", "lats", "traps"];
|
|
28
|
+
const LOWER_BODY = ["quadriceps", "hamstrings", "glutes", "calves", "legs"];
|
|
29
|
+
const CORE = ["core", "abs", "obliques"];
|
|
30
|
+
const MUSCLE_GROUP_LABELS = {
|
|
31
|
+
chest: "Chest",
|
|
32
|
+
shoulders: "Shoulders",
|
|
33
|
+
triceps: "Triceps",
|
|
34
|
+
back: "Back",
|
|
35
|
+
biceps: "Biceps",
|
|
36
|
+
lats: "Lats",
|
|
37
|
+
traps: "Traps",
|
|
38
|
+
quadriceps: "Quads",
|
|
39
|
+
hamstrings: "Hamstrings",
|
|
40
|
+
glutes: "Glutes",
|
|
41
|
+
calves: "Calves",
|
|
42
|
+
legs: "Legs",
|
|
43
|
+
core: "Core",
|
|
44
|
+
abs: "Abs",
|
|
45
|
+
obliques: "Obliques",
|
|
46
|
+
forearms: "Forearms",
|
|
47
|
+
};
|
|
48
|
+
export function muscleGroupLabel(group) {
|
|
49
|
+
return MUSCLE_GROUP_LABELS[group] ?? group.charAt(0).toUpperCase() + group.slice(1);
|
|
50
|
+
}
|
|
51
|
+
// ── Interval Protocols ───────────────────────────────────────────────
|
|
52
|
+
const NORWEGIAN_4X4 = {
|
|
53
|
+
name: "Norwegian 4x4",
|
|
54
|
+
description: "4 min hard, 3 min easy recovery. Best for building aerobic power.",
|
|
55
|
+
workSeconds: 240,
|
|
56
|
+
restSeconds: 180,
|
|
57
|
+
sets: 4,
|
|
58
|
+
targetZone: 4,
|
|
59
|
+
warmupMinutes: 10,
|
|
60
|
+
cooldownMinutes: 10,
|
|
61
|
+
totalMinutes: 48,
|
|
62
|
+
};
|
|
63
|
+
const BILLAT_30_30 = {
|
|
64
|
+
name: "30/30 Intervals",
|
|
65
|
+
description: "30 sec hard, 30 sec easy. Accumulates time near peak aerobic capacity efficiently.",
|
|
66
|
+
workSeconds: 30,
|
|
67
|
+
restSeconds: 30,
|
|
68
|
+
sets: 20,
|
|
69
|
+
targetZone: 5,
|
|
70
|
+
warmupMinutes: 10,
|
|
71
|
+
cooldownMinutes: 10,
|
|
72
|
+
totalMinutes: 40,
|
|
73
|
+
};
|
|
74
|
+
// ── Core Algorithm ───────────────────────────────────────────────────
|
|
75
|
+
export function recommendNextWorkout(input) {
|
|
76
|
+
const reasoning = [];
|
|
77
|
+
// Step 1: Check readiness — gate intensity
|
|
78
|
+
if (input.readinessScore != null && input.readinessScore < READINESS_REST) {
|
|
79
|
+
reasoning.push(`Recovery score is ${input.readinessScore}/100 — your body needs rest`);
|
|
80
|
+
if (input.sleepDebtMinutes > 120) {
|
|
81
|
+
reasoning.push(`Sleep debt is ${Math.round(input.sleepDebtMinutes / 60)} hours — prioritize sleep`);
|
|
82
|
+
}
|
|
83
|
+
return makeRest(reasoning);
|
|
84
|
+
}
|
|
85
|
+
if (input.readinessScore != null && input.readinessScore < READINESS_EASY) {
|
|
86
|
+
reasoning.push(`Recovery score is ${input.readinessScore}/100 — keep it light today`);
|
|
87
|
+
return makeActiveRecovery(reasoning);
|
|
88
|
+
}
|
|
89
|
+
// Step 2: Check workload ratio for injury risk
|
|
90
|
+
if (input.workloadRatio != null && input.workloadRatio > 1.5) {
|
|
91
|
+
reasoning.push(`Workload ratio is ${input.workloadRatio.toFixed(2)} — high injury risk zone`);
|
|
92
|
+
return makeActiveRecovery(reasoning);
|
|
93
|
+
}
|
|
94
|
+
// Step 3: Hard/easy alternation — was yesterday hard?
|
|
95
|
+
const yesterdayWasHard = wasYesterdayHard(input);
|
|
96
|
+
const isModerateReadiness = input.readinessScore != null && input.readinessScore < READINESS_MODERATE;
|
|
97
|
+
if (yesterdayWasHard && isModerateReadiness) {
|
|
98
|
+
reasoning.push("Yesterday was a hard training day and recovery is moderate");
|
|
99
|
+
return makeCardioEasy(input, reasoning);
|
|
100
|
+
}
|
|
101
|
+
// Step 4: Decide between strength and cardio
|
|
102
|
+
const daysSinceStrength = daysSinceActivityType(input, "strength");
|
|
103
|
+
const daysSinceCardio = daysSinceActivityType(input, "cardio");
|
|
104
|
+
const freshMuscleGroups = getFreshMuscleGroups(input);
|
|
105
|
+
const hiitCountThisWeek = countHiitThisWeek(input);
|
|
106
|
+
// Strength is overdue (3+ days) and muscle groups are available
|
|
107
|
+
if (daysSinceStrength >= 3 && freshMuscleGroups.length > 0) {
|
|
108
|
+
reasoning.push(`Last strength workout was ${daysSinceStrength === Infinity ? "over a week" : `${daysSinceStrength} days`} ago`);
|
|
109
|
+
return makeStrength(freshMuscleGroups, reasoning);
|
|
110
|
+
}
|
|
111
|
+
// Cardio is overdue
|
|
112
|
+
if (daysSinceCardio >= 2) {
|
|
113
|
+
reasoning.push(`Last cardio session was ${daysSinceCardio === Infinity ? "over a week" : `${daysSinceCardio} days`} ago`);
|
|
114
|
+
return decideCardioIntensity(input, hiitCountThisWeek, yesterdayWasHard, reasoning);
|
|
115
|
+
}
|
|
116
|
+
// Neither is overdue — alternate based on last activity
|
|
117
|
+
const lastActivity = input.recentActivities[0];
|
|
118
|
+
if (lastActivity?.type === "cardio" && freshMuscleGroups.length > 0) {
|
|
119
|
+
reasoning.push("Alternating from yesterday's cardio session");
|
|
120
|
+
return makeStrength(freshMuscleGroups, reasoning);
|
|
121
|
+
}
|
|
122
|
+
if (lastActivity?.type === "strength") {
|
|
123
|
+
reasoning.push("Alternating from yesterday's strength session");
|
|
124
|
+
return decideCardioIntensity(input, hiitCountThisWeek, yesterdayWasHard, reasoning);
|
|
125
|
+
}
|
|
126
|
+
// Default: check what's most needed
|
|
127
|
+
if (freshMuscleGroups.length > 0 && daysSinceStrength >= daysSinceCardio) {
|
|
128
|
+
reasoning.push("Balancing weekly training between strength and cardio");
|
|
129
|
+
return makeStrength(freshMuscleGroups, reasoning);
|
|
130
|
+
}
|
|
131
|
+
return decideCardioIntensity(input, hiitCountThisWeek, yesterdayWasHard, reasoning);
|
|
132
|
+
}
|
|
133
|
+
// ── Helpers ──────────────────────────────────────────────────────────
|
|
134
|
+
function wasYesterdayHard(input) {
|
|
135
|
+
const yesterday = addDays(input.today, -1);
|
|
136
|
+
return input.recentActivities.some((a) => a.date === yesterday && a.wasHardDay);
|
|
137
|
+
}
|
|
138
|
+
function daysSinceActivityType(input, type) {
|
|
139
|
+
const activity = input.recentActivities.find((a) => a.type === type);
|
|
140
|
+
if (!activity)
|
|
141
|
+
return Number.POSITIVE_INFINITY;
|
|
142
|
+
return daysBetween(activity.date, input.today);
|
|
143
|
+
}
|
|
144
|
+
function getFreshMuscleGroups(input) {
|
|
145
|
+
const hoursThreshold = MUSCLE_RECOVERY_HOURS;
|
|
146
|
+
const todayDate = new Date(input.today);
|
|
147
|
+
return input.muscleGroupFreshness
|
|
148
|
+
.filter((mg) => {
|
|
149
|
+
const lastWorked = new Date(mg.lastWorkedDate);
|
|
150
|
+
const hoursSince = (todayDate.getTime() - lastWorked.getTime()) / (1000 * 60 * 60);
|
|
151
|
+
return hoursSince >= hoursThreshold;
|
|
152
|
+
})
|
|
153
|
+
.map((mg) => mg.muscleGroup);
|
|
154
|
+
}
|
|
155
|
+
function countHiitThisWeek(input) {
|
|
156
|
+
// Count hard cardio sessions in the last 7 days
|
|
157
|
+
const weekAgo = addDays(input.today, -7);
|
|
158
|
+
return input.recentActivities.filter((a) => a.type === "cardio" && a.wasHardDay && a.date > weekAgo).length;
|
|
159
|
+
}
|
|
160
|
+
function daysSinceLastHiit(input) {
|
|
161
|
+
const lastHiit = input.recentActivities.find((a) => a.type === "cardio" && a.wasHardDay);
|
|
162
|
+
if (!lastHiit)
|
|
163
|
+
return Number.POSITIVE_INFINITY;
|
|
164
|
+
return daysBetween(lastHiit.date, input.today);
|
|
165
|
+
}
|
|
166
|
+
function getHighIntensityRatio(zone) {
|
|
167
|
+
const total = zone.zone1Samples +
|
|
168
|
+
zone.zone2Samples +
|
|
169
|
+
zone.zone3Samples +
|
|
170
|
+
zone.zone4Samples +
|
|
171
|
+
zone.zone5Samples;
|
|
172
|
+
if (total === 0)
|
|
173
|
+
return 0;
|
|
174
|
+
return (zone.zone4Samples + zone.zone5Samples) / total;
|
|
175
|
+
}
|
|
176
|
+
function decideCardioIntensity(input, hiitCountThisWeek, yesterdayWasHard, reasoning) {
|
|
177
|
+
const canDoHiit = hiitCountThisWeek < MAX_HIIT_PER_WEEK &&
|
|
178
|
+
daysSinceLastHiit(input) >= HIIT_SPACING_DAYS &&
|
|
179
|
+
!yesterdayWasHard;
|
|
180
|
+
// Check if zone distribution allows more high intensity
|
|
181
|
+
const needsMoreHighIntensity = input.zoneDistribution != null &&
|
|
182
|
+
getHighIntensityRatio(input.zoneDistribution) < HIGH_INTENSITY_RATIO_TARGET;
|
|
183
|
+
// Strong readiness + room for HIIT = intervals
|
|
184
|
+
const goodReadiness = input.readinessScore == null || input.readinessScore >= READINESS_MODERATE;
|
|
185
|
+
const positiveTsb = input.trainingStressBalance == null || input.trainingStressBalance > -10;
|
|
186
|
+
if (canDoHiit && (needsMoreHighIntensity || positiveTsb) && goodReadiness) {
|
|
187
|
+
reasoning.push("Recovery is good and zone distribution supports a hard session");
|
|
188
|
+
if (hiitCountThisWeek > 0) {
|
|
189
|
+
reasoning.push(`${hiitCountThisWeek} hard cardio session${hiitCountThisWeek > 1 ? "s" : ""} already this week (max ${MAX_HIIT_PER_WEEK})`);
|
|
190
|
+
}
|
|
191
|
+
return makeCardioIntervals(input, reasoning);
|
|
192
|
+
}
|
|
193
|
+
if (!canDoHiit) {
|
|
194
|
+
if (hiitCountThisWeek >= MAX_HIIT_PER_WEEK) {
|
|
195
|
+
reasoning.push(`Already hit ${MAX_HIIT_PER_WEEK} hard cardio sessions this week`);
|
|
196
|
+
}
|
|
197
|
+
else if (daysSinceLastHiit(input) < HIIT_SPACING_DAYS) {
|
|
198
|
+
reasoning.push("Need 48 hours between hard cardio sessions");
|
|
199
|
+
}
|
|
200
|
+
else if (yesterdayWasHard) {
|
|
201
|
+
reasoning.push("Yesterday was a hard session — keeping today easy");
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return makeCardioEasy(input, reasoning);
|
|
205
|
+
}
|
|
206
|
+
function selectIntervalProtocol(input) {
|
|
207
|
+
// If TSB is very positive (fresh), go for the harder protocol
|
|
208
|
+
if (input.trainingStressBalance != null && input.trainingStressBalance > 5) {
|
|
209
|
+
return NORWEGIAN_4X4;
|
|
210
|
+
}
|
|
211
|
+
// If high-intensity ratio is very low, use 30/30s to build it up quickly
|
|
212
|
+
if (input.zoneDistribution != null && getHighIntensityRatio(input.zoneDistribution) < 0.1) {
|
|
213
|
+
return BILLAT_30_30;
|
|
214
|
+
}
|
|
215
|
+
// Default to Norwegian 4x4 as the gold standard
|
|
216
|
+
return NORWEGIAN_4X4;
|
|
217
|
+
}
|
|
218
|
+
function computeHrRange(input, zone) {
|
|
219
|
+
return computeHrRangeFromZones(input.userMaxHr, input.userRestingHr, zone);
|
|
220
|
+
}
|
|
221
|
+
function pickMuscleGroupFocus(freshGroups) {
|
|
222
|
+
// Prefer training muscle groups that form a natural session
|
|
223
|
+
const upperPush = freshGroups.filter((g) => UPPER_PUSH.includes(g));
|
|
224
|
+
const upperPull = freshGroups.filter((g) => UPPER_PULL.includes(g));
|
|
225
|
+
const lower = freshGroups.filter((g) => LOWER_BODY.includes(g));
|
|
226
|
+
const core = freshGroups.filter((g) => CORE.includes(g));
|
|
227
|
+
// Pick the group with the most available muscles
|
|
228
|
+
const groups = [
|
|
229
|
+
{ label: "push", muscles: upperPush },
|
|
230
|
+
{ label: "pull", muscles: upperPull },
|
|
231
|
+
{ label: "lower", muscles: lower },
|
|
232
|
+
].sort((a, b) => b.muscles.length - a.muscles.length);
|
|
233
|
+
const best = groups[0];
|
|
234
|
+
if (best && best.muscles.length > 0) {
|
|
235
|
+
// Add core if fresh
|
|
236
|
+
return [...best.muscles, ...core];
|
|
237
|
+
}
|
|
238
|
+
// Fallback: return all fresh groups
|
|
239
|
+
return freshGroups;
|
|
240
|
+
}
|
|
241
|
+
function muscleGroupSummary(groups) {
|
|
242
|
+
const withoutCore = groups.filter((g) => !CORE.includes(g));
|
|
243
|
+
if (withoutCore.every((g) => UPPER_PUSH.includes(g)))
|
|
244
|
+
return "Upper Body Push";
|
|
245
|
+
if (withoutCore.every((g) => UPPER_PULL.includes(g)))
|
|
246
|
+
return "Upper Body Pull";
|
|
247
|
+
if (withoutCore.every((g) => LOWER_BODY.includes(g)))
|
|
248
|
+
return "Lower Body";
|
|
249
|
+
if (withoutCore.length === 0 && groups.length > 0)
|
|
250
|
+
return "Core";
|
|
251
|
+
return groups.map(muscleGroupLabel).slice(0, 3).join(", ");
|
|
252
|
+
}
|
|
253
|
+
// ── Builders ─────────────────────────────────────────────────────────
|
|
254
|
+
function makeRest(reasoning) {
|
|
255
|
+
return {
|
|
256
|
+
type: "rest",
|
|
257
|
+
summary: "Rest Day",
|
|
258
|
+
reasoning,
|
|
259
|
+
strengthDetail: null,
|
|
260
|
+
cardioEasyDetail: null,
|
|
261
|
+
cardioIntervalsDetail: null,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function makeActiveRecovery(reasoning) {
|
|
265
|
+
reasoning.push("Light movement promotes blood flow and recovery");
|
|
266
|
+
return {
|
|
267
|
+
type: "active_recovery",
|
|
268
|
+
summary: "Active Recovery — Easy Walk or Mobility",
|
|
269
|
+
reasoning,
|
|
270
|
+
strengthDetail: null,
|
|
271
|
+
cardioEasyDetail: {
|
|
272
|
+
targetZone: 1,
|
|
273
|
+
durationMinutes: 30,
|
|
274
|
+
targetHrRange: null,
|
|
275
|
+
},
|
|
276
|
+
cardioIntervalsDetail: null,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function makeCardioEasy(input, reasoning) {
|
|
280
|
+
reasoning.push("Zone 2 aerobic base building — conversational pace");
|
|
281
|
+
const hrRange = computeHrRange(input, 2);
|
|
282
|
+
return {
|
|
283
|
+
type: "cardio_easy",
|
|
284
|
+
summary: "Easy Cardio — Zone 2 Aerobic Base",
|
|
285
|
+
reasoning,
|
|
286
|
+
strengthDetail: null,
|
|
287
|
+
cardioEasyDetail: {
|
|
288
|
+
targetZone: 2,
|
|
289
|
+
durationMinutes: 45,
|
|
290
|
+
targetHrRange: hrRange,
|
|
291
|
+
},
|
|
292
|
+
cardioIntervalsDetail: null,
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function makeCardioIntervals(input, reasoning) {
|
|
296
|
+
const protocol = selectIntervalProtocol(input);
|
|
297
|
+
reasoning.push(`${protocol.name}: ${protocol.description}`);
|
|
298
|
+
const hrRange = computeHrRange(input, protocol.targetZone);
|
|
299
|
+
return {
|
|
300
|
+
type: "cardio_intervals",
|
|
301
|
+
summary: `Cardio Intervals — ${protocol.name}`,
|
|
302
|
+
reasoning,
|
|
303
|
+
strengthDetail: null,
|
|
304
|
+
cardioEasyDetail: null,
|
|
305
|
+
cardioIntervalsDetail: {
|
|
306
|
+
protocol,
|
|
307
|
+
targetHrRange: hrRange,
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
function makeStrength(freshMuscleGroups, reasoning) {
|
|
312
|
+
const focus = pickMuscleGroupFocus(freshMuscleGroups);
|
|
313
|
+
const label = muscleGroupSummary(focus);
|
|
314
|
+
reasoning.push(`Muscle groups ready: ${focus.map(muscleGroupLabel).join(", ")}`);
|
|
315
|
+
return {
|
|
316
|
+
type: "strength",
|
|
317
|
+
summary: `Strength — ${label}`,
|
|
318
|
+
reasoning,
|
|
319
|
+
strengthDetail: {
|
|
320
|
+
muscleGroups: focus,
|
|
321
|
+
estimatedDurationMinutes: 45 + focus.length * 5,
|
|
322
|
+
},
|
|
323
|
+
cardioEasyDetail: null,
|
|
324
|
+
cardioIntervalsDetail: null,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
// ── Date Helpers ─────────────────────────────────────────────────────
|
|
328
|
+
function addDays(isoDate, days) {
|
|
329
|
+
const date = new Date(isoDate);
|
|
330
|
+
date.setDate(date.getDate() + days);
|
|
331
|
+
return date.toISOString().split("T")[0] ?? isoDate;
|
|
332
|
+
}
|
|
333
|
+
function daysBetween(from, to) {
|
|
334
|
+
const fromDate = new Date(from);
|
|
335
|
+
const toDate = new Date(to);
|
|
336
|
+
return Math.round((toDate.getTime() - fromDate.getTime()) / (1000 * 60 * 60 * 24));
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=workout-recommendation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workout-recommendation.js","sourceRoot":"","sources":["../src/workout-recommendation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAqF/E,wEAAwE;AAExE,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B,0EAA0E;AAC1E,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAExC,2BAA2B;AAC3B,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,uDAAuD;AACvD,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AACrD,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACvD,MAAM,UAAU,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5E,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AAEzC,MAAM,mBAAmB,GAA2B;IAClD,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,MA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C,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;AACrD,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,EAAU;IAC3C,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AACrF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dofek/training",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Training-science calculations for power, load, performance, and workout planning",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Asherlc/dofek.git",
|
|
10
|
+
"directory": "packages/training"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/Asherlc/dofek/tree/main/packages/training#readme",
|
|
13
|
+
"bugs": "https://github.com/Asherlc/dofek/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"training",
|
|
16
|
+
"cycling",
|
|
17
|
+
"running",
|
|
18
|
+
"power",
|
|
19
|
+
"tss",
|
|
20
|
+
"trimp",
|
|
21
|
+
"fitness"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=22.14.0"
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
"./*": {
|
|
34
|
+
"types": "./dist/*.d.ts",
|
|
35
|
+
"import": "./dist/*.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@dofek/scoring": "0.1.0",
|
|
43
|
+
"@dofek/zones": "0.1.0"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc",
|
|
47
|
+
"prepack": "pnpm run build",
|
|
48
|
+
"test": "vitest run src",
|
|
49
|
+
"typecheck": "tsc --noEmit"
|
|
50
|
+
},
|
|
51
|
+
"gitHead": "ac95258c753c7e75b57da7ae47426d22b78e8c01"
|
|
52
|
+
}
|