This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,118 +1,124 @@
/* Metro module 4486; source: modules/instant_invite/native/DCDSendUtils.tsx; dependencies: [27, 477, 4487, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun38234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:6, offset: 0x010ba9e8, size: 176 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.Linking;
const env0_4 = value.NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/DCDSendUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/DCDSendUtils.tsx');
exports.sendSMS = sendSMS;
exports.sendMail = sendMail;
exports.canSendSMS = canSendSMS;
exports.canSendMail = canSendMail;
exports.canOpenUrlScheme = canOpenUrlScheme;
}
function sendSMS(a0, a1) { // fn#38235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:229, offset: 0x010baa98, size: 137 bytes, params: 3, frame: 17
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
value.sendSMS(a0.body ?? '', a0.recipients ?? []);
} else {
NativeModules.DCDSend.sendSMS(a0, a1);
function sendSMS(a0, a1) { // fn#38235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:229, offset: 0x010baa98, size: 137 bytes, params: 3, frame: 17
var value;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
value.sendSMS(a0.body ?? '', a0.recipients ?? []);
} else {
NativeModules.DCDSend.sendSMS(a0, a1);
}
}
}
function sendMail(a0, a1) { // fn#38236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:368, offset: 0x010bab21, size: 157 bytes, params: 3, frame: 19
var sendMail;
var subject;
var value2;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
sendMail = value.sendMail;
subject = a0.subject;
value2 = '';
Reflect.apply(sendMail, value, [subject ?? value2, a0.body ?? value2, a0.recipients ?? []]);
} else {
NativeModules.DCDSend.sendMail(a0, a1);
function sendMail(a0, a1) { // fn#38236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:368, offset: 0x010bab21, size: 157 bytes, params: 3, frame: 19
var sendMail;
var subject;
var value2;
var value;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
sendMail = value.sendMail;
subject = a0.subject;
value2 = '';
Reflect.apply(sendMail, value, [subject ?? value2, a0.body ?? value2, a0.recipients ?? []]);
} else {
NativeModules.DCDSend.sendMail(a0, a1);
}
}
}
function canSendSMS() { // fn#38237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:538, offset: 0x010babbe, size: 110 bytes, params: 1, frame: 15
var r0;
var Promise;
var resolve;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
Promise = global.Promise;
resolve = Promise.resolve;
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
value = Reflect.apply(resolve, Promise, [value.canSendSMS()]);
r0 = value;
} else {
r0 = NativeModules.DCDSend.canSendSMS();
}
return r0;
}
function canSendMail() { // fn#38238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:638, offset: 0x010bac2c, size: 110 bytes, params: 1, frame: 15
var r0;
var Promise;
var resolve;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
Promise = global.Promise;
resolve = Promise.resolve;
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
value = Reflect.apply(resolve, Promise, [value.canSendMail()]);
r0 = value;
} else {
r0 = NativeModules.DCDSend.canSendMail();
}
return r0;
}
function canOpenUrlScheme(a0) { // fn#38239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:745, offset: 0x010bac9a, size: 160 bytes, params: 2, frame: 15
var environment;
var Promise;
var resolve;
var property;
var error;
const env0_0 = a0;
let value = environment;
const moduleValue = require(dependencyMap[1]);
if (moduleValue.isAndroid()) {
try {
function canSendSMS() { // fn#38237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:538, offset: 0x010babbe, size: 110 bytes, params: 1, frame: 15
var r0;
var Promise;
var resolve;
var value;
if (PlatformUtilsModule.isAndroid()) {
Promise = global.Promise;
resolve = Promise.resolve;
property = dependencyMap[2];
value = importDefault(property);
value = value.canOpenUrlScheme(a0);
value = Reflect.apply(resolve, Promise, [value]);
} catch (error) {
Promise = global.Promise;
return Promise.resolve(false);
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
value = Reflect.apply(resolve, Promise, [value.canSendSMS()]);
r0 = value;
} else {
r0 = NativeModules.DCDSend.canSendSMS();
}
return value;
return r0;
}
Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun38240);
return promise instanceof Object ? promise : value;
}
function _fun38240(a0) { // fn#38240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:909, offset: 0x010bad3a, size: 98 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = Linking.canOpenURL('' + env0_0 + '://app');
value = value.then(_fun38241);
value.catch(_fun38242);
function canSendMail() { // fn#38238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:638, offset: 0x010bac2c, size: 110 bytes, params: 1, frame: 15
var r0;
var Promise;
var resolve;
var value;
if (PlatformUtilsModule.isAndroid()) {
Promise = global.Promise;
resolve = Promise.resolve;
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
value = Reflect.apply(resolve, Promise, [value.canSendMail()]);
r0 = value;
} else {
r0 = NativeModules.DCDSend.canSendMail();
}
return r0;
}
function canOpenUrlScheme(a0) { // fn#38239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:745, offset: 0x010bac9a, size: 160 bytes, params: 2, frame: 15
var environment;
var Promise;
var resolve;
var property;
var error;
const env0_0 = a0;
let value = environment;
const moduleValue = require(dependencyMap[1]);
if (moduleValue.isAndroid()) {
try {
Promise = global.Promise;
resolve = Promise.resolve;
property = dependencyMap[2];
value = importDefault(property);
value = value.canOpenUrlScheme(a0);
value = Reflect.apply(resolve, Promise, [value]);
} catch (error) {
Promise = global.Promise;
return Promise.resolve(false);
}
return value;
}
Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun38240);
return promise instanceof Object ? promise : value;
function _fun38240(a0) { // fn#38240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:909, offset: 0x010bad3a, size: 98 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = Linking.canOpenURL('' + env0_0 + '://app');
value = value.then(_fun38241);
value.catch(_fun38242);
function _fun38241(a0) { // fn#38241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:946, offset: 0x00cee816, size: 19 bytes, params: 2, frame: 11
env0_0(a0);
}
function _fun38242() { // fn#38242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:965, offset: 0x010bad9c, size: 18 bytes, params: 1, frame: 11
env0_0(false);
}
}
}
}
global.__d(_fun38234, 4486, [27, 477, 4487, 2]) /* metro module 4486, dependencies: [27, 477, 4487, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,38 +1,40 @@
/* Metro module 9157; source: modules/instant_invite/native/InstantInviteConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun71805(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9342:6, offset: 0x01d2d8c4, size: 276 bytes, params: 8, frame: 17
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {TWITTER: 'twitter', WHATSAPP: 'whatsapp', GMAIL: 'googlegmail', LINE: 'line', MESSENGER: 'fb-messenger',
object = {TWITTER: 'twitter', WHATSAPP: 'whatsapp', GMAIL: 'googlegmail', LINE: 'line', MESSENGER: 'fb-messenger',
TELEGRAM: 'tg'};
const object4 = {};
const TWITTER = object3.TWITTER;
object4[TWITTER] = function(a0) {
const object2 = {};
const TWITTER = object.TWITTER;
object2[TWITTER] = function(a0) {
return 'twitter://post?message=' + a0;
};
const WHATSAPP = object3.WHATSAPP;
object4[WHATSAPP] = function(a0) {
const WHATSAPP = object.WHATSAPP;
object2[WHATSAPP] = function(a0) {
return 'whatsapp://send?text=' + a0;
};
const GMAIL = object3.GMAIL;
object4[GMAIL] = function(a0, a1) {
const GMAIL = object.GMAIL;
object2[GMAIL] = function(a0, a1) {
return 'googlegmail://co?subject=' + a0 + '&body=' + a1;
};
const LINE = object3.LINE;
object4[LINE] = function(a0) {
const LINE = object.LINE;
object2[LINE] = function(a0) {
return 'https://line.me/R/msg/text/?' + a0;
};
const MESSENGER = object3.MESSENGER;
object4[MESSENGER] = function(a0) {
const MESSENGER = object.MESSENGER;
object2[MESSENGER] = function(a0) {
return 'fb-messenger://share/?link=' + a0;
};
const TELEGRAM = object3.TELEGRAM;
object4[TELEGRAM] = function(a0, a1) {
const TELEGRAM = object.TELEGRAM;
object2[TELEGRAM] = function(a0, a1) {
return 'https://telegram.me/share/url?url=' + a1 + '&text=' + a0;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/InstantInviteConstants.tsx');
exports.SHARE_APPS_KEY = object3;
exports.SHARE_URLS = object4;
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/InstantInviteConstants.tsx');
exports.SHARE_APPS_KEY = object;
exports.SHARE_URLS = object2;
exports.IOS_COPY_TO_PASTEBOARD = 'CopyToPasteboard';
}
global.__d(_fun71805, 9157, [2]) /* metro module 9157, dependencies: [2] */;
@@ -1,86 +1,91 @@
/* Metro module 15753; source: modules/instant_invite/native/InstantInviteManager.native.tsx; dependencies: [7, 6, 15, 17, 18, 3857, 1244, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun120967(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:6, offset: 0x0253b987, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun120971(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/InstantInviteManager.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/InstantInviteManager.native.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120968() { // fn#120968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:148, offset: 0x0253ba6d, 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) {
function _isNativeReflectConstruct_120968() { // fn#120968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:148, offset: 0x0253ba6d, 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_120968_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_120968_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120971(a0) { // fn#120971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:351, offset: 0x0253bacf, size: 42 bytes, params: 2, frame: 14
const closure = InstantInviteManager;
env0_7(closure, a0);
return env0_3(closure);
}
function _fun120971(a0) { // fn#120971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:351, offset: 0x0253bacf, size: 42 bytes, params: 2, frame: 14
const InstantInviteManager2 = InstantInviteManager;
Inherits(InstantInviteManager2, a0);
return CreateClass(InstantInviteManager2);
function InstantInviteManager(a0) { // fn#120972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:363, offset: 0x0253baf9, size: 167 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, InstantInviteManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(InstantInviteManager);
binding = env1_5;
if (_isNativeReflectConstruct_120968()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED: NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED};
value.shareInviteFailed = function() {
var defaultImport = importDefault(dependencyMap[5]);
var object = {key: 'GROUP_DM_ADD_ERROR'};
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['N/9OFy']);
defaultImport.open(object);
};
return value;
function NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED() { // fn#120973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:663, owner: InstantInviteManager.NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED, offset: 0x0253bba0, size: 19 bytes, params: 1, frame: 9
return env0_0.shareInviteFailed();
}
}
function InstantInviteManager(a0) { // fn#120972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:363, offset: 0x0253baf9, size: 167 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, InstantInviteManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(InstantInviteManager);
binding = env1_5;
if (_isNativeReflectConstruct_120968()) {
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.actions = {NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED: NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED};
value.shareInviteFailed = function() {
var defaultImport = importDefault(dependencyMap[5]);
var object = {key: 'GROUP_DM_ADD_ERROR'};
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['N/9OFy']);
defaultImport.open(object);
};
return value;
}
function NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED() { // fn#120973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15961:663, owner: InstantInviteManager.NATIVE_APP_INSTANT_INVITE_GDM_SHARE_FAILED, offset: 0x0253bba0, size: 19 bytes, params: 1, frame: 9
return env0_0.shareInviteFailed();
}
global.__d(_fun120967, 15753, [7, 6, 15, 17, 18, 3857, 1244, 4860,
2]) /* metro module 15753, dependencies: [7, 6, 15, 17, 18, 3857, 1244, 4860, 2] */;
@@ -1,36 +1,39 @@
/* Metro module 9151; source: modules/instant_invite/native/InstantInviteUtils.tsx; dependencies: [7069, 1383, 1379, 9152, 1935, 4097, 4396, 1878, 9156, 4118, 9157, 661, 683, 7128, 9158, 9159, 4098, 4080, 9212, 3856, 7147, 6797, 4486, 44, 9154, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildChannelStore from '../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import InviteStore from '../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import GuildTemplateStore from '../../guild_templates/GuildTemplateStore.tsx'; /* Metro dependency 7069 */
import CreateInviteModalStore from '../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import DisplayedInviteStore from '../../../stores/native/DisplayedInviteStore.tsx'; /* Metro dependency 9156 */
import CreateInviteModalActionCreators from '../../../actions/CreateInviteModalActionCreators.tsx'; /* Metro dependency 9158 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 4118 */
import * as DCDSendUtilsModule from './DCDSendUtils.tsx'; /* Metro dependency 4486 */
import * as InstantInviteConstantsModule from './InstantInviteConstants.tsx'; /* Metro dependency 9157 */
function _fun71680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:6, offset: 0x01d2989c, size: 491 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */;
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).ChannelRecordBase;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const displayedInviteStore = importDefault(9156) /* metro dependency 9156: DisplayedInviteStore */;
const env0_12 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
const env0_13 = (require(9157) /* metro dependency 9157: InstantInviteConstants */).IOS_COPY_TO_PASTEBOARD;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_14 = constantsModule.AnalyticEvents;
const env0_15 = constantsModule.InviteOptionsType;
const env0_16 = constantsModule.Permissions;
const closure = showInstantInviteActionSheet;
const closure2 = showVanityUrlInviteActionSheet;
const closure3 = trackOptionClicked;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/InstantInviteUtils.tsx');
const showInstantInviteActionSheet2 = showInstantInviteActionSheet;
const showVanityUrlInviteActionSheet2 = showVanityUrlInviteActionSheet;
const trackOptionClicked2 = trackOptionClicked;
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/InstantInviteUtils.tsx');
exports.showInstantInviteActionSheetForChannel = function(a0) {
var value2 = ChannelStore.getChannel(a0);
if (value2 != null) {
showInstantInviteActionSheet(value2);
}
};
exports.showInstantInviteActionSheet = closure;
exports.showVanityUrlInviteActionSheet = closure2;
exports.trackOptionClicked = closure3;
exports.showInstantInviteActionSheet = showInstantInviteActionSheet2;
exports.showVanityUrlInviteActionSheet = showVanityUrlInviteActionSheet2;
exports.trackOptionClicked = trackOptionClicked2;
exports.getShareMessage = function(a0) {
return a0;
};
@@ -40,255 +43,261 @@ function _fun71680(global, require, importDefault, importAll, module, exports, d
exports.isAppInstalled = isAppInstalled;
exports.handleOpenInviteActionsheet = handleOpenInviteActionsheet;
exports.hasDeferredInvite = hasDeferredInvite;
}
function getAnalyticsGuildId(a0) { // fn#71681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:1386, offset: 0x01d29a87, size: 75 bytes, params: 2, frame: 15
return a0 instanceof ChannelRecordBase ? a0.guild_id : ChannelStore.getChannel(a0?.id)?.getGuildId();
}
function showInstantInviteActionSheet(a0, a1) { // fn#71682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:367, offset: 0x01d29ad2, size: 592 bytes, params: 3, frame: 23
var id;
var ownerId;
var streamerApplication;
var defaultImport2;
var OPEN_MODAL;
var object2;
var defaultImport3;
const object4 = {'isActionSheet': true, 'location': 'IOS Instant Invite Action Sheet Mount'};
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
let track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Instant Invite',
source: a1 == null ? value2 : a1.source}]);
let stream = a1 == null ? value2 : a1.stream;
if (stream != null) {
stream = a1.stream;
object4.targetType = InviteTargetTypes.STREAM;
ownerId = stream.ownerId;
object4.targetUserId = ownerId;
streamerApplication = (require(7128) /* metro dependency 7128: StreamerApplicationSelectors */).getStreamerApplication(stream,
PresenceStore);
defaultImport2 = defaultImport;
track = defaultImport2.track;
OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
object2 = {type: 'Send Stream Invite'};
object2.location = object4.location;
ownerId = stream.ownerId;
object2.other_user_id = ownerId;
id = streamerApplication == null ? value2 : streamerApplication.id;
object2.application_id = id;
object2.application_name = streamerApplication == null ? value2 : streamerApplication.name;
id = streamerApplication == null ? value2 : streamerApplication.id;
object2.game_id = id;
Reflect.apply(track, defaultImport2, [OPEN_MODAL, object2]);
} else if ((a1 == null ? value2 : a1.targetApplicationId) != null) {
object4.targetType = InviteTargetTypes.EMBEDDED_APPLICATION;
object4.targetApplicationId = a1.targetApplicationId;
function getAnalyticsGuildId(a0) { // fn#71681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:1386, offset: 0x01d29a87, size: 75 bytes, params: 2, frame: 15
return a0 instanceof ChannelRecordBase ? a0.guild_id : ChannelStore.getChannel(a0?.id)?.getGuildId();
}
if ((a1 == null ? value2 : a1.createInvite) !== false && (a1 == null ? value2 : a1.code) == null) {
defaultImport3 = importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */;
defaultImport3.init(a0.getGuildId(), a0.id, object4);
}
(importDefault(9159) /* metro dependency 9159: openInstantInviteActionSheet */)({channel: a0,
source: a1 == null ? value2 : a1.source, guildScheduledEventId: a1 == null ? value2 : a1.guildScheduledEventId,
targetApplicationId: a1 == null ? value2 : a1.targetApplicationId, code: a1 == null ? value2 : a1.code,
vanityURLCode: null, stackingBehavior: a1 == null ? value2 : a1.stackingBehavior});
return value2;
}
function showVanityUrlInviteActionSheet({id, vanityURLCode}, a1, a2, a3) { // fn#71683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:1558, offset: 0x01d29d22, size: 200 bytes, params: 5, frame: 23
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Vanity URL Invite', source: a2}]);
const createInviteModalActionCreators = importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */;
createInviteModalActionCreators.init(id, a1.id, {skipCreateInvite: true});
(importDefault(9159) /* metro dependency 9159: openInstantInviteActionSheet */)({vanityURLCode: vanityURLCode,
channel: a1, source: a2, guildScheduledEventId: a3?.guildScheduledEventId,
stackingBehavior: a3?.stackingBehavior});
}
function trackOptionClicked(a0, a1, a2, a3) { // fn#71684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:1876, offset: 0x01d29dea, size: 270 bytes, params: 5, frame: 22
const value2 = undefined;
const invite = InviteStore.getInvite((require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(a0).baseCode);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const INSTANT_INVITE_OPTION_CLICKED = AnalyticEvents.INSTANT_INVITE_OPTION_CLICKED;
const object2 = {invite_type: a2};
object2.guild_id = getAnalyticsGuildId(a1);
object2.channel_id = a1 == null ? value2 : a1.id;
object2.invite_code = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseInviteCodeFromInviteKey(a0);
object2.invite_channel_type = a1 == null ? value2 : a1.type;
const currentUser = UserStore.getCurrentUser();
object2.invite_inviter_id = currentUser == null ? value2 : currentUser.id;
object2.location = a3;
object2.application_id = invite == null || invite.target_application == null ? value2 : invite.target_application.id;
Reflect.apply(track, defaultImport, [INSTANT_INVITE_OPTION_CLICKED, object2]);
return value2;
}
function handleOpenShareSheet(a0, a1, a2, a3) { // fn#71687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:2777, offset: 0x01d29f21, size: 378 bytes, params: 5, frame: 27
var id;
var extraDataFromInviteKey;
var getInvite;
var baseCode;
var value3;
var defaultImport;
var track;
var INSTANT_INVITE_SHARED;
var object2;
var currentUser;
const value = a4;
const value2 = undefined;
if (a0 != null) {
extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(a0);
getInvite = InviteStore.getInvite;
baseCode = extraDataFromInviteKey.baseCode;
value3 = Reflect.apply(getInvite, InviteStore, [baseCode]);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
INSTANT_INVITE_SHARED = AnalyticEvents.INSTANT_INVITE_SHARED;
object2 = {};
object2.guild_id = getAnalyticsGuildId(a1);
id = a1 == null ? value2 : a1.id;
object2.channel_id = id;
baseCode = extraDataFromInviteKey.baseCode;
object2.invite_code = baseCode;
object2.invite_channel_type = a1 == null ? value2 : a1.type;
currentUser = UserStore.getCurrentUser();
id = currentUser == null ? value2 : currentUser.id;
object2.invite_inviter_id = id;
object2.invite_guild_scheduled_event_id = extraDataFromInviteKey.guildScheduledEventId;
object2.location = a3;
id = value3 == null || value3.target_application == null ? value2 : value3.target_application.id;
object2.application_id = id;
Reflect.apply(track, defaultImport, [INSTANT_INVITE_SHARED, object2]);
if (!(value !== value2) || value) {
trackOptionClicked(a0, a1, InviteOptionsType.SHARE, a3);
function showInstantInviteActionSheet(a0, a1) { // fn#71682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:367, offset: 0x01d29ad2, size: 592 bytes, params: 3, frame: 23
var id;
var ownerId;
var moduleValue;
var value3;
var defaultImport2;
var OPEN_MODAL;
var object;
var defaultImport3;
const object3 = {'isActionSheet': true, 'location': 'IOS Instant Invite Action Sheet Mount'};
const value2 = undefined;
const defaultImport = AnalyticsUtils;
let track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Instant Invite',
source: a1 == null ? value2 : a1.source}]);
let stream = a1 == null ? value2 : a1.stream;
if (stream != null) {
stream = a1.stream;
object3.targetType = InviteTargetTypes.STREAM;
ownerId = stream.ownerId;
object3.targetUserId = ownerId;
moduleValue = require(7128) /* metro dependency 7128: StreamerApplicationSelectors */;
value3 = moduleValue.getStreamerApplication(stream, PresenceStore);
defaultImport2 = defaultImport;
track = defaultImport2.track;
OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
object = {type: 'Send Stream Invite'};
object.location = object3.location;
ownerId = stream.ownerId;
object.other_user_id = ownerId;
id = value3 == null ? value2 : value3.id;
object.application_id = id;
object.application_name = value3 == null ? value2 : value3.name;
id = value3 == null ? value2 : value3.id;
object.game_id = id;
Reflect.apply(track, defaultImport2, [OPEN_MODAL, object]);
} else if ((a1 == null ? value2 : a1.targetApplicationId) != null) {
object3.targetType = InviteTargetTypes.EMBEDDED_APPLICATION;
object3.targetApplicationId = a1.targetApplicationId;
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
(require(9212) /* metro dependency 9212: showShareActionSheetAndroid */).showShareActionSheet({message: a2}, a3,
_fun71688);
}
return value2;
}
function handleCopy(a0, a1, a2) { // fn#71689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:3428, offset: 0x01d2a0d6, size: 329 bytes, params: 4, frame: 24
var id;
var extraDataFromInviteKey;
var getInvite;
var baseCode;
var value4;
var defaultImport;
var track;
var COPY_INSTANT_INVITE;
var object2;
const value = a3;
const value2 = undefined;
if (a0 != null) {
extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(a0);
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy((importDefault(7147) /* metro dependency 7147: getInviteURL */)(a0));
getInvite = InviteStore.getInvite;
baseCode = extraDataFromInviteKey.baseCode;
value4 = Reflect.apply(getInvite, InviteStore, [baseCode]);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
COPY_INSTANT_INVITE = AnalyticEvents.COPY_INSTANT_INVITE;
object2 = {};
object2.server = getAnalyticsGuildId(a1);
id = a1 == null ? value2 : a1.id;
object2.channel = id;
object2.channel_type = a1 == null ? value2 : a1.type;
object2.location = a2;
baseCode = extraDataFromInviteKey.baseCode;
object2.code = baseCode;
object2.guild_scheduled_event_id = extraDataFromInviteKey.guildScheduledEventId;
id = value4 == null || value4.target_application == null ? value2 : value4.target_application.id;
object2.application_id = id;
Reflect.apply(track, defaultImport, [COPY_INSTANT_INVITE, object2]);
if (!(value !== value2) || value) {
trackOptionClicked(a0, a1, InviteOptionsType.COPY);
if ((a1 == null ? value2 : a1.createInvite) !== false && (a1 == null ? value2 : a1.code) == null) {
defaultImport3 = importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */;
defaultImport3.init(a0.getGuildId(), a0.id, object3);
}
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
(importDefault(9159) /* metro dependency 9159: openInstantInviteActionSheet */)({channel: a0,
source: a1 == null ? value2 : a1.source, guildScheduledEventId: a1 == null ? value2 : a1.guildScheduledEventId,
targetApplicationId: a1 == null ? value2 : a1.targetApplicationId, code: a1 == null ? value2 : a1.code,
vanityURLCode: null, stackingBehavior: a1 == null ? value2 : a1.stackingBehavior});
return value2;
}
return value2;
}
function handlePressSettings(a0, a1, a2) { // fn#71690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:3931, offset: 0x01d2a21f, size: 143 bytes, params: 4, frame: 20
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
const env0_2 = CreateInviteModalStore.getPendingSettings();
const defaultImport2 = importDefault(9158) /* metro dependency 9158: CreateInviteModalActionCreators */;
defaultImport2.openSettings(a0.guild_id, a0.id, value ?? 'Instant Invite Action Sheet', _fun71691);
}
function showVanityUrlInviteActionSheet({id, vanityURLCode}, a1, a2, a3) { // fn#71683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:1558, offset: 0x01d29d22, size: 200 bytes, params: 5, frame: 23
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Vanity URL Invite', source: a2}]);
CreateInviteModalActionCreators.init(id, a1.id, {skipCreateInvite: true});
(importDefault(9159) /* metro dependency 9159: openInstantInviteActionSheet */)({vanityURLCode: vanityURLCode,
channel: a1, source: a2, guildScheduledEventId: a3?.guildScheduledEventId,
stackingBehavior: a3?.stackingBehavior});
}
function isAppInstalled(a0) { // fn#71692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4246, offset: 0x01d2a30f, size: 41 bytes, params: 2, frame: 11
return (require(4486) /* metro dependency 4486: DCDSendUtils */).canOpenUrlScheme(a0);
}
function trackOptionClicked(a0, a1, a2, a3) { // fn#71684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:1876, offset: 0x01d29dea, size: 270 bytes, params: 5, frame: 22
const value2 = undefined;
const invite = InviteStore.getInvite((require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(a0).baseCode);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const INSTANT_INVITE_OPTION_CLICKED = AnalyticEvents.INSTANT_INVITE_OPTION_CLICKED;
const object = {invite_type: a2};
object.guild_id = getAnalyticsGuildId(a1);
object.channel_id = a1 == null ? value2 : a1.id;
object.invite_code = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseInviteCodeFromInviteKey(a0);
object.invite_channel_type = a1 == null ? value2 : a1.type;
const currentUser = UserStore.getCurrentUser();
object.invite_inviter_id = currentUser == null ? value2 : currentUser.id;
object.location = a3;
object.application_id = invite == null || invite.target_application == null ? value2 : invite.target_application.id;
Reflect.apply(track, defaultImport, [INSTANT_INVITE_OPTION_CLICKED, object]);
return value2;
}
function handleOpenInviteActionsheet(a0, a1, a2, a3) { // fn#71693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4340, offset: 0x01d2a338, size: 285 bytes, params: 5, frame: 24
var r7;
var moduleValue;
var value4;
const r2 = ChannelStore.getChannel(a1) ?? GuildChannelStore.getDefaultChannel(a0.id, true,
Permissions.CREATE_INSTANT_INVITE);
(importDefault(44) /* metro dependency 44 */)(r2 != null, 'Channel cannot be null');
if (a0.vanityURLCode == null) {
moduleValue = require(9154) /* metro dependency 9154: InstantInviteUtils */;
value4 = moduleValue.getInviteChannelId(r2.id, a2);
if (value4 != null) {
r7 = ChannelStore.getChannel(value4) ?? GuildChannelStore.getDefaultChannel(a0.id, true,
Permissions.CREATE_INSTANT_INVITE);
(importDefault(44) /* metro dependency 44 */)(r7 != null, 'Channel cannot be null');
showInstantInviteActionSheet(r7, {source: a3});
function handleOpenShareSheet(a0, a1, a2, a3) { // fn#71687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:2777, offset: 0x01d29f21, size: 378 bytes, params: 5, frame: 27
var id;
var extraDataFromInviteKey;
var inviteStoreBinding;
var getInvite;
var baseCode;
var value3;
var defaultImport;
var track;
var INSTANT_INVITE_SHARED;
var object;
var currentUser;
const value = a4;
const value2 = undefined;
if (a0 != null) {
extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(a0);
inviteStoreBinding = InviteStore;
getInvite = inviteStoreBinding.getInvite;
baseCode = extraDataFromInviteKey.baseCode;
value3 = Reflect.apply(getInvite, inviteStoreBinding, [baseCode]);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
INSTANT_INVITE_SHARED = AnalyticEvents.INSTANT_INVITE_SHARED;
object = {};
object.guild_id = getAnalyticsGuildId(a1);
id = a1 == null ? value2 : a1.id;
object.channel_id = id;
baseCode = extraDataFromInviteKey.baseCode;
object.invite_code = baseCode;
object.invite_channel_type = a1 == null ? value2 : a1.type;
currentUser = UserStore.getCurrentUser();
id = currentUser == null ? value2 : currentUser.id;
object.invite_inviter_id = id;
object.invite_guild_scheduled_event_id = extraDataFromInviteKey.guildScheduledEventId;
object.location = a3;
id = value3 == null || value3.target_application == null ? value2 : value3.target_application.id;
object.application_id = id;
Reflect.apply(track, defaultImport, [INSTANT_INVITE_SHARED, object]);
if (!(value !== value2) || value) {
trackOptionClicked(a0, a1, InviteOptionsType.SHARE, a3);
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
(require(9212) /* metro dependency 9212: showShareActionSheetAndroid */).showShareActionSheet({message: a2}, a3,
_fun71688);
}
} else if (a0.vanityURLCode !== '') {
showVanityUrlInviteActionSheet(a0, r2, a3);
} else {
moduleValue = require(9154) /* metro dependency 9154: InstantInviteUtils */;
value4 = moduleValue.getInviteChannelId(r2.id, a2);
if (value4 != null) {
r7 = ChannelStore.getChannel(value4) ?? GuildChannelStore.getDefaultChannel(a0.id, true,
Permissions.CREATE_INSTANT_INVITE);
(importDefault(44) /* metro dependency 44 */)(r7 != null, 'Channel cannot be null');
showInstantInviteActionSheet(r7, {source: a3});
return value2;
function _fun71688(a0) { // fn#71688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:3362, offset: 0x01d2a09b, size: 59 bytes, params: 2, frame: 12
const includes = a0.includes;
const value = environment.__proto__;
if (!Reflect.apply(includes, a0, [IOS_COPY_TO_PASTEBOARD])) {
(require(3856) /* metro dependency 3856: ToastUtils */).presentInviteSent();
}
}
}
function handleCopy(a0, a1, a2) { // fn#71689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:3428, offset: 0x01d2a0d6, size: 329 bytes, params: 4, frame: 24
var id;
var extraDataFromInviteKey;
var inviteStoreBinding;
var getInvite;
var baseCode;
var value4;
var defaultImport;
var track;
var COPY_INSTANT_INVITE;
var object;
const value = a3;
const value2 = undefined;
if (a0 != null) {
extraDataFromInviteKey = (require(4098) /* metro dependency 4098: InviteCodeUtils */).parseExtraDataFromInviteKey(a0);
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy((importDefault(7147) /* metro dependency 7147: getInviteURL */)(a0));
inviteStoreBinding = InviteStore;
getInvite = inviteStoreBinding.getInvite;
baseCode = extraDataFromInviteKey.baseCode;
value4 = Reflect.apply(getInvite, inviteStoreBinding, [baseCode]);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
COPY_INSTANT_INVITE = AnalyticEvents.COPY_INSTANT_INVITE;
object = {};
object.server = getAnalyticsGuildId(a1);
id = a1 == null ? value2 : a1.id;
object.channel = id;
object.channel_type = a1 == null ? value2 : a1.type;
object.location = a2;
baseCode = extraDataFromInviteKey.baseCode;
object.code = baseCode;
object.guild_scheduled_event_id = extraDataFromInviteKey.guildScheduledEventId;
id = value4 == null || value4.target_application == null ? value2 : value4.target_application.id;
object.application_id = id;
Reflect.apply(track, defaultImport, [COPY_INSTANT_INVITE, object]);
if (!(value !== value2) || value) {
trackOptionClicked(a0, a1, InviteOptionsType.COPY);
}
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
}
return value2;
}
function handlePressSettings(a0, a1, a2) { // fn#71690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:3931, offset: 0x01d2a21f, size: 143 bytes, params: 4, frame: 20
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
(ActionSheetActionCreators).hideActionSheet();
const env0_2 = CreateInviteModalStore.getPendingSettings();
const defaultImport2 = CreateInviteModalActionCreators;
defaultImport2.openSettings(a0.guild_id, a0.id, value ?? 'Instant Invite Action Sheet', _fun71691);
function _fun71691() { // fn#71691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4076, offset: 0x01d2a2ae, size: 97 bytes, params: 1, frame: 17
var value2;
var showInstantInviteActionSheetBinding;
var binding;
var value3;
if (require != null) {
require();
} else {
value2 = environment.__proto__;
showInstantInviteActionSheetBinding = showInstantInviteActionSheet;
binding = env0_0;
value3 = undefined;
showInstantInviteActionSheetBinding(binding, {createInvite: false,
targetApplicationId: (env0_2 == null ? value3 : env0_2.targetApplicationId) ?? value3});
}
}
}
function isAppInstalled(a0) { // fn#71692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4246, offset: 0x01d2a30f, size: 41 bytes, params: 2, frame: 11
return (DCDSendUtilsModule).canOpenUrlScheme(a0);
}
function handleOpenInviteActionsheet(a0, a1, a2, a3) { // fn#71693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4340, offset: 0x01d2a338, size: 285 bytes, params: 5, frame: 24
var r7;
var moduleValue;
var value4;
const r2 = ChannelStore.getChannel(a1) ?? GuildChannelStore.getDefaultChannel(a0.id, true,
Permissions.CREATE_INSTANT_INVITE);
(importDefault(44) /* metro dependency 44 */)(r2 != null, 'Channel cannot be null');
if (a0.vanityURLCode == null) {
moduleValue = require(9154) /* metro dependency 9154: InstantInviteUtils */;
value4 = moduleValue.getInviteChannelId(r2.id, a2);
if (value4 != null) {
r7 = ChannelStore.getChannel(value4) ?? GuildChannelStore.getDefaultChannel(a0.id, true,
Permissions.CREATE_INSTANT_INVITE);
(importDefault(44) /* metro dependency 44 */)(r7 != null, 'Channel cannot be null');
showInstantInviteActionSheet(r7, {source: a3});
}
} else if (a0.vanityURLCode !== '') {
showVanityUrlInviteActionSheet(a0, r2, a3);
} else {
moduleValue = require(9154) /* metro dependency 9154: InstantInviteUtils */;
value4 = moduleValue.getInviteChannelId(r2.id, a2);
if (value4 != null) {
r7 = ChannelStore.getChannel(value4) ?? GuildChannelStore.getDefaultChannel(a0.id, true,
Permissions.CREATE_INSTANT_INVITE);
(importDefault(44) /* metro dependency 44 */)(r7 != null, 'Channel cannot be null');
showInstantInviteActionSheet(r7, {source: a3});
}
}
}
}
function hasDeferredInvite() { // fn#71694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4826, offset: 0x01d2a455, size: 94 bytes, params: 1, frame: 15
const displayedInviteCode = DisplayedInviteStore.getDisplayedInviteCode();
const displayedGuildTemplateCode = GuildTemplateStore.getDisplayedGuildTemplateCode();
const value4 = null;
return value4 != (value4 != displayedInviteCode ? InviteStore.getInvite(displayedInviteCode) : value4) || value4 != (value4 != displayedGuildTemplateCode ? GuildTemplateStore.getGuildTemplate(displayedGuildTemplateCode) : value4);
}
function _fun71688(a0) { // fn#71688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:3362, offset: 0x01d2a09b, size: 59 bytes, params: 2, frame: 12
const includes = a0.includes;
const value = environment.__proto__;
if (!Reflect.apply(includes, a0, [IOS_COPY_TO_PASTEBOARD])) {
(require(3856) /* metro dependency 3856: ToastUtils */).presentInviteSent();
}
}
function _fun71691() { // fn#71691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4076, offset: 0x01d2a2ae, size: 97 bytes, params: 1, frame: 17
var value2;
var showInstantInviteActionSheetBinding;
var binding;
var value3;
if (require != null) {
require();
} else {
value2 = environment.__proto__;
showInstantInviteActionSheetBinding = showInstantInviteActionSheet;
binding = env0_0;
value3 = undefined;
showInstantInviteActionSheetBinding(binding, {createInvite: false,
targetApplicationId: (env0_2 == null ? value3 : env0_2.targetApplicationId) ?? value3});
function hasDeferredInvite() { // fn#71694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9336:4826, offset: 0x01d2a455, size: 94 bytes, params: 1, frame: 15
const displayedInviteCode = DisplayedInviteStore.getDisplayedInviteCode();
const displayedGuildTemplateCode = GuildTemplateStore.getDisplayedGuildTemplateCode();
const value4 = null;
return value4 != (value4 != displayedInviteCode ? InviteStore.getInvite(displayedInviteCode) : value4) || value4 != (value4 != displayedGuildTemplateCode ? GuildTemplateStore.getGuildTemplate(displayedGuildTemplateCode) : value4);
}
}
global.__d(_fun71680, 9151, [7069, 1383, 1379, 9152, 1935, 4097, 4396, 1878, 9156, 4118, 9157, 661, 683, 7128, 9158,
9159, 4098, 4080, 9212, 3856, 7147, 6797, 4486, 44, 9154,
2]) /* metro module 9151, dependencies: [7069, 1383, 1379, 9152, 1935, 4097, 4396, 1878, 9156, 4118, 9157, 661, 683, 7128, 9158, 9159, 4098, 4080, 9212, 3856, 7147, 6797, 4486, 44, 9154, 2] */;
@@ -1,52 +1,69 @@
/* Metro module 12144; source: modules/instant_invite/native/InviteRolesDisplay.tsx; dependencies: [31, 27, 1938, 33, 4501, 566, 4573, 1244, 11428, 2] */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import RolePill from '../../../components_native/common/RolePill.tsx'; /* Metro dependency 11428 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun93199(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:6, offset: 0x020aa953, size: 254 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {marginTop: 8},
ReactModule;
const env0_7 = (CreateStylesModule).createStyles({container: {marginTop: 8},
label: {marginBottom: 4}, rolesRow: {'flexDirection': 'row', 'flexWrap': 'wrap'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/InviteRolesDisplay.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/InviteRolesDisplay.tsx');
exports.default = InviteRolesDisplay;
}
function InviteRolesDisplay({roleIds, guildId}) { // fn#93200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:372, offset: 0x020aaa51, size: 308 bytes, params: 2, frame: 26
var r0;
var Text;
var intl;
var value;
const styles = useStyles();
const value2 = (FluxModule).useStateFromStoresArray([GuildRoleStore], _fun93201,
[roleIds, guildId]);
if (value2.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/semibold', 'color': 'text-muted', style: styles.label};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.stcSfI)}
</Text>
);
value = (
<View {...viewBindingProps}>
{value}
<View style={styles.rolesRow}>
{value2.map(_fun93204)}
</View>
</View>
);
r0 = value;
}
return r0;
function _fun93201() { // fn#93201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:472, offset: 0x020aab85, size: 45 bytes, params: 1, frame: 12
return roleIds.map(function(a0) {
return GuildRoleStore.getRole(guildId, a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun93204(a0) { // fn#93204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:753, offset: 0x020aabd1, size: 64 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component role={a0} guildId={guildId} key={a0.id} />)(RolePill);
}
function InviteRolesDisplay({roleIds, guildId}) { // fn#93200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:372, offset: 0x020aaa51, size: 308 bytes, params: 2, frame: 26
var r0;
var Text;
var intl;
var value;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore], _fun93201,
[roleIds, guildId]);
if (value2.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/semibold', 'color': 'text-muted', style: styles.label};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.stcSfI)}</Text>;
value = <View {...viewBindingProps}>{value}<View style={styles.rolesRow}>{value2.map(_fun93204)}</View></View>;
r0 = value;
}
return r0;
}
function _fun93201() { // fn#93201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:472, offset: 0x020aab85, size: 45 bytes, params: 1, frame: 12
return roleIds.map(function(a0) {
return GuildRoleStore.getRole(guildId, a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun93204(a0) { // fn#93204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12330:753, offset: 0x020aabd1, size: 64 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component role={a0} guildId={guildId} key={a0.id} />)(importDefault(11428) /* metro dependency 11428: RolePill */);
}
global.__d(_fun93199, 12144, [31, 27, 1938, 33, 4501, 566, 4573, 1244, 11428,
2]) /* metro module 12144, dependencies: [31, 27, 1938, 33, 4501, 566, 4573, 1244, 11428, 2] */;
@@ -1,158 +1,184 @@
/* Metro module 10478; source: modules/instant_invite/native/action_sheet/invite_to_guilds/GuildInviteActionSheet.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1305, 1244, 10479, 10480, 10476, 4573, 5463, 8694, 10481, 6758, 6275, 6984, 9153, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import InstantInviteUtils from '../../../../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import GuildInviteRow from './GuildInviteRow.tsx'; /* Metro dependency 10481 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as SearchFieldNativeModule from '../../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as UserProfileStackedActionSheetModule from '../../../../user_profile/native/UserProfileStackedActionSheet.tsx'; /* Metro dependency 8694 */
import * as GuildInviteUtilsModule from '../../GuildInviteUtils.tsx'; /* Metro dependency 10476 */
function _fun81092(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:6, offset: 0x01e996d7, size: 367 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {paddingHorizontal: PX_16};
object.content = {paddingHorizontal: PX_16};
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.searchbarWrapper = {rowGap: 8, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.searchbarWrapper = {rowGap: 8, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.sectionTitle = {'paddingBottom': 6, 'paddingTop': 24, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object2.emptyStateContainer = {margin: 24};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/action_sheet/invite_to_guilds/GuildInviteActionSheet.tsx');
object.sectionTitle = {'paddingBottom': 6, 'paddingTop': 24, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.emptyStateContainer = {margin: 24};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/action_sheet/invite_to_guilds/GuildInviteActionSheet.tsx');
exports.default = _default_81098;
}
function GuildList({recipientId, query, source}) { // fn#81093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:693, offset: 0x01e99846, size: 487 bytes, params: 2, frame: 22
var r6;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
const env0_2 = useStyles();
const value3 = undefined((GuildInviteUtilsModule).useServerInviteRows(recipientId,
query), 2);
const property = value3[0];
const property2 = value3[1];
if (property.length !== 0) {
object = {};
object.title = intl.string(t['u+Ithu']);
object.data = property;
items2 = [object];
object = {};
object.title = intl.string(t['c5T+X/']);
object.data = property2;
items2[1] = object;
r6 = items2;
} else if (property2.length === 0) {
r6 = [];
} else {
object = {};
object.title = intl.string(t['u+Ithu']);
object.data = property;
items2 = [object];
object = {};
object.title = intl.string(t['c5T+X/']);
object.data = property2;
items2[1] = object;
r6 = items2;
}
const insets = (UseSafeAreaInsetsKeyboardAwareNative)().insets;
const r10 = property.length === 0 || property2.length === 0;
const UserProfileStackedActionSheetSectionList = (UserProfileStackedActionSheetModule).UserProfileStackedActionSheetSectionList;
object = {renderItem: renderItem_81094};
const object2 = {};
object2.paddingTop = r10 ? 24 : 0;
const bottom = insets.bottom;
const PX_16 = (Native).space.PX_16;
object2.paddingBottom = bottom + PX_16;
object.contentContainerStyle = object2;
object.sections = r6;
object.renderSectionHeader = renderSectionHeader_81095;
object.stickySectionHeadersEnabled = true;
object.keyExtractor = function(a0) {
return a0.guild.id;
};
object.ListEmptyComponent = EmptyGuildList;
return <UserProfileStackedActionSheetSectionList {...object} />;
function GuildListRenderItem({item, start, end}) { // fn#81094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1081, owner: GuildList.renderItem, offset: 0x01e99a2d, size: 90 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component row={item} recipientId={recipientId} source={source} start={start} end={end} />)(GuildInviteRow);
}
function GuildListRenderSectionHeader({section}) { // fn#81095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1280, owner: GuildList.renderSectionHeader, offset: 0x01e99a87, size: 126 bytes, params: 2, frame: 17
if (Module00057) {
return null;
} else if (section.data.length > 0) {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.sectionTitle}
variant="text-sm/semibold"
color="text-default"
>
{section.title}
</Text>
);
} else {
return null;
}
}
function GuildList({recipientId, query, source}) { // fn#81093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:693, offset: 0x01e99846, size: 487 bytes, params: 2, frame: 22
var r6;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const env0_2 = useStyles();
const value3 = undefined((require(10476) /* metro dependency 10476: GuildInviteUtils */).useServerInviteRows(recipientId,
query), 2);
const property = value3[0];
const property2 = value3[1];
if (property.length !== 0) {
object3 = {};
object3.title = intl.string(t['u+Ithu']);
object3.data = property;
items2 = [object3];
object3 = {};
object3.title = intl.string(t['c5T+X/']);
object3.data = property2;
items2[1] = object3;
r6 = items2;
} else if (property2.length === 0) {
r6 = [];
} else {
object3 = {};
object3.title = intl.string(t['u+Ithu']);
object3.data = property;
items2 = [object3];
object3 = {};
object3.title = intl.string(t['c5T+X/']);
object3.data = property2;
items2[1] = object3;
r6 = items2;
}
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets;
const r10 = property.length === 0 || property2.length === 0;
const UserProfileStackedActionSheetSectionList = (require(8694) /* metro dependency 8694: UserProfileStackedActionSheet */).UserProfileStackedActionSheetSectionList;
object3 = {renderItem: renderItem_81094};
const object4 = {};
object4.paddingTop = r10 ? 24 : 0;
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingBottom = bottom + PX_16;
object3.contentContainerStyle = object4;
object3.sections = r6;
object3.renderSectionHeader = renderSectionHeader_81095;
object3.stickySectionHeadersEnabled = true;
object3.keyExtractor = function(a0) {
return a0.guild.id;
};
object3.ListEmptyComponent = EmptyGuildList;
return <UserProfileStackedActionSheetSectionList {...object3} />;
}
function EmptyGuildList() { // fn#81097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:474, offset: 0x01e99b05, size: 203 bytes, params: 1, frame: 20
const styles = useStyles();
const ThemedEmptyState = (require(1305) /* metro dependency 1305: native */).ThemedEmptyState;
const themedEmptyStateProps = {containerStyle: styles.emptyStateContainer};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
themedEmptyStateProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['2bfiLk']]);
string = intl.string;
const V6nAfF = (require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF;
themedEmptyStateProps.body = Reflect.apply(string, intl, [V6nAfF]);
themedEmptyStateProps.darkSource = importDefault(10479) /* metro dependency 10479 */;
themedEmptyStateProps.lightSource = importDefault(10480) /* metro dependency 10480 */;
return <ThemedEmptyState {...themedEmptyStateProps} />;
}
function EmptyGuildList() { // fn#81097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:474, offset: 0x01e99b05, size: 203 bytes, params: 1, frame: 20
const styles = useStyles();
const ThemedEmptyState = (NativeModule).ThemedEmptyState;
const themedEmptyStateProps = {containerStyle: styles.emptyStateContainer};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
themedEmptyStateProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['2bfiLk']]);
string = intl.string;
const V6nAfF = (require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF;
themedEmptyStateProps.body = Reflect.apply(string, intl, [V6nAfF]);
themedEmptyStateProps.darkSource = importDefault(10479) /* metro dependency 10479 */;
themedEmptyStateProps.lightSource = importDefault(10480) /* metro dependency 10480 */;
return <ThemedEmptyState {...themedEmptyStateProps} />;
}
function _default_81098({recipientId, source}) { // fn#81098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1543, offset: 0x01e99bd0, size: 525 bytes, params: 2, frame: 30
const styles = useStyles();
const [property, env0_0] = env0_3(env0_4.useState(''), 2);
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HvoZQD = (require(1244) /* metro dependency 1244: indexNative */).t.HvoZQD;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [HvoZQD])} />;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const searchField = <SearchField onChange={onChange_81099} placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uohsSv)} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const format = intl.format;
const property2 = (require(1244) /* metro dependency 1244: indexNative */).t['4UyUHh'];
const INVITE_OPTIONS_7_DAYS = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).INVITE_OPTIONS_7_DAYS;
return (
<BottomSheet
scrollable
startExpanded
header={bottomSheetTitleHeader}
contentStyles={styles.content}
>
<View style={styles.searchbarWrapper}>
{searchField}
<Text variant="text-xs/medium" color="text-subtle">
{Reflect.apply(format, intl, [property2, {xDays: INVITE_OPTIONS_7_DAYS.label}])}
</Text>
</View>
<GuildList
query={property}
recipientId={recipientId}
source={source}
function _default_81098({recipientId, source}) { // fn#81098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1543, offset: 0x01e99bd0, size: 525 bytes, params: 2, frame: 30
const styles = useStyles();
const [property, env0_0] = Module00057(ReactModule.useState(''), 2);
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const HvoZQD = (IndexNativeModule).t.HvoZQD;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [HvoZQD])} />;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const SearchField = (SearchFieldNativeModule).SearchField;
const searchField = (
<SearchField
onChange={onChange_81099}
placeholder={intl.string((IndexNativeModule).t.uohsSv)}
/>
</BottomSheet>
);
}
function GuildListRenderItem({item, start, end}) { // fn#81094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1081, owner: GuildList.renderItem, offset: 0x01e99a2d, size: 90 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component row={item} recipientId={recipientId} source={source} start={start} end={end} />)(importDefault(10481) /* metro dependency 10481: GuildInviteRow */);
}
function GuildListRenderSectionHeader({section}) { // fn#81095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1280, owner: GuildList.renderSectionHeader, offset: 0x01e99a87, size: 126 bytes, params: 2, frame: 17
if (env0_3) {
return null;
} else if (section.data.length > 0) {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.sectionTitle}
variant="text-sm/semibold"
color="text-default"
>
{section.title}
</Text>
);
} else {
return null;
const Text = (TextModule).Text;
const format = intl.format;
const property2 = (IndexNativeModule).t['4UyUHh'];
const INVITE_OPTIONS_7_DAYS = (InstantInviteUtils).INVITE_OPTIONS_7_DAYS;
return (
<BottomSheet
scrollable
startExpanded
header={bottomSheetTitleHeader}
contentStyles={styles.content}
>
<View style={styles.searchbarWrapper}>
{searchField}
<Text variant="text-xs/medium" color="text-subtle">
{Reflect.apply(format, intl, [property2, {xDays: INVITE_OPTIONS_7_DAYS.label}])}
</Text>
</View>
<GuildList
query={property}
recipientId={recipientId}
source={source}
/>
</BottomSheet>
);
function _default_81098OnChange(a0) { // fn#81099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10664:1883, owner: _default_81098.onChange, offset: 0x00cee816, size: 19 bytes, params: 2, frame: 11
env0_0(a0);
}
}
}
global.__d(_fun81092, 10478, [57, 31, 27, 33, 4501, 697, 1305, 1244, 10479, 10480, 10476, 4573, 5463, 8694, 10481,
6758, 6275, 6984, 9153,
2]) /* metro module 10478, dependencies: [57, 31, 27, 33, 4501, 697, 1305, 1244, 10479, 10480, 10476, 4573, 5463, 8694, 10481, 6758, 6275, 6984, 9153, 2] */;
@@ -1,54 +1,71 @@
/* Metro module 10481; source: modules/instant_invite/native/action_sheet/invite_to_guilds/GuildInviteRow.tsx; dependencies: [31, 27, 10477, 4118, 33, 10476, 9211, 6819, 4573, 1244, 6238, 2] */
import GuildIcon from '../../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import InviteButton from '../../components/InviteButton.tsx'; /* Metro dependency 9211 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 4118 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as GuildIconModule from '../../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as GuildInviteSendStateStoreModule from '../../../GuildInviteSendStateStore.tsx'; /* Metro dependency 10477 */
function _fun81102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10667:6, offset: 0x01e99e67, size: 213 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(10477) /* metro dependency 10477: GuildInviteSendStateStore */).useGuildInviteSendStates;
const env0_5 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun81103);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/action_sheet/invite_to_guilds/GuildInviteRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/action_sheet/invite_to_guilds/GuildInviteRow.tsx');
exports.default = value;
function _fun81103({row, recipientId, source, start, end}) { // fn#81103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10667:207, offset: 0x01e99f3c, size: 422 bytes, params: 2, frame: 27
const guild = row.guild;
const value2 = useGuildInviteSendStates(function(a0) {
return a0[recipientId]?.[guild.id];
});
const onPressSend2 = onPressSend;
const value3 = ((Component) => <Component sendState={value2} onPressSend={onPressSend2} />)(InviteButton);
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const SMALL = GuildIconSizes.SMALL;
const view = (
<View importantForAccessibility="no-hide-descendants" accessibilityElementsHidden>
<GuildIcon guild={guild} size={SMALL} />
</View>
);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const text = (
<Text variant="text-xs/medium" color="text-default">
{intl.format((IndexNativeModule).t.zRl6XR, {count: row.memberCount})}
</Text>
);
const SENDING = InviteSendStates.SENDING;
const r7 = value2 === SENDING || value2 === InviteSendStates.SENT;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
icon={view}
label={guild.name}
trailing={value3}
subLabel={text}
onPress={onPressSend2}
disabled={r7}
accessibilityState={{disabled: r7}}
start={start}
end={end}
/>
);
function onPress_81105() { // fn#81105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10667:337, offset: 0x01e9a10a, size: 60 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(10476) /* metro dependency 10476: GuildInviteUtils */;
value.sendGuildInvite(recipientId, guild.id, source);
}
}
}
function _fun81103({row, recipientId, source, start, end}) { // fn#81103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10667:207, offset: 0x01e99f3c, size: 422 bytes, params: 2, frame: 27
const guild = row.guild;
const value2 = useGuildInviteSendStates(function(a0) {
return a0[recipientId]?.[guild.id];
});
const closure = onPressSend;
const value3 = ((Component) => <Component sendState={value2} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */);
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const SMALL = GuildIconSizes.SMALL;
const view = <View importantForAccessibility="no-hide-descendants" accessibilityElementsHidden><GuildIcon guild={guild} size={SMALL} /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="text-xs/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zRl6XR,
{count: row.memberCount})}</Text>;
const SENDING = InviteSendStates.SENDING;
const r7 = value2 === SENDING || value2 === InviteSendStates.SENT;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={view}
label={guild.name}
trailing={value3}
subLabel={text}
onPress={closure}
disabled={r7}
accessibilityState={{disabled: r7}}
start={start}
end={end}
/>
);
}
function onPress_81105() { // fn#81105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10667:337, offset: 0x01e9a10a, size: 60 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(10476) /* metro dependency 10476: GuildInviteUtils */;
value.sendGuildInvite(recipientId, guild.id, source);
}
global.__d(_fun81102, 10481, [31, 27, 10477, 4118, 33, 10476, 9211, 6819, 4573, 1244, 6238,
2]) /* metro module 10481, dependencies: [31, 27, 10477, 4118, 33, 10476, 9211, 6819, 4573, 1244, 6238, 2] */;
@@ -1,127 +1,169 @@
/* Metro module 16136; source: modules/instant_invite/native/action_sheet/invite_to_guilds/SelectInviteRolesActionSheet.tsx; dependencies: [57, 31, 27, 4502, 33, 4501, 566, 7699, 7705, 4080, 22, 7972, 1305, 4573, 5278, 1244, 6758, 6805, 8671, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import AccessibilityStore from '../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseFastestListTableRowPlaceholderConfigNative from '../../../../fastest_list/placeholders/useFastestListTableRowPlaceholderConfig.native.tsx'; /* Metro dependency 7699 */
import UseScaledRowHeight from '../../../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import FastestListAndroid from '../../../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
function _fun124589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:6, offset: 0x025be711, size: 286 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = value.Fragment;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({list: {flex: 1},
const env0_10 = (CreateStylesModule).createStyles({list: {flex: 1},
label: {'flexDirection': 'row', 'alignItems': 'center'}, roleDot: {marginEnd: 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/action_sheet/invite_to_guilds/SelectInviteRolesActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/action_sheet/invite_to_guilds/SelectInviteRolesActionSheet.tsx');
exports.default = SelectInviteRolesActionSheet;
}
function SelectInviteRolesActionSheet({assignableRoles, selectedRoleIds, onSave}) { // fn#124590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:428, offset: 0x025be82f, size: 687 bytes, params: 2, frame: 27
const styles = useStyles();
const styles2 = styles;
const value2 = ReactModule.useMemo(function() {
var Set = global.Set;
var value4 = new Set(assignableRoles.map(_fun124592));
return selectedRoleIds.filter(_fun124593);
}, [assignableRoles, selectedRoleIds]);
const [property, env0_6] = styles2(ReactModule.useState(_fun124594), 2);
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const value5 = (UseFastestListTableRowPlaceholderConfigNative)();
const value6 = (UseScaledRowHeight)();
const value7 = ReactModule.useCallback(_fun124596, []);
const value8 = ReactModule.useCallback(_fun124598, [onSave, property, value2]);
const value9 = ReactModule.useCallback(_fun124599, [assignableRoles, roleStyle, property, styles, value7]);
const PressableOpacity = (PressablesModule).PressableOpacity;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = (
<PressableOpacity onPress={value8} accessibilityRole="button">
<Text variant="text-md/semibold">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
</Text>
</PressableOpacity>
);
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
value = (
<BottomSheetTitleHeader
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])}
trailing={value}
/>
);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
return (
<ActionSheet
scrollable
header={value}
startExpanded
>
{((Component) => <Component inActionSheet style={styles.list} itemSize={value6} sections={[assignableRoles.length]} renderItem={value9} placeholderConfig={value5} estimatedListSize="windowSize" listId="select-invite-roles" wrapChildren />)(FastestListAndroid)}
</ActionSheet>
);
function _fun124591() { // fn#124591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:537, offset: 0x025beade, size: 81 bytes, params: 1, frame: 14
const Set = global.Set;
const set = new Set(assignableRoles.map(function(a0) {
return a0.id;
}));
return selectedRoleIds.filter(_fun124593);
function _fun124593(a0) { // fn#124593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:591, offset: 0x00e4010b, size: 22 bytes, params: 2, frame: 11
return env0_0.has(a0);
}
function SelectInviteRolesActionSheet({assignableRoles, selectedRoleIds, onSave}) { // fn#124590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:428, offset: 0x025be82f, size: 687 bytes, params: 2, frame: 27
const styles = useStyles();
const env0_3 = styles;
const binding = env0_4;
const value2 = binding.useMemo(function() {
var Set = global.Set;
var value4 = new Set(assignableRoles.map(_fun124592));
return selectedRoleIds.filter(_fun124593);
}, [assignableRoles, selectedRoleIds]);
const [property, env0_6] = env0_3(binding.useState(_fun124594), 2);
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const value5 = (importDefault(7699) /* metro dependency 7699: useFastestListTableRowPlaceholderConfigNative */)();
const value6 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value7 = binding.useCallback(_fun124596, []);
const value8 = binding.useCallback(_fun124598, [onSave, property, value2]);
const value9 = binding.useCallback(_fun124599, [assignableRoles, roleStyle, property, styles, value7]);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let value = <PressableOpacity onPress={value8} accessibilityRole="button"><Text variant="text-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}</Text></PressableOpacity>;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
value = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])} trailing={value} />;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
return (
<ActionSheet
scrollable
header={value}
startExpanded
>
{((Component) => <Component inActionSheet style={styles.list} itemSize={value6} sections={[assignableRoles.length]} renderItem={value9} placeholderConfig={value5} estimatedListSize="windowSize" listId="select-invite-roles" wrapChildren />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */)}
</ActionSheet>
);
}
}
function _fun124591() { // fn#124591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:537, offset: 0x025beade, size: 81 bytes, params: 1, frame: 14
const Set = global.Set;
const set = new Set(assignableRoles.map(function(a0) {
return a0.id;
}));
return selectedRoleIds.filter(_fun124593);
}
function _fun124594() { // fn#124594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:628, offset: 0x025beb2f, size: 37 bytes, params: 1, frame: 11
const Set = global.Set;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(ReactModule);
return set instanceof Object ? set : value;
}
function _fun124594() { // fn#124594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:628, offset: 0x025beb2f, size: 37 bytes, params: 1, frame: 11
const Set = global.Set;
const binding = env0_4;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(binding);
return set instanceof Object ? set : value;
}
function _fun124596(a0) { // fn#124596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:761, offset: 0x025beb54, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_6(_fun124597);
function _fun124597(a0) { // fn#124597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:768, offset: 0x025beb74, size: 67 bytes, params: 2, frame: 12
const Set = global.Set;
const set = new Set(a0);
if (!set.delete(env0_0)) {
set.add(env0_0);
}
return set;
}
function _fun124596(a0) { // fn#124596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:761, offset: 0x025beb54, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_6(_fun124597);
}
}
function _fun124598() { // fn#124598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:846, offset: 0x025bebb7, size: 142 bytes, params: 1, frame: 18
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
const Array = global.Array;
const value3 = Array.from(ReactNativeModule.View);
const value4 = value3.sort();
value = require(22) /* metro dependency 22 */;
const isEqual = value.isEqual;
const items2 = [];
arraySpread(items2, ReactModule, 0, undefined);
if (!Reflect.apply(isEqual, value, [value4, items2.sort()])) {
onSave(value4);
}
}
function _fun124599(a0, a1) { // fn#124599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:973, offset: 0x025bec45, size: 494 bytes, params: 3, frame: 31
const assignableRolesBinding = assignableRoles;
const property = assignableRolesBinding[a1];
const value2 = a1 === assignableRolesBinding.length - 1;
const jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
const value4 = undefined;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const object2 = {};
const r16 = roleStyle === 'dot' && property.colorString != null && ((RoleDot) => <RoleDot containerStyles={styles.roleDot} color={property.colorString} colors={property.colorStrings} background={false} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (TextModule).Text;
object2.label = (
<View style={styles.label}>
{r16}
<Text
variant="text-md/medium"
style={property.colorString != null ? roleStyle !== 'username' ? value4 : {color: property.colorString} : value4}
>
{property.name}
</Text>
</View>
);
object2.onPress = onPress_124600;
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Checkbox = FormRow2.Checkbox;
object2.trailing = <Checkbox selected={ReactNativeModule.View.has(property.id)} />;
const items2 = [
<FormRow {...object2} />,
];
items2[1] = !value2 && ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider);
return (
<>
{items2}
</>
);
function onPress_124600() { // fn#124600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:1364, offset: 0x01e211c6, size: 28 bytes, params: 1, frame: 11
return env1_8(env0_0.id);
}
}
function _fun124598() { // fn#124598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:846, offset: 0x025bebb7, size: 142 bytes, params: 1, frame: 18
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
const Array = global.Array;
const value3 = Array.from(env0_5);
const value4 = value3.sort();
value = require(22) /* metro dependency 22 */;
const isEqual = value.isEqual;
const binding = env0_4;
const items2 = [];
arraySpread(items2, binding, 0, undefined);
if (!Reflect.apply(isEqual, value, [value4, items2.sort()])) {
onSave(value4);
}
}
function _fun124599(a0, a1) { // fn#124599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:973, offset: 0x025bec45, size: 494 bytes, params: 3, frame: 31
const assignableRolesBinding = assignableRoles;
const property = assignableRolesBinding[a1];
const value2 = a1 === assignableRolesBinding.length - 1;
const jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
const value4 = undefined;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const object = {};
const r16 = roleStyle === 'dot' && property.colorString != null && ((RoleDot) => <RoleDot containerStyles={styles.roleDot} color={property.colorString} colors={property.colorStrings} background={false} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
object.label = <View style={styles.label}>{r16}<Text variant="text-md/medium" style={property.colorString != null ? roleStyle !== 'username' ? value4 : {color: property.colorString} : value4}>{property.name}</Text></View>;
object.onPress = onPress_124600;
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Checkbox = FormRow2.Checkbox;
const binding = env0_5;
object.trailing = <Checkbox selected={binding.has(property.id)} />;
const items2 = [<FormRow {...object} />];
items2[1] = !value2 && ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider);
return (
<>
{items2}
</>
);
}
function _fun124597(a0) { // fn#124597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:768, offset: 0x025beb74, size: 67 bytes, params: 2, frame: 12
const Set = global.Set;
const set = new Set(a0);
if (!set.delete(env0_0)) {
set.add(env0_0);
}
return set;
function _fun124592(a0) { // fn#124592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16344:563, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
global.__d(_fun124589, 16136, [57, 31, 27, 4502, 33, 4501, 566, 7699, 7705, 4080, 22, 7972, 1305, 4573, 5278, 1244,
6758, 6805, 8671,
2]) /* metro module 16136, dependencies: [57, 31, 27, 4502, 33, 4501, 566, 7699, 7705, 4080, 22, 7972, 1305, 4573, 5278, 1244, 6758, 6805, 8671, 2] */;
@@ -1,175 +1,207 @@
/* Metro module 12131; source: modules/instant_invite/native/components/GroupDMInviteManagementScreen.tsx; dependencies: [5, 57, 31, 27, 8150, 8149, 661, 33, 4501, 4594, 507, 22, 697, 12132, 5460, 1305, 12146, 12147, 1244, 5282, 480, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import InviteRecord from '../../../../records/InviteRecord.tsx'; /* Metro dependency 8150 */
import InstantInvite from '../../../guild_instant_invites/native/InstantInvite.tsx'; /* Metro dependency 12132 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as ChannelSettingsStoreModule from '../../../../stores/ChannelSettingsStore.tsx'; /* Metro dependency 8149 */
function _fun93130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:6, offset: 0x020a82a2, size: 332 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
value2.Platform;
const env0_6 = value2.View;
const env0_7 = value2.FlatList;
const inviteRecord = importDefault(8150) /* metro dependency 8150: InviteRecord */;
require(8149) /* metro dependency 8149: ChannelSettingsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.ChannelSettingsSections;
const env0_10 = constantsModule.Endpoints;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({list: {paddingTop: 8}});
let value = ReactModule;
ReactNativeModule.Platform;
ChannelSettingsStoreModule;
const env0_12 = (CreateStylesModule).createStyles({list: {paddingTop: 8}});
value = value.memo(_fun93146);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/GroupDMInviteManagementScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/GroupDMInviteManagementScreen.tsx');
exports.default = value;
}
function GroupDMInviteManagement({channelId}) { // fn#93131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:305, offset: 0x020a83ee, size: 590 bytes, params: 2, frame: 23
var r0;
var EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
let binding = env0_5;
const [property, env0_2] = env0_4Binding(binding.useState([]), 2);
const [property2, env0_3] = env0_4Binding(env0_5.useState(true), 2);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
_fun93133()().catch(_fun93138);
});
var [property3, env0_4] = env0_4Binding(env0_5.useState(21), 2);
binding = env0_5;
const useMemo = binding.useMemo;
const items = [property];
const value8 = Reflect.apply(useMemo, binding, [_fun93139, items]);
env0_5.useEffect(_fun93141, []);
binding = env0_5;
let useCallback = binding.useCallback;
const value9 = Reflect.apply(useCallback, binding, [function(a0) {
return a0.code;
}, []]);
binding = env0_5;
useCallback = binding.useCallback;
if (property2) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r0 = <SceneLoadingIndicator />;
} else if (property.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = <EmptyState lightSource={importDefault(12146) /* metro dependency 12146 */} darkSource={importDefault(12147) /* metro dependency 12147 */} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
} else {
r0 = <FlatList style={styles.list} data={value8} keyExtractor={value9} renderItem={Reflect.apply(useCallback,
binding, [_fun93143, [property]])} initialNumToRender={10} windowSize={property3} />;
}
return r0;
}
function _fun93146({channelId, onClose}) { // fn#93146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1534, offset: 0x020a88cc, size: 123 bytes, params: 2, frame: 16
const value2 = env0_5.useMemo(function() {
return _fun93148(channelId, onClose);
}, [channelId, onClose]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
return <Navigator screens={value2} initialRouteName={INSTANT_INVITES_MANAGEMENT} />;
}
function _fun93132() { // fn#93132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:452, offset: 0x020a863c, size: 39 bytes, params: 1, frame: 12
_fun93133()().catch(_fun93138);
}
function _fun93139() { // fn#93139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:841, offset: 0x020a8785, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.sortBy(env0_1, function({inviter}) {
return (inviter == null || inviter.username == null ? undefined : inviter.username.toLowerCase()) ?? '';
});
}
function _fun93141() { // fn#93141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:985, offset: 0x020a87f9, size: 19 bytes, params: 1, frame: 11
env0_4(21);
}
function _fun93143({item}) { // fn#93143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1055, offset: 0x020a880c, size: 120 bytes, params: 2, frame: 19
var environment;
const value = environment.__proto__;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
return (
<View style={{marginHorizontal: PX_12}}>
{((Component) => <Component invite={item} onInviteRevoked={onInviteRevoked} />)(importDefault(12132) /* metro dependency 12132: InstantInvite */)}
</View>
);
}
function _fun93147() { // fn#93147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1585, offset: 0x020a8947, size: 30 bytes, params: 1, frame: 13
return getScreens_93148(channelId, onClose);
}
function _fun93133() { // fn#93133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:463, offset: 0x020a8663, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun93135);
return _fun93137;
}
function onInviteRevoked(a0) { // fn#93144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1164, offset: 0x020a8884, size: 46 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_2(env1_1.filter(_fun93145));
}
function getScreens_93148(a0, a1) { // fn#93148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1589, offset: 0x020a8965, size: 166 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OQ9MKu = (require(1244) /* metro dependency 1244: indexNative */).t.OQ9MKu;
object.title = Reflect.apply(string, intl, [OQ9MKu]);
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
object.render = render_93149;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GDM_SETTINGS_INVITES = ImpressionNames.GDM_SETTINGS_INVITES;
object.impressionName = GDM_SETTINGS_INVITES;
return {[INSTANT_INVITES_MANAGEMENT]: object};
}
function* _fun93135() { // fn#93135, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:483, offset: 0x020a8692, size: 151 bytes, params: 1, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_0;
var HTTP = binding(env4_2[10]).HTTP;
var get = HTTP.get;
binding = env4_10;
var INSTANT_INVITES = binding.INSTANT_INVITES;
value = environment.__proto__.__proto__.__proto__;
yield Reflect.apply(get, HTTP, [{'url': null, 'retries': 3, 'oldFormErrors': true, 'rejectWithError': true,
url: Reflect.apply(INSTANT_INVITES, binding, [require])}]);
var value3 = undefined;
if (false) {
return value3;
function GroupDMInviteManagement({channelId}) { // fn#93131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:305, offset: 0x020a83ee, size: 590 bytes, params: 2, frame: 23
var r0;
var EmptyState;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const styles = useStyles();
let binding = env0_5;
const [property, env0_2] = env0_4Binding(binding.useState([]), 2);
const [property2, env0_3] = env0_4Binding(env0_5.useState(true), 2);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
_fun93133()().catch(_fun93138);
});
var [property3, env0_4] = env0_4Binding(env0_5.useState(21), 2);
binding = env0_5;
const useMemo = binding.useMemo;
const items = [property];
const value8 = Reflect.apply(useMemo, binding, [_fun93139, items]);
env0_5.useEffect(_fun93141, []);
binding = env0_5;
let useCallback = binding.useCallback;
const value9 = Reflect.apply(useCallback, binding, [function(a0) {
return a0.code;
}, []]);
binding = env0_5;
useCallback = binding.useCallback;
if (property2) {
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
r0 = <SceneLoadingIndicator />;
} else if (property.length === 0) {
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = (
<EmptyState
lightSource={importDefault(12146) /* metro dependency 12146 */}
darkSource={importDefault(12147) /* metro dependency 12147 */}
title={intl.string(t['+nLJkZ'])}
body={intl.string(t.F53CAc)}
/>
);
} else {
r0 = (
<FlatList
style={styles.list}
data={value8}
keyExtractor={value9}
renderItem={Reflect.apply(useCallback, binding, [_fun93143, [property]])}
initialNumToRender={10}
windowSize={property3}
/>
);
}
dependencyMap(value3.body.map(_fun93136));
env3_3(false);
return r0;
function _fun93132() { // fn#93132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:452, offset: 0x020a863c, size: 39 bytes, params: 1, frame: 12
_fun93133()().catch(_fun93138);
function _fun93133() { // fn#93133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:463, offset: 0x020a8663, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun93135);
return _fun93137;
function* _fun93135() { // fn#93135, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:483, offset: 0x020a8692, size: 151 bytes, params: 1, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_0;
var HTTP = binding(env4_2[10]).HTTP;
var get = HTTP.get;
binding = env4_10;
var INSTANT_INVITES = binding.INSTANT_INVITES;
value = environment.__proto__.__proto__.__proto__;
yield Reflect.apply(get, HTTP, [{'url': null, 'retries': 3, 'oldFormErrors': true, 'rejectWithError': true,
url: Reflect.apply(INSTANT_INVITES, binding, [require])}]);
var value3 = undefined;
if (false) {
return value3;
}
dependencyMap(value3.body.map(_fun93136));
env3_3(false);
}
function _fun93136(a0) { // fn#93136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:611, offset: 0x020a8729, size: 92 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
const binding = env5_8;
const object = {};
copyDataProperties(object, a0, undefined);
object['maxUses'] = a0.max_uses;
object['maxAge'] = a0.max_age;
object['createdAt'] = a0.created_at;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(object);
return binding2 instanceof Object ? binding2 : value;
}
}
function _fun93137() { // fn#93137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:710, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun93138() { // fn#93138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:767, offset: 0x010c96cc, size: 18 bytes, params: 1, frame: 11
env1_3(false);
}
}
function _fun93139() { // fn#93139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:841, offset: 0x020a8785, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.sortBy(env0_1, function({inviter}) {
return (inviter == null || inviter.username == null ? undefined : inviter.username.toLowerCase()) ?? '';
});
}
function _fun93141() { // fn#93141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:985, offset: 0x020a87f9, size: 19 bytes, params: 1, frame: 11
env0_4(21);
}
function _fun93143({item}) { // fn#93143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1055, offset: 0x020a880c, size: 120 bytes, params: 2, frame: 19
var environment;
const value = environment.__proto__;
const PX_12 = (Native).space.PX_12;
return (
<View style={{marginHorizontal: PX_12}}>
{((Component) => <Component invite={item} onInviteRevoked={onInviteRevoked} />)(InstantInvite)}
</View>
);
function onInviteRevoked(a0) { // fn#93144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1164, offset: 0x020a8884, size: 46 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_2(env1_1.filter(_fun93145));
function _fun93145({code}) { // fn#93145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1179, offset: 0x020a88b2, size: 26 bytes, params: 2, frame: 2
return code !== env0_0.code;
}
}
}
}
function _fun93146({channelId, onClose}) { // fn#93146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1534, offset: 0x020a88cc, size: 123 bytes, params: 2, frame: 16
const value2 = env0_5.useMemo(function() {
return _fun93148(channelId, onClose);
}, [channelId, onClose]);
const Navigator = (NavigatorNativeModule).Navigator;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
return <Navigator screens={value2} initialRouteName={INSTANT_INVITES_MANAGEMENT} />;
function _fun93147() { // fn#93147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1585, offset: 0x020a8947, size: 30 bytes, params: 1, frame: 13
return getScreens_93148(channelId, onClose);
function getScreens_93148(a0, a1) { // fn#93148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1589, offset: 0x020a8965, size: 166 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
const INSTANT_INVITES_MANAGEMENT = ChannelSettingsSections.INSTANT_INVITES_MANAGEMENT;
const object2 = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const OQ9MKu = (IndexNativeModule).t.OQ9MKu;
object2.title = Reflect.apply(string, intl, [OQ9MKu]);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1);
object2.render = render_93149;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GDM_SETTINGS_INVITES = ImpressionNames.GDM_SETTINGS_INVITES;
object2.impressionName = GDM_SETTINGS_INVITES;
return {[INSTANT_INVITES_MANAGEMENT]: object2};
function getScreens_93148Render() { // fn#93149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1750, owner: getScreens_93148.render, offset: 0x020a8a0b, size: 34 bytes, params: 1, frame: 13
return <GroupDMInviteManagement channelId={env0_0} />;
}
}
}
}
}
function _fun93145({code}) { // fn#93145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1179, offset: 0x020a88b2, size: 26 bytes, params: 2, frame: 2
return code !== env0_0.code;
}
function getScreens_93148Render() { // fn#93149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:1750, owner: getScreens_93148.render, offset: 0x020a8a0b, size: 34 bytes, params: 1, frame: 13
return <GroupDMInviteManagement channelId={env0_0} />;
}
function _fun93136(a0) { // fn#93136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12317:611, offset: 0x020a8729, size: 92 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
const binding = env5_8;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['maxUses'] = a0.max_uses;
object2['maxAge'] = a0.max_age;
object2['createdAt'] = a0.created_at;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(object2);
return binding2 instanceof Object ? binding2 : value;
}
global.__d(_fun93130, 12131, [5, 57, 31, 27, 8150, 8149, 661, 33, 4501, 4594, 507, 22, 697, 12132, 5460, 1305,
12146, 12147, 1244, 5282, 480, 5280,
2]) /* metro module 12131, dependencies: [5, 57, 31, 27, 8150, 8149, 661, 33, 4501, 4594, 507, 22, 697, 12132, 5460, 1305, 12146, 12147, 1244, 5282, 480, 5280, 2] */;
@@ -1,269 +1,335 @@
/* Metro module 9160; source: modules/instant_invite/native/components/InstantInviteActionSheet.tsx; dependencies: [57, 31, 27, 1384, 9152, 1867, 3784, 4118, 661, 33, 4501, 697, 9161, 1585, 6771, 6789, 6777, 566, 4098, 7147, 9151, 4080, 8743, 6927, 1314, 9162, 6275, 6758, 1244, 1305, 9165, 9169, 9171, 6984, 9164, 9205, 9206, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import StageInstanceStore from '../../../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ShowUserProfileActionSheet from '../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import UseInviteSuggestionRows from '../useInviteSuggestionRows.tsx'; /* Metro dependency 9162 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as Preloaded_user_settingsModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */
import * as ConstantsModule2 from '../../Constants.tsx'; /* Metro dependency 4118 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
function _fun71823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:6, offset: 0x01d2e082, size: 714 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
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_11 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
const env0_12 = (require(661) /* metro dependency 661: Constants */).Permissions;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object7 = {'height': 16, 'width': '80%', 'margin': 16, 'marginBottom': 8};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object = {};
const object2 = {'height': 16, 'width': '80%', 'margin': 16, 'marginBottom': 8};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object7.backgroundColor = BACKGROUND_MOD_MUTED;
object4.placeholderHeader = object7;
const object8 = {'height': 16, 'width': '40%', 'margin': 16};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.backgroundColor = BACKGROUND_MOD_MUTED;
object.placeholderHeader = object2;
const object3 = {'height': 16, 'width': '40%', 'margin': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object8.backgroundColor = BACKGROUND_MOD_MUTED;
object4.placeholderLabel = object8;
object4.errorEmptyState = {backgroundColor: 'transparent'};
const object9 = {borderTopWidth: 1};
object3.backgroundColor = BACKGROUND_MOD_MUTED;
object.placeholderLabel = object3;
object.errorEmptyState = {backgroundColor: 'transparent'};
const object5 = {borderTopWidth: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object9.borderColor = BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.marginTop = PX_8;
object5.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object9.paddingVertical = PX_8;
object5.paddingVertical = PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.paddingHorizontal = PX_12;
object9.flexDirection = 'column';
object5.paddingHorizontal = PX_12;
object5.flexDirection = 'column';
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.gap = PX_12;
object4.searchAndShareContainer = object9;
const object10 = {};
object5.gap = PX_12;
object.searchAndShareContainer = object5;
const object6 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.paddingBottom = PX_8;
object6.paddingBottom = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object10.paddingHorizontal = PX_4;
object4.inviteAgeText = object10;
object4.shareApps = {paddingVertical: 0};
const env0_16 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteActionSheet.tsx');
object6.paddingHorizontal = PX_4;
object.inviteAgeText = object6;
object.shareApps = {paddingVertical: 0};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteActionSheet.tsx');
exports.default = InstantInviteActionSheet;
}
function Loading() { // fn#71824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1014, offset: 0x01d2e34c, size: 167 bytes, params: 1, frame: 22
var push;
var jsxRuntimeEnv0_13Binding;
var UserPlaceholderRow;
var value3;
const styles = useStyles();
const items2 = [];
let r2 = 0;
reducibleLoop1: while (true) {
push = items2.push;
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
UserPlaceholderRow = importDefault(9161) /* metro dependency 9161: UserPlaceholderRow */;
Reflect.apply(push, items2, [<UserPlaceholderRow row={r2} key={r2} />]);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value3 < 10) {
r2 = value3;
continue reducibleLoop1;
function Loading() { // fn#71824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1014, offset: 0x01d2e34c, size: 167 bytes, params: 1, frame: 22
var push;
var jsxRuntimeEnv0_13Binding;
var UserPlaceholderRow;
var value3;
const styles = useStyles();
const items2 = [];
let r2 = 0;
reducibleLoop1: while (true) {
push = items2.push;
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
UserPlaceholderRow = importDefault(9161) /* metro dependency 9161: UserPlaceholderRow */;
Reflect.apply(push, items2, [<UserPlaceholderRow row={r2} key={r2} />]);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value3 < 10) {
r2 = value3;
continue reducibleLoop1;
}
break reducibleLoop1;
}
break reducibleLoop1;
return (
<>
<View style={styles.placeholderHeader} />
<View style={styles.placeholderLabel} />
{items2}
</>
);
}
return (
<>
<View style={styles.placeholderHeader} />
<View style={styles.placeholderLabel} />
{items2}
</>
);
}
function InstantInviteActionSheet({channel, source, vanityURLCode, guildScheduledEventId, targetApplicationId, code}) { // fn#71825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1194, offset: 0x01d2e3f3, size: 1815 bytes, params: 2, frame: 55
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_14Binding;
var items3;
var SearchField;
var items2;
const env0_4 = code;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const INSTANT_INVITE_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INSTANT_INVITE_MODAL;
const analyticsLocations = defaultImport(INSTANT_INVITE_MODAL).analyticsLocations;
const property = guildScheduledEventId((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(targetApplicationId != null ? [targetApplicationId] : []),
1)[0];
const invite_code = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore,
CreateInviteModalStore, StageInstanceStore], _fun71826);
const error = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getError();
});
const r20 = invite_code != null ? (importDefault(7147) /* metro dependency 7147: getInviteURL */)(invite_code) : null;
let r7 = r20 != null ? (require(9151) /* metro dependency 9151: InstantInviteUtils */).getShareMessage(r20) : '';
const EMBEDDED_APPLICATION = targetApplicationId != null ? InviteTargetTypes.EMBEDDED_APPLICATION : null;
let binding = env0_4;
const value9 = binding.useCallback(_fun71828, [channel, analyticsLocations]);
const value10 = binding.useCallback(_fun71829, [channel, invite_code, r7, source]);
const value11 = binding.useCallback(_fun71830, [channel]);
const value12 = binding.useCallback(_fun71831, [invite_code, channel, source]);
const value13 = binding.useCallback(_fun71832, [invite_code, channel, r7, source]);
const value14 = binding.useCallback(_fun71833, [channel]);
const {rows, isFetchingRows} = (importDefault(9162) /* metro dependency 9162: useInviteSuggestionRows */)(channel,
source, EMBEDDED_APPLICATION, targetApplicationId);
const r9 = invite_code == null || rows.length === 0 && isFetchingRows;
binding = env0_4;
const useState = binding.useState;
const property2 = guildScheduledEventId(Reflect.apply(useState, binding,
[invite_code != null && rows.length === 0 && !isFetchingRows]), 1)[0];
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object = {'showGradient': null, 'scrollable': true, 'startExpanded': true};
let r10 = error != null || !r9;
r10 = !r10 ? !property2 : r10;
object.showGradient = r10;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object.header = <BottomSheetTitleHeader title={targetApplicationId != null ? property != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZdK3dW,
{applicationName: property.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OzOM/q']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['f1+QIK'])} />;
if (error != null) {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r7 = <EmptyState style={styles.errorEmptyState} Illustration={(require(9165) /* metro dependency 9165: AppCrash */).AppCrash} title={error} />;
} else if (r9) {
r7 = <Loading />;
} else if (property2) {
r7 = <ScrollView contentContainerStyle={{paddingBottom: bottom + 16}}>{((Component) => <Component link={r20} onCopy={value12} onShare={value13} onPressSettings={value14} />)(importDefault(9169) /* metro dependency 9169: InstantInviteEmptyState */)}</ScrollView>;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [((Component) => <Component contentContainerStyle={styles.shareApps} onItemPressed={value10} />)(importDefault(9171) /* metro dependency 9171: InstantInviteShareApps */)];
var viewBinding2Props = {style: styles.searchAndShareContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2 = [<SearchField size="md" isRound onChange={(require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */).searchInviteSuggestions} placeholder={targetApplicationId != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iI1gMg) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1UgGdm'],
{groupname: GuildStore.getGuild(channel.guild_id)?.name})} />];
items2[1] = !(vanityURLCode != null) && ((Component) => <Component style={styles.inviteAgeText} channel={channel} canEditInvite={code == null} />)(importDefault(9205) /* metro dependency 9205: InstantInviteAgeText */);
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
r7 = <><View>{items3}</View>{((Component) => <Component data={rows} code={invite_code} source={source ?? undefined} onPressAvatar={value9} onInviteSent={value11} />)(importDefault(9206) /* metro dependency 9206: InstantInviteFriendsList */)}</>;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...object}>
{r7}
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function _fun71826() { // fn#71826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1494, offset: 0x01d2eb0a, size: 306 bytes, params: 1, frame: 18
var r1;
var value2;
var value3;
var value5;
var invite;
if (code != null) {
return code;
}
const channelBinding = channel;
if (channelBinding.isGuildStageVoice()) {
value2 = environment.__proto__;
if (PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
function InstantInviteActionSheet({channel, source, vanityURLCode, guildScheduledEventId, targetApplicationId, code}) { // fn#71825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1194, offset: 0x01d2e3f3, size: 1815 bytes, params: 2, frame: 55
var r35;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var jsxRuntimeEnv0_14Binding;
var items3;
var SearchField;
var guildStoreBinding;
var items2;
const code2 = code;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const defaultImport = UseAnalyticsLocations;
const INSTANT_INVITE_MODAL = (AnalyticsLocation).INSTANT_INVITE_MODAL;
const analyticsLocations = defaultImport(INSTANT_INVITE_MODAL).analyticsLocations;
let property = guildScheduledEventId((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(targetApplicationId != null ? [targetApplicationId] : []),
1)[0];
const useStateFromStores = FluxModule.useStateFromStores;
const createInviteModalStoreBinding = CreateInviteModalStore;
const invite_code = Reflect.apply(useStateFromStores, FluxModule, [[PermissionStore, createInviteModalStoreBinding,
StageInstanceStore], _fun71826]);
const error = FluxModule.useStateFromStores([createInviteModalStoreBinding], function() {
return CreateInviteModalStore.getError();
});
const r20 = invite_code != null ? (importDefault(7147) /* metro dependency 7147: getInviteURL */)(invite_code) : null;
let r7 = r20 != null ? (require(9151) /* metro dependency 9151: InstantInviteUtils */).getShareMessage(r20) : '';
const EMBEDDED_APPLICATION = targetApplicationId != null ? InviteTargetTypes.EMBEDDED_APPLICATION : null;
let binding = code2;
const value9 = binding.useCallback(_fun71828, [channel, analyticsLocations]);
const value10 = binding.useCallback(_fun71829, [channel, invite_code, r7, source]);
const value11 = binding.useCallback(_fun71830, [channel]);
const value12 = binding.useCallback(_fun71831, [invite_code, channel, source]);
const value13 = binding.useCallback(_fun71832, [invite_code, channel, r7, source]);
const value14 = binding.useCallback(_fun71833, [channel]);
const {rows, isFetchingRows} = (UseInviteSuggestionRows)(channel,
source, EMBEDDED_APPLICATION, targetApplicationId);
const r9 = invite_code == null || rows.length === 0 && isFetchingRows;
binding = code2;
const useState = binding.useState;
const property2 = guildScheduledEventId(Reflect.apply(useState, binding,
[invite_code != null && rows.length === 0 && !isFetchingRows]), 1)[0];
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object2 = {'showGradient': null, 'scrollable': true, 'startExpanded': true};
let r10 = error != null || !r9;
r10 = !r10 ? !property2 : r10;
object2.showGradient = r10;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object2.header = (
<BottomSheetTitleHeader
title={targetApplicationId != null ? property != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZdK3dW,
{applicationName: property.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OzOM/q']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['f1+QIK'])}
/>
);
if (error != null) {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r7 = (
<EmptyState
style={styles.errorEmptyState}
Illustration={(require(9165) /* metro dependency 9165: AppCrash */).AppCrash}
title={error}
/>
);
} else if (r9) {
r7 = <Loading />;
} else if (property2) {
r7 = (
<ScrollView contentContainerStyle={{paddingBottom: bottom + 16}}>
{((Component) => <Component link={r20} onCopy={value12} onShare={value13} onPressSettings={value14} />)(importDefault(9169) /* metro dependency 9169: InstantInviteEmptyState */)}
</ScrollView>
);
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [
((Component) => <Component contentContainerStyle={styles.shareApps} onItemPressed={value10} />)(importDefault(9171) /* metro dependency 9171: InstantInviteShareApps */),
];
var viewBinding2Props = {style: styles.searchAndShareContainer};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
var searchFieldProps = {'size': 'md', 'isRound': true,
onChange: (require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */).searchInviteSuggestions};
if (targetApplicationId != null) {
r35 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iI1gMg);
} else {
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['1UgGdm'];
guildStoreBinding = GuildStore;
r35 = Reflect.apply(formatToPlainString, intl, [property,
{groupname: guildStoreBinding.getGuild(channel.guild_id)?.name}]);
}
searchFieldProps.placeholder = r35;
items2 = [
<SearchField {...searchFieldProps} />,
];
items2[1] = !(vanityURLCode != null) && ((Component) => <Component style={styles.inviteAgeText} channel={channel} canEditInvite={code == null} />)(importDefault(9205) /* metro dependency 9205: InstantInviteAgeText */);
items3[1] = (
<View {...viewBinding2Props}>
{items2}
</View>
);
r7 = (
<>
<View>
{items3}
</View>
{((Component) => <Component data={rows} code={invite_code} source={source ?? undefined} onPressAvatar={value9} onInviteSent={value11} />)(importDefault(9206) /* metro dependency 9206: InstantInviteFriendsList */)}
</>
);
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet {...object2}>
{r7}
</BottomSheet>
</AnalyticsLocationProvider>
);
function _fun71826() { // fn#71826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:1494, offset: 0x01d2eb0a, size: 306 bytes, params: 1, frame: 18
var r1;
var value2;
var permissionStoreBinding;
var stageInstanceStoreBinding;
var value3;
var value5;
var invite;
if (code != null) {
return code;
}
const channelBinding = channel;
if (channelBinding.isGuildStageVoice()) {
value2 = environment.__proto__;
permissionStoreBinding = PermissionStore;
if (permissionStoreBinding.can(Permissions.CREATE_INSTANT_INVITE, channel)) {
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
stageInstanceStoreBinding = StageInstanceStore;
value3 = stageInstanceStoreBinding.getStageInstanceByChannel(channel.id);
if (value3?.invite_code == null) {
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
return value3.invite_code;
}
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
r1 = guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
} else {
invite = CreateInviteModalStore.getInvite();
r1 = invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
return r1;
}
value3 = StageInstanceStore.getStageInstanceByChannel(channel.id);
if (value3?.invite_code == null) {
if (vanityURLCode != null) {
return guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
function _fun71828(a0) { // fn#71828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2108, offset: 0x01d2ec4f, size: 88 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
(ShowUserProfileActionSheet)({userId: a0, channelId: channel.id,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun71829(a0) { // fn#71829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2230, offset: 0x01d2eca7, size: 130 bytes, params: 2, frame: 16
var channelBinding;
var value;
if (invite_code != null) {
channelBinding = channel;
a0({channel: channelBinding, code: invite_code, message: env0_7, location: source});
value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
value.setHubProgressActionComplete(channelBinding.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.INVITE_USER);
}
value5 = environment.__proto__;
invite = CreateInviteModalStore.getInvite();
return invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
return value3.invite_code;
function _fun71830() { // fn#71830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2409, offset: 0x01d2ed29, size: 80 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
const setHubProgressActionComplete = value.setHubProgressActionComplete;
const guildId = channel.getGuildId();
const HubProgressStep = (Preloaded_user_settingsModule).HubProgressStep;
const INVITE_USER = HubProgressStep.INVITE_USER;
Reflect.apply(setHubProgressActionComplete, value, [guildId, INVITE_USER]);
}
function _fun71831() { // fn#71831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2529, offset: 0x01d2ed79, size: 55 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleCopy(invite_code, channel, source);
}
function _fun71832() { // fn#71832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2587, offset: 0x01d2edb0, size: 59 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleOpenShareSheet(invite_code, channel, env0_7, source);
}
function _fun71833() { // fn#71833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2659, offset: 0x01d2edeb, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handlePressSettings(channel);
}
}
if (vanityURLCode != null) {
r1 = guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: vanityURLCode,
guildScheduledEventId: guildScheduledEventId}) : vanityURLCode;
} else {
invite = CreateInviteModalStore.getInvite();
r1 = invite != null ? guildScheduledEventId != null ? (require(4098) /* metro dependency 4098: InviteCodeUtils */).generateInviteKeyFromExtraData({baseCode: invite.code,
guildScheduledEventId: guildScheduledEventId}) : invite.code : undefined;
}
return r1;
}
function _fun71828(a0) { // fn#71828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2108, offset: 0x01d2ec4f, size: 88 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0, channelId: channel.id,
sourceAnalyticsLocations: analyticsLocations});
}
function _fun71829(a0) { // fn#71829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2230, offset: 0x01d2eca7, size: 130 bytes, params: 2, frame: 16
var channelBinding;
var value;
if (invite_code != null) {
channelBinding = channel;
a0({channel: channelBinding, code: invite_code, message: env0_7, location: source});
value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
value.setHubProgressActionComplete(channelBinding.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.INVITE_USER);
}
}
function _fun71830() { // fn#71830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2409, offset: 0x01d2ed29, size: 80 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
const setHubProgressActionComplete = value.setHubProgressActionComplete;
const guildId = channel.getGuildId();
const HubProgressStep = (require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep;
const INVITE_USER = HubProgressStep.INVITE_USER;
Reflect.apply(setHubProgressActionComplete, value, [guildId, INVITE_USER]);
}
function _fun71831() { // fn#71831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2529, offset: 0x01d2ed79, size: 55 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleCopy(invite_code, channel, source);
}
function _fun71832() { // fn#71832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2587, offset: 0x01d2edb0, size: 59 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handleOpenShareSheet(invite_code, channel, env0_7, source);
}
function _fun71833() { // fn#71833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9345:2659, offset: 0x01d2edeb, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
return value.handlePressSettings(channel);
}
global.__d(_fun71823, 9160, [57, 31, 27, 1384, 9152, 1867, 3784, 4118, 661, 33, 4501, 697, 9161, 1585, 6771, 6789,
6777, 566, 4098, 7147, 9151, 4080, 8743, 6927, 1314, 9162, 6275, 6758, 1244, 1305, 9165, 9169, 9171, 6984, 9164,
9205, 9206,
2]) /* metro module 9160, dependencies: [57, 31, 27, 1384, 9152, 1867, 3784, 4118, 661, 33, 4501, 697, 9161, 1585, 6771, 6789, 6777, 566, 4098, 7147, 9151, 4080, 8743, 6927, 1314, 9162, 6275, 6758, 1244, 1305, 9165, 9169, 9171, 6984, 9164, 9205, 9206, 2] */;
@@ -1,65 +1,91 @@
/* Metro module 9205; source: modules/instant_invite/native/components/InstantInviteAgeText.tsx; dependencies: [31, 27, 9152, 33, 4501, 566, 4573, 9153, 5278, 9151, 1244, 2] */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun72033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:6, offset: 0x01d3706c, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsxs;
const env0_5 = value.jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({inviteAgeContainer: {'flexDirection': 'row',
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({inviteAgeContainer: {'flexDirection': 'row',
'alignItems': 'center', 'flexWrap': 'wrap'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteAgeText.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteAgeText.tsx');
exports.default = _default_72034;
}
function _default_72034({style, channel, callbackActionSheet, canEditInvite, onEdit, source}) { // fn#72034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:268, offset: 0x01d3714f, size: 511 bytes, params: 2, frame: 26
var r6;
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var moduleValue2;
var items3;
var PressableOpacity;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
canEditInvite = canEditInvite === undefined || canEditInvite;
const styles = useStyles();
const inviteSettings = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
if (inviteSettings == null) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.inviteAgeContainer, style]};
moduleValue2 = require(9153) /* metro dependency 9153: InstantInviteUtils */;
items3 = [<Text variant="text-xs/normal">{moduleValue2.maxAgeString(inviteSettings.maxAge,
inviteSettings.maxUses)}{' '}</Text>];
if (canEditInvite) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = <PressableOpacity onPress={onPress_72036} accessibilityRole="link" accessibilityLabel={intl.string(t['VNe8P/'])} hitSlop={{'top': 8,
'left': 8, 'bottom': 8,
'right': 8}}><Text variant="text-xs/normal" color="text-link">{intl.string(t['VNe8P/'])}</Text></PressableOpacity>;
function _default_72034({style, channel, callbackActionSheet, canEditInvite, onEdit, source}) { // fn#72034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:268, offset: 0x01d3714f, size: 511 bytes, params: 2, frame: 26
var r6;
var r0;
const Text = (TextModule).Text;
var moduleValue2;
var items3;
var PressableOpacity;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
canEditInvite = canEditInvite === undefined || canEditInvite;
const styles = useStyles();
const inviteSettings = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
if (inviteSettings == null) {
r0 = null;
} else {
r6 = canEditInvite;
var viewBindingProps = {style: [styles.inviteAgeContainer, style]};
moduleValue2 = require(9153) /* metro dependency 9153: InstantInviteUtils */;
items3 = [
<Text variant="text-xs/normal">
{moduleValue2.maxAgeString(inviteSettings.maxAge, inviteSettings.maxUses)}
{' '}
</Text>,
];
if (canEditInvite) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
r6 = (
<PressableOpacity
onPress={onPress_72036}
accessibilityRole="link"
accessibilityLabel={intl.string(t['VNe8P/'])}
hitSlop={{
'top': 8,
'left': 8,
'bottom': 8,
'right': 8,
}}
>
<Text variant="text-xs/normal" color="text-link">
{intl.string(t['VNe8P/'])}
</Text>
</PressableOpacity>
);
} else {
r6 = canEditInvite;
}
items3[1] = r6;
r0 = (
<View {...viewBindingProps}>
{items3}
</View>
);
}
return r0;
function _default_72034OnPress() { // fn#72036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:627, owner: _default_72034.onPress, offset: 0x01d37361, size: 73 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
value.handlePressSettings(channel, callbackActionSheet, source);
if (onEdit != null) {
onEdit();
}
}
items3[1] = r6;
r0 = <View {...viewBindingProps}>{items3}</View>;
}
return r0;
}
function _default_72034OnPress() { // fn#72036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9390:627, owner: _default_72034.onPress, offset: 0x01d37361, size: 73 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9151) /* metro dependency 9151: InstantInviteUtils */;
value.handlePressSettings(channel, callbackActionSheet, source);
if (onEdit != null) {
onEdit();
}
}
global.__d(_fun72033, 9205, [31, 27, 9152, 33, 4501, 566, 4573, 9153, 5278, 9151, 1244,
2]) /* metro module 9205, dependencies: [31, 27, 9152, 33, 4501, 566, 4573, 9153, 5278, 9151, 1244, 2] */;
@@ -1,337 +1,325 @@
/* Metro module 9172; source: modules/instant_invite/native/components/InstantInviteConstants.tsx; dependencies: [27, 9157, 661, 9173, 9176, 697, 1244, 9151, 9177, 4057, 9178, 1581, 9179, 4080, 9180, 1962, 7147, 477, 9194, 9195, 4486, 7067, 4496, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GetInviteURL from '../../getInviteURL.tsx'; /* Metro dependency 7147 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as DCDSendUtilsModule from '../DCDSendUtils.tsx'; /* Metro dependency 4486 */
import * as InstantInviteUtilsModule from '../InstantInviteUtils.tsx'; /* Metro dependency 9151 */
import * as InstantInviteConstantsModule from '../InstantInviteConstants.tsx'; /* Metro dependency 9157 */
function _fun71902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:6, offset: 0x01d30e5a, size: 1525 bytes, params: 8, frame: 31
var object13;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = (require(27) /* metro dependency 27 */).Linking;
const instantInviteConstantsModule = require(9157) /* metro dependency 9157: InstantInviteConstants */;
const SHARE_APPS_KEY = instantInviteConstantsModule.SHARE_APPS_KEY;
const env0_5 = instantInviteConstantsModule.SHARE_URLS;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.InviteOptionsType;
const env0_7 = constantsModule.SendTypes;
object13 = {SHARE: 0};
object13[0] = 'SHARE';
object13.COPY = 1;
object13[1] = 'COPY';
object13.QR_CODE = 2;
object13[2] = 'QR_CODE';
object13.MESSAGES = 3;
object13[3] = 'MESSAGES';
object13.MAIL = 4;
object13[4] = 'MAIL';
object13.FB_MESSENGER = 5;
object13[5] = 'FB_MESSENGER';
object13.GMAIL = 6;
object13[6] = 'GMAIL';
object13.TELEGRAM = 7;
object13[7] = 'TELEGRAM';
object13.TWITTER = 8;
object13[8] = 'TWITTER';
object13.WHATSAPP = 9;
object13[9] = 'WHATSAPP';
object13.LINE = 10;
object13[10] = 'LINE';
const object14 = {};
const SHARE = object13.SHARE;
object14.type = SHARE;
object14.icon = importDefault(9173) /* metro dependency 9173: Share */;
const SHARE_APPS_KEY = InstantInviteConstantsModule.SHARE_APPS_KEY;
object = {SHARE: 0};
object[0] = 'SHARE';
object.COPY = 1;
object[1] = 'COPY';
object.QR_CODE = 2;
object[2] = 'QR_CODE';
object.MESSAGES = 3;
object[3] = 'MESSAGES';
object.MAIL = 4;
object[4] = 'MAIL';
object.FB_MESSENGER = 5;
object[5] = 'FB_MESSENGER';
object.GMAIL = 6;
object[6] = 'GMAIL';
object.TELEGRAM = 7;
object[7] = 'TELEGRAM';
object.TWITTER = 8;
object[8] = 'TWITTER';
object.WHATSAPP = 9;
object[9] = 'WHATSAPP';
object.LINE = 10;
object[10] = 'LINE';
const object2 = {};
const SHARE = object.SHARE;
object2.type = SHARE;
object2.icon = importDefault(9173) /* metro dependency 9173: Share */;
let Promise = global.Promise;
let resolve = Promise.resolve;
object14.isAvailable = Reflect.apply(resolve, Promise, [true]);
object14.IconComponent = importDefault(9176) /* metro dependency 9176 */;
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object14.backgroundColor = BRAND_500;
object14.getLabel = function() {
object2.isAvailable = Reflect.apply(resolve, Promise, [true]);
object2.IconComponent = importDefault(9176) /* metro dependency 9176 */;
const BRAND_500 = (Native).unsafe_rawColors.BRAND_500;
object2.backgroundColor = BRAND_500;
object2.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.wPadMa);
};
object14.onPress = onPress_71904;
const items3 = [object14];
const object15 = {};
const COPY = object13.COPY;
object15.type = COPY;
object15.icon = importDefault(9177) /* metro dependency 9177 */;
object2.onPress = onPress_71904;
const items3 = [object2];
const object3 = {};
const COPY = object.COPY;
object3.type = COPY;
object3.icon = importDefault(9177) /* metro dependency 9177 */;
Promise = global.Promise;
object15.isAvailable = Promise.resolve(true);
object15.IconComponent = importDefault(4057) /* metro dependency 4057 */;
object15.getLabel = function() {
object3.isAvailable = Promise.resolve(true);
object3.IconComponent = importDefault(4057) /* metro dependency 4057 */;
object3.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.WqhZss);
};
object15.onPress = onPress_71906;
items3[1] = object15;
const object16 = {};
const QR_CODE = object13.QR_CODE;
object16.type = QR_CODE;
object16.icon = importDefault(9178) /* metro dependency 9178 */;
object3.onPress = onPress_71906;
items3[1] = object3;
const object4 = {};
const QR_CODE = object.QR_CODE;
object4.type = QR_CODE;
object4.icon = importDefault(9178) /* metro dependency 9178 */;
Promise = global.Promise;
resolve = Promise.resolve;
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
object16.isAvailable = Reflect.apply(resolve, Promise, [!metaQuestUtilsAndroidModule.isMetaQuest()]);
object16.IconComponent = importDefault(9179) /* metro dependency 9179 */;
object16.getLabel = function() {
object4.isAvailable = Reflect.apply(resolve, Promise, [!MetaQuestUtilsAndroidModule.isMetaQuest()]);
object4.IconComponent = importDefault(9179) /* metro dependency 9179 */;
object4.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.rriLm1);
};
object16.onPress = onPress_71908;
items3[2] = object16;
const object17 = {};
const MESSAGES = object13.MESSAGES;
object17.type = MESSAGES;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object17.fullIcon = platformUtilsModule.isIOS() ? importDefault(9194) /* metro dependency 9194 */ : value;
const value7 = platformUtilsModule;
object17.icon = value7.isAndroid() ? importDefault(9195) /* metro dependency 9195 */ : value;
object17.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendSMS();
object17.getLabel = function() {
object4.onPress = onPress_71908;
items3[2] = object4;
const object5 = {};
const MESSAGES = object.MESSAGES;
object5.type = MESSAGES;
object5.fullIcon = PlatformUtilsModule.isIOS() ? importDefault(9194) /* metro dependency 9194 */ : value;
object5.icon = PlatformUtilsModule.isAndroid() ? importDefault(9195) /* metro dependency 9195 */ : value;
object5.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendSMS();
object5.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.AQKfCj);
};
object17.onPress = onPress_71910;
items3[3] = object17;
const object18 = {};
const MAIL = object13.MAIL;
object18.type = MAIL;
const value10 = platformUtilsModule;
object18.fullIcon = value10.isIOS() ? importDefault(9196) /* metro dependency 9196 */ : value;
const value12 = platformUtilsModule;
object18.icon = value12.isAndroid() ? importDefault(9197) /* metro dependency 9197 */ : value;
object18.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendMail();
object18.getLabel = function() {
object5.onPress = onPress_71910;
items3[3] = object5;
const object6 = {};
const MAIL = object.MAIL;
object6.type = MAIL;
object6.fullIcon = PlatformUtilsModule.isIOS() ? importDefault(9196) /* metro dependency 9196 */ : value;
object6.icon = PlatformUtilsModule.isAndroid() ? importDefault(9197) /* metro dependency 9197 */ : value;
object6.isAvailable = (require(4486) /* metro dependency 4486: DCDSendUtils */).canSendMail();
object6.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.QaAypP);
};
object18.onPress = onPress_71913;
items3[4] = object18;
const object19 = {};
const FB_MESSENGER = object13.FB_MESSENGER;
object19.type = FB_MESSENGER;
object19.fullIcon = importDefault(9198) /* metro dependency 9198 */;
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
let isAppInstalled = instantInviteUtilsModule.isAppInstalled;
object6.onPress = onPress_71913;
items3[4] = object6;
const object7 = {};
const FB_MESSENGER = object.FB_MESSENGER;
object7.type = FB_MESSENGER;
object7.fullIcon = importDefault(9198) /* metro dependency 9198 */;
let isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
const MESSENGER = SHARE_APPS_KEY.MESSENGER;
object19.isAvailable = Reflect.apply(isAppInstalled, instantInviteUtilsModule, [MESSENGER]);
object19.getLabel = function() {
object7.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [MESSENGER]);
object7.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.P0R3ZF);
};
object19.onPress = onPress_71916;
items3[5] = object19;
const object20 = {};
let GMAIL = object13.GMAIL;
object20.type = GMAIL;
object20.fullIcon = importDefault(9199) /* metro dependency 9199 */;
const value16 = instantInviteUtilsModule;
isAppInstalled = value16.isAppInstalled;
object7.onPress = onPress_71916;
items3[5] = object7;
const object8 = {};
let GMAIL = object.GMAIL;
object8.type = GMAIL;
object8.fullIcon = importDefault(9199) /* metro dependency 9199 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
GMAIL = SHARE_APPS_KEY.GMAIL;
object20.isAvailable = Reflect.apply(isAppInstalled, value16, [GMAIL]);
object20.getLabel = function() {
object8.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [GMAIL]);
object8.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['14o9ZT']);
};
object20.onPress = function({channel, code, message, location}) {
object8.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.GMAIL, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.GMAIL]('', message));
};
items3[6] = object20;
const object21 = {};
let TELEGRAM = object13.TELEGRAM;
object21.type = TELEGRAM;
object21.fullIcon = importDefault(9200) /* metro dependency 9200 */;
const value17 = instantInviteUtilsModule;
isAppInstalled = value17.isAppInstalled;
items3[6] = object8;
const object9 = {};
let TELEGRAM = object.TELEGRAM;
object9.type = TELEGRAM;
object9.fullIcon = importDefault(9200) /* metro dependency 9200 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
TELEGRAM = SHARE_APPS_KEY.TELEGRAM;
object21.isAvailable = Reflect.apply(isAppInstalled, value17, [TELEGRAM]);
object21.getLabel = function() {
object9.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [TELEGRAM]);
object9.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['148qIV']);
};
object21.onPress = onPress_71920;
items3[7] = object21;
const object22 = {};
let TWITTER = object13.TWITTER;
object22.type = TWITTER;
object22.fullIcon = importDefault(9201) /* metro dependency 9201 */;
const value18 = instantInviteUtilsModule;
isAppInstalled = value18.isAppInstalled;
object9.onPress = onPress_71920;
items3[7] = object9;
const object10 = {};
let TWITTER = object.TWITTER;
object10.type = TWITTER;
object10.fullIcon = importDefault(9201) /* metro dependency 9201 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
TWITTER = SHARE_APPS_KEY.TWITTER;
object22.isAvailable = Reflect.apply(isAppInstalled, value18, [TWITTER]);
object22.getLabel = function() {
object10.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [TWITTER]);
object10.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.oAiltV);
};
object22.onPress = function({channel, code, message, location}) {
object10.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.TWITTER, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.TWITTER](message));
};
items3[8] = object22;
const object23 = {};
let WHATSAPP = object13.WHATSAPP;
object23.type = WHATSAPP;
object23.fullIcon = importDefault(9202) /* metro dependency 9202 */;
const value19 = instantInviteUtilsModule;
isAppInstalled = value19.isAppInstalled;
items3[8] = object10;
const object11 = {};
let WHATSAPP = object.WHATSAPP;
object11.type = WHATSAPP;
object11.fullIcon = importDefault(9202) /* metro dependency 9202 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
WHATSAPP = SHARE_APPS_KEY.WHATSAPP;
object23.isAvailable = Reflect.apply(isAppInstalled, value19, [WHATSAPP]);
object23.getLabel = function() {
object11.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [WHATSAPP]);
object11.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.viazhS);
};
object23.onPress = function({channel, code, message, location}) {
object11.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.WHATSAPP, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.WHATSAPP](message));
};
items3[9] = object23;
const object24 = {};
let LINE = object13.LINE;
object24.type = LINE;
object24.fullIcon = importDefault(9203) /* metro dependency 9203 */;
const value20 = instantInviteUtilsModule;
isAppInstalled = value20.isAppInstalled;
items3[9] = object11;
const object12 = {};
let LINE = object.LINE;
object12.type = LINE;
object12.fullIcon = importDefault(9203) /* metro dependency 9203 */;
isAppInstalled = InstantInviteUtilsModule.isAppInstalled;
LINE = SHARE_APPS_KEY.LINE;
object24.isAvailable = Reflect.apply(isAppInstalled, value20, [LINE]);
object24.getLabel = function() {
object12.isAvailable = Reflect.apply(isAppInstalled, InstantInviteUtilsModule, [LINE]);
object12.getLabel = function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.kqgslH);
};
object24.onPress = function({channel, code, message, location}) {
object12.onPress = function({channel, code, message, location}) {
require(dependencyMap[7]).trackOptionClicked(code, channel, InviteOptionsType.LINE, location);
Linking.openURL(SHARE_URLS[SHARE_APPS_KEY.LINE](message));
};
items3[10] = object24;
items3[10] = object12;
const items2 = [items3[0], items3[1]];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteConstants.tsx');
exports.ShareItemType = object13;
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteConstants.tsx');
exports.ShareItemType = object;
exports.SHARE_ITEMS = items3;
exports.SHARE_ITEMS_DEFAULT = items2;
return value;
}
function onPress_71904({channel, code, message, location}) { // fn#71904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:692, offset: 0x01d3148f, size: 66 bytes, params: 2, frame: 18
return (require(9151) /* metro dependency 9151: InstantInviteUtils */).handleOpenShareSheet(code, channel, message,
location);
}
function onPress_71906({channel, code, location}) { // fn#71906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:913, offset: 0x01d3150f, size: 58 bytes, params: 2, frame: 16
return (require(9151) /* metro dependency 9151: InstantInviteUtils */).handleCopy(code, channel, location);
}
function onPress_71908({code, channel, location}) { // fn#71908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1138, offset: 0x01d31589, size: 158 bytes, params: 2, frame: 23
const defaultImport = importDefault(dependencyMap[13]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'InstantInviteQRCodeActionSheet-' + code,
{link: importDefault(dependencyMap[16])(code), location: location, channel: channel}, 'stack']);
}
function onPress_71910({channel, code, message, location}) { // fn#71910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1497, offset: 0x01d31667, size: 189 bytes, params: 2, frame: 23
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
const SMS = InviteOptionsType.SMS;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, SMS, location]);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
function onPress_71904({channel, code, message, location}) { // fn#71904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:692, offset: 0x01d3148f, size: 66 bytes, params: 2, frame: 18
return (InstantInviteUtilsModule).handleOpenShareSheet(code, channel, message,
location);
}
const dcdSendUtilsModule = require(4486) /* metro dependency 4486: DCDSendUtils */;
dcdSendUtilsModule.sendSMS({body: message}, _fun71911);
}
function onPress_71913({channel, code, message, location}) { // fn#71913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2108, offset: 0x01d31857, size: 198 bytes, params: 2, frame: 23
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
const EMAIL = InviteOptionsType.EMAIL;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, EMAIL, location]);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
function onPress_71906({channel, code, location}) { // fn#71906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:913, offset: 0x01d3150f, size: 58 bytes, params: 2, frame: 16
return (InstantInviteUtilsModule).handleCopy(code, channel, location);
}
const dcdSendUtilsModule = require(4486) /* metro dependency 4486: DCDSendUtils */;
dcdSendUtilsModule.sendMail({subject: '', body: message}, _fun71914);
}
function onPress_71916({channel, code, location}) { // fn#71916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2692, offset: 0x01d31a50, size: 130 bytes, params: 2, frame: 20
const value2 = (importDefault(7147) /* metro dependency 7147: getInviteURL */)(code);
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
let MESSENGER = InviteOptionsType.MESSENGER;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, MESSENGER, location]);
const openURL = Linking.openURL;
MESSENGER = SHARE_APPS_KEY.MESSENGER;
Reflect.apply(openURL, Linking, [SHARE_URLS[MESSENGER](value2)]);
}
function onPress_71920({channel, code, message, location}) { // fn#71920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:3219, offset: 0x01d31bc9, size: 136 bytes, params: 2, frame: 21
const value2 = (importDefault(7147) /* metro dependency 7147: getInviteURL */)(code);
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const trackOptionClicked = instantInviteUtilsModule.trackOptionClicked;
let TELEGRAM = InviteOptionsType.TELEGRAM;
Reflect.apply(trackOptionClicked, instantInviteUtilsModule, [code, channel, TELEGRAM, location]);
const openURL = Linking.openURL;
TELEGRAM = SHARE_APPS_KEY.TELEGRAM;
Reflect.apply(openURL, Linking, [SHARE_URLS[TELEGRAM](message, value2)]);
}
function _fun71911(a0, a1, a2) { // fn#71911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1653, offset: 0x01d31724, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object2;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'SMS Option', overrideProperties: {send_type: SendTypes.SMS}}]);
function onPress_71908({code, channel, location}) { // fn#71908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1138, offset: 0x01d31589, size: 158 bytes, params: 2, frame: 23
const defaultImport = importDefault(dependencyMap[13]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'InstantInviteQRCodeActionSheet-' + code,
{link: importDefault(dependencyMap[16])(code), location: location, channel: channel}, 'stack']);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object2.isDismissable = true;
Reflect.apply(show, defaultImport2, [object2]);
}
}
function _fun71914(a0, a1, a2) { // fn#71914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2278, offset: 0x01d3191d, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object2;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'Email Option', overrideProperties: {send_type: SendTypes.EMAIL}}]);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object2.isDismissable = true;
Reflect.apply(show, defaultImport2, [object2]);
function onPress_71910({channel, code, message, location}) { // fn#71910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1497, offset: 0x01d31667, size: 189 bytes, params: 2, frame: 23
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
const SMS = InviteOptionsType.SMS;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, SMS, location]);
if (PlatformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
DCDSendUtilsModule.sendSMS({body: message}, _fun71911);
function _fun71911(a0, a1, a2) { // fn#71911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:1653, offset: 0x01d31724, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'SMS Option', overrideProperties: {send_type: SendTypes.SMS}}]);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object.isDismissable = true;
Reflect.apply(show, defaultImport2, [object]);
}
}
}
function onPress_71913({channel, code, message, location}) { // fn#71913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2108, offset: 0x01d31857, size: 198 bytes, params: 2, frame: 23
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
const EMAIL = InviteOptionsType.EMAIL;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, EMAIL, location]);
if (PlatformUtilsModule.isIOS()) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
DCDSendUtilsModule.sendMail({subject: '', body: message}, _fun71914);
function _fun71914(a0, a1, a2) { // fn#71914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2278, offset: 0x01d3191d, size: 243 bytes, params: 4, frame: 17
var id;
var value;
var value2;
var defaultImport;
var trackInvite;
var object;
var channelBinding;
var value4;
var defaultImport2;
var show;
var intl;
if (a0) {
value = environment.__proto__;
value2 = undefined;
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
trackInvite = defaultImport.trackInvite;
channelBinding = channel;
value4 = null;
id = value4 == channelBinding ? value2 : channel.id;
Reflect.apply(trackInvite, defaultImport, [{inviteKey: code, channelId: value4 != id ? id : value4,
messageId: value4, location: 'Email Option', overrideProperties: {send_type: SendTypes.EMAIL}}]);
}
if (a2) {
value = environment.__proto__;
defaultImport2 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
show = defaultImport2.show;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ieAR5']);
object.isDismissable = true;
Reflect.apply(show, defaultImport2, [object]);
}
}
}
function onPress_71916({channel, code, location}) { // fn#71916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:2692, offset: 0x01d31a50, size: 130 bytes, params: 2, frame: 20
const value2 = (GetInviteURL)(code);
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
let MESSENGER = InviteOptionsType.MESSENGER;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, MESSENGER, location]);
const openURL = Linking.openURL;
MESSENGER = SHARE_APPS_KEY.MESSENGER;
Reflect.apply(openURL, Linking, [SHARE_URLS[MESSENGER](value2)]);
}
function onPress_71920({channel, code, message, location}) { // fn#71920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9357:3219, offset: 0x01d31bc9, size: 136 bytes, params: 2, frame: 21
const value2 = (GetInviteURL)(code);
const trackOptionClicked = InstantInviteUtilsModule.trackOptionClicked;
let TELEGRAM = InviteOptionsType.TELEGRAM;
Reflect.apply(trackOptionClicked, InstantInviteUtilsModule, [code, channel, TELEGRAM, location]);
const openURL = Linking.openURL;
TELEGRAM = SHARE_APPS_KEY.TELEGRAM;
Reflect.apply(openURL, Linking, [SHARE_URLS[TELEGRAM](message, value2)]);
}
}
global.__d(_fun71902, 9172, [27, 9157, 661, 9173, 9176, 697, 1244, 9151, 9177, 4057, 9178, 1581, 9179, 4080, 9180,
1962, 7147, 477, 9194, 9195, 4486, 7067, 4496, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203,
2]) /* metro module 9172, dependencies: [27, 9157, 661, 9173, 9176, 697, 1244, 9151, 9177, 4057, 9178, 1581, 9179, 4080, 9180, 1962, 7147, 477, 9194, 9195, 4486, 7067, 4496, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203, 2] */;
@@ -1,83 +1,124 @@
/* Metro module 9169; source: modules/instant_invite/native/components/InstantInviteEmptyState.tsx; dependencies: [31, 27, 9152, 33, 4501, 697, 566, 1305, 9170, 1244, 8969, 5278, 7002, 4573, 9153, 4578, 2] */
import FreeFormTextInput from '../../../../design/void/Form/native/FreeFormTextInput.tsx'; /* Metro dependency 8969 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import InstantInviteUtils from '../../../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import Module09170 from '../../../../by-id/module-09170.js'; /* Metro dependency 9170 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SettingsIconModule from '../../../../design/components/Icon/native/redesign/generated/SettingsIcon.tsx'; /* Metro dependency 7002 */
function _fun71886(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:6, offset: 0x01d3041b, size: 375 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': 48, 'height': 48, 'justifyContent': 'center', 'alignItems': 'center'};
const object2 = {'width': 48, 'height': 48, 'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_7 = Reflect.apply(createStyles, value, [{container: {padding: 16}, emptyStateContainer: {'padding': 0,
'marginBottom': 16}, emptyStateArt: {marginBottom: 16}, emptyStateTitle: {marginBottom: 4},
linkContainer: {'maxWidth': '100%', 'flexDirection': 'row', 'marginBottom': 8, 'gap': 8},
inviteInput: {flexShrink: 1}, expireCaption: {marginBottom: 16}, settingsButton: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteEmptyState.tsx');
inviteInput: {flexShrink: 1}, expireCaption: {marginBottom: 16}, settingsButton: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteEmptyState.tsx');
exports.default = _default_71887;
}
function _default_71887({link, onCopy, onShare, onPressSettings}) { // fn#71887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:623, offset: 0x01d30592, size: 744 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
const RefreshEmptyState = (NativeModule).RefreshEmptyState;
const refreshEmptyStateProps2 = {containerStyle: styles.emptyStateContainer, imageStyle: styles.emptyStateArt,
titleStyle: styles.emptyStateTitle, source: Module09170};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
refreshEmptyStateProps2.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.tQc0l8]);
string = intl.string;
const DXgdcD = (require(1244) /* metro dependency 1244: indexNative */).t.DXgdcD;
refreshEmptyStateProps2.body = Reflect.apply(string, intl, [DXgdcD]);
const items2 = [
<RefreshEmptyState {...refreshEmptyStateProps2} />,
];
const r9 = link ?? '';
const ClearButtonVisibility = (NativeModule).ClearButtonVisibility;
const NEVER = ClearButtonVisibility.NEVER;
const freeFormTextInput = (
<FreeFormTextInput
accessibilityRole="button"
onPress={onCopy}
editable={false}
value={r9}
style={styles.inviteInput}
forceAccessibleContainer
clearButtonVisibility={NEVER}
/>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']),
accessibilityRole: 'button', onPress: onPressSettings, style: styles.settingsButton};
const SettingsIcon = (SettingsIconModule).SettingsIcon;
items2[1] = (
<View style={styles.linkContainer}>
{freeFormTextInput}
<PressableOpacity {...pressableOpacityProps}>
<SettingsIcon />
</PressableOpacity>
</View>
);
const Text = (TextModule).Text;
items2[2] = (
<Text
style={styles.expireCaption}
variant="text-xs/medium"
color="text-muted"
>
{_fun71889()}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const Ej3B3Y = (require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y;
items2[3] = <Button text={Reflect.apply(string, intl, [Ej3B3Y])} onPress={onShare} />;
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun71889() { // fn#71889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:1520, offset: 0x01d3088d, size: 290 bytes, params: 1, frame: 19
const t = (IndexNativeModule).t;
if (inviteSettings == null) {
return null;
}
const maxAgeOptionByValue = (InstantInviteUtils).getMaxAgeOptionByValue(inviteSettings.maxAge);
const value4 = '';
const r6 = maxAgeOptionByValue != null && maxAgeOptionByValue.descriptiveLabel != null ? maxAgeOptionByValue.descriptiveLabel : value4;
const getMaxUsesOptions = (InstantInviteUtils).getMaxUsesOptions;
const value5 = getMaxUsesOptions.find(function({value}) {
return value === inviteSettings.maxUses;
});
const descriptiveLabel = value5 != null ? value5.descriptiveLabel : value4;
const r4 = inviteSettings.maxAge === 0 ? t['99ISmn'] : t.dqPWMN;
const intl = (IndexNativeModule).intl;
return intl.format(r4, {maxAge: r6, maxUses: descriptiveLabel});
}
function _default_71887({link, onCopy, onShare, onPressSettings}) { // fn#71887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:623, offset: 0x01d30592, size: 744 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getInviteSettings();
});
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const refreshEmptyStateProps2 = {containerStyle: styles.emptyStateContainer, imageStyle: styles.emptyStateArt,
titleStyle: styles.emptyStateTitle, source: importDefault(9170) /* metro dependency 9170 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
refreshEmptyStateProps2.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.tQc0l8]);
string = intl.string;
const DXgdcD = (require(1244) /* metro dependency 1244: indexNative */).t.DXgdcD;
refreshEmptyStateProps2.body = Reflect.apply(string, intl, [DXgdcD]);
const items2 = [<RefreshEmptyState {...refreshEmptyStateProps2} />];
const FreeFormTextInput = importDefault(8969) /* metro dependency 8969: FreeFormTextInput */;
const r9 = link ?? '';
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const NEVER = ClearButtonVisibility.NEVER;
const freeFormTextInput = <FreeFormTextInput accessibilityRole="button" onPress={onCopy} editable={false} value={r9} style={styles.inviteInput} forceAccessibleContainer clearButtonVisibility={NEVER} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']),
accessibilityRole: 'button', onPress: onPressSettings, style: styles.settingsButton};
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
items2[1] = <View style={styles.linkContainer}>{freeFormTextInput}<PressableOpacity {...pressableOpacityProps}><SettingsIcon /></PressableOpacity></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <Text style={styles.expireCaption} variant="text-xs/medium" color="text-muted">{_fun71889()}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const Ej3B3Y = (require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y;
items2[3] = <Button text={Reflect.apply(string, intl, [Ej3B3Y])} onPress={onShare} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun71889() { // fn#71889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9354:1520, offset: 0x01d3088d, size: 290 bytes, params: 1, frame: 19
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (inviteSettings == null) {
return null;
}
const maxAgeOptionByValue = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).getMaxAgeOptionByValue(inviteSettings.maxAge);
const value4 = '';
const r6 = maxAgeOptionByValue != null && maxAgeOptionByValue.descriptiveLabel != null ? maxAgeOptionByValue.descriptiveLabel : value4;
const getMaxUsesOptions = (importDefault(9153) /* metro dependency 9153: InstantInviteUtils */).getMaxUsesOptions;
const value5 = getMaxUsesOptions.find(function({value}) {
return value === inviteSettings.maxUses;
});
const descriptiveLabel = value5 != null ? value5.descriptiveLabel : value4;
const r4 = inviteSettings.maxAge === 0 ? t['99ISmn'] : t.dqPWMN;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.format(r4, {maxAge: r6, maxUses: descriptiveLabel});
}
global.__d(_fun71886, 9169, [31, 27, 9152, 33, 4501, 697, 566, 1305, 9170, 1244, 8969, 5278, 7002, 4573, 9153, 4578,
2]) /* metro module 9169, dependencies: [31, 27, 9152, 33, 4501, 697, 566, 1305, 9170, 1244, 8969, 5278, 7002, 4573, 9153, 4578, 2] */;
@@ -1,102 +1,124 @@
/* Metro module 9206; source: modules/instant_invite/native/components/InstantInviteFriendsList.tsx; dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 9207, 5463, 6277, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import InstantInviteRow from './InstantInviteRow.tsx'; /* Metro dependency 9207 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
function _fun72037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:6, offset: 0x01d373aa, size: 416 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object5, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object5['textTransform'] = 'none';
object5['lineHeight'] = 24;
object4.emptyTitle = object5;
const object6 = {};
const value3 = textStyles;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined);
object2['textTransform'] = 'none';
object2['lineHeight'] = 24;
object.emptyTitle = object2;
const object3 = {};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object6, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object6['lineHeight'] = 20;
object6['fontWeight'] = '600';
object4.emptyBody = object6;
object4.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object4]);
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
copyDataProperties(object3, TextStyles(PRIMARY_MEDIUM, TEXT_SUBTLE, 16), undefined);
object3['lineHeight'] = 20;
object3['fontWeight'] = '600';
object.emptyBody = object3;
object.goToFriendsLink = {textAlign: 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
const keyExtractor_72040 = function(a0) {
return a0.item.id;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteFriendsList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteFriendsList.tsx');
exports.default = InstantInviteFriendsList;
function FriendsEmptyComponent() { // fn#72038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:479, offset: 0x01d3754a, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (NativeModule).RefreshEmptyState;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object2.body = Reflect.apply(string, intl, [MBQBI7]);
object2.titleStyle = styles.emptyTitle;
object2.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object2} />;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_72039, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (TextModule).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
function FriendsEmptyComponentOnPress() { // fn#72039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:744, owner: FriendsEmptyComponent.onPress, offset: 0x01d376ff, size: 116 bytes, params: 1, frame: 15
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Instant Invite Empty State'}});
}
}
}
function InstantInviteFriendsList({code, onPressAvatar, onInviteSent, data, source}) { // fn#72041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1304, offset: 0x01d37782, size: 292 bytes, params: 2, frame: 23
const value2 = data.useCallback(_fun72042, [onPressAvatar, onInviteSent, code, source, data.length]);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (Module06277Module).BottomSheetFlatList;
const object2 = {};
const PX_16 = (Native).space.PX_16;
object2.paddingBottom = PX_16 + insets.bottom;
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object2}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_72040}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent}
/>
);
function _fun72042({item, index}) { // fn#72042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1416, offset: 0x01d378a6, size: 128 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} code={code} source={source} />)(InstantInviteRow);
}
}
}
function FriendsEmptyComponent() { // fn#72038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:479, offset: 0x01d3754a, size: 437 bytes, params: 1, frame: 25
const styles = useStyles();
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.dz4UlO]);
string = intl.string;
const MBQBI7 = (require(1244) /* metro dependency 1244: indexNative */).t.MBQBI7;
object.body = Reflect.apply(string, intl, [MBQBI7]);
object.titleStyle = styles.emptyTitle;
object.bodyStyle = styles.emptyBody;
const refreshEmptyState = <RefreshEmptyState {...object} />;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_72039, accessibilityRole: 'link',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE),
hitSlop: {'top': 8, 'left': 8, 'bottom': 8, 'right': 8}};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<>
{refreshEmptyState}
<PressableOpacity {...pressableOpacityProps}>
<Text
style={[styles.goToFriendsLink]}
variant="text-sm/semibold"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a7FVbE)}
</Text>
</PressableOpacity>
</>
);
}
function InstantInviteFriendsList({code, onPressAvatar, onInviteSent, data, source}) { // fn#72041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1304, offset: 0x01d37782, size: 292 bytes, params: 2, frame: 23
const value2 = data.useCallback(_fun72042, [onPressAvatar, onInviteSent, code, source, data.length]);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = PX_16 + insets.bottom;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
return (
<BottomSheetFlatList
contentContainerStyle={object}
bounces={false}
renderItem={value2}
data={data}
keyExtractor={keyExtractor_72040}
keyboardShouldPersistTaps="always"
ListEmptyComponent={FriendsEmptyComponent}
/>
);
}
function _fun72042({item, index}) { // fn#72042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9391:1416, offset: 0x01d378a6, size: 128 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component start={index === 0} end={index === data.length - 1} row={item} onPressAvatar={onPressAvatar} onInviteSent={onInviteSent} code={code} source={source} />)(importDefault(9207) /* metro dependency 9207: InstantInviteRow */);
}
global.__d(_fun72037, 9206, [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 9207, 5463, 6277,
2]) /* metro module 9206, dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 1244, 5278, 4080, 4008, 4573, 9207, 5463, 6277, 2] */;
@@ -1,14 +1,22 @@
/* Metro module 9180; source: modules/instant_invite/native/components/InstantInviteQRCodeActionSheet.tsx; dependencies: [31, 27, 1867, 1878, 661, 33, 4501, 697, 6819, 566, 1244, 694, 3856, 6805, 6758, 9181, 4573, 2] */
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
function _fun71934(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:6, offset: 0x01d3208f, size: 471 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.InstantInviteSources;
const env0_8 = value.RelationshipTypes;
value = require(33) /* metro dependency 33 */;
@@ -16,135 +24,156 @@ function _fun71934(global, require, importDefault, importAll, module, exports, d
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'padding': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'};
object = {};
const object2 = {'padding': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.padding = PX_12;
object2.padding = PX_12;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.gap = PX_24;
object4.container = object5;
object4.iconContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
object2.gap = PX_24;
object.container = object2;
object.iconContainer = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
'justifyContent': 'center', 'alignItems': 'center'};
const object6 = {};
const object3 = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.padding = PX_4;
object3.padding = PX_4;
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.borderRadius = lg + PX_4;
object3.borderRadius = lg + PX_4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object6.backgroundColor = WHITE;
object4.icon = object6;
object4.code = {alignSelf: 'center'};
const env0_11 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteQRCodeActionSheet.tsx');
object3.backgroundColor = WHITE;
object.icon = object3;
object.code = {alignSelf: 'center'};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteQRCodeActionSheet.tsx');
exports.default = InstantInviteQRCodeActionSheet;
}
function InstantInviteQRCodeActionSheet(a0) { // fn#71935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:750, offset: 0x01d32266, size: 659 bytes, params: 2, frame: 28
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object;
const link = a0.link;
const value2 = undefined;
const styles = useStyles();
const location = a0.location;
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
const r6 = location === ADD_FRIENDS_MODAL ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VUNqoc) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DqE26p);
const value5 = InstantInviteQRCodeActionSheetUseDescription(a0);
const channel = a0.channel;
const value6 = null;
const r17 = value6 != channel && value6 != GuildStore.getGuild(channel.guild_id) ? ((Component) => <Component guild={GuildStore.getGuild(channel.guild_id)} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : value6;
useOnFriendAdded((require(3856) /* metro dependency 3856: ToastUtils */).presentFriendRequestAcceptedToast);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
return (
<ActionSheet header={<BottomSheetTitleHeader title={r6} />}>
<View style={styles.container}>
<View>
{((Component) => <Component text={link} size={240} style={styles.code} accessibilityLabel={value6 == value5 ? value2 : value5.plainText} />)(importDefault(9181) /* metro dependency 9181: QRCode */)}
{value6 != r17 && <View style={styles.iconContainer}><View style={styles.icon}>{r17}</View></View>}
</View>
{value6 != value5 && ((Text) => <Text variant="text-md/normal">{value5.visible}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</ActionSheet>
);
}
function InstantInviteQRCodeActionSheetUseDescription({location, channel}) { // fn#71936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:963, owner: InstantInviteQRCodeActionSheet.useDescription, offset: 0x01d324f9, size: 413 bytes, params: 2, frame: 23
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var zDGAfl;
var username;
var formatToPlainString;
var VK3zyF;
var name;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
if (channel != null) {
var guild = GuildStore.getGuild(channel.guild_id);
if (guild != null) {
object = {};
format = intl.format;
VK3zyF = t.VK3zyF;
name = guild.name;
object.visible = Reflect.apply(format, intl, [VK3zyF, {name: name}]);
formatToPlainString = intl.formatToPlainString;
VK3zyF = t.VK3zyF;
name = guild.name;
object.plainText = Reflect.apply(formatToPlainString, intl, [VK3zyF, {name: name}]);
return object;
function InstantInviteQRCodeActionSheet(a0) { // fn#71935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:750, offset: 0x01d32266, size: 659 bytes, params: 2, frame: 28
var r17;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var guildStoreBinding;
var GuildIcon;
var object2;
const link = a0.link;
const value2 = undefined;
const styles = useStyles();
const location = a0.location;
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
const r6 = location === ADD_FRIENDS_MODAL ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VUNqoc) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DqE26p);
const value5 = useDescription(a0);
const channel = a0.channel;
const value6 = null;
if (value6 != channel) {
if (value6 != Reflect.apply(GuildStore.getGuild, guildStoreBinding, [channel.guild_id])) {
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
guildStoreBinding = GuildStore;
r17 = (
<GuildIcon
guild={guildStoreBinding.getGuild(channel.guild_id)}
size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE}
/>
);
} else {
r17 = value6;
}
} else {
r17 = value6;
}
useOnFriendAdded((ToastUtilsModule).presentFriendRequestAcceptedToast);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
return (
<ActionSheet header={<BottomSheetTitleHeader title={r6} />}>
<View style={styles.container}>
<View>
{((Component) => <Component text={link} size={240} style={styles.code} accessibilityLabel={value6 == value5 ? value2 : value5.plainText} />)(importDefault(9181) /* metro dependency 9181: QRCode */)}
{value6 != r17 && <View style={styles.iconContainer}><View style={styles.icon}>{r17}</View></View>}
</View>
{value6 != value5 && ((Text) => <Text variant="text-md/normal">{value5.visible}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
</ActionSheet>
);
function useDescription({location, channel}) { // fn#71936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:963, owner: InstantInviteQRCodeActionSheet.useDescription, offset: 0x01d324f9, size: 413 bytes, params: 2, frame: 23
var r0;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var zDGAfl;
var username;
var formatToPlainString;
var VK3zyF;
var name;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
if (channel != null) {
var guild = GuildStore.getGuild(channel.guild_id);
if (guild != null) {
object = {};
format = intl.format;
VK3zyF = t.VK3zyF;
name = guild.name;
object.visible = Reflect.apply(format, intl, [VK3zyF, {name: name}]);
formatToPlainString = intl.formatToPlainString;
VK3zyF = t.VK3zyF;
name = guild.name;
object.plainText = Reflect.apply(formatToPlainString, intl, [VK3zyF, {name: name}]);
return object;
}
}
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
if (location !== ADD_FRIENDS_MODAL) {
r0 = null;
} else if (currentUser != null) {
object = {};
format = intl.format;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.visible = Reflect.apply(format, intl, [zDGAfl, {name: username}]);
formatToPlainString = intl.formatToPlainString;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.plainText = Reflect.apply(formatToPlainString, intl, [zDGAfl, {name: username}]);
r0 = object;
} else {
r0 = null;
}
return r0;
}
function useOnFriendAdded(a0) { // fn#71938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1640, owner: InstantInviteQRCodeActionSheet.useOnFriendAdded, offset: 0x01d326a8, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env1_3.useEffect(_fun71939, [a0]);
function _fun71939() { // fn#71939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1682, offset: 0x01d326d6, size: 63 bytes, params: 1, frame: 14
var environment;
const handleRelationshipAdd_719402 = handleRelationshipAdd_71940;
const value = environment.__proto__.__proto__;
(Dispatcher).subscribe('RELATIONSHIP_ADD',
handleRelationshipAdd_719402);
return _fun71941;
function handleRelationshipAdd_71940({relationship}) { // fn#71940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1713, offset: 0x01d32715, size: 54 bytes, params: 2, frame: 11
const type = relationship.type;
const FRIEND = RelationshipTypes.FRIEND;
if (type === FRIEND) {
value = environment.__proto__;
env1_0(relationship.user);
}
}
function _fun71941() { // fn#71941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1832, offset: 0x01d3274b, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('RELATIONSHIP_ADD', handleRelationshipAdd_71940);
}
}
}
}
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
if (location !== ADD_FRIENDS_MODAL) {
r0 = null;
} else if (currentUser != null) {
object = {};
format = intl.format;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.visible = Reflect.apply(format, intl, [zDGAfl, {name: username}]);
formatToPlainString = intl.formatToPlainString;
zDGAfl = t.zDGAfl;
username = currentUser.username;
object.plainText = Reflect.apply(formatToPlainString, intl, [zDGAfl, {name: username}]);
r0 = object;
} else {
r0 = null;
}
return r0;
}
function useOnFriendAdded(a0) { // fn#71938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1640, owner: InstantInviteQRCodeActionSheet.useOnFriendAdded, offset: 0x01d326a8, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env1_3.useEffect(_fun71939, [a0]);
}
function _fun71939() { // fn#71939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1682, offset: 0x01d326d6, size: 63 bytes, params: 1, frame: 14
var environment;
const closure = handleRelationshipAdd_71940;
const value = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('RELATIONSHIP_ADD', closure);
return _fun71941;
}
function handleRelationshipAdd_71940({relationship}) { // fn#71940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1713, offset: 0x01d32715, size: 54 bytes, params: 2, frame: 11
const type = relationship.type;
const FRIEND = RelationshipTypes.FRIEND;
if (type === FRIEND) {
value = environment.__proto__;
env1_0(relationship.user);
}
}
function _fun71941() { // fn#71941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9365:1832, offset: 0x01d3274b, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('RELATIONSHIP_ADD', handleRelationshipAdd_71940);
}
global.__d(_fun71934, 9180, [31, 27, 1867, 1878, 661, 33, 4501, 697, 6819, 566, 1244, 694, 3856, 6805, 6758, 9181,
4573,
2]) /* metro module 9180, dependencies: [31, 27, 1867, 1878, 661, 33, 4501, 697, 6819, 566, 1244, 694, 3856, 6805, 6758, 9181, 4573, 2] */;
@@ -1,262 +1,326 @@
/* Metro module 9207; source: modules/instant_invite/native/components/InstantInviteRow.tsx; dependencies: [31, 27, 1379, 9152, 1867, 9163, 1878, 9208, 4118, 33, 4501, 697, 566, 4805, 9153, 9209, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import CreateInviteModalStore from '../../../../stores/CreateInviteModalStore.tsx'; /* Metro dependency 9152 */
import InviteSuggestionsStore from '../../../../stores/InviteSuggestionsStore.tsx'; /* Metro dependency 9163 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 4118 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as InstantInviteUtilsModule from '../../../../utils/InstantInviteUtils.tsx'; /* Metro dependency 9153 */
import * as InstantInviteSendStateStoreModule from '../../InstantInviteSendStateStore.tsx'; /* Metro dependency 9208 */
import * as InviteQueueModule from '../../../../lib/InviteQueue.tsx'; /* Metro dependency 9209 */
function _fun72043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:6, offset: 0x01d37926, size: 431 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
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 inviteSuggestionsStore = importDefault(9163) /* metro dependency 9163: InviteSuggestionsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const instantInviteSendStateStoreModule = require(9208) /* metro dependency 9208: InstantInviteSendStateStore */;
const env0_9 = instantInviteSendStateStoreModule.setSendState;
const env0_10 = instantInviteSendStateStoreModule.useInstantInviteSendStates;
const env0_11 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'width': 32, 'height': 32, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden', 'marginTop': 0, 'marginRight': 10, 'borderColor': null,
'borderStyle': 'solid', 'borderWidth': 2};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object.borderColor = BORDER_MUTED;
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{acronym: object}]);
object2.borderColor = BORDER_MUTED;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [{acronym: object2}]);
value = value.memo(_fun72044);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteRow.tsx');
exports.default = value;
}
function _fun72044({row, code, onPressAvatar, onInviteSent, start, end, source}) { // fn#72044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:583, offset: 0x01d37ad5, size: 1488 bytes, params: 2, frame: 40
var r25;
var r13;
var r12;
var r14;
var r3;
var r2;
var r5;
var r6;
var r7;
var moduleValue4;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (PressablesModule).PressableOpacity;
var pressableOpacity;
var value18;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (TableRowNativeModule).TableRow;
const styles = useStyles();
const id = row.item.id;
const useStateFromStores = FluxModule.useStateFromStores;
const createInviteModalStoreBinding = CreateInviteModalStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[createInviteModalStoreBinding], function() {
return CreateInviteModalStore.isSubmitting();
}]);
const error = FluxModule.useStateFromStores([createInviteModalStoreBinding], function() {
return CreateInviteModalStore.getError();
});
const value4 = useInstantInviteSendStates(function(a0) {
var codeBinding = code;
var value2 = null;
return value2 != codeBinding ? value2 == a0[code] ? undefined : a0[code][id] : value2;
});
const channel = FluxModule.useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value5 = (UseChannelName)(channel);
if (code != null) {
var onPressSend2 = onPressSend;
var type = row.type;
var RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
pressableOpacity = (
<PressableOpacity
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}}
style={{'padding': 8, 'margin': -8}}
>
<Avatar
source={user?.getAvatarSource(undefined) ?? null}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
</PressableOpacity>
);
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
pressableOpacity = (
<PressableOpacity
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}}
style={{'padding': 8, 'margin': -8}}
>
<Avatar
source={user?.getAvatarSource(undefined) ?? null}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
</PressableOpacity>
);
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
if (channel != null) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r14 = (
<Avatar
source={Reflect.apply(makeSource, defaultImport3,
[defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id, size: 32})])}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
} else {
r14 = null;
}
r3 = value5 ?? '';
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r14, label: r3,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = (
<Avatar
source={Reflect.apply(makeSource, defaultImport, [defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon, size: 32})])}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32}
/>
);
} else {
moduleValue4 = require(1861) /* metro dependency 1861: StringUtils */;
r13 = (
<View style={styles.acronym}>
{((Text) => <Text variant="text-sm/bold">{moduleValue4.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
}
r12 = value5 == null ? '' : '#' + value5;
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r12,
trailing: ((Component) => <Component sendState={value4} onPressSend={onPressSend2} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: onPressSend2};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
}
return null;
function onPress_72049() { // fn#72049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:975, offset: 0x01d38118, size: 683 bytes, params: 1, frame: 21
var defaultImport;
var enqueue;
const InvitePropertiesType = (InviteQueueModule).InvitePropertiesType;
var channelStoreBinding;
var inviteSuggestionsStoreBinding;
var defaultImport2;
var defaultImport3;
var userStoreBinding;
const closure = function(a0) {
setSendState(code, id, a0 ? InviteSendStates.SENT : InviteSendStates.ERROR);
if (a0) {
if (onInviteSent != null) {
onInviteSent();
}
}
};
const setSendStateBinding = setSendState;
const codeBinding = code;
const idBinding = id;
const SENDING = InviteSendStates.SENDING;
setSendStateBinding(codeBinding, idBinding, SENDING);
const type = row.type;
const RowTypes = (InstantInviteUtilsModule).RowTypes;
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
if (code != null) {
defaultImport3 = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport3.enqueue;
userStoreBinding = UserStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport3, [{inviteKey: code, type: InvitePropertiesType.USER,
user: userStoreBinding.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
} else if (RowTypes.DM === type) {
if (code != null) {
defaultImport3 = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport3.enqueue;
userStoreBinding = UserStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport3, [{inviteKey: code, type: InvitePropertiesType.USER,
user: userStoreBinding.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
} else if (RowTypes.GROUP_DM === type) {
if (code != null) {
defaultImport2 = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport2.enqueue;
channelStoreBinding = ChannelStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport2, [{inviteKey: code, type: InvitePropertiesType.GROUP_DM,
channel: channelStoreBinding.getChannel(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
} else if (RowTypes.CHANNEL === type) {
if (code != null) {
defaultImport = importDefault(9209) /* metro dependency 9209: InviteQueue */;
enqueue = defaultImport.enqueue;
channelStoreBinding = ChannelStore;
inviteSuggestionsStoreBinding = InviteSuggestionsStore;
Reflect.apply(enqueue, defaultImport, [{inviteKey: code, type: InvitePropertiesType.CHANNEL,
channel: channelStoreBinding.getChannel(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: inviteSuggestionsStoreBinding.getSelectedInviteMetadata(row),
source: source}}, closure]);
}
}
}
function _fun72044({row, code, onPressAvatar, onInviteSent, start, end, source}) { // fn#72044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:583, offset: 0x01d37ad5, size: 1488 bytes, params: 2, frame: 40
var r25;
var r13;
var r12;
var r14;
var r3;
var r2;
var r5;
var r6;
var r7;
var moduleValue4;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var defaultImport;
var makeSource;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var user;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacity;
var value18;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const styles = useStyles();
const id = row.item.id;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.isSubmitting();
});
const error = (require(566) /* metro dependency 566: flux */).useStateFromStores([CreateInviteModalStore],
function() {
return CreateInviteModalStore.getError();
});
const value4 = useInstantInviteSendStates(function(a0) {
var codeBinding = code;
var value2 = null;
return value2 != codeBinding ? value2 == a0[code] ? undefined : a0[code][id] : value2;
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(id);
});
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
if (code != null) {
var closure = onPressSend;
var type = row.type;
var RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var DM = RowTypes.DM;
if (DM === type) {
user = UserStore.getUser(id);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
function O_72052({nativeEvent}) { // fn#72052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:2515, offset: 0x01d3843a, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={user?.getAvatarSource(undefined) ?? null} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
user = UserStore.getUser(id);
pressableOpacity = <PressableOpacity importantForAccessibility="no-hide-descendants" accessibilityElementsHidden onPress={function(a0) {
a0.stopPropagation();
if (onPressAvatar != null) {
onPressAvatar(id);
}
}} style={{'padding': 8,
'margin': -8}}><Avatar source={user?.getAvatarSource(undefined) ?? null} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} /></PressableOpacity>;
value18 = ((Component) => <Component nick={(importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(user)} user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */);
r2 = onPressAvatar != null ? [{name: 'viewProfile',
label: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.uCenkh,
{username: user?.tag})}] : undefined;
r5 = O_72052;
r6 = r2;
var tableRowProps = {start: start, end: end, icon: pressableOpacity, label: value18,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var GROUP_DM = RowTypes.GROUP_DM;
if (GROUP_DM === type) {
if (channel != null) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport3.makeSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r14 = <Avatar source={Reflect.apply(makeSource, defaultImport3,
[defaultImport4.getChannelIconURL({id: channel.id,
icon: channel.icon, applicationId: channel.application_id,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
r14 = null;
}
r3 = value5 ?? '';
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r14, label: r3,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
var CHANNEL = RowTypes.CHANNEL;
if (CHANNEL === type) {
r25 = channel?.guild_id != null ? GuildStore.getGuild(channel.guild_id) : undefined;
if (r25 == null) {
return null;
}
if (r25.icon != null) {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
makeSource = defaultImport.makeSource;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r13 = <Avatar source={Reflect.apply(makeSource, defaultImport,
[defaultImport2.getGuildIconURL({id: r25.id,
icon: r25.icon,
size: 32})])} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
} else {
moduleValue4 = require(1861) /* metro dependency 1861: StringUtils */;
r13 = <View style={styles.acronym}>{((Text) => <Text variant="text-sm/bold">{moduleValue4.getAcronym(r25.name)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
r12 = value5 == null ? '' : '#' + value5;
r5 = undefined;
r6 = undefined;
var tableRowProps = {start: start, end: end, icon: r13, label: r12,
trailing: ((Component) => <Component sendState={value4} onPressSend={closure} />)(importDefault(9211) /* metro dependency 9211: InviteButton */),
onPress: closure};
r7 = error != null || value3;
r7 = !r7 ? value4 === InviteSendStates.SENT : r7;
tableRowProps.disabled = r7;
tableRowProps.accessibilityActions = r6;
tableRowProps.onAccessibilityAction = r5;
return <TableRow {...tableRowProps} />;
}
}
return null;
}
function onPress_72049() { // fn#72049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:975, offset: 0x01d38118, size: 683 bytes, params: 1, frame: 21
const InvitePropertiesType = (require(9209) /* metro dependency 9209: InviteQueue */).InvitePropertiesType;
const closure = function(a0) {
setSendState(code, id, a0 ? InviteSendStates.SENT : InviteSendStates.ERROR);
if (a0) {
if (onInviteSent != null) {
onInviteSent();
}
}
};
const setSendStateBinding = setSendState;
const codeBinding = code;
const idBinding = id;
const SENDING = InviteSendStates.SENDING;
setSendStateBinding(codeBinding, idBinding, SENDING);
const type = row.type;
const RowTypes = (require(9153) /* metro dependency 9153: InstantInviteUtils */).RowTypes;
const FRIEND = RowTypes.FRIEND;
if (FRIEND === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.USER, user: UserStore.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
} else if (RowTypes.DM === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.USER, user: UserStore.getUser(id), location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
} else if (RowTypes.GROUP_DM === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.GROUP_DM, channel: ChannelStore.getChannel(id),
location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
} else if (RowTypes.CHANNEL === type) {
if (code != null) {
(importDefault(9209) /* metro dependency 9209: InviteQueue */).enqueue({inviteKey: code,
type: InvitePropertiesType.CHANNEL, channel: ChannelStore.getChannel(id),
location: 'Invite Action Sheet',
inviteAnalyticsMetadata: {suggestionData: InviteSuggestionsStore.getSelectedInviteMetadata(row),
source: source}}, closure);
}
}
}
function O_72052({nativeEvent}) { // fn#72052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9392:2515, offset: 0x01d3843a, size: 76 bytes, params: 2, frame: 11
if (nativeEvent.actionName === 'viewProfile' && onPressAvatar !== null) {
if (onPressAvatar != null) {
onPressAvatar(id);
}
}
}
global.__d(_fun72043, 9207, [31, 27, 1379, 9152, 1867, 9163, 1878, 9208, 4118, 33, 4501, 697, 566, 4805, 9153, 9209,
5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211,
2]) /* metro module 9207, dependencies: [31, 27, 1379, 9152, 1867, 9163, 1878, 9208, 4118, 33, 4501, 697, 566, 4805, 9153, 9209, 5278, 1305, 9210, 3995, 1244, 1423, 1861, 4573, 6238, 9211, 2] */;
@@ -1,93 +1,112 @@
/* Metro module 9171; source: modules/instant_invite/native/components/InstantInviteShareApps.tsx; dependencies: [57, 31, 27, 9172, 33, 4501, 697, 4584, 5321, 9204, 8341, 9176, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseFontScaleModule from '../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as InstantInviteConstantsModule from './InstantInviteConstants.tsx'; /* Metro dependency 9172 */
function _fun71892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:6, offset: 0x01d30a10, size: 324 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.ScrollView;
const instantInviteConstantsModule = require(9172) /* metro dependency 9172: InstantInviteConstants */;
const env0_7 = instantInviteConstantsModule.SHARE_ITEMS;
const env0_8 = instantInviteConstantsModule.SHARE_ITEMS_DEFAULT;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.padding = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.gap = PX_12;
object.alignItems = 'center';
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{contentContainer: object}]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const PX_16 = (Native).space.PX_16;
object2.padding = PX_16;
const PX_12 = (Native).space.PX_12;
object2.gap = PX_12;
object2.alignItems = 'center';
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [{contentContainer: object2}]);
value = value.memo(InstantInviteShareApps);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteShareApps.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InstantInviteShareApps.tsx');
exports.default = value;
}
function InstantInviteShareApps({onItemPressed, contentContainerStyle}) { // fn#71893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:345, offset: 0x01d30b54, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const env0_1 = (UseFontScaleModule).useFontScale();
const binding = env0_4;
const useState = binding.useState;
const value3 = Module00057(Reflect.apply(useState, binding, [SHARE_ITEMS_DEFAULT]), 2);
const property = value3[0];
const env0_2 = value3[1];
const value4 = binding.useMemo(_fun71894, []);
binding.useEffect(_fun71895, []);
const scrollView = (
<ScrollView
contentContainerStyle={[styles.contentContainer, contentContainerStyle]}
showsHorizontalScrollIndicator={false}
horizontal
>
{property.map(_fun71899)}
</ScrollView>
);
const GestureDetector = (Module05321Module).GestureDetector;
return (
<GestureDetector gesture={value4}>
{scrollView}
</GestureDetector>
);
function _fun71894() { // fn#71894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:507, offset: 0x01d30c62, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function InstantInviteShareApps({onItemPressed, contentContainerStyle}) { // fn#71893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:345, offset: 0x01d30b54, size: 270 bytes, params: 2, frame: 22
const styles = useStyles();
const env0_1 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const binding = env0_4;
const useState = binding.useState;
const value3 = env0_3(Reflect.apply(useState, binding, [SHARE_ITEMS_DEFAULT]), 2);
const property = value3[0];
const env0_2 = value3[1];
const value4 = binding.useMemo(_fun71894, []);
binding.useEffect(_fun71895, []);
const scrollView = <ScrollView contentContainerStyle={[styles.contentContainer,
contentContainerStyle]} showsHorizontalScrollIndicator={false} horizontal>{property.map(_fun71899)}</ScrollView>;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<GestureDetector gesture={value4}>
{scrollView}
</GestureDetector>
);
}
function _fun71895() { // fn#71895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:579, offset: 0x01d30c9a, size: 66 bytes, params: 1, frame: 14
var environment;
const Promise = global.Promise;
const all = Promise.all;
const value = environment.__proto__;
Reflect.apply(all, Promise, [SHARE_ITEMS.map(function(a0) {
return a0.isAvailable;
})]).then(_fun71897);
function _fun71897(a0) { // fn#71897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:629, offset: 0x01d30ce7, size: 46 bytes, params: 2, frame: 12
a0.forEach(_fun71898);
env1_2([]);
function _fun71898(a0, a1) { // fn#71898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:653, offset: 0x01d30d15, size: 41 bytes, params: 3, frame: 12
var value;
var binding;
var push;
if (a0) {
binding = env0_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [SHARE_ITEMS[a1]]);
}
}
function _fun71894() { // fn#71894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:507, offset: 0x01d30c62, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
return Gesture.Native().disallowInterruption(true);
}
}
function _fun71895() { // fn#71895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:579, offset: 0x01d30c9a, size: 66 bytes, params: 1, frame: 14
var environment;
const Promise = global.Promise;
const all = Promise.all;
const value = environment.__proto__;
Reflect.apply(all, Promise, [SHARE_ITEMS.map(function(a0) {
return a0.isAvailable;
})]).then(_fun71897);
}
}
function _fun71899({fullIcon, getLabel, icon, IconComponent, onPress, type}) { // fn#71899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:814, offset: 0x01d30d3e, size: 284 bytes, params: 2, frame: 27
var environment;
const value = environment.__proto__;
return (
<View style={{maxWidth: 76 * env0_1}} key={type}>
{fullIcon != null ? ((ImageButton) => <ImageButton image={fullIcon} label={getLabel()} onPress={function() {
return onItemPressed(onPress);
}} maxFontSizeMultiplier={2} />)((require(9204) /* metro dependency 9204: ImageButtonNative */).ImageButton) : ((IconButton) => <IconButton variant="secondary" icon={IconComponent ?? (icon ?? (importDefault(9176) /* metro dependency 9176 */))} label={getLabel()} onPress={onPress_71901} maxFontSizeMultiplier={2} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton)}
</View>
);
}
function _fun71899({fullIcon, getLabel, icon, IconComponent, onPress, type}) { // fn#71899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:814, offset: 0x01d30d3e, size: 284 bytes, params: 2, frame: 27
var environment;
const value = environment.__proto__;
return (
<View style={{maxWidth: 76 * env0_1}} key={type}>
{
fullIcon != null
? ((ImageButton) => <ImageButton image={fullIcon} label={getLabel()} onPress={function() {
return onItemPressed(onPress);
}} maxFontSizeMultiplier={2} />)((require(9204) /* metro dependency 9204: ImageButtonNative */).ImageButton)
: ((IconButton) => <IconButton variant="secondary" icon={IconComponent ?? (icon ?? (importDefault(9176) /* metro dependency 9176 */))} label={getLabel()} onPress={onPress_71901} maxFontSizeMultiplier={2} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton)
}
</View>
);
function onPress_71901() { // fn#71901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:1104, offset: 0x0102838e, size: 23 bytes, params: 1, frame: 11
return onItemPressed(onPress);
}
function _fun71897(a0) { // fn#71897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:629, offset: 0x01d30ce7, size: 46 bytes, params: 2, frame: 12
a0.forEach(_fun71898);
env1_2([]);
}
}
function _fun71898(a0, a1) { // fn#71898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9356:653, offset: 0x01d30d15, size: 41 bytes, params: 3, frame: 12
var value;
var binding;
var push;
if (a0) {
binding = env0_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [SHARE_ITEMS[a1]]);
}
}
global.__d(_fun71892, 9171, [57, 31, 27, 9172, 33, 4501, 697, 4584, 5321, 9204, 8341, 9176,
2]) /* metro module 9171, dependencies: [57, 31, 27, 9172, 33, 4501, 697, 4584, 5321, 9204, 8341, 9176, 2] */;
@@ -1,72 +1,79 @@
/* Metro module 9211; source: modules/instant_invite/native/components/InviteButton.tsx; dependencies: [31, 27, 4118, 33, 4501, 1244, 4578, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 4118 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun72071(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9396:6, offset: 0x01d38cd0, size: 231 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(4118) /* metro dependency 4118: Constants */).InviteSendStates;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonWrapper: {'minWidth': 66,
let value = ReactModule;
const env0_5 = (CreateStylesModule).createStyles({buttonWrapper: {'minWidth': 66,
'flexDirection': 'row'}});
value = value.memo(_fun72072);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/InviteButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/InviteButton.tsx');
exports.default = value;
function _fun72072({sendState, disabled, onPressSend}) { // fn#72072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9396:246, offset: 0x01d38db7, size: 479 bytes, params: 2, frame: 21
var r7;
var r9;
var value2;
var value4;
var value5;
var value6;
var value7;
var value9;
var value10;
if (disabled === undefined) {
disabled = false;
}
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
const SENDING = InviteSendStates.SENDING;
if (SENDING === sendState) {
value9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
value10 = true;
disabled = false;
r7 = value10;
r9 = value9;
} else if (InviteSendStates.SENT === sendState) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dVT149);
value7 = false;
disabled = true;
r7 = value7;
r9 = value6;
} else if (InviteSendStates.ERROR === sendState) {
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wNcfpX);
value5 = false;
disabled = value5;
r7 = value5;
r9 = value4;
} else {
value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
r7 = false;
r9 = value2;
}
const Button = (ButtonNativeModule).Button;
return (
<View style={styles.buttonWrapper}>
<Button
accessibilityRole="none"
size="sm"
variant="secondary"
text={r9}
onPress={onPressSend}
disabled={disabled || r7}
grow
/>
</View>
);
}
}
function _fun72072({sendState, disabled, onPressSend}) { // fn#72072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9396:246, offset: 0x01d38db7, size: 479 bytes, params: 2, frame: 21
var r7;
var r9;
var value2;
var value4;
var value5;
var value6;
var value7;
var value9;
var value10;
if (disabled === undefined) {
disabled = false;
}
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
const SENDING = InviteSendStates.SENDING;
if (SENDING === sendState) {
value9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
value10 = true;
disabled = false;
r7 = value10;
r9 = value9;
} else if (InviteSendStates.SENT === sendState) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dVT149);
value7 = false;
disabled = true;
r7 = value7;
r9 = value6;
} else if (InviteSendStates.ERROR === sendState) {
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wNcfpX);
value5 = false;
disabled = value5;
r7 = value5;
r9 = value4;
} else {
value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYnGPG);
r7 = false;
r9 = value2;
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={styles.buttonWrapper}>
<Button
accessibilityRole="none"
size="sm"
variant="secondary"
text={r9}
onPress={onPressSend}
disabled={disabled || r7}
grow
/>
</View>
);
}
global.__d(_fun72071, 9211, [31, 27, 4118, 33, 4501, 1244, 4578,
2]) /* metro module 9211, dependencies: [31, 27, 4118, 33, 4501, 1244, 4578, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 9159; source: modules/instant_invite/native/components/openInstantInviteActionSheet.tsx; dependencies: [4080, 9160, 1962, 480, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun71821(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9344:6, offset: 0x01d2df34, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/components/openInstantInviteActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/components/openInstantInviteActionSheet.tsx');
exports.default = openInstantInviteActionSheet;
function openInstantInviteActionSheet(a0) { // fn#71822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9344:209, offset: 0x01d2df9b, size: 231 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths);
const value3 = 'InstantInviteActionSheet-' + (a0.vanityURLCode ?? a0.channel.id);
const object = {};
copyDataProperties(object, a0, undefined);
const ImpressionNames = require(dependencyMap[3]).ImpressionNames;
const GUILD_INVITE = ImpressionNames.GUILD_INVITE;
object['impressionName'] = GUILD_INVITE;
object['impressionProperties'] = {invite_channel_id: a0.channel.id, invite_guild_id: a0.channel.guild_id};
Reflect.apply(openLazy, defaultImport, [value2, value3, object, a0.stackingBehavior]);
}
}
function openInstantInviteActionSheet(a0) { // fn#71822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9344:209, offset: 0x01d2df9b, size: 231 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths);
const value3 = 'InstantInviteActionSheet-' + (a0.vanityURLCode ?? a0.channel.id);
const object2 = {};
copyDataProperties(object2, a0, undefined);
const ImpressionNames = require(dependencyMap[3]).ImpressionNames;
const GUILD_INVITE = ImpressionNames.GUILD_INVITE;
object2['impressionName'] = GUILD_INVITE;
object2['impressionProperties'] = {invite_channel_id: a0.channel.id, invite_guild_id: a0.channel.guild_id};
Reflect.apply(openLazy, defaultImport, [value2, value3, object2, a0.stackingBehavior]);
}
global.__d(_fun71821, 9159, [4080, 9160, 1962, 480,
2]) /* metro module 9159, dependencies: [4080, 9160, 1962, 480, 2] */;
@@ -1,68 +1,77 @@
/* Metro module 9162; source: modules/instant_invite/native/useInviteSuggestionRows.tsx; dependencies: [57, 31, 1945, 1867, 9163, 4118, 661, 482, 566, 683, 9164, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import InviteSuggestionsStore from '../../../stores/InviteSuggestionsStore.tsx'; /* Metro dependency 9163 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsModule3 from '../Constants.tsx'; /* Metro dependency 4118 */
import * as InviteSuggestionsActionCreatorsModule from '../../../actions/InviteSuggestionsActionCreators.tsx'; /* Metro dependency 9164 */
function _fun71841(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:6, offset: 0x01d2f376, size: 251 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const inviteSuggestionsStore = importDefault(9163) /* metro dependency 9163: InviteSuggestionsStore */;
const env0_8 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(482) /* metro dependency 482: Constants */).NOOP_NULL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/instant_invite/native/useInviteSuggestionRows.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/useInviteSuggestionRows.tsx');
exports.default = _default_71842;
}
function _default_71842(a0, a1, a2, a3) { // fn#71842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:228, offset: 0x01d2f471, size: 225 bytes, params: 5, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const inviteSuggestionRows = (require(566) /* metro dependency 566: flux */).useStateFromStores([InviteSuggestionsStore],
function() {
return InviteSuggestionsStore.getInviteSuggestionRows();
});
const binding = inviteSuggestionRows;
const value = env0_3(binding.useState(true), 2);
const property = value[0];
const env0_6 = value[1];
binding.useEffect(_fun71844, [inviteSuggestionRows, a0, property, a3, a1]);
binding.useEffect(_fun71845, [a0, a2]);
return {rows: inviteSuggestionRows, isFetchingRows: property};
function _fun71844() { // fn#71844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:372, offset: 0x01d2f565, size: 164 bytes, params: 1, frame: 16
var value2;
var initialCounts;
var defaultImport;
if (!env0_5) {
value2 = environment.__proto__;
initialCounts = InviteSuggestionsStore.getInitialCounts();
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.INVITE_SUGGESTION_OPENED, {location: require,
num_suggestions: inviteSuggestionRows.length, guild_id: env0_0.guild_id,
num_friends: initialCounts.numFriends,
num_dms: initialCounts.numDms, num_group_dms: initialCounts.numGroupDms, application_id: importAll});
}
}
function _default_71842(a0, a1, a2, a3) { // fn#71842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:228, offset: 0x01d2f471, size: 225 bytes, params: 5, frame: 20
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const inviteSuggestionRows = (require(566) /* metro dependency 566: flux */).useStateFromStores([InviteSuggestionsStore],
function() {
return InviteSuggestionsStore.getInviteSuggestionRows();
});
const binding = inviteSuggestionRows;
const value = env0_3(binding.useState(true), 2);
const property = value[0];
const env0_6 = value[1];
binding.useEffect(_fun71844, [inviteSuggestionRows, a0, property, a3, a1]);
binding.useEffect(_fun71845, [a0, a2]);
return {rows: inviteSuggestionRows, isFetchingRows: property};
}
function _fun71845() { // fn#71845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:627, offset: 0x01d2f609, size: 214 bytes, params: 1, frame: 18
env0_6(true);
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
const r8 = importDefault === EMBEDDED_APPLICATION ? [] : GuildMemberStore.getMemberIds(env0_0.guild_id);
const loadInviteSuggestions = InviteSuggestionsActionCreatorsModule.loadInviteSuggestions;
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(r8);
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
const binding = env0_0;
let value = Reflect.apply(loadInviteSuggestions, InviteSuggestionsActionCreatorsModule,
[{omitUserIds: set instanceof Object ? set : value4, guild: Reflect.apply(getGuild, guildStoreBinding,
[binding.guild_id]), channel: binding, inviteTargetType: importDefault}]);
value = value.catch(NOOP_NULL);
value.finally(_fun71846);
function _fun71846() { // fn#71846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:834, offset: 0x0171ce63, size: 18 bytes, params: 1, frame: 11
env1_6(false);
}
}
function _fun71844() { // fn#71844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:372, offset: 0x01d2f565, size: 164 bytes, params: 1, frame: 16
var value2;
var initialCounts;
var defaultImport;
if (!env0_5) {
value2 = environment.__proto__;
initialCounts = InviteSuggestionsStore.getInitialCounts();
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.INVITE_SUGGESTION_OPENED, {location: require,
num_suggestions: inviteSuggestionRows.length, guild_id: env0_0.guild_id,
num_friends: initialCounts.numFriends,
num_dms: initialCounts.numDms, num_group_dms: initialCounts.numGroupDms, application_id: importAll});
}
}
function _fun71845() { // fn#71845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:627, offset: 0x01d2f609, size: 214 bytes, params: 1, frame: 18
env0_6(true);
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
const r8 = importDefault === EMBEDDED_APPLICATION ? [] : GuildMemberStore.getMemberIds(env0_0.guild_id);
const inviteSuggestionsActionCreatorsModule = require(9164) /* metro dependency 9164: InviteSuggestionsActionCreators */;
const loadInviteSuggestions = inviteSuggestionsActionCreatorsModule.loadInviteSuggestions;
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(r8);
const getGuild = GuildStore.getGuild;
const binding = env0_0;
let value = Reflect.apply(loadInviteSuggestions, inviteSuggestionsActionCreatorsModule,
[{omitUserIds: set instanceof Object ? set : value4, guild: Reflect.apply(getGuild, GuildStore,
[binding.guild_id]), channel: binding, inviteTargetType: importDefault}]);
value = value.catch(NOOP_NULL);
value.finally(_fun71846);
}
global.__d(_fun71841, 9162, [57, 31, 1945, 1867, 9163, 4118, 661, 482, 566, 683, 9164,
2]) /* metro module 9162, dependencies: [57, 31, 1945, 1867, 9163, 4118, 661, 482, 566, 683, 9164, 2] */;