decord/source/modules/premium/gifting/GiftingBadgeConstants.tsx
2026-08-05 07:35:12 +00:00

61 lines
1.5 KiB
TypeScript

// Module ID: 10046
// Function ID: 10047
// Name: getTierForProgress
// Dependencies: [8684, 2]
// Exports: getNextTierForProgress, getRemainingGiftsToNextTier, getTierForProgress
// Module 10046 (getTierForProgress)
import { getSingleRequirementThreshold as closure_0 } from "map";
const result = require("set").fileFinishedImporting("modules/premium/gifting/GiftingBadgeConstants.tsx");
export const getTierForProgress = function getTierForProgress(arr) {
let closure_0 = arg1;
return arr.reduce((arg0, arg1) => {
let tmp = arg0;
const tmp3 = callback(arg1);
let tmp4 = arg0;
if (callback >= tmp3) {
if (null == tmp) {
tmp = arg1;
}
tmp4 = tmp;
}
return tmp4;
}, null);
};
export const getNextTierForProgress = function getNextTierForProgress(arr) {
let closure_0 = arg1;
return arr.reduce((arg0, arg1) => {
let tmp = arg0;
const tmp3 = callback(arg1);
let tmp4 = arg0;
if (callback < tmp3) {
if (null == tmp) {
tmp = arg1;
}
tmp4 = tmp;
}
return tmp4;
}, null);
};
export const getRemainingGiftsToNextTier = function getRemainingGiftsToNextTier(arr) {
const callback = arg1;
const reduced = arr.reduce((arg0, arg1) => {
let tmp = arg0;
const tmp3 = callback(arg1);
let tmp4 = arg0;
if (callback < tmp3) {
if (null == tmp) {
tmp = arg1;
}
tmp4 = tmp;
}
return tmp4;
}, null);
let diff = null;
if (null != reduced) {
diff = callback(reduced) - arg1;
}
return diff;
};