Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
123 lines
4.3 KiB
TypeScript
123 lines
4.3 KiB
TypeScript
// Module ID: 13765
|
|
// Function ID: 13766
|
|
// Name: useFPDurationLeft
|
|
// Dependencies: [558, 568, 1119, 7718, 4474, 1235, 2]
|
|
|
|
// Module 13765 (useFPDurationLeft)
|
|
import c from "c" /* 568 */;
|
|
import util from "util" /* 1119 */;
|
|
import useCountdownDefault from "useCountdown" /* 7718 */;
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
function roundFPCountdownUnits(arg0) {
|
|
const time = {};
|
|
const merged = Object.assign(arg0);
|
|
if (time.seconds > 0) {
|
|
time.minutes = time.minutes + 1;
|
|
time.seconds = 0;
|
|
}
|
|
if (60 === time.minutes) {
|
|
time.hours = time.hours + 1;
|
|
time.minutes = 0;
|
|
}
|
|
if (24 === time.hours) {
|
|
time.days = time.days + 1;
|
|
time.hours = 0;
|
|
}
|
|
if (time.days > 0) {
|
|
if (time.hours > 0) {
|
|
let days = time.days + 1;
|
|
} else {
|
|
days = time.days;
|
|
}
|
|
const time1 = { days, hours: 0, minutes: 0, seconds: 0 };
|
|
return time1;
|
|
} else if (time.hours > 0) {
|
|
if (time.minutes > 45) {
|
|
let hours = time.hours + 1;
|
|
} else {
|
|
hours = time.hours;
|
|
}
|
|
if (hours > 11) {
|
|
let time2 = { days: 1, hours: 0, minutes: 0, seconds: 0 };
|
|
} else {
|
|
time2 = { days: 0, hours, minutes: 0, seconds: 0 };
|
|
}
|
|
return time2;
|
|
} else if (time.minutes > 0) {
|
|
let num5 = 0;
|
|
if (time.minutes > 45) {
|
|
num5 = 1;
|
|
}
|
|
const time3 = { days: 0, hours: num5, minutes: null, seconds: 0 };
|
|
let num7 = 0;
|
|
if (1 !== num5) {
|
|
num7 = time.minutes;
|
|
}
|
|
time3.minutes = num7;
|
|
return time3;
|
|
} else {
|
|
let time4 = time;
|
|
if (time.seconds > 0) {
|
|
time4 = { days: 0, hours: 0, minutes: 1, seconds: 0 };
|
|
}
|
|
return time4;
|
|
}
|
|
}
|
|
const CountDownMessageTypes = { SHORT_TIME_LEFT: 0, [0]: "SHORT_TIME_LEFT", LONG_TIME_LEFT: 1, [1]: "LONG_TIME_LEFT", ENDS_IN: 2, [2]: "ENDS_IN", SHORT_TIME: 3, [3]: "SHORT_TIME", CREDITS_ENDS_IN: 4, [4]: "CREDITS_ENDS_IN" };
|
|
const result = size.fileFinishedImporting("modules/billing/hooks/useFPDurationLeft.tsx");
|
|
|
|
export default ReactCompilerGating.isReactCompilerEnabled() ? ((toDate, arg1) => {
|
|
const obj = c;
|
|
let cResult = obj.c(2);
|
|
if (obj.SHORT_TIME_LEFT === arg1) {
|
|
const time = { days: tmp(1119).t["/wnvqA"], hours: tmp(1119).t.Jsq0XN, minutes: tmp(1119).t["SBd+Bs"] };
|
|
} else if (tmp4.LONG_TIME_LEFT === arg1) {
|
|
const time1 = { days: tmp(1119).t.UD5nn5, hours: tmp(1119).t.Hg8Fee, minutes: tmp(1119).t.XSbQZZ };
|
|
} else if (tmp4.ENDS_IN === arg1) {
|
|
const time2 = { days: tmp(1119).t.rLqNad, hours: tmp(1119).t.d1LvCA, minutes: tmp(1119).t.Z2LX7K };
|
|
} else if (tmp4.CREDITS_ENDS_IN === arg1) {
|
|
const time3 = { days: tmp(1119).t.xQ3zuN, hours: tmp(1119).t.SFU7QN, minutes: tmp(1119).t.Y4FNdL };
|
|
} else if (tmp4.SHORT_TIME === arg1) {
|
|
const time4 = { days: tmp(1119).t.fYmirx, hours: tmp(1119).t["C3RO+g"], minutes: tmp(1119).t.r77oHc };
|
|
} else {
|
|
const _Error = Error;
|
|
const _HermesInternal = HermesInternal;
|
|
const error = new Error("Unknown messageType (" + arg1 + ") when rendering time left");
|
|
throw error;
|
|
}
|
|
if (cResult[0] !== toDate) {
|
|
const toDateResult = toDate.toDate();
|
|
cResult[0] = toDate;
|
|
cResult[1] = toDateResult;
|
|
let tmp14 = toDateResult;
|
|
} else {
|
|
tmp14 = cResult[1];
|
|
}
|
|
cResult = useCountdownDefault;
|
|
roundFPCountdownUnits(cResult(tmp14, 60000));
|
|
}) : ((toDate, arg1) => {
|
|
if (obj.SHORT_TIME_LEFT === arg1) {
|
|
const time = { days: util.t["/wnvqA"], hours: util.t.Jsq0XN, minutes: util.t["SBd+Bs"] };
|
|
} else if (tmp.LONG_TIME_LEFT === arg1) {
|
|
const time1 = { days: util.t.UD5nn5, hours: util.t.Hg8Fee, minutes: util.t.XSbQZZ };
|
|
} else {
|
|
if (tmp.ENDS_IN === arg1) {
|
|
const time2 = { days: util.t.rLqNad, hours: util.t.d1LvCA, minutes: util.t.Z2LX7K };
|
|
} else if (tmp.CREDITS_ENDS_IN !== arg1) {
|
|
if (tmp.SHORT_TIME === arg1) {
|
|
const time3 = { days: util.t.fYmirx, hours: util.t["C3RO+g"], minutes: util.t.r77oHc };
|
|
} else {
|
|
const _Error = Error;
|
|
const _HermesInternal = HermesInternal;
|
|
const error = new Error("Unknown messageType (" + arg1 + ") when rendering time left");
|
|
throw error;
|
|
}
|
|
}
|
|
const time4 = { days: util.t.xQ3zuN, hours: util.t.SFU7QN, minutes: util.t.Y4FNdL };
|
|
}
|
|
roundFPCountdownUnits(useCountdownDefault(toDate.toDate(), 60000));
|
|
});
|
|
export { CountDownMessageTypes };
|
|
export { roundFPCountdownUnits };
|