decord/source/3380_areIntervalsOverlapping.js

51 lines
1.3 KiB
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 3380
// Function ID: 26529
2026-07-20 16:05:17 +00:00
// Name: areIntervalsOverlapping
2026-07-25 08:10:48 +00:00
// Dependencies: [3210, 3211]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 3380 (areIntervalsOverlapping)
2026-07-23 10:11:24 +00:00
import _typeof from "_typeof";
import requiredArgs from "requiredArgs";
2026-07-20 16:05:17 +00:00
export default function areIntervalsOverlapping(start, start2, inclusive) {
2026-07-23 10:11:24 +00:00
requiredArgs.default(2, arguments);
2026-07-20 16:05:17 +00:00
start = undefined;
if (null != start) {
start = start.start;
}
2026-07-23 10:11:24 +00:00
const time = _typeof.default(start).getTime();
2026-07-20 16:05:17 +00:00
let end;
if (null != start) {
end = start.end;
}
2026-07-23 10:11:24 +00:00
const defaultResult1 = _typeof.default(start);
const time1 = _typeof.default(end).getTime();
2026-07-20 16:05:17 +00:00
let start1;
if (null != start2) {
start1 = start2.start;
}
2026-07-23 10:11:24 +00:00
const defaultResult2 = _typeof.default(end);
const time2 = _typeof.default(start1).getTime();
2026-07-20 16:05:17 +00:00
let end1;
if (null != start2) {
end1 = start2.end;
}
2026-07-23 10:11:24 +00:00
const defaultResult3 = _typeof.default(start1);
const time3 = _typeof.default(end1).getTime();
2026-07-20 16:05:17 +00:00
if (time <= time1) {
if (time2 <= time3) {
if (null != inclusive) {
if (inclusive.inclusive) {
return time <= time3 && time2 <= time1;
}
}
return time < time3 && time2 < time1;
}
}
const rangeError = new RangeError("Invalid interval");
throw rangeError;
};
export default exports.default;