Files
discord-decomp/sources/by-id/module-06312.jsx
T
2026-07-27 16:20:00 +03:00

55 lines
3.5 KiB
React

/* Metro module 6312; source: unknown; dependencies: [31, 44, 6281] */
function _fun49741(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6490:6, offset: 0x01206b25, size: 93 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_3 = (require(31) /* metro dependency 31 */).useMemo;
exports.usePropsValidator = function(a0) {
var index = a0.index;
var env0_0 = index;
var snapPoints = a0.snapPoints;
var env0_1 = snapPoints;
var enableDynamicSizing = a0.enableDynamicSizing;
var env0_2 = enableDynamicSizing;
var topInset = a0.topInset;
var env0_3 = topInset;
var bottomInset = a0.bottomInset;
var env0_4 = bottomInset;
useMemo(_fun49743, [index, snapPoints, topInset, bottomInset, enableDynamicSizing]);
};
}
function usePropsValidator({index, snapPoints, enableDynamicSizing, topInset, bottomInset}) { // fn#49742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6490:134, offset: 0x01206b82, size: 100 bytes, params: 2, frame: 17
useMemo(_fun49743, [index, snapPoints, topInset, bottomInset, enableDynamicSizing]);
}
function _fun49743() { // fn#49743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6490:249, offset: 0x01206be6, size: 433 bytes, params: 1, frame: 20
const r3 = snapPoints ? 'get' in snapPoints ? snapPoints.get() : snapPoints : [];
(importDefault(44) /* metro dependency 44 */)(r3 || enableDynamicSizing,
"'snapPoints' was not provided! please provide at least one snap point.");
r3.map(_fun49744);
const defaultImport2 = importDefault(44) /* metro dependency 44 */;
let r6 = 'value' in r3 || r3.length > 0;
r6 = !r6 ? enableDynamicSizing : r6;
defaultImport2(r6, "'snapPoints' was provided with no points! please provide at least one snap point.");
defaultImport2(typeof index === 'number' || index === undefined,
"'index' was provided but with wrong type ! expected type is a number.");
const defaultImport4 = defaultImport2;
r6 = enableDynamicSizing || typeof index !== 'number';
r6 = !r6 ? index >= -1 && index <= r3.length - 1 : r6;
defaultImport4(r6,
"'index' was provided but out of the provided snap points range! expected value to be between -1, " + (r3.length - 1));
defaultImport2(typeof topInset === 'number' || topInset === undefined,
"'topInset' was provided but with wrong type ! expected type is a number.");
defaultImport2(typeof bottomInset === 'number' || bottomInset === undefined,
"'bottomInset' was provided but with wrong type ! expected type is a number.");
}
function _fun49744(a0) { // fn#49744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6490:385, offset: 0x01206d97, size: 162 bytes, params: 2, frame: 17
const value = a0;
const r4 = typeof value === 'number' ? value : global.Number.parseInt(value.replace('%', ''), 10);
(importDefault(44) /* metro dependency 44 */)(r4 > 0 || r4 === (require(6281) /* metro dependency 6281 */).INITIAL_SNAP_POINT,
"Snap point '" + value + "' is invalid. if you want to allow user to close the sheet, Please use 'enablePanDownToClose' prop.");
}