/* Metro module 4650; source: lib/uploader/Upload.tsx; dependencies: [6, 7, 15, 17, 18, 4651, 22, 4655, 491, 639, 2] */ function _fun40122(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:6, offset: 0x010f6cfc, size: 320 bytes, params: 8, frame: 21 var object3; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(7) /* metro dependency 7 */; const env0_6 = importDefault(15) /* metro dependency 15 */; const env0_7 = importDefault(17) /* metro dependency 17 */; const env0_8 = importDefault(18) /* metro dependency 18 */; object3 = {REACT_NATIVE: 0}; object3[0] = 'REACT_NATIVE'; object3.WEB = 1; object3[1] = 'WEB'; const object4 = {FILE_ATTACHMENT: 0}; object4[0] = 'FILE_ATTACHMENT'; object4.IMAGE_PICKER = 1; object4[1] = 'IMAGE_PICKER'; object4.IMAGE_EDITOR = 2; object4[2] = 'IMAGE_EDITOR'; const EventEmitter = (require(639) /* metro dependency 639 */).EventEmitter; const value = _fun40126(EventEmitter); (require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/Upload.tsx'); exports.default = value; exports.UploadPlatform = object3; exports.isResolvedUpload = function(a0) { return a0.isVideo !== undefined && a0.isImage !== undefined; }; exports.UploadOrigin = object4; } function _isNativeReflectConstruct_40123() { // fn#40123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:148, offset: 0x010f6e3c, size: 94 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_40123_isNativeReflectConstruct = function() { return !!result; })(); } function _fun40126(a0) { // fn#40126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:570, offset: 0x010f6e9a, size: 91 bytes, params: 2, frame: 16 const closure = Upload; env0_8(closure, a0); return env0_5(closure, [{key: 'cancel', value: function() { }}, {key: 'resetState', value: function() { return this; }}]); } function Upload(a0) { // fn#40127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4828:582, offset: 0x010f6ef5, size: 579 bytes, params: 2, frame: 21 var moduleValue; var classifyFile; var file; var classification; var moduleValue2; var getFile; var filename; var value8; const value = environment.__proto__; env1_4(this, Upload); const value3 = env1_7(Upload); const value6 = env1_6(this, _isNativeReflectConstruct_40123() ? global.Reflect.construct(value3, [], env1_7(this).constructor) : value3.apply(this, undefined)); value6.allowOptimization = true; value6.item = a0; const platform = a0.platform; const REACT_NATIVE = env1_9.REACT_NATIVE; if (platform === REACT_NATIVE) { value6.id = a0.id ?? a0.uri; moduleValue2 = require(4651) /* metro dependency 4651: UploadUtils */; getFile = moduleValue2.getFile; filename = a0.filename; value8 = Reflect.apply(getFile, moduleValue2, [{uri: a0.uri, overrideFilename: filename, overrideType: a0.mimeType}]); filename = value8.filename; value6.filename = filename; value6.isImage = value8.isImage; value6.isVideo = value8.isVideo; value6.mimeType = value8.type; value6.origin = a0.origin; value6.durationSecs = a0.durationSecs; value6.waveform = a0.waveform; } else { value6.id = a0.id ?? (importDefault(22) /* metro dependency 22 */).uniqueId('upload'); moduleValue = importAll(4655) /* metro dependency 4655: FileUtils */; classifyFile = moduleValue.classifyFile; file = a0.file; value6.classification = Reflect.apply(classifyFile, moduleValue, [file]); classification = value6.classification; value6.isImage = classification === 'image'; classification = value6.classification; value6.isVideo = classification === 'video'; file = a0.file; value6.filename = file.name; file = a0.file; value6.mimeType = file.type; value6.origin = a0.origin; } value6.isThumbnail = a0.isThumbnail; value6.clip = a0.clip; value6.uniqueId = (require(491) /* metro dependency 491 */).v4(); value6.spoiler = false; value6.description = null; return value6; }