Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,277 @@
|
||||
/* Metro module 16131; source: components_native/invite/AdvancedInstantInvite.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1379, 9152, 1867, 3784, 661, 33, 9158, 4647, 1244, 5282, 5277, 16132, 694, 16133, 9153, 566, 44, 22, 1484, 2] */
|
||||
function _fun124548(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:6, offset: 0x025bcd85, size: 337 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_12 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
||||
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const PureComponent = value.PureComponent;
|
||||
const env0_14 = _fun124552(PureComponent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/invite/AdvancedInstantInvite.tsx');
|
||||
exports.default = _default_124569;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_124549() { // fn#124549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:236, offset: 0x025bced6, size: 98 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_124549_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun124552(a0) { // fn#124552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:435, offset: 0x025bcf38, size: 177 bytes, params: 2, frame: 17
|
||||
const closure = AdvancedInstantInviteContainer;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'componentDidMount', value: value_124564}, {key: 'componentDidUpdate',
|
||||
value: function(a0) {
|
||||
if (this.props.changed !== a0.changed) {
|
||||
this.updateHeader();
|
||||
}
|
||||
}}, {key: 'componentWillUnmount', value: value_124566}, {key: 'render', value: value_124567}],
|
||||
[{key: 'getDerivedStateFromProps', value: function(a0, a1) {
|
||||
var channel = a0.channel;
|
||||
var value = null;
|
||||
return channel === a1.cachedChannel ? value : value != a0.channel ? {cachedChannel: a0.channel} : value;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _default_124569() { // fn#124569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2995, offset: 0x025bd6e4, size: 191 bytes, params: 1, frame: 19
|
||||
const {settings, inviteSettings, channel,
|
||||
guild} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
|
||||
CreateInviteModalStore, GuildStore], _fun124570);
|
||||
const moduleValue2 = require(22) /* metro dependency 22 */;
|
||||
return ((Component) => <Component changed={!moduleValue2.isEqual(settings,
|
||||
inviteSettings)} channel={channel} guild={guild} navigation={(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()} {...settings} />)(env0_14);
|
||||
}
|
||||
|
||||
function AdvancedInstantInviteContainer(a0) { // fn#124553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:447, offset: 0x025bcfe9, size: 259 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, AdvancedInstantInviteContainer);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(AdvancedInstantInviteContainer);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_124549()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.state = {cachedChannel: value.props.channel};
|
||||
value.handleChangeMaxUses = handleChangeMaxUses;
|
||||
value.handleChangeMaxAge = handleChangeMaxAge;
|
||||
value.handleChangeTemporary = handleChangeTemporary;
|
||||
value.handleChangeFlags = handleChangeFlags;
|
||||
value.handleChangeRoleIds = handleChangeRoleIds;
|
||||
value.handlePressCancel = handlePressCancel;
|
||||
value.handlePressSave = handlePressSave;
|
||||
value.updateHeader = updateHeader;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_124564() { // fn#124564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1871, offset: 0x025bd454, size: 315 bytes, params: 1, frame: 21
|
||||
var r4;
|
||||
var value2;
|
||||
var guildId;
|
||||
var show;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const channel = this.props.channel;
|
||||
let value = null;
|
||||
if (value == channel) {
|
||||
value2 = environment.__proto__;
|
||||
guildId = CreateInviteModalStore.getGuildId();
|
||||
r4 = value != guildId ? (require(16132) /* metro dependency 16132: CreateInstantInviteUtils */).getInvitableChannelForGuild(guildId) : value;
|
||||
if (value != r4) {
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({channelId: r4.channel.id});
|
||||
} else {
|
||||
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = value.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t.VINpSK);
|
||||
object2.body = intl.string(t.kQ6fit);
|
||||
object2.onConfirm = this.props.navigation.pop;
|
||||
Reflect.apply(show, value, [object2]);
|
||||
}
|
||||
}
|
||||
this.updateHeader();
|
||||
}
|
||||
|
||||
function value_124566() { // fn#124566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2343, offset: 0x025bd5b8, size: 56 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.wait((importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).resetSettings);
|
||||
}
|
||||
|
||||
function value_124567() { // fn#124567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:2414, offset: 0x025bd5f0, size: 188 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(16133) /* metro dependency 16133: AdvancedInstantInvite */;
|
||||
const valueProps = {...this.props};
|
||||
valueProps['channel'] = this.state.cachedChannel;
|
||||
valueProps['onChangeMaxUses'] = this.handleChangeMaxUses;
|
||||
valueProps['onChangeMaxAge'] = this.handleChangeMaxAge;
|
||||
valueProps['onChangeTemporary'] = this.handleChangeTemporary;
|
||||
valueProps['onChangeFlags'] = this.handleChangeFlags;
|
||||
valueProps['onChangeRoleIds'] = this.handleChangeRoleIds;
|
||||
const getMaxUsesOptions = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).getMaxUsesOptions;
|
||||
valueProps['maxUsesOptions'] = getMaxUsesOptions;
|
||||
return ((Component) => <Component {...valueProps} />)(value);
|
||||
}
|
||||
|
||||
function _fun124570() { // fn#124570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:3064, offset: 0x025bd7a3, size: 165 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const pendingSettings = CreateInviteModalStore.getPendingSettings();
|
||||
const value3 = undefined;
|
||||
(importDefault(44) /* metro dependency 44 */)(pendingSettings != null, 'Received null pending invite settings');
|
||||
const inviteSettings = CreateInviteModalStore.getInviteSettings();
|
||||
(importDefault(44) /* metro dependency 44 */)(inviteSettings != null, 'Received null invite settings');
|
||||
const channel = ChannelStore.getChannel(pendingSettings.channelId);
|
||||
const getGuild = GuildStore.getGuild;
|
||||
return {settings: pendingSettings, inviteSettings: inviteSettings, channel: channel, guild: Reflect.apply(getGuild,
|
||||
GuildStore, [channel == null ? value3 : channel.getGuildId()])};
|
||||
}
|
||||
|
||||
function handleChangeMaxUses(a0) { // fn#124554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:785, owner: AdvancedInstantInviteContainer.handleChangeMaxUses, offset: 0x025bd0ec, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({maxUses: a0});
|
||||
}
|
||||
|
||||
function handleChangeMaxAge(a0) { // fn#124555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:848, owner: AdvancedInstantInviteContainer.handleChangeMaxAge, offset: 0x025bd11c, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({maxAge: a0});
|
||||
}
|
||||
|
||||
function handleChangeTemporary(a0) { // fn#124556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:913, owner: AdvancedInstantInviteContainer.handleChangeTemporary, offset: 0x025bd14c, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({temporary: a0});
|
||||
}
|
||||
|
||||
function handleChangeFlags(a0) { // fn#124557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:977, owner: AdvancedInstantInviteContainer.handleChangeFlags, offset: 0x025bd17c, size: 47 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({flags: a0});
|
||||
}
|
||||
|
||||
function handleChangeRoleIds(a0) { // fn#124558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1039, owner: AdvancedInstantInviteContainer.handleChangeRoleIds, offset: 0x025bd1ab, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).updateSettings({roleIds: a0});
|
||||
}
|
||||
|
||||
function handlePressCancel() { // fn#124559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1101, owner: AdvancedInstantInviteContainer.handlePressCancel, offset: 0x025bd1db, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close();
|
||||
}
|
||||
|
||||
function handlePressSave() { // fn#124560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1142, owner: AdvancedInstantInviteContainer.handlePressSave, offset: 0x025bd200, size: 283 bytes, params: 1, frame: 22
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var show;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const channel = env0_0.props.channel;
|
||||
if (channel == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t.VINpSK);
|
||||
object2.body = intl.string(t.RiiKV0);
|
||||
object2.onConfirm = (importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close;
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
} else {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
if (PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
|
||||
(importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).createInvite('IOS Regenerate');
|
||||
env0_0.handlePressCancel();
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object2 = {};
|
||||
object2.title = intl.string(t.VINpSK);
|
||||
object2.body = intl.string(t.RiiKV0);
|
||||
object2.onConfirm = (importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */).close;
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateHeader() { // fn#124561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1424, owner: AdvancedInstantInviteContainer.updateHeader, offset: 0x025bd31b, size: 61 bytes, params: 1, frame: 13
|
||||
const navigation = env0_0.props.navigation;
|
||||
navigation.setOptions({headerLeft: headerLeft_124562, headerRight: headerRight_124563});
|
||||
}
|
||||
|
||||
function updateHeaderHeaderLeft(a0) { // fn#124562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1471, owner: AdvancedInstantInviteContainer.updateHeader.headerLeft, offset: 0x025bd358, size: 119 bytes, params: 2, frame: 13
|
||||
var value4;
|
||||
var moduleValue;
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_0;
|
||||
let r0 = binding.props.changed || binding.props.navigation.getState().routes.length === 1;
|
||||
if (r0) {
|
||||
value4 = environment.__proto__.__proto__.__proto__;
|
||||
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
|
||||
value = moduleValue.getHeaderCloseButton(env1_0.handlePressCancel);
|
||||
value = value(a0);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function updateHeaderHeaderRight() { // fn#124563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16339:1624, owner: AdvancedInstantInviteContainer.updateHeader.headerRight, offset: 0x025bd3cf, size: 133 bytes, params: 1, frame: 19
|
||||
var r0;
|
||||
var value3;
|
||||
var HeaderActionButton;
|
||||
var intl;
|
||||
const value = environment.__proto__;
|
||||
if (env1_0.props.changed) {
|
||||
value3 = environment.__proto__.__proto__.__proto__;
|
||||
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
var headerActionButtonProps = {onPress: env1_0.handlePressSave};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerActionButtonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
|
||||
r0 = <HeaderActionButton {...headerActionButtonProps} />;
|
||||
} else {
|
||||
r0 = undefined;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user