decord/alpha/source/modules/vibegrations/lib/useDelayedReveal.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

41 lines
964 B
TypeScript

// Module ID: 16605
// Function ID: 16606
// Name: useDelayedReveal
// Dependencies: [32, 19, 2]
// Exports: default
// Module 16605 (useDelayedReveal)
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/lib/useDelayedReveal.tsx");
export default function useDelayedReveal(arg0, arg1) {
let tmp = arg0;
closure_0 = arg0;
closure_1 = arg1;
[first] = noop.useState(arg0);
closure_3 = tmp4;
let tmp5 = !arg0;
if (!arg0) {
tmp5 = first;
}
if (tmp5) {
tmp4(false);
}
const items = [tmp, first, arg1];
const effect = noop.useEffect(() => {
if (timeout) {
if (!first) {
const _window = window;
timeout = window.setTimeout(() => closure_1_3(true), closure_1);
return () => window.clearTimeout(closure_0);
}
}
}, items);
if (tmp) {
tmp = first;
}
return tmp;
};