280 lines
14 KiB
React
280 lines
14 KiB
React
/* Metro module 422; source: unknown; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 390, 282, 262, 355, 147] */
|
|
function _fun5918(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:6, offset: 0x00ce9e2b, size: 276 bytes, params: 8, frame: 18
|
|
const env0_2 = ['onBlur', 'onFocus'];
|
|
const env0_3 = ['ref'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_6 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_7 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_8 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_9 = importDefault(18) /* metro dependency 18 */;
|
|
const value = importAll(31) /* metro dependency 31 */;
|
|
const value2 = require(33) /* metro dependency 33 */;
|
|
const env0_10 = value2.jsx;
|
|
const env0_11 = value2.jsxs;
|
|
const Component = value.Component;
|
|
const env0_12 = _fun5922(Component);
|
|
const closure = Touchable;
|
|
closure.displayName = 'TouchableOpacity';
|
|
exports.default = closure;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_5919() { // fn#5919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:232, offset: 0x00ce9f3f, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_5919_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun5922(a0) { // fn#5922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:457, offset: 0x00ce9f9d, size: 252 bytes, params: 2, frame: 16
|
|
const closure = TouchableOpacity;
|
|
env0_9(closure, a0);
|
|
return env0_6(closure, [{key: '_createPressabilityConfig', value: value_5924}, {key: '_setOpacityTo',
|
|
value: value_5929}, {key: '_opacityActive', value: function(a0) {
|
|
this._setOpacityTo(this.props.activeOpacity ?? 0.2, a0);
|
|
}}, {key: '_opacityInactive', value: function(a0) {
|
|
this._setOpacityTo(this._getChildStyleOpacityWithDefault(), a0);
|
|
}}, {key: '_getChildStyleOpacityWithDefault', value: value_5932}, {key: 'render', value: value_5933},
|
|
{key: 'componentDidUpdate', value: value_5934}, {key: 'componentDidMount', value: function() {
|
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
}}, {key: 'componentWillUnmount', value: function() {
|
|
this.state.pressability.reset();
|
|
this.state.anim.resetAnimation();
|
|
}}]);
|
|
}
|
|
|
|
function Touchable(a0) { // fn#5937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:5878, offset: 0x00ceaafc, size: 72 bytes, params: 2, frame: 18
|
|
const ref = a0.ref;
|
|
let binding = env0_4;
|
|
const value2 = binding(a0, env0_3);
|
|
binding = env0_12;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, value2, {hostRef: ref})} />)(binding);
|
|
}
|
|
|
|
function TouchableOpacity() { // fn#5923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:469, offset: 0x00cea099, size: 306 bytes, params: 1, frame: 20
|
|
var object2;
|
|
var r1;
|
|
var r6;
|
|
var r0;
|
|
var value7;
|
|
var Reflect;
|
|
var construct;
|
|
let value = environment.__proto__;
|
|
let binding = env1_5;
|
|
binding(this, TouchableOpacity);
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value6 = 0;
|
|
if (value6 < length) {
|
|
r1 = value6;
|
|
reducibleLoop1: while (true) {
|
|
array[r1] = arguments[r1];
|
|
value7 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (value7 < length) {
|
|
r1 = value7;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const value8 = [].concat(array);
|
|
const value9 = env1_8(TouchableOpacity);
|
|
binding = env1_7;
|
|
if (_isNativeReflectConstruct_5919()) {
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
reducibleJoin6: while (true) {
|
|
if (value8) {
|
|
r6 = value8;
|
|
break reducibleJoin6;
|
|
}
|
|
r6 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
r0 = Reflect.apply(construct, Reflect, [value9, r6, env1_8(this).constructor]);
|
|
} else {
|
|
r0 = value9.apply(this, value8);
|
|
}
|
|
const value12 = binding(this, r0);
|
|
object2 = {};
|
|
const Value = (importDefault(390) /* metro dependency 390 */).Value;
|
|
value = value12._getChildStyleOpacityWithDefault();
|
|
value = new Value(value);
|
|
object2.anim = value;
|
|
value = importDefault(282) /* metro dependency 282 */;
|
|
value = new value(value12._createPressabilityConfig());
|
|
object2.pressability = value;
|
|
value12.state = object2;
|
|
return value12;
|
|
}
|
|
|
|
function value_5924() { // fn#5924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:995, offset: 0x00cea1cb, size: 252 bytes, params: 1, frame: 7
|
|
let r3 = this.props.disabled ?? this.props['aria-disabled'];
|
|
r3 = r3 ?? this.props.accessibilityState?.disabled;
|
|
return {cancelable: !this.props.rejectResponderTermination, disabled: r3, hitSlop: this.props.hitSlop,
|
|
delayLongPress: this.props.delayLongPress, delayPressIn: this.props.delayPressIn,
|
|
delayPressOut: this.props.delayPressOut, minPressDuration: 0, pressRectOffset: this.props.pressRetentionOffset,
|
|
onBlur: onBlur_5925, onFocus: onFocus_5926, onLongPress: this.props.onLongPress, onPress: this.props.onPress,
|
|
onPressIn: onPressIn_5927, onPressOut: onPressOut_5928};
|
|
}
|
|
|
|
function value_5929(a0, a1) { // fn#5929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:2027, offset: 0x00cea433, size: 129 bytes, params: 3, frame: 19
|
|
let value = environment.__proto__;
|
|
const timing = (importDefault(390) /* metro dependency 390 */).timing;
|
|
const anim = this.state.anim;
|
|
const object2 = {toValue: a0, duration: a1};
|
|
const defaultImport = importDefault(355) /* metro dependency 355 */;
|
|
object2.easing = defaultImport.inOut(defaultImport.quad);
|
|
object2.useNativeDriver = true;
|
|
value = Reflect.apply(timing, value, [anim, object2]);
|
|
value.start();
|
|
}
|
|
|
|
function value_5932() { // fn#5932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:2470, offset: 0x00cea50b, size: 76 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = undefined;
|
|
const value2 = (importDefault(147) /* metro dependency 147 */)(this.props.style);
|
|
const opacity = value2 == null ? value : value2.opacity;
|
|
return typeof opacity !== 'number' ? 1 : opacity;
|
|
}
|
|
|
|
function value_5933() { // fn#5933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:2627, offset: 0x00cea557, size: 1214 bytes, params: 1, frame: 25
|
|
let value = this.state.pressability.getEventHandlers();
|
|
value.onBlur;
|
|
value.onFocus;
|
|
const binding = env1_4;
|
|
const value3 = undefined;
|
|
value = binding(value, env1_2);
|
|
let object2 = {};
|
|
object2.busy = this.props['aria-busy'] ?? (this.props.accessibilityState == null ? value3 : this.props.accessibilityState.busy);
|
|
object2.checked = this.props['aria-checked'] ?? (this.props.accessibilityState == null ? value3 : this.props.accessibilityState.checked);
|
|
object2.disabled = this.props['aria-disabled'] ?? (this.props.accessibilityState == null ? value3 : this.props.accessibilityState.disabled);
|
|
object2.expanded = this.props['aria-expanded'] ?? (this.props.accessibilityState == null ? value3 : this.props.accessibilityState.expanded);
|
|
object2.selected = this.props['aria-selected'] ?? (this.props.accessibilityState == null ? value3 : this.props.accessibilityState.selected);
|
|
const r12 = this.props.disabled == null ? object2 : global.Object.assign({}, object2,
|
|
{disabled: this.props.disabled});
|
|
object2 = {};
|
|
object2.max = this.props['aria-valuemax'] ?? (this.props.accessibilityValue == null ? value3 : this.props.accessibilityValue.max);
|
|
object2.min = this.props['aria-valuemin'] ?? (this.props.accessibilityValue == null ? value3 : this.props.accessibilityValue.min);
|
|
object2.now = this.props['aria-valuenow'] ?? (this.props.accessibilityValue == null ? value3 : this.props.accessibilityValue.now);
|
|
object2.text = this.props['aria-valuetext'] ?? (this.props.accessibilityValue == null ? value3 : this.props.accessibilityValue.text);
|
|
const r0 = this.props['aria-live'] === 'off' ? 'none' : this.props['aria-live'] ?? this.props.accessibilityLiveRegion;
|
|
const r13 = this.props['aria-label'] ?? this.props.accessibilityLabel;
|
|
const View = (importDefault(390) /* metro dependency 390 */).View;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const accessibilityHint = this.props.accessibilityHint;
|
|
return (
|
|
<View
|
|
{...Reflect.apply(assign, Object, [{accessible: this.props.accessible !== false, accessibilityLabel: r13,
|
|
accessibilityHint: accessibilityHint, accessibilityLanguage: this.props.accessibilityLanguage,
|
|
accessibilityRole: this.props.accessibilityRole, accessibilityState: r12,
|
|
accessibilityActions: this.props.accessibilityActions,
|
|
onAccessibilityAction: this.props.onAccessibilityAction, accessibilityValue: object2,
|
|
importantForAccessibility: this.props['aria-hidden'] === true ? 'no-hide-descendants' : this.props.importantForAccessibility,
|
|
accessibilityViewIsModal: this.props['aria-modal'] ?? this.props.accessibilityViewIsModal,
|
|
accessibilityLiveRegion: r0,
|
|
accessibilityElementsHidden: this.props['aria-hidden'] ?? this.props.accessibilityElementsHidden,
|
|
style: [this.props.style, {opacity: this.state.anim}], nativeID: this.props.id ?? this.props.nativeID,
|
|
testID: this.props.testID, onLayout: this.props.onLayout, nextFocusDown: this.props.nextFocusDown,
|
|
nextFocusForward: this.props.nextFocusForward, nextFocusLeft: this.props.nextFocusLeft,
|
|
nextFocusRight: this.props.nextFocusRight, nextFocusUp: this.props.nextFocusUp,
|
|
hasTVPreferredFocus: this.props.hasTVPreferredFocus, hitSlop: this.props.hitSlop,
|
|
focusable: this.props.focusable !== false && value3 !== this.props.onPress && !this.props.disabled,
|
|
ref: this.props.hostRef}, value, {children: [this.props.children, null]}])}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function value_5934(a0, a1) { // fn#5934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:5319, offset: 0x00ceaa15, size: 182 bytes, params: 3, frame: 17
|
|
var opacity;
|
|
var r0;
|
|
var value2;
|
|
var defaultImport;
|
|
var style;
|
|
var value3;
|
|
const pressability = this.state.pressability;
|
|
pressability.configure(this._createPressabilityConfig());
|
|
let value = this.props.disabled === a0.disabled;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value2 = undefined;
|
|
defaultImport = importDefault(147) /* metro dependency 147 */;
|
|
style = a0.style;
|
|
value3 = defaultImport(style);
|
|
opacity = value3 == null ? value2 : value3.opacity;
|
|
value = importDefault(147) /* metro dependency 147 */;
|
|
style = this.props.style;
|
|
value = value(style);
|
|
value = opacity === (value == null ? value2 : value.opacity);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (!r0) {
|
|
this._opacityInactive(250);
|
|
}
|
|
}
|
|
|
|
function value_5924OnBlur(a0) { // fn#5925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:1463, owner: value_5924.onBlur, offset: 0x00cea2c7, size: 104 bytes, params: 2, frame: 12
|
|
if ((importDefault(262) /* metro dependency 262 */).isTV) {
|
|
env0_0._opacityInactive(250);
|
|
}
|
|
if (env0_0.props.onBlur != null) {
|
|
env0_0.props.onBlur(a0);
|
|
}
|
|
}
|
|
|
|
function value_5924OnFocus(a0) { // fn#5926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:1570, owner: value_5924.onFocus, offset: 0x00cea32f, size: 104 bytes, params: 2, frame: 12
|
|
if ((importDefault(262) /* metro dependency 262 */).isTV) {
|
|
env0_0._opacityActive(150);
|
|
}
|
|
if (env0_0.props.onFocus != null) {
|
|
env0_0.props.onFocus(a0);
|
|
}
|
|
}
|
|
|
|
function value_5924OnPressIn(a0) { // fn#5927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:1742, owner: value_5924.onPressIn, offset: 0x00cea397, size: 91 bytes, params: 2, frame: 15
|
|
const binding = env0_0;
|
|
binding._opacityActive(a0.dispatchConfig.registrationName !== 'onResponderGrant' ? 150 : 0);
|
|
if (env0_0.props.onPressIn != null) {
|
|
env0_0.props.onPressIn(a0);
|
|
}
|
|
}
|
|
|
|
function value_5924OnPressOut(a0) { // fn#5928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:463:1901, owner: value_5924.onPressOut, offset: 0x00cea3f2, size: 65 bytes, params: 2, frame: 12
|
|
const binding = env0_0;
|
|
binding._opacityInactive(250);
|
|
if (binding.props.onPressOut != null) {
|
|
env0_0.props.onPressOut(a0);
|
|
}
|
|
}
|
|
|