Files
2026-07-28 01:06:53 +03:00

70 lines
4.4 KiB
TypeScript

/* Metro module 10345; source: modules/user_profile/native/useSegmentedPagesHeight.tsx; dependencies: [57, 31, 4017, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun80192(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10531:6, offset: 0x01e70ab6, size: 162 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function useSegmentedPagesHeightTsx1(){const{pageHeights,visiblePageRange}=this.__closure;var _heights$lo,_heights$hi;const heights=pageHeights.get();const[lo,hi]=visiblePageRange.get();const height=Math.max((_heights$lo=heights[lo])!==null&&_heights$lo!==void 0?_heights$lo:0,(_heights$hi=heights[hi])!==null&&_heights$hi!==void 0?_heights$hi:0);return height>0?{height:height}:{};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/useSegmentedPagesHeight.tsx');
exports.usePageHeights = usePageHeights;
exports.usePagesHeightStyle = usePagesHeightStyle;
function usePageHeights() { // fn#80193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10531:621, offset: 0x01e70b58, size: 108 bytes, params: 1, frame: 15
const value2 = (ReanimatedRexportModule).useSharedValue([]);
const env0_1 = ReactModule.useRef([]);
const useCallback = ReactModule.useCallback;
let object = [value2];
object = {pageHeights: value2, handlePageContentSize: Reflect.apply(useCallback, ReactModule, [_fun80194, object])};
return object;
function _fun80194(a0, a1, a2) { // fn#80194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10531:712, offset: 0x01e70bc4, size: 90 bytes, params: 4, frame: 16
var current;
var binding;
var binding2;
var set;
var items2;
if (!(a2 <= 0 || env0_1.current[a0] === a2)) {
binding = env0_1;
current = binding.current;
current[a0] = a2;
binding2 = env0_0;
set = binding2.set;
current = binding.current;
items2 = [];
arraySpread(items2, current, 0, a0);
Reflect.apply(set, binding2, [items2]);
}
}
}
function usePagesHeightStyle({visiblePageRange}, a1) { // fn#80195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10531:861, offset: 0x01e70c1e, size: 111 bytes, params: 3, frame: 15
const env0_0 = a1;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const usePagesHeightStyleU2 = usePagesHeightStyleU;
usePagesHeightStyleU2.__closure = {pageHeights: a1, visiblePageRange: visiblePageRange};
usePagesHeightStyleU2.__workletHash = 15297270890226;
usePagesHeightStyleU2.__initData = env0_4;
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [usePagesHeightStyleU2]);
function usePagesHeightStyleU() { // fn#80196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10531:958, owner: usePagesHeightStyle.u, offset: 0x01e70c8d, size: 132 bytes, params: 1, frame: 18
const value2 = require.get();
let value = visiblePageRange.get();
value = env1_2(value, 2);
const value4 = 0;
let property = value[value4];
const property2 = value[1];
const Math = global.Math;
const max = Math.max;
property = value2[property];
value = Reflect.apply(max, Math, [property ?? value4, value2[property2] ?? value4]);
return value > value4 ? {height: value} : {};
}
}
}
global.__d(_fun80192, 10345, [57, 31, 4017, 2]) /* metro module 10345, dependencies: [57, 31, 4017, 2] */;