decord/source/426_createVirtualView.js

92 lines
3 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 426
// Function ID: 5946
// Name: createVirtualView
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 31, 33, 48, 427, 253]
2026-07-20 16:05:17 +00:00
// Exports: createHiddenVirtualView
// Module 426 (createVirtualView)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import closure_3 from "result";
import result from "result";
import { jsx } from "jsxProd";
let closure_4;
let closure_5;
2026-07-20 16:05:17 +00:00
function createVirtualView(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let closure_1 = arg0 !== c7;
2026-07-20 16:05:17 +00:00
return React.forwardRef(function VirtualView_withRef(arg0, ref) {
let children;
2026-07-23 10:11:24 +00:00
let closure_0;
2026-07-20 16:05:17 +00:00
let nativeID;
let style;
({ style, onModeChange: closure_0 } = arg0);
({ children, nativeID } = arg0);
2026-07-23 10:11:24 +00:00
const tmp = outer1_2(outer1_5(callback), 2);
2026-07-20 16:05:17 +00:00
const first = tmp[0];
2026-07-23 10:11:24 +00:00
const dependencyMap = tmp[1];
let obj = { initialHidden: dependencyMap, nativeID, ref, renderState: tmp3 ? VirtualViewRenderState.None : VirtualViewRenderState.Rendered };
VirtualViewRenderState = globalThis.VirtualViewRenderState;
2026-07-20 16:05:17 +00:00
let composeResult = style;
2026-07-23 10:11:24 +00:00
if (first !== outer1_7) {
2026-07-20 16:05:17 +00:00
obj = {};
const _Math = Math;
2026-07-23 10:11:24 +00:00
obj.height = Math.abs(callback(48)(first));
composeResult = callback(253).compose(style, obj);
const obj2 = callback(253);
2026-07-20 16:05:17 +00:00
}
obj.style = composeResult;
obj.onModeChange = function handleModeChange(nativeEvent) {
2026-07-23 10:11:24 +00:00
const tmpResult = callback(table[3])(globalThis.VirtualViewMode.cast(nativeEvent.nativeEvent.mode));
2026-07-20 16:05:17 +00:00
let bindResult = null;
2026-07-23 10:11:24 +00:00
if (null != callback) {
2026-07-20 16:05:17 +00:00
const obj = { mode: tmpResult, target: nativeEvent.currentTarget, targetRect: nativeEvent.nativeEvent.targetRect, thresholdRect: nativeEvent.nativeEvent.thresholdRect };
2026-07-23 10:11:24 +00:00
bindResult = callback.bind(null, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
callback = bindResult;
2026-07-20 16:05:17 +00:00
if (tmpResult !== globalThis.VirtualViewMode.Visible) {
if (tmpResult !== globalThis.VirtualViewMode.Prerender) {
if (tmpResult !== globalThis.VirtualViewMode.Hidden) {
const _Error = Error;
throw Error("Match: No case succesfully matched. Make exhaustive or add a wildcard case using '_'. Argument: " + tmpResult);
} else {
2026-07-23 10:11:24 +00:00
const height = nativeEvent.nativeEvent.targetRect.height;
outer2_4(() => {
2026-07-20 16:05:17 +00:00
height(height);
if (null != bindResult) {
bindResult();
}
});
}
} else {
2026-07-23 10:11:24 +00:00
outer2_4(() => {
height(outer3_7);
2026-07-20 16:05:17 +00:00
if (null != bindResult) {
bindResult();
}
});
}
} else {
2026-07-23 10:11:24 +00:00
height(outer2_7);
2026-07-20 16:05:17 +00:00
if (null != bindResult) {
bindResult();
}
}
};
let tmp9 = null;
2026-07-23 10:11:24 +00:00
if (first === outer1_7) {
2026-07-20 16:05:17 +00:00
tmp9 = children;
}
obj.children = tmp9;
2026-07-23 10:11:24 +00:00
return outer1_6(callback(427), obj);
2026-07-20 16:05:17 +00:00
});
}
2026-07-23 10:11:24 +00:00
({ startTransition: closure_4, useState: closure_5 } = result);
let c7 = null;
2026-07-20 16:05:17 +00:00
export default createVirtualView(null);
export const createHiddenVirtualView = function createHiddenVirtualView(arg0) {
return createVirtualView(arg0);
};
export const _logs = {};