Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,75 @@
|
||||
/* Metro module 11740; source: modules/polls/PollAttachmentUtils.tsx; dependencies: [5, 7217, 2] */
|
||||
function _fun89994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:6, offset: 0x020264fa, size: 165 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_1 = (require(7217) /* metro dependency 7217: PollsConstants */).POLL_ATTACHMENT_FOLDER;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollAttachmentUtils.tsx');
|
||||
exports.getFileNameFromGifUrl = function(a0, a1) {
|
||||
var value = (0, global.decodeURIComponent)(a1);
|
||||
value = value.split('/');
|
||||
value = value.pop();
|
||||
return '' + a0 + '-' + (value ?? 'temp.gif');
|
||||
};
|
||||
exports.getFilePathForGif = function(a0) {
|
||||
return POLL_ATTACHMENT_FOLDER + '/' + a0;
|
||||
};
|
||||
exports.downloadPollGif = function() {
|
||||
return _downloadPollGif.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _downloadPollGif() { // fn#89995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:139, offset: 0x0202659f, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_0(_fun89997).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun89997(a0) { // fn#89997, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:194, offset: 0x020265dc, size: 81 bytes, params: 2, frame: 13
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
yield global.fetch(a0);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
yield value.blob();
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return ((a0) => {
|
||||
var env0_0 = a0;
|
||||
var property = global.FileReader;
|
||||
var env0_1 = new property();
|
||||
property = global.Promise;
|
||||
value2 = Object.create(property.prototype, {constructor: {value: property}});
|
||||
var value3 = new property(_fun89999);
|
||||
return value3 instanceof Object ? value3 : value2;
|
||||
})(value);
|
||||
}
|
||||
|
||||
function convertBlobToBase64(a0) { // fn#89998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:235, offset: 0x0202662d, size: 76 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const FileReader = global.FileReader;
|
||||
let fileReader = new FileReader();
|
||||
const Promise = global.Promise;
|
||||
fileReader = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun89999);
|
||||
return promise instanceof Object ? promise : fileReader;
|
||||
}
|
||||
|
||||
function _fun89999(a0, a1) { // fn#89999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:308, offset: 0x02026679, size: 57 bytes, params: 3, frame: 11
|
||||
const env0_0 = a0;
|
||||
const binding = env0_1;
|
||||
binding.onload = onload_90000;
|
||||
binding.onerror = a1;
|
||||
binding.readAsDataURL(env0_0);
|
||||
}
|
||||
|
||||
function onload_90000() { // fn#90000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:325, offset: 0x020266b2, size: 53 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = env1_1.result.split(',');
|
||||
value = value.pop();
|
||||
env0_0(value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 11198; source: modules/polls/PollInteractionUtils.native.tsx; dependencies: [4080, 11199, 1962, 2] */
|
||||
function _fun85566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11384:6, offset: 0x01f739f6, 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/polls/PollInteractionUtils.native.tsx');
|
||||
exports.showVotesForAnswer = showVotesForAnswer;
|
||||
}
|
||||
|
||||
function showVotesForAnswer({message, initialAnswerId}) { // fn#85567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11384:192, offset: 0x01f73a5d, size: 118 bytes, params: 2, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'PollVotesActionSheet', {channelId: message.channel_id,
|
||||
messageId: message.id, initialAnswerId: initialAnswerId}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 11741; source: modules/polls/PollTypes.tsx; dependencies: [2] */
|
||||
function _fun90004(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11927:6, offset: 0x0202675a, size: 110 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollTypes.tsx');
|
||||
exports.PollMediaUploadAttachmentStatus = {PREPARING: 'PREPARING', READY_TO_UPLOAD: 'READY_TO_UPLOAD',
|
||||
ERROR: 'ERROR'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,643 @@
|
||||
/* Metro module 11739; source: modules/polls/PollUploadAttachmentActionCreators.native.tsx; dependencies: [5, 4645, 7217, 11740, 11218, 4660, 4650, 7879, 2] */
|
||||
function _fun89980(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:6, offset: 0x0202605e, size: 234 bytes, params: 8, frame: 19
|
||||
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 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const env0_5 = (require(7217) /* metro dependency 7217: PollsConstants */).POLL_ATTACHMENT_FOLDER;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollUploadAttachmentActionCreators.native.tsx');
|
||||
exports.handlePollGifAttachmentAdd = function() {
|
||||
return _handlePollGifAttachmentAdd.apply(this, arguments);
|
||||
};
|
||||
exports.handlePollMediaAttachmentAdd = function() {
|
||||
};
|
||||
exports.removePollUploadAttachment = function() {
|
||||
return _removePollUploadAttachment.apply(this, arguments);
|
||||
};
|
||||
exports.removeAllPollUploadAttachments = function() {
|
||||
return _removeAllPollUploadAttachments.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _handlePollGifAttachmentAdd() { // fn#89981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:159, offset: 0x02026148, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun89983).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _removePollUploadAttachment() { // fn#89984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:815, offset: 0x0202636e, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun89986).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _removeAllPollUploadAttachments() { // fn#89987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:1040, offset: 0x02026444, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun89989).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun89983(a0, a1, a2) { // fn#89983, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:236, offset: 0x02026185, size: 489 bytes, params: 4, frame: 27
|
||||
var width;
|
||||
var height;
|
||||
var binding2;
|
||||
var property;
|
||||
var value6;
|
||||
var downloadPollGif;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var binding3;
|
||||
var value11;
|
||||
var getFilePathForGif;
|
||||
var value12;
|
||||
var value13;
|
||||
var writeFile;
|
||||
var value14;
|
||||
var value15;
|
||||
var value16;
|
||||
var value17;
|
||||
var binding4;
|
||||
var value18;
|
||||
var getImageDimensionsIfMissing;
|
||||
var value19;
|
||||
var value20;
|
||||
var value21;
|
||||
var object3;
|
||||
var binding5;
|
||||
var value22;
|
||||
var UploadOrigin;
|
||||
var IMAGE_PICKER;
|
||||
var value23;
|
||||
var value24;
|
||||
var binding6;
|
||||
var value25;
|
||||
var UploadPlatform;
|
||||
var REACT_NATIVE;
|
||||
var value26;
|
||||
var addFile;
|
||||
var object4;
|
||||
var Poll;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = undefined;
|
||||
let binding = env2_0;
|
||||
const fileNameFromGifUrl = binding(env2_2[3]).getFileNameFromGifUrl(a1, a2);
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding2[3];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value6 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
downloadPollGif = value6.downloadPollGif;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value7 = Reflect.apply(downloadPollGif, value6, [a2]);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
yield value7;
|
||||
try {
|
||||
value8 = undefined;
|
||||
value9 = false;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (value9) {
|
||||
return value8;
|
||||
}
|
||||
try {
|
||||
value10 = value8 == null;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (value10) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding3[3];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value11 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
getFilePathForGif = value11.getFilePathForGif;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value12 = Reflect.apply(getFilePathForGif, value11, [fileNameFromGifUrl]);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding3[4];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value13 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
writeFile = value13.writeFile;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value14 = Reflect.apply(writeFile, value13, ['cache', value12, value8, 'base64']);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
yield value14;
|
||||
try {
|
||||
value15 = undefined;
|
||||
value16 = false;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (!value16) {
|
||||
try {
|
||||
value17 = value15 == null;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (value17) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_2;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding4[5];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value18 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
getImageDimensionsIfMissing = value18.getImageDimensionsIfMissing;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value19 = Reflect.apply(getImageDimensionsIfMissing, value18, [value15]);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
yield value19;
|
||||
try {
|
||||
value20 = undefined;
|
||||
value21 = false;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (value21) {
|
||||
return value20;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.id = a1;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding5 = env2_2;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding5[6];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value22 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
UploadOrigin = value22.UploadOrigin;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
IMAGE_PICKER = UploadOrigin.IMAGE_PICKER;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.origin = IMAGE_PICKER;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.uri = value15;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.originalUri = value15;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.filename = fileNameFromGifUrl;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.mimeType = 'image/gif';
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value23 = value20 == null;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (value23) {
|
||||
width = value;
|
||||
} else {
|
||||
try {
|
||||
width = value20.width;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
try {
|
||||
object3.width = width;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value24 = value20 == null;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
if (value24) {
|
||||
height = value;
|
||||
} else {
|
||||
try {
|
||||
height = value20.height;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
try {
|
||||
object3.height = height;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding6 = env2_2;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding6[6];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value25 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
UploadPlatform = value25.UploadPlatform;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
REACT_NATIVE = UploadPlatform.REACT_NATIVE;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object3.platform = REACT_NATIVE;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
property = binding6[7];
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
value26 = binding(property);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
addFile = value26.addFile;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object4.file = object3;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object4.channelId = a0;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
Poll = binding.Poll;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
object4.draftType = Poll;
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(addFile, value26, [object4]);
|
||||
} catch (error) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return value15;
|
||||
}
|
||||
|
||||
function* _fun89986(a0, a1, a2) { // fn#89986, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:892, offset: 0x020263ab, size: 153 bytes, params: 4, frame: 20
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var remove;
|
||||
var Poll;
|
||||
var removeFile;
|
||||
var value4;
|
||||
var getFilePathForGif;
|
||||
var value5;
|
||||
var value6;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[7];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
remove = value3.remove;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Poll = binding.Poll;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(remove, value3, [a0, a1, Poll]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[4];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
removeFile = value.removeFile;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[3];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
getFilePathForGif = value4.getFilePathForGif;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(getFilePathForGif, value4, [a2]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(removeFile, value, ['cache', value5]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value6 = false;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
if (value6) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun89989(a0) { // fn#89989, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11925:1125, offset: 0x02026481, size: 121 bytes, params: 2, frame: 17
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var clearAll;
|
||||
var Poll;
|
||||
var value4;
|
||||
var clearFolder;
|
||||
var value5;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[7];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
clearAll = value3.clearAll;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_4;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Poll = binding.Poll;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(clearAll, value3, [a0, Poll]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[4];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
clearFolder = value4.clearFolder;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(clearFolder, value4, ['cache', binding]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
if (value5) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,39 @@
|
||||
/* Metro module 7217; source: modules/polls/PollsConstants.tsx; dependencies: [1346, 2] */
|
||||
function _fun57716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7395:6, offset: 0x016b4384, size: 380 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const ExpressionPickerViewType = (require(1346) /* metro dependency 1346: ExpressionPickerConstants */).ExpressionPickerViewType;
|
||||
object2 = {ONE_HOUR: 1};
|
||||
object2[1] = 'ONE_HOUR';
|
||||
object2.FOUR_HOURS = 4;
|
||||
object2[4] = 'FOUR_HOURS';
|
||||
object2.EIGHT_HOURS = 8;
|
||||
object2[8] = 'EIGHT_HOURS';
|
||||
object2.ONE_DAY = 24;
|
||||
object2[24] = 'ONE_DAY';
|
||||
object2.THREE_DAYS = 72;
|
||||
object2[72] = 'THREE_DAYS';
|
||||
object2.SEVEN_DAYS = 168;
|
||||
object2[168] = 'SEVEN_DAYS';
|
||||
object2.FOURTEEN_DAYS = 336;
|
||||
object2[336] = 'FOURTEEN_DAYS';
|
||||
const Set = global.Set;
|
||||
const GIF = ExpressionPickerViewType.GIF;
|
||||
const EMOJI = ExpressionPickerViewType.EMOJI;
|
||||
const set = new Set([GIF, EMOJI]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollsConstants.tsx');
|
||||
exports.POLL_ATTACHMENT_FOLDER = 'polls';
|
||||
exports.POLL_CREATION_MODAL_KEY = 'POLL_CREATION_MODAL_KEY';
|
||||
exports.POLL_CREATION_IMAGE_INPUT_ACTION_SHEET_KEY = 'PollsImageInputActionSheet';
|
||||
exports.POLL_CREATION_DURATION_ACTION_SHEET_KEY = 'PollsDurationActionSheet';
|
||||
exports.MIN_NUMBER_OF_ANSWERS_PER_POLL = 1;
|
||||
exports.MAX_NUMBER_OF_ANSWERS_PER_POLL = 10;
|
||||
exports.MAX_POLL_QUESTION_LENGTH = 300;
|
||||
exports.MAX_POLL_ANSWER_LENGTH = 55;
|
||||
exports.VOTES_TOOLTIP_MAX_USERS = 3;
|
||||
exports.POLL_RESULT_MESSAGE_POLL_TITLE_MAX_VISIBLE_CHARS = 50;
|
||||
exports.PollDurations = object2;
|
||||
exports.POLLS_SUPPORTED_EXPRESSION_PICKER_VIEW_TYPES = set;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,426 @@
|
||||
/* Metro module 11203; source: modules/polls/PollsHttpApi.tsx; dependencies: [5, 661, 507, 4131, 2] */
|
||||
function _fun85603(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:6, offset: 0x01f75456, size: 171 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollsHttpApi.tsx');
|
||||
exports.submitPollVote = function() {
|
||||
return _submitPollVote.apply(this, arguments);
|
||||
};
|
||||
exports.endPollEarly = function() {
|
||||
return _endPollEarly_85607.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _submitPollVote() { // fn#85604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:128, offset: 0x01f75501, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun85606).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _endPollEarly_85607() { // fn#85607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:390, offset: 0x01f75611, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun85609).apply(this, arguments);
|
||||
}
|
||||
|
||||
async function _fun85606({channelId, messageId, answerIds}) { // fn#85606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:181, offset: 0x01f75547, size: 202 bytes, params: 2, frame: 20
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var HTTP;
|
||||
var put;
|
||||
var object3;
|
||||
var POLL_ANSWERS;
|
||||
var value5;
|
||||
var object4;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var APIError;
|
||||
var prototype;
|
||||
var aPIError;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_1;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
property = binding2[2];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
HTTP = value4.HTTP;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
put = HTTP.put;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
POLL_ANSWERS = binding.POLL_ANSWERS;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(POLL_ANSWERS, binding, [channelId, messageId]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.url = value5;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object4.answer_ids = answerIds;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.body = object4;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.rejectWithError = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(put, HTTP, [object3]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
await value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
return value8 ? value7 : undefined;
|
||||
}
|
||||
|
||||
async function _fun85609({channelId, messageId}) { // fn#85609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:439, offset: 0x01f75657, size: 183 bytes, params: 2, frame: 19
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var HTTP;
|
||||
var post;
|
||||
var object2;
|
||||
var POLL_EXPIRE;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var APIError;
|
||||
var prototype;
|
||||
var aPIError;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_1;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
property = binding2[2];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
HTTP = value4.HTTP;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
post = HTTP.post;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
POLL_EXPIRE = binding.POLL_EXPIRE;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(POLL_EXPIRE, binding, [channelId, messageId]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object2.url = value5;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object2.rejectWithError = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(post, HTTP, [object2]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
await value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
APIError = binding(env2_1[3]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
throw value;
|
||||
}
|
||||
return value8 ? value7 : undefined;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
/* Metro module 8432; source: modules/polls/PollsInteractionStore.tsx; dependencies: [685, 690, 628, 21, 2] */
|
||||
function _fun66957(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:6, offset: 0x01c10ea9, size: 211 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = {};
|
||||
const env0_4 = (require(685) /* metro dependency 685 */).createWithEqualityFn(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return {pollsByChannelId: {}, pollsByMessageId: {}, updatePollState: _fun66959};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollsInteractionStore.tsx');
|
||||
exports.useMessagePollInteractions = useMessagePollInteractions;
|
||||
exports.useChannelPollInteractions = useChannelPollInteractions;
|
||||
exports.clearChannelPollState = clearChannelPollState;
|
||||
exports.clearPollState = clearPollState;
|
||||
exports.updatePollState = updatePollState;
|
||||
exports.getPollState = getPollState;
|
||||
}
|
||||
|
||||
function _fun66958(a0) { // fn#66958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:133, offset: 0x01c10f7c, size: 39 bytes, params: 2, frame: 3
|
||||
const env0_0 = a0;
|
||||
return {pollsByChannelId: {}, pollsByMessageId: {}, updatePollState: updatePollState_66959};
|
||||
}
|
||||
|
||||
function useMessagePollInteractions(a0) { // fn#66962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:536, offset: 0x01c11088, size: 53 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_4(function(a0) {
|
||||
a0.forEach(_fun66964);
|
||||
return {};
|
||||
}, importDefault(628) /* metro dependency 628: shallowEqual */);
|
||||
}
|
||||
|
||||
function useChannelPollInteractions(a0) { // fn#66965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:712, offset: 0x01c1110c, size: 53 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_4(_fun66966, importDefault(628) /* metro dependency 628: shallowEqual */);
|
||||
}
|
||||
|
||||
function clearChannelPollState(a0) { // fn#66967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:850, offset: 0x01c11164, size: 54 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun66968);
|
||||
}
|
||||
|
||||
function clearPollState(a0, a1) { // fn#66971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:1147, offset: 0x01c1124c, size: 61 bytes, params: 3, frame: 12
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun66972);
|
||||
}
|
||||
|
||||
function updatePollState(a0, a1, a2) { // fn#66974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:1412, offset: 0x01c11311, size: 43 bytes, params: 4, frame: 15
|
||||
env0_4.getState().updatePollState(a0, a1, a2);
|
||||
}
|
||||
|
||||
function getPollState(a0, a1) { // fn#66975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:1496, offset: 0x01c1133c, size: 50 bytes, params: 3, frame: 10
|
||||
const binding = env0_4;
|
||||
const getState = binding.getState;
|
||||
return Reflect.apply(getState, binding, []).pollsByChannelId[a0]?.[a1];
|
||||
}
|
||||
|
||||
function updatePollState_66959(a0, a1, a2) { // fn#66959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:178, offset: 0x01c10fa3, size: 68 bytes, params: 4, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun66960);
|
||||
}
|
||||
|
||||
function _fun66963(a0) { // fn#66963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:585, offset: 0x01c110bd, size: 41 bytes, params: 2, frame: 12
|
||||
a0.forEach(_fun66964);
|
||||
return {};
|
||||
}
|
||||
|
||||
function _fun66966({pollsByChannelId}) { // fn#66966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:761, offset: 0x01c11141, size: 35 bytes, params: 2, frame: 2
|
||||
return pollsByChannelId[env0_0] ?? env1_3;
|
||||
}
|
||||
|
||||
function _fun66968() { // fn#66968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:906, offset: 0x01c1119a, size: 31 bytes, params: 1, frame: 11
|
||||
env1_4.setState(_fun66969);
|
||||
}
|
||||
|
||||
function _fun66972() { // fn#66972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:1198, offset: 0x01c11289, size: 31 bytes, params: 1, frame: 11
|
||||
env1_4.setState(_fun66973);
|
||||
}
|
||||
|
||||
function _fun66960() { // fn#66960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:223, offset: 0x01c10fe7, size: 25 bytes, params: 1, frame: 11
|
||||
env1_0(_fun66961);
|
||||
}
|
||||
|
||||
function _fun66964(a0) { // fn#66964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:616, offset: 0x01c110e6, size: 38 bytes, params: 2, frame: 4
|
||||
const property = env0_0.pollsByMessageId[a0];
|
||||
if (property != null) {
|
||||
env0_1[a0] = property;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun66969({pollsByChannelId, pollsByMessageId}) { // fn#66969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:923, offset: 0x01c111b9, size: 147 bytes, params: 2, frame: 18
|
||||
const value4 = importDefault(dependencyMap[3]).keys(pollsByChannelId[env1_0] ?? env2_3);
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, pollsByMessageId, dependencyMap);
|
||||
value4.forEach(_fun66970);
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, pollsByChannelId, dependencyMap);
|
||||
delete object4[env1_0];
|
||||
return {pollsByChannelId: object4, pollsByMessageId: object3};
|
||||
}
|
||||
|
||||
function _fun66973({pollsByChannelId, pollsByMessageId}) { // fn#66973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:1215, offset: 0x01c112a8, size: 105 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, pollsByChannelId[env1_0] ?? ({}), pollsByChannelId);
|
||||
delete object2[require];
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, pollsByMessageId, pollsByChannelId);
|
||||
delete object4[require];
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, pollsByChannelId, pollsByChannelId);
|
||||
object6[env1_0] = object2;
|
||||
return {pollsByChannelId: object6, pollsByMessageId: object4};
|
||||
}
|
||||
|
||||
function _fun66961(a0) { // fn#66961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8617:231, offset: 0x01c11000, size: 136 bytes, params: 2, frame: 17
|
||||
let pollsByChannelId = a0.pollsByChannelId;
|
||||
const defaultImport = importDefault(pollsByChannelId[env1_0]?.[require]);
|
||||
const object5 = {};
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, a0.pollsByChannelId, undefined);
|
||||
const binding = env1_0;
|
||||
const object7 = {};
|
||||
pollsByChannelId = a0.pollsByChannelId;
|
||||
const value3 = copyDataProperties(object7, pollsByChannelId[binding], pollsByChannelId);
|
||||
object7[require] = defaultImport;
|
||||
object6[binding] = object7;
|
||||
object5.pollsByChannelId = object6;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, a0.pollsByMessageId, value3);
|
||||
object8[require] = defaultImport;
|
||||
object5.pollsByMessageId = object8;
|
||||
return object5;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,460 @@
|
||||
/* Metro module 7149; source: modules/polls/PollsUtils.tsx; dependencies: [1379, 7150, 4814, 3784, 3793, 7217, 661, 491, 566, 5225, 672, 1862, 4634, 1244, 7152, 22, 4617, 2] */
|
||||
function _fun57179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:6, offset: 0x013de7bf, size: 490 bytes, params: 8, frame: 24
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_57182 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = generateLocalCreationAnswerId;
|
||||
const closure2 = function({text}) {
|
||||
var r1;
|
||||
r1 = text?.trim();
|
||||
return r1 != null && r1.length > 0;
|
||||
};
|
||||
const closure3 = function(a0) {
|
||||
var Date = global.Date;
|
||||
var Date2 = global.Date;
|
||||
var value = Date2.now();
|
||||
var HOUR = importDefault(dependencyMap[10]).Millis.HOUR;
|
||||
value += a0 * HOUR;
|
||||
value = new Date(value);
|
||||
return value.toISOString();
|
||||
};
|
||||
const closure4 = getSampleOfVoterUsernamesForAnswer;
|
||||
const closure5 = formatVoterTooltipText;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const messageReactionsStore = importDefault(7150) /* metro dependency 7150: MessageReactionsStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
let value = require(7217) /* metro dependency 7217: PollsConstants */;
|
||||
const env0_8 = value.POLL_RESULT_MESSAGE_POLL_TITLE_MAX_VISIBLE_CHARS;
|
||||
const env0_9 = value.VOTES_TOOLTIP_MAX_USERS;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.ChannelTypesSets;
|
||||
const env0_11 = value.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/PollsUtils.tsx');
|
||||
exports.generateEmptyPollAnswer = function() {
|
||||
var object = {text: undefined, image: undefined};
|
||||
object.localCreationAnswerId = generateLocalCreationAnswerId();
|
||||
return object;
|
||||
};
|
||||
exports.generateLocalCreationAnswerId = closure;
|
||||
exports.filterOutUUID = function(a0) {
|
||||
return a0.replace(RegExp('\\b[a-f\\d]{8}-(?:[a-f\\d]{4}-){3}[a-f\\d]{12}-\\b', 'i'), '');
|
||||
};
|
||||
exports.hasNonVoteReactions = hasNonVoteReactions;
|
||||
exports.useCanPostPollsInChannel = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[8]).useStateFromStores([PermissionStore], _fun57196);
|
||||
};
|
||||
exports.isPollCreationEmpty = function(a0, a1) {
|
||||
var r0;
|
||||
var value = a0.length === 0;
|
||||
if (value) {
|
||||
value = a1.find(_fun57198);
|
||||
value = value == null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.isAnswerFilled = closure2;
|
||||
exports.isIncompleteAnswer = function(a0) {
|
||||
var r2;
|
||||
r2 = a0.text?.trim();
|
||||
return a0.image != null && (r2 == null || r2.length === 0);
|
||||
};
|
||||
exports.createPollExpiryTimestamp = closure3;
|
||||
exports.createPollServerDataFromCreateRequest = createPollServerDataFromCreateRequest;
|
||||
exports.getPollReplyPreview = function({poll}) {
|
||||
return (poll == null || poll.question == null ? undefined : poll.question.text) ?? '';
|
||||
};
|
||||
exports.getPollResultsReplyPreview = getPollResultsReplyPreview;
|
||||
exports.getPollResultsReplyPreviewMobile = getPollResultsReplyPreviewMobile;
|
||||
exports.getTotalVotes = function(a0) {
|
||||
return a0.reduce(_fun57206, 0);
|
||||
};
|
||||
exports.getSampleOfVoterUsernamesForAnswer = closure4;
|
||||
exports.formatVoterTooltipText = closure5;
|
||||
exports.getPollAnswerVotesTooltipText = getPollAnswerVotesTooltipText;
|
||||
exports.formatPollResultNotificationCenterText = formatPollResultNotificationCenterText;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_57180(a0, a1) { // fn#57180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:290, offset: 0x013de9a9, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun57181;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_57182(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_57182(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_57182(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun57181;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function generateLocalCreationAnswerId() { // fn#57183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:1200, offset: 0x013deb1b, size: 37 bytes, params: 1, frame: 11
|
||||
return (require(491) /* metro dependency 491 */).v4();
|
||||
}
|
||||
|
||||
function getPollResultsPollName({embeds}, a1) { // fn#57186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:1460, offset: 0x013debd8, size: 137 bytes, params: 3, frame: 16
|
||||
var rawValue;
|
||||
var r0;
|
||||
var fields;
|
||||
var value2;
|
||||
const property = embeds[0];
|
||||
let value = undefined;
|
||||
if (property == null) {
|
||||
rawValue = value;
|
||||
} else {
|
||||
fields = property.fields;
|
||||
if (fields == null) {
|
||||
rawValue = value;
|
||||
} else {
|
||||
value2 = fields.find(function(a0) {
|
||||
return a0.rawName === 'poll_question_text';
|
||||
});
|
||||
rawValue = value2 == null ? value : value2.rawValue;
|
||||
}
|
||||
}
|
||||
const r3 = rawValue ?? '';
|
||||
if (a1 == null) {
|
||||
r0 = r3;
|
||||
} else {
|
||||
value = require(1862) /* metro dependency 1862: StringUtils */;
|
||||
value = value.truncateText(r3, a1);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getSampleOfVoterUsernamesForAnswer(a0, a1) { // fn#57188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:1684, offset: 0x013dec76, size: 291 bytes, params: 3, frame: 23
|
||||
var r2;
|
||||
let value = a0.getChannelId();
|
||||
const getReactions = MessageReactionsStore.getReactions;
|
||||
const id = a0.id;
|
||||
const value3 = undefined;
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
const VOTE = ReactionTypes.VOTE;
|
||||
const value4 = Reflect.apply(getReactions, MessageReactionsStore, [value, id, {'id': null, 'name': '',
|
||||
'animated': false, id: a1}, VOTES_TOOLTIP_MAX_USERS, VOTE]);
|
||||
value = ChannelStore.getChannel(value);
|
||||
const value5 = null;
|
||||
if (value5 == value) {
|
||||
r2 = value5;
|
||||
} else if (value.isPrivate()) {
|
||||
r2 = value5;
|
||||
} else {
|
||||
value = value.getGuildId();
|
||||
r2 = value;
|
||||
}
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
r2 = value5 == value4 ? value3 : value4.values();
|
||||
r2 = value5 == r2 ? [] : r2;
|
||||
value = value(Reflect.apply(from, Array, [r2]));
|
||||
value = value.reject(function(a0) {
|
||||
return RelationshipStore.isBlockedOrIgnored(a0.id);
|
||||
});
|
||||
value = value.take(VOTES_TOOLTIP_MAX_USERS);
|
||||
value = value.map(_fun57190);
|
||||
return value.value();
|
||||
}
|
||||
|
||||
function formatVoterTooltipText(a0, a1) { // fn#57191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:2082, offset: 0x013dedfd, size: 625 bytes, params: 3, frame: 22
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const Math = global.Math;
|
||||
const value = Math.max(0, a1 - a0.length);
|
||||
return a0.length === 1 ? value > 0 ? intl.formatToPlainString(t['SV/iZn'], {a: a0[0],
|
||||
n: value}) : a0[0] : a0.length === 2 ? value > 0 ? intl.formatToPlainString(t.YBnZK0, {a: a0[0], b: a0[1],
|
||||
n: value}) : intl.formatToPlainString(t['O5+f5c'], {a: a0[0],
|
||||
b: a0[1]}) : a0.length === 3 ? value > 0 ? intl.formatToPlainString(t['ThXp+N'], {a: a0[0], b: a0[1], c: a0[2],
|
||||
n: value}) : intl.formatToPlainString(t['0UzBM3'], {a: a0[0], b: a0[1],
|
||||
c: a0[2]}) : intl.formatToPlainString(t.yVX6kE, {n: value});
|
||||
}
|
||||
|
||||
function hasNonVoteReactions({reactions}) { // fn#57194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:3072, offset: 0x013df0af, size: 77 bytes, params: 2, frame: 14
|
||||
var value3;
|
||||
var me_vote;
|
||||
var value4;
|
||||
const value = _createForOfIteratorHelperLoose_57180(reactions);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
let r1 = value2;
|
||||
loopExit1: while (true) {
|
||||
value3 = r1.value;
|
||||
me_vote = value3.me_vote;
|
||||
if (me_vote == null) {
|
||||
break loopExit1;
|
||||
}
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
r1 = value4;
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function useCanPostPollsInChannel(a0) { // fn#57195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:3249, offset: 0x013df0fc, size: 64 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun57196);
|
||||
}
|
||||
|
||||
function isPollCreationEmpty({length}, a1) { // fn#57197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:3510, offset: 0x013df208, size: 46 bytes, params: 3, frame: 12
|
||||
var r0;
|
||||
let value = length === 0;
|
||||
if (value) {
|
||||
value = a1.find(function(a0) {
|
||||
return isAnswerFilled(a0);
|
||||
});
|
||||
value = value == null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function createPollServerDataFromCreateRequest(a0) { // fn#57200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:3873, offset: 0x013df277, size: 132 bytes, params: 2, frame: 16
|
||||
var r6;
|
||||
var r2;
|
||||
var r3;
|
||||
var value;
|
||||
var answers;
|
||||
var object2;
|
||||
if (a0 != null) {
|
||||
value = undefined;
|
||||
if (a0 == null) {
|
||||
r2 = value;
|
||||
} else {
|
||||
answers = a0.answers;
|
||||
if (answers == null) {
|
||||
r2 = value;
|
||||
r6 = answers;
|
||||
} else {
|
||||
r2 = answers.map(_fun57201);
|
||||
r6 = answers;
|
||||
}
|
||||
}
|
||||
r3 = (a0 == null ? value : a0.duration) != null ? createPollExpiryTimestamp(a0.duration) : '0';
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, r6);
|
||||
object2['expiry'] = r3;
|
||||
object2['answers'] = r2;
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
|
||||
function getPollResultsReplyPreview(a0) { // fn#57203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:4448, offset: 0x013df3bd, size: 120 bytes, params: 2, frame: 17
|
||||
const messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getMessageAuthor(a0);
|
||||
const pollResultsPollName = getPollResultsPollName(a0, POLL_RESULT_MESSAGE_POLL_TITLE_MAX_VISIBLE_CHARS);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const Vn97Ka = (require(1244) /* metro dependency 1244: indexNative */).t.Vn97Ka;
|
||||
return Reflect.apply(format, intl, [Vn97Ka, {username: messageAuthor.nick, title: pollResultsPollName}]);
|
||||
}
|
||||
|
||||
function getPollResultsReplyPreviewMobile(a0) { // fn#57204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:4665, offset: 0x013df435, size: 136 bytes, params: 2, frame: 17
|
||||
var pollResultsPollName;
|
||||
var messageAuthor;
|
||||
var intl;
|
||||
if ('author' in a0) {
|
||||
messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getMessageAuthor(a0);
|
||||
pollResultsPollName = getPollResultsPollName(a0, POLL_RESULT_MESSAGE_POLL_TITLE_MAX_VISIBLE_CHARS);
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return intl.formatToParts((require(1244) /* metro dependency 1244: indexNative */).t.Vn97Ka,
|
||||
{username: messageAuthor.nick, title: pollResultsPollName});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getTotalVotes(a0) { // fn#57205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:4907, offset: 0x013df4bd, size: 26 bytes, params: 2, frame: 13
|
||||
return a0.reduce(function(a0, {count_details}) {
|
||||
return a0 + (count_details?.vote ?? 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function getPollAnswerVotesTooltipText(a0, a1, a2) { // fn#57207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:5192, offset: 0x013df506, size: 154 bytes, params: 4, frame: 18
|
||||
const message = MessageStore.getMessage(a1, a0);
|
||||
if (message == null) {
|
||||
return '';
|
||||
}
|
||||
const value3 = '';
|
||||
const reaction = message.getReaction({'id': null, 'name': '', 'animated': false, id: a2});
|
||||
const vote = reaction == null || reaction.count_details == null ? undefined : reaction.count_details.vote;
|
||||
const value6 = 0;
|
||||
const r3 = vote ?? value6;
|
||||
const sampleOfVoterUsernamesForAnswer = getSampleOfVoterUsernamesForAnswer(message, a2);
|
||||
return value6 === sampleOfVoterUsernamesForAnswer.length ? value3 : formatVoterTooltipText(sampleOfVoterUsernamesForAnswer,
|
||||
r3);
|
||||
}
|
||||
|
||||
function formatPollResultNotificationCenterText(a0) { // fn#57208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:5535, offset: 0x013df5a0, size: 377 bytes, params: 2, frame: 19
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const questionText = a0.questionText;
|
||||
const victorAnswerText = a0.victorAnswerText;
|
||||
const victorAnswerVotes = a0.victorAnswerVotes;
|
||||
const victorAnswerId = a0.victorAnswerId;
|
||||
const totalVotes = a0.totalVotes;
|
||||
const totalVotes2 = a0.totalVotes;
|
||||
const value = 0;
|
||||
const r9 = totalVotes2 > value ? global.Math.round(victorAnswerVotes / totalVotes * 100) : value;
|
||||
return value === totalVotes ? intl.formatToPlainString(t['8anM0l'],
|
||||
{questionText: questionText}) : victorAnswerId != null ? intl.formatToPlainString(t['8yEgvE'],
|
||||
{questionText: questionText, victorAnswerText: victorAnswerText,
|
||||
percentage: '' + r9 + '%'}) : intl.formatToPlainString(t.XVk6Zv, {questionText: questionText,
|
||||
percentage: '' + r9 + '%'});
|
||||
}
|
||||
|
||||
function _fun57190(a0) { // fn#57190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:2027, offset: 0x013dedb5, size: 72 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(env0_1, env0_0?.id, a0);
|
||||
}
|
||||
|
||||
function _fun57196() { // fn#57196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:3326, offset: 0x013df13c, size: 204 bytes, params: 1, frame: 18
|
||||
var r1;
|
||||
var value5;
|
||||
var POLLS;
|
||||
var value6;
|
||||
var isPrivate2;
|
||||
let r0 = env0_0 != null && env0_0.id !== (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
||||
if (r0) {
|
||||
value5 = environment.__proto__;
|
||||
POLLS = ChannelTypesSets.POLLS;
|
||||
value6 = POLLS.has(env0_0.type);
|
||||
if (value6) {
|
||||
isPrivate2 = env0_0.isPrivate();
|
||||
r1 = isPrivate2 ? !!isPrivate2 : PermissionStore.can(Permissions.SEND_MESSAGES,
|
||||
env0_0) && PermissionStore.can(Permissions.SEND_POLLS, env0_0);
|
||||
} else {
|
||||
r1 = !!value6;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun57201(a0, a1) { // fn#57201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7327:3990, offset: 0x013df2fb, size: 138 bytes, params: 3, frame: 16
|
||||
var r6;
|
||||
var r3;
|
||||
var name;
|
||||
const poll_media = a0.poll_media;
|
||||
let value = undefined;
|
||||
const emoji = poll_media == null ? value : poll_media.emoji;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0.poll_media, r6);
|
||||
if (emoji != null) {
|
||||
name = emoji.name;
|
||||
value = name != null;
|
||||
r3 = {id: emoji.id, name: value ? name : ''};
|
||||
r6 = value;
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
object2['emoji'] = r3;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, a0, r6);
|
||||
object4['answer_id'] = a1 + 1;
|
||||
object4['poll_media'] = object2;
|
||||
return object4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 8437; source: modules/polls/chat/PollMessageChatDataTypes.tsx; dependencies: [2] */
|
||||
function _fun67000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8622:6, offset: 0x01c11d98, size: 243 bytes, params: 8, frame: 19
|
||||
var object4;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object4 = {NONE: 0};
|
||||
object4[0] = 'NONE';
|
||||
object4.LOW = 1;
|
||||
object4[1] = 'LOW';
|
||||
object4.HIGH = 2;
|
||||
object4[2] = 'HIGH';
|
||||
const object5 = {NONE: 0};
|
||||
object5[0] = 'NONE';
|
||||
object5.HOLLOW = 1;
|
||||
object5[1] = 'HOLLOW';
|
||||
object5.FILLED = 2;
|
||||
object5[2] = 'FILLED';
|
||||
object5.CHECKMARK = 3;
|
||||
object5[3] = 'CHECKMARK';
|
||||
const object6 = {LIST: 1};
|
||||
object6[1] = 'LIST';
|
||||
object6.CHECKBOXES = 2;
|
||||
object6[2] = 'CHECKBOXES';
|
||||
object6.RADIO_BUTTONS = 3;
|
||||
object6[3] = 'RADIO_BUTTONS';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/PollMessageChatDataTypes.tsx');
|
||||
exports.NativeShadowType = object4;
|
||||
exports.PollRadioStyle = object5;
|
||||
exports.PollChatAnswerInteractionType = object6;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Metro module 8434; source: modules/polls/chat/buildPlatformPollResources.native.tsx; dependencies: [22, 8435, 4501, 697, 8191, 6753, 6810, 1426, 2] */
|
||||
function _fun66979(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8619:6, offset: 0x01c11529, size: 168 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importDefault(22) /* metro dependency 22 */;
|
||||
const env0_3 = value.mapValues((require(8435) /* metro dependency 8435: PollStyles */).pollStyleSets, _fun66980);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/buildPlatformPollResources.native.tsx');
|
||||
exports.buildPlatformPollResources = buildPlatformPollResources;
|
||||
exports.getAvatarUrl = getAvatarUrl;
|
||||
}
|
||||
|
||||
function _fun66980(a0) { // fn#66980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8619:139, offset: 0x01c115d1, size: 65 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const env0_1 = (require(4501) /* metro dependency 4501: createStyles */).createNativeStyleProperties(_fun66981);
|
||||
return _fun66983;
|
||||
}
|
||||
|
||||
function buildPlatformPollResources(a0, a1) { // fn#66985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8619:526, offset: 0x01c116fe, size: 153 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const object2 = {};
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
object2.styles = defaultImport.mapValues(env0_3, _fun66986);
|
||||
object2.selectedIcon = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(6753) /* metro dependency 6753 */);
|
||||
object2.checkmarkIcon = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(6810) /* metro dependency 6810 */);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getAvatarUrl(a0, a1) { // fn#66987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8619:732, offset: 0x01c11797, size: 63 bytes, params: 3, frame: 15
|
||||
const value = require(1426) /* metro dependency 1426: AvatarUtils */;
|
||||
const ensureAvatarSource = value.ensureAvatarSource;
|
||||
const getAvatarSource = a0.getAvatarSource;
|
||||
return Reflect.apply(ensureAvatarSource, value, [Reflect.apply(getAvatarSource, a0, [a1, false])]).uri;
|
||||
}
|
||||
|
||||
function _fun66981(a0) { // fn#66981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8619:186, offset: 0x01c11612, size: 75 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
const binding = env0_0;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(697) /* metro dependency 697: native */;
|
||||
value = binding(value, a0);
|
||||
return (importDefault(22) /* metro dependency 22 */).pickBy(value, function(a0) {
|
||||
var value = typeof a0;
|
||||
return value !== 'number' && value !== 'boolean';
|
||||
});
|
||||
}
|
||||
|
||||
function _fun66983(a0, a1) { // fn#66983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8619:288, offset: 0x01c11678, size: 107 bytes, params: 3, frame: 16
|
||||
const value3 = env0_0(importDefault(697) /* metro dependency 697: native */, a1);
|
||||
const value4 = (importDefault(22) /* metro dependency 22 */).pickBy(value3, function(a0) {
|
||||
var value = typeof a0;
|
||||
return value === 'number' || value === 'boolean';
|
||||
});
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_1(a0, a1), value3);
|
||||
copyDataProperties(object2, value4, value3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 8438; source: modules/polls/chat/buildPollResources.tsx; dependencies: [8434, 22, 2] */
|
||||
function _fun67001(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8623:6, offset: 0x01c11e8b, size: 127 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(22) /* metro dependency 22 */;
|
||||
value = value.memoize(buildPollResources, function({theme, layoutType}) {
|
||||
return '' + theme + ':' + layoutType;
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/buildPollResources.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function buildPollResources({theme, layoutType}) { // fn#67002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8623:115, offset: 0x01c11f0a, size: 53 bytes, params: 2, frame: 14
|
||||
return (require(8434) /* metro dependency 8434: buildPlatformPollResourcesNative */).buildPlatformPollResources(theme,
|
||||
layoutType);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,677 @@
|
||||
/* Metro module 8431; source: modules/polls/chat/formatPollMessageChatData.tsx; dependencies: [4502, 6540, 1379, 1945, 4814, 1878, 8432, 661, 4242, 3797, 3801, 1423, 8433, 3790, 3773, 8434, 1244, 7149, 8436, 477, 8437, 8438, 2] */
|
||||
function _fun66917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:6, offset: 0x01c0f902, size: 390 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_66920 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const closure = reactionForId;
|
||||
const closure2 = isPollMessageDirectlyInteractive;
|
||||
const closure3 = computeBasicPollChatData;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(8432) /* metro dependency 8432: PollsInteractionStore */).getPollState;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const EMPTY_STRING_SNOWFLAKE_ID = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_10 = constantsModule.MessageStates;
|
||||
object2 = {'channelId': null, 'selectedAnswerIds': null, 'submitting': false, 'editing': false,
|
||||
'showResults': false};
|
||||
object2.channelId = EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const Set = global.Set;
|
||||
object2.selectedAnswerIds = new Set();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/formatPollMessageChatData.tsx');
|
||||
exports.default = formatPollMessageChatData;
|
||||
exports.reactionForId = closure;
|
||||
exports.isPollMessageDirectlyInteractive = closure2;
|
||||
exports.computeBasicPollChatData = closure3;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_66918(a0, a1) { // fn#66918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:243, offset: 0x01c0fa88, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun66919;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_66920(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_66920(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_66920(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun66919;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function reactionForId(a0, a1) { // fn#66921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:1239, offset: 0x01c0fbfc, size: 133 bytes, params: 3, frame: 19
|
||||
var r2;
|
||||
var value3;
|
||||
var emoji;
|
||||
var id;
|
||||
var value4;
|
||||
var value5;
|
||||
const value = _createForOfIteratorHelperLoose_66918(a0);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (done) {
|
||||
return undefined;
|
||||
}
|
||||
let r3 = value2;
|
||||
while (true) {
|
||||
value3 = r3.value;
|
||||
emoji = value3.emoji;
|
||||
id = emoji.id;
|
||||
if (typeof id === 'number') {
|
||||
emoji = value3.emoji;
|
||||
id = emoji.id;
|
||||
value4 = '' + id;
|
||||
r2 = value4;
|
||||
} else {
|
||||
emoji = value3.emoji;
|
||||
id = emoji.id;
|
||||
r2 = id;
|
||||
}
|
||||
if (r2 === a1) {
|
||||
break;
|
||||
}
|
||||
value5 = value();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
return undefined;
|
||||
}
|
||||
r3 = value5;
|
||||
continue;
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function transformPollEmoji(a0) { // fn#66922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:1418, offset: 0x01c0fc81, size: 366 bytes, params: 2, frame: 18
|
||||
var animated;
|
||||
var r2;
|
||||
var r1;
|
||||
var object2;
|
||||
var id;
|
||||
var defaultImport;
|
||||
let value = a1;
|
||||
const value2 = undefined;
|
||||
let r0 = value !== value2 ? value : {};
|
||||
let animateEmoji = r0.animateEmoji;
|
||||
animateEmoji = !(animateEmoji === value2) && animateEmoji;
|
||||
let size = r0.size;
|
||||
size = size === value2 ? 48 : size;
|
||||
value = null;
|
||||
if (value != a0) {
|
||||
animated = a0.animated;
|
||||
r0 = value != animated || value == a0.id ? animated : value != (value == EmojiStore.getCustomEmojiById(a0.id) ? value2 : EmojiStore.getCustomEmojiById(a0.id).animated) && (value == EmojiStore.getCustomEmojiById(a0.id) ? value2 : EmojiStore.getCustomEmojiById(a0.id).animated);
|
||||
r1 = animateEmoji && value != r0;
|
||||
r1 = r1 && r0;
|
||||
object2 = {};
|
||||
id = a0.id;
|
||||
r2 = value == id ? value : '' + a0.id;
|
||||
object2.id = r2;
|
||||
object2.name = a0.name;
|
||||
id = a0.id;
|
||||
if (value == id) {
|
||||
defaultImport = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
|
||||
r2 = defaultImport.convertSurrogateToName(a0.name);
|
||||
} else {
|
||||
r2 = a0.name;
|
||||
}
|
||||
object2.displayName = r2;
|
||||
id = a0.id;
|
||||
if (value == id) {
|
||||
value = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
|
||||
value = value.getURL(a0.name);
|
||||
r2 = value;
|
||||
} else {
|
||||
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
value = value.getEmojiURL({id: a0.id, animated: r1, size: size});
|
||||
r2 = value;
|
||||
}
|
||||
object2.src = r2;
|
||||
object2.animated = r1;
|
||||
return object2;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function isPollMessageDirectlyInteractive(a0) { // fn#66923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:1847, offset: 0x01c0fdef, size: 53 bytes, params: 2, frame: 15
|
||||
return a0.poll == null || MessageStore.getMessage(a0.channel_id, a0.id) === a0;
|
||||
}
|
||||
|
||||
function computeBasicPollChatData(a0, a1) { // fn#66924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:1949, offset: 0x01c0fe24, size: 644 bytes, params: 3, frame: 31
|
||||
var r2;
|
||||
var r13;
|
||||
var r8;
|
||||
var r1;
|
||||
var r5;
|
||||
var reactions;
|
||||
var r7;
|
||||
var r11;
|
||||
var r23;
|
||||
var r14;
|
||||
var r15;
|
||||
var r20;
|
||||
var r18;
|
||||
var object2;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var getPollStateBinding;
|
||||
var selectedAnswerIds;
|
||||
var submitting;
|
||||
var editing;
|
||||
var showResults;
|
||||
var reactions2;
|
||||
var value13;
|
||||
var value16;
|
||||
var hasAutomodQuarantinedProfile2;
|
||||
var isMemberCommunicationDisabled2;
|
||||
let value = a1;
|
||||
const value2 = a2;
|
||||
const value3 = undefined;
|
||||
const formattedExpirationLabel = (value2 !== value3 ? value2 : {}).formattedExpirationLabel;
|
||||
const poll = a0.poll;
|
||||
const value4 = null;
|
||||
if (value4 != poll) {
|
||||
value6 = a0.state === MessageStates.SENT;
|
||||
if (value6) {
|
||||
if (value4 != formattedExpirationLabel) {
|
||||
r2 = formattedExpirationLabel;
|
||||
} else {
|
||||
moduleValue = require(8433) /* metro dependency 8433: useFormattedExpirationLabel */;
|
||||
r2 = moduleValue.formatExpirationLabel(poll.expiry);
|
||||
}
|
||||
r13 = r2;
|
||||
} else {
|
||||
r13 = '';
|
||||
}
|
||||
r8 = value4 == r13 && value6;
|
||||
if (value4 != value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
getPollStateBinding = getPollState;
|
||||
value = a0.getChannelId();
|
||||
value = getPollStateBinding(value, a0.id);
|
||||
r1 = value;
|
||||
}
|
||||
r1 = value4 == r1 ? env0_11 : r1;
|
||||
selectedAnswerIds = r1.selectedAnswerIds;
|
||||
submitting = r1.submitting;
|
||||
editing = r1.editing;
|
||||
showResults = r1.showResults;
|
||||
reactions2 = a0.reactions;
|
||||
value = isPollMessageDirectlyInteractive(a0);
|
||||
if (value) {
|
||||
r2 = reactions2;
|
||||
r7 = true;
|
||||
} else {
|
||||
value = MessageStore.getMessage(a0.channel_id, a0.id);
|
||||
r5 = !a0.isSearchHit && value4 != value;
|
||||
reactions = value4 == value ? value3 : value.reactions;
|
||||
r2 = value4 == reactions ? reactions2 : reactions;
|
||||
r7 = r5;
|
||||
}
|
||||
value = selectedAnswerIds.size > 0;
|
||||
value13 = r2.some(function(a0) {
|
||||
return a0.me_vote === true;
|
||||
});
|
||||
r11 = !editing && value13;
|
||||
r23 = r11 || r8 || showResults;
|
||||
r14 = value6 && r7;
|
||||
if (r14) {
|
||||
r15 = value13 ? editing : !value13;
|
||||
r15 = !r15 ? r23 : r15;
|
||||
r14 = r15;
|
||||
}
|
||||
value16 = ChannelStore.getChannel(a0.getChannelId());
|
||||
r20 = value4 == value16 || value4 == value16.getGuildId ? value3 : value16.getGuildId();
|
||||
r18 = value4 != r20 ? GuildMemberStore.getSelfMember(r20) : value4;
|
||||
hasAutomodQuarantinedProfile2 = (require(3790) /* metro dependency 3790: AutomodPermissionUtils */).hasAutomodQuarantinedProfile(r18);
|
||||
isMemberCommunicationDisabled2 = (require(3773) /* metro dependency 3773: CommunicationDisabledUtils */).isMemberCommunicationDisabled(r18);
|
||||
object2 = {poll: poll, canTapAnswers: r14};
|
||||
r14 = r11 && value6;
|
||||
r14 = r14 && !r8;
|
||||
object2.canRemoveVote = r14;
|
||||
object2.canShowVoteCounts = r23;
|
||||
r14 = !submitting && value;
|
||||
r14 = r14 && !r11;
|
||||
r14 = r14 && value6;
|
||||
r14 = r14 && !hasAutomodQuarantinedProfile2;
|
||||
r14 = r14 && !isMemberCommunicationDisabled2;
|
||||
object2.canSubmitVote = r14;
|
||||
object2.expirationLabel = r13;
|
||||
object2.hasSelectedAnswer = value;
|
||||
object2.hasVoted = r11;
|
||||
object2.hasVoteRecorded = value13;
|
||||
object2.isEditingVote = editing;
|
||||
object2.isExpired = r8;
|
||||
object2.isInteractive = r7;
|
||||
object2.isSent = value6;
|
||||
object2.reactions = r2;
|
||||
object2.selectedAnswerIds = selectedAnswerIds;
|
||||
object2.submitting = submitting;
|
||||
object2.tapShouldOpenVotersModal = r23;
|
||||
object2.showResults = showResults;
|
||||
return object2;
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function formatPollMessageChatData(a0, a1) { // fn#66926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:3130, offset: 0x01c100b9, size: 1652 bytes, params: 3, frame: 39
|
||||
var r1;
|
||||
var r17;
|
||||
var canTapAnswers;
|
||||
var canRemoveVote;
|
||||
var canShowVoteCounts;
|
||||
var canSubmitVote;
|
||||
var expirationLabel;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var hasSelectedAnswer;
|
||||
var hasVoted;
|
||||
var isEditingVote;
|
||||
var isExpired;
|
||||
var isInteractive;
|
||||
var reactions;
|
||||
var selectedAnswerIds;
|
||||
var submitting;
|
||||
var tapShouldOpenVotersModal;
|
||||
var showResults;
|
||||
var Math;
|
||||
var max;
|
||||
var value9;
|
||||
var value10;
|
||||
var value17;
|
||||
var isIOS2;
|
||||
var value21;
|
||||
var value23;
|
||||
var allow_multiselect;
|
||||
var value28;
|
||||
var moduleValue7;
|
||||
const value = a2;
|
||||
const value2 = undefined;
|
||||
const r0 = value !== value2 ? value : {};
|
||||
if (r0.animateEmoji !== value2) {
|
||||
}
|
||||
let theme = r0.theme;
|
||||
theme = theme === value2 ? 'dark' : theme;
|
||||
const formattedExpirationLabel = r0.formattedExpirationLabel;
|
||||
var env0_1;
|
||||
var env0_13;
|
||||
var env0_14;
|
||||
const poll = a0.poll;
|
||||
if (poll != null) {
|
||||
var currentUser = UserStore.getCurrentUser();
|
||||
if (currentUser == null) {
|
||||
return value2;
|
||||
}
|
||||
env0_1 = AccessibilityStore.useReducedMotion;
|
||||
var getChannel = ChannelStore.getChannel;
|
||||
var getChannelId = a0.getChannelId;
|
||||
var value4 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getChannelId, a0, [])]);
|
||||
var avatarUrl = (require(8434) /* metro dependency 8434: buildPlatformPollResourcesNative */).getAvatarUrl(currentUser,
|
||||
|
||||
value4 == null || value4.getGuildId == null ? value2 : value4.getGuildId());
|
||||
var answers = poll.answers;
|
||||
var layout_type = poll.layout_type;
|
||||
var computeBasicPollChatDataBinding = computeBasicPollChatData;
|
||||
var object = {formattedExpirationLabel: formattedExpirationLabel};
|
||||
var basicPollChatData = computeBasicPollChatDataBinding(a0, a1, object);
|
||||
if (basicPollChatData != null) {
|
||||
canTapAnswers = basicPollChatData.canTapAnswers;
|
||||
canRemoveVote = basicPollChatData.canRemoveVote;
|
||||
canShowVoteCounts = basicPollChatData.canShowVoteCounts;
|
||||
canSubmitVote = basicPollChatData.canSubmitVote;
|
||||
expirationLabel = basicPollChatData.expirationLabel;
|
||||
if (value2 !== expirationLabel) {
|
||||
r1 = expirationLabel;
|
||||
} else {
|
||||
r1 = intl.string(t['e+J3JZ']);
|
||||
}
|
||||
hasSelectedAnswer = basicPollChatData.hasSelectedAnswer;
|
||||
hasVoted = basicPollChatData.hasVoted;
|
||||
isEditingVote = basicPollChatData.isEditingVote;
|
||||
isExpired = basicPollChatData.isExpired;
|
||||
isInteractive = basicPollChatData.isInteractive;
|
||||
reactions = basicPollChatData.reactions;
|
||||
selectedAnswerIds = basicPollChatData.selectedAnswerIds;
|
||||
submitting = basicPollChatData.submitting;
|
||||
tapShouldOpenVotersModal = basicPollChatData.tapShouldOpenVotersModal;
|
||||
showResults = basicPollChatData.showResults;
|
||||
env0_13 = intl.formatToPlainString(t.XRkuof,
|
||||
{count: (require(7149) /* metro dependency 7149: PollsUtils */).getTotalVotes(reactions)});
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value9 = answers.map(_fun66927);
|
||||
object = [];
|
||||
arraySpread(object, value9, 0, undefined);
|
||||
env0_14 = apply(max, object, Math, undefined);
|
||||
value10 = answers.map(_fun66928);
|
||||
value17 = (require(4242) /* metro dependency 4242 */).match({isExpired: isExpired,
|
||||
canSubmitVote: canSubmitVote,
|
||||
hasVoted: hasVoted, isEditingVote: isEditingVote, canRemoveVote: canRemoveVote,
|
||||
isInteractive: isInteractive,
|
||||
showResults: showResults}).with({isInteractive: false}, function() {
|
||||
}).with({isExpired: true}, _fun66941).with({isEditingVote: true}, _fun66942).with({canRemoveVote: true},
|
||||
_fun66943).with({'hasVoted': false, 'showResults': true}, _fun66944).otherwise(_fun66945);
|
||||
isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
|
||||
string = intl.string;
|
||||
r17 = isIOS2 ? Reflect.apply(string, intl, [t['PVATM/']]) : Reflect.apply(string, intl, [t.cHfFql]);
|
||||
value21 = (require(4242) /* metro dependency 4242 */).match({isExpired: isExpired,
|
||||
isInteractive: isInteractive,
|
||||
isEditingVote: isEditingVote}).with({'isInteractive': false, 'isExpired': false}, _fun66946);
|
||||
object = {isEditingVote: true};
|
||||
value23 = value21.with(object, _fun66947).otherwise(_fun66948);
|
||||
if (isInteractive) {
|
||||
if (isExpired) {
|
||||
r1 = value2;
|
||||
} else if (hasVoted) {
|
||||
r1 = value2;
|
||||
} else if (showResults) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
object = {'label': null, 'presentation': 'textButton', 'enabled': true, 'type': 'showVotes'};
|
||||
object.label = intl.string(t['/KHAUF']);
|
||||
r1 = object;
|
||||
}
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
allow_multiselect = poll.allow_multiselect;
|
||||
value28 = (require(4242) /* metro dependency 4242 */).match({isInteractive: isInteractive,
|
||||
isExpired: isExpired,
|
||||
canSelectMultipleAnswers: allow_multiselect}).with({isInteractive: false},
|
||||
_fun66949).with({isExpired: true},
|
||||
_fun66950).with({canSelectMultipleAnswers: true}, _fun66951).otherwise(_fun66952);
|
||||
object = {};
|
||||
object.question = poll.question;
|
||||
object.promptLabel = value28;
|
||||
object.answers = value10;
|
||||
moduleValue7 = require(4242) /* metro dependency 4242 */;
|
||||
object.answersInteraction = moduleValue7.match({tapShouldOpenVotersModal: tapShouldOpenVotersModal,
|
||||
canTapAnswers: canTapAnswers,
|
||||
canSelectMultipleAnswers: allow_multiselect}).with({tapShouldOpenVotersModal: true},
|
||||
_fun66953).with({canTapAnswers: false}, _fun66954).with({canSelectMultipleAnswers: false},
|
||||
_fun66955).with({canSelectMultipleAnswers: true}, _fun66956).exhaustive();
|
||||
object.answerTapAccessibilityLabel = tapShouldOpenVotersModal ? r17 : value2;
|
||||
object.layoutType = layout_type;
|
||||
object.resources = (importDefault(8438) /* metro dependency 8438: buildPollResources */)({theme: theme,
|
||||
layoutType: layout_type});
|
||||
object.containerStyle = 'normal';
|
||||
object.primaryAction = value17;
|
||||
object.isInteractive = isInteractive;
|
||||
object.canTapAnswers = canTapAnswers;
|
||||
object.canSelectMultipleAnswers = allow_multiselect;
|
||||
object.hasSelectedAnswer = hasSelectedAnswer;
|
||||
object.canShowVoteCounts = canShowVoteCounts;
|
||||
object.hasVoted = hasVoted;
|
||||
object.isExpired = isExpired;
|
||||
object.myAvatarUrl = avatarUrl;
|
||||
object.secondaryAction = value23;
|
||||
object.tertiaryAction = r1;
|
||||
return object;
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun66927({answer_id}) { // fn#66927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:3998, offset: 0x01c1072d, size: 99 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
const reactionForIdBinding = reactionForId;
|
||||
const reactionsBinding = reactions;
|
||||
value = '' + answer_id;
|
||||
value = reactionForIdBinding(reactionsBinding, value);
|
||||
return (value == null || value.count_details == null ? undefined : value.count_details.vote) ?? 0;
|
||||
}
|
||||
|
||||
function _fun66928(a0) { // fn#66928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:4129, offset: 0x01c10790, size: 819 bytes, params: 2, frame: 27
|
||||
var me_vote;
|
||||
var r8;
|
||||
var value11;
|
||||
let value = '' + a0.answer_id;
|
||||
const reactionForIdBinding = reactionForId;
|
||||
const reactionsBinding = reactions;
|
||||
const value4 = undefined;
|
||||
const value5 = reactionForIdBinding(reactionsBinding, value);
|
||||
const vote = value5 == null || value5.count_details == null ? value4 : value5.count_details.vote;
|
||||
const value6 = 0;
|
||||
let r0 = vote ?? value6;
|
||||
const r9 = value6 === env0_12 ? value6 : r0 / env0_12;
|
||||
const value8 = selectedAnswerIds.has(value);
|
||||
const r11 = r0 >= env0_14 && value6 !== r0;
|
||||
const hasVotedBinding = hasVoted;
|
||||
if (hasVotedBinding) {
|
||||
me_vote = value5 == null ? value4 : value5.me_vote;
|
||||
value11 = me_vote != null;
|
||||
r0 = me_vote;
|
||||
r8 = value11;
|
||||
} else {
|
||||
r0 = value4;
|
||||
r8 = hasVotedBinding;
|
||||
}
|
||||
r8 = r8 && r0;
|
||||
let object3 = {didSelfVote: r8};
|
||||
object3.hasVoted = hasVoted;
|
||||
object3.isExpired = isExpired;
|
||||
object3.isSelected = value8;
|
||||
object3.isLeader = r11;
|
||||
object3.showResults = showResults;
|
||||
const moduleValue = require(4242) /* metro dependency 4242 */;
|
||||
const value21 = moduleValue.match(object3).with({'isExpired': true, 'isLeader': true, 'didSelfVote': true},
|
||||
function() {
|
||||
return 'victorSelected';
|
||||
}).with({'isExpired': true, 'isLeader': true, 'didSelfVote': false}, function() {
|
||||
return 'victorNotSelected';
|
||||
}).with({'isExpired': true, 'didSelfVote': true}, function() {
|
||||
return 'loserSelected';
|
||||
}).with({isExpired: true}, function() {
|
||||
return 'notVoted';
|
||||
}).with({'didSelfVote': true, 'isExpired': false}, function() {
|
||||
return 'voted';
|
||||
}).with({'hasVoted': true, 'isExpired': false}, function() {
|
||||
return 'notVoted';
|
||||
}).with({isSelected: true}, function() {
|
||||
return 'selected';
|
||||
}).with({'isExpired': false, 'showResults': true}, function() {
|
||||
return 'notVoted';
|
||||
}).otherwise(function() {
|
||||
return 'normalVote';
|
||||
});
|
||||
object3 = {answerId: value};
|
||||
const object4 = {};
|
||||
object4.text = a0.poll_media.text;
|
||||
object4.emoji = transformPollEmoji(a0.poll_media.emoji, {animateEmoji: animateEmoji});
|
||||
object4.stickerId = a0.poll_media.sticker_id;
|
||||
object4.attachmentIds = a0.poll_media.attachment_ids;
|
||||
object3.pollMedia = object4;
|
||||
object3.isSelected = value8;
|
||||
object3.isVictor = isExpired && r11;
|
||||
object3.didSelfVote = r8;
|
||||
object3.style = value21;
|
||||
object3.shouldAnimateTransition = submitting && !useReducedMotion;
|
||||
const Math = global.Math;
|
||||
object3.votesPercentage = Math.round(100 * r9);
|
||||
value = Reflect.apply(moduleValue.match, value, [layout_type]);
|
||||
const PollLayoutTypes = (require(8436) /* metro dependency 8436: PollLayoutTypes */).PollLayoutTypes;
|
||||
const IMAGE_ONLY_ANSWERS = PollLayoutTypes.IMAGE_ONLY_ANSWERS;
|
||||
value = value.with(IMAGE_ONLY_ANSWERS, _fun66938);
|
||||
object3.votes = value.otherwise(_fun66939);
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _fun66942() { // fn#66942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:5603, offset: 0x01c10b75, size: 96 bytes, params: 1, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const JwkNU4 = (require(1244) /* metro dependency 1244: indexNative */).t.JwkNU4;
|
||||
return {label: Reflect.apply(string, intl, [JwkNU4]), presentation: 'button', enabled: hasSelectedAnswer,
|
||||
type: 'submit'};
|
||||
}
|
||||
|
||||
function _fun66943() { // fn#66943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:5732, offset: 0x01c10bd5, size: 84 bytes, params: 1, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const XhQEh8 = (require(1244) /* metro dependency 1244: indexNative */).t.XhQEh8;
|
||||
return {'label': null, 'presentation': 'secondaryButton', 'enabled': true, 'type': 'remove',
|
||||
label: Reflect.apply(string, intl, [XhQEh8])};
|
||||
}
|
||||
|
||||
function _fun66944() { // fn#66944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:5881, offset: 0x01c10c29, size: 84 bytes, params: 1, frame: 15
|
||||
const object2 = {'label': null, 'presentation': 'secondaryButton', 'enabled': true, 'type': 'showVotes'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gNj6In);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66945() { // fn#66945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:6009, offset: 0x01c10c7d, size: 96 bytes, params: 1, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const JwkNU4 = (require(1244) /* metro dependency 1244: indexNative */).t.JwkNU4;
|
||||
return {label: Reflect.apply(string, intl, [JwkNU4]), presentation: 'button', enabled: canSubmitVote,
|
||||
type: 'submit'};
|
||||
}
|
||||
|
||||
function _fun66946() { // fn#66946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:6322, offset: 0x01c10cdd, size: 84 bytes, params: 1, frame: 15
|
||||
const object2 = {'label': null, 'presentation': 'text', 'enabled': false};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.trrip0);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66947() { // fn#66947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:6436, offset: 0x01c10d31, size: 82 bytes, params: 1, frame: 15
|
||||
const object2 = {'label': null, 'presentation': 'textButton', 'enabled': true, 'type': 'cancel'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66948() { // fn#66948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:6559, offset: 0x01c10d83, size: 49 bytes, params: 1, frame: 3
|
||||
return {'label': null, 'secondaryLabel': null, 'accessibilityHint': null, 'presentation': 'text', 'enabled': true,
|
||||
'type': 'showVoterDetails', label: env0_13, secondaryLabel: env0_4, accessibilityHint: env0_15};
|
||||
}
|
||||
|
||||
function _fun66951() { // fn#66951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:6994, offset: 0x01c10db4, size: 64 bytes, params: 1, frame: 14
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yCXvxa);
|
||||
}
|
||||
|
||||
function _fun66952() { // fn#66952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:7053, offset: 0x01c10df4, size: 64 bytes, params: 1, frame: 14
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Y2wKO']);
|
||||
}
|
||||
|
||||
function _fun66953() { // fn#66953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:7298, offset: 0x01c10e34, size: 39 bytes, params: 1, frame: 11
|
||||
const PollChatAnswerInteractionType = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollChatAnswerInteractionType;
|
||||
return PollChatAnswerInteractionType.LIST;
|
||||
}
|
||||
|
||||
function _fun66955() { // fn#66955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:7461, offset: 0x01c10e5b, size: 39 bytes, params: 1, frame: 11
|
||||
const PollChatAnswerInteractionType = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollChatAnswerInteractionType;
|
||||
return PollChatAnswerInteractionType.RADIO_BUTTONS;
|
||||
}
|
||||
|
||||
function _fun66956() { // fn#66956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:7557, offset: 0x01c10e82, size: 39 bytes, params: 1, frame: 11
|
||||
const PollChatAnswerInteractionType = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollChatAnswerInteractionType;
|
||||
return PollChatAnswerInteractionType.CHECKBOXES;
|
||||
}
|
||||
|
||||
function _fun66938() { // fn#66938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:5275, offset: 0x01c10af9, size: 48 bytes, params: 1, frame: 13
|
||||
return '(' + env0_0.toLocaleString() + ')';
|
||||
}
|
||||
|
||||
function _fun66939() { // fn#66939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8616:5318, offset: 0x01c10b29, size: 76 bytes, params: 1, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const XRkuof = (require(1244) /* metro dependency 1244: indexNative */).t.XRkuof;
|
||||
return Reflect.apply(formatToPlainString, intl, [XRkuof, {count: env0_0}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/* Metro module 8435; source: modules/polls/chat/native/PollStyles.tsx; dependencies: [4242, 8436, 8437, 2] */
|
||||
function _fun66988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:6, offset: 0x01c117d6, size: 215 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {loserSelected: function(a0, a1) {
|
||||
var object = {};
|
||||
var notVotedBinding = notVoted;
|
||||
copyDataProperties(object, notVotedBinding(a0, a1), notVotedBinding);
|
||||
var CHECKMARK = require(dependencyMap[2]).PollRadioStyle.CHECKMARK;
|
||||
object['radioStyle'] = CHECKMARK;
|
||||
object['radioBackground'] = a0.colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object['radioForeground'] = a0.colors.BACKGROUND_BASE_LOW;
|
||||
return object;
|
||||
}, normal: normal, notVoted: function(a0, a1) {
|
||||
var object = {};
|
||||
var normalVoteBinding = normalVote;
|
||||
copyDataProperties(object, normalVoteBinding(a0, a1), normalVoteBinding);
|
||||
object['answerFill'] = a0.colors.INTERACTIVE_BACKGROUND_ACTIVE;
|
||||
var NONE = require(dependencyMap[2]).PollRadioStyle.NONE;
|
||||
object['radioStyle'] = NONE;
|
||||
return object;
|
||||
}, selected: selected, victorNotSelected: victorNotSelected, victorSelected: function(a0, a1) {
|
||||
var object = {};
|
||||
var victorNotSelectedBinding = victorNotSelected;
|
||||
copyDataProperties(object, victorNotSelectedBinding(a0, a1), victorNotSelectedBinding);
|
||||
var CHECKMARK = require(dependencyMap[2]).PollRadioStyle.CHECKMARK;
|
||||
object['radioStyle'] = CHECKMARK;
|
||||
object['radioBackground'] = a0.colors.STATUS_POSITIVE;
|
||||
object['radioForeground'] = a0.colors.STATUS_POSITIVE_TEXT;
|
||||
return object;
|
||||
}, voted: voted, normalVote: function(a0, a1) {
|
||||
var object = {};
|
||||
var normalBinding = normal;
|
||||
copyDataProperties(object, normalBinding(a0, a1), normalBinding);
|
||||
object['borderWidth'] = 0;
|
||||
return object;
|
||||
}};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/native/PollStyles.tsx');
|
||||
exports.pollStyleSets = object2;
|
||||
}
|
||||
|
||||
function normal(a0, a1) { // fn#66989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:103, offset: 0x01c118ad, size: 260 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const object2 = {};
|
||||
const BORDER_SUBTLE = a0.colors.BORDER_SUBTLE;
|
||||
object2.border = BORDER_SUBTLE;
|
||||
object2.borderWidth = 1;
|
||||
const CARD_SECONDARY_BG = a0.colors.CARD_SECONDARY_BG;
|
||||
object2.fill = CARD_SECONDARY_BG;
|
||||
let value = require(4242) /* metro dependency 4242 */;
|
||||
value = value.match(a1);
|
||||
const PollLayoutTypes = (require(8436) /* metro dependency 8436: PollLayoutTypes */).PollLayoutTypes;
|
||||
const IMAGE_ONLY_ANSWERS = PollLayoutTypes.IMAGE_ONLY_ANSWERS;
|
||||
value = value.with(IMAGE_ONLY_ANSWERS, _fun66990);
|
||||
object2.label = value.otherwise(_fun66991);
|
||||
object2.opacity = 1;
|
||||
const BACKGROUND_MOD_MUTED = a0.colors.BACKGROUND_MOD_MUTED;
|
||||
object2.answerBackground = BACKGROUND_MOD_MUTED;
|
||||
const BACKGROUND_MOD_SUBTLE = a0.colors.BACKGROUND_MOD_SUBTLE;
|
||||
object2.answerFill = BACKGROUND_MOD_SUBTLE;
|
||||
const PollRadioStyle = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollRadioStyle;
|
||||
const HOLLOW = PollRadioStyle.HOLLOW;
|
||||
object2.radioStyle = HOLLOW;
|
||||
const INTERACTIVE_TEXT_ACTIVE = a0.colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.radioBackground = INTERACTIVE_TEXT_ACTIVE;
|
||||
const WHITE = a0.colors.WHITE;
|
||||
object2.radioForeground = WHITE;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function victorNotSelected(a0, a1) { // fn#66994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:739, offset: 0x01c11a65, size: 129 bytes, params: 3, frame: 15
|
||||
const object2 = {};
|
||||
const normalVoteBinding = normalVote;
|
||||
copyDataProperties(object2, normalVoteBinding(a0, a1), normalVoteBinding);
|
||||
const STATUS_POSITIVE = a0.colors.STATUS_POSITIVE;
|
||||
object2['border'] = STATUS_POSITIVE;
|
||||
object2['borderWidth'] = 1;
|
||||
const POLLS_VICTOR_FILL = a0.colors.POLLS_VICTOR_FILL;
|
||||
object2['answerFill'] = POLLS_VICTOR_FILL;
|
||||
const PollRadioStyle = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollRadioStyle;
|
||||
const NONE = PollRadioStyle.NONE;
|
||||
object2['radioStyle'] = NONE;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function selected(a0, a1) { // fn#66996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:1116, offset: 0x01c11b5d, size: 151 bytes, params: 3, frame: 15
|
||||
const object2 = {};
|
||||
const normalVoteBinding = normalVote;
|
||||
copyDataProperties(object2, normalVoteBinding(a0, a1), normalVoteBinding);
|
||||
const BACKGROUND_BRAND = a0.colors.BACKGROUND_BRAND;
|
||||
object2['border'] = BACKGROUND_BRAND;
|
||||
object2['borderWidth'] = 1;
|
||||
const PollRadioStyle = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollRadioStyle;
|
||||
const FILLED = PollRadioStyle.FILLED;
|
||||
object2['radioStyle'] = FILLED;
|
||||
const REDESIGN_INPUT_CONTROL_SELECTED = a0.colors.REDESIGN_INPUT_CONTROL_SELECTED;
|
||||
object2['radioBackground'] = REDESIGN_INPUT_CONTROL_SELECTED;
|
||||
const STATUS_POSITIVE_TEXT = a0.colors.STATUS_POSITIVE_TEXT;
|
||||
object2['radioForeground'] = STATUS_POSITIVE_TEXT;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function voted(a0, a1) { // fn#66998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:1562, offset: 0x01c11c6b, size: 173 bytes, params: 3, frame: 15
|
||||
const object2 = {};
|
||||
const normalVoteBinding = normalVote;
|
||||
copyDataProperties(object2, normalVoteBinding(a0, a1), normalVoteBinding);
|
||||
const BACKGROUND_BRAND = a0.colors.BACKGROUND_BRAND;
|
||||
object2['border'] = BACKGROUND_BRAND;
|
||||
object2['borderWidth'] = 1;
|
||||
const POLLS_VOTED_FILL = a0.colors.POLLS_VOTED_FILL;
|
||||
object2['answerFill'] = POLLS_VOTED_FILL;
|
||||
const PollRadioStyle = (require(8437) /* metro dependency 8437: PollMessageChatDataTypes */).PollRadioStyle;
|
||||
const CHECKMARK = PollRadioStyle.CHECKMARK;
|
||||
object2['radioStyle'] = CHECKMARK;
|
||||
const REDESIGN_INPUT_CONTROL_SELECTED = a0.colors.REDESIGN_INPUT_CONTROL_SELECTED;
|
||||
object2['radioBackground'] = REDESIGN_INPUT_CONTROL_SELECTED;
|
||||
const STATUS_POSITIVE_TEXT = a0.colors.STATUS_POSITIVE_TEXT;
|
||||
object2['radioForeground'] = STATUS_POSITIVE_TEXT;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66990() { // fn#66990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:260, offset: 0x01c119b1, size: 20 bytes, params: 1, frame: 1
|
||||
return env0_0.colors.WHITE;
|
||||
}
|
||||
|
||||
function _fun66991() { // fn#66991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8620:292, offset: 0x01c119c5, size: 20 bytes, params: 1, frame: 1
|
||||
return env0_0.colors.TEXT_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 8433; source: modules/polls/chat/useFormattedExpirationLabel.tsx; dependencies: [3738, 1244, 2] */
|
||||
function _fun66976(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8618:6, offset: 0x01c1136e, size: 120 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = formatExpirationLabel;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/useFormattedExpirationLabel.tsx');
|
||||
exports.default = useFormattedExpirationLabel;
|
||||
exports.formatExpirationLabel = closure;
|
||||
}
|
||||
|
||||
function formatExpirationLabel(a0) { // fn#66977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8618:43, offset: 0x01c113e6, size: 294 bytes, params: 2, frame: 19
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value2 = (importDefault(3738) /* metro dependency 3738 */)();
|
||||
if (a0 <= value2) {
|
||||
return undefined;
|
||||
}
|
||||
const value3 = a0.diff(value2, 'days');
|
||||
if (value3 > 1) {
|
||||
return intl.formatToPlainString(t.dex68a, {days: value3});
|
||||
}
|
||||
const value4 = a0.diff(value2, 'hours');
|
||||
if (value4 > 1) {
|
||||
return intl.formatToPlainString(t.BWqf0c, {hours: value4});
|
||||
}
|
||||
return intl.formatToPlainString(t['3SLXAz'], {minutes: a0.diff(value2, 'minutes')});
|
||||
}
|
||||
|
||||
function useFormattedExpirationLabel(a0) { // fn#66978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8618:544, offset: 0x01c1150c, size: 29 bytes, params: 2, frame: 11
|
||||
if (a0 != null) {
|
||||
return formatExpirationLabel(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Metro module 11404; source: modules/polls/chat/usePollMessageContextItemTypes.tsx; dependencies: [1226, 566, 2] */
|
||||
function _fun87385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11590:6, offset: 0x01fbcdfb, size: 148 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
object2 = {END_EARLY: 0};
|
||||
object2[0] = 'END_EARLY';
|
||||
const env0_4 = [];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/chat/usePollMessageContextItemTypes.tsx');
|
||||
exports.default = usePollMessageContextItemTypes;
|
||||
exports.PollMessageContextItemTypes = object2;
|
||||
}
|
||||
|
||||
function usePollMessageContextItemTypes(a0) { // fn#87386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11590:265, offset: 0x01fbce8f, size: 175 bytes, params: 2, frame: 17
|
||||
var expiry;
|
||||
var isSameOrBefore;
|
||||
var Date;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let items2 = [AuthenticationStore];
|
||||
const id = Reflect.apply(useStateFromStores, fluxModule, [items2, function() {
|
||||
return AuthenticationStore.getId();
|
||||
}]);
|
||||
const poll = a0.poll;
|
||||
if (a0.isPoll()) {
|
||||
if (poll == null) {
|
||||
return env0_4;
|
||||
}
|
||||
items2 = [];
|
||||
expiry = poll.expiry;
|
||||
isSameOrBefore = expiry.isSameOrBefore;
|
||||
Date = global.Date;
|
||||
if (!Reflect.apply(isSameOrBefore, expiry, [Date.now()]) && a0.author.id === id) {
|
||||
items2.push(env0_3.END_EARLY);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
return env0_4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/* Metro module 11750; source: modules/polls/native/EditPollCreationImageAltTextModal.tsx; dependencies: [57, 31, 27, 7217, 33, 4501, 697, 11747, 11749, 6618, 1244, 1305, 8160, 4573, 5467, 8127, 7972, 2] */
|
||||
function _fun90052(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11936:6, offset: 0x020286fc, size: 473 bytes, params: 8, frame: 23
|
||||
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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.TouchableOpacity;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = (require(7217) /* metro dependency 7217: PollsConstants */).MAX_POLL_ANSWER_LENGTH;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
|
||||
object2.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'padding': 18,
|
||||
'paddingTop': 10};
|
||||
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
|
||||
object2.separator = {borderBottomWidth: 1, borderColor: INTERACTIVE_BACKGROUND_HOVER};
|
||||
object2.contentContainer = {'flex': 1, 'justifyContent': 'center'};
|
||||
const object3 = {'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center', 'alignSelf': 'center',
|
||||
'overflow': 'hidden', 'aspectRatio': 1};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.imageContainer = object3;
|
||||
object2.formContainer = {paddingHorizontal: 16};
|
||||
const object5 = {};
|
||||
const REDESIGN_CHAT_INPUT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHAT_INPUT_BACKGROUND;
|
||||
object5.backgroundColor = REDESIGN_CHAT_INPUT_BACKGROUND;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.textInput = object5;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/EditPollCreationImageAltTextModal.tsx');
|
||||
exports.default = EditPollCreationImageAltTextModal;
|
||||
}
|
||||
|
||||
function EditPollCreationImageAltTextModal({channelId, answer, onSave, imageSize}) { // fn#90053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11936:844, offset: 0x020288d5, size: 1096 bytes, params: 2, frame: 40
|
||||
const styles = useStyles();
|
||||
const {renderImage,
|
||||
upload} = (importDefault(11747) /* metro dependency 11747: useRenderPollAnswerImage */)(channelId,
|
||||
answer.localCreationAnswerId, answer.image, imageSize, imageSize);
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value6 = env0_3(Reflect.apply(useState, binding, [upload?.description ?? '']), 2);
|
||||
const property = value6[0];
|
||||
const property2 = value6[1];
|
||||
const value7 = env0_4.useCallback(_fun90054, [onSave, property]);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const closeEditPollCreationImageAltTextModal = (require(11749) /* metro dependency 11749: EditPollCreationImageAltTextModalActionCreators */).closeEditPollCreationImageAltTextModal;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const items3 = [<TouchableOpacity onPress={closeEditPollCreationImageAltTextModal} activeOpacity={0.5} accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
|
||||
intl, [cpT0Cq])}><Icon source={importDefault(8160) /* metro dependency 8160 */} /></TouchableOpacity>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const Cq44Rg = (require(1244) /* metro dependency 1244: indexNative */).t.Cq44Rg;
|
||||
items3[1] = <Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
intl, [Cq44Rg])}</Text>;
|
||||
items3[2] = <TouchableOpacity onPress={value7} activeOpacity={0.5}><Text variant="text-md/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}</Text></TouchableOpacity>;
|
||||
const items2 = [<View style={styles.header}>{items3}</View>];
|
||||
items2[1] = <View style={styles.separator} />;
|
||||
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
|
||||
const view = <View style={styles.imageContainer}>{renderImage}</View>;
|
||||
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
|
||||
const items4 = [<Spacer size={27} />];
|
||||
items4[1] = ((Component) => <Component>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/2Gnoa'])}</Component>)(importDefault(8127) /* metro dependency 8127: FormHeader */);
|
||||
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
|
||||
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
|
||||
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
|
||||
items4[2] = <FormInput showTopContainer={false} showBorder={false} multiline={false} value={property} onChange={property2} clearButtonVisibility={WITH_CONTENT} style={styles.textInput} textContentType="none" maxLength={MAX_POLL_ANSWER_LENGTH} autoFocus autoCorrect accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/2Gnoa'])} />;
|
||||
items4[3] = <Spacer size={27} />;
|
||||
items2[2] = <KeyboardAwareView style={styles.contentContainer}>{view}<View style={styles.formContainer}>{items4}</View></KeyboardAwareView>;
|
||||
return (
|
||||
<SafeAreaPaddingView top style={styles.container}>
|
||||
{items2}
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90054() { // fn#90054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11936:1118, offset: 0x02028d1d, size: 65 bytes, params: 1, frame: 11
|
||||
if (env0_1 != null) {
|
||||
onSave(env0_1);
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(require(11749) /* metro dependency 11749: EditPollCreationImageAltTextModalActionCreators */).closeEditPollCreationImageAltTextModal();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 11749; source: modules/polls/native/EditPollCreationImageAltTextModalActionCreators.tsx; dependencies: [5080, 11750, 1962, 2] */
|
||||
function _fun90049(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11935:6, offset: 0x0202860b, size: 116 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/polls/native/EditPollCreationImageAltTextModalActionCreators.tsx');
|
||||
exports.openEditPollCreationImageAltTextModal = openEditPollCreationImageAltTextModal;
|
||||
exports.closeEditPollCreationImageAltTextModal = closeEditPollCreationImageAltTextModal;
|
||||
}
|
||||
|
||||
function openEditPollCreationImageAltTextModal(a0) { // fn#90050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11935:286, offset: 0x0202867f, size: 82 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value, a0, 'edit-poll-creation-image-alt-text-modal']);
|
||||
}
|
||||
|
||||
function closeEditPollCreationImageAltTextModal() { // fn#90051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11935:376, offset: 0x020286d1, size: 43 bytes, params: 1, frame: 12
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('edit-poll-creation-image-alt-text-modal');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 11748; source: modules/polls/native/ImageInputActionSheet.tsx; dependencies: [31, 27, 7217, 33, 4501, 697, 11747, 4015, 4080, 6805, 4573, 1305, 6807, 1244, 11749, 2] */
|
||||
function _fun90043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11934:6, offset: 0x020280a8, size: 283 bytes, params: 8, frame: 21
|
||||
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 env0_5 = (require(7217) /* metro dependency 7217: PollsConstants */).POLL_CREATION_IMAGE_INPUT_ACTION_SHEET_KEY;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {marginRight: 12};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{emojiContainer: {'flexDirection': 'row', 'alignItems': 'center',
|
||||
'marginHorizontal': 24}, emojiIcon: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/ImageInputActionSheet.tsx');
|
||||
exports.default = ImageInputAnswerActionSheet;
|
||||
}
|
||||
|
||||
function ImageInputAnswerActionSheet({channelId, index, answer, onSaveAltText, onRemoveAnswerImage, openExpressionPicker}) { // fn#90044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11934:452, offset: 0x020281c3, size: 884 bytes, params: 2, frame: 35
|
||||
var r5;
|
||||
var items3;
|
||||
var Text;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(11747) /* metro dependency 11747: useRenderPollAnswerImage */;
|
||||
const localCreationAnswerId = answer.localCreationAnswerId;
|
||||
let image = answer.image;
|
||||
const {renderImage, upload} = defaultImport(channelId, localCreationAnswerId, image, 40, 40);
|
||||
const r12 = upload != null || answer.image?.emoji != null;
|
||||
const env0_6 = onSaveAltText.useCallback(function() {
|
||||
require(dependencyMap[7]).dismissKeyboard();
|
||||
importDefault(dependencyMap[8]).hideActionSheet(POLL_CREATION_IMAGE_INPUT_ACTION_SHEET_KEY);
|
||||
}, []);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
if (r12) {
|
||||
var viewBindingProps = {style: styles.emojiContainer};
|
||||
items3 = [<View style={styles.emojiIcon}>{renderImage}</View>];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
image = answer.image;
|
||||
items3[1] = <Text variant="text-md/bold" color="mobile-text-heading-primary">{':' + (image == null || image.emoji == null ? undefined : image.emoji.name) + ':'}</Text>;
|
||||
r5 = <View {...viewBindingProps}>{items3}</View>;
|
||||
} else {
|
||||
r5 = r12;
|
||||
}
|
||||
const items2 = [r5];
|
||||
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
|
||||
items2[1] = <Spacer size={21} />;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
const Group = ActionSheetRow.Group;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
items2[2] = <Group hasIcons={false}><ActionSheetRow label={r12 ? Reflect.apply(string, intl,
|
||||
[t.CZeRhU]) : Reflect.apply(string, intl,
|
||||
[t.dzcU1Q])} onPress={onPress_90046} />{upload != null ? <ActionSheetRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w7x2t4)} onPress={onPress_90047} /> : null}{r12 ? <ActionSheetRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.IhMxgu)} onPress={onPress_90048} /> : null}</Group>;
|
||||
return (
|
||||
<ActionSheet startExpanded>
|
||||
{items2}
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function ImageInputAnswerActionSheetOnPress() { // fn#90046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11934:1296, owner: ImageInputAnswerActionSheet.onPress, offset: 0x0202857b, size: 23 bytes, params: 1, frame: 10
|
||||
env0_6();
|
||||
openExpressionPicker();
|
||||
}
|
||||
|
||||
function ImageInputAnswerActionSheetOnPress_90047() { // fn#90047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11934:1401, owner: ImageInputAnswerActionSheet.onPress, offset: 0x02028592, size: 93 bytes, params: 1, frame: 14
|
||||
env0_6();
|
||||
(require(11749) /* metro dependency 11749: EditPollCreationImageAltTextModalActionCreators */).openEditPollCreationImageAltTextModal({channelId: channelId,
|
||||
answer: answer, index: index, onSave: onSaveAltText, imageSize: 40});
|
||||
}
|
||||
|
||||
function ImageInputAnswerActionSheetOnPress_90048() { // fn#90048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11934:1602, owner: ImageInputAnswerActionSheet.onPress, offset: 0x020285ef, size: 28 bytes, params: 1, frame: 12
|
||||
onRemoveAnswerImage(index);
|
||||
env0_6();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
/* Metro module 11746; source: modules/polls/native/PollAnswerInput.tsx; dependencies: [31, 27, 1379, 4645, 7217, 1881, 33, 4501, 697, 11747, 1244, 7149, 5278, 1305, 8529, 7879, 4080, 11748, 1962, 7951, 7972, 4072, 11751, 2] */
|
||||
function _fun90028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11932:6, offset: 0x020271e5, size: 576 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Keyboard;
|
||||
const env0_5 = value.TouchableOpacity;
|
||||
const env0_6 = value.View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
value = require(7217) /* metro dependency 7217: PollsConstants */;
|
||||
const env0_9 = value.MAX_POLL_ANSWER_LENGTH;
|
||||
const env0_10 = value.POLL_CREATION_IMAGE_INPUT_ACTION_SHEET_KEY;
|
||||
const env0_11 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
const env0_14 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {defaultContainer: {'flexDirection': 'row', 'alignItems': 'center'}};
|
||||
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
|
||||
'flex': 1, 'overflow': 'hidden'};
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.defaultImageAndTextContainer = object4;
|
||||
object3.cannotRemove = {marginRight: 30};
|
||||
object3.defaultImageContainer = {'width': 60, 'height': 48, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object3.pollAnswerTextInput = {'flex': 1, 'paddingStart': 0};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object3.defaultRemoveButtonContainer = {'paddingLeft': 6, 'height': 48, 'justifyContent': 'center',
|
||||
color: TEXT_MUTED};
|
||||
object3.uploadContainer = {alignItems: 'flex-start'};
|
||||
const BORDER_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_FEEDBACK_CRITICAL;
|
||||
object3.errorInput = {borderColor: BORDER_FEEDBACK_CRITICAL, borderWidth: 2};
|
||||
const env0_15 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/PollAnswerInput.tsx');
|
||||
exports.default = PollAnswerInput;
|
||||
}
|
||||
|
||||
function ImageInput({channelId, localCreationAnswerId, image, iconSrc, openExpressionPicker, emojiSize, containerStyle, imageSize, answerIndex, openImageInputActionSheet}) { // fn#90029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11932:998, offset: 0x02027425, size: 450 bytes, params: 2, frame: 30
|
||||
emojiSize = emojiSize === undefined ? 24 : emojiSize;
|
||||
const styles = useStyles();
|
||||
const {renderImage, upload,
|
||||
setUploadSize} = (importDefault(11747) /* metro dependency 11747: useRenderPollAnswerImage */)(channelId,
|
||||
localCreationAnswerId, image, imageSize, emojiSize);
|
||||
const env0_3 = setUploadSize;
|
||||
const value5 = env0_3.useMemo(_fun90030, [image, upload, answerIndex]);
|
||||
const value6 = env0_3.useCallback(function(a0) {
|
||||
setUploadSize(a0.nativeEvent.layout.width);
|
||||
}, [setUploadSize]);
|
||||
let r4 = upload != null || image?.emoji != null;
|
||||
const r15 = r4 ? openImageInputActionSheet : openExpressionPicker;
|
||||
const r14 = r4 ? undefined : openImageInputActionSheet;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const r6 = imageSize == null ? value6 : undefined;
|
||||
const items2 = [containerStyle];
|
||||
items2[1] = upload != null && styles.uploadContainer;
|
||||
if (r4) {
|
||||
r4 = <View>{renderImage}</View>;
|
||||
} else {
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
r4 = <Icon source={iconSrc} />;
|
||||
}
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={value5}
|
||||
onPress={r15}
|
||||
onLongPress={r14}
|
||||
onLayout={r6}
|
||||
style={items2}
|
||||
>
|
||||
{r4}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function PollAnswerInput({answer, index, inputRef, channelId, onAnswerTextChange, onAnswerEmojiSelect, canRemoveAnswer, onRemoveAnswer, onRemoveAnswerImage, onSubmitEditing, error}) { // fn#90032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11932:2039, offset: 0x02027750, size: 1002 bytes, params: 2, frame: 37
|
||||
var r10;
|
||||
var object;
|
||||
var defaultRemoveButtonContainer;
|
||||
var Icon;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const image = answer.image;
|
||||
let localCreationAnswerId = answer.localCreationAnswerId;
|
||||
const closure = function() {
|
||||
var value3 = ChannelStore.getChannel(channelId);
|
||||
if (value3 != null) {
|
||||
Keyboard.dismiss();
|
||||
require(dependencyMap[14]).openEmojiPickerActionSheet({channel: value3, onPressEmoji: _fun90034,
|
||||
pickerIntention: EmojiIntention.POLLS, startExpanded: false, autoFocus: false});
|
||||
}
|
||||
};
|
||||
const handleSaveAltText = function(a0) {
|
||||
var defaultImport = importDefault(dependencyMap[15]);
|
||||
var channelIdBinding = channelId;
|
||||
var localCreationAnswerId = answer.localCreationAnswerId;
|
||||
var Poll = DraftType.Poll;
|
||||
defaultImport.update(channelIdBinding, localCreationAnswerId, Poll, {description: a0});
|
||||
};
|
||||
let r5 = error != null && error.length > 0;
|
||||
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
|
||||
const items3 = [styles.defaultContainer];
|
||||
items3[1] = !canRemoveAnswer && styles.cannotRemove;
|
||||
const items2 = [styles.defaultImageAndTextContainer];
|
||||
items2[1] = r5 && styles.errorInput;
|
||||
const imageInput = <ImageInput channelId={channelId} localCreationAnswerId={localCreationAnswerId} image={image} openExpressionPicker={closure} openImageInputActionSheet={openImageInputActionSheet} iconSrc={importDefault(7951) /* metro dependency 7951 */} containerStyle={styles.defaultImageContainer} imageSize={48} answerIndex={index} />;
|
||||
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
|
||||
const formInputProps = {'ref': null, 'textAlignVertical': 'center', 'showTopContainer': false, 'showBorder': false,
|
||||
ref: inputRef};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const NNHVlv = (require(1244) /* metro dependency 1244: indexNative */).t.NNHVlv;
|
||||
formInputProps.placeholder = Reflect.apply(string, intl, [NNHVlv]);
|
||||
formInputProps.onChange = function(a0) {
|
||||
return onAnswerTextChange({text: a0, index: index, localCreationAnswerId: localCreationAnswerId});
|
||||
};
|
||||
formInputProps.onSubmitEditing = onSubmitEditing;
|
||||
formInputProps.blurOnSubmit = false;
|
||||
formInputProps.style = styles.pollAnswerTextInput;
|
||||
formInputProps.textContentType = 'none';
|
||||
formInputProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3+V8G9'],
|
||||
{answerNumber: index + 1});
|
||||
formInputProps.accessibilityHint = r5 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.jnq5Ho,
|
||||
{errorMessage: error}) : undefined;
|
||||
formInputProps.maxLength = MAX_POLL_ANSWER_LENGTH;
|
||||
formInputProps.returnKeyType = 'next';
|
||||
formInputProps.required = true;
|
||||
formInputProps.autoCorrect = true;
|
||||
formInputProps['aria-invalid'] = error;
|
||||
const view = <View style={items2}>{imageInput}<FormInput {...formInputProps} /></View>;
|
||||
if (canRemoveAnswer) {
|
||||
object = {onPress: function() {
|
||||
return onRemoveAnswer(index);
|
||||
}, accessibilityRole: 'button'};
|
||||
defaultRemoveButtonContainer = styles.defaultRemoveButtonContainer;
|
||||
object.style = defaultRemoveButtonContainer;
|
||||
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['22fjEc'],
|
||||
|
||||
{answerNumber: index + 1});
|
||||
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var iconProps = {size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM,
|
||||
source: importDefault(4072) /* metro dependency 4072 */};
|
||||
defaultRemoveButtonContainer = styles.defaultRemoveButtonContainer;
|
||||
iconProps.color = defaultRemoveButtonContainer.color;
|
||||
r10 = <TouchableOpacity {...object}><Icon {...iconProps} /></TouchableOpacity>;
|
||||
} else {
|
||||
r10 = canRemoveAnswer;
|
||||
}
|
||||
const view2 = <View style={items3}>{view}{r10}</View>;
|
||||
if (r5) {
|
||||
value = importDefault(11751) /* metro dependency 11751: PollCreationInputError */;
|
||||
value = ((Component) => <Component message={error} />)(value);
|
||||
r5 = value;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{view2}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90030() { // fn#90030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11932:1273, offset: 0x020275e7, size: 361 bytes, params: 1, frame: 19
|
||||
var r8;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object2;
|
||||
var value5;
|
||||
var vcC7Qn;
|
||||
var value6;
|
||||
if (image?.emoji != null) {
|
||||
value6 = environment.__proto__;
|
||||
return intl.formatToPlainString(t.vcC7Qn, {imageName: image.emoji.name, answerNumber: answerIndex + 1});
|
||||
}
|
||||
if (upload != null) {
|
||||
r8 = upload.item.filename ?? '';
|
||||
value5 = environment.__proto__;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
vcC7Qn = t.vcC7Qn;
|
||||
object2 = {};
|
||||
object2.imageName = (require(7149) /* metro dependency 7149: PollsUtils */).filterOutUUID(r8);
|
||||
object2.answerNumber = answerIndex + 1;
|
||||
return Reflect.apply(formatToPlainString, intl, [vcC7Qn, object2]);
|
||||
}
|
||||
return intl.formatToPlainString(t.ieNrxk, {answerNumber: answerIndex + 1});
|
||||
}
|
||||
|
||||
function PollAnswerInputOpenExpressionPicker() { // fn#90033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11932:2300, owner: PollAnswerInput.openExpressionPicker, offset: 0x02027b3a, size: 128 bytes, params: 1, frame: 13
|
||||
const channel = ChannelStore.getChannel(channelId);
|
||||
if (channel != null) {
|
||||
Keyboard.dismiss();
|
||||
(require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */).openEmojiPickerActionSheet({channel: channel,
|
||||
|
||||
onPressEmoji: function(a0) {
|
||||
onAnswerEmojiSelect(a0, index);
|
||||
}, pickerIntention: EmojiIntention.POLLS, startExpanded: false, autoFocus: false});
|
||||
}
|
||||
}
|
||||
|
||||
function openImageInputActionSheet() { // fn#90036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11932:2869, owner: PollAnswerInput.openImageInputActionSheet, offset: 0x02027c21, size: 135 bytes, params: 1, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
defaultImport.openLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths),
|
||||
POLL_CREATION_IMAGE_INPUT_ACTION_SHEET_KEY, {channelId: channelId, index: index, answer: answer,
|
||||
onSaveAltText: handleSaveAltText, onRemoveAnswerImage: onRemoveAnswerImage,
|
||||
openExpressionPicker: openExpressionPicker_90033});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 15065; source: modules/polls/native/PollBadge.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 15066, 4573, 1244, 2] */
|
||||
function _fun113993(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15262:6, offset: 0x0240fcd5, size: 312 bytes, params: 8, frame: 22
|
||||
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;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'borderRadius': null, 'paddingHorizontal': 8, 'backgroundColor': null, 'color': null,
|
||||
'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object.color = TEXT_MUTED;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{container: object, text: {'marginLeft': 4,
|
||||
'textTransform': 'uppercase'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/PollBadge.tsx');
|
||||
exports.default = PollBadge;
|
||||
}
|
||||
|
||||
function PollBadge({style}) { // fn#113994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15262:488, offset: 0x0240fe0d, size: 253 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.container, style];
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const EXTRA_SMALL_10 = IconSizes.EXTRA_SMALL_10;
|
||||
const icon = <Icon size={EXTRA_SMALL_10} source={importDefault(15066) /* metro dependency 15066 */} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const RgIi2B = (require(1244) /* metro dependency 1244: indexNative */).t.RgIi2B;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{icon}
|
||||
<Text style={styles.text} variant="text-xs/semibold">
|
||||
{Reflect.apply(string, intl, [RgIi2B])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
/* Metro module 11734; source: modules/polls/native/PollCreation.tsx; dependencies: [31, 27, 7217, 33, 4501, 697, 477, 4500, 1244, 7981, 1305, 10376, 4573, 11735, 4080, 11736, 1962, 6238, 4015, 8742, 480, 5463, 11733, 3857, 11098, 3869, 11737, 11742, 5286, 7149, 4497, 11743, 5277, 5313, 11744, 7972, 11746, 8950, 2] */
|
||||
function _fun89916(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:6, offset: 0x02023666, size: 668 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.TouchableOpacity;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.ScrollView;
|
||||
const pollsConstantsModule = require(7217) /* metro dependency 7217: PollsConstants */;
|
||||
const env0_7 = pollsConstantsModule.MAX_POLL_QUESTION_LENGTH;
|
||||
const env0_8 = pollsConstantsModule.POLL_CREATION_DURATION_ACTION_SHEET_KEY;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value4.jsx;
|
||||
const env0_10 = value4.Fragment;
|
||||
const env0_11 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.viewPadding = {paddingHorizontal: 18};
|
||||
object2.scrollContainer = {'paddingVertical': 20, 'gap': 16};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.safeAreaContainer = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
|
||||
const value6 = 10;
|
||||
object2.header = {'flexDirection': 'row', 'paddingHorizontal': 18, 'paddingVertical': 10};
|
||||
object2.actionButton = {'flex': 0, 'justifyContent': 'flex-start', 'minWidth': 48, 'paddingHorizontal': 0,
|
||||
'marginHorizontal': 0};
|
||||
object2.postButton = {justifyContent: 'flex-end'};
|
||||
object2.title = {'textAlign': 'center', 'flexGrow': 1};
|
||||
object2.label = {fontSize: 14};
|
||||
object2.answerInputsContainer = {'marginVertical': 20, 'rowGap': 16};
|
||||
const object3 = {'paddingVertical': null, 'paddingLeft': 14, 'marginRight': 30, 'display': 'flex',
|
||||
'flexDirection': 'row', 'gap': 16, 'alignItems': 'center', 'justifyContent': 'flex-start'};
|
||||
object3.paddingVertical = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value6 : 8;
|
||||
const MESSAGE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_BACKGROUND_HOVER;
|
||||
object3.backgroundColor = MESSAGE_BACKGROUND_HOVER;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.addAnswerButtonDefault = object3;
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.addAnswerIcon = {color: TEXT_MUTED};
|
||||
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
|
||||
object2.pollConfigSection = {borderTopWidth: 1, borderColor: INTERACTIVE_BACKGROUND_HOVER};
|
||||
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_13 = value.forwardRef(_fun89921);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/PollCreation.tsx');
|
||||
exports.default = PollCreation;
|
||||
}
|
||||
|
||||
function UnsavedChangesAlertModal({onConfirm}) { // fn#89917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:1199, offset: 0x02023902, size: 370 bytes, params: 2, frame: 29
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const HMrgcp = (require(1244) /* metro dependency 1244: indexNative */).t.HMrgcp;
|
||||
object2.title = Reflect.apply(string, intl, [HMrgcp]);
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Wxa/j8']);
|
||||
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
string = intl.string;
|
||||
const TzJA4g = (require(1244) /* metro dependency 1244: indexNative */).t.TzJA4g;
|
||||
object2.actions = <><AlertActionButton text={Reflect.apply(string, intl,
|
||||
[TzJA4g])} onPress={onConfirm} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2BR5R2'])} key="back" /></>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
function AddAnswerButton({onPress}) { // fn#89918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:2194, offset: 0x02023a74, size: 319 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const addAnswerButtonDefault = styles.addAnswerButtonDefault;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
let object2 = {};
|
||||
object2.source = importDefault(10376) /* metro dependency 10376 */;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const LARGE = Sizes.LARGE;
|
||||
object2.size = LARGE;
|
||||
object2.color = styles.addAnswerIcon.color;
|
||||
const icon = <Icon {...object2} />;
|
||||
object2 = {onPress: onPress, style: addAnswerButtonDefault, accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
let B2Uvme = (require(1244) /* metro dependency 1244: indexNative */).t.B2Uvme;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [B2Uvme]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
B2Uvme = (require(1244) /* metro dependency 1244: indexNative */).t.B2Uvme;
|
||||
return (
|
||||
<TouchableOpacity {...object2}>
|
||||
{icon}
|
||||
<Text variant="text-md/medium" color="text-muted">
|
||||
{Reflect.apply(string, intl, [B2Uvme])}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function PollDurationSelectionRow({selectedDuration, onChange}) { // fn#89919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:2604, offset: 0x02023bb3, size: 342 bytes, params: 2, frame: 24
|
||||
const property = (importDefault(11735) /* metro dependency 11735: usePollDurationOptions */)()[selectedDuration];
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.bGHzxb]);
|
||||
object2.accessibilityLabel = '' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bGHzxb) + ' ' + property;
|
||||
string = intl.string;
|
||||
const A4PJ1o = (require(1244) /* metro dependency 1244: indexNative */).t.A4PJ1o;
|
||||
object2.accessibilityHint = Reflect.apply(string, intl, [A4PJ1o]);
|
||||
object2.onPress = function() {
|
||||
require(dependencyMap[18]).dismissKeyboard();
|
||||
importDefault(dependencyMap[14]).openLazy(require(dependencyMap[16])(dependencyMap[15], dependencyMap.paths),
|
||||
POLL_CREATION_DURATION_ACTION_SHEET_KEY, {selectedDuration: selectedDuration, onChange: onChange});
|
||||
};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
object2.trailing = <Text variant="text-md/normal" color="text-muted">{property}</Text>;
|
||||
object2.arrow = true;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function _fun89921({onChange, onSubmitEditing, error}, a1) { // fn#89921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:1616, offset: 0x02023d84, size: 410 bytes, params: 3, frame: 25
|
||||
const r9 = error != null && error.length > 0;
|
||||
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
|
||||
const object2 = {ref: a1, textAlignVertical: 'center'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
let WBiKnI = (require(1244) /* metro dependency 1244: indexNative */).t.WBiKnI;
|
||||
object2.label = Reflect.apply(string, intl, [WBiKnI]);
|
||||
string = intl.string;
|
||||
WBiKnI = (require(1244) /* metro dependency 1244: indexNative */).t.WBiKnI;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [WBiKnI]);
|
||||
object2.accessibilityHint = r9 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.jnq5Ho,
|
||||
{errorMessage: error}) : undefined;
|
||||
object2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/uQqJW']);
|
||||
object2.onChange = onChange;
|
||||
object2.isClearable = true;
|
||||
object2.status = r9 ? 'error' : 'default';
|
||||
object2.errorMessage = error;
|
||||
object2.maxLength = MAX_POLL_QUESTION_LENGTH;
|
||||
object2.returnKeyType = 'next';
|
||||
object2.blurOnSubmit = false;
|
||||
object2.onSubmitEditing = onSubmitEditing;
|
||||
object2.textContentType = 'none';
|
||||
object2.autoFocus = true;
|
||||
object2.autoCorrect = true;
|
||||
return <TextInput {...object2} />;
|
||||
}
|
||||
|
||||
function PollCreation({channel, onCancel}) { // fn#89922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:3104, offset: 0x02023f1e, size: 1620 bytes, params: 2, frame: 44
|
||||
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
const object2 = {};
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const VIEW = ImpressionTypes.VIEW;
|
||||
object2.type = VIEW;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const POLL_EDITOR_VIEWED = ImpressionNames.POLL_EDITOR_VIEWED;
|
||||
object2.name = POLL_EDITOR_VIEWED;
|
||||
defaultImport(object2);
|
||||
const binding = env0_3;
|
||||
binding.useEffect(function() {
|
||||
return _fun89924;
|
||||
}, [onCancel]);
|
||||
const styles = useStyles();
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
const env0_2 = binding.useRef(false);
|
||||
const value5 = (importDefault(11737) /* metro dependency 11737: useCreatePollFormData */)(channel,
|
||||
binding.useCallback(_fun89925, []), binding.useCallback(function({indexToRemove}) {
|
||||
var AccessibilityAnnouncer = require(dependencyMap[25]).AccessibilityAnnouncer;
|
||||
var intl = require(dependencyMap[8]).intl;
|
||||
var BByGU4 = require(dependencyMap[8]).t.BByGU4;
|
||||
AccessibilityAnnouncer.announce(intl.formatToPlainString(BByGU4, {number: indexToRemove + 1}));
|
||||
}, []));
|
||||
const answers = value5.answers;
|
||||
const env0_4 = value5.question;
|
||||
const allowMultiSelect = value5.allowMultiSelect;
|
||||
const env0_6 = value5.setAllowMultiSelect;
|
||||
const canAddMoreAnswers = value5.canAddMoreAnswers;
|
||||
const env0_7 = value5.canRemoveMoreAnswers;
|
||||
const handleQuestionChange = value5.handleQuestionChange;
|
||||
const env0_8 = value5.handleAnswerTextChange;
|
||||
const env0_9 = value5.handleEmojiSelect;
|
||||
const handleAddAnswer = value5.handleAddAnswer;
|
||||
const env0_11 = value5.handleRemoveAnswer;
|
||||
const env0_12 = value5.handleRemoveAnswerImage;
|
||||
const handleSubmitPoll = value5.handleSubmitPoll;
|
||||
const fieldErrors = value5.fieldErrors;
|
||||
const env0_13 = fieldErrors;
|
||||
const duration = value5.duration;
|
||||
const setDuration = value5.setDuration;
|
||||
const createPollError = value5.createPollError;
|
||||
const submitting = value5.submitting;
|
||||
const shouldFocusOnInvalidField = value5.shouldFocusOnInvalidField;
|
||||
const setShouldFocusOnInvalidField = value5.setShouldFocusOnInvalidField;
|
||||
const useTrackPollEventsModule = require(11742) /* metro dependency 11742: useTrackPollEvents */;
|
||||
const useTrackPollCreationEvents = useTrackPollEventsModule.useTrackPollCreationEvents;
|
||||
const env0_16 = Reflect.apply(useTrackPollCreationEvents, useTrackPollEventsModule, [answers,
|
||||
allowMultiSelect]).trackPollCreationCancelled;
|
||||
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(_fun89928);
|
||||
const value6 = (importDefault(11743) /* metro dependency 11743: useFocusHelper */)({onAddAnswer: function() {
|
||||
handleAddAnswer();
|
||||
}});
|
||||
binding.useEffect(_fun89930, [fieldErrors, value6, setShouldFocusOnInvalidField, shouldFocusOnInvalidField]);
|
||||
const items3 = [styles.safeAreaContainer];
|
||||
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
|
||||
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
let intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const items2 = [<HeaderActionButton accessibilityLabel={Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']])} onPress={onPress_89931} source={importDefault(5313) /* metro dependency 5313 */} style={styles.actionButton} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const Flr51u = (require(1244) /* metro dependency 1244: indexNative */).t.Flr51u;
|
||||
items2[1] = <Text accessibilityRole="header" variant="redesign/heading-18/bold" color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(string,
|
||||
intl, [Flr51u])}</Text>;
|
||||
string = intl.string;
|
||||
const JOj8Zk = (require(1244) /* metro dependency 1244: indexNative */).t.JOj8Zk;
|
||||
items2[2] = <HeaderActionButton text={Reflect.apply(string, intl, [JOj8Zk])} style={[styles.actionButton,
|
||||
styles.postButton]} disabled={submitting} onPress={handleSubmitPoll} />;
|
||||
const items4 = [<View style={styles.header}>{items2}</View>];
|
||||
const items5 = [createPollError != null && ((Component) => <Component>{createPollError?.getAnyErrorMessage()}</Component>)(importDefault(11744) /* metro dependency 11744: ErrorBlock */)];
|
||||
items5[1] = ((Component) => <Component ref={value6.refWithKey('question')} onChange={handleQuestionChange} onSubmitEditing={value6.focusNext} error={fieldErrors?.question} />)(env0_13);
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
const items6 = [<FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oMBfeS)} color="text-subtle" style={styles.label} />];
|
||||
items6[1] = answers.map(_fun89932);
|
||||
items6[2] = canAddMoreAnswers && <AddAnswerButton onPress={handleAddAnswer} />;
|
||||
items5[2] = <View style={styles.answerInputsContainer}>{items6}</View>;
|
||||
items4[1] = <ScrollView style={styles.viewPadding} contentContainerStyle={styles.scrollContainer} keyboardShouldPersistTaps="handled">{items5}</ScrollView>;
|
||||
const pollDurationSelectionRow = <PollDurationSelectionRow selectedDuration={duration} onChange={setDuration} />;
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
items4[2] = <View style={styles.pollConfigSection}>{pollDurationSelectionRow}<TableCheckboxRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Ux+iQU'])} checked={allowMultiSelect} onPress={function() {
|
||||
return setAllowMultiSelect(!allowMultiSelect);
|
||||
}} /></View>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<>
|
||||
{items4}
|
||||
</>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89923() { // fn#89923, offset: 0x02024572, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun89924;
|
||||
}
|
||||
|
||||
function _fun89925() { // fn#89925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:3387, offset: 0x020245a7, size: 166 bytes, params: 1, frame: 17
|
||||
env0_2.current = true;
|
||||
let value = environment.__proto__;
|
||||
(require(11733) /* metro dependency 11733: PollCreationModalActionCreators */).closeCreatePollModal();
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = value.open;
|
||||
const object2 = {key: 'POLL_CREATED_SUCCESS'};
|
||||
const PollsIcon = (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
|
||||
object2.IconComponent = PollsIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const OPsckI = (require(1244) /* metro dependency 1244: indexNative */).t.OPsckI;
|
||||
object2.content = Reflect.apply(string, intl, [OPsckI]);
|
||||
Reflect.apply(open, value, [object2]);
|
||||
}
|
||||
|
||||
function handleCancelClose() { // fn#89927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:4249, owner: PollCreation.handleCancelClose, offset: 0x020246c2, size: 124 bytes, params: 1, frame: 16
|
||||
trackPollCreationCancelled();
|
||||
const value = environment.__proto__;
|
||||
(require(11733) /* metro dependency 11733: PollCreationModalActionCreators */).closeCreatePollModal();
|
||||
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
const announce = AccessibilityAnnouncer.announce;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(announce, AccessibilityAnnouncer,
|
||||
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+G3oRq'])]);
|
||||
}
|
||||
|
||||
function _fun89928() { // fn#89928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:4413, offset: 0x0202473e, size: 214 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var moduleValue2;
|
||||
var openAlert;
|
||||
var AccessibilityAnnouncer;
|
||||
var announce;
|
||||
var intl;
|
||||
let value = environment.__proto__;
|
||||
const pollsUtilsModule = require(7149) /* metro dependency 7149: PollsUtils */;
|
||||
if (pollsUtilsModule.isPollCreationEmpty(question, answers)) {
|
||||
trackPollCreationCancelled();
|
||||
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
announce = AccessibilityAnnouncer.announce;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(announce, AccessibilityAnnouncer,
|
||||
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+G3oRq'])]);
|
||||
r0 = false;
|
||||
} else {
|
||||
moduleValue2 = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
openAlert = moduleValue2.openAlert;
|
||||
value = <UnsavedChangesAlertModal onConfirm={handleCancelClose} />;
|
||||
Reflect.apply(openAlert, moduleValue2, ['poll-creation-unsaved-changes', value]);
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun89930() { // fn#89930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:4720, offset: 0x02024814, size: 186 bytes, params: 1, frame: 20
|
||||
var value3;
|
||||
var intl;
|
||||
const Object = global.Object;
|
||||
const value2 = Object.keys(fieldErrors);
|
||||
if (value2.length > 0) {
|
||||
value3 = environment.__proto__;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.w8e4qF,
|
||||
|
||||
{numOfErrors: value2.length}));
|
||||
if (shouldFocusOnInvalidField) {
|
||||
env0_18.focus(value2[0]);
|
||||
setShouldFocusOnInvalidField(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function PollCreationOnPress() { // fn#89931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:5162, owner: PollCreation.onPress, offset: 0x020248ce, size: 126 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const pollsUtilsModule = require(7149) /* metro dependency 7149: PollsUtils */;
|
||||
if (pollsUtilsModule.isPollCreationEmpty(question, answers)) {
|
||||
handleCancelClose();
|
||||
} else {
|
||||
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('poll-creation-unsaved-changes',
|
||||
<UnsavedChangesAlertModal onConfirm={handleCancelClose} />);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89932(a0, a1) { // fn#89932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:6126, offset: 0x0202494c, size: 232 bytes, params: 3, frame: 22
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const PollAnswerInput = importDefault(11746) /* metro dependency 11746: PollAnswerInput */;
|
||||
const binding = env0_18;
|
||||
return (
|
||||
<PollAnswerInput
|
||||
inputRef={binding.refWithKey('answer-' + a0.localCreationAnswerId)}
|
||||
answer={a0}
|
||||
index={a1}
|
||||
channelId={channel.id}
|
||||
onSubmitEditing={binding.focusNext}
|
||||
onAnswerTextChange={handleAnswerTextChange}
|
||||
onAnswerEmojiSelect={handleEmojiSelect}
|
||||
onRemoveAnswer={handleRemoveAnswer}
|
||||
onRemoveAnswerImage={handleRemoveAnswerImage}
|
||||
canRemoveAnswer={canRemoveMoreAnswers}
|
||||
error={fieldErrors == null ? value : fieldErrors['answer-' + a0.localCreationAnswerId]}
|
||||
key={a0.localCreationAnswerId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89924() { // fn#89924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11920:3263, offset: 0x0202457d, size: 42 bytes, params: 1, frame: 11
|
||||
if (!(env1_2.current || onCancel == null)) {
|
||||
onCancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 11751; source: modules/polls/native/PollCreationInputError.tsx; dependencies: [31, 27, 33, 4501, 697, 3869, 1305, 4573, 2] */
|
||||
function _fun90055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11937:6, offset: 0x02028d5e, size: 259 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{container: {'flexDirection': 'row', 'alignItems': 'center',
|
||||
'marginTop': -10}, icon: {'alignSelf': 'center', 'marginRight': 5, color: TEXT_FEEDBACK_CRITICAL}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/PollCreationInputError.tsx');
|
||||
exports.default = PollCreationInputError;
|
||||
}
|
||||
|
||||
function PollCreationInputError({message}) { // fn#90056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11937:330, offset: 0x02028e61, size: 200 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
env0_2.useEffect(_fun90057, [message]);
|
||||
const WarningCircle = (require(1305) /* metro dependency 1305: native */).WarningCircle;
|
||||
const warningCircle = <WarningCircle width={16} height={16} style={styles.icon} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{warningCircle}
|
||||
<Text variant="text-xs/medium" color="text-feedback-critical">
|
||||
{message}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun90057() { // fn#90057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11937:405, offset: 0x02028f29, size: 81 bytes, params: 1, frame: 12
|
||||
var value4;
|
||||
var AccessibilityAnnouncer;
|
||||
if (message != null && message !== '') {
|
||||
value4 = environment.__proto__;
|
||||
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
AccessibilityAnnouncer.announce(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 11733; source: modules/polls/native/PollCreationModalActionCreators.tsx; dependencies: [5080, 11734, 1962, 2] */
|
||||
function _fun89913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11919:6, offset: 0x02023575, size: 116 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/polls/native/PollCreationModalActionCreators.tsx');
|
||||
exports.openCreatePollModal = openCreatePollModal;
|
||||
exports.closeCreatePollModal = closeCreatePollModal;
|
||||
}
|
||||
|
||||
function openCreatePollModal(a0) { // fn#89914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11919:230, offset: 0x020235e9, size: 82 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value, a0, 'create-poll-modal']);
|
||||
}
|
||||
|
||||
function closeCreatePollModal() { // fn#89915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11919:302, offset: 0x0202363b, size: 43 bytes, params: 1, frame: 12
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('create-poll-modal');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* Metro module 11736; source: modules/polls/native/PollDurationActionSheet.tsx; dependencies: [31, 33, 11735, 3869, 4080, 7988, 1244, 7987, 6805, 2] */
|
||||
function _fun89936(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11922:6, offset: 0x02024c9b, size: 153 bytes, params: 8, frame: 18
|
||||
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(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/PollDurationActionSheet.tsx');
|
||||
exports.default = PollDurationActionSheet;
|
||||
}
|
||||
|
||||
function PollDurationRadioGroup({selectedDuration, onChange}) { // fn#89937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11922:120, offset: 0x02024d34, size: 234 bytes, params: 2, frame: 22
|
||||
var object2;
|
||||
const value2 = (importDefault(11735) /* metro dependency 11735: usePollDurationOptions */)();
|
||||
const value3 = env0_3.useCallback(_fun89938, [value2, onChange]);
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0ZStp9']);
|
||||
object2.hasIcons = false;
|
||||
object2.onChange = value3;
|
||||
object2.defaultValue = selectedDuration;
|
||||
const Object = global.Object;
|
||||
return (
|
||||
<TableRadioGroup {...object2}>
|
||||
{Object.entries(value2).map(_fun89939)}
|
||||
</TableRadioGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function PollDurationActionSheet({selectedDuration, onChange}) { // fn#89940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11922:619, offset: 0x02024efb, size: 90 bytes, params: 2, frame: 18
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
return (
|
||||
<ActionSheet>
|
||||
<PollDurationRadioGroup selectedDuration={selectedDuration} onChange={onChange} />
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun89938(a0) { // fn#89938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11922:218, offset: 0x02024e1e, size: 93 bytes, params: 2, frame: 15
|
||||
onChange(a0);
|
||||
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
AccessibilityAnnouncer.announce(env0_1[a0]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun89939(a0) { // fn#89939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11922:459, offset: 0x02024e7b, size: 128 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
var r1;
|
||||
var r5;
|
||||
var item3;
|
||||
var value3;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
const value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r3 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value2;
|
||||
r5 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r5 = value;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r5 = item;
|
||||
}
|
||||
}
|
||||
if (!r1) {
|
||||
r0.return();
|
||||
}
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
return (
|
||||
<TableRadioRow
|
||||
value={global.parseInt(r3)}
|
||||
label={r5}
|
||||
key={r3}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,479 @@
|
||||
/* Metro module 11199; source: modules/polls/native/PollVotesActionSheet.tsx; dependencies: [57, 5, 31, 27, 4502, 6540, 1379, 4814, 1878, 33, 4501, 697, 566, 1423, 6739, 1244, 5278, 4573, 7149, 5321, 8431, 6771, 11200, 9839, 7152, 4617, 3995, 6238, 1305, 9210, 8743, 4017, 4504, 8416, 4048, 4002, 11201, 11202, 6789, 4080, 6275, 2] */
|
||||
function _fun85568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:6, offset: 0x01f73ad3, size: 728 bytes, params: 8, frame: 26
|
||||
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 = importDefault(5) /* metro dependency 5 */;
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.Image;
|
||||
const env0_7 = value2.View;
|
||||
const env0_8 = value2.ScrollView;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value3.jsx;
|
||||
const env0_15 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {headerText: {'textAlign': 'center', 'paddingHorizontal': 16}, subheaderText: {'textAlign': 'center',
|
||||
'marginTop': 2, 'paddingHorizontal': 16}};
|
||||
object2.answerScroll = {marginTop: 24};
|
||||
object2.answerScrollContainer = {'gap': 4, 'paddingHorizontal': 16};
|
||||
object2.answerName = {'marginTop': 16, 'marginHorizontal': 16, 'marginBottom': 8};
|
||||
object2.list = {paddingHorizontal: 16};
|
||||
const object3 = {'padding': 8, 'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null,
|
||||
'maxWidth': 200};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object2.answerButton = object3;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.answerSelected = {backgroundColor: BORDER_SUBTLE};
|
||||
object2.answerEmoji = {marginRight: 8};
|
||||
object2.answerText = {flexShrink: 1};
|
||||
object2.emojiText = {fontSize: 16};
|
||||
object2.emojiImage = {'height': 16, 'width': 16, 'flexShrink': 0};
|
||||
object2.noResultsContainer = {'flexDirection': 'column', 'alignItems': 'center', 'paddingHorizontal': 16};
|
||||
object2.noResultsImage = {'marginTop': 32, 'width': 138};
|
||||
object2.noResultsTitle = {'marginTop': 16, 'textAlign': 'center'};
|
||||
object2.noResultsSubtitle = {'marginTop': 4, 'textAlign': 'center'};
|
||||
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_17 = value.forwardRef(_fun85591);
|
||||
object2 = {code: 'function PollVotesActionSheetTsx1(){const{opacity}=this.__closure;return{flex:1,opacity:opacity.get(),marginBottom:32};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/PollVotesActionSheet.tsx');
|
||||
exports.default = PollVotesActionSheet;
|
||||
}
|
||||
|
||||
function PollEmoji({style, emoji}) { // fn#85569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:1085, offset: 0x01f73dab, size: 153 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
return ((Component) => <Component style={style} src={(require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore],
|
||||
_fun85570)} name={emoji.name} textEmojiStyle={styles.emojiText} fastImageStyle={styles.emojiImage} />)(importDefault(6739) /* metro dependency 6739: Emoji */);
|
||||
}
|
||||
|
||||
function PollVotesHeader({message, selectedAnswerId, setSelectedAnswerId}) { // fn#85571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2349, offset: 0x01f73edf, size: 621 bytes, params: 2, frame: 32
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var GestureDetector;
|
||||
var object;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_5Binding.useMemo(_fun85572, [message.reactions]);
|
||||
const value4 = env0_5Binding.useRef(null);
|
||||
const env0_4 = env0_5Binding.useRef(null);
|
||||
var env0_5Binding = env0_5.useRef(false);
|
||||
env0_5Binding.useEffect(_fun85573, [selectedAnswerId]);
|
||||
const value5 = env0_5Binding.useMemo(_fun85582, []);
|
||||
let poll = message.poll;
|
||||
if (poll == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
poll = message.poll;
|
||||
items2 = [<Text style={styles.headerText} variant="redesign/heading-18/bold" color="mobile-text-heading-primary" accessibilityRole="header">{poll.question.text}</Text>];
|
||||
items2[1] = <Text style={styles.subheaderText} variant="text-md/medium" color="text-default">{intl.format(t.XRkuof,
|
||||
|
||||
{count: value2})}</Text>;
|
||||
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
object = {gesture: value5};
|
||||
var scrollViewProps = {'ref': null, 'style': null, 'contentContainerStyle': null, 'horizontal': true,
|
||||
'showsHorizontalScrollIndicator': false, 'accessibilityRole': 'tablist', ref: value4,
|
||||
style: styles.answerScroll, contentContainerStyle: styles.answerScrollContainer,
|
||||
accessibilityLabel: intl.string(t['qbir+4'])};
|
||||
poll = message.poll;
|
||||
items2[2] = <GestureDetector {...object}><ScrollView {...scrollViewProps}>{poll.answers.map(_fun85583)}</ScrollView></GestureDetector>;
|
||||
r0 = <View>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function VotersList({channelId, messageId, reaction}) { // fn#85584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:4311, offset: 0x01f74551, size: 564 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const {reactors,
|
||||
hasMore} = (importDefault(11200) /* metro dependency 11200: useVoteReactors */)({channelId: channelId,
|
||||
messageId: messageId, reaction: reaction});
|
||||
const messageReactionsContentModule = require(9839) /* metro dependency 9839: MessageReactionsContent */;
|
||||
const useReactorsOnScrollNative = messageReactionsContentModule.useReactorsOnScrollNative;
|
||||
object2 = {channelId: channelId, messageId: messageId, reactionSelected: reaction, reactors: reactors,
|
||||
reactorsHasMore: hasMore};
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
const VOTE = ReactionTypes.VOTE;
|
||||
object2.reactionType = VOTE;
|
||||
const value3 = Reflect.apply(useReactorsOnScrollNative, messageReactionsContentModule, [object2]);
|
||||
const value4 = undefined.useCallback(_fun85586,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
}), reactors.length, channelId, messageId, analyticsLocations]);
|
||||
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(reactors.length !== 0 ? 1 : 0);
|
||||
value7.useEffect(_fun85588, [value7, reactors.length]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = VotersListB;
|
||||
closure.__closure = {opacity: value7};
|
||||
closure.__workletHash = 8593850252158;
|
||||
closure.__initData = env0_18;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const BottomSheetFlashList = (require(8416) /* metro dependency 8416: flashList */).BottomSheetFlashList;
|
||||
return (
|
||||
<View style={value8}>
|
||||
<BottomSheetFlashList
|
||||
contentContainerStyle={styles.list}
|
||||
data={reactors}
|
||||
renderItem={value4}
|
||||
onScroll={value3}
|
||||
estimatedItemSize={79}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NoResults_85590() { // fn#85590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:5717, offset: 0x01f74a38, size: 393 bytes, params: 1, frame: 26
|
||||
const styles = useStyles();
|
||||
const items2 = [<Image style={styles.noResultsImage} source={(require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? importDefault(11201) /* metro dependency 11201 */ : importDefault(11202) /* metro dependency 11202 */} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[1] = <Text style={styles.noResultsTitle} variant="heading-md/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vhQK3o)}</Text>;
|
||||
items2[2] = <Text style={styles.noResultsSubtitle} variant="text-sm/semibold" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bwytdh)}</Text>;
|
||||
return (
|
||||
<View style={styles.noResultsContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun85591({answer, reaction, selected, setSelectedAnswerId}, a1) { // fn#85591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:1466, offset: 0x01f74bc1, size: 613 bytes, params: 3, frame: 25
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const styles = useStyles();
|
||||
const r9 = (reaction == null || reaction.count_details == null ? undefined : reaction.count_details.vote) ?? 0;
|
||||
const value5 = env0_5.useCallback(function() {
|
||||
var setSelectedAnswerIdBinding = setSelectedAnswerId;
|
||||
var String = global.String;
|
||||
setSelectedAnswerIdBinding(String(answer.answer_id));
|
||||
}, [setSelectedAnswerId, answer.answer_id]);
|
||||
const r8 = selected ? 'interactive-text-active' : 'text-default';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.wqBc7A,
|
||||
{numVotes: r9, option: answer.poll_media.text});
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
return (
|
||||
<PressableHighlight
|
||||
ref={a1}
|
||||
onPress={value5}
|
||||
style={[styles.answerButton, selected ? styles.answerSelected : undefined]}
|
||||
accessibilityRole="tab"
|
||||
accessibilityState={{selected: selected}}
|
||||
accessibilityLabel={value8}
|
||||
>
|
||||
{answer.poll_media.emoji != null ? <PollEmoji style={styles.answerEmoji} emoji={answer.poll_media.emoji} /> : null}
|
||||
{answer.poll_media.text != null ? <Text style={styles.answerText} variant="text-sm/semibold" color={r8} lineClamp={1}>{answer.poll_media.text}</Text> : null}
|
||||
<Text
|
||||
variant="text-sm/semibold"
|
||||
color={r8}
|
||||
lineClamp={1}
|
||||
>
|
||||
{' '}
|
||||
{'('}
|
||||
{r9.toLocaleString()}
|
||||
{')'}
|
||||
</Text>
|
||||
</PressableHighlight>
|
||||
);
|
||||
}
|
||||
|
||||
function PollVotesActionSheet({channelId, messageId, initialAnswerId}) { // fn#85593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:6277, offset: 0x01f74e4d, size: 736 bytes, params: 2, frame: 33
|
||||
var r17;
|
||||
var r8;
|
||||
var AnalyticsLocationProvider;
|
||||
var BottomSheet;
|
||||
var Text;
|
||||
var items3;
|
||||
var intl;
|
||||
var format;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const POLL_VOTES = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).POLL_VOTES;
|
||||
const analyticsLocations = defaultImport(POLL_VOTES).analyticsLocations;
|
||||
let [property, property2] = env0_3(env0_5.useState(initialAnswerId), 2);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [MessageStore];
|
||||
const message = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return MessageStore.getMessage(channelId, messageId);
|
||||
}]);
|
||||
const r2 = message != null && message.poll != null;
|
||||
env0_5.useEffect(_fun85595, [r2]);
|
||||
const value8 = env0_5.useMemo(_fun85596, [message?.reactions, property]);
|
||||
if (r2) {
|
||||
r17 = message == null || message.poll == null ? undefined : message.poll.answers.find(_fun85597);
|
||||
r8 = (value8 == null || value8.count_details == null ? undefined : value8.count_details.vote) ?? 0;
|
||||
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
object = {value: analyticsLocations};
|
||||
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
var bottomSheetProps = {scrollable: true,
|
||||
header: <PollVotesHeader message={message} selectedAnswerId={property} setSelectedAnswerId={property2} />};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {'style': null, 'variant': 'text-sm/semibold', 'color': 'text-default',
|
||||
style: styles.answerName};
|
||||
items3 = [r17 == null ? undefined : r17.poll_media.text, ' - '];
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
format = intl.format;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['SG/Cyy'];
|
||||
items3[2] = Reflect.apply(format, intl, [property, {count: r8}]);
|
||||
items2 = [<Text {...textProps}>{items3}</Text>];
|
||||
r8 = value8 == null ? <NoResults_85590 /> : r8 > 0 ? <VotersList channelId={channelId} messageId={messageId} reaction={value8} /> : <NoResults_85590 />;
|
||||
items2[1] = r8;
|
||||
return (
|
||||
<AnalyticsLocationProvider {...object}>
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
{items2}
|
||||
</BottomSheet>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun85570() { // fn#85570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:1168, offset: 0x01f73e44, size: 155 bytes, params: 1, frame: 14
|
||||
var r3;
|
||||
var value6;
|
||||
if (emoji.id != null) {
|
||||
r3 = emoji.animated || (EmojiStore.getCustomEmojiById(emoji.id)?.animated ?? EmojiStore.getCustomEmojiById(emoji.id)?.animated != null);
|
||||
value6 = environment.__proto__;
|
||||
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: emoji.id, animated: r3,
|
||||
size: 16});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun85572() { // fn#85572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2451, offset: 0x01f7414c, size: 51 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(7149) /* metro dependency 7149: PollsUtils */).getTotalVotes(message.reactions);
|
||||
}
|
||||
|
||||
function _fun85573() { // fn#85573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2569, offset: 0x01f7417f, size: 41 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const setTimeout = global.setTimeout;
|
||||
const value = environment.__proto__;
|
||||
setTimeout(env1_4(_fun85575), 0);
|
||||
}
|
||||
|
||||
function _fun85582() { // fn#85582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:3279, offset: 0x01f7447a, 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 _fun85583(a0) { // fn#85583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:3983, offset: 0x01f744b2, size: 159 bytes, params: 2, frame: 21
|
||||
const selectedAnswerIdBinding = selectedAnswerId;
|
||||
let String = global.String;
|
||||
const answer_id = a0.answer_id;
|
||||
const value2 = undefined;
|
||||
const value3 = selectedAnswerIdBinding === String(answer_id);
|
||||
const binding = env1_17;
|
||||
const bindingProps = {ref: value3 ? env0_4 : value2, answer: a0, selected: value3};
|
||||
const formatPollMessageChatDataModule = require(8431) /* metro dependency 8431: formatPollMessageChatData */;
|
||||
const reactionForId = formatPollMessageChatDataModule.reactionForId;
|
||||
const reactions = message.reactions;
|
||||
String = global.String;
|
||||
bindingProps.reaction = Reflect.apply(reactionForId, formatPollMessageChatDataModule, [reactions,
|
||||
String(a0.answer_id)]);
|
||||
bindingProps.setSelectedAnswerId = setSelectedAnswerId;
|
||||
return ((Component) => <Component {...bindingProps} key={a0.answer_id} />)(binding);
|
||||
}
|
||||
|
||||
function _fun85586({item, index}) { // fn#85586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:4712, offset: 0x01f7479f, size: 444 bytes, params: 2, frame: 28
|
||||
var environment;
|
||||
var r8;
|
||||
let value = environment.__proto__;
|
||||
const r7 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getNickname(channel?.guild_id,
|
||||
channel?.id, item) ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(item);
|
||||
const userTag = (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(item);
|
||||
const user = UserStore.getUser(item.id);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const tableRowProps = {start: index === 0, end: reactors.length - 1 === index};
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const guild_id = channel?.guild_id;
|
||||
const r13 = user ?? item;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SMALL = AvatarSizes.SMALL;
|
||||
tableRowProps.icon = <Avatar guildId={guild_id} user={r13} size={SMALL} />;
|
||||
if (r7 != null) {
|
||||
r8 = r7;
|
||||
} else {
|
||||
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
|
||||
value = ((Component) => <Component user={item} />)(value);
|
||||
r8 = value;
|
||||
}
|
||||
tableRowProps.label = r8;
|
||||
tableRowProps.subLabel = r7 != null ? userTag : null;
|
||||
tableRowProps.onPress = onPress_85587;
|
||||
return <TableRow {...tableRowProps} />;
|
||||
}
|
||||
|
||||
function _fun85588() { // fn#85588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:5301, offset: 0x01f749ae, size: 100 bytes, params: 1, frame: 15
|
||||
var binding;
|
||||
var set;
|
||||
var value;
|
||||
if (reactors.length !== 0) {
|
||||
binding = env0_5;
|
||||
set = binding.set;
|
||||
value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [value.withTiming(1, {duration: 200})]);
|
||||
} else {
|
||||
env0_5.set(0);
|
||||
}
|
||||
}
|
||||
|
||||
function VotersListB() { // fn#85589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:5427, owner: VotersList.b, offset: 0x01f74a12, size: 38 bytes, params: 1, frame: 10
|
||||
const object2 = {'flex': 1, 'opacity': null, 'marginBottom': 32};
|
||||
object2.opacity = env0_5.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun85595() { // fn#85595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:6554, offset: 0x01f7514d, size: 56 bytes, params: 1, frame: 11
|
||||
var value;
|
||||
if (!env0_4) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet('PollVotesActionSheet');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun85596() { // fn#85596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:6635, offset: 0x01f75185, size: 87 bytes, params: 1, frame: 14
|
||||
var value3;
|
||||
var moduleValue;
|
||||
const messageBinding = message;
|
||||
const value2 = undefined;
|
||||
if ((messageBinding == null ? value2 : message.reactions) != null) {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(8431) /* metro dependency 8431: formatPollMessageChatData */;
|
||||
return moduleValue.reactionForId(message.reactions, env0_2);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun85597({answer_id}) { // fn#85597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:6830, offset: 0x01f751dc, size: 37 bytes, params: 2, frame: 11
|
||||
const String = global.String;
|
||||
return String(answer_id) === env0_2;
|
||||
}
|
||||
|
||||
function* _fun85575() { // fn#85575, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2588, offset: 0x01f741b3, size: 500 bytes, params: 1, frame: 26
|
||||
var environment;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var current = env2_3.current;
|
||||
if (current != null) {
|
||||
if (env2_4.current == null) {
|
||||
return undefined;
|
||||
}
|
||||
var Promise = global.Promise;
|
||||
var prototype = Promise.prototype;
|
||||
var value3 = Object.create(prototype, {constructor: {value: Promise}});
|
||||
var closure = function(a0) {
|
||||
var env0_0 = a0;
|
||||
current.measure(_fun85577);
|
||||
};
|
||||
var promise = new Promise(closure);
|
||||
var value4 = promise instanceof Object ? promise : value3;
|
||||
Promise = global.Promise;
|
||||
prototype = Promise.prototype;
|
||||
var value5 = Object.create(prototype, {constructor: {value: Promise}});
|
||||
closure = function(a0) {
|
||||
var env0_0 = a0;
|
||||
current.measure(_fun85579);
|
||||
};
|
||||
promise = new Promise(closure);
|
||||
var value6 = promise instanceof Object ? promise : value5;
|
||||
Promise = global.Promise;
|
||||
prototype = Promise.prototype;
|
||||
var value7 = Object.create(prototype, {constructor: {value: Promise}});
|
||||
closure = function(a0) {
|
||||
var env0_0 = a0;
|
||||
current.measureLayout(current, _fun85581);
|
||||
};
|
||||
promise = new Promise(closure);
|
||||
var value8 = promise instanceof Object ? promise : value7;
|
||||
Promise = global.Promise;
|
||||
yield Promise.all([value4, value6, value8]);
|
||||
var value9 = undefined;
|
||||
if (false) {
|
||||
return value9;
|
||||
}
|
||||
var value12 = env3_3(value9, 3);
|
||||
var property = value12[0];
|
||||
var scrollWidth = property.scrollWidth;
|
||||
var scrollPageX = property.scrollPageX;
|
||||
property = value12[1];
|
||||
var width = property.width;
|
||||
var pageX = property.pageX;
|
||||
var x = value12[2].x;
|
||||
var useReducedMotion = env3_9.useReducedMotion;
|
||||
var value13 = !useReducedMotion;
|
||||
current = env2_5.current;
|
||||
if (current) {
|
||||
if (pageX < scrollPageX) {
|
||||
current = env2_3.current;
|
||||
if (current != null) {
|
||||
current.scrollTo({x: x - 16, y: 0, animated: value13});
|
||||
}
|
||||
} else if (pageX + width > scrollPageX + scrollWidth) {
|
||||
current = env2_3.current;
|
||||
if (current != null) {
|
||||
current.scrollTo({x: x + width - scrollWidth + 16, y: 0, animated: value13});
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
current = env2_3.current;
|
||||
if (current != null) {
|
||||
current.scrollTo({x: x + width / 2 - scrollWidth / 2, y: 0, animated: value13});
|
||||
}
|
||||
env2_5.current = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_85587() { // fn#85587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:5129, offset: 0x01f7495b, size: 83 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
const itemBinding = item;
|
||||
return value({userId: itemBinding.id, localUser: itemBinding, sourceAnalyticsLocations: analyticsLocations,
|
||||
channelId: channelId, messageId: messageId});
|
||||
}
|
||||
|
||||
function _fun85576(a0) { // fn#85576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2672, offset: 0x01f743a7, size: 38 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
current.measure(_fun85577);
|
||||
}
|
||||
|
||||
function _fun85578(a0) { // fn#85578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2753, offset: 0x01f743ef, size: 38 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
current.measure(_fun85579);
|
||||
}
|
||||
|
||||
function _fun85580(a0) { // fn#85580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2822, offset: 0x01f74436, size: 43 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
const currentBinding = current;
|
||||
currentBinding.measureLayout(current, _fun85581);
|
||||
}
|
||||
|
||||
function _fun85577(a0, a1, a2, a3, a4) { // fn#85577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2687, offset: 0x01f743cd, size: 34 bytes, params: 6, frame: 11
|
||||
return env0_0({scrollWidth: a2, scrollPageX: a4});
|
||||
}
|
||||
|
||||
function _fun85579(a0, a1, a2, a3, a4) { // fn#85579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2768, offset: 0x01f74415, size: 33 bytes, params: 6, frame: 11
|
||||
return env0_0({width: a2, pageX: a4});
|
||||
}
|
||||
|
||||
function _fun85581(a0) { // fn#85581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11385:2845, offset: 0x01f74461, size: 25 bytes, params: 2, frame: 11
|
||||
return env0_0({x: a0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* Metro module 11743; source: modules/polls/native/useFocusHelper.tsx; dependencies: [7, 6, 31, 44, 6518, 2] */
|
||||
function _fun90009(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:6, offset: 0x020269b2, size: 184 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = value(FocusHelperState);
|
||||
const env0_6 = _fun90011();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/useFocusHelper.tsx');
|
||||
exports.default = useFocusHelper;
|
||||
}
|
||||
|
||||
function FocusHelperState() { // fn#90010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:131, offset: 0x02026a6a, size: 42 bytes, params: 1, frame: 13
|
||||
env0_3(this, FocusHelperState);
|
||||
this.refsByKey = {};
|
||||
this.keyOrder = [];
|
||||
}
|
||||
|
||||
function _fun90011() { // fn#90011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:224, offset: 0x02026a94, size: 113 bytes, params: 1, frame: 15
|
||||
return env0_2(FocusHelperImpl, [{key: 'restartState', value: value_90015}, {key: 'commitState', value: function() {
|
||||
var pendingState = this.pendingState;
|
||||
if (pendingState != null) {
|
||||
this.validState = pendingState;
|
||||
}
|
||||
this.pendingState = undefined;
|
||||
}}, {key: 'refWithKey', value: value_90017}]);
|
||||
}
|
||||
|
||||
function useFocusHelper() { // fn#90018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:1263, offset: 0x02026d52, size: 101 bytes, params: 1, frame: 14
|
||||
const value = a0;
|
||||
const env0_0 = (value !== undefined ? value : {}).onAddAnswer;
|
||||
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun90019);
|
||||
value2.restartState();
|
||||
env0_4.useEffect(_fun90020);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function FocusHelperImpl() { // fn#90012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:245, offset: 0x02026b05, size: 89 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_3(this, FocusHelperImpl);
|
||||
this.validState = new env1_5();
|
||||
this.focusNext = focusNext;
|
||||
this.focus = focus_90014;
|
||||
}
|
||||
|
||||
function value_90015() { // fn#90015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:795, offset: 0x02026c9a, size: 40 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
this.pendingState = new env1_5();
|
||||
}
|
||||
|
||||
function value_90017(a0) { // fn#90017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:972, offset: 0x02026ce1, size: 113 bytes, params: 2, frame: 17
|
||||
const pendingState = this.pendingState;
|
||||
let value = environment.__proto__;
|
||||
(importDefault(44) /* metro dependency 44 */)(pendingState != null, 'Called refWithKey without a valid state');
|
||||
pendingState.keyOrder.push(a0);
|
||||
const property = pendingState.refsByKey[a0];
|
||||
if (property != null) {
|
||||
return property;
|
||||
}
|
||||
value = env1_4.createRef();
|
||||
pendingState.refsByKey[a0] = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun90019() { // fn#90019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:1322, offset: 0x02026db7, size: 29 bytes, params: 1, frame: 9
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_6;
|
||||
value = Object.create(binding.prototype, {constructor: {value: binding}});
|
||||
const binding2 = new binding();
|
||||
return binding2 instanceof Object ? binding2 : value;
|
||||
}
|
||||
|
||||
function _fun90020() { // fn#90020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:1371, offset: 0x02026dd4, size: 37 bytes, params: 1, frame: 10
|
||||
env0_1.onAddAnswer = onAddAnswer;
|
||||
env0_1.commitState();
|
||||
}
|
||||
|
||||
function focusNext() { // fn#90013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:333, owner: FocusHelperImpl.focusNext, offset: 0x02026b5e, size: 249 bytes, params: 1, frame: 25
|
||||
var r11;
|
||||
var r5;
|
||||
var r6;
|
||||
var r3;
|
||||
var r4;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var property;
|
||||
var current;
|
||||
var isFocused2;
|
||||
var value3;
|
||||
var onAddAnswer;
|
||||
var value;
|
||||
const {refsByKey, keyOrder} = env0_0.validState;
|
||||
const value2 = undefined;
|
||||
const properties = Object.keys(refsByKey);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === value2) {
|
||||
r6 = value2;
|
||||
} else {
|
||||
r11 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r11];
|
||||
propertyName2 = r11 + 1;
|
||||
if (propertyName === value2) {
|
||||
r6 = value2;
|
||||
break;
|
||||
}
|
||||
property = refsByKey[propertyName];
|
||||
if (property == null) {
|
||||
r5 = value2;
|
||||
continue;
|
||||
}
|
||||
current = property.current;
|
||||
if (current == null) {
|
||||
r5 = value2;
|
||||
continue;
|
||||
}
|
||||
isFocused2 = current.isFocused();
|
||||
r5 = isFocused2;
|
||||
if (r5 !== true) {
|
||||
r11 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
r6 = propertyName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (r6 != null) {
|
||||
value3 = keyOrder.indexOf(r6);
|
||||
if (value3 === -1) {
|
||||
onAddAnswer = env0_0.onAddAnswer;
|
||||
if (onAddAnswer != null) {
|
||||
onAddAnswer.call(env0_0);
|
||||
}
|
||||
} else if (value3 >= keyOrder.length - 1) {
|
||||
onAddAnswer = env0_0.onAddAnswer;
|
||||
if (onAddAnswer != null) {
|
||||
onAddAnswer.call(env0_0);
|
||||
}
|
||||
} else {
|
||||
property = refsByKey[env0_0.validState.keyOrder[value3 + 1]];
|
||||
value = property == null;
|
||||
if (value) {
|
||||
r3 = value;
|
||||
r4 = property;
|
||||
} else {
|
||||
current = property.current;
|
||||
r3 = current == null;
|
||||
r4 = current;
|
||||
}
|
||||
if (!r3) {
|
||||
r4.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function FocusHelperImplFocus(a0) { // fn#90014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11929:684, owner: FocusHelperImpl.focus, offset: 0x02026c57, size: 67 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var r1;
|
||||
var current;
|
||||
const property = env0_0.validState.refsByKey[a0];
|
||||
const value = property == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
r1 = property;
|
||||
} else {
|
||||
current = property.current;
|
||||
r0 = current == null;
|
||||
r1 = current;
|
||||
}
|
||||
if (!r0) {
|
||||
r1.focus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 11747; source: modules/polls/native/useRenderPollAnswerImage.tsx; dependencies: [57, 31, 27, 4645, 4644, 1881, 33, 566, 11741, 5475, 6739, 3800, 1423, 2] */
|
||||
function _fun90039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11933:6, offset: 0x02027ce6, size: 240 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 env0_5 = (require(27) /* metro dependency 27 */).ActivityIndicator;
|
||||
const env0_6 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
const env0_8 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/native/useRenderPollAnswerImage.tsx');
|
||||
exports.default = useRenderPollAnswerImage;
|
||||
}
|
||||
|
||||
function useRenderPollAnswerImage(a0, a1, a2, a3, a4) { // fn#90040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11933:312, offset: 0x02027dd6, size: 279 bytes, params: 6, frame: 22
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_3 = a3;
|
||||
const env0_4 = a4;
|
||||
const value2 = undefined;
|
||||
const upload = (require(566) /* metro dependency 566: flux */).useStateFromStores([UploadAttachmentStore],
|
||||
_fun90041);
|
||||
let binding = env0_4;
|
||||
const [property, property2] = env0_3(binding.useState(), 2);
|
||||
const status = a2 == null || a2.mediaAttachmentState == null ? value2 : a2.mediaAttachmentState.status;
|
||||
const PollMediaUploadAttachmentStatus = (require(11741) /* metro dependency 11741: PollTypes */).PollMediaUploadAttachmentStatus;
|
||||
const PREPARING = PollMediaUploadAttachmentStatus.PREPARING;
|
||||
const value5 = status === PREPARING;
|
||||
binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
return {renderImage: Reflect.apply(useMemo, binding, [_fun90042, [a2, a4, a3, upload, value5, property]]),
|
||||
upload: upload, setUploadSize: property2};
|
||||
}
|
||||
|
||||
function _fun90041() { // fn#90041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11933:397, offset: 0x02027eed, size: 43 bytes, params: 1, frame: 15
|
||||
const getUpload = UploadAttachmentStore.getUpload;
|
||||
const binding = env0_0;
|
||||
const Poll = DraftType.Poll;
|
||||
return Reflect.apply(getUpload, UploadAttachmentStore, [binding, require, Poll]);
|
||||
}
|
||||
|
||||
function _fun90042() { // fn#90042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11933:609, offset: 0x02027f18, size: 400 bytes, params: 1, frame: 22
|
||||
var r7;
|
||||
var r6;
|
||||
var value3;
|
||||
var Emoji;
|
||||
var object2;
|
||||
var binding;
|
||||
var item;
|
||||
var value;
|
||||
if (result) {
|
||||
value = environment.__proto__;
|
||||
return <ActivityIndicator />;
|
||||
}
|
||||
if (upload != null) {
|
||||
item = upload.item;
|
||||
r6 = importAll ?? env0_6;
|
||||
value = environment.__proto__;
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
return ((Component) => <Component style={{width: r6, height: r6}} source={{uri: item.uri}} />)(value);
|
||||
}
|
||||
const value2 = undefined;
|
||||
let emoji = importDefault == null ? value2 : importDefault.emoji;
|
||||
if (emoji != null) {
|
||||
emoji = importDefault.emoji;
|
||||
value3 = environment.__proto__;
|
||||
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
object2 = {};
|
||||
binding = env0_4;
|
||||
object2.fastImageStyle = {width: binding, height: binding};
|
||||
object2.textEmojiStyle = {fontSize: binding};
|
||||
r7 = emoji.type === (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.UNICODE ? emoji.surrogates : emoji.name;
|
||||
value = '';
|
||||
r6 = r7 ?? value;
|
||||
object2.name = r6;
|
||||
if (emoji.id != null) {
|
||||
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
value = value.getEmojiURL({id: emoji.id, animated: emoji.animated, size: EMOJI_URL_BASE_SIZE});
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value2;
|
||||
}
|
||||
object2.src = r6;
|
||||
return <Emoji {...object2} />;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/* Metro module 8302; source: modules/polls/parsePollResultSystemMessageEmbed.tsx; dependencies: [2] */
|
||||
function _fun66190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8487:6, offset: 0x01bf1616, size: 109 bytes, params: 8, frame: 16
|
||||
const _arrayLikeToArray_66193 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/parsePollResultSystemMessageEmbed.tsx');
|
||||
exports.default = parsePollResultSystemMessageEmbed;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_66191(a0, a1) { // fn#66191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8487:46, offset: 0x01bf1683, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun66192;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_66193(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_66193(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_66193(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun66192;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function parsePollResultSystemMessageEmbed(a0) { // fn#66194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8487:1103, offset: 0x01bf17f7, size: 375 bytes, params: 2, frame: 29
|
||||
var r4;
|
||||
var value5;
|
||||
var rawName;
|
||||
var rawValue;
|
||||
var parseInt;
|
||||
var value6;
|
||||
var animated;
|
||||
if (a0?.fields == null) {
|
||||
return null;
|
||||
}
|
||||
const object3 = {};
|
||||
const object4 = {};
|
||||
const value3 = _createForOfIteratorHelperLoose_66191(a0.fields);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r4 = value4;
|
||||
while (true) {
|
||||
value5 = r4.value;
|
||||
rawName = value5.rawName;
|
||||
if (rawName !== 'poll_question_text') {
|
||||
if (rawName === 'victor_answer_id') {
|
||||
object3.victorAnswerId = value5.rawValue;
|
||||
break;
|
||||
}
|
||||
if (rawName === 'victor_answer_text') {
|
||||
object3.victorAnswerText = value5.rawValue;
|
||||
break;
|
||||
}
|
||||
if (rawName === 'victor_answer_votes') {
|
||||
parseInt = global.parseInt;
|
||||
object3.victorAnswerVotes = parseInt(value5.rawValue, 10);
|
||||
break;
|
||||
}
|
||||
if (rawName === 'total_votes') {
|
||||
parseInt = global.parseInt;
|
||||
object3.totalVotes = parseInt(value5.rawValue, 10);
|
||||
break;
|
||||
}
|
||||
if (rawName === 'victor_answer_emoji_id') {
|
||||
object4.id = value5.rawValue;
|
||||
break;
|
||||
}
|
||||
if (rawName === 'victor_answer_emoji_name') {
|
||||
object4.name = value5.rawValue;
|
||||
break;
|
||||
}
|
||||
if (rawName !== 'victor_answer_emoji_animated') {
|
||||
break;
|
||||
}
|
||||
object4.animated = value5.rawValue === 'true';
|
||||
break;
|
||||
}
|
||||
rawValue = value5.rawValue;
|
||||
object3.questionText = rawValue;
|
||||
value6 = value3();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r4 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (object4.name != null) {
|
||||
animated = object4.animated;
|
||||
object4.animated = animated != null && animated;
|
||||
object3.victorEmoji = object4;
|
||||
}
|
||||
return object3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Metro module 4640; source: modules/polls/transformMessagPoll.tsx; dependencies: [3738, 2] */
|
||||
function _fun39901(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4818:6, offset: 0x010ef32e, size: 97 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/transformMessagPoll.tsx');
|
||||
exports.default = transformMessagePoll;
|
||||
}
|
||||
|
||||
function transformMessagePoll(a0) { // fn#39902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4818:173, offset: 0x010ef38f, size: 61 bytes, params: 2, frame: 14
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
let value = importDefault(3738) /* metro dependency 3738 */;
|
||||
value = value(a0.expiry);
|
||||
object2['expiry'] = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
/* Metro module 11737; source: modules/polls/useCreatePollFormData.tsx; dependencies: [5, 57, 31, 7217, 7149, 11738, 11197, 11739, 11740, 11741, 1244, 8436, 2] */
|
||||
function _fun89941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:6, offset: 0x02024f55, size: 210 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const createPollCreationImageForMedia = function(a0, a1) {
|
||||
return {mediaAttachmentState: {status: a1, mediaURL: a0}, emoji: undefined, stickerId: undefined};
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_6 = importAll(31) /* metro dependency 31 */;
|
||||
const pollsConstantsModule = require(7217) /* metro dependency 7217: PollsConstants */;
|
||||
const env0_7 = pollsConstantsModule.MAX_NUMBER_OF_ANSWERS_PER_POLL;
|
||||
const env0_8 = pollsConstantsModule.MIN_NUMBER_OF_ANSWERS_PER_POLL;
|
||||
const env0_9 = pollsConstantsModule.PollDurations;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/useCreatePollFormData.tsx');
|
||||
exports.default = useCreatePollCommonData;
|
||||
}
|
||||
|
||||
function useCreatePollCommonData(a0, a1, a2, a3) { // fn#89943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:435, offset: 0x0202504d, size: 1112 bytes, params: 5, frame: 45
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_3 = a3;
|
||||
const id = a0.id;
|
||||
const env0_4 = id;
|
||||
let binding = env0_6;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [_fun89944]);
|
||||
const value3 = undefined;
|
||||
const value4 = env0_5(value2, 2);
|
||||
const property = value4[0];
|
||||
var env0_5 = property;
|
||||
var env0_6 = value4[1];
|
||||
const value6 = binding.useState((a3 == null ? value3 : a3.initialQuestion) ?? '');
|
||||
binding = env0_5;
|
||||
const value7 = binding(value6, 2);
|
||||
const property2 = value7[0];
|
||||
const property3 = value7[1];
|
||||
const binding2 = env0_6;
|
||||
useState = binding2.useState;
|
||||
const value8 = binding(Reflect.apply(useState, binding2, [false]), 2);
|
||||
const property4 = value8[0];
|
||||
const property5 = value8[1];
|
||||
const value9 = binding2.useState((a3 == null ? value3 : a3.initialDuration) ?? PollDurations.ONE_DAY);
|
||||
binding = env0_5;
|
||||
const value10 = binding(value9, 2);
|
||||
const property6 = value10[0];
|
||||
const property7 = value10[1];
|
||||
const binding3 = env0_6;
|
||||
useState = binding3.useState;
|
||||
const value11 = binding(Reflect.apply(useState, binding3, [{}]), 2);
|
||||
const property8 = value11[0];
|
||||
const env0_11 = value11[1];
|
||||
useState = binding3.useState;
|
||||
const value12 = binding(Reflect.apply(useState, binding3, [false]), 2);
|
||||
const property9 = value12[0];
|
||||
const property10 = value12[1];
|
||||
const value13 = property.filter(_fun89946);
|
||||
const r18 = property2.length > 0 && value13.length >= MIN_NUMBER_OF_ANSWERS_PER_POLL && property.filter(_fun89947).length === 0;
|
||||
const value19 = env0_5((importDefault(11738) /* metro dependency 11738: useRequest */)((importDefault(11197) /* metro dependency 11197: PollsActionCreators */).createPoll),
|
||||
2);
|
||||
const property11 = value19[0];
|
||||
const {error, loading} = value19[1];
|
||||
const value20 = property.length < MAX_NUMBER_OF_ANSWERS_PER_POLL;
|
||||
const value21 = property.length > MIN_NUMBER_OF_ANSWERS_PER_POLL;
|
||||
binding = env0_6;
|
||||
let useCallback = binding.useCallback;
|
||||
const value22 = Reflect.apply(useCallback, binding, [_fun89948, []]);
|
||||
const value23 = binding.useCallback(_fun89950, []);
|
||||
const value24 = binding.useCallback(_fun89953, []);
|
||||
const value25 = binding.useCallback(_fun89955, [property]);
|
||||
const value27 = binding.useCallback(_fun89956(), [property, value24, value25]);
|
||||
const value28 = binding.useCallback(_fun89960, [property, value24, value25]);
|
||||
const value29 = binding.useCallback(_fun89961, [id, value24, value25]);
|
||||
const value30 = binding.useCallback(_fun89962, []);
|
||||
const value31 = binding.useCallback(_fun89964, [value20]);
|
||||
const value32 = binding.useCallback(_fun89966, [property.length, value21, id, a2, value25]);
|
||||
binding.useEffect(function() {
|
||||
return _fun89969;
|
||||
}, [id]);
|
||||
const value33 = binding.useCallback(_fun89970, [property, property2]);
|
||||
useCallback = binding.useCallback;
|
||||
let value = env0_4(_fun89974);
|
||||
value = Reflect.apply(useCallback, binding, [value, [property2, value13, property4, property6, property11, a0, a1]]);
|
||||
useCallback = binding.useCallback;
|
||||
return {answers: property, question: property2, setQuestion: property3, allowMultiSelect: property4,
|
||||
setAllowMultiSelect: property5, duration: property6, setDuration: property7, canPost: r18,
|
||||
canAddMoreAnswers: value20, canRemoveMoreAnswers: value21, handleQuestionChange: value22,
|
||||
handleAnswerTextChange: value23, handleGifSelect: value27, handleEmojiSelect: value29,
|
||||
handleCustomUpload: value28, handleAddAnswer: value31, handleRemoveAnswer: value32,
|
||||
handleRemoveAnswerImage: value30, fieldErrors: property8, createPoll: value,
|
||||
handleSubmitPoll: Reflect.apply(useCallback, binding, [_fun89975, [value, loading, value33]]),
|
||||
submitting: loading, createPollError: error, shouldFocusOnInvalidField: property9,
|
||||
setShouldFocusOnInvalidField: property10};
|
||||
}
|
||||
|
||||
function _fun89944() { // fn#89944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:506, offset: 0x020254a5, size: 133 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var items2;
|
||||
var value;
|
||||
let r0 = importAll == null || importAll.initialAnswers == null ? undefined : importAll.initialAnswers.map(_fun89945);
|
||||
if (r0 == null) {
|
||||
value = environment.__proto__;
|
||||
value = require(7149) /* metro dependency 7149: PollsUtils */;
|
||||
value = value.generateEmptyPollAnswer();
|
||||
items2 = [value];
|
||||
value = require(7149) /* metro dependency 7149: PollsUtils */;
|
||||
items2[1] = value.generateEmptyPollAnswer();
|
||||
r0 = items2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun89946(a0) { // fn#89946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1044, offset: 0x02025562, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(7149) /* metro dependency 7149: PollsUtils */).isAnswerFilled(a0);
|
||||
}
|
||||
|
||||
function _fun89947(a0) { // fn#89947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1087, offset: 0x0202558b, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(7149) /* metro dependency 7149: PollsUtils */).isIncompleteAnswer(a0);
|
||||
}
|
||||
|
||||
function _fun89948(a0) { // fn#89948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1282, offset: 0x020255b4, size: 37 bytes, params: 2, frame: 12
|
||||
env0_11(function(a0) {
|
||||
var r1;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r1);
|
||||
delete object.question;
|
||||
return object;
|
||||
});
|
||||
env0_8(a0);
|
||||
}
|
||||
|
||||
function _fun89950({text, index, localCreationAnswerId}) { // fn#89950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1365, offset: 0x020255ec, size: 72 bytes, params: 2, frame: 13
|
||||
env0_11(function(a0) {
|
||||
var r3;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r3);
|
||||
delete object['answer-' + localCreationAnswerId];
|
||||
return object;
|
||||
});
|
||||
env0_6(function(a0) {
|
||||
var r4;
|
||||
var items = [];
|
||||
arraySpread(items, a0, 0, r4);
|
||||
var indexBinding = index;
|
||||
var object = {};
|
||||
copyDataProperties(object, items[indexBinding], 0);
|
||||
object['text'] = text;
|
||||
items[indexBinding] = object;
|
||||
return items;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun89953(a0, a1) { // fn#89953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1544, offset: 0x0202569c, size: 39 bytes, params: 3, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
env0_6(_fun89954);
|
||||
}
|
||||
|
||||
function _fun89955(a0, a1, a2) { // fn#89955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1631, offset: 0x020256fa, size: 149 bytes, params: 4, frame: 19
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var removePollUploadAttachment;
|
||||
var localCreationAnswerId;
|
||||
var moduleValue2;
|
||||
const property = env0_5[a1];
|
||||
const image = property.image;
|
||||
const value = undefined;
|
||||
const mediaAttachmentState = image == null ? value : image.mediaAttachmentState;
|
||||
if (mediaAttachmentState != null && mediaAttachmentState.mediaURL !== a2) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = importAll(11739) /* metro dependency 11739: PollUploadAttachmentActionCreatorsNative */;
|
||||
removePollUploadAttachment = moduleValue.removePollUploadAttachment;
|
||||
localCreationAnswerId = property.localCreationAnswerId;
|
||||
moduleValue2 = require(11740) /* metro dependency 11740: PollAttachmentUtils */;
|
||||
Reflect.apply(removePollUploadAttachment, moduleValue, [a0, localCreationAnswerId,
|
||||
moduleValue2.getFileNameFromGifUrl(property.localCreationAnswerId, mediaAttachmentState.mediaURL)]);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun89956() { // fn#89956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1881, offset: 0x0202578f, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_4(_fun89958);
|
||||
return _fun89959;
|
||||
}
|
||||
|
||||
function _fun89960(a0, a1, a2) { // fn#89960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:2375, offset: 0x020258bf, size: 180 bytes, params: 4, frame: 24
|
||||
const localCreationAnswerId = env0_5[a1].localCreationAnswerId;
|
||||
const URL = global.URL;
|
||||
const objectURL = URL.createObjectURL(a2);
|
||||
env0_19(a0, a1);
|
||||
let binding = env0_18;
|
||||
const createPollCreationImageForMediaBinding = createPollCreationImageForMedia;
|
||||
const PollMediaUploadAttachmentStatus = (require(11741) /* metro dependency 11741: PollTypes */).PollMediaUploadAttachmentStatus;
|
||||
const PREPARING = PollMediaUploadAttachmentStatus.PREPARING;
|
||||
binding(createPollCreationImageForMediaBinding(objectURL, PREPARING), a1);
|
||||
(importAll(11739) /* metro dependency 11739: PollUploadAttachmentActionCreatorsNative */).handlePollMediaAttachmentAdd(a0,
|
||||
localCreationAnswerId, a2);
|
||||
binding = env0_18;
|
||||
const READY_TO_UPLOAD = PollMediaUploadAttachmentStatus.READY_TO_UPLOAD;
|
||||
binding(createPollCreationImageForMediaBinding(objectURL, READY_TO_UPLOAD), a1);
|
||||
}
|
||||
|
||||
function _fun89961(a0, a1) { // fn#89961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:2714, offset: 0x02025973, size: 54 bytes, params: 3, frame: 14
|
||||
env0_19(id, a1);
|
||||
env0_18({emoji: a0, stickerId: undefined, mediaAttachmentState: undefined}, a1);
|
||||
}
|
||||
|
||||
function _fun89962(a0) { // fn#89962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:2822, offset: 0x020259a9, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
env0_6(_fun89963);
|
||||
}
|
||||
|
||||
function _fun89964() { // fn#89964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:2910, offset: 0x020259fe, size: 34 bytes, params: 1, frame: 11
|
||||
if (result) {
|
||||
env0_6(function(a0) {
|
||||
var r4;
|
||||
var items = [];
|
||||
var value = arraySpread(items, a0, 0, r4);
|
||||
items[value] = require(dependencyMap[4]).generateEmptyPollAnswer();
|
||||
value + 1;
|
||||
return items;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89966(a0) { // fn#89966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:2992, offset: 0x02025a61, size: 97 bytes, params: 2, frame: 16
|
||||
var length;
|
||||
var binding;
|
||||
const env0_0 = a0;
|
||||
if (result_2) {
|
||||
length = env0_5.length;
|
||||
binding = env0_19;
|
||||
binding(id, a0);
|
||||
binding = env0_6;
|
||||
binding(_fun89967);
|
||||
if (importDefault != null) {
|
||||
importDefault({indexToRemove: a0, numberOfAnswers: length});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89968() { // fn#89968, offset: 0x02025aea, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun89969;
|
||||
}
|
||||
|
||||
function _fun89970() { // fn#89970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3238, offset: 0x02025b22, size: 314 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
let env0_0 = true;
|
||||
const object2 = {};
|
||||
let binding = env0_7;
|
||||
if (binding.trim().length === 0) {
|
||||
env0_0 = false;
|
||||
value2 = environment.__proto__;
|
||||
object2.question = intl.string(t.gPX3oI);
|
||||
}
|
||||
binding = env0_5;
|
||||
if (binding.filter(_fun89971).length < MIN_NUMBER_OF_ANSWERS_PER_POLL) {
|
||||
env0_0 = false;
|
||||
object2['answer-' + env0_5[0].localCreationAnswerId] = intl.string(t.fYvzEX);
|
||||
}
|
||||
env0_5.forEach(_fun89972);
|
||||
env0_11(object2);
|
||||
env0_12(!env0_0);
|
||||
return env0_0;
|
||||
}
|
||||
|
||||
function* _fun89974() { // fn#89974, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3663, offset: 0x02025d24, size: 137 bytes, params: 1, frame: 15
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
var binding = env1_14;
|
||||
var object2 = {};
|
||||
object2.channel = require;
|
||||
object2.question = MAX_NUMBER_OF_ANSWERS_PER_POLL;
|
||||
object2.answers = env1_13;
|
||||
object2.allowMultiSelect = PollDurations;
|
||||
object2.duration = createPollCreationImageForMedia;
|
||||
var PollLayoutTypes = env2_0(env2_3[11]).PollLayoutTypes;
|
||||
var DEFAULT = PollLayoutTypes.DEFAULT;
|
||||
object2.layout = DEFAULT;
|
||||
object2.onClose = importDefault;
|
||||
yield binding(object2);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89975() { // fn#89975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3835, offset: 0x02025dad, size: 40 bytes, params: 1, frame: 11
|
||||
if (!loading && env0_20()) {
|
||||
env0_21();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89945(a0) { // fn#89945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:585, offset: 0x0202552a, size: 56 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(7149) /* metro dependency 7149: PollsUtils */;
|
||||
copyDataProperties(object2, value.generateEmptyPollAnswer(), require);
|
||||
copyDataProperties(object2, a0, require);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun89954(a0) { // fn#89954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1555, offset: 0x020256c3, size: 55 bytes, params: 2, frame: 15
|
||||
const items2 = [];
|
||||
arraySpread(items2, a0, 0, undefined);
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, items2[require], 0);
|
||||
object2['image'] = env0_0;
|
||||
items2[require] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function* _fun89958(a0, a1, a2) { // fn#89958, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:1901, offset: 0x020257be, size: 257 bytes, params: 4, frame: 24
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var localCreationAnswerId = env2_5[a1].localCreationAnswerId;
|
||||
env2_19(a0, a1);
|
||||
var binding = env2_18;
|
||||
var binding2 = env3_10;
|
||||
var binding3 = env3_0;
|
||||
var binding4 = env3_3;
|
||||
var PollMediaUploadAttachmentStatus = binding3(binding4[9]).PollMediaUploadAttachmentStatus;
|
||||
var PREPARING = PollMediaUploadAttachmentStatus.PREPARING;
|
||||
binding(binding2(a2, PREPARING), a1);
|
||||
var value4 = env3_2(binding4[7]);
|
||||
yield value4.handlePollGifAttachmentAdd(a0, localCreationAnswerId, a2);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
if (value5 != null) {
|
||||
env2_18(env3_10(a2, env3_0(env3_3[9]).PollMediaUploadAttachmentStatus.READY_TO_UPLOAD), a1);
|
||||
} else {
|
||||
env2_18(env3_10(a2, env3_0(env3_3[9]).PollMediaUploadAttachmentStatus.ERROR), a1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun89963(a0) { // fn#89963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:2829, offset: 0x020259c9, size: 53 bytes, params: 2, frame: 15
|
||||
const items2 = [];
|
||||
arraySpread(items2, a0, 0, undefined);
|
||||
const binding = env0_0;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, items2[binding], 0);
|
||||
object2['image'] = undefined;
|
||||
items2[binding] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun89967(a0) { // fn#89967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3029, offset: 0x02025ac2, size: 40 bytes, params: 2, frame: 14
|
||||
const items2 = [];
|
||||
arraySpread(items2, a0, 0, undefined);
|
||||
items2.splice(env0_0, 1);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun89969() { // fn#89969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3162, offset: 0x02025af5, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importAll(11739) /* metro dependency 11739: PollUploadAttachmentActionCreatorsNative */;
|
||||
value.removeAllPollUploadAttachments(id);
|
||||
}
|
||||
|
||||
function _fun89971(a0) { // fn#89971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3353, offset: 0x02025c5c, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(7149) /* metro dependency 7149: PollsUtils */).isAnswerFilled(a0);
|
||||
}
|
||||
|
||||
function _fun89972(a0) { // fn#89972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11923:3494, offset: 0x02025c85, size: 148 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var value3;
|
||||
var intl;
|
||||
const pollsUtilsModule = require(7149) /* metro dependency 7149: PollsUtils */;
|
||||
if (pollsUtilsModule.isIncompleteAnswer(a0)) {
|
||||
binding = env0_1;
|
||||
value3 = 'answer-' + a0.localCreationAnswerId;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
binding[value3] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8Qqkc+']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 8628; source: modules/polls/useMaybeAddPollsMarketingEasterEggNote.tsx; dependencies: [1949, 566, 1244, 2] */
|
||||
function _fun68072(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8813:6, offset: 0x01c3dc8f, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/useMaybeAddPollsMarketingEasterEggNote.tsx');
|
||||
exports.default = useMaybeAddPollsMarketingEasterEggNote;
|
||||
}
|
||||
|
||||
function useMaybeAddPollsMarketingEasterEggNote(a0) { // fn#68073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8813:206, offset: 0x01c3dd01, size: 146 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var intl;
|
||||
let value = a0;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
if (value !== ':pizza:') {
|
||||
r0 = value;
|
||||
} else if (Reflect.apply(useStateFromStores, fluxModule, [[LocaleStore], function() {
|
||||
return LocaleStore.locale.startsWith('en-');
|
||||
}])) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1knDPI'],
|
||||
{emojiName: value});
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 11735; source: modules/polls/usePollDurationOptions.tsx; dependencies: [7217, 1244, 2] */
|
||||
function _fun89934(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11921:6, offset: 0x02024a4b, size: 117 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(7217) /* metro dependency 7217: PollsConstants */).PollDurations;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/usePollDurationOptions.tsx');
|
||||
exports.default = usePollDurationOptions;
|
||||
}
|
||||
|
||||
function usePollDurationOptions() { // fn#89935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11921:204, offset: 0x02024ac0, size: 475 bytes, params: 1, frame: 23
|
||||
const Object = global.Object;
|
||||
const freeze = Object.freeze;
|
||||
const ONE_HOUR = PollDurations.ONE_HOUR;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FOUR_HOURS = PollDurations.FOUR_HOURS;
|
||||
const EIGHT_HOURS = PollDurations.EIGHT_HOURS;
|
||||
const ONE_DAY = PollDurations.ONE_DAY;
|
||||
const THREE_DAYS = PollDurations.THREE_DAYS;
|
||||
const string = intl.string;
|
||||
const Xn5rX3 = t.Xn5rX3;
|
||||
const SEVEN_DAYS = PollDurations.SEVEN_DAYS;
|
||||
const FOURTEEN_DAYS = PollDurations.FOURTEEN_DAYS;
|
||||
return Reflect.apply(freeze, Object, [{[ONE_HOUR]: Reflect.apply(formatToPlainString, intl, [t['b/mgtw'],
|
||||
{num: 1}]), [FOUR_HOURS]: intl.formatToPlainString(t['b/mgtw'], {num: 4}),
|
||||
[EIGHT_HOURS]: intl.formatToPlainString(t['b/mgtw'], {num: 8}), [ONE_DAY]: intl.formatToPlainString(t['b/mgtw'],
|
||||
{num: 24}), [THREE_DAYS]: Reflect.apply(string, intl, [Xn5rX3]), [SEVEN_DAYS]: intl.string(t['Lmq+rj']),
|
||||
[FOURTEEN_DAYS]: intl.string(t['mb8A/O'])}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 11742; source: modules/polls/useTrackPollEvents.tsx; dependencies: [31, 661, 4863, 8436, 2] */
|
||||
function _fun90005(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11928:6, offset: 0x020267c8, size: 143 bytes, params: 8, frame: 18
|
||||
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(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/useTrackPollEvents.tsx');
|
||||
exports.useTrackPollCreationEvents = useTrackPollCreationEvents;
|
||||
}
|
||||
|
||||
function useTrackPollCreationEvents(a0, a1) { // fn#90006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11928:230, offset: 0x02026857, size: 62 bytes, params: 3, frame: 16
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const object2 = {};
|
||||
object2.trackPollCreationCancelled = env0_3.useCallback(_fun90007, [a0, a1]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun90007() { // fn#90007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11928:320, offset: 0x02026895, size: 178 bytes, params: 1, frame: 19
|
||||
const env0_0 = 0;
|
||||
const env0_1 = 0;
|
||||
const env0_2 = 0;
|
||||
const binding = env0_0;
|
||||
binding.forEach(_fun90008);
|
||||
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
const POLL_CREATION_CANCELLED = AnalyticEvents.POLL_CREATION_CANCELLED;
|
||||
const object2 = {};
|
||||
object2.answers_count = binding.length;
|
||||
object2.attachments_count = env0_0;
|
||||
object2.emojis_count = env0_1;
|
||||
object2.stickers_count = env0_2;
|
||||
object2.allow_multiselect = require;
|
||||
const PollLayoutTypes = (require(8436) /* metro dependency 8436: PollLayoutTypes */).PollLayoutTypes;
|
||||
const DEFAULT = PollLayoutTypes.DEFAULT;
|
||||
object2.layout_type = DEFAULT;
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [POLL_CREATION_CANCELLED, object2]);
|
||||
}
|
||||
|
||||
function _fun90008({image}) { // fn#90008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11928:352, offset: 0x02026947, size: 107 bytes, params: 2, frame: 3
|
||||
if (image != null) {
|
||||
if (image.emoji != null) {
|
||||
env0_1 += 1;
|
||||
} else if (image.stickerId != null) {
|
||||
env0_2 += 1;
|
||||
} else if (image.mediaAttachmentState != null) {
|
||||
env0_0 += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Metro module 11200; source: modules/polls/useVoteReactors.tsx; dependencies: [7150, 661, 566, 7152, 644, 2] */
|
||||
function _fun85598(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11386:6, offset: 0x01f75201, size: 140 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const messageReactionsStore = importDefault(7150) /* metro dependency 7150: MessageReactionsStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).DEFAULT_NUM_REACTION_USERS;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/polls/useVoteReactors.tsx');
|
||||
exports.default = useVoteReactors;
|
||||
}
|
||||
|
||||
function useVoteReactors({channelId, messageId, reaction}) { // fn#85599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11386:220, offset: 0x01f7528d, size: 189 bytes, params: 2, frame: 22
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const items2 = [MessageReactionsStore];
|
||||
const items3 = [channelId, messageId];
|
||||
items3[2] = reaction.emoji;
|
||||
let value = importDefault(644) /* metro dependency 644 */;
|
||||
value = Reflect.apply(useStateFromStores, fluxModule, [items2, _fun85600, items3, value]);
|
||||
return {reactors: value, hasMore: (reaction.count_details?.vote ?? 0) > value.length};
|
||||
}
|
||||
|
||||
function _fun85600() { // fn#85600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11386:325, offset: 0x01f7534a, size: 128 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const getReactions = MessageReactionsStore.getReactions;
|
||||
const channelIdBinding = channelId;
|
||||
const messageIdBinding = messageId;
|
||||
const emoji = reaction.emoji;
|
||||
value = undefined;
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
const VOTE = ReactionTypes.VOTE;
|
||||
const value3 = Reflect.apply(getReactions, MessageReactionsStore, [channelIdBinding, messageIdBinding, emoji,
|
||||
DEFAULT_NUM_REACTION_USERS, VOTE]);
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
let r0 = value3 == null ? value : value3.values();
|
||||
r0 = r0 ?? [];
|
||||
return Reflect.apply(from, Array, [r0]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user