@dgpholdings/greatoak-shared 1.2.18 → 1.2.19
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.
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* - Fatigue multiplier (later sets get 8% bonus per set for accumulated fatigue)
|
|
43
43
|
*/
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.calculateExerciseScore = void 0;
|
|
45
|
+
exports.calculateTotalVolume = exports.calculateExerciseScore = void 0;
|
|
46
46
|
const time_util_1 = require("./time.util");
|
|
47
47
|
const calculateExerciseScore = (param) => {
|
|
48
48
|
const { exercise, record, user } = param;
|
|
@@ -52,7 +52,7 @@ const calculateExerciseScore = (param) => {
|
|
|
52
52
|
return { score: 0, muscleScores: {} };
|
|
53
53
|
}
|
|
54
54
|
// Calculate base performance metrics
|
|
55
|
-
const totalVolume = calculateTotalVolume(completedSets, user);
|
|
55
|
+
const totalVolume = (0, exports.calculateTotalVolume)(completedSets, user);
|
|
56
56
|
const avgIntensity = calculateAverageIntensity(completedSets, exercise, user);
|
|
57
57
|
const setQuality = calculateSetQuality(completedSets);
|
|
58
58
|
// Calculate muscle fatigue scores
|
|
@@ -106,6 +106,7 @@ const calculateTotalVolume = (record, user) => {
|
|
|
106
106
|
return total;
|
|
107
107
|
}, 0);
|
|
108
108
|
};
|
|
109
|
+
exports.calculateTotalVolume = calculateTotalVolume;
|
|
109
110
|
const calculateAverageIntensity = (record, exercise, user) => {
|
|
110
111
|
const intensities = record.map((set, index) => {
|
|
111
112
|
let baseIntensity = 0;
|