180 lines
9.5 KiB
React
180 lines
9.5 KiB
React
/* Metro module 337; source: unknown; dependencies: [29, 77, 6, 7, 15, 17, 18, 31, 33, 338, 303, 340, 112, 252, 404, 253] */
|
|
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from './module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from './module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import Module00077 from './module-00077.js'; /* Metro dependency 77 */
|
|
import Module00303 from './module-00303.js'; /* Metro dependency 303 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as Module00252Module from './module-00252.js'; /* Metro dependency 252 */
|
|
import * as Module00404Module from './module-00404.js'; /* Metro dependency 404 */
|
|
|
|
function _fun4971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:6, offset: 0x00cd1e87, size: 464 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const Wrapper2 = Wrapper;
|
|
const env0_3 = ['ref'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Component = ReactModule.Component;
|
|
const value3 = _fun4976(Component);
|
|
value3.defaultProps = {'visible': true, 'hardwareAccelerated': false};
|
|
const RootTagContext = (Module00252Module).RootTagContext;
|
|
value3.contextType = RootTagContext;
|
|
let property = (Module00404Module).default;
|
|
const getConstants = property.getConstants;
|
|
const r10 = Reflect.apply(getConstants, property, []).isRTL ? 'right' : 'left';
|
|
property = (require(253) /* metro dependency 253 */).default;
|
|
const create = property.create;
|
|
object = {};
|
|
object.modal = {position: 'absolute'};
|
|
object.container = Module00077(Module00077(Module00077({}, r10, 0), 'top', 0), 'flex', 1);
|
|
const env0_13 = Reflect.apply(create, property, [object]);
|
|
Wrapper2.displayName = 'Modal';
|
|
const VirtualizedListContextResetter = (Module00303).VirtualizedListContextResetter;
|
|
Wrapper2.Context = VirtualizedListContextResetter;
|
|
exports.default = Wrapper2;
|
|
function _isNativeReflectConstruct_4972() { // fn#4972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:206, offset: 0x00cd2057, 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_4972_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function Wrapper(a0) { // fn#4975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:2712, offset: 0x00cd20b5, size: 72 bytes, params: 2, frame: 18
|
|
const ref = a0.ref;
|
|
let binding = ObjectWithoutProperties;
|
|
const value2 = binding(a0, env0_3);
|
|
binding = env0_12;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, value2, {modalRef: ref})} />)(binding);
|
|
}
|
|
|
|
function _fun4976(a0) { // fn#4976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:435, offset: 0x00cd20fd, size: 183 bytes, params: 2, frame: 16
|
|
const Modal2 = Modal;
|
|
Inherits(Modal2, a0);
|
|
return CreateClass(Modal2, [{key: 'componentDidMount', value: function() {
|
|
}}, {key: 'componentWillUnmount', value: function() {
|
|
if (this._eventSubscription) {
|
|
this._eventSubscription.remove();
|
|
}
|
|
}}, {key: 'componentDidUpdate', value: function(a0) {
|
|
if (a0.visible === false && this.props.visible === true) {
|
|
this.setState({isRendered: true});
|
|
}
|
|
}}, {key: '_shouldShowModal', value: function() {
|
|
return this.props.visible === true;
|
|
}}, {key: 'render', value: value_4982}, {key: '_shouldSetResponder', value: function() {
|
|
return true;
|
|
}}]);
|
|
function Modal(a0) { // fn#4977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:447, offset: 0x00cd21b4, size: 160 bytes, params: 2, frame: 21
|
|
let binding = env1_5;
|
|
binding(this, Modal);
|
|
const items2 = [a0];
|
|
const value3 = env1_8(Modal);
|
|
const value6 = env1_7(this, _isNativeReflectConstruct_4972() ? global.Reflect.construct(value3, items2,
|
|
env1_8(this).constructor) : value3.apply(this, items2));
|
|
binding = env1_11;
|
|
const value7 = typeof binding === 'bigint' ? binding : +binding;
|
|
env1_11 = typeof value7 === 'bigint' ? value7 + 1n : +value7 + 1;
|
|
value6._identifier = value7;
|
|
value6.state = {isRendered: a0.visible === true};
|
|
return value6;
|
|
}
|
|
|
|
function value_4982() { // fn#4982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:1161, offset: 0x00cd22cb, size: 593 bytes, params: 1, frame: 26
|
|
var environment;
|
|
var animationType;
|
|
var r6;
|
|
var object;
|
|
var props;
|
|
var transparent;
|
|
var value;
|
|
var children;
|
|
var defaultImport;
|
|
var object2;
|
|
if (this._shouldShowModal()) {
|
|
object = {};
|
|
props = this.props;
|
|
transparent = props.transparent;
|
|
value = 'transparent';
|
|
object.backgroundColor = transparent === true ? value : this.props.backdropColor ?? 'white';
|
|
props = this.props;
|
|
animationType = props.animationType;
|
|
animationType = !animationType ? 'none' : animationType;
|
|
props = this.props;
|
|
r6 = props.presentationStyle || (this.props.transparent !== true ? 'fullScreen' : 'overFullScreen');
|
|
props = this.props;
|
|
children = props.children;
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(338) /* metro dependency 338 */;
|
|
object2 = {animationType: animationType, presentationStyle: r6};
|
|
props = this.props;
|
|
transparent = props.transparent;
|
|
object2.transparent = transparent;
|
|
props = this.props;
|
|
object2.hardwareAccelerated = props.hardwareAccelerated;
|
|
props = this.props;
|
|
object2.onRequestClose = props.onRequestClose;
|
|
props = this.props;
|
|
object2.onShow = props.onShow;
|
|
object2.onDismiss = function() {
|
|
};
|
|
props = this.props;
|
|
object2.ref = props.modalRef;
|
|
props = this.props;
|
|
object2.visible = props.visible;
|
|
props = this.props;
|
|
object2.statusBarTranslucent = props.statusBarTranslucent;
|
|
props = this.props;
|
|
object2.navigationBarTranslucent = props.navigationBarTranslucent;
|
|
object2.identifier = this._identifier;
|
|
object2.style = env1_13.modal;
|
|
object2.onStartShouldSetResponder = this._shouldSetResponder;
|
|
props = this.props;
|
|
object2.supportedOrientations = props.supportedOrientations;
|
|
props = this.props;
|
|
object2.onOrientationChange = props.onOrientationChange;
|
|
props = this.props;
|
|
object2.allowSwipeDismissal = props.allowSwipeDismissal;
|
|
props = this.props;
|
|
object2.testID = props.testID;
|
|
return ((Component) => <Component {...object2}>{((VirtualizedListContextResetter) => <VirtualizedListContextResetter>{((Provider) => <Provider value={null}>{((Component) => <Component style={[env1_13.container,
|
|
|
|
object]} collapsable={false}>{children}</Component>)((require(112) /* metro dependency 112 */).default)}</Provider>)((require(340) /* metro dependency 340 */).default.Context.Provider)}</VirtualizedListContextResetter>)((importDefault(303) /* metro dependency 303 */).VirtualizedListContextResetter)}</Component>)(defaultImport);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun4971, 337, [29, 77, 6, 7, 15, 17, 18, 31, 33, 338, 303, 340, 112, 252, 404,
|
|
253]) /* metro module 337, dependencies: [29, 77, 6, 7, 15, 17, 18, 31, 33, 338, 303, 340, 112, 252, 404, 253] */;
|