decord/source/modules/collectibles/native/VisibilitySensor.tsx

85 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12057
// Function ID: 12058
2026-07-20 16:05:17 +00:00
// Name: onChange
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 17, 21, 1494, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 12057 (onChange)
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import noop from "noop" /* 19 */;
import closure_4 from "noop" /* 19 */;
import jsxProd from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ useEffect: obj1, useRef: c3 } = noop);
2026-08-24 06:08:38 +00:00
const View = get_ActivityIndicator.View;
2026-07-29 08:29:29 +00:00
({ jsx: closure_6, jsxs: error } = jsxProd);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/collectibles/native/VisibilitySensor.tsx");
2026-07-20 16:05:17 +00:00
export default function _default(onChange) {
onChange = onChange.onChange;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let callback;
let width;
let height;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
2026-07-29 08:29:29 +00:00
callback = undefined;
2026-07-20 16:05:17 +00:00
function stopWatching(closure_5, arg1) {
if (null !== ref.current) {
const _clearInterval = clearInterval;
2026-07-29 08:29:29 +00:00
clearInterval(tmp.current);
tmp.current = null;
2026-07-20 16:05:17 +00:00
}
}
({ children, resetKey } = onChange);
2026-07-23 10:11:24 +00:00
let tmp = width(null);
2026-07-29 08:29:29 +00:00
dependencyMap = tmp;
callback = width(false);
2026-08-15 05:55:55 +00:00
const size = onChange(1494)();
2026-07-23 10:11:24 +00:00
width = size.width;
2026-07-29 08:29:29 +00:00
height = size.height;
2026-07-20 16:05:17 +00:00
closure_5 = width(null);
const items = [resetKey];
callback(() => {
closure_2.current = false;
}, items);
const items1 = [onChange];
2026-07-23 10:11:24 +00:00
callback = height.useCallback((arg0, arg1) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = arg1;
2026-07-20 16:05:17 +00:00
if (null === ref.current) {
const _setInterval = setInterval;
2026-07-29 08:29:29 +00:00
tmp.current = setInterval(() => {
2026-07-23 10:11:24 +00:00
if (null !== ref.current) {
const current = ref.current;
2026-07-20 16:05:17 +00:00
current.measure((arg0, arg1, arg2, arg3, arg4, arg5) => {
let tmp = arg5 + arg3 > 0;
if (tmp) {
2026-07-29 08:29:29 +00:00
tmp = arg5 < closure_1;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
2026-07-29 08:29:29 +00:00
tmp = arg4 < closure_0;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
tmp = arg4 + arg2 > 0;
}
2026-08-24 06:08:38 +00:00
if (tmp !== closure_1_2.current) {
closure_1_2.current = tmp;
closure_1_0(tmp);
2026-07-20 16:05:17 +00:00
}
});
}
}, 1000);
}
}, items1);
const items2 = [callback, height, width];
callback(() => {
callback(width, height);
return stopWatching;
}, items2);
2026-07-29 08:29:29 +00:00
const obj = { collapsable: false, ref: tmp, children: null };
2026-07-20 16:05:17 +00:00
const items3 = [children, callback(closure_5, {})];
2026-07-29 08:29:29 +00:00
obj[2] = items3;
2026-07-20 16:05:17 +00:00
return stopWatching(closure_5, obj);
};