decord/source/429__isNativeReflectConstruct.js

388 lines
13 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 429
// Function ID: 430
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-29 08:29:29 +00:00
// Dependencies: [109, 41, 42, 93, 95, 98, 19, 21, 397, 292, 273, 364, 148]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 429 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _objectWithoutProperties from "_objectWithoutProperties";
2026-07-29 08:29:29 +00:00
import _classCallCheck from "_classCallCheck";
2026-07-23 10:11:24 +00:00
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
2026-07-29 08:29:29 +00:00
import importDefaultResult from "_createClass";
import importDefaultResult1 from "_inherits";
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd";
2026-07-22 07:54:56 +00:00
2026-07-29 08:29:29 +00:00
let error;
let metroImportAll;
const TouchableOpacity = importDefault;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
2026-07-29 08:29:29 +00:00
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
let closure_0 = !callResult;
function _isNativeReflectConstruct() {
return closure_0;
}
return _isNativeReflectConstruct();
} catch (err) {
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
let closure_2 = ["onBlur", "onFocus"];
2026-07-29 08:29:29 +00:00
({ jsx: error, jsxs: metroImportAll } = jsxProd);
class TouchableOpacity {
constructor() {
self = this;
items = [...arguments];
tmp = _isNativeReflectConstruct(this, TouchableOpacity);
items1 = [...items];
tmp2 = _isNativeReflectConstruct;
obj = _isNativeReflectConstruct(TouchableOpacity);
tmp3 = _isNativeReflectConstruct;
if (_isNativeReflectConstruct()) {
tmp5 = globalThis;
_Reflect = Reflect;
constructResult = Reflect.construct(obj, items1, tmp2(self).constructor);
} else {
constructResult = obj.apply(self, items1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp3Result = tmp3(self, constructResult);
obj = { anim: null, pressability: null };
value = new require("get FlatList").Value(tmp3Result._getChildStyleOpacityWithDefault());
obj[0] = value;
tmp7 = require("isActiveSignal");
tmp7 = new tmp7(tmp3Result._createPressabilityConfig());
obj[1] = tmp7;
tmp3Result.state = obj;
return tmp3Result;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
importDefaultResult1(TouchableOpacity, require("noop").Component);
let items = [
{
2026-07-20 16:05:17 +00:00
key: "_createPressabilityConfig",
value: function _createPressabilityConfig() {
2026-07-23 10:11:24 +00:00
let self = this;
self = this;
2026-07-29 08:29:29 +00:00
const obj = { cancelable: !this.props.rejectResponderTermination, disabled: null, hitSlop: null, delayLongPress: null, delayPressIn: null, delayPressOut: null, minPressDuration: 0, pressRectOffset: null, onBlur: null, onFocus: null, onLongPress: null, onPress: null, onPressIn: null, onPressOut: null };
2026-07-23 10:11:24 +00:00
aria_disabled = this.props.disabled;
2026-07-29 08:29:29 +00:00
if (aria_disabled == null) {
2026-07-23 10:11:24 +00:00
aria_disabled = self.props["aria-disabled"];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (aria_disabled == null) {
2026-07-20 16:05:17 +00:00
const accessibilityState = self.props.accessibilityState;
let disabled;
2026-07-29 08:29:29 +00:00
if (accessibilityState != null) {
2026-07-20 16:05:17 +00:00
disabled = accessibilityState.disabled;
}
2026-07-23 10:11:24 +00:00
aria_disabled = disabled;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = aria_disabled;
obj[2] = self.props.hitSlop;
obj[3] = self.props.delayLongPress;
obj[4] = self.props.delayPressIn;
obj[5] = self.props.delayPressOut;
obj[7] = self.props.pressRetentionOffset;
obj[8] = function onBlur(arg0) {
if (self(outer1_1[10]).isTV) {
2026-07-20 16:05:17 +00:00
self._opacityInactive(250);
}
if (null != self.props.onBlur) {
2026-07-29 08:29:29 +00:00
const props = tmp3.props;
2026-07-20 16:05:17 +00:00
props.onBlur(arg0);
}
};
2026-07-29 08:29:29 +00:00
obj[9] = function onFocus(arg0) {
if (self(outer1_1[10]).isTV) {
2026-07-20 16:05:17 +00:00
self._opacityActive(150);
}
if (null != self.props.onFocus) {
2026-07-29 08:29:29 +00:00
const props = tmp3.props;
2026-07-20 16:05:17 +00:00
props.onFocus(arg0);
}
};
2026-07-29 08:29:29 +00:00
obj[10] = self.props.onLongPress;
obj[11] = self.props.onPress;
obj[12] = function onPressIn(dispatchConfig) {
2026-07-20 16:05:17 +00:00
let num = 150;
if ("onResponderGrant" === dispatchConfig.dispatchConfig.registrationName) {
num = 0;
}
self._opacityActive(num);
if (null != self.props.onPressIn) {
2026-07-29 08:29:29 +00:00
const props = tmp.props;
2026-07-20 16:05:17 +00:00
props.onPressIn(dispatchConfig);
}
};
2026-07-29 08:29:29 +00:00
obj[13] = function onPressOut(arg0) {
2026-07-20 16:05:17 +00:00
self._opacityInactive(250);
if (null != self.props.onPressOut) {
const props = self.props;
props.onPressOut(arg0);
}
};
return obj;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "_setOpacityTo",
value: function _setOpacityTo(toValue, duration) {
2026-07-29 08:29:29 +00:00
let obj = TouchableOpacity(397);
obj = { toValue, duration, easing: null, useNativeDriver: true };
obj[2] = TouchableOpacity(364).inOut(TouchableOpacity(364).quad);
const obj3 = TouchableOpacity(364);
2026-07-20 16:05:17 +00:00
obj.timing(this.state.anim, obj).start();
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "_opacityActive",
value: function _opacityActive(duration) {
2026-07-29 08:29:29 +00:00
let num = this.props.activeOpacity;
if (num == null) {
num = 0.2;
2026-07-20 16:05:17 +00:00
}
this._setOpacityTo(num, duration);
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "_opacityInactive",
value: function _opacityInactive(duration) {
this._setOpacityTo(this._getChildStyleOpacityWithDefault(), duration);
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "_getChildStyleOpacityWithDefault",
value: function _getChildStyleOpacityWithDefault() {
2026-07-29 08:29:29 +00:00
const tmp = TouchableOpacity(148)(this.props.style);
2026-07-20 16:05:17 +00:00
let opacity;
2026-07-29 08:29:29 +00:00
if (tmp != null) {
opacity = tmp.opacity;
2026-07-20 16:05:17 +00:00
}
let num = 1;
2026-08-04 21:03:28 +00:00
if (typeof opacity === "number") {
2026-07-20 16:05:17 +00:00
num = opacity;
}
return num;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "render",
value: function render() {
let onBlur;
let onFocus;
const self = this;
const pressability = this.state.pressability;
const eventHandlers = pressability.getEventHandlers();
({ onBlur, onFocus } = eventHandlers);
2026-07-23 10:11:24 +00:00
aria_busy = this.props["aria-busy"];
2026-07-29 08:29:29 +00:00
if (aria_busy == null) {
2026-07-20 16:05:17 +00:00
const accessibilityState = self.props.accessibilityState;
let busy;
2026-07-29 08:29:29 +00:00
if (accessibilityState != null) {
2026-07-20 16:05:17 +00:00
busy = accessibilityState.busy;
}
2026-07-23 10:11:24 +00:00
aria_busy = busy;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let obj = { busy: aria_busy, checked: null, disabled: null, expanded: null, selected: null };
2026-07-23 10:11:24 +00:00
aria_checked = self.props["aria-checked"];
2026-07-29 08:29:29 +00:00
if (aria_checked == null) {
2026-07-20 16:05:17 +00:00
const accessibilityState2 = self.props.accessibilityState;
let checked;
2026-07-29 08:29:29 +00:00
if (accessibilityState2 != null) {
2026-07-20 16:05:17 +00:00
checked = accessibilityState2.checked;
}
2026-07-23 10:11:24 +00:00
aria_checked = checked;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = aria_checked;
2026-07-23 10:11:24 +00:00
aria_disabled = self.props["aria-disabled"];
2026-07-29 08:29:29 +00:00
if (aria_disabled == null) {
2026-07-20 16:05:17 +00:00
const accessibilityState3 = self.props.accessibilityState;
let disabled;
2026-07-29 08:29:29 +00:00
if (accessibilityState3 != null) {
2026-07-20 16:05:17 +00:00
disabled = accessibilityState3.disabled;
}
2026-07-23 10:11:24 +00:00
aria_disabled = disabled;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = aria_disabled;
2026-07-23 10:11:24 +00:00
aria_expanded = self.props["aria-expanded"];
2026-07-29 08:29:29 +00:00
if (aria_expanded == null) {
2026-07-20 16:05:17 +00:00
const accessibilityState4 = self.props.accessibilityState;
let expanded;
2026-07-29 08:29:29 +00:00
if (accessibilityState4 != null) {
2026-07-20 16:05:17 +00:00
expanded = accessibilityState4.expanded;
}
2026-07-23 10:11:24 +00:00
aria_expanded = expanded;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = aria_expanded;
2026-07-23 10:11:24 +00:00
aria_selected = self.props["aria-selected"];
2026-07-29 08:29:29 +00:00
if (aria_selected == null) {
2026-07-20 16:05:17 +00:00
const accessibilityState5 = self.props.accessibilityState;
let selected;
2026-07-29 08:29:29 +00:00
if (accessibilityState5 != null) {
2026-07-20 16:05:17 +00:00
selected = accessibilityState5.selected;
}
2026-07-23 10:11:24 +00:00
aria_selected = selected;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[4] = aria_selected;
let tmp8 = obj;
2026-07-20 16:05:17 +00:00
if (null != self.props.disabled) {
2026-07-29 08:29:29 +00:00
obj = {};
const merged = Object.assign(obj);
obj.disabled = self.props.disabled;
tmp8 = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
aria_valuemax = self.props["aria-valuemax"];
2026-07-29 08:29:29 +00:00
if (aria_valuemax == null) {
2026-07-20 16:05:17 +00:00
const accessibilityValue = self.props.accessibilityValue;
let max;
2026-07-29 08:29:29 +00:00
if (accessibilityValue != null) {
2026-07-20 16:05:17 +00:00
max = accessibilityValue.max;
}
2026-07-23 10:11:24 +00:00
aria_valuemax = max;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { max: aria_valuemax, min: null, now: null, text: null };
2026-07-23 10:11:24 +00:00
aria_valuemin = self.props["aria-valuemin"];
2026-07-29 08:29:29 +00:00
if (aria_valuemin == null) {
2026-07-20 16:05:17 +00:00
const accessibilityValue2 = self.props.accessibilityValue;
let min;
2026-07-29 08:29:29 +00:00
if (accessibilityValue2 != null) {
2026-07-20 16:05:17 +00:00
min = accessibilityValue2.min;
}
2026-07-23 10:11:24 +00:00
aria_valuemin = min;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = aria_valuemin;
2026-07-23 10:11:24 +00:00
aria_valuenow = self.props["aria-valuenow"];
2026-07-29 08:29:29 +00:00
if (aria_valuenow == null) {
2026-07-20 16:05:17 +00:00
const accessibilityValue3 = self.props.accessibilityValue;
let now;
2026-07-29 08:29:29 +00:00
if (accessibilityValue3 != null) {
2026-07-20 16:05:17 +00:00
now = accessibilityValue3.now;
}
2026-07-23 10:11:24 +00:00
aria_valuenow = now;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = aria_valuenow;
2026-07-23 10:11:24 +00:00
aria_valuetext = self.props["aria-valuetext"];
2026-07-29 08:29:29 +00:00
if (aria_valuetext == null) {
2026-07-20 16:05:17 +00:00
const accessibilityValue4 = self.props.accessibilityValue;
let text;
2026-07-29 08:29:29 +00:00
if (accessibilityValue4 != null) {
2026-07-20 16:05:17 +00:00
text = accessibilityValue4.text;
}
2026-07-23 10:11:24 +00:00
aria_valuetext = text;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = aria_valuetext;
2026-07-20 16:05:17 +00:00
let str = "none";
2026-07-23 10:11:24 +00:00
if ("off" !== self.props["aria-live"]) {
let accessibilityLiveRegion = self.props["aria-live"];
2026-07-29 08:29:29 +00:00
if (accessibilityLiveRegion == null) {
2026-07-20 16:05:17 +00:00
accessibilityLiveRegion = self.props.accessibilityLiveRegion;
}
str = accessibilityLiveRegion;
}
2026-07-23 10:11:24 +00:00
let accessibilityLabel = self.props["aria-label"];
2026-07-29 08:29:29 +00:00
if (accessibilityLabel == null) {
2026-07-20 16:05:17 +00:00
accessibilityLabel = self.props.accessibilityLabel;
}
2026-07-29 08:29:29 +00:00
const obj1 = { accessible: false !== self.props.accessible, accessibilityLabel, accessibilityHint: self.props.accessibilityHint, accessibilityLanguage: self.props.accessibilityLanguage, accessibilityRole: self.props.accessibilityRole, accessibilityState: tmp8, accessibilityActions: self.props.accessibilityActions, onAccessibilityAction: self.props.onAccessibilityAction, accessibilityValue: obj, importantForAccessibility: null, accessibilityViewIsModal: null, accessibilityLiveRegion: null, accessibilityElementsHidden: null, style: null, nativeID: null, testID: null, onLayout: null, nextFocusDown: null, nextFocusForward: null, nextFocusLeft: null, nextFocusRight: null, nextFocusUp: null, hasTVPreferredFocus: null, hitSlop: null, focusable: null, ref: null };
2026-07-20 16:05:17 +00:00
let str2 = "no-hide-descendants";
2026-07-23 10:11:24 +00:00
if (true !== self.props["aria-hidden"]) {
2026-07-20 16:05:17 +00:00
str2 = self.props.importantForAccessibility;
}
2026-07-29 08:29:29 +00:00
obj1[9] = str2;
2026-07-23 10:11:24 +00:00
let accessibilityViewIsModal = self.props["aria-modal"];
2026-07-29 08:29:29 +00:00
if (accessibilityViewIsModal == null) {
2026-07-20 16:05:17 +00:00
accessibilityViewIsModal = self.props.accessibilityViewIsModal;
}
2026-07-29 08:29:29 +00:00
obj1[10] = accessibilityViewIsModal;
obj1[11] = str;
2026-07-23 10:11:24 +00:00
let accessibilityElementsHidden = self.props["aria-hidden"];
2026-07-29 08:29:29 +00:00
if (accessibilityElementsHidden == null) {
2026-07-20 16:05:17 +00:00
accessibilityElementsHidden = self.props.accessibilityElementsHidden;
}
2026-07-29 08:29:29 +00:00
obj1[12] = accessibilityElementsHidden;
2026-07-20 16:05:17 +00:00
const items = [self.props.style, { opacity: self.state.anim }];
2026-07-29 08:29:29 +00:00
obj1[13] = items;
2026-07-20 16:05:17 +00:00
let nativeID = self.props.id;
2026-07-29 08:29:29 +00:00
if (nativeID == null) {
2026-07-20 16:05:17 +00:00
nativeID = self.props.nativeID;
}
2026-07-29 08:29:29 +00:00
obj1[14] = nativeID;
obj1[15] = self.props.testID;
obj1[16] = self.props.onLayout;
obj1[17] = self.props.nextFocusDown;
obj1[18] = self.props.nextFocusForward;
obj1[19] = self.props.nextFocusLeft;
obj1[20] = self.props.nextFocusRight;
obj1[21] = self.props.nextFocusUp;
obj1[22] = self.props.hasTVPreferredFocus;
obj1[23] = self.props.hitSlop;
obj1[24] = false !== self.props.focusable && undefined !== self.props.onPress && !self.props.disabled;
obj1[25] = self.props.hostRef;
const merged1 = Object.assign(callback(eventHandlers, closure_2));
const items1 = [self.props.children, null];
obj1.children = items1;
return closure_8(TouchableOpacity(397).View, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "componentDidUpdate",
value: function componentDidUpdate(disabled) {
const self = this;
const pressability = this.state.pressability;
pressability.configure(this._createPressabilityConfig());
let tmp2 = this.props.disabled === disabled.disabled;
if (tmp2) {
2026-07-29 08:29:29 +00:00
const tmp5 = TouchableOpacity(148)(disabled.style);
2026-07-20 16:05:17 +00:00
let opacity;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
2026-07-20 16:05:17 +00:00
opacity = tmp5.opacity;
}
2026-07-29 08:29:29 +00:00
const tmp8 = TouchableOpacity(148)(self.props.style);
2026-07-20 16:05:17 +00:00
let opacity1;
2026-07-29 08:29:29 +00:00
if (tmp8 != null) {
opacity1 = tmp8.opacity;
2026-07-20 16:05:17 +00:00
}
tmp2 = opacity === opacity1;
2026-07-29 08:29:29 +00:00
const tmp3 = TouchableOpacity;
2026-07-20 16:05:17 +00:00
}
if (!tmp2) {
self._opacityInactive(250);
}
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "componentDidMount",
value: function componentDidMount() {
const pressability = this.state.pressability;
pressability.configure(this._createPressabilityConfig());
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "componentWillUnmount",
value: function componentWillUnmount() {
const pressability = this.state.pressability;
pressability.reset();
const anim = this.state.anim;
anim.resetAnimation();
}
2026-07-29 08:29:29 +00:00
}
];
let closure_10 = importDefaultResult(TouchableOpacity, items);
2026-07-20 16:05:17 +00:00
class Touchable {
constructor(arg0) {
2026-07-29 08:29:29 +00:00
obj = {};
merged = Object.assign(Object.assign(global, Object.create(null)));
obj.hostRef = global.ref;
return jsx(_createPressabilityConfig, obj);
2026-07-20 16:05:17 +00:00
}
}
Touchable.displayName = "TouchableOpacity";
export default Touchable;