/* Metro module 11322; source: modules/push_feedback/PushFeedbackStore.tsx; dependencies: [6, 7, 15, 17, 18, 5079, 566, 694, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as PushNotificationConstantsModule from '../push_notifications/PushNotificationConstants.tsx'; /* Metro dependency 5079 */ function _fun86436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:6, offset: 0x01f94b4b, size: 339 bytes, params: 8, frame: 19 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_7 = {}; const PersistedStore = (Flux).PersistedStore; let value = _fun86440(PersistedStore); value.displayName = 'PushFeedbackStore'; value.persistKey = 'PushFeedbackPersistedStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {PUSH_FEEDBACK_RECEIVED_NOTIFICATION: PUSH_FEEDBACK_RECEIVED_NOTIFICATION, PUSH_FEEDBACK_CLEANUP: function() { env0_6 = null; }, CHANNEL_SELECT: CHANNEL_SELECT_86449}); (FileImportTrackerModule).fileFinishedImporting('modules/push_feedback/PushFeedbackStore.tsx'); exports.default = value; function _isNativeReflectConstruct_86437() { // fn#86437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:176, offset: 0x01f94c9e, size: 98 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_86437_isNativeReflectConstruct = function() { return !!result; })(); } function _fun86440(a0) { // fn#86440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:391, offset: 0x01f94d00, size: 176 bytes, params: 2, frame: 16 const PushFeedbackStore2 = PushFeedbackStore; Inherits(PushFeedbackStore2, a0); return CreateClass(PushFeedbackStore2, [{key: 'initialize', value: value_86442}, {key: 'getState', value: value_86443}, {key: 'isEligible', value: value_86444}, {key: 'isUserPushMessage', value: value_86445}, {key: 'getPushFeedback', value: value_86446}]); function PushFeedbackStore() { // fn#86441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:403, offset: 0x00e4046a, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_0(this, PushFeedbackStore); const value3 = env1_3(PushFeedbackStore); return env1_2(this, _isNativeReflectConstruct_86437() ? global.Reflect.construct(value3, arguments, env1_3(this).constructor) : value3.apply(this, arguments)); } function value_86442(a0) { // fn#86442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:706, offset: 0x01f94db0, size: 46 bytes, params: 2, frame: 4 var pushFeedback; var value; var pushFeedbackMap; if (a0 != null) { pushFeedback = a0.pushFeedback; value = environment.__proto__; pushFeedbackMap = a0.pushFeedbackMap; if (pushFeedbackMap != null) { pushFeedbackMap = a0.pushFeedbackMap; } } } function value_86443() { // fn#86443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:817, offset: 0x01f94dde, size: 25 bytes, params: 1, frame: 3 return {pushFeedback: env1_6, pushFeedbackMap: env1_7}; } function value_86444() { // fn#86444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:895, offset: 0x00fbd9ad, size: 15 bytes, params: 1, frame: 2 return env1_6 != null; } function value_86445(a0) { // fn#86445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:954, offset: 0x01f94df7, size: 32 bytes, params: 2, frame: 3 const value = environment.__proto__; return env1_6?.messageId === a0; } function value_86446(a0, a1) { // fn#86446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:1046, offset: 0x01f94e17, size: 56 bytes, params: 3, frame: 5 const binding = env1_6; const value2 = null; return (value2 == binding ? undefined : binding.messageId) !== a1 || env1_6.channelId !== a0 ? value2 : env1_6; } } function PUSH_FEEDBACK_RECEIVED_NOTIFICATION({notificationType, messageId, channelId}) { // fn#86447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:1295, offset: 0x01f94e4f, size: 240 bytes, params: 2, frame: 17 var r3; var property; var value4; var userViewInfo; var eligibleAt; var viewCount; var value5; const TOP_MESSAGE_PUSH = NotificationTypes.TOP_MESSAGE_PUSH; if (TOP_MESSAGE_PUSH === notificationType || !(NotificationTypes.TRENDING_CONTENT_PUSH !== notificationType) && true) { property = env0_7[notificationType]; value4 = null; r3 = value4 != property ? property : {messageId: messageId, channelId: channelId, pushType: notificationType}; userViewInfo = r3.userViewInfo; r3 = value4 != userViewInfo ? userViewInfo : {'eligibleAt': 0, 'viewCount': 0}; eligibleAt = r3.eligibleAt; viewCount = r3.viewCount; value5 = global.Date.now(); r3 = eligibleAt < value5 ? {eligibleAt: value5 + 604800000, viewCount: 1} : viewCount < 10 ? {eligibleAt: eligibleAt, viewCount: typeof viewCount === 'bigint' ? viewCount + 1n : +viewCount + 1} : value4; if (value4 != r3) { env0_7[notificationType] = {messageId: messageId, channelId: channelId, pushType: notificationType, userViewInfo: r3}; } } } function CHANNEL_SELECT_86449({channelId}) { // fn#86449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11508:1934, offset: 0x01f94f4c, size: 50 bytes, params: 2, frame: 4 if (channelId == null) { return false; } if (env0_6 == null) { return false; } if (channelId === env0_6.channelId) { } } } global.__d(_fun86436, 11322, [6, 7, 15, 17, 18, 5079, 566, 694, 2]) /* metro module 11322, dependencies: [6, 7, 15, 17, 18, 5079, 566, 694, 2] */;