decord/source/815_dateTimestampInSeconds.js

68 lines
2.2 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 815
2026-07-25 08:10:48 +00:00
// Function ID: 9132
2026-07-20 16:05:17 +00:00
// Name: dateTimestampInSeconds
2026-07-23 10:11:24 +00:00
// Dependencies: [808, 798]
2026-07-20 16:05:17 +00:00
// Module 815 (dateTimestampInSeconds)
2026-07-23 10:11:24 +00:00
const require = arg1;
const dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
function dateTimestampInSeconds() {
2026-07-23 10:11:24 +00:00
return require(808) /* withRandomSafeContext */.safeDateNow() / 1000;
2026-07-20 16:05:17 +00:00
}
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
let c3 = null;
2026-07-20 16:05:17 +00:00
arg5.browserPerformanceTimeOrigin = function browserPerformanceTimeOrigin() {
if (null === closure_3) {
2026-07-23 10:11:24 +00:00
closure_3 = (function getBrowserTimeOrigin() {
const _performance = outer1_0(outer1_1[1]).GLOBAL_OBJ.performance;
2026-07-20 16:05:17 +00:00
if (null != _performance) {
if (_performance.now) {
2026-07-23 10:11:24 +00:00
const result = outer1_0(outer1_1[0]).withRandomSafeContext(() => _performance.now());
const obj = outer1_0(outer1_1[0]);
const safeDateNowResult = outer1_0(outer1_1[0]).safeDateNow();
2026-07-20 16:05:17 +00:00
const timeOrigin = _performance.timeOrigin;
if ("number" === typeof timeOrigin) {
const _Math = Math;
if (Math.abs(timeOrigin + result - safeDateNowResult) < 300000) {
return timeOrigin;
}
}
const timing = _performance.timing;
let navigationStart;
if (null != timing) {
navigationStart = timing.navigationStart;
}
if ("number" !== typeof navigationStart) {
navigationStart = safeDateNowResult - result;
} else {
const _Math2 = Math;
}
return navigationStart;
}
}
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
}
return closure_3;
};
arg5.dateTimestampInSeconds = dateTimestampInSeconds;
arg5.timestampInSeconds = function timestampInSeconds() {
2026-07-23 10:11:24 +00:00
if (null != closure_2) {
let tmp = closure_2;
} else {
tmp = (function createUnixTimestampInSecondsFunc() {
const _performance = outer1_0(outer1_1[1]).GLOBAL_OBJ.performance;
2026-07-20 16:05:17 +00:00
if (null != _performance) {
if (_performance.now) {
if (_performance.timeOrigin) {
const timeOrigin = _performance.timeOrigin;
2026-07-23 10:11:24 +00:00
return () => (timeOrigin + outer2_0(outer2_1[0]).withRandomSafeContext(() => outer1_0.now())) / 1000;
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
return outer1_4;
})();
closure_2 = tmp;
2026-07-20 16:05:17 +00:00
}
return tmp();
};