94 lines
4.8 KiB
TypeScript
94 lines
4.8 KiB
TypeScript
/* Metro module 4789; source: modules/notification_center/getTimestampString.tsx; dependencies: [1244, 3738, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
|
|
function _fun41361(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:6, offset: 0x0111d03e, size: 160 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const getDurationString2 = getDurationString;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/notification_center/getTimestampString.tsx');
|
|
exports.default = getTimestampString;
|
|
exports.getAbbreviatedFormatter = getAbbreviatedFormatter;
|
|
exports.getFullFormatter = getFullFormatter;
|
|
exports.getDurationString = getDurationString2;
|
|
function getDurationString({seconds, getFormatter}) { // fn#41362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:115, offset: 0x0111d0de, size: 514 bytes, params: 2, frame: 24
|
|
var r0;
|
|
const intl = (IndexNativeModule).intl;
|
|
var formatToPlainString;
|
|
var years;
|
|
var object;
|
|
var months;
|
|
var days;
|
|
var hours;
|
|
var minutes;
|
|
let value = getFormatter();
|
|
if (seconds < 60) {
|
|
value = intl.formatToPlainString(value.minutes, {minutes: 1});
|
|
r0 = value;
|
|
} else if (seconds < 3600) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
minutes = value.minutes;
|
|
object = {};
|
|
object.minutes = global.Math.floor(seconds / 60);
|
|
value = Reflect.apply(formatToPlainString, intl, [minutes, object]);
|
|
r0 = value;
|
|
} else if (seconds < 86400) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
hours = value.hours;
|
|
object = {};
|
|
object.hours = global.Math.floor(seconds / 3600);
|
|
value = Reflect.apply(formatToPlainString, intl, [hours, object]);
|
|
r0 = value;
|
|
} else if (seconds < env0_3) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
days = value.days;
|
|
object = {};
|
|
object.days = global.Math.floor(seconds / 86400);
|
|
value = Reflect.apply(formatToPlainString, intl, [days, object]);
|
|
r0 = value;
|
|
} else if (seconds < env0_4) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
months = value.months;
|
|
object = {};
|
|
object.months = global.Math.floor(seconds / env0_3);
|
|
value = Reflect.apply(formatToPlainString, intl, [months, object]);
|
|
r0 = value;
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
years = value.years;
|
|
object = {};
|
|
object.years = global.Math.floor(seconds / env0_4);
|
|
value = Reflect.apply(formatToPlainString, intl, [years, object]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getTimestampString({since, getFormatter}) { // fn#41363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:707, offset: 0x0111d2e0, size: 97 bytes, params: 2, frame: 19
|
|
const getDurationStringBinding = getDurationString;
|
|
const object = {};
|
|
const value = (importDefault(3738) /* metro dependency 3738 */)();
|
|
object.seconds = value.diff((importDefault(3738) /* metro dependency 3738 */)(since), 's');
|
|
object.getFormatter = getFormatter;
|
|
return getDurationStringBinding(object);
|
|
}
|
|
|
|
function getAbbreviatedFormatter() { // fn#41364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:870, offset: 0x0111d341, size: 148 bytes, params: 1, frame: 14
|
|
const t = (IndexNativeModule).t;
|
|
const GBLpQ8 = t.GBLpQ8;
|
|
const XzBNbS = t.XzBNbS;
|
|
const I1E8p6 = t.I1E8p6;
|
|
return {minutes: t['XIGt+W'], hours: t.rhY1Rs, days: GBLpQ8, months: XzBNbS, years: I1E8p6};
|
|
}
|
|
|
|
function getFullFormatter() { // fn#41365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:1017, offset: 0x0111d3d5, size: 154 bytes, params: 1, frame: 14
|
|
const t = (IndexNativeModule).t;
|
|
const SoON3V = t.SoON3V;
|
|
return {minutes: t['GqQ/Y9'], hours: t.c5zfWZ, days: t.amjnaI, months: SoON3V, years: t['12B3Re']};
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun41361, 4789, [1244, 3738, 2]) /* metro module 4789, dependencies: [1244, 3738, 2] */;
|