Files
discord-decomp/sources/by-id/module-07998-StepsIndicator.jsx
T
2026-07-28 01:06:53 +03:00

333 lines
15 KiB
React

/* Metro module 7998; source: unknown; dependencies: [31, 27, 33, 7996, 7997, 7999, 8000] */
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from './module-07996-constants.js'; /* Metro dependency 7996 */
import * as StylesModule from './module-07997-styles.js'; /* Metro dependency 7997 */
import * as SliderTrackMarkModule from './module-07999-SliderTrackMark.jsx'; /* Metro dependency 7999 */
function _fun63572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8176:6, offset: 0x01b85f44, size: 416 bytes, params: 8, frame: 33
var r16;
var r13;
var r19;
var r3;
var __esModule;
var value2;
var value3;
var value4;
var has;
var value5;
var getOwnPropertyDescriptor;
var properties;
var properties2;
var properties3;
var propertyName;
var propertyName2;
var hasOwnProperty;
var call;
var value6;
var get;
var set;
const env0_0 = require;
let Object = global.Object;
let defineProperty = Object.defineProperty;
Reflect.apply(defineProperty, Object, [exports, '__esModule', {value: true}]);
exports.StepsIndicator = undefined;
let value = ReactModule;
reducibleJoin24: while (true) {
reducibleJoin23: while (true) {
if (value) {
__esModule = value.__esModule;
if (__esModule) {
r3 = value;
break reducibleJoin24;
}
value2 = null;
if (value2 === value) {
break reducibleJoin23;
}
value3 = typeof value;
if (value3 !== 'object') {
if (value3 !== 'function') {
break reducibleJoin23;
}
}
value4 = env0_5(undefined);
if (value4) {
has = value4.has;
if (Reflect.apply(has, value4, [value])) {
get = value4.get;
value = Reflect.apply(get, value4, [value]);
r3 = value;
break reducibleJoin24;
}
}
value5 = Object.create(value2);
Object = global.Object;
defineProperty = Object.defineProperty;
reducibleJoin9: while (true) {
if (defineProperty) {
Object = global.Object;
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
r16 = getOwnPropertyDescriptor;
break reducibleJoin9;
}
r16 = defineProperty;
break reducibleJoin9;
}
properties = Object.keys(value);
properties2 = 0;
properties3 = properties.length;
if (properties !== undefined) {
r13 = properties2;
reducibleLoop10: while (true) {
propertyName = properties[r13];
propertyName2 = r13 + 1;
if (propertyName === undefined) {
break reducibleLoop10;
}
if (propertyName === 'default') {
r13 = propertyName2;
continue reducibleLoop10;
}
hasOwnProperty = ({}).hasOwnProperty;
call = hasOwnProperty.call;
if (Reflect.apply(call, hasOwnProperty, [value, propertyName])) {
reducibleJoin15: while (true) {
if (r16) {
Object = global.Object;
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
value6 = Reflect.apply(getOwnPropertyDescriptor, Object, [value, propertyName]);
r19 = value6;
break reducibleJoin15;
}
r19 = value2;
break reducibleJoin15;
}
if (r19) {
get = r19.get;
reducibleJoin18: while (true) {
reducibleJoin19: while (true) {
if (get) {
break reducibleJoin19;
}
set = r19.set;
if (set) {
break reducibleJoin19;
}
break reducibleJoin18;
}
Object = global.Object;
defineProperty = Object.defineProperty;
Reflect.apply(defineProperty, Object, [value5, propertyName, r19]);
r13 = propertyName2;
continue reducibleLoop10;
}
}
value5[propertyName] = value[propertyName];
r13 = propertyName2;
continue reducibleLoop10;
}
r13 = propertyName2;
continue reducibleLoop10;
}
}
value5.default = value;
if (value4) {
set = value4.set;
Reflect.apply(set, value4, [value, value5]);
r3 = value5;
break reducibleJoin24;
}
r3 = value5;
break reducibleJoin24;
}
value2 = null;
if (value2 === value) {
break reducibleJoin23;
}
value3 = typeof value;
if (value3 !== 'object') {
if (value3 !== 'function') {
break reducibleJoin23;
}
}
value4 = env0_5(undefined);
if (value4) {
has = value4.has;
if (Reflect.apply(has, value4, [value])) {
get = value4.get;
value = Reflect.apply(get, value4, [value]);
r3 = value;
break reducibleJoin24;
}
}
value5 = Object.create(value2);
Object = global.Object;
defineProperty = Object.defineProperty;
reducibleJoin9: while (true) {
if (defineProperty) {
Object = global.Object;
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
r16 = getOwnPropertyDescriptor;
break reducibleJoin9;
}
r16 = defineProperty;
break reducibleJoin9;
}
properties = Object.keys(value);
properties2 = 0;
properties3 = properties.length;
if (properties !== undefined) {
r13 = properties2;
reducibleLoop10: while (true) {
propertyName = properties[r13];
propertyName2 = r13 + 1;
if (propertyName === undefined) {
break reducibleLoop10;
}
if (propertyName === 'default') {
r13 = propertyName2;
continue reducibleLoop10;
}
hasOwnProperty = ({}).hasOwnProperty;
call = hasOwnProperty.call;
if (Reflect.apply(call, hasOwnProperty, [value, propertyName])) {
reducibleJoin15: while (true) {
if (r16) {
Object = global.Object;
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
value6 = Reflect.apply(getOwnPropertyDescriptor, Object, [value, propertyName]);
r19 = value6;
break reducibleJoin15;
}
r19 = value2;
break reducibleJoin15;
}
if (r19) {
get = r19.get;
reducibleJoin18: while (true) {
reducibleJoin19: while (true) {
if (get) {
break reducibleJoin19;
}
set = r19.set;
if (set) {
break reducibleJoin19;
}
break reducibleJoin18;
}
Object = global.Object;
defineProperty = Object.defineProperty;
Reflect.apply(defineProperty, Object, [value5, propertyName, r19]);
r13 = propertyName2;
continue reducibleLoop10;
}
}
value5[propertyName] = value[propertyName];
r13 = propertyName2;
continue reducibleLoop10;
}
r13 = propertyName2;
continue reducibleLoop10;
}
}
value5.default = value;
if (value4) {
set = value4.set;
Reflect.apply(set, value4, [value, value5]);
r3 = value5;
break reducibleJoin24;
}
r3 = value5;
break reducibleJoin24;
}
r3 = {default: value};
break reducibleJoin24;
}
exports.StepsIndicator = StepsIndicator;
function _getRequireWildcardCache_63573(a0) { // fn#63573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8176:639, offset: 0x01b860e4, size: 109 bytes, params: 2, frame: 12
let WeakMap = global.WeakMap;
if (typeof WeakMap !== 'function') {
return null;
}
WeakMap = global.WeakMap;
let weakMap = new WeakMap();
WeakMap = global.WeakMap;
weakMap = new WeakMap();
return _getRequireWildcardCache_63573_getRequireWildcardCache(a0);
function _getRequireWildcardCache_63573_getRequireWildcardCache(a0) { // fn#63574, owner: _getRequireWildcardCache_63573._getRequireWildcardCache, offset: 0x01b85481, size: 21 bytes, params: 2, frame: 3
return a0 ? env0_1 : env0_0;
}
}
function StepsIndicator({options, sliderWidth, currentValue, StepMarker, renderStepNumber, thumbImage, isLTR}) { // fn#63575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8176:855, offset: 0x01b86151, size: 315 bytes, params: 2, frame: 22
const StepMarker2 = StepMarker;
const renderStepNumber2 = renderStepNumber;
const thumbImage2 = thumbImage;
const useMemo = StepMarker2.useMemo;
const value2 = useMemo(function() {
return {fontSize: options.length > 9 ? require(dependencyMap[3]).constants.STEP_NUMBER_TEXT_FONT_SMALL : require(dependencyMap[3]).constants.STEP_NUMBER_TEXT_FONT_BIG};
}, [options.length]);
const r6 = isLTR ? options.reverse() : options;
const useCallback = StepMarker2.useCallback;
const env0_6 = useCallback(_fun63577, [currentValue, StepMarker, options, thumbImage, renderStepNumber, value2]);
const jsx = thumbImage2.jsx;
const View = renderStepNumber2.View;
const styles = (StylesModule).styles;
const items2 = [styles.stepsIndicator];
const MARGIN_HORIZONTAL_PADDING = (ConstantsModule).constants.MARGIN_HORIZONTAL_PADDING;
items2[1] = {marginHorizontal: sliderWidth * MARGIN_HORIZONTAL_PADDING};
return (
<View pointerEvents="none" style={items2}>
{r6.map(_fun63578)}
</View>
);
function _fun63577(a0, a1) { // fn#63577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8176:1193, offset: 0x01b862f4, size: 369 bytes, params: 3, frame: 28
const value = environment.__proto__;
const jsxRuntimeEnv1_4Binding = jsxRuntimeEnv1_4;
const jsx = jsxRuntimeEnv1_4Binding.jsx;
const Fragment = env1_2.Fragment;
const jsxs = jsxRuntimeEnv1_4Binding.jsxs;
const View = env1_3.View;
const styles = (StylesModule).styles;
const jsx2 = jsxRuntimeEnv1_4Binding.jsx;
const SliderTrackMark = (SliderTrackMarkModule).SliderTrackMark;
const currentValueBinding = currentValue;
const thumbImageBinding = thumbImage;
const optionsBinding = options;
return (
<Fragment key={a1}>
<View style={styles.stepIndicatorElement} key={'' + a1 + '-View'}>
<SliderTrackMark
isTrue={currentValueBinding === a0}
index={a0}
thumbImage={thumbImageBinding}
StepMarker={StepMarker}
currentValue={currentValueBinding}
min={optionsBinding[0]}
max={optionsBinding[optionsBinding.length - 1]}
key={'' + a1 + '-SliderTrackMark'}
/>
{
renderStepNumber
? ((StepNumber) => <StepNumber i={a0} style={env0_5} key={'' + a1 + 'th-step'} />)((require(8000) /* metro dependency 8000 */).StepNumber)
: null
}
</View>
</Fragment>
);
}
function _fun63578(a0, a1) { // fn#63578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8176:1734, offset: 0x01b86465, size: 23 bytes, params: 3, frame: 13
return env0_6(a0, a1);
}
}
}
global.__d(_fun63572, 7998, [31, 27, 33, 7996, 7997, 7999,
8000]) /* metro module 7998, dependencies: [31, 27, 33, 7996, 7997, 7999, 8000] */;