588 lines
26 KiB
React
588 lines
26 KiB
React
/* Metro module 4706; source: unknown; dependencies: [65, 4707, 4708, 4709, 4710, 4711, 4704, 4703] */
|
|
function _fun40689(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:6, offset: 0x011083de, size: 250 bytes, params: 8, frame: 20
|
|
var closure;
|
|
let value = this;
|
|
const env0_0 = require;
|
|
const env0_2 = require(65) /* metro dependency 65 */;
|
|
let r4 = value && value.__createBinding;
|
|
if (!r4) {
|
|
if (!global.Object.create) {
|
|
closure = function(a0, a1, a2, a3) {
|
|
var value = a2;
|
|
var value2 = a3;
|
|
a0[value2 !== undefined ? value2 : value] = a1[value];
|
|
};
|
|
}
|
|
}
|
|
r4 = value && value.__exportStar;
|
|
r4 = !r4 ? _fun40693 : r4;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.validateFileType = undefined;
|
|
r4(require(4707) /* metro dependency 4707 */, exports);
|
|
r4(require(4708) /* metro dependency 4708 */, exports);
|
|
r4(require(4709) /* metro dependency 4709 */, exports);
|
|
r4(require(4710) /* metro dependency 4710 */, exports);
|
|
r4(require(4711) /* metro dependency 4711 */, exports);
|
|
exports.validateFileType = validateFileType;
|
|
}
|
|
|
|
function _fun40690(a0, a1, a2, a3) { // fn#40690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:103, offset: 0x011084d8, size: 140 bytes, params: 5, frame: 19
|
|
let value = a2;
|
|
const value2 = a3;
|
|
const env0_0 = a1;
|
|
const r5 = value2 !== undefined ? value2 : value;
|
|
let Object = global.Object;
|
|
value = Object.getOwnPropertyDescriptor(a1, value);
|
|
const r4 = value && !('get' in value ? !a1.__esModule : value.writable || value.configurable) ? value : {enumerable: true,
|
|
get: function() {
|
|
return require[importDefault];
|
|
}};
|
|
Object = global.Object;
|
|
Object.defineProperty(a0, r5, r4);
|
|
}
|
|
|
|
function _fun40693(a0, a1) { // fn#40693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:397, offset: 0x01108564, size: 93 bytes, params: 3, frame: 25
|
|
var r6;
|
|
var r11;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var value2;
|
|
var Object;
|
|
var prototype;
|
|
var hasOwnProperty;
|
|
var value3;
|
|
for (propertyName in a0) {
|
|
value2 = propertyName === 'default';
|
|
if (value2) {
|
|
r11 = value2;
|
|
continue;
|
|
}
|
|
Object = global.Object;
|
|
prototype = Object.prototype;
|
|
hasOwnProperty = prototype.hasOwnProperty;
|
|
value3 = hasOwnProperty.call(a1, propertyName);
|
|
r11 = value3;
|
|
if (r11) {
|
|
r6 = propertyName2;
|
|
continue;
|
|
}
|
|
env0_3(a1, a0, propertyName);
|
|
r6 = propertyName2;
|
|
}
|
|
}
|
|
|
|
function validateFileType(a0, a1, a2) { // fn#40694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:653, offset: 0x011085c1, size: 827 bytes, params: 4, frame: 27
|
|
var environment;
|
|
var r10;
|
|
var chunkSize;
|
|
var r9;
|
|
var excludeSimilarTypes;
|
|
var r3;
|
|
var r5;
|
|
var r1;
|
|
var value;
|
|
var items3;
|
|
var value2;
|
|
var binding;
|
|
var Set;
|
|
var map;
|
|
var value3;
|
|
var prototype;
|
|
var value4;
|
|
var set;
|
|
var value5;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var Object;
|
|
var hasOwnProperty;
|
|
var call;
|
|
var property;
|
|
var moduleValue;
|
|
var FileTypes;
|
|
var value6;
|
|
var TypeError;
|
|
var toLowerCase;
|
|
var HermesInternal;
|
|
var concat;
|
|
var typeError;
|
|
var push;
|
|
var error;
|
|
var value8;
|
|
var value9;
|
|
var length;
|
|
var value10;
|
|
var items2;
|
|
var iterator3;
|
|
var item3;
|
|
var moduleValue2;
|
|
var getSignaturesByName;
|
|
var value11;
|
|
var value12;
|
|
var moduleValue3;
|
|
var FILE_TYPES_REQUIRED_ADDITIONAL_CHECK;
|
|
var includes;
|
|
var value13;
|
|
var value14;
|
|
var moduleValue4;
|
|
var getInfoByName;
|
|
var value15;
|
|
var getFileChunk;
|
|
var value16;
|
|
var fileChunk;
|
|
var detectSignature;
|
|
var value18;
|
|
var filter;
|
|
var value19;
|
|
var detectTypeByAdditionalCheck;
|
|
var value20;
|
|
var some;
|
|
exceptionSkip78: while (true) {
|
|
exceptionLanding78: while (true) {
|
|
exceptionSkip32: while (true) {
|
|
exceptionLanding32: while (true) {
|
|
value = undefined;
|
|
items3 = [];
|
|
value2 = environment;
|
|
binding = env0_2;
|
|
Set = global.Set;
|
|
map = a1.map;
|
|
value3 = Reflect.apply(map, a1, [function(a0) {
|
|
var value = a0.split('.');
|
|
value = value.join('');
|
|
value = value.toUpperCase();
|
|
return value !== '7Z' ? value : '_' + value;
|
|
}]);
|
|
prototype = Set.prototype;
|
|
value4 = Object.create(prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
value5 = set instanceof Object ? set : value4;
|
|
iterator = binding(value5)[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r10 = iterator;
|
|
reducibleLoop1: while (true) {
|
|
item2 = Reflect.apply(iterator2, r10, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r10;
|
|
if (item2 === value) {
|
|
if (a2) {
|
|
Object = global.Object;
|
|
prototype = Object.prototype;
|
|
hasOwnProperty = prototype.hasOwnProperty;
|
|
call = hasOwnProperty.call;
|
|
reducibleJoin40: while (true) {
|
|
if (Reflect.apply(call, hasOwnProperty, [a2, 'chunkSize'])) {
|
|
reducibleJoin37: while (true) {
|
|
if (a2 == null) {
|
|
chunkSize = value;
|
|
break reducibleJoin37;
|
|
}
|
|
chunkSize = a2.chunkSize;
|
|
break reducibleJoin37;
|
|
}
|
|
value8 = 0;
|
|
reducibleJoin39: while (true) {
|
|
if (chunkSize === null) {
|
|
r9 = value8;
|
|
break reducibleJoin39;
|
|
}
|
|
if (value === chunkSize) {
|
|
r9 = value8;
|
|
break reducibleJoin39;
|
|
}
|
|
r9 = chunkSize;
|
|
break reducibleJoin39;
|
|
}
|
|
if (r9 <= value8) {
|
|
throw new global.RangeError('chunkSize must be bigger than zero');
|
|
}
|
|
break reducibleJoin40;
|
|
}
|
|
break reducibleJoin40;
|
|
}
|
|
}
|
|
reducibleJoin46: while (true) {
|
|
reducibleJoin44: while (true) {
|
|
if (a2) {
|
|
reducibleJoin43: while (true) {
|
|
if (a2 == null) {
|
|
excludeSimilarTypes = value;
|
|
break reducibleJoin43;
|
|
}
|
|
excludeSimilarTypes = a2.excludeSimilarTypes;
|
|
break reducibleJoin43;
|
|
}
|
|
if (excludeSimilarTypes) {
|
|
r3 = items3;
|
|
break reducibleJoin46;
|
|
}
|
|
break reducibleJoin44;
|
|
}
|
|
break reducibleJoin44;
|
|
}
|
|
value9 = addSimilarTypes(items3);
|
|
length = value9.length;
|
|
if (length > 0) {
|
|
concat = items3.concat;
|
|
value10 = Reflect.apply(concat, items3, [value9]);
|
|
r3 = value10;
|
|
break reducibleJoin46;
|
|
}
|
|
r3 = items3;
|
|
break reducibleJoin46;
|
|
}
|
|
items2 = [];
|
|
iterator = r3[Symbol.iterator]();
|
|
iterator3 = iterator.next;
|
|
r5 = [];
|
|
r10 = iterator;
|
|
reducibleLoop47: while (true) {
|
|
item3 = Reflect.apply(iterator3, r10, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : r10;
|
|
if (item3 === value) {
|
|
break reducibleLoop47;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
property = dependencyMap[6];
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
moduleValue2 = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
FileTypes = moduleValue2.FileTypes;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
getSignaturesByName = FileTypes.getSignaturesByName;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
value11 = Reflect.apply(getSignaturesByName, FileTypes, [item]);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
concat = r5.concat;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
value12 = Reflect.apply(concat, r5, [value11]);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
property = dependencyMap[6];
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
moduleValue3 = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
FILE_TYPES_REQUIRED_ADDITIONAL_CHECK = moduleValue3.FILE_TYPES_REQUIRED_ADDITIONAL_CHECK;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
includes = FILE_TYPES_REQUIRED_ADDITIONAL_CHECK.includes;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
toLowerCase = item.toLowerCase;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
value13 = Reflect.apply(toLowerCase, item, []);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
value14 = Reflect.apply(includes, FILE_TYPES_REQUIRED_ADDITIONAL_CHECK, [value13]);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
if (value14) {
|
|
try {
|
|
push = items2.push;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
property = dependencyMap[6];
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
moduleValue4 = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
FileTypes = moduleValue4.FileTypes;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
getInfoByName = FileTypes.getInfoByName;
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
value15 = Reflect.apply(getInfoByName, FileTypes, [item]);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
try {
|
|
Reflect.apply(push, items2, [value15]);
|
|
} catch (error) {
|
|
break exceptionLanding78;
|
|
}
|
|
r5 = value12;
|
|
r10 = item3;
|
|
continue reducibleLoop47;
|
|
}
|
|
r5 = value12;
|
|
r10 = item3;
|
|
continue reducibleLoop47;
|
|
}
|
|
getFileChunk = require(dependencyMap[7]).getFileChunk;
|
|
reducibleJoin81: while (true) {
|
|
if (a2 == null) {
|
|
chunkSize = value;
|
|
break reducibleJoin81;
|
|
}
|
|
chunkSize = a2.chunkSize;
|
|
break reducibleJoin81;
|
|
}
|
|
reducibleJoin83: while (true) {
|
|
if (chunkSize) {
|
|
break reducibleJoin83;
|
|
}
|
|
value16 = 64;
|
|
chunkSize = value16;
|
|
break reducibleJoin83;
|
|
}
|
|
fileChunk = getFileChunk(a0, chunkSize);
|
|
FileTypes = require(dependencyMap[6]).FileTypes;
|
|
detectSignature = FileTypes.detectSignature;
|
|
value18 = Reflect.apply(detectSignature, FileTypes, [fileChunk, r5]);
|
|
var env0_0 = value18;
|
|
if (value18) {
|
|
length = items2.length;
|
|
if (length > 0) {
|
|
filter = items2.filter;
|
|
value19 = Reflect.apply(filter, items2, [_fun40699]);
|
|
length = value19.length;
|
|
reducibleJoin87: while (true) {
|
|
if (length > 0) {
|
|
FileTypes = require(dependencyMap[6]).FileTypes;
|
|
detectTypeByAdditionalCheck = FileTypes.detectTypeByAdditionalCheck;
|
|
value = Reflect.apply(detectTypeByAdditionalCheck, FileTypes, [fileChunk,
|
|
value19]);
|
|
var env0_1 = value;
|
|
value20 = !!value;
|
|
reducibleJoin90: while (true) {
|
|
if (value) {
|
|
some = r3.some;
|
|
value = Reflect.apply(some, r3, [_fun40700]);
|
|
r1 = value;
|
|
break reducibleJoin90;
|
|
}
|
|
r1 = value20;
|
|
break reducibleJoin90;
|
|
}
|
|
return r1;
|
|
}
|
|
break reducibleJoin87;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
try {
|
|
Object = global.Object;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
prototype = Object.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
hasOwnProperty = prototype.hasOwnProperty;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
call = hasOwnProperty.call;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
property = dependencyMap[6];
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
moduleValue = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
FileTypes = moduleValue.FileTypes;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(call, hasOwnProperty, [FileTypes, item]);
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
if (value6) {
|
|
try {
|
|
push = items3.push;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
Reflect.apply(push, items3, [item]);
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
r10 = item2;
|
|
continue reducibleLoop1;
|
|
}
|
|
try {
|
|
TypeError = global.TypeError;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
toLowerCase = item.toLowerCase;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
value = Reflect.apply(toLowerCase, item, []);
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
HermesInternal = global.HermesInternal;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
concat = HermesInternal.concat;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
value = 'Type `' + value + '` is not supported. Please make sure that `types` list conatins only supported files';
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
prototype = TypeError.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
typeError = new TypeError();
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
value = typeError instanceof Object ? typeError : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
try {
|
|
throw value;
|
|
} catch (error) {
|
|
break exceptionLanding32;
|
|
}
|
|
}
|
|
break exceptionSkip32;
|
|
}
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
break exceptionSkip32;
|
|
}
|
|
break exceptionSkip78;
|
|
}
|
|
try {
|
|
item3.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
break exceptionSkip78;
|
|
}
|
|
}
|
|
|
|
function addSimilarTypes(a0) { // fn#40696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:1255, owner: validateFileType.addSimilarTypes, offset: 0x0110894a, size: 73 bytes, params: 2, frame: 12
|
|
return a0.some(function(a0) {
|
|
return a0 === 'MP4';
|
|
}) ? ['M4V'] : a0.some(_fun40698) ? ['M4A'] : [];
|
|
}
|
|
|
|
function _fun40699({signatures}) { // fn#40699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:1779, offset: 0x011089ad, size: 28 bytes, params: 2, frame: 11
|
|
return signatures.includes(env0_0);
|
|
}
|
|
|
|
function _fun40700(a0) { // fn#40700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4884:1917, offset: 0x011089c9, size: 26 bytes, params: 2, frame: 9
|
|
return a0.toLowerCase() === env0_1;
|
|
}
|
|
|
|
function _fun40698(a0) { // fn#40698, offset: 0x011089a0, size: 13 bytes, params: 2, frame: 2
|
|
return a0 === 'AAC';
|
|
}
|
|
|