/* Metro module 7239; source: modules/autocompleter/native/UserSearch.worker.tsx; dependencies: [6, 7, 15, 17, 18, 27, 2] */ import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ function _fun58211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:6, offset: 0x016c1d35, size: 206 bytes, params: 8, frame: 14 let value = ReactNativeModule; const NativeModules = value.NativeModules; const NativeEventEmitter = value.NativeEventEmitter; const env0_5 = NativeModules.UserSearchWorkerManager; value = _fun58215(NativeEventEmitter); value = new value(); module.exports = value; (FileImportTrackerModule).fileFinishedImporting('modules/autocompleter/native/UserSearch.worker.tsx'); function _isNativeReflectConstruct_58212() { // fn#58212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:149, offset: 0x016c1e03, 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_58212_isNativeReflectConstruct = function() { return !!result; })(); } function _fun58215(a0) { // fn#58215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:376, offset: 0x016c1e61, size: 137 bytes, params: 2, frame: 16 const UserSearchWorker2 = UserSearchWorker; Inherits(UserSearchWorker2, a0); return CreateClass(UserSearchWorker2, [{key: 'postMessage', value: value_58219}, {key: 'addEventListener', value: function(a0, a1) { if (a0 === 'message') { if (this.subscription == null) { this.subscription = this.addListener('ReturnResults', this.handleCallback); } this.handlers.add(a1); } }}, {key: 'removeEventListener', value: function(a0, a1) { var property; if (a0 === 'message') { property = this.handlers; property.delete(a1); if (this.handlers.size === 0) { property = this.subscription; if (property != null) { property.remove(); } this.subscription = null; } } }}, {key: 'terminate', value: function() { UserSearchWorkerManager.terminate(); }}]); function UserSearchWorker() { // fn#58216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:388, offset: 0x016c1eea, size: 175 bytes, params: 1, frame: 20 var environment; let value = environment.__proto__; env1_0(this, UserSearchWorker); const items2 = [UserSearchWorkerManager]; const value3 = env1_3(UserSearchWorker); value = env1_2(this, _isNativeReflectConstruct_58212() ? global.Reflect.construct(value3, items2, env1_3(this).constructor) : value3.apply(this, items2)); const Set = global.Set; const value4 = Object.create(Set.prototype, {constructor: {value: Set}}); const set = new Set(); value.handlers = set instanceof Object ? set : value4; value.subscription = null; value.handleCallback = function(a0) { a0.handlers.forEach(_fun58218); }; return value; function UserSearchWorkerHandleCallback(a0) { // fn#58217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:671, owner: UserSearchWorker.handleCallback, offset: 0x016c1f99, size: 41 bytes, params: 2, frame: 11 a0.handlers.forEach(_fun58218); function _fun58218(a0) { // fn#58218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:695, offset: 0x016c1fc2, size: 25 bytes, params: 2, frame: 11 return a0({data: ClassCallCheck}); } } } function value_58219(a0) { // fn#58219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7417:789, offset: 0x016c1fdb, size: 81 bytes, params: 2, frame: 13 var value; var onmessage; var JSON; if (a0) { value = environment.__proto__; onmessage = UserSearchWorkerManager.onmessage; JSON = global.JSON; Reflect.apply(onmessage, UserSearchWorkerManager, [JSON.stringify(a0)]); return undefined; } const Error = global.Error; throw new Error('Invalid data'); } } } global.__d(_fun58211, 7239, [6, 7, 15, 17, 18, 27, 2]) /* metro module 7239, dependencies: [6, 7, 15, 17, 18, 27, 2] */;