/* Metro module 377; source: unknown; dependencies: [6, 7, 347, 367, 44, 117, 348] */ function _fun5617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:6, offset: 0x00ce12a5, size: 123 bytes, params: 8, frame: 19 const env0_0 = require; const closure = attachNativeEventImpl; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; const value = _fun5623(); exports.attachNativeEventImpl = closure; exports.AnimatedEvent = value; } function attachNativeEventImpl(a0, a1, a2, a3) { // fn#5618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:116, offset: 0x00ce1320, size: 185 bytes, params: 5, frame: 19 const env0_0 = a1; const env0_1 = a3; const items = []; const closure = traverse; (importDefault(44) /* metro dependency 44 */)(a2[0] && a2[0].nativeEvent, 'Native driven events only support animated values contained inside `nativeEvent`.'); closure(a2[0].nativeEvent, []); let value = require(117) /* metro dependency 117 */; value = value.findNodeHandle(a0); if (value != null) { items.forEach(_fun5620); } return {detach: detach}; } function _fun5623() { // fn#5623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:818, offset: 0x00ce157c, size: 147 bytes, params: 1, frame: 15 return env0_4(AnimatedEvent, [{key: '__addListener', value: function(a0) { this._listeners.push(a0); }}, {key: '__removeListener', value: function(a0) { var env0_0 = a0; this._listeners = this._listeners.filter(_fun5629); }}, {key: '__attach', value: function(a0, a1) { importDefault(dependencyMap[4])(this.__isNative, 'Only native driven events need to be attached.'); this._attachedEvent = attachNativeEventImpl(a0, a1, this._argMapping, this.__platformConfig); }}, {key: '__detach', value: value_5631}, {key: '__getHandler', value: function() { var env0_0 = this; if (this.__isNative) { return this._callListeners; } return _fun5633; }}]); } function traverse(a0, a1) { // fn#5619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:167, owner: attachNativeEventImpl.traverse, offset: 0x00ce13d9, size: 255 bytes, params: 3, frame: 22 var propertyName; var traverseBinding; var property; var concat; var x; var y; var binding; var push; var object2; if (a0 instanceof (importDefault(347) /* metro dependency 347 */)) { a0.__makeNative(importAll); binding = env0_2; push = binding.push; object2 = {nativeEventPath: a1}; object2.animatedValueTag = a0.__getNativeTag(); Reflect.apply(push, binding, [object2]); } else if (a0 instanceof (importDefault(367) /* metro dependency 367 */)) { traverseBinding = traverse; x = a0.x; concat = a1.concat; traverseBinding(x, Reflect.apply(concat, a1, ['x'])); y = a0.y; concat = a1.concat; traverseBinding(y, Reflect.apply(concat, a1, ['y'])); } else if (typeof a0 === 'object') { for (propertyName in a0) { traverseBinding = traverse; property = a0[propertyName]; concat = a1.concat; traverseBinding(property, Reflect.apply(concat, a1, [propertyName])); } } } function _fun5620(a0) { // fn#5620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:628, offset: 0x00ce14d8, size: 60 bytes, params: 2, frame: 16 const API = (importDefault(348) /* metro dependency 348 */).API; API.addAnimatedEventToView(env0_4, require, a0); } function detach() { // fn#5621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:693, owner: attachNativeEventImpl.detach, offset: 0x00ce1514, size: 38 bytes, params: 1, frame: 11 if (env0_4 != null) { env0_2.forEach(_fun5622); } } function AnimatedEvent(a0, a1) { // fn#5624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:839, offset: 0x00ce160f, size: 189 bytes, params: 3, frame: 17 var r1; let value = a1; env1_3(this, AnimatedEvent); this._listeners = []; this._callListeners = _callListeners; this._argMapping = a0; if (value != null) { r1 = value; } else { global.console.warn('Animated.event now requires a second argument for options'); r1 = {useNativeDriver: false}; } if (r1.listener) { this.__addListener(r1.listener); } this._attachedEvent = null; value = importDefault(348) /* metro dependency 348 */; this.__isNative = value.shouldUseNativeDriver(r1); this.__platformConfig = r1.platformConfig; } function value_5628(a0) { // fn#5628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:1480, offset: 0x00ce1747, size: 43 bytes, params: 2, frame: 12 const env0_0 = a0; const _listeners = this._listeners; this._listeners = _listeners.filter(_fun5629); } function value_5631(a0, a1) { // fn#5631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:1808, offset: 0x00ce17d4, size: 73 bytes, params: 3, frame: 14 const value = environment.__proto__; (importDefault(44) /* metro dependency 44 */)(this.__isNative, 'Only native driven events need to be detached.'); if (this._attachedEvent) { this._attachedEvent.detach(); } } function value_5632() { // fn#5632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:1983, offset: 0x00ce181d, size: 33 bytes, params: 1, frame: 3 if (this.__isNative) { return this._callListeners; } return _fun5633; } function _fun5622({animatedValueTag}) { // fn#5622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:731, offset: 0x00ce153a, size: 66 bytes, params: 2, frame: 16 const API = (importDefault(348) /* metro dependency 348 */).API; API.removeAnimatedEventFromView(env1_4, require, animatedValueTag); } function _callListeners() { // fn#5625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:939, owner: AnimatedEvent._callListeners, offset: 0x00ce16cc, size: 98 bytes, params: 1, frame: 15 var r2; var value5; const length = arguments.length; const Array = global.Array; const array = new Array(length); const env0_0 = array; const value4 = 0; if (value4 < length) { for (r2 = value4; true; r2 = value5) { array[r2] = arguments[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (!(value5 < length)) { break; } } } env0_0._listeners.forEach(_fun5626); } function _fun5633() { // fn#5633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:2071, offset: 0x00ce183e, size: 124 bytes, params: 1, frame: 16 var r2; var value5; const length = arguments.length; const Array = global.Array; const array = new Array(length); const env0_0 = array; const value4 = 0; if (value4 < length) { for (r2 = value4; true; r2 = value5) { array[r2] = arguments[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (!(value5 < length)) { break; } } } const binding = env0_0; binding._argMapping.forEach(_fun5635); binding._callListeners.apply(binding, array); } function traverse_5634(a0, a1) { // fn#5634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:2160, offset: 0x00ce18ba, size: 208 bytes, params: 3, frame: 21 var propertyName; var traverse_5634Binding; var property; if (a0 instanceof (importDefault(347) /* metro dependency 347 */)) { if (typeof a1 === 'number') { a0.setValue(a1); } } else if (a0 instanceof (importDefault(367) /* metro dependency 367 */)) { if (typeof a1 === 'object') { traverse_5634(a0.x, a1.x); traverse_5634(a0.y, a1.y); } } else if (typeof a0 === 'object') { for (propertyName in a0) { traverse_5634Binding = traverse_5634; property = a0[propertyName]; traverse_5634Binding(property, a1[propertyName]); } } } function _fun5635(a0, a1) { // fn#5635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:418:2393, offset: 0x00ce198a, size: 31 bytes, params: 3, frame: 13 traverse_5634(a0, env0_0[a1]); }