This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+149 -104
View File
@@ -1,118 +1,101 @@
/* Metro module 4860; source: lib/AutomaticLifecycleManager.tsx; dependencies: [6, 7, 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 Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun42445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:6, offset: 0x011399e0, size: 132 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun42446();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/AutomaticLifecycleManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/AutomaticLifecycleManager.tsx');
exports.default = value;
}
function _fun42446() { // fn#42446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:118, offset: 0x01139a64, size: 124 bytes, params: 1, frame: 15
return env0_3(AutomaticLifecycleManager, [{key: 'initialize', value: function() {
var property = this.initializedCount;
this.initializedCount = typeof property === 'bigint' ? property + 1n : +property + 1;
if (!(this.initializedCount > 1)) {
this._initialize();
property = global.Object;
property.entries(this.actions).forEach(_fun42449);
property = this.stores;
property.forEach(_fun42450);
}
}}, {key: 'terminate', value: value_42451}, {key: '_initialize', value: function() {
}}, {key: '_terminate', value: function() {
}}]);
}
function AutomaticLifecycleManager() { // fn#42447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:139, offset: 0x01139ae0, size: 77 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_2(this, AutomaticLifecycleManager);
this.initializedCount = 0;
this.actions = {};
const Map = global.Map;
this.stores = new Map();
}
function value_42448() { // fn#42448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:297, offset: 0x01139b2d, size: 108 bytes, params: 1, frame: 13
var Object;
const initializedCount = this.initializedCount;
this.initializedCount = typeof initializedCount === 'bigint' ? initializedCount + 1n : +initializedCount + 1;
if (!(this.initializedCount > 1)) {
this._initialize();
Object = global.Object;
Object.entries(this.actions).forEach(function(a0) {
var r1;
var r2;
var r5;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r5 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r5 = value;
} else {
r1 = item3;
r2 = value3;
r5 = item;
}
function _fun42446() { // fn#42446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:118, offset: 0x01139a64, size: 124 bytes, params: 1, frame: 15
return CreateClass(AutomaticLifecycleManager, [{key: 'initialize', value: function() {
var property = this.initializedCount;
this.initializedCount = typeof property === 'bigint' ? property + 1n : +property + 1;
if (!(this.initializedCount > 1)) {
this._initialize();
property = global.Object;
property.entries(this.actions).forEach(_fun42449);
property = this.stores;
property.forEach(_fun42450);
}
if (!r2) {
r1.return();
}
var defaultImport = importDefault(dependencyMap[2]);
defaultImport.subscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
return value;
});
this.stores.forEach(_fun42450);
}
}
function value_42451(a0) { // fn#42451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:568, offset: 0x01139c2a, size: 131 bytes, params: 2, frame: 13
var Object;
let initializedCount = this.initializedCount;
if (!(initializedCount <= 0)) {
if (a0) {
}}, {key: 'terminate', value: value_42451}, {key: '_initialize', value: function() {
}}, {key: '_terminate', value: function() {
}}]);
function AutomaticLifecycleManager() { // fn#42447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:139, offset: 0x01139ae0, size: 77 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_2(this, AutomaticLifecycleManager);
this.initializedCount = 0;
} else {
initializedCount = this.initializedCount;
this.initializedCount = typeof initializedCount === 'bigint' ? initializedCount - 1n : +initializedCount - 1;
this.actions = {};
const Map = global.Map;
this.stores = new Map();
}
initializedCount = this.initializedCount;
if (initializedCount === 0) {
this._terminate();
Object = global.Object;
Object.entries(this.actions).forEach(function(a0) {
function value_42448() { // fn#42448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:297, offset: 0x01139b2d, size: 108 bytes, params: 1, frame: 13
var Object;
const initializedCount = this.initializedCount;
this.initializedCount = typeof initializedCount === 'bigint' ? initializedCount + 1n : +initializedCount + 1;
if (!(this.initializedCount > 1)) {
this._initialize();
Object = global.Object;
Object.entries(this.actions).forEach(function(a0) {
var r1;
var r2;
var r5;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r5 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r5 = value;
} else {
r1 = item3;
r2 = value3;
r5 = item;
}
}
if (!r2) {
r1.return();
}
var defaultImport = importDefault(dependencyMap[2]);
defaultImport.subscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
return value;
});
this.stores.forEach(_fun42450);
}
function _fun42449(a0) { // fn#42449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:415, offset: 0x01139b99, size: 120 bytes, params: 2, frame: 17
var r1;
var r2;
var r5;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
@@ -135,13 +118,74 @@ function value_42451(a0) { // fn#42451, source: /ci/build/discord/discord/discor
if (!r2) {
r1.return();
}
var defaultImport = importDefault(dependencyMap[2]);
defaultImport.unsubscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
const defaultImport = Dispatcher;
defaultImport.subscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
return value;
});
this.stores.forEach(_fun42453);
}
}
function value_42451(a0) { // fn#42451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:568, offset: 0x01139c2a, size: 131 bytes, params: 2, frame: 13
var Object;
let initializedCount = this.initializedCount;
if (!(initializedCount <= 0)) {
if (a0) {
this.initializedCount = 0;
} else {
initializedCount = this.initializedCount;
this.initializedCount = typeof initializedCount === 'bigint' ? initializedCount - 1n : +initializedCount - 1;
}
initializedCount = this.initializedCount;
if (initializedCount === 0) {
this._terminate();
Object = global.Object;
Object.entries(this.actions).forEach(function(a0) {
var r1;
var r2;
var r5;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r5 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r5 = value;
} else {
r1 = item3;
r2 = value3;
r5 = item;
}
}
if (!r2) {
r1.return();
}
var defaultImport = importDefault(dependencyMap[2]);
defaultImport.unsubscribe(r4, typeof r5 === 'function' ? r5 : r5.callback);
return value;
});
this.stores.forEach(_fun42453);
}
}
}
}
}
function _fun42450(a0, a1) { // fn#42450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5038:504, offset: 0x01139c11, size: 25 bytes, params: 3, frame: 11
@@ -153,3 +197,4 @@ function _fun42453(a0, a1) { // fn#42453, source: /ci/build/discord/discord/disc
a1.removeChangeListener(a0);
}
global.__d(_fun42445, 4860, [6, 7, 694, 2]) /* metro module 4860, dependencies: [6, 7, 694, 2] */;
+78 -75
View File
@@ -1,88 +1,91 @@
/* Metro module 4268; source: lib/CachedEntriesMap.tsx; dependencies: [6, 7, 1944, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun36126(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:6, offset: 0x01083718, size: 132 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun36127();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/CachedEntriesMap.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/CachedEntriesMap.tsx');
exports.default = value;
}
function _fun36127() { // fn#36127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:118, offset: 0x0108379c, size: 216 bytes, params: 1, frame: 15
return CreateClass(CachedEntriesMap, [{key: 'keys', value: function() {
return this.cachedKeys(this.version);
}}, {key: 'values', value: function() {
return this.cachedValues(this.version);
}}, {key: 'entries', value: function() {
return this.cachedEntries(this.version);
}}, {key: 'size', value: function() {
return this.data.size;
}}, {key: 'get', value: function(a0) {
return this.data.get(a0);
}}, {key: 'set', value: function(a0, a1) {
var property = this.data;
if (property.get(a0) !== a1) {
property = this.data;
property.set(a0, a1);
property = this.version;
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
}
}}, {key: 'delete', value: function(a0) {
var property = this.data;
var value = property.delete(a0);
if (value) {
property = this.version;
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
}
return value;
}}, {key: 'clear', value: function() {
var property;
if (this.data.size !== 0) {
property = this.data;
property.clear();
property = this.version;
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
}
}}]);
function CachedEntriesMap() { // fn#36128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:139, offset: 0x01083874, size: 179 bytes, params: 1, frame: 18
var environment;
let value = environment.__proto__;
env1_2(this, CachedEntriesMap);
this.version = 0;
const Map = global.Map;
const value3 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
this.data = map instanceof Object ? map : value3;
value = require(1944) /* metro dependency 1944: FunctionUtils */;
this.cachedValues = value.cachedFunction(_fun36129);
value = require(1944) /* metro dependency 1944: FunctionUtils */;
this.cachedKeys = value.cachedFunction(_fun36130);
value = require(1944) /* metro dependency 1944: FunctionUtils */;
this.cachedEntries = value.cachedFunction(_fun36131);
function _fun36129() { // fn#36129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:267, offset: 0x01083927, size: 41 bytes, params: 1, frame: 12
const Array = global.Array;
const from = Array.from;
const data = env0_0.data;
return Reflect.apply(from, Array, [data.values()]);
}
function _fun36130() { // fn#36130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:344, offset: 0x01083950, size: 41 bytes, params: 1, frame: 12
const Array = global.Array;
const from = Array.from;
const data = env0_0.data;
return Reflect.apply(from, Array, [data.keys()]);
}
function _fun36131() { // fn#36131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:422, offset: 0x01083979, size: 42 bytes, params: 1, frame: 12
const Array = global.Array;
const from = Array.from;
const data = env0_0.data;
return Reflect.apply(from, Array, [data.entries()]);
}
function _fun36127() { // fn#36127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:118, offset: 0x0108379c, size: 216 bytes, params: 1, frame: 15
return env0_3(CachedEntriesMap, [{key: 'keys', value: function() {
return this.cachedKeys(this.version);
}}, {key: 'values', value: function() {
return this.cachedValues(this.version);
}}, {key: 'entries', value: function() {
return this.cachedEntries(this.version);
}}, {key: 'size', value: function() {
return this.data.size;
}}, {key: 'get', value: function(a0) {
return this.data.get(a0);
}}, {key: 'set', value: function(a0, a1) {
var property = this.data;
if (property.get(a0) !== a1) {
property = this.data;
property.set(a0, a1);
property = this.version;
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
}
}}, {key: 'delete', value: function(a0) {
var property = this.data;
var value = property.delete(a0);
if (value) {
property = this.version;
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
}
return value;
}}, {key: 'clear', value: function() {
var property;
if (this.data.size !== 0) {
property = this.data;
property.clear();
property = this.version;
this.version = typeof property === 'bigint' ? property + 1n : +property + 1;
}
}}]);
}
function CachedEntriesMap() { // fn#36128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:139, offset: 0x01083874, size: 179 bytes, params: 1, frame: 18
var environment;
let value = environment.__proto__;
env1_2(this, CachedEntriesMap);
this.version = 0;
const Map = global.Map;
const value3 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
this.data = map instanceof Object ? map : value3;
value = require(1944) /* metro dependency 1944: FunctionUtils */;
this.cachedValues = value.cachedFunction(_fun36129);
value = require(1944) /* metro dependency 1944: FunctionUtils */;
this.cachedKeys = value.cachedFunction(_fun36130);
value = require(1944) /* metro dependency 1944: FunctionUtils */;
this.cachedEntries = value.cachedFunction(_fun36131);
}
}
function _fun36129() { // fn#36129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:267, offset: 0x01083927, size: 41 bytes, params: 1, frame: 12
const Array = global.Array;
const from = Array.from;
const data = env0_0.data;
return Reflect.apply(from, Array, [data.values()]);
}
function _fun36130() { // fn#36130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:344, offset: 0x01083950, size: 41 bytes, params: 1, frame: 12
const Array = global.Array;
const from = Array.from;
const data = env0_0.data;
return Reflect.apply(from, Array, [data.keys()]);
}
function _fun36131() { // fn#36131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4440:422, offset: 0x01083979, size: 42 bytes, params: 1, frame: 12
const Array = global.Array;
const from = Array.from;
const data = env0_0.data;
return Reflect.apply(from, Array, [data.entries()]);
}
global.__d(_fun36126, 4268, [6, 7, 1944, 2]) /* metro module 4268, dependencies: [6, 7, 1944, 2] */;
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,9 +1,12 @@
/* Metro module 3767; source: lib/DiscordNative.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun28554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3894:6, offset: 0x00f7d535, size: 90 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const DiscordNative = global.window.DiscordNative;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/DiscordNative.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/DiscordNative.tsx');
exports.default = DiscordNative;
}
global.__d(_fun28554, 3767, [2]) /* metro module 3767, dependencies: [2] */;
@@ -1,11 +1,15 @@
/* Metro module 4817; source: lib/EnsureReceivedMessagesAddedInOrderExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../modules/experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun42030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4995:6, offset: 0x0112e59b, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-ensure-received-messages-added-in-order', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/EnsureReceivedMessagesAddedInOrderExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/EnsureReceivedMessagesAddedInOrderExperiment.tsx');
exports.default = value;
}
global.__d(_fun42030, 4817, [1854, 2]) /* metro module 4817, dependencies: [1854, 2] */;
+233 -221
View File
@@ -1,9 +1,13 @@
/* Metro module 4393; source: lib/Frecency.tsx; dependencies: [6, 7, 22, 3738, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import Module03738 from '../by-id/module-03738.js'; /* Metro dependency 3738 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun37159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:6, offset: 0x0109d4e2, size: 150 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const DEFAULT_FRECENCY = function(a0, a1, a2) {
var Math = global.Math;
return Math.ceil(a0 * (a1 / a2.numOfRecentUses));
@@ -12,91 +16,234 @@ function _fun37159(global, require, importDefault, importAll, module, exports, d
return a0 <= 3 ? 100 : a0 <= 15 ? 70 : a0 <= 30 ? 50 : a0 <= 45 ? 30 : a0 <= 80 ? 10 : 1;
};
const value = _fun37162();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Frecency.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/Frecency.tsx');
exports.default = value;
}
function _fun37162() { // fn#37162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:277, offset: 0x0109d5ed, size: 250 bytes, params: 1, frame: 15
return env0_3(Frecency, [{key: 'overwriteHistory', value: function(a0, a1) {
var value = a0;
var env0_0 = this;
var defaultImport = importDefault(dependencyMap[2]);
this.usageHistory = defaultImport.mapValues(value ?? ({}), _fun37165);
if (a1 != null) {
a1.forEach(_fun37166);
}
this.markDirty();
}}, {key: 'markDirty', value: function() {
this.dirty = true;
var version = this.version;
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
}}, {key: 'isDirty', value: function() {
return this.dirty;
}}, {key: 'track', value: value_37169}, {key: 'getEntry', value: function(a0) {
var r0;
var value = null;
if (value == a0) {
r0 = value;
} else {
function _fun37162() { // fn#37162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:277, offset: 0x0109d5ed, size: 250 bytes, params: 1, frame: 15
return CreateClass(Frecency, [{key: 'overwriteHistory', value: function(a0, a1) {
var value = a0;
var env0_0 = this;
var defaultImport = importDefault(dependencyMap[2]);
this.usageHistory = defaultImport.mapValues(value ?? ({}), _fun37165);
if (a1 != null) {
a1.forEach(_fun37166);
}
this.markDirty();
}}, {key: 'markDirty', value: function() {
this.dirty = true;
var version = this.version;
this.version = typeof version === 'bigint' ? version + 1n : +version + 1;
}}, {key: 'isDirty', value: function() {
return this.dirty;
}}, {key: 'track', value: value_37169}, {key: 'getEntry', value: function(a0) {
var r0;
var value = null;
if (value == a0) {
r0 = value;
} else {
if (this.dirty) {
this.compute();
}
r0 = global.Object.prototype.hasOwnProperty.call(this.usageHistory, a0) ? this.usageHistory[a0] : undefined;
}
return r0;
}}, {key: 'getScore', value: function(a0) {
var value = this.getEntry(a0);
var value2 = null;
return value2 != value ? value.score : value2;
}}, {key: 'getFrecency', value: function(a0) {
var value = this.getEntry(a0);
var value2 = null;
return value2 != value ? value.frecency : value2;
}}, {key: 'compute', value: value_37173}, {key: 'frequently', get: function() {
if (this.dirty) {
this.compute();
}
r0 = global.Object.prototype.hasOwnProperty.call(this.usageHistory, a0) ? this.usageHistory[a0] : undefined;
return this._frequently;
}, set: function(a0) {
this._frequently = a0;
}}]);
function Frecency({computeBonus, computeWeight = DEFAULT_WEIGHT, computeFrecency, calculateMaxTotalUse, lookupKey, afterCompute, numFrequentlyItems, maxSamples}) { // fn#37163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:298, offset: 0x0109d6e7, size: 202 bytes, params: 2, frame: 21
const r7 = computeFrecency !== undefined ? computeFrecency : DEFAULT_FRECENCY;
calculateMaxTotalUse = !(calculateMaxTotalUse === undefined) && calculateMaxTotalUse;
numFrequentlyItems = numFrequentlyItems === undefined ? 32 : numFrequentlyItems;
maxSamples = maxSamples === undefined ? 10 : maxSamples;
const value = environment.__proto__;
env1_2(this, Frecency);
this.computeBonus = computeBonus;
this.computeWeight = computeWeight;
this.computeFrecency = r7;
this.calculateMaxTotalUse = calculateMaxTotalUse;
this.afterCompute = afterCompute;
this.lookupKey = lookupKey;
this.usageHistory = {};
this.frequently = [];
this.maxSamples = maxSamples;
this.numFrequentlyItems = numFrequentlyItems;
this.dirty = false;
this.version = 0;
}
return r0;
}}, {key: 'getScore', value: function(a0) {
var value = this.getEntry(a0);
var value2 = null;
return value2 != value ? value.score : value2;
}}, {key: 'getFrecency', value: function(a0) {
var value = this.getEntry(a0);
var value2 = null;
return value2 != value ? value.frecency : value2;
}}, {key: 'compute', value: value_37173}, {key: 'frequently', get: function() {
if (this.dirty) {
this.compute();
function value_37164(a0, a1) { // fn#37164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:785, offset: 0x0109d7b1, size: 102 bytes, params: 3, frame: 18
const value = a0;
const defaultImport = Module00022;
this.usageHistory = defaultImport.mapValues(value ?? ({}), function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['frecency'] = -1;
return object;
});
if (a1 != null) {
a1.forEach(_fun37166);
}
this.markDirty();
function _fun37166({key, timestamp}) { // fn#37166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:896, offset: 0x0109d834, size: 41 bytes, params: 2, frame: 14
const binding = env0_0;
return binding.track(key, {timestamp: timestamp});
}
}
return this._frequently;
}, set: function(a0) {
this._frequently = a0;
}}]);
}
function Frecency({computeBonus, computeWeight = DEFAULT_WEIGHT, computeFrecency, calculateMaxTotalUse, lookupKey, afterCompute, numFrequentlyItems, maxSamples}) { // fn#37163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:298, offset: 0x0109d6e7, size: 202 bytes, params: 2, frame: 21
const r7 = computeFrecency !== undefined ? computeFrecency : DEFAULT_FRECENCY;
calculateMaxTotalUse = !(calculateMaxTotalUse === undefined) && calculateMaxTotalUse;
numFrequentlyItems = numFrequentlyItems === undefined ? 32 : numFrequentlyItems;
maxSamples = maxSamples === undefined ? 10 : maxSamples;
const value = environment.__proto__;
env1_2(this, Frecency);
this.computeBonus = computeBonus;
this.computeWeight = computeWeight;
this.computeFrecency = r7;
this.calculateMaxTotalUse = calculateMaxTotalUse;
this.afterCompute = afterCompute;
this.lookupKey = lookupKey;
this.usageHistory = {};
this.frequently = [];
this.maxSamples = maxSamples;
this.numFrequentlyItems = numFrequentlyItems;
this.dirty = false;
this.version = 0;
}
function value_37173() { // fn#37173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:1928, offset: 0x0109da89, size: 307 bytes, params: 1, frame: 19
var environment;
var defaultImport;
var maxBy;
var Object;
var value4;
let value = environment.__proto__;
const env0_1 = (Module03738)();
if (this.calculateMaxTotalUse) {
defaultImport = importDefault(22) /* metro dependency 22 */;
maxBy = defaultImport.maxBy;
Object = global.Object;
value4 = Reflect.apply(maxBy, defaultImport, [Object.values(this.usageHistory), function(a0) {
return a0.totalUses;
}]);
}
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this.usageHistory, _fun37175);
value = importDefault(22) /* metro dependency 22 */;
value = value(this.usageHistory);
value = value.map(_fun37177);
value = value.filter(function(a0) {
return a0 !== null;
});
value = value.sortBy(function(a0) {
var r0;
var r1;
var r2;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
if (value2) {
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r1.return();
}
return -r0;
});
value = value.map(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r0;
});
value = value.take(this.numFrequentlyItems);
this.frequently = value.value();
this.dirty = false;
this.afterCompute(this.usageHistory, this._frequently);
function _fun37175(a0, a1) { // fn#37175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2091, offset: 0x0109dbc7, size: 251 bytes, params: 3, frame: 21
var environment;
var binding;
var value2;
var value3;
const env0_0 = a0;
const totalUses2 = a0.totalUses;
const recentUses = a0.recentUses;
if (a0.frecency === -1) {
binding = env0_0;
var env0_1 = binding.computeBonus(a1) / 100;
a0.score = 0;
value2 = environment.__proto__.__proto__;
value3 = undefined;
(importDefault(22) /* metro dependency 22 */).forEach(recentUses, _fun37176);
if (a0.score > 0) {
if (a0.recentUses.length > 0) {
binding = env0_0;
a0.frecency = binding.computeFrecency(totalUses2, a0.score, {numOfRecentUses: recentUses.length,
maxTotalUse: ClassCallCheck == null ? value3 : ClassCallCheck.totalUses});
}
env0_0.usageHistory[a1] = a0;
} else {
delete env0_0.usageHistory[a1];
}
}
function _fun37176(a0, a1) { // fn#37176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2213, offset: 0x0109dcc2, size: 125 bytes, params: 3, frame: 16
let value = environment.__proto__;
if (a1 >= env1_0.maxSamples) {
return false;
}
let binding = env1_0;
const computeWeight = binding.computeWeight;
const binding2 = env1_1;
const diff = binding2.diff;
value = environment.__proto__.__proto__.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(a0);
value = Reflect.apply(computeWeight, binding, [Reflect.apply(diff, binding2, [value, 'days'])]);
binding = env0_0;
binding.score = binding.score + env0_1 * value;
}
}
function _fun37177(a0, a1) { // fn#37177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2571, offset: 0x0109dd3f, size: 56 bytes, params: 3, frame: 11
const value = env0_0.lookupKey(a1);
const value2 = null;
return value2 == value ? value2 : [value, a0.frecency];
}
}
function value_37164(a0, a1) { // fn#37164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:785, offset: 0x0109d7b1, size: 102 bytes, params: 3, frame: 18
const value = a0;
const defaultImport = importDefault(22) /* metro dependency 22 */;
this.usageHistory = defaultImport.mapValues(value ?? ({}), function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['frecency'] = -1;
return object;
});
if (a1 != null) {
a1.forEach(_fun37166);
}
this.markDirty();
}
function _fun37165(a0) { // fn#37165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:850, offset: 0x0109d817, size: 29 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['frecency'] = -1;
return object;
}
function value_37169(a0) { // fn#37169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:1104, offset: 0x0109d886, size: 357 bytes, params: 2, frame: 21
@@ -105,7 +252,7 @@ function value_37169(a0) { // fn#37169, source: /ci/build/discord/discord/discor
var r8;
var r6;
var r3;
var object2;
var object;
var Object;
var hasOwn;
var usageHistory;
@@ -150,10 +297,10 @@ function value_37169(a0) { // fn#37169, source: /ci/build/discord/discord/discor
break reducibleJoin5;
}
if (r10 == null) {
object2 = {};
object = {};
value = 1;
r8 = usesSinceLastTrack ?? value;
object2.totalUses = r8;
object.totalUses = r8;
reducibleJoin15: while (true) {
if (timestamp != null) {
r6 = timestamp;
@@ -165,10 +312,10 @@ function value_37169(a0) { // fn#37169, source: /ci/build/discord/discord/discor
r6 = value;
break reducibleJoin15;
}
object2.recentUses = [r6];
object2.frecency = -1;
object2.score = 0;
r3 = object2;
object.recentUses = [r6];
object.frecency = -1;
object.score = 0;
r3 = object;
} else {
r10.frecency = -1;
totalUses = r10.totalUses;
@@ -219,139 +366,4 @@ function value_37169(a0) { // fn#37169, source: /ci/build/discord/discord/discor
return value2;
}
function value_37173() { // fn#37173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:1928, offset: 0x0109da89, size: 307 bytes, params: 1, frame: 19
var environment;
var defaultImport;
var maxBy;
var Object;
var value4;
let value = environment.__proto__;
const env0_1 = (importDefault(3738) /* metro dependency 3738 */)();
if (this.calculateMaxTotalUse) {
defaultImport = importDefault(22) /* metro dependency 22 */;
maxBy = defaultImport.maxBy;
Object = global.Object;
value4 = Reflect.apply(maxBy, defaultImport, [Object.values(this.usageHistory), function(a0) {
return a0.totalUses;
}]);
}
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this.usageHistory, _fun37175);
value = importDefault(22) /* metro dependency 22 */;
value = value(this.usageHistory);
value = value.map(_fun37177);
value = value.filter(function(a0) {
return a0 !== null;
});
value = value.sortBy(function(a0) {
var r0;
var r1;
var r2;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
if (value2) {
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r1.return();
}
return -r0;
});
value = value.map(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r0;
});
value = value.take(this.numFrequentlyItems);
this.frequently = value.value();
this.dirty = false;
this.afterCompute(this.usageHistory, this._frequently);
}
function _fun37166({key, timestamp}) { // fn#37166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:896, offset: 0x0109d834, size: 41 bytes, params: 2, frame: 14
const binding = env0_0;
return binding.track(key, {timestamp: timestamp});
}
function _fun37175(a0, a1) { // fn#37175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2091, offset: 0x0109dbc7, size: 251 bytes, params: 3, frame: 21
var environment;
var binding;
var value2;
var value3;
const env0_0 = a0;
const totalUses2 = a0.totalUses;
const recentUses = a0.recentUses;
if (a0.frecency === -1) {
binding = env0_0;
var env0_1 = binding.computeBonus(a1) / 100;
a0.score = 0;
value2 = environment.__proto__.__proto__;
value3 = undefined;
(importDefault(22) /* metro dependency 22 */).forEach(recentUses, _fun37176);
if (a0.score > 0) {
if (a0.recentUses.length > 0) {
binding = env0_0;
a0.frecency = binding.computeFrecency(totalUses2, a0.score, {numOfRecentUses: recentUses.length,
maxTotalUse: env0_2 == null ? value3 : env0_2.totalUses});
}
env0_0.usageHistory[a1] = a0;
} else {
delete env0_0.usageHistory[a1];
}
}
}
function _fun37177(a0, a1) { // fn#37177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2571, offset: 0x0109dd3f, size: 56 bytes, params: 3, frame: 11
const value = env0_0.lookupKey(a1);
const value2 = null;
return value2 == value ? value2 : [value, a0.frecency];
}
function _fun37176(a0, a1) { // fn#37176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4565:2213, offset: 0x0109dcc2, size: 125 bytes, params: 3, frame: 16
let value = environment.__proto__;
if (a1 >= env1_0.maxSamples) {
return false;
}
let binding = env1_0;
const computeWeight = binding.computeWeight;
const binding2 = env1_1;
const diff = binding2.diff;
value = environment.__proto__.__proto__.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(a0);
value = Reflect.apply(computeWeight, binding, [Reflect.apply(diff, binding2, [value, 'days'])]);
binding = env0_0;
binding.score = binding.score + env0_1 * value;
}
global.__d(_fun37159, 4393, [6, 7, 22, 3738, 2]) /* metro module 4393, dependencies: [6, 7, 22, 3738, 2] */;
+153 -144
View File
@@ -1,4 +1,9 @@
/* Metro module 7131; source: lib/Histogram.tsx; dependencies: [6, 7, 7132, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module07132Module from '../by-id/module-07132.js'; /* Metro dependency 7132 */
function _fun57033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:6, offset: 0x013da7e7, size: 150 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_57036 = function(a0, a1) {
@@ -46,163 +51,167 @@ function _fun57033(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
let value = _fun57037();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Histogram.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/Histogram.tsx');
exports.Histogram = value;
}
function _createForOfIteratorHelperLoose_57034(a0, a1) { // fn#57034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:120, offset: 0x013da87d, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_57034(a0, a1) { // fn#57034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:120, offset: 0x013da87d, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun57035;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_57036(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun57035;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_57036(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_57036(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_57036(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun57035;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun57035() { // fn#57035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:691, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _fun57037() { // fn#57037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1036, offset: 0x013da9ef, size: 147 bytes, params: 1, frame: 15
return CreateClass(Histogram, [{key: 'getSamples', value: function() {
return this.samples;
}}, {key: 'addSample', value: value_57040}, {key: 'addSamples', value: value_57041}, {key: 'getReport',
value: value_57043}, {key: 'getPercentile', value: function(a0) {
return this.digest.percentile(a0 / 100) ?? 0;
}}]);
function Histogram() { // fn#57038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1057, offset: 0x013daa82, size: 99 bytes, params: 1, frame: 14
const value = environment.__proto__;
env1_2(this, Histogram);
const Digest = (Module07132Module).Digest;
this.digest = new Digest();
this.total = 0;
this.samples = 0;
this.totalWeight = 0;
}
function value_57040(a0) { // fn#57040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1259, offset: 0x013daaf0, size: 144 bytes, params: 2, frame: 17
let value = a1;
const r5 = value !== undefined ? value : 1;
this.total = this.total + a0 * r5;
this.totalWeight = this.totalWeight + r5;
const samples = this.samples;
this.samples = typeof samples === 'bigint' ? samples + 1n : +samples + 1;
value = environment.__proto__;
const TDigest = (Module07132Module).TDigest;
const push = TDigest.prototype.push;
push.call(this.digest, a0, r5);
this.digest.check_continuous();
}
function value_57041(a0) { // fn#57041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1437, offset: 0x013dab80, size: 180 bytes, params: 2, frame: 18
var environment;
let value = a1;
const r5 = value !== undefined ? value : 1;
this.total = this.total + a0.reduce(_fun57042, 0);
this.totalWeight = this.totalWeight + r5 * a0.length;
this.samples = this.samples + a0.length;
value = environment.__proto__;
const TDigest = (Module07132Module).TDigest;
const push = TDigest.prototype.push;
push.call(this.digest, a0, r5);
this.digest.check_continuous();
function _fun57042(a0, a1) { // fn#57042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1475, offset: 0x013dac34, size: 23 bytes, params: 3, frame: 2
return a0 + a1 * env0_0;
}
}
function value_57043() { // fn#57043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1654, offset: 0x013dac4b, size: 268 bytes, params: 1, frame: 20
var r5;
var r0;
var value4;
var digest;
var value5;
var value6;
let value = a0;
const r2 = value !== undefined ? value : [25, 50, 75, 90, 95];
const object = {};
value = environment.__proto__;
value = _createForOfIteratorHelperLoose_57034(r2);
const value2 = value();
let done = value2.done;
const value3 = 0;
if (!done) {
r5 = value2;
while (true) {
value4 = r5.value;
digest = this.digest;
value5 = digest.percentile(value4 / 100);
r0 = value5 ?? value3;
object[value4] = r0;
value6 = value();
done = value6.done;
if (done) {
break;
}
r5 = value6;
continue;
}
}
r5 = r6;
const object2 = {};
object2.min = this.digest.percentile(value3) ?? value3;
object2.max = this.digest.percentile(1) ?? value3;
object2.count = this.digest.size() ?? value3;
object2.percentiles = object;
object2.mean = this.totalWeight > value3 ? this.total / this.totalWeight : value3;
object2.samples = this.samples;
return object2;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun57035;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun57037() { // fn#57037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1036, offset: 0x013da9ef, size: 147 bytes, params: 1, frame: 15
return env0_3(Histogram, [{key: 'getSamples', value: function() {
return this.samples;
}}, {key: 'addSample', value: value_57040}, {key: 'addSamples', value: value_57041}, {key: 'getReport',
value: value_57043}, {key: 'getPercentile', value: function(a0) {
return this.digest.percentile(a0 / 100) ?? 0;
}}]);
}
function Histogram() { // fn#57038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1057, offset: 0x013daa82, size: 99 bytes, params: 1, frame: 14
const value = environment.__proto__;
env1_2(this, Histogram);
const Digest = (require(7132) /* metro dependency 7132 */).Digest;
this.digest = new Digest();
this.total = 0;
this.samples = 0;
this.totalWeight = 0;
}
function value_57040(a0) { // fn#57040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1259, offset: 0x013daaf0, size: 144 bytes, params: 2, frame: 17
let value = a1;
const r5 = value !== undefined ? value : 1;
this.total = this.total + a0 * r5;
this.totalWeight = this.totalWeight + r5;
const samples = this.samples;
this.samples = typeof samples === 'bigint' ? samples + 1n : +samples + 1;
value = environment.__proto__;
const TDigest = (require(7132) /* metro dependency 7132 */).TDigest;
const push = TDigest.prototype.push;
push.call(this.digest, a0, r5);
this.digest.check_continuous();
}
function value_57041(a0) { // fn#57041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1437, offset: 0x013dab80, size: 180 bytes, params: 2, frame: 18
var environment;
let value = a1;
const r5 = value !== undefined ? value : 1;
this.total = this.total + a0.reduce(_fun57042, 0);
this.totalWeight = this.totalWeight + r5 * a0.length;
this.samples = this.samples + a0.length;
value = environment.__proto__;
const TDigest = (require(7132) /* metro dependency 7132 */).TDigest;
const push = TDigest.prototype.push;
push.call(this.digest, a0, r5);
this.digest.check_continuous();
}
function value_57043() { // fn#57043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1654, offset: 0x013dac4b, size: 268 bytes, params: 1, frame: 20
var r5;
var r0;
var value4;
var digest;
var value5;
var value6;
let value = a0;
const r2 = value !== undefined ? value : [25, 50, 75, 90, 95];
const object3 = {};
value = environment.__proto__;
value = _createForOfIteratorHelperLoose_57034(r2);
const value2 = value();
let done = value2.done;
const value3 = 0;
if (!done) {
r5 = value2;
while (true) {
value4 = r5.value;
digest = this.digest;
value5 = digest.percentile(value4 / 100);
r0 = value5 ?? value3;
object3[value4] = r0;
value6 = value();
done = value6.done;
if (done) {
break;
}
r5 = value6;
continue;
}
}
const object4 = {};
object4.min = this.digest.percentile(value3) ?? value3;
object4.max = this.digest.percentile(1) ?? value3;
object4.count = this.digest.size() ?? value3;
object4.percentiles = object3;
object4.mean = this.totalWeight > value3 ? this.total / this.totalWeight : value3;
object4.samples = this.samples;
return object4;
}
function _fun57042(a0, a1) { // fn#57042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7309:1475, offset: 0x013dac34, size: 23 bytes, params: 3, frame: 2
return a0 + a1 * env0_0;
}
global.__d(_fun57033, 7131, [6, 7, 7132, 2]) /* metro module 7131, dependencies: [6, 7, 7132, 2] */;
+6 -2
View File
@@ -1,9 +1,13 @@
/* Metro module 15629; source: lib/IdGenerator.tsx; dependencies: [2, 487] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IdGeneratorModule from '../external/discord_common/js/packages/id-generator/IdGenerator.tsx'; /* Metro dependency 487 */
function _fun119713(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15837:6, offset: 0x02516d01, size: 96 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/IdGenerator.tsx');
const IdGenerator = (require(487) /* metro dependency 487: IdGenerator */).IdGenerator;
(FileImportTrackerModule).fileFinishedImporting('lib/IdGenerator.tsx');
const IdGenerator = (IdGeneratorModule).IdGenerator;
exports.IdGenerator = IdGenerator;
}
global.__d(_fun119713, 15629, [2, 487]) /* metro module 15629, dependencies: [2, 487] */;
+113 -107
View File
@@ -1,127 +1,133 @@
/* Metro module 9209; source: lib/InviteQueue.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 672, 3, 7067, 4603, 5258, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
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 Durations from '../utils/Durations.tsx'; /* Metro dependency 672 */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import Queue from '../utils/Queue.tsx'; /* Metro dependency 5258 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:6, offset: 0x01d385ae, size: 332 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const SECOND = Millis.SECOND;
const env0_8 = 1 * SECOND + 10;
object2 = {GROUP_DM: 0};
object2[0] = 'GROUP_DM';
object2.USER = 1;
object2[1] = 'USER';
object2.CHANNEL = 2;
object2[2] = 'CHANNEL';
let value = importDefault(5258) /* metro dependency 5258: Queue */;
object = {GROUP_DM: 0};
object[0] = 'GROUP_DM';
object.USER = 1;
object[1] = 'USER';
object.CHANNEL = 2;
object[2] = 'CHANNEL';
let value = Queue;
value = _fun72061(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/InviteQueue.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/InviteQueue.tsx');
exports.default = value;
exports.InvitePropertiesType = object2;
}
function _isNativeReflectConstruct_72058() { // fn#72058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:158, offset: 0x01d386fa, 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) {
exports.InvitePropertiesType = object;
function _isNativeReflectConstruct_72058() { // fn#72058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:158, offset: 0x01d386fa, 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_72058_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_72058_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun72061(a0) { // fn#72061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:489, offset: 0x01d3875c, size: 97 bytes, params: 2, frame: 16
const closure = InviteQueue;
env0_6(closure, a0);
return env0_3(closure, [{key: '_sendInvite', value: value_72063}, {key: 'drain', value: value_72066}]);
}
function _fun72061(a0) { // fn#72061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:489, offset: 0x01d3875c, size: 97 bytes, params: 2, frame: 16
const InviteQueue2 = InviteQueue;
Inherits(InviteQueue2, a0);
return CreateClass(InviteQueue2, [{key: '_sendInvite', value: value_72063}, {key: 'drain', value: value_72066}]);
function InviteQueue() { // fn#72062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:501, offset: 0x01d387bd, size: 166 bytes, params: 1, frame: 19
const value = environment.__proto__;
env1_2(this, InviteQueue);
const defaultImport = Logger;
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport('InviteQueue');
const items2 = [defaultImport2 instanceof Object ? defaultImport2 : value3, env1_8];
const value6 = env1_5(InviteQueue);
return env1_4(this, _isNativeReflectConstruct_72058() ? global.Reflect.construct(value6, items2,
env1_5(this).constructor) : value6.apply(this, items2));
}
function InviteQueue() { // fn#72062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:501, offset: 0x01d387bd, size: 166 bytes, params: 1, frame: 19
const value = environment.__proto__;
env1_2(this, InviteQueue);
const defaultImport = importDefault(3) /* metro dependency 3: Logger */;
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport('InviteQueue');
const items2 = [defaultImport2 instanceof Object ? defaultImport2 : value3, env1_8];
const value6 = env1_5(InviteQueue);
return env1_4(this, _isNativeReflectConstruct_72058() ? global.Reflect.construct(value6, items2,
env1_5(this).constructor) : value6.apply(this, items2));
}
function value_72063({id}, a1, a2, a3, a4) { // fn#72063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:797, offset: 0x01d38863, size: 91 bytes, params: 6, frame: 19
var environment;
const env0_0 = a4;
let value = environment.__proto__;
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value = value.sendInvite(id, a1, a2, a3);
value.then(_fun72064, _fun72065);
function _fun72064() { // fn#72064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:854, offset: 0x01d388be, size: 21 bytes, params: 1, frame: 13
return env0_0(null, true);
}
function value_72063({id}, a1, a2, a3, a4) { // fn#72063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:797, offset: 0x01d38863, size: 91 bytes, params: 6, frame: 19
var environment;
const env0_0 = a4;
let value = environment.__proto__;
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value = value.sendInvite(id, a1, a2, a3);
value.then(_fun72064, _fun72065);
}
function _fun72065() { // fn#72065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:871, offset: 0x01d388d3, size: 21 bytes, params: 1, frame: 13
return env0_0(null, false);
}
function value_72066(a0, a1) { // fn#72066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:909, offset: 0x01d388e8, size: 199 bytes, params: 3, frame: 21
var environment;
const env0_1 = a0;
const env0_2 = a1;
const location = a0.location;
const inviteAnalyticsMetadata = a0.inviteAnalyticsMetadata;
const type = a0.type;
let value = environment.__proto__;
const GROUP_DM = env1_9.GROUP_DM;
if (GROUP_DM === type) {
this._sendInvite(a0.channel, a0.inviteKey, location, inviteAnalyticsMetadata, a1);
} else if (env1_9.CHANNEL === type) {
this._sendInvite(a0.channel, a0.inviteKey, location, inviteAnalyticsMetadata, a1);
} else if (env1_9.USER === type) {
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value = value.ensurePrivateChannel(a0.user.id);
value.then(_fun72067, function() {
return require(null, false);
});
}
}
}
function _fun72064() { // fn#72064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:854, offset: 0x01d388be, size: 21 bytes, params: 1, frame: 13
return env0_0(null, true);
}
function value_72066(a0, a1) { // fn#72066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:909, offset: 0x01d388e8, size: 199 bytes, params: 3, frame: 21
var environment;
const env0_1 = a0;
const env0_2 = a1;
const location = a0.location;
const inviteAnalyticsMetadata = a0.inviteAnalyticsMetadata;
const type = a0.type;
let value = environment.__proto__;
const GROUP_DM = env1_9.GROUP_DM;
if (GROUP_DM === type) {
this._sendInvite(a0.channel, a0.inviteKey, location, inviteAnalyticsMetadata, a1);
} else if (env1_9.CHANNEL === type) {
this._sendInvite(a0.channel, a0.inviteKey, location, inviteAnalyticsMetadata, a1);
} else if (env1_9.USER === type) {
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value = value.ensurePrivateChannel(a0.user.id);
value.then(_fun72067, function() {
return require(null, false);
});
}
function _fun72067(a0) { // fn#72067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:1124, offset: 0x01d389af, size: 94 bytes, params: 2, frame: 19
var binding;
let value = environment.__proto__.__proto__;
value = ChannelStore.getChannel(a0);
if (value != null) {
binding = env0_0;
binding._sendInvite(value, env0_1.inviteKey, location, inviteAnalyticsMetadata, require);
} else {
require(null, false);
}
}
function _fun72065() { // fn#72065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:871, offset: 0x01d388d3, size: 21 bytes, params: 1, frame: 13
return env0_0(null, false);
}
}
function _fun72067(a0) { // fn#72067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9394:1124, offset: 0x01d389af, size: 94 bytes, params: 2, frame: 19
var binding;
let value = environment.__proto__.__proto__;
value = ChannelStore.getChannel(a0);
if (value != null) {
binding = env0_0;
binding._sendInvite(value, env0_1.inviteKey, location, inviteAnalyticsMetadata, require);
} else {
require(null, false);
}
}
global.__d(_fun72057, 9209, [6, 7, 15, 17, 18, 1379, 672, 3, 7067, 4603, 5258,
2]) /* metro module 9209, dependencies: [6, 7, 15, 17, 18, 1379, 672, 3, 7067, 4603, 5258, 2] */;
+4 -1
View File
@@ -1,4 +1,6 @@
/* Metro module 12481; source: lib/KeybindModKeys.tsx; dependencies: [477, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun95017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12671:6, offset: 0x0212eccb, size: 251 bytes, params: 8, frame: 19
var r4;
var r3;
@@ -27,9 +29,10 @@ function _fun95017(global, require, importDefault, importAll, module, exports, d
value = value.isMacWeb();
r1 = value ? 'return' : 'enter';
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/KeybindModKeys.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/KeybindModKeys.tsx');
exports.modKey = r4;
exports.altKey = r3;
exports.returnKey = r1;
}
global.__d(_fun95017, 12481, [477, 2]) /* metro module 12481, dependencies: [477, 2] */;
+29 -26
View File
@@ -1,37 +1,40 @@
/* Metro module 4561; source: lib/LifecycleManager.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun38780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:6, offset: 0x010ca1de, size: 124 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun38781();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/LifecycleManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/LifecycleManager.tsx');
exports.default = value;
}
function _fun38781() { // fn#38781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:118, offset: 0x010ca25a, size: 78 bytes, params: 1, frame: 15
return env0_1(LifecycleManager, [{key: 'initialize', value: function(a0) {
var r4;
var r6;
var _initialize;
var items;
if (!this.isInitialized) {
this.isInitialized = true;
_initialize = this._initialize;
items = [];
arraySpread(items, copyRestArgs(0, r6), 0, r4);
apply(_initialize, items, this, r4);
}
}}, {key: 'terminate', value: function() {
if (this.isInitialized) {
function _fun38781() { // fn#38781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:118, offset: 0x010ca25a, size: 78 bytes, params: 1, frame: 15
return CreateClass(LifecycleManager, [{key: 'initialize', value: function(a0) {
var r4;
var r6;
var _initialize;
var items;
if (!this.isInitialized) {
this.isInitialized = true;
_initialize = this._initialize;
items = [];
arraySpread(items, copyRestArgs(0, r6), 0, r4);
apply(_initialize, items, this, r4);
}
}}, {key: 'terminate', value: function() {
if (this.isInitialized) {
this.isInitialized = false;
this._terminate();
}
}}]);
function LifecycleManager() { // fn#38782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:139, offset: 0x010ca2a8, size: 35 bytes, params: 1, frame: 13
env1_0(this, LifecycleManager);
this.isInitialized = false;
this._terminate();
}
}}]);
}
function LifecycleManager() { // fn#38782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4739:139, offset: 0x010ca2a8, size: 35 bytes, params: 1, frame: 13
env1_0(this, LifecycleManager);
this.isInitialized = false;
}
}
global.__d(_fun38780, 4561, [6, 7, 2]) /* metro module 4561, dependencies: [6, 7, 2] */;
+76 -67
View File
@@ -1,83 +1,92 @@
/* Metro module 8359; source: lib/LimitedMap.tsx; dependencies: [6, 7, 15, 17, 102, 18, 162, 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 Module00102 from '../by-id/module-00102.js'; /* Metro dependency 102 */
import Module00162 from '../by-id/module-00162.js'; /* Metro dependency 162 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun66575(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:6, offset: 0x01c01092, size: 225 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(102) /* metro dependency 102 */;
const env0_5 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(162) /* metro dependency 162 */;
let value = Module00162;
const Map = global.Map;
value = value(Map);
value = _fun66579(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/LimitedMap.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/LimitedMap.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_66576() { // fn#66576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:159, offset: 0x01c01173, 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) {
function _isNativeReflectConstruct_66576() { // fn#66576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:159, offset: 0x01c01173, 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_66576_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_66576_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun66579(a0) { // fn#66579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:358, offset: 0x01c011d5, size: 72 bytes, params: 2, frame: 15
const closure = LimitedMap;
env0_5(closure, a0);
return env0_1(closure, [{key: 'set', value: value_66581}]);
}
function _fun66579(a0) { // fn#66579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:358, offset: 0x01c011d5, size: 72 bytes, params: 2, frame: 15
const LimitedMap2 = LimitedMap;
Inherits(LimitedMap2, a0);
return CreateClass(LimitedMap2, [{key: 'set', value: value_66581}]);
function LimitedMap(a0) { // fn#66580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:370, offset: 0x01c0121d, size: 117 bytes, params: 2, frame: 19
let value = environment.__proto__;
env1_0(this, LimitedMap);
const value3 = env1_3(LimitedMap);
value = env1_2(this, _isNativeReflectConstruct_66576() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.maxSize = a0;
return value;
}
function LimitedMap(a0) { // fn#66580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:370, offset: 0x01c0121d, size: 117 bytes, params: 2, frame: 19
let value = environment.__proto__;
env1_0(this, LimitedMap);
const value3 = env1_3(LimitedMap);
value = env1_2(this, _isNativeReflectConstruct_66576() ? global.Reflect.construct(value3, [],
env1_3(this).constructor) : value3.apply(this, undefined));
value.maxSize = a0;
return value;
}
function value_66581(a0, a1) { // fn#66581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:644, offset: 0x01c01292, size: 110 bytes, params: 3, frame: 17
var value;
if (this.size >= this.maxSize) {
value = this.keys();
value = value.next().value;
this.delete(value);
}
return value_66581_superPropGet(LimitedMap, 'set', this, 3)([a0, a1]);
function value_66581_superPropGet(a0, a1, a2, a3) { // fn#66582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:728, owner: value_66581._superPropGet, offset: 0x01c01300, size: 102 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
const binding = env2_4;
value = env2_3(1 & 3 ? value.prototype : value);
value = binding(value, 'set', a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun66583 : value;
function _fun66583(a0) { // fn#66583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:827, offset: 0x00c62408, size: 27 bytes, params: 2, frame: 13
return CreateClass.apply(importDefault, a0);
}
}
}
function value_66581(a0, a1) { // fn#66581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:644, offset: 0x01c01292, size: 110 bytes, params: 3, frame: 17
var value;
if (this.size >= this.maxSize) {
value = this.keys();
value = value.next().value;
this.delete(value);
}
return value_66581_superPropGet(LimitedMap, 'set', this, 3)([a0, a1]);
}
function value_66581_superPropGet(a0, a1, a2, a3) { // fn#66582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8544:728, owner: value_66581._superPropGet, offset: 0x01c01300, size: 102 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
const binding = env2_4;
value = env2_3(1 & 3 ? value.prototype : value);
value = binding(value, 'set', a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun66583 : value;
}
global.__d(_fun66575, 8359, [6, 7, 15, 17, 102, 18, 162,
2]) /* metro module 8359, dependencies: [6, 7, 15, 17, 102, 18, 162, 2] */;
File diff suppressed because it is too large. Load diff
+140 -132
View File
@@ -1,4 +1,8 @@
/* Metro module 15269; source: lib/ModalRegistry.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun116753(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:6, offset: 0x02495c4e, size: 148 bytes, params: 8, frame: 18
const _arrayLikeToArray_116756 = function(a0, a1) {
var r0;
@@ -45,152 +49,156 @@ function _fun116753(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
let value = _fun116757();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/ModalRegistry.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/ModalRegistry.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_116754(a0, a1) { // fn#116754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:120, offset: 0x02495ce2, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_116754(a0, a1) { // fn#116754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:120, offset: 0x02495ce2, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun116755;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_116756(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun116755;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_116756(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_116756(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun116755;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun116757() { // fn#116757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1036, offset: 0x02495e56, size: 88 bytes, params: 1, frame: 15
return env0_1(ModalRegistry, [{key: 'getStores', value: function() {
return this.stores;
}}, {key: 'getOpenModal', value: value_116760}]);
}
function ModalRegistry(a0) { // fn#116758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1057, offset: 0x02495eae, size: 184 bytes, params: 2, frame: 20
var r5;
var r8;
var value7;
var stores;
var value8;
var value9;
var value10;
var add;
var value11;
var value12;
env1_0(this, ModalRegistry);
this.modals = a0;
const Set = global.Set;
const set = new Set();
const value5 = _createForOfIteratorHelperLoose_116754(a0);
const value6 = value5();
let done = value6.done;
if (!done) {
r5 = value6;
reducibleLoop1: while (true) {
_createForOfIteratorHelperLoose_116754Binding = _createForOfIteratorHelperLoose_116754;
value7 = r5.value;
stores = value7.stores;
value8 = _createForOfIteratorHelperLoose_116754Binding(stores);
value9 = value8();
done = value9.done;
if (!done) {
r8 = value9;
reducibleLoop2: while (true) {
value10 = r8.value;
add = set.add;
Reflect.apply(add, set, [value10]);
value11 = value8();
done = value11.done;
if (done) {
break reducibleLoop2;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_116756(a0, value);
r6 = value;
} else {
r6 = value;
}
r8 = value11;
continue reducibleLoop2;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun116755;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun116755() { // fn#116755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:691, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return CreateClass >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof CreateClass === 'bigint' ? CreateClass : +CreateClass]};
}
}
function _fun116757() { // fn#116757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1036, offset: 0x02495e56, size: 88 bytes, params: 1, frame: 15
return CreateClass(ModalRegistry, [{key: 'getStores', value: function() {
return this.stores;
}}, {key: 'getOpenModal', value: value_116760}]);
function ModalRegistry(a0) { // fn#116758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1057, offset: 0x02495eae, size: 184 bytes, params: 2, frame: 20
var r5;
var r8;
var value7;
var stores;
var value8;
var value9;
var value10;
var add;
var value11;
var value12;
env1_0(this, ModalRegistry);
this.modals = a0;
const Set = global.Set;
const set = new Set();
const value5 = _createForOfIteratorHelperLoose_116754(a0);
const value6 = value5();
let done = value6.done;
if (!done) {
r5 = value6;
reducibleLoop1: while (true) {
_createForOfIteratorHelperLoose_116754Binding = _createForOfIteratorHelperLoose_116754;
value7 = r5.value;
stores = value7.stores;
value8 = _createForOfIteratorHelperLoose_116754Binding(stores);
value9 = value8();
done = value9.done;
if (!done) {
r8 = value9;
reducibleLoop2: while (true) {
value10 = r8.value;
add = set.add;
Reflect.apply(add, set, [value10]);
value11 = value8();
done = value11.done;
if (done) {
break reducibleLoop2;
}
r8 = value11;
continue reducibleLoop2;
}
}
value12 = value5();
done = value12.done;
if (done) {
break reducibleLoop1;
}
r5 = value12;
continue reducibleLoop1;
}
}
value12 = value5();
done = value12.done;
if (done) {
break reducibleLoop1;
}
r5 = value12;
continue reducibleLoop1;
const Array = global.Array;
this.stores = Array.from(set);
}
function value_116760() { // fn#116760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1439, offset: 0x02495f71, size: 199 bytes, params: 1, frame: 13
const index = this.modals.findIndex(function(a0) {
return a0.isOpen();
});
if (index === -1) {
return null;
}
const property = this.modals[index];
const getProps = property.getProps;
let r1 = getProps == null ? undefined : property.getProps();
r1 = r1 ?? ({});
const object = {key: index};
object.component = property.getComponent();
object.props = r1;
object.closable = property.closable == null || property.closable;
object.backdropInstant = property.backdropInstant != null && property.backdropInstant;
object.backdropStyle = property.backdropStyle;
object.disableAnimation = property.disableAnimation != null && property.disableAnimation;
return object;
}
}
const Array = global.Array;
this.stores = Array.from(set);
}
function value_116760() { // fn#116760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15466:1439, offset: 0x02495f71, size: 199 bytes, params: 1, frame: 13
const index = this.modals.findIndex(function(a0) {
return a0.isOpen();
});
if (index === -1) {
return null;
}
const property = this.modals[index];
const getProps = property.getProps;
let r1 = getProps == null ? undefined : property.getProps();
r1 = r1 ?? ({});
const object2 = {key: index};
object2.component = property.getComponent();
object2.props = r1;
object2.closable = property.closable == null || property.closable;
object2.backdropInstant = property.backdropInstant != null && property.backdropInstant;
object2.backdropStyle = property.backdropStyle;
object2.disableAnimation = property.disableAnimation != null && property.disableAnimation;
return object2;
}
global.__d(_fun116753, 15269, [6, 7, 2]) /* metro module 15269, dependencies: [6, 7, 2] */;
+33 -26
View File
@@ -1,11 +1,13 @@
/* Metro module 3787; source: lib/MuteTimers.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun28791(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:6, offset: 0x00f8288a, size: 146 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun28792();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/MuteTimers.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/MuteTimers.tsx');
exports.default = value;
exports.computeIsMuted = function({muted, mute_config}) {
var r1;
@@ -51,32 +53,36 @@ function _fun28791(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
}
function _fun28792() { // fn#28792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:122, offset: 0x00f8291c, size: 101 bytes, params: 1, frame: 15
return env0_1(MuteTimers, [{key: 'reset', value: function() {
var Object = global.Object;
Object.values(this.timers).forEach(_fun28795);
this.timers = {};
}}, {key: 'setTimer', value: value_28796}, {key: 'clearTimer', value: function(a0) {
if (a0 != null && a0 in this.timers) {
global.clearTimeout(this.timers[a0]);
delete this.timers[a0];
function _fun28792() { // fn#28792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:122, offset: 0x00f8291c, size: 101 bytes, params: 1, frame: 15
return CreateClass(MuteTimers, [{key: 'reset', value: function() {
var Object = global.Object;
Object.values(this.timers).forEach(_fun28795);
this.timers = {};
}}, {key: 'setTimer', value: value_28796}, {key: 'clearTimer', value: function(a0) {
if (a0 != null && a0 in this.timers) {
global.clearTimeout(this.timers[a0]);
delete this.timers[a0];
}
}}]);
function MuteTimers() { // fn#28793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:143, offset: 0x00f82981, size: 35 bytes, params: 1, frame: 13
env1_0(this, MuteTimers);
this.timers = {};
}
}}]);
function value_28794() { // fn#28794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:221, offset: 0x00f829a4, size: 56 bytes, params: 1, frame: 12
const Object = global.Object;
Object.values(this.timers).forEach(function(a0) {
return (0, global.clearTimeout)(a0);
});
this.timers = {};
}
}
}
function MuteTimers() { // fn#28793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:143, offset: 0x00f82981, size: 35 bytes, params: 1, frame: 13
env1_0(this, MuteTimers);
this.timers = {};
}
function value_28794() { // fn#28794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:221, offset: 0x00f829a4, size: 56 bytes, params: 1, frame: 12
const Object = global.Object;
Object.values(this.timers).forEach(function(a0) {
return (0, global.clearTimeout)(a0);
});
this.timers = {};
function _fun28795(a0) { // fn#28795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:268, offset: 0x00dc9fae, size: 20 bytes, params: 2, frame: 11
return global.clearTimeout(a0);
}
function value_28796(a0, a1, a2) { // fn#28796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3914:328, offset: 0x00f829dc, size: 180 bytes, params: 4, frame: 18
@@ -128,3 +134,4 @@ function value_28796(a0, a1, a2) { // fn#28796, source: /ci/build/discord/discor
return r0;
}
global.__d(_fun28791, 3787, [6, 7, 2]) /* metro module 3787, dependencies: [6, 7, 2] */;
+98 -93
View File
@@ -1,4 +1,10 @@
/* Metro module 12403; source: lib/NetworkQuality.tsx; dependencies: [6, 7, 4401, 661, 4303, 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 NetworkStore from '../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun94557(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:6, offset: 0x0211d49b, size: 193 bytes, params: 8, frame: 19
const env0_0 = require;
const round_94558 = function(a0) {
@@ -10,102 +16,101 @@ function _fun94557(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.NetworkConnectionTypes;
const env0_6 = value.NetworkConnectionSpeeds;
value = _fun94559();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/NetworkQuality.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/NetworkQuality.tsx');
exports.default = value;
function _fun94559() { // fn#94559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:250, offset: 0x0211d55c, size: 111 bytes, params: 1, frame: 15
return CreateClass(NetworkQuality, [{key: '_initStats', value: value_94561}, {key: 'getStats', value: value_94564},
{key: 'incrementNetworkStats', value: value_94565}]);
function NetworkQuality() { // fn#94560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:271, offset: 0x0211d5cb, size: 80 bytes, params: 1, frame: 14
let value = environment.__proto__;
env1_2(this, NetworkQuality);
this._networkStats = this._initStats();
value = require(4303) /* metro dependency 4303: TimeUtils */;
this._lastSampleTimestamp = value.now();
}
function value_94561() { // fn#94561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:424, offset: 0x0211d61b, size: 103 bytes, params: 1, frame: 15
var environment;
let Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
Reflect.apply(values, Object, [NetworkConnectionTypes]).forEach(_fun94562);
Object = global.Object;
Object.values(NetworkConnectionSpeeds).forEach(_fun94563);
return {effectiveConnectionSpeedBuckets: {}, connectionTypeBuckets: {}};
function _fun94562(a0) { // fn#94562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:536, offset: 0x0211d682, size: 26 bytes, params: 2, frame: 3
env0_0.connectionTypeBuckets[a0] = 0;
}
function _fun94563(a0) { // fn#94563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:598, offset: 0x0211d69c, size: 26 bytes, params: 2, frame: 3
env0_0.effectiveConnectionSpeedBuckets[a0] = 0;
}
}
function value_94564() { // fn#94564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:670, offset: 0x0211d6b6, size: 366 bytes, params: 1, frame: 16
const _networkStats = this._networkStats;
const object = {};
const round_94558Binding = round_94558;
let connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const WIFI = NetworkConnectionTypes.WIFI;
object.duration_connection_type_wifi = round_94558Binding(connectionTypeBuckets[WIFI]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const CELLULAR = NetworkConnectionTypes.CELLULAR;
object.duration_connection_type_cellular = round_94558Binding(connectionTypeBuckets[CELLULAR]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const ETHERNET = NetworkConnectionTypes.ETHERNET;
object.duration_connection_type_ethernet = round_94558Binding(connectionTypeBuckets[ETHERNET]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const BLUETOOTH = NetworkConnectionTypes.BLUETOOTH;
object.duration_connection_type_bluetooth = round_94558Binding(connectionTypeBuckets[BLUETOOTH]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const OTHER = NetworkConnectionTypes.OTHER;
object.duration_connection_type_other = round_94558Binding(connectionTypeBuckets[OTHER]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
let UNKNOWN = NetworkConnectionTypes.UNKNOWN;
object.duration_connection_type_unknown = round_94558Binding(connectionTypeBuckets[UNKNOWN]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const NONE = NetworkConnectionTypes.NONE;
object.duration_connection_type_none = round_94558Binding(connectionTypeBuckets[NONE]);
let effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const TWO_G = NetworkConnectionSpeeds.TWO_G;
object.duration_effective_connection_speed_2g = round_94558Binding(effectiveConnectionSpeedBuckets[TWO_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const THREE_G = NetworkConnectionSpeeds.THREE_G;
object.duration_effective_connection_speed_3g = round_94558Binding(effectiveConnectionSpeedBuckets[THREE_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const FOUR_G = NetworkConnectionSpeeds.FOUR_G;
object.duration_effective_connection_speed_4g = round_94558Binding(effectiveConnectionSpeedBuckets[FOUR_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const FIVE_G = NetworkConnectionSpeeds.FIVE_G;
object.duration_effective_connection_speed_5g = round_94558Binding(effectiveConnectionSpeedBuckets[FIVE_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
UNKNOWN = NetworkConnectionSpeeds.UNKNOWN;
object.duration_effective_connection_speed_unknown = round_94558Binding(effectiveConnectionSpeedBuckets[UNKNOWN]);
return object;
}
function value_94565(a0) { // fn#94565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:1724, offset: 0x0211d824, size: 163 bytes, params: 2, frame: 14
const value = (a0 - this._lastSampleTimestamp) / 1000;
const effectiveConnectionSpeed = NetworkStore.getEffectiveConnectionSpeed();
const SLOW_TWO_G = NetworkConnectionSpeeds.SLOW_TWO_G;
const r6 = effectiveConnectionSpeed !== SLOW_TWO_G ? effectiveConnectionSpeed : NetworkConnectionSpeeds.TWO_G;
const type = NetworkStore.getType();
const WIMAX = NetworkConnectionTypes.WIMAX;
const r4 = type !== WIMAX ? type : NetworkConnectionTypes.WIFI;
this._networkStats.effectiveConnectionSpeedBuckets[r6] += value;
this._networkStats.connectionTypeBuckets[r4] += value;
this._lastSampleTimestamp = a0;
}
}
}
function _fun94559() { // fn#94559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:250, offset: 0x0211d55c, size: 111 bytes, params: 1, frame: 15
return env0_3(NetworkQuality, [{key: '_initStats', value: value_94561}, {key: 'getStats', value: value_94564},
{key: 'incrementNetworkStats', value: value_94565}]);
}
function NetworkQuality() { // fn#94560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:271, offset: 0x0211d5cb, size: 80 bytes, params: 1, frame: 14
let value = environment.__proto__;
env1_2(this, NetworkQuality);
this._networkStats = this._initStats();
value = require(4303) /* metro dependency 4303: TimeUtils */;
this._lastSampleTimestamp = value.now();
}
function value_94561() { // fn#94561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:424, offset: 0x0211d61b, size: 103 bytes, params: 1, frame: 15
var environment;
let Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
Reflect.apply(values, Object, [NetworkConnectionTypes]).forEach(_fun94562);
Object = global.Object;
Object.values(NetworkConnectionSpeeds).forEach(_fun94563);
return {effectiveConnectionSpeedBuckets: {}, connectionTypeBuckets: {}};
}
function value_94564() { // fn#94564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:670, offset: 0x0211d6b6, size: 366 bytes, params: 1, frame: 16
const _networkStats = this._networkStats;
const object2 = {};
const round_94558Binding = round_94558;
let connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const WIFI = NetworkConnectionTypes.WIFI;
object2.duration_connection_type_wifi = round_94558Binding(connectionTypeBuckets[WIFI]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const CELLULAR = NetworkConnectionTypes.CELLULAR;
object2.duration_connection_type_cellular = round_94558Binding(connectionTypeBuckets[CELLULAR]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const ETHERNET = NetworkConnectionTypes.ETHERNET;
object2.duration_connection_type_ethernet = round_94558Binding(connectionTypeBuckets[ETHERNET]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const BLUETOOTH = NetworkConnectionTypes.BLUETOOTH;
object2.duration_connection_type_bluetooth = round_94558Binding(connectionTypeBuckets[BLUETOOTH]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const OTHER = NetworkConnectionTypes.OTHER;
object2.duration_connection_type_other = round_94558Binding(connectionTypeBuckets[OTHER]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
let UNKNOWN = NetworkConnectionTypes.UNKNOWN;
object2.duration_connection_type_unknown = round_94558Binding(connectionTypeBuckets[UNKNOWN]);
connectionTypeBuckets = _networkStats.connectionTypeBuckets;
const NONE = NetworkConnectionTypes.NONE;
object2.duration_connection_type_none = round_94558Binding(connectionTypeBuckets[NONE]);
let effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const TWO_G = NetworkConnectionSpeeds.TWO_G;
object2.duration_effective_connection_speed_2g = round_94558Binding(effectiveConnectionSpeedBuckets[TWO_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const THREE_G = NetworkConnectionSpeeds.THREE_G;
object2.duration_effective_connection_speed_3g = round_94558Binding(effectiveConnectionSpeedBuckets[THREE_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const FOUR_G = NetworkConnectionSpeeds.FOUR_G;
object2.duration_effective_connection_speed_4g = round_94558Binding(effectiveConnectionSpeedBuckets[FOUR_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
const FIVE_G = NetworkConnectionSpeeds.FIVE_G;
object2.duration_effective_connection_speed_5g = round_94558Binding(effectiveConnectionSpeedBuckets[FIVE_G]);
effectiveConnectionSpeedBuckets = _networkStats.effectiveConnectionSpeedBuckets;
UNKNOWN = NetworkConnectionSpeeds.UNKNOWN;
object2.duration_effective_connection_speed_unknown = round_94558Binding(effectiveConnectionSpeedBuckets[UNKNOWN]);
return object2;
}
function value_94565(a0) { // fn#94565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:1724, offset: 0x0211d824, size: 163 bytes, params: 2, frame: 14
const value = (a0 - this._lastSampleTimestamp) / 1000;
const effectiveConnectionSpeed = NetworkStore.getEffectiveConnectionSpeed();
const SLOW_TWO_G = NetworkConnectionSpeeds.SLOW_TWO_G;
const r6 = effectiveConnectionSpeed !== SLOW_TWO_G ? effectiveConnectionSpeed : NetworkConnectionSpeeds.TWO_G;
const type = NetworkStore.getType();
const WIMAX = NetworkConnectionTypes.WIMAX;
const r4 = type !== WIMAX ? type : NetworkConnectionTypes.WIFI;
this._networkStats.effectiveConnectionSpeedBuckets[r6] += value;
this._networkStats.connectionTypeBuckets[r4] += value;
this._lastSampleTimestamp = a0;
}
function _fun94562(a0) { // fn#94562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:536, offset: 0x0211d682, size: 26 bytes, params: 2, frame: 3
env0_0.connectionTypeBuckets[a0] = 0;
}
function _fun94563(a0) { // fn#94563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12589:598, offset: 0x0211d69c, size: 26 bytes, params: 2, frame: 3
env0_0.effectiveConnectionSpeedBuckets[a0] = 0;
}
global.__d(_fun94557, 12403, [6, 7, 4401, 661, 4303,
2]) /* metro module 12403, dependencies: [6, 7, 4401, 661, 4303, 2] */;
+131 -128
View File
@@ -1,154 +1,157 @@
/* Metro module 12569; source: lib/NetworkTtlCache.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun96300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:6, offset: 0x0215a2d5, size: 224 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
object = {IDLE: 'idle', LOADING: 'loading', SUCCESS: 'success', ERROR: 'error'};
const value = _fun96301();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/NetworkTtlCache.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/NetworkTtlCache.tsx');
exports.NetworkTtlCacheStatus = {IDLE: 'idle', LOADING: 'loading', VALID: 'valid', STALE: 'stale', ERROR: 'error'};
exports.NetworkTtlCache = value;
}
function _fun96301() { // fn#96301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:329, offset: 0x0215a3b5, size: 492 bytes, params: 1, frame: 15
return env0_1(NetworkTtlCache, [{key: 'setTtl', value: function(a0) {
this.ttlMs = a0;
}}, {key: 'setLoading', value: value_96304}, {key: 'setValue', value: value_96305}, {key: 'setError',
value: value_96306}, {key: 'clear', value: value_96307}, {key: 'getValue', value: function() {
return this.value;
}}, {key: 'getFetchState', value: function() {
return this.fetchState;
}}, {key: 'getFetchedAt', value: function() {
return this.fetchedAt;
}}, {key: 'forceExpire', value: function() {
this.fetchedAt = null;
}}, {key: 'isExpired', value: function() {
var r1;
var r0;
var value = this.ttlMs != null;
if (value) {
value = this.fetchedAt == null;
function _fun96301() { // fn#96301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:329, offset: 0x0215a3b5, size: 492 bytes, params: 1, frame: 15
return CreateClass(NetworkTtlCache, [{key: 'setTtl', value: function(a0) {
this.ttlMs = a0;
}}, {key: 'setLoading', value: value_96304}, {key: 'setValue', value: value_96305}, {key: 'setError',
value: value_96306}, {key: 'clear', value: value_96307}, {key: 'getValue', value: function() {
return this.value;
}}, {key: 'getFetchState', value: function() {
return this.fetchState;
}}, {key: 'getFetchedAt', value: function() {
return this.fetchedAt;
}}, {key: 'forceExpire', value: function() {
this.fetchedAt = null;
}}, {key: 'isExpired', value: function() {
var r1;
var r0;
var value = this.ttlMs != null;
if (value) {
r1 = value;
value = this.fetchedAt == null;
if (value) {
r1 = value;
} else {
value = global.Date.now();
value -= this.fetchedAt;
value = value >= this.ttlMs;
r1 = value;
}
r0 = r1;
} else {
value = global.Date.now();
value -= this.fetchedAt;
value = value >= this.ttlMs;
r1 = value;
r0 = value;
}
r0 = r1;
} else {
r0 = value;
return r0;
}}, {key: 'shouldFetch', value: value_96313}, {key: 'isLoading', value: value_96314}, {key: 'isValid',
value: value_96315}, {key: 'isError', value: value_96316}, {key: 'getStatus', value: value_96317},
{key: 'getValueWithStatus', value: function() {
return {value: this.value, status: this.getStatus()};
}}, {key: 'serialize', value: function() {
var value = null;
return value == this.value || value == this.fetchedAt ? value : {value: this.value, fetchedAt: this.fetchedAt};
}}, {key: 'restore', value: value_96320}]);
function NetworkTtlCache() { // fn#96302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:350, offset: 0x0215a5a1, size: 88 bytes, params: 1, frame: 15
let value = a0;
const r3 = value !== undefined ? value : {};
value = environment.__proto__;
env1_0(this, NetworkTtlCache);
const value3 = null;
this.value = value3;
const IDLE = env1_2.IDLE;
this.fetchState = IDLE;
this.fetchedAt = value3;
const ttlMs = r3.ttlMs;
this.ttlMs = value3 != ttlMs ? ttlMs : value3;
}
return r0;
}}, {key: 'shouldFetch', value: value_96313}, {key: 'isLoading', value: value_96314}, {key: 'isValid',
value: value_96315}, {key: 'isError', value: value_96316}, {key: 'getStatus', value: value_96317},
{key: 'getValueWithStatus', value: function() {
return {value: this.value, status: this.getStatus()};
}}, {key: 'serialize', value: function() {
var value = null;
return value == this.value || value == this.fetchedAt ? value : {value: this.value, fetchedAt: this.fetchedAt};
}}, {key: 'restore', value: value_96320}]);
}
function NetworkTtlCache() { // fn#96302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:350, offset: 0x0215a5a1, size: 88 bytes, params: 1, frame: 15
let value = a0;
const r3 = value !== undefined ? value : {};
value = environment.__proto__;
env1_0(this, NetworkTtlCache);
const value3 = null;
this.value = value3;
const IDLE = env1_2.IDLE;
this.fetchState = IDLE;
this.fetchedAt = value3;
const ttlMs = r3.ttlMs;
this.ttlMs = value3 != ttlMs ? ttlMs : value3;
}
function value_96304() { // fn#96304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:580, offset: 0x0215a609, size: 26 bytes, params: 1, frame: 2
const LOADING = env1_2.LOADING;
this.fetchState = LOADING;
}
function value_96304() { // fn#96304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:580, offset: 0x0215a609, size: 26 bytes, params: 1, frame: 2
const LOADING = env1_2.LOADING;
this.fetchState = LOADING;
}
function value_96305(a0) { // fn#96305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:641, offset: 0x0215a623, size: 58 bytes, params: 2, frame: 10
this.value = a0;
const SUCCESS = env1_2.SUCCESS;
this.fetchState = SUCCESS;
const Date = global.Date;
this.fetchedAt = Date.now();
}
function value_96305(a0) { // fn#96305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:641, offset: 0x0215a623, size: 58 bytes, params: 2, frame: 10
this.value = a0;
const SUCCESS = env1_2.SUCCESS;
this.fetchState = SUCCESS;
const Date = global.Date;
this.fetchedAt = Date.now();
}
function value_96306() { // fn#96306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:742, offset: 0x0215a65d, size: 26 bytes, params: 1, frame: 2
const ERROR = env1_2.ERROR;
this.fetchState = ERROR;
}
function value_96306() { // fn#96306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:742, offset: 0x0215a65d, size: 26 bytes, params: 1, frame: 2
const ERROR = env1_2.ERROR;
this.fetchState = ERROR;
}
function value_96307() { // fn#96307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:798, offset: 0x0215a677, size: 40 bytes, params: 1, frame: 3
this.value = null;
const IDLE = env1_2.IDLE;
this.fetchState = IDLE;
this.fetchedAt = null;
}
function value_96307() { // fn#96307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:798, offset: 0x0215a677, size: 40 bytes, params: 1, frame: 3
this.value = null;
const IDLE = env1_2.IDLE;
this.fetchState = IDLE;
this.fetchedAt = null;
}
function value_96313() { // fn#96313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1253, offset: 0x0215a70d, size: 67 bytes, params: 1, frame: 11
const fetchState = this.fetchState;
const value = environment.__proto__;
const LOADING = env1_2.LOADING;
return fetchState !== LOADING && (this.fetchState === env1_2.IDLE || this.isExpired());
}
function value_96313() { // fn#96313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1253, offset: 0x0215a70d, size: 67 bytes, params: 1, frame: 11
const fetchState = this.fetchState;
const value = environment.__proto__;
const LOADING = env1_2.LOADING;
return fetchState !== LOADING && (this.fetchState === env1_2.IDLE || this.isExpired());
}
function value_96314() { // fn#96314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1370, offset: 0x0215a750, size: 28 bytes, params: 1, frame: 2
const fetchState = this.fetchState;
const LOADING = env1_2.LOADING;
return fetchState === LOADING;
}
function value_96314() { // fn#96314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1370, offset: 0x0215a750, size: 28 bytes, params: 1, frame: 2
const fetchState = this.fetchState;
const LOADING = env1_2.LOADING;
return fetchState === LOADING;
}
function value_96315() { // fn#96315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1439, offset: 0x0215a76c, size: 44 bytes, params: 1, frame: 10
const fetchState = this.fetchState;
const value = environment.__proto__;
const SUCCESS = env1_2.SUCCESS;
return fetchState === SUCCESS && !this.isExpired();
}
function value_96315() { // fn#96315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1439, offset: 0x0215a76c, size: 44 bytes, params: 1, frame: 10
const fetchState = this.fetchState;
const value = environment.__proto__;
const SUCCESS = env1_2.SUCCESS;
return fetchState === SUCCESS && !this.isExpired();
}
function value_96316() { // fn#96316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1527, offset: 0x0215a798, size: 28 bytes, params: 1, frame: 2
const fetchState = this.fetchState;
const ERROR = env1_2.ERROR;
return fetchState === ERROR;
}
function value_96316() { // fn#96316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1527, offset: 0x0215a798, size: 28 bytes, params: 1, frame: 2
const fetchState = this.fetchState;
const ERROR = env1_2.ERROR;
return fetchState === ERROR;
}
function value_96317() { // fn#96317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1596, offset: 0x0215a7b4, size: 141 bytes, params: 1, frame: 11
var isExpired2;
var binding;
const fetchState = this.fetchState;
const IDLE = env1_2.IDLE;
if (IDLE === fetchState) {
return env1_3.IDLE;
}
const LOADING = env1_2.LOADING;
if (LOADING === fetchState) {
return env1_3.LOADING;
}
const ERROR = env1_2.ERROR;
if (ERROR === fetchState) {
return env1_3.ERROR;
}
const SUCCESS = env1_2.SUCCESS;
if (SUCCESS === fetchState) {
isExpired2 = this.isExpired();
binding = env1_3;
return isExpired2 ? binding.STALE : binding.VALID;
}
}
function value_96317() { // fn#96317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:1596, offset: 0x0215a7b4, size: 141 bytes, params: 1, frame: 11
var isExpired2;
var binding;
const fetchState = this.fetchState;
const IDLE = env1_2.IDLE;
if (IDLE === fetchState) {
return env1_3.IDLE;
}
const LOADING = env1_2.LOADING;
if (LOADING === fetchState) {
return env1_3.LOADING;
}
const ERROR = env1_2.ERROR;
if (ERROR === fetchState) {
return env1_3.ERROR;
}
const SUCCESS = env1_2.SUCCESS;
if (SUCCESS === fetchState) {
isExpired2 = this.isExpired();
binding = env1_3;
return isExpired2 ? binding.STALE : binding.VALID;
}
}
function value_96320(a0) { // fn#96320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:2021, offset: 0x0215a89c, size: 58 bytes, params: 2, frame: 3
var value;
if (a0 != null) {
value = a0.value;
this.value = value;
this.fetchedAt = a0.fetchedAt;
value = environment.__proto__;
this.fetchState = env1_2.SUCCESS;
}
}
function value_96320(a0) { // fn#96320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12759:2021, offset: 0x0215a89c, size: 58 bytes, params: 2, frame: 3
var value;
if (a0 != null) {
value = a0.value;
this.value = value;
this.fetchedAt = a0.fetchedAt;
value = environment.__proto__;
this.fetchState = env1_2.SUCCESS;
}
}
global.__d(_fun96300, 12569, [6, 7, 2]) /* metro module 12569, dependencies: [6, 7, 2] */;
+74 -69
View File
@@ -1,11 +1,15 @@
/* Metro module 1419; source: lib/PlainRecord.tsx; dependencies: [1420, 44, 1421, 628, 2] */
import PlainRecord from '../external/discord_common/js/packages/libdiscore/js_shim/js/PlainRecord.tsx'; /* Metro dependency 1420 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlainRecordModule from '../external/discord_common/js/packages/libdiscore/js_shim/js/PlainRecord.tsx'; /* Metro dependency 1420 */
function _fun16575(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:6, offset: 0x00e53f8a, size: 238 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = function(a0, a1) {
a1[TypeTag] = a0;
return a1;
};
const closure2 = isValueEqual;
let isValueEqual2 = isValueEqual;
const closure3 = function(a0, a1) {
var r3;
var isValueEqualBinding;
@@ -38,10 +42,9 @@ function _fun16575(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const plainRecord = importDefault(1420) /* metro dependency 1420: PlainRecord */;
const TypeTag = (require(1420) /* metro dependency 1420: PlainRecord */).TypeTag;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/PlainRecord.tsx');
exports.default = plainRecord;
const TypeTag = (PlainRecordModule).TypeTag;
(FileImportTrackerModule).fileFinishedImporting('lib/PlainRecord.tsx');
exports.default = PlainRecord;
exports.TypeTag = TypeTag;
exports.set = function(a0, a1, a2) {
var r0;
@@ -142,29 +145,66 @@ function _fun16575(global, require, importDefault, importAll, module, exports, d
object[TypeTag] = a0;
return object;
};
exports.isValueEqual = closure2;
exports.isValueEqual = isValueEqual2;
exports.isPlainRecordDataEqual = closure3;
}
function isValueEqual(a0, a1) { // fn#16577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:176, offset: 0x00e5408b, size: 300 bytes, params: 3, frame: 16
var r3;
var r0;
var value;
var Array;
if (a0 == null) {
r0 = a0 === a1;
} else if (a1 == null) {
r0 = a0 === a1;
} else {
value = a0 === a1;
if (value) {
r0 = value;
function isValueEqual(a0, a1) { // fn#16577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:176, offset: 0x00e5408b, size: 300 bytes, params: 3, frame: 16
var r3;
var r0;
var value;
var Array;
if (a0 == null) {
r0 = a0 === a1;
} else if (a1 == null) {
r0 = a0 === a1;
} else {
if (a0 instanceof global.Date) {
if (a1 instanceof global.Date) {
value = a0.getTime();
value = value === a1.getTime();
r3 = value;
value = a0 === a1;
if (value) {
r0 = value;
} else {
if (a0 instanceof global.Date) {
if (a1 instanceof global.Date) {
value = a0.getTime();
value = value === a1.getTime();
r3 = value;
} else if (a0 instanceof global.Set) {
if (a1 instanceof global.Set) {
value = require(1421) /* metro dependency 1421: SetUtils */;
value = value.areSetsEqual(a0, a1);
r3 = value;
} else {
Array = global.Array;
if (Array.isArray(a0)) {
Array = global.Array;
if (Array.isArray(a1)) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0, a1);
r3 = value;
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
}
} else {
Array = global.Array;
if (Array.isArray(a0)) {
Array = global.Array;
if (Array.isArray(a1)) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0, a1);
r3 = value;
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
}
} else if (a0 instanceof global.Set) {
if (a1 instanceof global.Set) {
value = require(1421) /* metro dependency 1421: SetUtils */;
@@ -204,52 +244,17 @@ function isValueEqual(a0, a1) { // fn#16577, source: /ci/build/discord/discord/d
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
}
} else if (a0 instanceof global.Set) {
if (a1 instanceof global.Set) {
value = require(1421) /* metro dependency 1421: SetUtils */;
value = value.areSetsEqual(a0, a1);
r3 = value;
} else {
Array = global.Array;
if (Array.isArray(a0)) {
Array = global.Array;
if (Array.isArray(a1)) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0, a1);
r3 = value;
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
}
} else {
Array = global.Array;
if (Array.isArray(a0)) {
Array = global.Array;
if (Array.isArray(a1)) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0, a1);
r3 = value;
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
} else {
r3 = typeof a0 === 'object' && typeof a1 === 'object';
r3 = r3 && (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1);
}
r0 = r3;
}
r0 = r3;
}
return r0;
}
function objectIsPlainRecordOfType(a0, a1) { // fn#16582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:1217, offset: 0x00e5432b, size: 57 bytes, params: 3, frame: 5
return typeof a1 === 'object' && a1 != null && (TypeTag in a1 && a1[TypeTag]) === a0;
}
return r0;
}
function objectIsPlainRecordOfType(a0, a1) { // fn#16582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1546:1217, offset: 0x00e5432b, size: 57 bytes, params: 3, frame: 5
return typeof a1 === 'object' && a1 != null && (TypeTag in a1 && a1[TypeTag]) === a0;
}
global.__d(_fun16575, 1419, [1420, 44, 1421, 628,
2]) /* metro module 1419, dependencies: [1420, 44, 1421, 628, 2] */;
+284 -270
View File
@@ -1,388 +1,393 @@
/* Metro module 4915; source: lib/Platforms.tsx; dependencies: [661, 4916, 696, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 22, 1471, 2] */
import Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import URLUtils from '../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as UserApplicationIdentityConstantsModule from '../modules/user_application_identity/UserApplicationIdentityConstants.tsx'; /* Metro dependency 4916 */
function _fun43433(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:6, offset: 0x01153251, size: 5089 bytes, params: 8, frame: 30
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PlatformTypes = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const ApplicationIdentityConnections = (require(4916) /* metro dependency 4916: UserApplicationIdentityConstants */).ApplicationIdentityConnections;
object2 = {};
const PlatformTypes = (ConstantsModule).PlatformTypes;
const ApplicationIdentityConnections = (UserApplicationIdentityConstantsModule).ApplicationIdentityConnections;
object = {};
const TWITCH = PlatformTypes.TWITCH;
object2.type = TWITCH;
object2.name = 'Twitch';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITCH');
object2.icon = {lightPNG: require(4917) /* metro dependency 4917 */,
object.type = TWITCH;
object.name = 'Twitch';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITCH');
object.icon = {lightPNG: require(4917) /* metro dependency 4917 */,
darkPNG: require(4917) /* metro dependency 4917 */, whitePNG: require(4918) /* metro dependency 4918 */,
lightSVG: require(4919) /* metro dependency 4919 */, darkSVG: require(4919) /* metro dependency 4919 */,
whiteSVG: require(4920) /* metro dependency 4920 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({name}) {
object.enabled = true;
object.getPlatformUserUrl = function({name}) {
return 'https://www.twitch.tv/' + (0, global.encodeURIComponent)(name);
};
object2.domains = ['twitch.tv', 'twitch.com'];
const items2 = [object2];
object2 = {};
object.domains = ['twitch.tv', 'twitch.com'];
const items2 = [object];
object = {};
const YOUTUBE = PlatformTypes.YOUTUBE;
object2.type = YOUTUBE;
object2.name = 'YouTube';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_YOUTUBE');
object2.icon = {lightPNG: require(4921) /* metro dependency 4921 */,
object.type = YOUTUBE;
object.name = 'YouTube';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_YOUTUBE');
object.icon = {lightPNG: require(4921) /* metro dependency 4921 */,
darkPNG: require(4921) /* metro dependency 4921 */, whitePNG: require(4922) /* metro dependency 4922 */,
lightSVG: require(4923) /* metro dependency 4923 */, darkSVG: require(4923) /* metro dependency 4923 */,
whiteSVG: require(4924) /* metro dependency 4924 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({id}) {
object.enabled = true;
object.getPlatformUserUrl = function({id}) {
return 'https://www.youtube.com/channel/' + (0, global.encodeURIComponent)(id);
};
object2.domains = ['youtube.com', 'youtu.be'];
items2[1] = object2;
object2 = {};
object.domains = ['youtube.com', 'youtu.be'];
items2[1] = object;
object = {};
const BATTLENET = PlatformTypes.BATTLENET;
object2.type = BATTLENET;
object2.name = 'Battle.net';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_BATTLENET');
object2.icon = {lightPNG: require(4925) /* metro dependency 4925 */,
object.type = BATTLENET;
object.name = 'Battle.net';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_BATTLENET');
object.icon = {lightPNG: require(4925) /* metro dependency 4925 */,
darkPNG: require(4925) /* metro dependency 4925 */, whitePNG: require(4926) /* metro dependency 4926 */,
lightSVG: require(4927) /* metro dependency 4927 */, darkSVG: require(4927) /* metro dependency 4927 */,
whiteSVG: require(4928) /* metro dependency 4928 */};
object2.enabled = true;
items2[2] = object2;
object2 = {'type': null, 'name': 'Bluesky', 'icon': null, 'enabled': true, 'getPlatformUserUrl': null,
object.enabled = true;
items2[2] = object;
object = {'type': null, 'name': 'Bluesky', 'icon': null, 'enabled': true, 'getPlatformUserUrl': null,
'isFederated': true, 'hasMetadata': true};
const BLUESKY = PlatformTypes.BLUESKY;
object2.type = BLUESKY;
object2.icon = {lightPNG: require(4929) /* metro dependency 4929 */,
object.type = BLUESKY;
object.icon = {lightPNG: require(4929) /* metro dependency 4929 */,
darkPNG: require(4929) /* metro dependency 4929 */, whitePNG: require(4930) /* metro dependency 4930 */,
lightSVG: require(4931) /* metro dependency 4931 */, darkSVG: require(4931) /* metro dependency 4931 */,
whiteSVG: require(4932) /* metro dependency 4932 */};
object2.getPlatformUserUrl = function({id}) {
object.getPlatformUserUrl = function({id}) {
var value = (0, global.encodeURIComponent)(id);
value = value.replaceAll('%3A', ':');
return 'https://bsky.app/profile/' + value;
};
items2[3] = object2;
object2 = {};
items2[3] = object;
object = {};
const BUNGIE = PlatformTypes.BUNGIE;
object2.type = BUNGIE;
object2.name = 'Bungie.net';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_BUNGIE');
object2.icon = {lightPNG: require(4933) /* metro dependency 4933 */,
object.type = BUNGIE;
object.name = 'Bungie.net';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_BUNGIE');
object.icon = {lightPNG: require(4933) /* metro dependency 4933 */,
darkPNG: require(4934) /* metro dependency 4934 */, whitePNG: require(4935) /* metro dependency 4935 */,
lightSVG: require(4936) /* metro dependency 4936 */, darkSVG: require(4937) /* metro dependency 4937 */,
whiteSVG: require(4938) /* metro dependency 4938 */};
object2.enabled = true;
items2[4] = object2;
object2 = {};
object.enabled = true;
items2[4] = object;
object = {};
const SKYPE = PlatformTypes.SKYPE;
object2.type = SKYPE;
object2.name = 'Skype';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SKYPE');
object2.icon = {lightPNG: require(4939) /* metro dependency 4939 */,
object.type = SKYPE;
object.name = 'Skype';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SKYPE');
object.icon = {lightPNG: require(4939) /* metro dependency 4939 */,
darkPNG: require(4939) /* metro dependency 4939 */, whitePNG: require(4940) /* metro dependency 4940 */,
lightSVG: require(4941) /* metro dependency 4941 */, darkSVG: require(4941) /* metro dependency 4941 */,
whiteSVG: require(4942) /* metro dependency 4942 */};
object2.enabled = false;
object2.getPlatformUserUrl = function({id}) {
object.enabled = false;
object.getPlatformUserUrl = function({id}) {
return 'skype:' + (0, global.encodeURIComponent)(id) + '?userinfo';
};
items2[5] = object2;
object2 = {};
items2[5] = object;
object = {};
const LEAGUE_OF_LEGENDS = PlatformTypes.LEAGUE_OF_LEGENDS;
object2.type = LEAGUE_OF_LEGENDS;
object2.name = 'League of Legends';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_LOL');
object2.icon = {lightPNG: require(4943) /* metro dependency 4943 */,
object.type = LEAGUE_OF_LEGENDS;
object.name = 'League of Legends';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_LOL');
object.icon = {lightPNG: require(4943) /* metro dependency 4943 */,
darkPNG: require(4943) /* metro dependency 4943 */, whitePNG: require(4944) /* metro dependency 4944 */,
lightSVG: require(4945) /* metro dependency 4945 */, darkSVG: require(4945) /* metro dependency 4945 */,
whiteSVG: require(4946) /* metro dependency 4946 */};
object2.enabled = true;
object.enabled = true;
let RIOT_GAMES = ApplicationIdentityConnections.RIOT_GAMES;
object2.replacedBy = RIOT_GAMES;
items2[6] = object2;
object2 = {};
object.replacedBy = RIOT_GAMES;
items2[6] = object;
object = {};
const STEAM = PlatformTypes.STEAM;
object2.type = STEAM;
object2.name = 'Steam';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_STEAM');
object2.icon = {lightPNG: require(4947) /* metro dependency 4947 */,
object.type = STEAM;
object.name = 'Steam';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_STEAM');
object.icon = {lightPNG: require(4947) /* metro dependency 4947 */,
darkPNG: require(4948) /* metro dependency 4948 */, whitePNG: require(4948) /* metro dependency 4948 */,
lightSVG: require(4949) /* metro dependency 4949 */, darkSVG: require(4950) /* metro dependency 4950 */,
whiteSVG: require(4950) /* metro dependency 4950 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({id}) {
object.enabled = true;
object.getPlatformUserUrl = function({id}) {
return 'https://steamcommunity.com/profiles/' + (0, global.encodeURIComponent)(id);
};
object2.hasMetadata = true;
items2[7] = object2;
object2 = {};
object.hasMetadata = true;
items2[7] = object;
object = {};
const REDDIT = PlatformTypes.REDDIT;
object2.type = REDDIT;
object2.name = 'Reddit';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_REDDIT');
object2.icon = {lightPNG: require(4951) /* metro dependency 4951 */,
object.type = REDDIT;
object.name = 'Reddit';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_REDDIT');
object.icon = {lightPNG: require(4951) /* metro dependency 4951 */,
darkPNG: require(4951) /* metro dependency 4951 */, whitePNG: require(4952) /* metro dependency 4952 */,
lightSVG: require(4953) /* metro dependency 4953 */, darkSVG: require(4953) /* metro dependency 4953 */,
whiteSVG: require(4954) /* metro dependency 4954 */};
object2.enabled = true;
object2.domains = ['reddit.com'];
object2.getPlatformUserUrl = function({name}) {
object.enabled = true;
object.domains = ['reddit.com'];
object.getPlatformUserUrl = function({name}) {
return 'https://www.reddit.com/u/' + (0, global.encodeURIComponent)(name);
};
object2.hasMetadata = true;
items2[8] = object2;
object2 = {};
object.hasMetadata = true;
items2[8] = object;
object = {};
const FACEBOOK = PlatformTypes.FACEBOOK;
object2.type = FACEBOOK;
object2.name = 'Facebook';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_FACEBOOK');
object2.icon = {lightPNG: require(4955) /* metro dependency 4955 */,
object.type = FACEBOOK;
object.name = 'Facebook';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_FACEBOOK');
object.icon = {lightPNG: require(4955) /* metro dependency 4955 */,
darkPNG: require(4955) /* metro dependency 4955 */, whitePNG: require(4956) /* metro dependency 4956 */,
lightSVG: require(4957) /* metro dependency 4957 */, darkSVG: require(4957) /* metro dependency 4957 */,
whiteSVG: require(4958) /* metro dependency 4958 */};
object2.domains = ['facebook.com'];
object2.enabled = true;
items2[9] = object2;
object2 = {};
object.domains = ['facebook.com'];
object.enabled = true;
items2[9] = object;
object = {};
const TWITTER_LEGACY = PlatformTypes.TWITTER_LEGACY;
object2.type = TWITTER_LEGACY;
object2.name = 'Twitter';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITTER');
object2.icon = {lightPNG: require(4959) /* metro dependency 4959 */,
object.type = TWITTER_LEGACY;
object.name = 'Twitter';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITTER');
object.icon = {lightPNG: require(4959) /* metro dependency 4959 */,
darkPNG: require(4959) /* metro dependency 4959 */, whitePNG: require(4960) /* metro dependency 4960 */,
lightSVG: require(4961) /* metro dependency 4961 */, darkSVG: require(4961) /* metro dependency 4961 */,
whiteSVG: require(4962) /* metro dependency 4962 */};
object2.enabled = false;
object2.getPlatformUserUrl = function({name}) {
object.enabled = false;
object.getPlatformUserUrl = function({name}) {
return 'https://twitter.com/' + (0, global.encodeURIComponent)(name);
};
object2.domains = ['twitter.com'];
object2.hasMetadata = true;
items2[10] = object2;
object2 = {};
object.domains = ['twitter.com'];
object.hasMetadata = true;
items2[10] = object;
object = {};
const TWITTER = PlatformTypes.TWITTER;
object2.type = TWITTER;
object2.name = 'X';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITTER');
object2.icon = {lightPNG: require(4963) /* metro dependency 4963 */,
object.type = TWITTER;
object.name = 'X';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_TWITTER');
object.icon = {lightPNG: require(4963) /* metro dependency 4963 */,
darkPNG: require(4964) /* metro dependency 4964 */, whitePNG: require(4965) /* metro dependency 4965 */,
lightSVG: require(4966) /* metro dependency 4966 */, darkSVG: require(4967) /* metro dependency 4967 */,
whiteSVG: require(4968) /* metro dependency 4968 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({name}) {
object.enabled = true;
object.getPlatformUserUrl = function({name}) {
return 'https://x.com/' + (0, global.encodeURIComponent)(name);
};
object2.domains = ['x.com'];
object2.hasMetadata = true;
items2[11] = object2;
object2 = {};
object.domains = ['x.com'];
object.hasMetadata = true;
items2[11] = object;
object = {};
const SPOTIFY = PlatformTypes.SPOTIFY;
object2.type = SPOTIFY;
object2.name = 'Spotify';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SPOTIFY');
object2.icon = {lightPNG: require(4969) /* metro dependency 4969 */,
object.type = SPOTIFY;
object.name = 'Spotify';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SPOTIFY');
object.icon = {lightPNG: require(4969) /* metro dependency 4969 */,
darkPNG: require(4969) /* metro dependency 4969 */, whitePNG: require(4970) /* metro dependency 4970 */,
lightSVG: require(4971) /* metro dependency 4971 */, darkSVG: require(4971) /* metro dependency 4971 */,
whiteSVG: require(4972) /* metro dependency 4972 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({id}) {
object.enabled = true;
object.getPlatformUserUrl = function({id}) {
return 'https://open.spotify.com/user/' + (0, global.encodeURIComponent)(id);
};
items2[12] = object2;
object2 = {};
items2[12] = object;
object = {};
const XBOX = PlatformTypes.XBOX;
object2.type = XBOX;
object2.name = 'Xbox';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_XBOX');
object2.icon = {lightPNG: require(4973) /* metro dependency 4973 */,
object.type = XBOX;
object.name = 'Xbox';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_XBOX');
object.icon = {lightPNG: require(4973) /* metro dependency 4973 */,
darkPNG: require(4974) /* metro dependency 4974 */, whitePNG: require(4974) /* metro dependency 4974 */,
lightSVG: require(4975) /* metro dependency 4975 */, darkSVG: require(4976) /* metro dependency 4976 */,
whiteSVG: require(4976) /* metro dependency 4976 */, customPNG: require(4977) /* metro dependency 4977 */};
object2.enabled = true;
items2[13] = object2;
object2 = {};
object.enabled = true;
items2[13] = object;
object = {};
const SAMSUNG = PlatformTypes.SAMSUNG;
object2.type = SAMSUNG;
object2.name = 'Samsung Galaxy';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SAMSUNG');
object2.icon = {lightPNG: require(4978) /* metro dependency 4978 */,
object.type = SAMSUNG;
object.name = 'Samsung Galaxy';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_SAMSUNG');
object.icon = {lightPNG: require(4978) /* metro dependency 4978 */,
darkPNG: require(4978) /* metro dependency 4978 */, whitePNG: require(4979) /* metro dependency 4979 */,
lightSVG: require(4980) /* metro dependency 4980 */, darkSVG: require(4980) /* metro dependency 4980 */,
whiteSVG: require(4981) /* metro dependency 4981 */};
object2.enabled = false;
items2[14] = object2;
object2 = {};
object.enabled = false;
items2[14] = object;
object = {};
const GITHUB = PlatformTypes.GITHUB;
object2.type = GITHUB;
object2.name = 'GitHub';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_GITHUB');
object2.icon = {lightPNG: require(4982) /* metro dependency 4982 */,
object.type = GITHUB;
object.name = 'GitHub';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_GITHUB');
object.icon = {lightPNG: require(4982) /* metro dependency 4982 */,
darkPNG: require(4983) /* metro dependency 4983 */, whitePNG: require(4983) /* metro dependency 4983 */,
lightSVG: require(4984) /* metro dependency 4984 */, darkSVG: require(4985) /* metro dependency 4985 */,
whiteSVG: require(4985) /* metro dependency 4985 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({name}) {
object.enabled = true;
object.getPlatformUserUrl = function({name}) {
return 'https://github.com/' + (0, global.encodeURIComponent)(name);
};
object2.domains = ['github.com'];
items2[15] = object2;
object2 = {};
object.domains = ['github.com'];
items2[15] = object;
object = {};
const PLAYSTATION = PlatformTypes.PLAYSTATION;
object2.type = PLAYSTATION;
object2.name = 'PlayStation Network';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_PLAYSTATION');
object2.icon = {lightPNG: require(4986) /* metro dependency 4986 */,
object.type = PLAYSTATION;
object.name = 'PlayStation Network';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_PLAYSTATION');
object.icon = {lightPNG: require(4986) /* metro dependency 4986 */,
darkPNG: require(4987) /* metro dependency 4987 */, whitePNG: require(4987) /* metro dependency 4987 */,
lightSVG: require(4988) /* metro dependency 4988 */, darkSVG: require(4989) /* metro dependency 4989 */,
whiteSVG: require(4989) /* metro dependency 4989 */};
object2.enabled = true;
items2[16] = object2;
object2 = {};
object.enabled = true;
items2[16] = object;
object = {};
const PLAYSTATION_STAGING = PlatformTypes.PLAYSTATION_STAGING;
object2.type = PLAYSTATION_STAGING;
object2.name = 'PlayStation Network (Staging)';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_PLAYSTATION');
object2.icon = {lightPNG: require(4987) /* metro dependency 4987 */,
object.type = PLAYSTATION_STAGING;
object.name = 'PlayStation Network (Staging)';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_PLAYSTATION');
object.icon = {lightPNG: require(4987) /* metro dependency 4987 */,
darkPNG: require(4986) /* metro dependency 4986 */, whitePNG: require(4986) /* metro dependency 4986 */,
lightSVG: require(4989) /* metro dependency 4989 */, darkSVG: require(4988) /* metro dependency 4988 */,
whiteSVG: require(4988) /* metro dependency 4988 */};
object2.enabled = false;
items2[17] = object2;
object2 = {};
object.enabled = false;
items2[17] = object;
object = {};
const EPIC_GAMES = PlatformTypes.EPIC_GAMES;
object2.type = EPIC_GAMES;
object2.name = 'Epic Games';
object2.icon = {lightPNG: require(4990) /* metro dependency 4990 */,
object.type = EPIC_GAMES;
object.name = 'Epic Games';
object.icon = {lightPNG: require(4990) /* metro dependency 4990 */,
darkPNG: require(4991) /* metro dependency 4991 */, whitePNG: require(4991) /* metro dependency 4991 */,
lightSVG: require(4992) /* metro dependency 4992 */, darkSVG: require(4993) /* metro dependency 4993 */,
whiteSVG: require(4993) /* metro dependency 4993 */};
object2.enabled = true;
items2[18] = object2;
object2 = {};
object.enabled = true;
items2[18] = object;
object = {};
RIOT_GAMES = PlatformTypes.RIOT_GAMES;
object2.type = RIOT_GAMES;
object2.name = 'Riot Games';
object2.icon = {lightPNG: require(4994) /* metro dependency 4994 */,
object.type = RIOT_GAMES;
object.name = 'Riot Games';
object.icon = {lightPNG: require(4994) /* metro dependency 4994 */,
darkPNG: require(4994) /* metro dependency 4994 */, whitePNG: require(4995) /* metro dependency 4995 */,
lightSVG: require(4996) /* metro dependency 4996 */, darkSVG: require(4996) /* metro dependency 4996 */,
whiteSVG: require(4997) /* metro dependency 4997 */, blackSVG: require(4998) /* metro dependency 4998 */};
object2.enabled = true;
object.enabled = true;
RIOT_GAMES = ApplicationIdentityConnections.RIOT_GAMES;
object2.replacedBy = RIOT_GAMES;
items2[19] = object2;
object2 = {};
object.replacedBy = RIOT_GAMES;
items2[19] = object;
object = {};
const ROBLOX = PlatformTypes.ROBLOX;
object2.type = ROBLOX;
object2.name = 'Roblox';
object2.icon = {lightPNG: require(4999) /* metro dependency 4999 */,
object.type = ROBLOX;
object.name = 'Roblox';
object.icon = {lightPNG: require(4999) /* metro dependency 4999 */,
darkPNG: require(5000) /* metro dependency 5000 */, whitePNG: require(5001) /* metro dependency 5001 */,
lightSVG: require(5002) /* metro dependency 5002 */, darkSVG: require(5003) /* metro dependency 5003 */,
whiteSVG: require(5004) /* metro dependency 5004 */};
object2.enabled = true;
object2.getPlatformUserUrl = function({id}) {
object.enabled = true;
object.getPlatformUserUrl = function({id}) {
return 'https://roblox.com/users/' + (0, global.encodeURIComponent)(id) + '/profile';
};
items2[20] = object2;
object2 = {'type': null, 'name': 'PayPal', 'icon': null, 'enabled': true, 'hasMetadata': true};
items2[20] = object;
object = {'type': null, 'name': 'PayPal', 'icon': null, 'enabled': true, 'hasMetadata': true};
const PAYPAL = PlatformTypes.PAYPAL;
object2.type = PAYPAL;
object2.icon = {lightPNG: require(5005) /* metro dependency 5005 */,
object.type = PAYPAL;
object.icon = {lightPNG: require(5005) /* metro dependency 5005 */,
darkPNG: require(5005) /* metro dependency 5005 */, whitePNG: require(5006) /* metro dependency 5006 */,
lightSVG: require(5007) /* metro dependency 5007 */, darkSVG: require(5007) /* metro dependency 5007 */,
whiteSVG: require(5008) /* metro dependency 5008 */};
items2[21] = object2;
object2 = {'type': null, 'name': 'eBay', 'icon': null, 'enabled': true, 'hasMetadata': true};
items2[21] = object;
object = {'type': null, 'name': 'eBay', 'icon': null, 'enabled': true, 'hasMetadata': true};
const EBAY = PlatformTypes.EBAY;
object2.type = EBAY;
object2.icon = {lightPNG: require(5009) /* metro dependency 5009 */,
object.type = EBAY;
object.icon = {lightPNG: require(5009) /* metro dependency 5009 */,
darkPNG: require(5009) /* metro dependency 5009 */, whitePNG: require(5010) /* metro dependency 5010 */,
lightSVG: require(5011) /* metro dependency 5011 */, darkSVG: require(5011) /* metro dependency 5011 */,
whiteSVG: require(5012) /* metro dependency 5012 */};
object2.getPlatformUserUrl = function({name}) {
object.getPlatformUserUrl = function({name}) {
return 'https://www.ebay.com/usr/' + (0, global.encodeURIComponent)(name);
};
items2[22] = object2;
object2 = {'type': null, 'name': 'TikTok', 'icon': null, 'enabled': true, 'hasMetadata': true};
items2[22] = object;
object = {'type': null, 'name': 'TikTok', 'icon': null, 'enabled': true, 'hasMetadata': true};
const TIKTOK = PlatformTypes.TIKTOK;
object2.type = TIKTOK;
object2.icon = {lightPNG: require(5013) /* metro dependency 5013 */,
object.type = TIKTOK;
object.icon = {lightPNG: require(5013) /* metro dependency 5013 */,
darkPNG: require(5014) /* metro dependency 5014 */, whitePNG: require(5014) /* metro dependency 5014 */,
lightSVG: require(5015) /* metro dependency 5015 */, darkSVG: require(5016) /* metro dependency 5016 */,
whiteSVG: require(5016) /* metro dependency 5016 */};
object2.domains = ['tiktok.com'];
object2.getPlatformUserUrl = function({name}) {
object.domains = ['tiktok.com'];
object.getPlatformUserUrl = function({name}) {
return 'https://www.tiktok.com/@' + (0, global.encodeURIComponent)(name);
};
items2[23] = object2;
object2 = {};
items2[23] = object;
object = {};
const INSTAGRAM = PlatformTypes.INSTAGRAM;
object2.type = INSTAGRAM;
object2.name = 'Instagram';
object2.icon = {lightPNG: require(5017) /* metro dependency 5017 */,
object.type = INSTAGRAM;
object.name = 'Instagram';
object.icon = {lightPNG: require(5017) /* metro dependency 5017 */,
darkPNG: require(5017) /* metro dependency 5017 */, whitePNG: require(5018) /* metro dependency 5018 */,
lightSVG: require(5019) /* metro dependency 5019 */, darkSVG: require(5019) /* metro dependency 5019 */,
whiteSVG: require(5020) /* metro dependency 5020 */};
object2.enabled = false;
object2.domains = ['instagram.com'];
object2.getPlatformUserUrl = function({name}) {
object.enabled = false;
object.domains = ['instagram.com'];
object.getPlatformUserUrl = function({name}) {
return 'https://www.instagram.com/' + (0, global.encodeURIComponent)(name);
};
items2[24] = object2;
object2 = {'type': null, 'name': 'Mastodon', 'icon': null, 'enabled': false, 'getPlatformUserUrl': null,
items2[24] = object;
object = {'type': null, 'name': 'Mastodon', 'icon': null, 'enabled': false, 'getPlatformUserUrl': null,
'isFederated': true, 'hasMetadata': true};
const MASTODON = PlatformTypes.MASTODON;
object2.type = MASTODON;
object2.icon = {lightPNG: require(5021) /* metro dependency 5021 */,
object.type = MASTODON;
object.icon = {lightPNG: require(5021) /* metro dependency 5021 */,
darkPNG: require(5021) /* metro dependency 5021 */, whitePNG: require(5022) /* metro dependency 5022 */,
lightSVG: require(5023) /* metro dependency 5023 */, darkSVG: require(5023) /* metro dependency 5023 */,
whiteSVG: require(5024) /* metro dependency 5024 */};
object2.getPlatformUserUrl = function(a0) {
object.getPlatformUserUrl = function(a0) {
return a0.id;
};
items2[25] = object2;
object2 = {};
items2[25] = object;
object = {};
const CRUNCHYROLL = PlatformTypes.CRUNCHYROLL;
object2.type = CRUNCHYROLL;
object2.name = 'Crunchyroll';
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_CRUNCHYROLL');
object2.icon = {lightPNG: require(5025) /* metro dependency 5025 */,
object.type = CRUNCHYROLL;
object.name = 'Crunchyroll';
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PLATFORM_CRUNCHYROLL');
object.icon = {lightPNG: require(5025) /* metro dependency 5025 */,
darkPNG: require(5025) /* metro dependency 5025 */, whitePNG: require(5025) /* metro dependency 5025 */,
lightSVG: require(5026) /* metro dependency 5026 */, darkSVG: require(5026) /* metro dependency 5026 */,
whiteSVG: require(5027) /* metro dependency 5027 */};
object2.enabled = true;
items2[26] = object2;
object2 = {};
object.enabled = true;
items2[26] = object;
object = {};
const DOMAIN = PlatformTypes.DOMAIN;
object2.type = DOMAIN;
object2.name = 'Domain';
object2.icon = {lightPNG: require(5028) /* metro dependency 5028 */,
object.type = DOMAIN;
object.name = 'Domain';
object.icon = {lightPNG: require(5028) /* metro dependency 5028 */,
darkPNG: require(5029) /* metro dependency 5029 */, whitePNG: require(5029) /* metro dependency 5029 */,
lightSVG: require(5030) /* metro dependency 5030 */, darkSVG: require(5031) /* metro dependency 5031 */,
whiteSVG: require(5031) /* metro dependency 5031 */};
object2.getPlatformUserUrl = function({id}) {
object.getPlatformUserUrl = function({id}) {
return 'https://' + id + '/';
};
object2.enabled = true;
items2[27] = object2;
object2 = {};
object.enabled = true;
items2[27] = object;
object = {};
const AMAZON_MUSIC = PlatformTypes.AMAZON_MUSIC;
object2.type = AMAZON_MUSIC;
object2.name = 'Amazon Music';
object2.icon = {lightPNG: require(5032) /* metro dependency 5032 */,
object.type = AMAZON_MUSIC;
object.name = 'Amazon Music';
object.icon = {lightPNG: require(5032) /* metro dependency 5032 */,
darkPNG: require(5032) /* metro dependency 5032 */, whitePNG: require(5032) /* metro dependency 5032 */,
lightSVG: require(5033) /* metro dependency 5033 */, darkSVG: require(5033) /* metro dependency 5033 */,
whiteSVG: require(5033) /* metro dependency 5033 */};
object2.enabled = true;
items2[28] = object2;
object2 = {};
object.enabled = true;
items2[28] = object;
object = {};
const META_QUEST_OR_HORIZON = PlatformTypes.META_QUEST_OR_HORIZON;
object2.type = META_QUEST_OR_HORIZON;
object2.name = 'Meta Quest';
object2.icon = {lightPNG: require(5034) /* metro dependency 5034 */,
object.type = META_QUEST_OR_HORIZON;
object.name = 'Meta Quest';
object.icon = {lightPNG: require(5034) /* metro dependency 5034 */,
darkPNG: require(5035) /* metro dependency 5035 */, whitePNG: require(5036) /* metro dependency 5036 */,
lightSVG: require(5037) /* metro dependency 5037 */, darkSVG: require(5038) /* metro dependency 5038 */,
whiteSVG: require(5038) /* metro dependency 5038 */};
object2.enabled = false;
items2[29] = object2;
const env0_3 = (importDefault(22) /* metro dependency 22 */).keyBy(items2, 'type');
object.enabled = false;
items2[29] = object;
const env0_3 = (Module00022).keyBy(items2, 'type');
const env0_4 = {};
items2.forEach(function(a0) {
var env0_0 = a0;
@@ -391,57 +396,66 @@ function _fun43433(global, require, importDefault, importAll, module, exports, d
domains.forEach(_fun43451);
}
});
object2 = {get: get_43452, getByUrl: getByUrl, isSupported: isSupported_43454, map: map_43455, filter: filter,
object = {get: get_43452, getByUrl: getByUrl, isSupported: isSupported_43454, map: map_43455, filter: filter_43456,
find: find_43458};
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Platforms.tsx');
exports.default = object2;
}
(FileImportTrackerModule).fileFinishedImporting('lib/Platforms.tsx');
exports.default = object;
function _fun43450(a0) { // fn#43450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7705, offset: 0x0115490f, size: 40 bytes, params: 2, frame: 11
const env0_0 = a0;
const domains = a0.domains;
if (domains != null) {
domains.forEach(_fun43451);
}
function _fun43451(a0) { // fn#43451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7747, offset: 0x01154937, size: 25 bytes, params: 2, frame: 3
env1_4[a0] = env0_0;
}
function _fun43450(a0) { // fn#43450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7705, offset: 0x0115490f, size: 40 bytes, params: 2, frame: 11
const env0_0 = a0;
const domains = a0.domains;
if (domains != null) {
domains.forEach(_fun43451);
}
}
function get_43452(a0) { // fn#43452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7771, offset: 0x01154950, size: 28 bytes, params: 2, frame: 3
const property = env0_3[a0];
const value = null;
return value != property ? property : value;
}
function getByUrl(a0) { // fn#43453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7814, offset: 0x0115496c, size: 99 bytes, params: 2, frame: 13
var hostname;
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
if (value2 != null) {
hostname = value2.hostname;
return env0_4[hostname.startsWith('www.') ? hostname.slice(4) : hostname];
function get_43452(a0) { // fn#43452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7771, offset: 0x01154950, size: 28 bytes, params: 2, frame: 3
const property = env0_3[a0];
const value = null;
return value != property ? property : value;
}
function getByUrl(a0) { // fn#43453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7814, offset: 0x0115496c, size: 99 bytes, params: 2, frame: 13
var hostname;
const value2 = (URLUtils).toURLSafe(a0);
if (value2 != null) {
hostname = value2.hostname;
return env0_4[hostname.startsWith('www.') ? hostname.slice(4) : hostname];
}
}
function isSupported_43454(a0) { // fn#43454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7946, offset: 0x011549cf, size: 42 bytes, params: 2, frame: 13
const Object = global.Object;
return Object.prototype.hasOwnProperty.call(env0_3, a0);
}
function map_43455(a0) { // fn#43455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7995, offset: 0x011549f9, size: 22 bytes, params: 2, frame: 11
return env0_2.map(a0);
}
function filter_43456(a0) { // fn#43456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:8007, offset: 0x01154a0f, size: 40 bytes, params: 2, frame: 11
const value = env0_2.filter(a0);
value.sort(function({name}, {name}) {
return name.localeCompare(name);
});
return value;
}
function find_43458(a0) { // fn#43458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:8100, offset: 0x01154a54, size: 23 bytes, params: 2, frame: 11
return env0_2.find(a0);
}
}
function isSupported_43454(a0) { // fn#43454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7946, offset: 0x011549cf, size: 42 bytes, params: 2, frame: 13
const Object = global.Object;
return Object.prototype.hasOwnProperty.call(env0_3, a0);
}
function map_43455(a0) { // fn#43455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7995, offset: 0x011549f9, size: 22 bytes, params: 2, frame: 11
return env0_2.map(a0);
}
function filter(a0) { // fn#43456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:8007, offset: 0x01154a0f, size: 40 bytes, params: 2, frame: 11
const value = env0_2.filter(a0);
value.sort(function({name}, {name}) {
return name.localeCompare(name);
});
return value;
}
function find_43458(a0) { // fn#43458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:8100, offset: 0x01154a54, size: 23 bytes, params: 2, frame: 11
return env0_2.find(a0);
}
function _fun43451(a0) { // fn#43451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5093:7747, offset: 0x01154937, size: 25 bytes, params: 2, frame: 3
env1_4[a0] = env0_0;
}
global.__d(_fun43433, 4915, [661, 4916, 696, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928,
4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946,
4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964,
4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982,
4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000,
5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018,
5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036,
5037, 5038, 22, 1471,
2]) /* metro module 4915, dependencies: [661, 4916, 696, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 22, 1471, 2] */;
+376 -365
View File
@@ -1,4 +1,8 @@
/* Metro module 9681; source: lib/QueryTokenizer.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76045(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:6, offset: 0x01dc26e3, size: 219 bytes, params: 8, frame: 18
const fixMatchIndex = function(a0, a1) {
if (a0 == null) {
@@ -11,412 +15,419 @@ function _fun76045(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = RegExp('.+', 'g');
const value = _fun76048();
const value2 = _fun76059();
value.NON_TOKEN_TYPE = 'NON_TOKEN';
value.Token = value2;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/QueryTokenizer.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/QueryTokenizer.tsx');
exports.default = value;
exports.NON_TOKEN_TYPE = 'NON_TOKEN';
exports.QueryTokenizer = value;
exports.Token = value2;
}
function getMatch(a0, a1, a2) { // fn#76046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:141, offset: 0x01dc27be, size: 307 bytes, params: 4, frame: 25
var r8;
var r2;
var r15;
var r1;
var r7;
var r4;
var property;
var fixMatchIndexBinding;
var match;
var regex;
var value4;
var cache;
var value5;
var get;
var value6;
var value7;
var binding;
var prototype;
var value8;
var binding2;
var value10;
var index;
var type;
var value11;
var binding3;
var value13;
var validator;
var value14;
var value15;
var value16;
var has;
var value17;
var set;
if (a1 != null) {
var length = a1.length;
var value = 0;
if (value < length) {
r8 = value;
reducibleLoop2: while (true) {
property = a1[r8];
fixMatchIndexBinding = fixMatchIndex;
match = a0.match;
regex = property.regex;
value4 = fixMatchIndexBinding(Reflect.apply(match, a0, [regex]), a2);
if (value4 != null) {
cache = property.cache;
value5 = cache != null;
reducibleJoin5: while (true) {
if (value5) {
get = cache.get;
value6 = Reflect.apply(get, cache, [value4[value]]);
value7 = value6 != null;
r2 = value7;
r15 = value6;
function getMatch(a0, a1, a2) { // fn#76046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:141, offset: 0x01dc27be, size: 307 bytes, params: 4, frame: 25
var r8;
var r2;
var r15;
var r1;
var r7;
var r4;
var property;
var fixMatchIndexBinding;
var match;
var regex;
var value4;
var cache;
var value5;
var get;
var value6;
var value7;
var binding;
var prototype;
var value8;
var binding2;
var value10;
var index;
var type;
var value11;
var binding3;
var value13;
var validator;
var value14;
var value15;
var value16;
var has;
var value17;
var set;
if (a1 != null) {
var length = a1.length;
var value = 0;
if (value < length) {
r8 = value;
reducibleLoop2: while (true) {
property = a1[r8];
fixMatchIndexBinding = fixMatchIndex;
match = a0.match;
regex = property.regex;
value4 = fixMatchIndexBinding(Reflect.apply(match, a0, [regex]), a2);
if (value4 != null) {
cache = property.cache;
value5 = cache != null;
reducibleJoin5: while (true) {
if (value5) {
get = cache.get;
value6 = Reflect.apply(get, cache, [value4[value]]);
value7 = value6 != null;
r2 = value7;
r15 = value6;
break reducibleJoin5;
}
r2 = value5;
r15 = undefined;
break reducibleJoin5;
}
r2 = value5;
r15 = undefined;
break reducibleJoin5;
}
reducibleJoin7: while (true) {
if (r2) {
binding = env0_3;
prototype = binding.prototype;
value8 = Object.create(prototype, {constructor: {value: binding}});
binding2 = new binding();
value10 = binding2 instanceof Object ? binding2 : value8;
index = value4.index;
value10.start = index;
r1 = value10;
reducibleJoin7: while (true) {
if (r2) {
binding = env0_3;
prototype = binding.prototype;
value8 = Object.create(prototype, {constructor: {value: binding}});
binding2 = new binding();
value10 = binding2 instanceof Object ? binding2 : value8;
index = value4.index;
value10.start = index;
r1 = value10;
break reducibleJoin7;
}
r1 = r15;
break reducibleJoin7;
}
r1 = r15;
break reducibleJoin7;
}
reducibleJoin10: while (true) {
reducibleJoin18: while (true) {
if (r1 != null) {
break reducibleJoin18;
reducibleJoin10: while (true) {
reducibleJoin18: while (true) {
if (r1 != null) {
break reducibleJoin18;
}
binding = env0_3;
type = property.type;
prototype = binding.prototype;
value11 = Object.create(prototype, {constructor: {value: binding}});
binding3 = new binding();
value13 = binding3 instanceof Object ? binding3 : value11;
validator = property.validator;
if (validator == null) {
break reducibleLoop2;
}
validator = property.validator;
if (Reflect.apply(validator, property, [value13])) {
break reducibleLoop2;
}
break reducibleJoin10;
}
binding = env0_3;
type = property.type;
prototype = binding.prototype;
value11 = Object.create(prototype, {constructor: {value: binding}});
binding3 = new binding();
value13 = binding3 instanceof Object ? binding3 : value11;
validator = property.validator;
if (validator == null) {
break reducibleLoop2;
}
validator = property.validator;
if (Reflect.apply(validator, property, [value13])) {
break reducibleLoop2;
}
break reducibleJoin10;
return r1;
}
return r1;
}
value14 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = a1.length;
if (!(value14 < length)) {
return null;
}
r8 = value14;
continue reducibleLoop2;
}
value14 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = a1.length;
if (!(value14 < length)) {
return null;
}
r8 = value14;
continue reducibleLoop2;
}
value15 = cache == null;
reducibleJoin16: while (true) {
if (value15) {
r4 = value15;
break reducibleJoin16;
}
value16 = cache != null;
reducibleJoin15: while (true) {
if (value16) {
has = cache.has;
value17 = Reflect.apply(has, cache, [value4[value]]);
r7 = value17;
value15 = cache == null;
reducibleJoin16: while (true) {
if (value15) {
r4 = value15;
break reducibleJoin16;
}
value16 = cache != null;
reducibleJoin15: while (true) {
if (value16) {
has = cache.has;
value17 = Reflect.apply(has, cache, [value4[value]]);
r7 = value17;
break reducibleJoin15;
}
r7 = value16;
break reducibleJoin15;
}
r7 = value16;
break reducibleJoin15;
r4 = r7;
break reducibleJoin16;
}
r4 = r7;
break reducibleJoin16;
}
reducibleJoin18: while (true) {
if (r4) {
reducibleJoin18: while (true) {
if (r4) {
r1 = value13;
break reducibleJoin18;
}
set = cache.set;
Reflect.apply(set, cache, [value4[value], value13]);
r1 = value13;
break reducibleJoin18;
}
set = cache.set;
Reflect.apply(set, cache, [value4[value], value13]);
r1 = value13;
break reducibleJoin18;
return r1;
}
return r1;
}
return null;
}
return null;
}
function _fun76048() { // fn#76048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:593, offset: 0x01dc2917, size: 161 bytes, params: 1, frame: 15
return env0_1(QueryTokenizer, [{key: 'reset', value: function() {
this._rules = [];
this._followers = {};
this._nonTokenType = 'NON_TOKEN';
}}, {key: 'addRule', value: value_76052}, {key: 'tokenize', value: value_76054}, {key: 'clearCache',
value: function() {
var propertyName;
var property2;
this._rules.forEach(_fun76056);
for (propertyName in this._followers) {
property2 = this._followers[propertyName];
property2.forEach(_fun76057);
function _fun76048() { // fn#76048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:593, offset: 0x01dc2917, size: 161 bytes, params: 1, frame: 15
return CreateClass(QueryTokenizer, [{key: 'reset', value: function() {
this._rules = [];
this._followers = {};
this._nonTokenType = 'NON_TOKEN';
}}, {key: 'addRule', value: value_76052}, {key: 'tokenize', value: value_76054}, {key: 'clearCache',
value: function() {
var propertyName;
var property2;
this._rules.forEach(_fun76056);
for (propertyName in this._followers) {
property2 = this._followers[propertyName];
property2.forEach(_fun76057);
}
}}, {key: '_getMatch', value: value_76058}]);
function QueryTokenizer() { // fn#76049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:614, offset: 0x01dc29b8, size: 101 bytes, params: 1, frame: 15
var environment;
let value = a0;
const r3 = value !== undefined ? value : [];
value = environment.__proto__;
env1_0(this, QueryTokenizer);
this._rules = [];
this._followers = {};
this._nonTokenType = 'NON_TOKEN';
this.reset();
r3.forEach(_fun76050);
function _fun76050(a0) { // fn#76050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:746, offset: 0x01dc2a1d, size: 23 bytes, params: 2, frame: 11
return ClassCallCheck.addRule(a0);
}
}
}}, {key: '_getMatch', value: value_76058}]);
}
function _fun76059() { // fn#76059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:2027, offset: 0x01dc2dfe, size: 209 bytes, params: 1, frame: 15
return env0_1(Token, [{key: 'end', get: function() {
return this.start + this.length;
}}, {key: 'length', get: function() {
return this.match[0].length;
}}, {key: 'valueOf', value: function() {
return this.match[0];
}}, {key: 'getFullMatch', value: function() {
return this.match[0];
}}, {key: 'getMatch', value: function() {
var value = a0;
return this.match[value !== undefined ? value : 0];
}}, {key: 'setData', value: function(a0, a1) {
if (this._data == null) {
this._data = new global.Map();
}
this._data.set(a0, a1);
}}, {key: 'getData', value: function(a0) {
if (this._data != null) {
return this._data.get(a0);
}
}}]);
}
function QueryTokenizer() { // fn#76049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:614, offset: 0x01dc29b8, size: 101 bytes, params: 1, frame: 15
var environment;
let value = a0;
const r3 = value !== undefined ? value : [];
value = environment.__proto__;
env1_0(this, QueryTokenizer);
this._rules = [];
this._followers = {};
this._nonTokenType = 'NON_TOKEN';
this.reset();
r3.forEach(_fun76050);
}
function value_76052({type, follows, validator, regex}) { // fn#76052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:878, offset: 0x01dc2a59, size: 247 bytes, params: 2, frame: 20
var r6;
var map;
var _rules;
const r9 = regex.source.charAt(0) === '^' ? regex : new global.RegExp('^' + regex.source);
value = undefined;
if (validator != null) {
map = new global.Map();
} else {
r6 = value;
}
if (follows != null) {
follows.forEach(_fun76053);
} else {
_rules = this._rules;
_rules.push({regex: r9, type: type, validator: validator, cache: r6});
}
return value;
}
function value_76054(a0) { // fn#76054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1244, offset: 0x01dc2bbd, size: 345 bytes, params: 2, frame: 33
var r8;
var r10;
var r11;
var r14;
var r5;
var r15;
var r16;
var r6;
var r9;
var _getMatch;
var substring;
var value6;
var value7;
var value8;
var push;
var binding;
var fixMatchIndexBinding;
var match;
var value9;
var _nonTokenType;
var prototype;
var value10;
var binding2;
var value12;
var length2;
var value13;
var value14;
let value = a0;
const items2 = [];
let length = value.length;
const value2 = 0;
const value3 = undefined;
const value4 = '';
if (length > value2) {
r8 = value2;
r10 = value4;
r11 = value3;
r14 = value;
while (true) {
_getMatch = this._getMatch;
length = r10.length;
value = Reflect.apply(_getMatch, this, [r14, r11, r8 + length]);
if (value != null) {
value7 = r10 != null;
if (!value7) {
r5 = value7;
continue;
function value_76052({type, follows, validator, regex}) { // fn#76052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:878, offset: 0x01dc2a59, size: 247 bytes, params: 2, frame: 20
var r6;
var map;
var _rules;
const r9 = regex.source.charAt(0) === '^' ? regex : new global.RegExp('^' + regex.source);
value = undefined;
if (validator != null) {
map = new global.Map();
} else {
r6 = value;
}
if (follows != null) {
follows.forEach(_fun76053);
} else {
_rules = this._rules;
_rules.push({regex: r9, type: type, validator: validator, cache: r6});
}
return value;
function _fun76053(a0) { // fn#76053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1046, offset: 0x01dc2b50, size: 109 bytes, params: 2, frame: 13
if (ClassCallCheck._followers[a0] == null) {
ClassCallCheck._followers[a0] = [];
}
value8 = value4 !== r10;
r5 = value8;
if (!r5) {
continue;
ClassCallCheck._followers[a0].push({regex: regex, type: type, validator: validator, cache: CreateClass});
}
}
function value_76054(a0) { // fn#76054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1244, offset: 0x01dc2bbd, size: 345 bytes, params: 2, frame: 33
var r8;
var r10;
var r11;
var r14;
var r5;
var r15;
var r16;
var r6;
var r9;
var _getMatch;
var substring;
var value6;
var value7;
var value8;
var push;
var binding;
var fixMatchIndexBinding;
var match;
var value9;
var _nonTokenType;
var prototype;
var value10;
var binding2;
var value12;
var length2;
var value13;
var value14;
let value = a0;
const items2 = [];
let length = value.length;
const value2 = 0;
const value3 = undefined;
const value4 = '';
if (length > value2) {
r8 = value2;
r10 = value4;
r11 = value3;
r14 = value;
while (true) {
_getMatch = this._getMatch;
length = r10.length;
value = Reflect.apply(_getMatch, this, [r14, r11, r8 + length]);
if (value != null) {
value7 = r10 != null;
if (!value7) {
r5 = value7;
continue;
}
value8 = value4 !== r10;
r5 = value8;
if (!r5) {
continue;
}
push = items2.push;
binding = env1_3;
fixMatchIndexBinding = fixMatchIndex;
match = r10.match;
value9 = fixMatchIndexBinding(Reflect.apply(match, r10, [env1_2]), r8);
_nonTokenType = this._nonTokenType;
prototype = binding.prototype;
value10 = Object.create(prototype, {constructor: {value: binding}});
binding2 = new binding();
value12 = binding2 instanceof Object ? binding2 : value10;
Reflect.apply(push, items2, [value12]);
items2.push(value);
length = value.length;
length2 = r10.length;
value13 = r8 + (length + length2);
substring = r14.substring;
length = value.length;
value14 = Reflect.apply(substring, r14, [length]);
r11 = value;
r14 = value14;
r15 = value13;
r16 = value4;
} else {
value = r10 + r14[value2];
value6 = r14.substring(1);
r14 = value6;
r15 = r8;
r16 = value;
}
length = r14.length;
if (length > value2) {
r8 = r15;
r10 = r16;
continue;
}
r6 = r15;
r9 = r16;
break;
}
} else {
r6 = value2;
r9 = value4;
}
if (r9 != null && value4 !== r9) {
push = items2.push;
binding = env1_3;
fixMatchIndexBinding = fixMatchIndex;
match = r10.match;
value9 = fixMatchIndexBinding(Reflect.apply(match, r10, [env1_2]), r8);
value = fixMatchIndex(r9.match(env1_2), r6);
_nonTokenType = this._nonTokenType;
prototype = binding.prototype;
value10 = Object.create(prototype, {constructor: {value: binding}});
binding2 = new binding();
value12 = binding2 instanceof Object ? binding2 : value10;
Reflect.apply(push, items2, [value12]);
items2.push(value);
length = value.length;
length2 = r10.length;
value13 = r8 + (length + length2);
substring = r14.substring;
length = value.length;
value14 = Reflect.apply(substring, r14, [length]);
r11 = value;
r14 = value14;
r15 = value13;
r16 = value4;
value = new binding(value);
Reflect.apply(push, items2, [value]);
}
return items2;
}
function value_76055() { // fn#76055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1628, offset: 0x01dc2d16, size: 87 bytes, params: 1, frame: 18
var propertyName;
var _followers2;
var property;
this._rules.forEach(function({cache}) {
return cache?.clear();
});
for (propertyName in this._followers) {
_followers2 = this._followers;
property = _followers2[propertyName];
property.forEach(function({cache}) {
return cache?.clear();
});
}
}
function value_76058(a0, a1, a2) { // fn#76058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1854, offset: 0x01dc2d8d, size: 113 bytes, params: 4, frame: 20
let value = null;
const type = value != a1 ? a1.type : value;
const value2 = undefined;
let r0 = (value == a1 ? value2 : a1.end) !== a2 ? value2 : getMatch(a0, this._followers[global.String(type)], a2);
if (value == r0) {
value = environment.__proto__;
value = getMatch(a0, this._rules, a2);
r0 = value;
}
return r0;
}
}
function _fun76059() { // fn#76059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:2027, offset: 0x01dc2dfe, size: 209 bytes, params: 1, frame: 15
return CreateClass(Token, [{key: 'end', get: function() {
return this.start + this.length;
}}, {key: 'length', get: function() {
return this.match[0].length;
}}, {key: 'valueOf', value: function() {
return this.match[0];
}}, {key: 'getFullMatch', value: function() {
return this.match[0];
}}, {key: 'getMatch', value: function() {
var value = a0;
return this.match[value !== undefined ? value : 0];
}}, {key: 'setData', value: function(a0, a1) {
if (this._data == null) {
this._data = new global.Map();
}
this._data.set(a0, a1);
}}, {key: 'getData', value: function(a0) {
if (this._data != null) {
return this._data.get(a0);
}
}}]);
function Token(a0, a1) { // fn#76060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:2048, offset: 0x01dc2ecf, size: 215 bytes, params: 3, frame: 19
var items2;
var match;
let value = environment.__proto__;
env1_0(this, Token);
if (a0 instanceof Token) {
match = a0.match;
items2 = [];
arraySpread(items2, match, 0, undefined);
this.match = items2;
this.start = a0.start;
this.type = a0.type;
if (a0._data != null) {
this._data = a0._data;
}
} else if (a0 != null) {
items2 = [];
value = 0;
arraySpread(items2, a0, value, undefined);
this.match = items2;
this.start = typeof a0 === 'string' ? value : a0.index ?? value;
this.type = a1;
} else {
value = r10 + r14[value2];
value6 = r14.substring(1);
r14 = value6;
r15 = r8;
r16 = value;
this.match = [];
this.start = 0;
this.type = a1;
}
length = r14.length;
if (length > value2) {
r8 = r15;
r10 = r16;
continue;
}
r6 = r15;
r9 = r16;
break;
}
} else {
r6 = value2;
r9 = value4;
}
if (r9 != null && value4 !== r9) {
push = items2.push;
binding = env1_3;
value = fixMatchIndex(r9.match(env1_2), r6);
_nonTokenType = this._nonTokenType;
value = new binding(value);
Reflect.apply(push, items2, [value]);
}
return items2;
}
function value_76055() { // fn#76055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1628, offset: 0x01dc2d16, size: 87 bytes, params: 1, frame: 18
var propertyName;
var _followers2;
var property;
this._rules.forEach(function({cache}) {
return cache?.clear();
});
for (propertyName in this._followers) {
_followers2 = this._followers;
property = _followers2[propertyName];
property.forEach(function({cache}) {
return cache?.clear();
});
}
function _fun76056({cache}) { // fn#76056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1673, offset: 0x01dc2d6d, size: 32 bytes, params: 2, frame: 10
return cache?.clear();
}
function value_76058(a0, a1, a2) { // fn#76058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1854, offset: 0x01dc2d8d, size: 113 bytes, params: 4, frame: 20
let value = null;
const type = value != a1 ? a1.type : value;
const value2 = undefined;
let r0 = (value == a1 ? value2 : a1.end) !== a2 ? value2 : getMatch(a0, this._followers[global.String(type)], a2);
if (value == r0) {
value = environment.__proto__;
value = getMatch(a0, this._rules, a2);
r0 = value;
}
return r0;
}
function Token(a0, a1) { // fn#76060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:2048, offset: 0x01dc2ecf, size: 215 bytes, params: 3, frame: 19
var items2;
var match;
let value = environment.__proto__;
env1_0(this, Token);
if (a0 instanceof Token) {
match = a0.match;
items2 = [];
arraySpread(items2, match, 0, undefined);
this.match = items2;
this.start = a0.start;
this.type = a0.type;
if (a0._data != null) {
this._data = a0._data;
}
} else if (a0 != null) {
items2 = [];
value = 0;
arraySpread(items2, a0, value, undefined);
this.match = items2;
this.start = typeof a0 === 'string' ? value : a0.index ?? value;
this.type = a1;
} else {
this.match = [];
this.start = 0;
this.type = a1;
}
}
function _fun76050(a0) { // fn#76050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:746, offset: 0x01dc2a1d, size: 23 bytes, params: 2, frame: 11
return env0_0.addRule(a0);
}
function _fun76053(a0) { // fn#76053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1046, offset: 0x01dc2b50, size: 109 bytes, params: 2, frame: 13
if (env0_0._followers[a0] == null) {
env0_0._followers[a0] = [];
}
env0_0._followers[a0].push({regex: regex, type: type, validator: validator, cache: env0_1});
function _fun76057({cache}) { // fn#76057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9867:1773, offset: 0x01dc2d6d, size: 32 bytes, params: 2, frame: 10
return cache?.clear();
}
global.__d(_fun76045, 9681, [6, 7, 2]) /* metro module 9681, dependencies: [6, 7, 2] */;
+179 -170
View File
@@ -1,4 +1,9 @@
/* Metro module 4883; source: lib/RTCBandwidthMonitor.tsx; dependencies: [6, 7, 22, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun42790(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:6, offset: 0x01142287, size: 169 bytes, params: 8, frame: 18
const _arrayLikeToArray_42793 = function(a0, a1) {
var r0;
@@ -45,198 +50,202 @@ function _fun42790(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = [];
let value = _fun42794();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCBandwidthMonitor.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/RTCBandwidthMonitor.tsx');
exports.default = value;
exports.getRTCTotalBytes = getRTCTotalBytes;
}
function _createForOfIteratorHelperLoose_42791(a0, a1) { // fn#42791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:120, offset: 0x01142330, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_42791(a0, a1) { // fn#42791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:120, offset: 0x01142330, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun42792;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_42793(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun42792;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_42793(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_42793(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_42793(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun42792;
}
return _fun42792;
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun42792() { // fn#42792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:691, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun42794() { // fn#42794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1041, offset: 0x011424a2, size: 85 bytes, params: 1, frame: 16
return env0_3(RTCBandwidthMonitor, [{key: 'getTotalBytes', value: value_42797}], [{key: 'create',
value: value_42798}]);
}
function getRTCTotalBytes() { // fn#42799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1848, offset: 0x011426fe, size: 59 bytes, params: 1, frame: 13
const defaultImport = importDefault(22) /* metro dependency 22 */;
const sum = defaultImport.sum;
const binding = env0_4;
return Reflect.apply(sum, defaultImport, [binding.map(function(a0) {
return a0.getTotalBytes();
})]);
}
function RTCBandwidthMonitor() { // fn#42795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1052, offset: 0x011424f7, size: 52 bytes, params: 1, frame: 14
env1_2(this, RTCBandwidthMonitor);
this.bytes = {};
this.record = record_42796;
}
function value_42797() { // fn#42797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1598, offset: 0x01142689, size: 65 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
const sum = value.sum;
const Object = global.Object;
return Reflect.apply(sum, value, [Object.values(this.bytes)]);
}
function value_42798() { // fn#42798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1679, offset: 0x011426ca, size: 52 bytes, params: 1, frame: 11
const rTCBandwidthMonitor = new RTCBandwidthMonitor();
env1_4.push(rTCBandwidthMonitor);
return rTCBandwidthMonitor.record;
}
function RTCBandwidthMonitorRecord(a0) { // fn#42796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1137, owner: RTCBandwidthMonitor.record, offset: 0x0114252b, size: 350 bytes, params: 2, frame: 31
var r16;
var r3;
var r1;
var rtp;
var inbound;
var value;
var propertyName;
var propertyName2;
var _createForOfIteratorHelperLoose_42791Binding;
var inbound2;
var value3;
var value4;
var done;
var value5;
var type;
var value6;
var bytes;
var bytesReceived;
var value7;
var value8;
var value9;
var value10;
var bytesSent;
var value11;
if (a0 != null) {
rtp = a0.rtp;
inbound = rtp.inbound;
value = environment.__proto__.__proto__;
for (propertyName in inbound) {
_createForOfIteratorHelperLoose_42791Binding = _createForOfIteratorHelperLoose_42791;
rtp = a0.rtp;
inbound2 = rtp.inbound;
value3 = _createForOfIteratorHelperLoose_42791Binding(inbound2[propertyName]);
value4 = value3();
done = value4.done;
if (done) {
r16 = propertyName2;
continue;
}
r3 = value4;
while (true) {
value5 = r3.value;
type = value5.type;
value6 = 'inbound-' + propertyName + '-' + type;
bytes = env0_0.bytes;
if (!(value6 in bytes)) {
env0_0.bytes[value6] = 0;
function _fun42794() { // fn#42794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1041, offset: 0x011424a2, size: 85 bytes, params: 1, frame: 16
return CreateClass(RTCBandwidthMonitor, [{key: 'getTotalBytes', value: value_42797}], [{key: 'create',
value: value_42798}]);
function RTCBandwidthMonitor() { // fn#42795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1052, offset: 0x011424f7, size: 52 bytes, params: 1, frame: 14
env1_2(this, RTCBandwidthMonitor);
this.bytes = {};
this.record = record_42796;
function RTCBandwidthMonitorRecord(a0) { // fn#42796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1137, owner: RTCBandwidthMonitor.record, offset: 0x0114252b, size: 350 bytes, params: 2, frame: 31
var r16;
var r3;
var r1;
var rtp;
var inbound;
var value;
var propertyName;
var propertyName2;
var _createForOfIteratorHelperLoose_42791Binding;
var inbound2;
var value3;
var value4;
var done;
var value5;
var type;
var value6;
var bytes;
var bytesReceived;
var value7;
var value8;
var value9;
var value10;
var bytesSent;
var value11;
if (a0 != null) {
rtp = a0.rtp;
inbound = rtp.inbound;
value = environment.__proto__.__proto__;
for (propertyName in inbound) {
_createForOfIteratorHelperLoose_42791Binding = _createForOfIteratorHelperLoose_42791;
rtp = a0.rtp;
inbound2 = rtp.inbound;
value3 = _createForOfIteratorHelperLoose_42791Binding(inbound2[propertyName]);
value4 = value3();
done = value4.done;
if (done) {
r16 = propertyName2;
continue;
}
r3 = value4;
while (true) {
value5 = r3.value;
type = value5.type;
value6 = 'inbound-' + propertyName + '-' + type;
bytes = env0_0.bytes;
if (!(value6 in bytes)) {
env0_0.bytes[value6] = 0;
}
bytes = env0_0.bytes;
bytesReceived = value5.bytesReceived;
bytes[value6] = bytesReceived;
value7 = value3();
done = value7.done;
if (done) {
r16 = propertyName2;
break;
}
r3 = value7;
continue;
}
}
_createForOfIteratorHelperLoose_42791Binding = _createForOfIteratorHelperLoose_42791;
rtp = a0.rtp;
value = _createForOfIteratorHelperLoose_42791Binding(rtp.outbound);
value8 = value();
done = value8.done;
if (!done) {
r1 = value8;
while (true) {
value9 = r1.value;
type = value9.type;
value10 = 'outbound-' + type;
bytes = env0_0.bytes;
if (!(value10 in bytes)) {
env0_0.bytes[value10] = 0;
}
bytes = env0_0.bytes;
bytesSent = value9.bytesSent;
bytes[value10] = bytesSent;
value11 = value();
done = value11.done;
if (done) {
break;
}
r1 = value11;
continue;
}
}
}
bytes = env0_0.bytes;
bytesReceived = value5.bytesReceived;
bytes[value6] = bytesReceived;
value7 = value3();
done = value7.done;
if (done) {
r16 = propertyName2;
break;
}
r3 = value7;
continue;
}
}
_createForOfIteratorHelperLoose_42791Binding = _createForOfIteratorHelperLoose_42791;
rtp = a0.rtp;
value = _createForOfIteratorHelperLoose_42791Binding(rtp.outbound);
value8 = value();
done = value8.done;
if (!done) {
r1 = value8;
while (true) {
value9 = r1.value;
type = value9.type;
value10 = 'outbound-' + type;
bytes = env0_0.bytes;
if (!(value10 in bytes)) {
env0_0.bytes[value10] = 0;
}
bytes = env0_0.bytes;
bytesSent = value9.bytesSent;
bytes[value10] = bytesSent;
value11 = value();
done = value11.done;
if (done) {
break;
}
r1 = value11;
continue;
}
function value_42797() { // fn#42797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1598, offset: 0x01142689, size: 65 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
const sum = value.sum;
const Object = global.Object;
return Reflect.apply(sum, value, [Object.values(this.bytes)]);
}
function value_42798() { // fn#42798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1679, offset: 0x011426ca, size: 52 bytes, params: 1, frame: 11
const rTCBandwidthMonitor = new RTCBandwidthMonitor();
env1_4.push(rTCBandwidthMonitor);
return rTCBandwidthMonitor.record;
}
}
function getRTCTotalBytes() { // fn#42799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5061:1848, offset: 0x011426fe, size: 59 bytes, params: 1, frame: 13
const defaultImport = Module00022;
const sum = defaultImport.sum;
const binding = env0_4;
return Reflect.apply(sum, defaultImport, [binding.map(function(a0) {
return a0.getTotalBytes();
})]);
}
}
global.__d(_fun42790, 4883, [6, 7, 22, 2]) /* metro module 4883, dependencies: [6, 7, 22, 2] */;
+4123 -4046
View File
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,8 +1,10 @@
/* Metro module 4405; source: lib/RTCConnectionEvent.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun37439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4577:6, offset: 0x010a529e, size: 224 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCConnectionEvent.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/RTCConnectionEvent.tsx');
exports.RTCConnectionEvent = {State: 'state', Speaking: 'speaking',
VideoSourceQualityChanged: 'video-source-quality-changed', Video: 'video', Flags: 'flags', Platform: 'platform',
Ping: 'ping', ClientConnect: 'client-connect', ClientDisconnect: 'client-disconnect',
@@ -10,3 +12,4 @@ function _fun37439(global, require, importDefault, importAll, module, exports, d
RosterMapUpdate: 'roster-map-update', UsersMerged: 'users-merged'};
}
global.__d(_fun37439, 4405, [2]) /* metro module 4405, dependencies: [2] */;
+107 -102
View File
@@ -1,114 +1,119 @@
/* Metro module 12387; source: lib/RTCConnectionStats.tsx; dependencies: [6, 7, 661, 4303, 22, 12388, 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 Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun94355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:6, offset: 0x02114f1f, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
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 env0_5 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
const value = _fun94356();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/RTCConnectionStats.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/RTCConnectionStats.tsx');
exports.StateHistory = value;
}
function _fun94356() { // fn#94356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:149, offset: 0x02114fbf, size: 138 bytes, params: 1, frame: 15
return env0_4(StateHistory, [{key: 'reset', value: function(a0) {
this.current = null;
this.history = [];
if (a0 != null) {
this.update(a0);
function _fun94356() { // fn#94356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:149, offset: 0x02114fbf, size: 138 bytes, params: 1, frame: 15
return CreateClass(StateHistory, [{key: 'reset', value: function(a0) {
this.current = null;
this.history = [];
if (a0 != null) {
this.update(a0);
}
}}, {key: 'update', value: value_94359}, {key: 'getVoiceConnectionSuccessStats', value: value_94360},
{key: 'getStateDurations', value: value_94363}]);
function StateHistory(a0) { // fn#94357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:170, offset: 0x02115049, size: 63 bytes, params: 2, frame: 14
env1_3(this, StateHistory);
this.current = null;
this.history = [];
if (a0 != null) {
this.update(a0);
}
}
function value_94359(a0) { // fn#94359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:388, offset: 0x021150b3, size: 86 bytes, params: 2, frame: 14
var history;
var push;
var object;
var value;
if (this.current !== a0) {
this.current = a0;
history = this.history;
push = history.push;
object = {state: a0};
value = environment.__proto__;
value = require(4303) /* metro dependency 4303: TimeUtils */;
object.startTime = value.now();
Reflect.apply(push, history, [object]);
}
}
function value_94360() { // fn#94360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:534, offset: 0x02115109, size: 229 bytes, params: 1, frame: 15
var environment;
var r5;
let value = a0;
if (value !== undefined) {
r5 = value;
} else {
value = environment.__proto__;
value = require(4303) /* metro dependency 4303: TimeUtils */;
value = value.now();
r5 = value;
}
const totalDuration2 = totalDuration;
const env0_0 = this.getStateDurations(r5);
const object = {};
value = environment.__proto__;
const AWAITING_ENDPOINT = RTCConnectionStates.AWAITING_ENDPOINT;
object.state_awaiting_endpoint_ms = totalDuration2(AWAITING_ENDPOINT);
const AUTHENTICATING = RTCConnectionStates.AUTHENTICATING;
object.state_authenticating_ms = totalDuration2(AUTHENTICATING);
const CONNECTING = RTCConnectionStates.CONNECTING;
object.state_connecting_ms = totalDuration2(CONNECTING);
const DISCONNECTED = RTCConnectionStates.DISCONNECTED;
object.state_disconnected_ms = totalDuration2(DISCONNECTED);
const ICE_CHECKING = RTCConnectionStates.ICE_CHECKING;
object.state_ice_checking_ms = totalDuration2(ICE_CHECKING);
const NO_ROUTE = RTCConnectionStates.NO_ROUTE;
object.state_no_route_ms = totalDuration2(NO_ROUTE);
const RTC_CONNECTING = RTCConnectionStates.RTC_CONNECTING;
object.state_rtc_connecting_ms = totalDuration2(RTC_CONNECTING);
const RTC_DISCONNECTED = RTCConnectionStates.RTC_DISCONNECTED;
object.state_rtc_disconnected_ms = totalDuration2(RTC_DISCONNECTED);
return object;
function totalDuration(a0) { // fn#94361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:592, owner: value_94360.totalDuration, offset: 0x021151ee, size: 62 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.sumBy(env0_0, _fun94362);
function _fun94362(a0) { // fn#94362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:642, offset: 0x0211522c, size: 29 bytes, params: 2, frame: 4
return a0.state !== env0_0 ? 0 : a0.durationMs;
}
}
}
function value_94363(a0) { // fn#94363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:1145, offset: 0x02115249, size: 142 bytes, params: 2, frame: 16
var environment;
if (this.history.length === 0) {
return [];
}
let value = environment.__proto__;
value = importDefault(12388) /* metro dependency 12388: zipWithNext */;
value = value(this.history, function(a0, a1) {
return {state: a0.state, durationMs: a1.startTime - a0.startTime};
});
const push = value.push;
const defaultImport = Module00022;
const value2 = defaultImport.last(this.history);
Reflect.apply(push, value, [{state: value2.state, durationMs: a0 - value2.startTime}]);
return value;
}
}}, {key: 'update', value: value_94359}, {key: 'getVoiceConnectionSuccessStats', value: value_94360},
{key: 'getStateDurations', value: value_94363}]);
}
function StateHistory(a0) { // fn#94357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:170, offset: 0x02115049, size: 63 bytes, params: 2, frame: 14
env1_3(this, StateHistory);
this.current = null;
this.history = [];
if (a0 != null) {
this.update(a0);
}
}
function value_94359(a0) { // fn#94359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:388, offset: 0x021150b3, size: 86 bytes, params: 2, frame: 14
var history;
var push;
var object2;
var value;
if (this.current !== a0) {
this.current = a0;
history = this.history;
push = history.push;
object2 = {state: a0};
value = environment.__proto__;
value = require(4303) /* metro dependency 4303: TimeUtils */;
object2.startTime = value.now();
Reflect.apply(push, history, [object2]);
}
}
function value_94360() { // fn#94360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:534, offset: 0x02115109, size: 229 bytes, params: 1, frame: 15
var environment;
var r5;
let value = a0;
if (value !== undefined) {
r5 = value;
} else {
value = environment.__proto__;
value = require(4303) /* metro dependency 4303: TimeUtils */;
value = value.now();
r5 = value;
}
const closure = totalDuration;
const env0_0 = this.getStateDurations(r5);
const object2 = {};
value = environment.__proto__;
const AWAITING_ENDPOINT = RTCConnectionStates.AWAITING_ENDPOINT;
object2.state_awaiting_endpoint_ms = closure(AWAITING_ENDPOINT);
const AUTHENTICATING = RTCConnectionStates.AUTHENTICATING;
object2.state_authenticating_ms = closure(AUTHENTICATING);
const CONNECTING = RTCConnectionStates.CONNECTING;
object2.state_connecting_ms = closure(CONNECTING);
const DISCONNECTED = RTCConnectionStates.DISCONNECTED;
object2.state_disconnected_ms = closure(DISCONNECTED);
const ICE_CHECKING = RTCConnectionStates.ICE_CHECKING;
object2.state_ice_checking_ms = closure(ICE_CHECKING);
const NO_ROUTE = RTCConnectionStates.NO_ROUTE;
object2.state_no_route_ms = closure(NO_ROUTE);
const RTC_CONNECTING = RTCConnectionStates.RTC_CONNECTING;
object2.state_rtc_connecting_ms = closure(RTC_CONNECTING);
const RTC_DISCONNECTED = RTCConnectionStates.RTC_DISCONNECTED;
object2.state_rtc_disconnected_ms = closure(RTC_DISCONNECTED);
return object2;
}
function value_94363(a0) { // fn#94363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:1145, offset: 0x02115249, size: 142 bytes, params: 2, frame: 16
var environment;
if (this.history.length === 0) {
return [];
}
let value = environment.__proto__;
value = importDefault(12388) /* metro dependency 12388: zipWithNext */;
value = value(this.history, function(a0, a1) {
return {state: a0.state, durationMs: a1.startTime - a0.startTime};
});
const push = value.push;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value2 = defaultImport.last(this.history);
Reflect.apply(push, value, [{state: value2.state, durationMs: a0 - value2.startTime}]);
return value;
}
function totalDuration(a0) { // fn#94361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:592, owner: value_94360.totalDuration, offset: 0x021151ee, size: 62 bytes, params: 2, frame: 13
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.sumBy(env0_0, _fun94362);
}
function _fun94362(a0) { // fn#94362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12573:642, offset: 0x0211522c, size: 29 bytes, params: 2, frame: 4
return a0.state !== env0_0 ? 0 : a0.durationMs;
}
global.__d(_fun94355, 12387, [6, 7, 661, 4303, 22, 12388,
2]) /* metro module 12387, dependencies: [6, 7, 661, 4303, 22, 12388, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+121 -110
View File
@@ -1,32 +1,44 @@
/* Metro module 1886; source: lib/Record.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun20494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:6, offset: 0x00eca79a, size: 145 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun20495();
const value2 = _fun20501();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/Record.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/Record.tsx');
exports.default = value;
exports.TypedRecord = value2;
}
function _fun20495() { // fn#20495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:118, offset: 0x00eca82b, size: 124 bytes, params: 1, frame: 15
return env0_1(Record_20496, [{key: 'toJS', value: function() {
var r1;
var object = {};
copyDataProperties(object, this, r1);
return object;
}}, {key: 'set', value: function(a0, a1) {
var r1;
var r0;
var object;
var value = this;
var property = value[a0];
if (a1 instanceof global.Date) {
if (property instanceof global.Date) {
if (a1.getTime() === property.getTime()) {
r0 = value;
function _fun20495() { // fn#20495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:118, offset: 0x00eca82b, size: 124 bytes, params: 1, frame: 15
return CreateClass(Record, [{key: 'toJS', value: function() {
var r1;
var object = {};
copyDataProperties(object, this, r1);
return object;
}}, {key: 'set', value: function(a0, a1) {
var r1;
var r0;
var object;
var value = this;
var property = value[a0];
if (a1 instanceof global.Date) {
if (property instanceof global.Date) {
if (a1.getTime() === property.getTime()) {
r0 = value;
} else {
if (property === a1) {
r1 = value;
} else {
property = value.constructor;
object = {};
copyDataProperties(object, value, value);
object[a0] = a1;
r1 = new property();
}
r0 = r1;
}
} else {
if (property === a1) {
r1 = value;
@@ -51,31 +63,91 @@ function _fun20495() { // fn#20495, source: /ci/build/discord/discord/discord_an
}
r0 = r1;
}
} else {
if (property === a1) {
r1 = value;
} else {
property = value.constructor;
object = {};
copyDataProperties(object, value, value);
object[a0] = a1;
r1 = new property();
}
r0 = r1;
return r0;
}}, {key: 'merge', value: value_20499}, {key: 'update', value: value_20500}]);
function Record() { // fn#20496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:129, offset: 0x00da1b5f, size: 27 bytes, params: 1, frame: 13
env1_0(this, Record);
}
return r0;
}}, {key: 'merge', value: value_20499}, {key: 'update', value: value_20500}]);
}
function _fun20501() { // fn#20501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:861, offset: 0x00ecaa98, size: 124 bytes, params: 1, frame: 15
return env0_1(TypedRecord, [{key: 'toJS', value: function() {
var r1;
var object = {};
copyDataProperties(object, this, r1);
return object;
}}, {key: 'set', value: function(a0, a1) {
return this.merge({[a0]: a1});
}}, {key: 'merge', value: value_20505}, {key: 'update', value: value_20506}]);
function value_20500(a0, a1, a2) { // fn#20500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:673, offset: 0x00ecaa08, size: 144 bytes, params: 4, frame: 19
var r1;
var r5;
var r0;
var r4;
var object;
const value = a1;
const value2 = a2;
if (value2 != null) {
r1 = value;
r5 = value2;
} else {
r1 = undefined;
r5 = value;
}
const property = this[a0];
if (property instanceof Record) {
r4 = property;
} else {
if (property instanceof global.Array) {
object = [];
arraySpread(object, property, 0, property);
r0 = object;
} else if (property instanceof global.Object) {
object = {};
copyDataProperties(object, property, undefined);
r0 = object;
} else {
r0 = property;
}
r4 = r0;
}
r4 = r4 === undefined ? r1 : r4;
return this.set(a0, r5(r4));
}
}
function _fun20501() { // fn#20501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:861, offset: 0x00ecaa98, size: 124 bytes, params: 1, frame: 15
return CreateClass(TypedRecord, [{key: 'toJS', value: function() {
var r1;
var object = {};
copyDataProperties(object, this, r1);
return object;
}}, {key: 'set', value: function(a0, a1) {
return this.merge({[a0]: a1});
}}, {key: 'merge', value: value_20505}, {key: 'update', value: value_20506}]);
function TypedRecord() { // fn#20502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:882, offset: 0x00da1b5f, size: 27 bytes, params: 1, frame: 13
env1_0(this, TypedRecord);
}
function value_20506(a0, a1, a2) { // fn#20506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:1243, offset: 0x00ecabba, size: 130 bytes, params: 4, frame: 18
var r1;
var r5;
var object;
const value = a1;
const property = this[a0];
if (property instanceof env1_2) {
r5 = property;
} else {
if (property instanceof global.Array) {
object = [];
arraySpread(object, property, 0, property);
r1 = object;
} else if (property instanceof global.Object) {
object = {};
copyDataProperties(object, property, undefined);
r1 = object;
} else {
r1 = property;
}
r5 = r1;
}
r5 = r5 === undefined ? value : r5;
return this.set(a0, a2(r5));
}
}
}
function value_20499(a0) { // fn#20499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:417, offset: 0x00eca924, size: 228 bytes, params: 2, frame: 29
@@ -96,7 +168,7 @@ function value_20499(a0) { // fn#20499, source: /ci/build/discord/discord/discor
var getTime;
var time;
var value6;
var object2;
var object;
var constructor;
const value = this;
const value2 = null;
@@ -150,9 +222,9 @@ function value_20499(a0) { // fn#20499, source: /ci/build/discord/discord/discor
r15 = r5;
continue;
}
object2 = {};
copyDataProperties(object2, value, r19);
r15 = object2;
object = {};
copyDataProperties(object, value, r19);
r15 = object;
r15[propertyName] = a0[propertyName];
r5 = r15;
r9 = propertyName2;
@@ -168,42 +240,6 @@ function value_20499(a0) { // fn#20499, source: /ci/build/discord/discord/discor
return r0;
}
function value_20500(a0, a1, a2) { // fn#20500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:673, offset: 0x00ecaa08, size: 144 bytes, params: 4, frame: 19
var r1;
var r5;
var r0;
var r4;
var object;
const value = a1;
const value2 = a2;
if (value2 != null) {
r1 = value;
r5 = value2;
} else {
r1 = undefined;
r5 = value;
}
const property = this[a0];
if (property instanceof Record_20496) {
r4 = property;
} else {
if (property instanceof global.Array) {
object = [];
arraySpread(object, property, 0, property);
r0 = object;
} else if (property instanceof global.Object) {
object = {};
copyDataProperties(object, property, undefined);
r0 = object;
} else {
r0 = property;
}
r4 = r0;
}
r4 = r4 === undefined ? r1 : r4;
return this.set(a0, r5(r4));
}
function value_20505(a0) { // fn#20505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:1054, offset: 0x00ecab31, size: 137 bytes, params: 2, frame: 22
var r0;
var r6;
@@ -260,29 +296,4 @@ function value_20505(a0) { // fn#20505, source: /ci/build/discord/discord/discor
return r0;
}
function value_20506(a0, a1, a2) { // fn#20506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2013:1243, offset: 0x00ecabba, size: 130 bytes, params: 4, frame: 18
var r1;
var r5;
var object;
const value = a1;
const property = this[a0];
if (property instanceof env1_2) {
r5 = property;
} else {
if (property instanceof global.Array) {
object = [];
arraySpread(object, property, 0, property);
r1 = object;
} else if (property instanceof global.Object) {
object = {};
copyDataProperties(object, property, undefined);
r1 = object;
} else {
r1 = property;
}
r5 = r1;
}
r5 = r5 === undefined ? value : r5;
return this.set(a0, a2(r5));
}
global.__d(_fun20494, 1886, [6, 7, 2]) /* metro module 1886, dependencies: [6, 7, 2] */;
+33 -30
View File
@@ -1,41 +1,43 @@
/* Metro module 4403; source: lib/SoundshareStatsAggregator.tsx; dependencies: [6, 7, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun37422(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:6, offset: 0x010a4ac6, size: 124 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun37423();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SoundshareStatsAggregator.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/SoundshareStatsAggregator.tsx');
exports.default = value;
}
function _fun37423() { // fn#37423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:118, offset: 0x010a4b42, size: 80 bytes, params: 1, frame: 15
return CreateClass(SoundshareStatsAggregator, [{key: 'traceEvent', value: value_37425}, {key: 'getStats',
value: function() {
var r2;
var object = {};
copyDataProperties(object, this._report, r2);
object['soundshare_unique_pids'] = this._pids.size;
return object;
}}]);
function SoundshareStatsAggregator() { // fn#37424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:139, offset: 0x010a4b92, size: 81 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_0(this, SoundshareStatsAggregator);
this._report = {'soundshare_attach_requested_count': 0, 'soundshare_capturing_count': 0,
'soundshare_capture_stopped_count': 0, 'soundshare_hooked_count': 0, 'soundshare_recv_connect_count': 0,
'soundshare_recv_disconnect_count': 0, 'soundshare_recv_started_count': 0, 'soundshare_recv_stopped_count': 0,
'soundshare_recv_failed_count': 0, 'soundshare_recv_format_count': 0, 'soundshare_send_announce_count': 0,
'soundshare_send_start_count': 0, 'soundshare_send_stop_count': 0, 'soundshare_malformed_trace_count': 0,
'soundshare_audio_detected_count': 0, 'soundshare_state_transition_detached_count': 0,
'soundshare_state_transition_waiting_count': 0, 'soundshare_state_transition_attached_count': 0,
'soundshare_state_transition_started_count': 0, 'soundshare_state_transition_playing_count': 0,
'soundshare_state_transition_silence_count': 0, 'soundshare_unknown_event_count': 0, 'soundshare_first_pid': 0,
'soundshare_last_pid': 0, 'soundshare_unique_pids': 0, 'soundshare_first_session': null,
'soundshare_last_session': null};
const Set = global.Set;
this._pids = new Set();
}
function _fun37423() { // fn#37423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:118, offset: 0x010a4b42, size: 80 bytes, params: 1, frame: 15
return env0_1(SoundshareStatsAggregator, [{key: 'traceEvent', value: value_37425}, {key: 'getStats',
value: function() {
var r2;
var object = {};
copyDataProperties(object, this._report, r2);
object['soundshare_unique_pids'] = this._pids.size;
return object;
}}]);
}
}
function SoundshareStatsAggregator() { // fn#37424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:139, offset: 0x010a4b92, size: 81 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_0(this, SoundshareStatsAggregator);
this._report = {'soundshare_attach_requested_count': 0, 'soundshare_capturing_count': 0,
'soundshare_capture_stopped_count': 0, 'soundshare_hooked_count': 0, 'soundshare_recv_connect_count': 0,
'soundshare_recv_disconnect_count': 0, 'soundshare_recv_started_count': 0, 'soundshare_recv_stopped_count': 0,
'soundshare_recv_failed_count': 0, 'soundshare_recv_format_count': 0, 'soundshare_send_announce_count': 0,
'soundshare_send_start_count': 0, 'soundshare_send_stop_count': 0, 'soundshare_malformed_trace_count': 0,
'soundshare_audio_detected_count': 0, 'soundshare_state_transition_detached_count': 0,
'soundshare_state_transition_waiting_count': 0, 'soundshare_state_transition_attached_count': 0,
'soundshare_state_transition_started_count': 0, 'soundshare_state_transition_playing_count': 0,
'soundshare_state_transition_silence_count': 0, 'soundshare_unknown_event_count': 0, 'soundshare_first_pid': 0,
'soundshare_last_pid': 0, 'soundshare_unique_pids': 0, 'soundshare_first_session': null,
'soundshare_last_session': null};
const Set = global.Set;
this._pids = new Set();
}
function value_37425(a0, a1) { // fn#37425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4575:1179, offset: 0x010a4be3, size: 264 bytes, params: 3, frame: 18
@@ -75,3 +77,4 @@ function value_37425(a0, a1) { // fn#37425, source: /ci/build/discord/discord/di
}
}
global.__d(_fun37422, 4403, [6, 7, 2]) /* metro module 4403, dependencies: [6, 7, 2] */;
+103 -100
View File
@@ -1,110 +1,113 @@
/* Metro module 12530; source: lib/StateManager.tsx; dependencies: [6, 7, 644, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun95468(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:6, offset: 0x0214705e, size: 134 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun95469();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/StateManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/StateManager.tsx');
exports.default = value;
}
function _fun95469() { // fn#95469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:118, offset: 0x021470e4, size: 186 bytes, params: 1, frame: 15
return env0_3(StateManager, [{key: 'shouldCommit', value: function() {
return true;
}}, {key: 'setState', value: function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, copyDataProperties(object, this.state, r2));
this.state = object;
}}, {key: 'getState', value: function() {
return this.state;
}}, {key: 'reset', value: function() {
this.dirty = false;
this.state = this.getInitialState();
}}, {key: 'update', value: value_95475}, {key: 'forceUpdate', value: function() {
this.dirty = false;
this.didCommit(this.state);
}}]);
}
function StateManager() { // fn#95470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:139, offset: 0x0214719e, size: 66 bytes, params: 1, frame: 14
let value = a0;
const r1 = !(value !== undefined) || value;
value = environment.__proto__;
env1_2(this, StateManager);
this.alwaysUpdateState = r1;
this.dirty = false;
const getInitialState = this.getInitialState;
this.state = Reflect.apply(getInitialState, this, []);
}
function value_95475() { // fn#95475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:533, offset: 0x02147224, size: 300 bytes, params: 1, frame: 20
var r6;
var value3;
var length;
var value4;
var value5;
var property;
var dirty;
var defaultImport;
var property2;
var value6;
var value7;
var value8;
let value = a0;
const value2 = a1;
const r5 = value !== undefined ? value : {};
let r0 = value2 !== undefined ? value2 : false;
const getNextState = this.getNextState;
const object2 = {};
let state = this.state;
copyDataProperties(object2, state, undefined);
copyDataProperties(object2, r5, undefined);
value = Reflect.apply(getNextState, this, [object2]);
if (r0) {
value8 = environment.__proto__;
this.dirty = !(importDefault(644) /* metro dependency 644 */)(value, this.getInitialState());
} else {
value3 = global.Object.keys(value);
length = value3.length;
value4 = 0;
value5 = environment.__proto__;
if (value4 < length) {
r6 = value4;
while (true) {
property = value3[r6];
dirty = this.dirty;
if (dirty) {
r0 = dirty;
} else {
defaultImport = importDefault(644) /* metro dependency 644 */;
state = this.state;
property2 = state[property];
value6 = !defaultImport(property2, value[property]);
r0 = value6;
}
this.dirty = r0;
value7 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = value3.length;
if (value7 < length) {
r6 = value7;
continue;
}
break;
}
function _fun95469() { // fn#95469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:118, offset: 0x021470e4, size: 186 bytes, params: 1, frame: 15
return CreateClass(StateManager, [{key: 'shouldCommit', value: function() {
return true;
}}, {key: 'setState', value: function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, copyDataProperties(object, this.state, r2));
this.state = object;
}}, {key: 'getState', value: function() {
return this.state;
}}, {key: 'reset', value: function() {
this.dirty = false;
this.state = this.getInitialState();
}}, {key: 'update', value: value_95475}, {key: 'forceUpdate', value: function() {
this.dirty = false;
this.didCommit(this.state);
}}]);
function StateManager() { // fn#95470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:139, offset: 0x0214719e, size: 66 bytes, params: 1, frame: 14
let value = a0;
const r1 = !(value !== undefined) || value;
value = environment.__proto__;
env1_2(this, StateManager);
this.alwaysUpdateState = r1;
this.dirty = false;
const getInitialState = this.getInitialState;
this.state = Reflect.apply(getInitialState, this, []);
}
function value_95475() { // fn#95475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12720:533, offset: 0x02147224, size: 300 bytes, params: 1, frame: 20
var r6;
var value3;
var length;
var value4;
var value5;
var property;
var dirty;
var defaultImport;
var property2;
var value6;
var value7;
var value8;
let value = a0;
const value2 = a1;
const r5 = value !== undefined ? value : {};
let r0 = value2 !== undefined ? value2 : false;
const getNextState = this.getNextState;
const object = {};
let state = this.state;
copyDataProperties(object, state, undefined);
copyDataProperties(object, r5, undefined);
value = Reflect.apply(getNextState, this, [object]);
if (r0) {
value8 = environment.__proto__;
this.dirty = !(importDefault(644) /* metro dependency 644 */)(value, this.getInitialState());
} else {
value3 = global.Object.keys(value);
length = value3.length;
value4 = 0;
value5 = environment.__proto__;
if (value4 < length) {
r6 = value4;
while (true) {
property = value3[r6];
dirty = this.dirty;
if (dirty) {
r0 = dirty;
} else {
defaultImport = importDefault(644) /* metro dependency 644 */;
state = this.state;
property2 = state[property];
value6 = !defaultImport(property2, value[property]);
r0 = value6;
}
this.dirty = r0;
value7 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = value3.length;
if (value7 < length) {
r6 = value7;
continue;
}
break;
}
}
}
if (this.dirty && this.shouldCommit() || this.alwaysUpdateState) {
this.state = value;
}
if (r0) {
this.dirty = false;
this.didCommit(this.state);
r0 = true;
} else {
r0 = !!r0;
}
return r0;
}
}
if (this.dirty && this.shouldCommit() || this.alwaysUpdateState) {
this.state = value;
}
if (r0) {
this.dirty = false;
this.didCommit(this.state);
r0 = true;
} else {
r0 = !!r0;
}
return r0;
}
global.__d(_fun95468, 12530, [6, 7, 644, 2]) /* metro module 12530, dependencies: [6, 7, 644, 2] */;
+196 -180
View File
@@ -1,190 +1,204 @@
/* Metro module 7137; source: lib/SystemResources.tsx; dependencies: [5, 6, 7, 7131, 5256, 7138, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
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 ProcessUtilsNative from '../utils/ProcessUtils.native.tsx'; /* Metro dependency 5256 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HistogramModule from './Histogram.tsx'; /* Metro dependency 7131 */
function _fun57111(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:6, offset: 0x013dcbb5, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const value = _fun57112();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SystemResources.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/SystemResources.tsx');
exports.default = value;
}
function _fun57112() { // fn#57112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:128, offset: 0x013dcc4d, size: 197 bytes, params: 1, frame: 17
const SystemResources2 = SystemResources;
const items2 = [{key: 'getStats', value: value_57114}];
items2[1] = {key: 'takeSample', value: value_57115};
const env0_2 = Module00005(_fun57117);
items2[2] = {key: 'getCurrentBattery', value: value_57118};
const env0_1 = Module00005(_fun57120);
items2[3] = {key: 'setLastBattery', value: value_57121};
const env0_0 = Module00005(_fun57123);
items2[4] = {key: 'getBatteryLevelStats', value: value_57124};
return CreateClass(SystemResources2, items2);
function SystemResources() { // fn#57113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:149, offset: 0x013dcd12, size: 172 bytes, params: 1, frame: 17
let value = environment.__proto__;
env1_4(this, SystemResources);
const Histogram = (HistogramModule).Histogram;
const value3 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
let histogram = new Histogram();
this.cpuHistogram = histogram instanceof Object ? histogram : value3;
const value5 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
histogram = new Histogram();
this.memoryHistogram = histogram instanceof Object ? histogram : value5;
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
const getCumulativeCPUUsage = value.getCumulativeCPUUsage;
this.startCPU = Reflect.apply(getCumulativeCPUUsage, value, []);
this.lastCPU = this.startCPU;
this.lastBattery = null;
}
function _fun57112() { // fn#57112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:128, offset: 0x013dcc4d, size: 197 bytes, params: 1, frame: 17
const binding = env0_5;
const closure = SystemResources;
const items2 = [{key: 'getStats', value: value_57114}];
items2[1] = {key: 'takeSample', value: value_57115};
const binding2 = env0_3;
const env0_2 = binding2(_fun57117);
items2[2] = {key: 'getCurrentBattery', value: value_57118};
const env0_1 = binding2(_fun57120);
items2[3] = {key: 'setLastBattery', value: value_57121};
const env0_0 = binding2(_fun57123);
items2[4] = {key: 'getBatteryLevelStats', value: value_57124};
return binding(closure, items2);
}
function SystemResources() { // fn#57113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:149, offset: 0x013dcd12, size: 172 bytes, params: 1, frame: 17
let value = environment.__proto__;
env1_4(this, SystemResources);
const Histogram = (require(7131) /* metro dependency 7131: Histogram */).Histogram;
const value3 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
let histogram = new Histogram();
this.cpuHistogram = histogram instanceof Object ? histogram : value3;
const value5 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
histogram = new Histogram();
this.memoryHistogram = histogram instanceof Object ? histogram : value5;
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
const getCumulativeCPUUsage = value.getCumulativeCPUUsage;
this.startCPU = Reflect.apply(getCumulativeCPUUsage, value, []);
this.lastCPU = this.startCPU;
this.lastBattery = null;
}
function value_57114() { // fn#57114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:405, offset: 0x013dcdbe, size: 404 bytes, params: 1, frame: 19
var r2;
var usage;
var value6;
var sampleTime;
const report = this.cpuHistogram.getReport();
const report2 = this.memoryHistogram.getReport();
const value4 = undefined;
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
let startCPU = this.startCPU;
if (startCPU == null) {
r2 = value4;
} else if (cumulativeCPUUsage == null) {
r2 = value4;
} else {
usage = cumulativeCPUUsage.usage;
startCPU = this.startCPU;
value6 = 100 * (usage - startCPU.usage);
sampleTime = cumulativeCPUUsage.sampleTime;
startCPU = this.startCPU;
r2 = value6 / ((sampleTime - startCPU.sampleTime) / 1000);
}
r2 = r2 ?? report.mean;
return {client_performance_cpu_percentile25: report.percentiles[25],
client_performance_cpu_percentile50: report.percentiles[50],
client_performance_cpu_percentile75: report.percentiles[75],
client_performance_cpu_percentile90: report.percentiles[90],
client_performance_cpu_percentile95: report.percentiles[95], client_performance_cpu_mean: r2,
client_performance_memory_percentile25: report2.percentiles[25],
client_performance_memory_percentile50: report2.percentiles[50],
client_performance_memory_percentile75: report2.percentiles[75],
client_performance_memory_percentile90: report2.percentiles[90],
client_performance_memory_percentile95: report2.percentiles[95], client_performance_memory_min: report2.min,
client_performance_memory_max: report2.max, client_performance_memory_mean: report2.mean};
}
function value_57115() { // fn#57115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1383, offset: 0x013dcf52, size: 257 bytes, params: 1, frame: 21
var r5;
var lastCPU;
var value4;
let value = environment.__proto__;
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
const currentMemoryUsageKB = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentMemoryUsageKB();
if (cumulativeCPUUsage != null) {
lastCPU = this.lastCPU;
value = true;
if (lastCPU != null) {
value4 = cumulativeCPUUsage.sampleTime - this.lastCPU.sampleTime;
if (value4 >= 1) {
this.cpuHistogram.addSample((cumulativeCPUUsage.usage - this.lastCPU.usage) / (value4 / 1000) * 100,
value4);
r5 = value;
function value_57114() { // fn#57114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:405, offset: 0x013dcdbe, size: 404 bytes, params: 1, frame: 19
var r2;
var usage;
var value6;
var sampleTime;
const report = this.cpuHistogram.getReport();
const report2 = this.memoryHistogram.getReport();
const value4 = undefined;
const cumulativeCPUUsage = (ProcessUtilsNative).getCumulativeCPUUsage();
let startCPU = this.startCPU;
if (startCPU == null) {
r2 = value4;
} else if (cumulativeCPUUsage == null) {
r2 = value4;
} else {
r5 = false;
usage = cumulativeCPUUsage.usage;
startCPU = this.startCPU;
value6 = 100 * (usage - startCPU.usage);
sampleTime = cumulativeCPUUsage.sampleTime;
startCPU = this.startCPU;
r2 = value6 / ((sampleTime - startCPU.sampleTime) / 1000);
}
} else {
r5 = value;
r2 = r2 ?? report.mean;
return {client_performance_cpu_percentile25: report.percentiles[25],
client_performance_cpu_percentile50: report.percentiles[50],
client_performance_cpu_percentile75: report.percentiles[75],
client_performance_cpu_percentile90: report.percentiles[90],
client_performance_cpu_percentile95: report.percentiles[95], client_performance_cpu_mean: r2,
client_performance_memory_percentile25: report2.percentiles[25],
client_performance_memory_percentile50: report2.percentiles[50],
client_performance_memory_percentile75: report2.percentiles[75],
client_performance_memory_percentile90: report2.percentiles[90],
client_performance_memory_percentile95: report2.percentiles[95], client_performance_memory_min: report2.min,
client_performance_memory_max: report2.max, client_performance_memory_mean: report2.mean};
}
function value_57115() { // fn#57115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1383, offset: 0x013dcf52, size: 257 bytes, params: 1, frame: 21
var r5;
var lastCPU;
var value4;
let value = environment.__proto__;
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
const currentMemoryUsageKB = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentMemoryUsageKB();
if (cumulativeCPUUsage != null) {
lastCPU = this.lastCPU;
value = true;
if (lastCPU != null) {
value4 = cumulativeCPUUsage.sampleTime - this.lastCPU.sampleTime;
if (value4 >= 1) {
this.cpuHistogram.addSample((cumulativeCPUUsage.usage - this.lastCPU.usage) / (value4 / 1000) * 100,
value4);
r5 = value;
} else {
r5 = false;
}
} else {
r5 = value;
}
if (r5) {
this.lastCPU = cumulativeCPUUsage;
}
} else {
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
value = value.getCurrentCPUUsagePercent();
if (value != null) {
this.cpuHistogram.addSample(value);
}
}
if (currentMemoryUsageKB != null) {
this.memoryHistogram.addSample(currentMemoryUsageKB);
}
}
function* _fun57117() { // fn#57117, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1841, offset: 0x013dd05c, size: 84 bytes, params: 1, frame: 13
var binding;
var binding2;
var property;
var getDeviceState;
var object;
var value3;
var batteryLevel;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
return null;
}
try {
binding2 = env2_2;
} catch (error) {
return null;
}
try {
property = binding2[5];
} catch (error) {
return null;
}
try {
value = binding(property);
} catch (error) {
return null;
}
try {
getDeviceState = value.getDeviceState;
} catch (error) {
return null;
}
try {
object = {};
} catch (error) {
return null;
}
try {
object.fallback = false;
} catch (error) {
return null;
}
try {
value = Reflect.apply(getDeviceState, value, [object]);
} catch (error) {
return null;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
return null;
}
if (value3) {
return value;
}
try {
batteryLevel = value.batteryLevel;
} catch (error) {
return null;
}
return batteryLevel;
}
function value_57118() { // fn#57118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1947, offset: 0x00d6b059, size: 30 bytes, params: 1, frame: 13
return env0_2.apply(this, arguments);
}
function value_57121() { // fn#57121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2107, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13
return env0_1.apply(this, arguments);
}
function value_57124() { // fn#57124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2482, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
if (r5) {
this.lastCPU = cumulativeCPUUsage;
}
} else {
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
value = value.getCurrentCPUUsagePercent();
if (value != null) {
this.cpuHistogram.addSample(value);
}
}
if (currentMemoryUsageKB != null) {
this.memoryHistogram.addSample(currentMemoryUsageKB);
}
}
function* _fun57117() { // fn#57117, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1841, offset: 0x013dd05c, size: 84 bytes, params: 1, frame: 13
var binding;
var binding2;
var property;
var getDeviceState;
var object2;
var value3;
var batteryLevel;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
return null;
}
try {
binding2 = env2_2;
} catch (error) {
return null;
}
try {
property = binding2[5];
} catch (error) {
return null;
}
try {
value = binding(property);
} catch (error) {
return null;
}
try {
getDeviceState = value.getDeviceState;
} catch (error) {
return null;
}
try {
object2 = {};
} catch (error) {
return null;
}
try {
object2.fallback = false;
} catch (error) {
return null;
}
try {
value = Reflect.apply(getDeviceState, value, [object2]);
} catch (error) {
return null;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
return null;
}
if (value3) {
return value;
}
try {
batteryLevel = value.batteryLevel;
} catch (error) {
return null;
}
return batteryLevel;
}
function* _fun57120() { // fn#57120, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2044, offset: 0x013dd0b9, size: 47 bytes, params: 1, frame: 11
@@ -201,7 +215,7 @@ function* _fun57120() { // fn#57120, original name: ?anon_0_, source: /ci/build/
function* _fun57123() { // fn#57123, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2207, offset: 0x013dd0f1, size: 151 bytes, params: 1, frame: 17
var r2;
var object2;
var object;
var Math;
var round;
if (false) {
@@ -219,16 +233,18 @@ function* _fun57123() { // fn#57123, original name: ?anon_0_, source: /ci/build/
} else if (value == null) {
r2 = {startBattery: this.lastBattery, currentBattery: value, batteryUsageRounded: null};
} else {
object2 = {};
object = {};
lastBattery = this.lastBattery;
object2.startBattery = lastBattery;
object2.currentBattery = value;
object.startBattery = lastBattery;
object.currentBattery = value;
Math = global.Math;
round = Math.round;
lastBattery = this.lastBattery;
object2.batteryUsageRounded = Reflect.apply(round, Math, [1000 * (value - lastBattery)]) / 1000;
r2 = object2;
object.batteryUsageRounded = Reflect.apply(round, Math, [1000 * (value - lastBattery)]) / 1000;
r2 = object;
}
return r2;
}
global.__d(_fun57111, 7137, [5, 6, 7, 7131, 5256, 7138,
2]) /* metro module 7137, dependencies: [5, 6, 7, 7131, 5256, 7138, 2] */;
+149 -139
View File
@@ -1,4 +1,9 @@
/* Metro module 12404; source: lib/SystemResponsiveness.tsx; dependencies: [6, 7, 22, 7131, 4406, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HistogramModule from './Histogram.tsx'; /* Metro dependency 7131 */
function _fun94566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:6, offset: 0x0211d8c7, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_94569 = function(a0, a1) {
@@ -46,161 +51,166 @@ function _fun94566(global, require, importDefault, importAll, module, exports, d
};
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 */;
let value = _fun94570();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SystemResponsiveness.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/SystemResponsiveness.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_94567(a0, a1) { // fn#94567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:120, offset: 0x0211d967, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_94567(a0, a1) { // fn#94567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:120, offset: 0x0211d967, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun94568;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_94569(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun94568;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_94569(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_94569(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_94569(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun94568;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun94570() { // fn#94570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1036, offset: 0x0211dadb, size: 111 bytes, params: 1, frame: 15
return env0_4(SystemResponsiveness, [{key: 'start', value: function() {
var connection = this.connection;
var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats;
connection.on(Stats, this.sampleStats);
}}, {key: 'stop', value: function() {
var connection = this.connection;
var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats;
connection.off(Stats, this.sampleStats);
}}, {key: 'getPttQueueLatencyStats', value: function() {
var value = this.pttQueueLatencyHistogram.getReport([50, 95]);
return {ptt_queue_latency_max: value.max, ptt_queue_latency_mean: value.mean,
ptt_queue_latency_p50: value.percentiles[50], ptt_queue_latency_p95: value.percentiles[95],
ptt_queue_latency_samples: value.samples};
}}]);
}
function SystemResponsiveness(a0) { // fn#94571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1057, offset: 0x0211db4a, size: 107 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__;
env1_3(this, SystemResponsiveness);
this.connection = a0;
this.sampleStats = sampleStats;
const Histogram = (require(7131) /* metro dependency 7131: Histogram */).Histogram;
this.pttQueueLatencyHistogram = new Histogram();
}
function SystemResponsivenessSampleStats(a0) { // fn#94572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1154, owner: SystemResponsiveness.sampleStats, offset: 0x0211dbb5, size: 70 bytes, params: 2, frame: 13
var environment;
var value;
if (a0 != null) {
value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(a0.rtp.outbound, _fun94573);
}
}
function _fun94573(a0) { // fn#94573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1199, offset: 0x0211dbfb, size: 116 bytes, params: 2, frame: 16
var r0;
var r1;
var value;
var _createForOfIteratorHelperLoose_94567Binding;
var pttQueueLatencyMicrosSamples;
var value2;
var done;
var value3;
var value4;
var value5;
var pttQueueLatencyHistogram;
var addSample;
var value6;
reducibleJoin5: while (true) {
if (a0.type !== 'audio') {
break reducibleJoin5;
}
value = environment.__proto__.__proto__.__proto__;
_createForOfIteratorHelperLoose_94567Binding = _createForOfIteratorHelperLoose_94567;
pttQueueLatencyMicrosSamples = a0.pttQueueLatencyMicrosSamples;
reducibleJoin3: while (true) {
if (pttQueueLatencyMicrosSamples != null) {
r0 = pttQueueLatencyMicrosSamples;
break reducibleJoin3;
if (r5) {
}
r0 = [];
break reducibleJoin3;
return _fun94568;
}
value = _createForOfIteratorHelperLoose_94567Binding(r0);
value2 = value();
done = value2.done;
value3 = environment.__proto__;
if (done) {
break reducibleJoin5;
}
r1 = value2;
reducibleLoop4: while (true) {
value4 = r1.value;
value5 = value4 / 1000;
pttQueueLatencyHistogram = env1_0.pttQueueLatencyHistogram;
addSample = pttQueueLatencyHistogram.addSample;
Reflect.apply(addSample, pttQueueLatencyHistogram, [value5]);
value6 = value();
done = value6.done;
if (done) {
break reducibleJoin5;
}
r1 = value6;
continue reducibleLoop4;
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun94568() { // fn#94568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:691, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _fun94570() { // fn#94570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1036, offset: 0x0211dadb, size: 111 bytes, params: 1, frame: 15
return CreateClass(SystemResponsiveness, [{key: 'start', value: function() {
var connection = this.connection;
var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats;
connection.on(Stats, this.sampleStats);
}}, {key: 'stop', value: function() {
var connection = this.connection;
var Stats = require(dependencyMap[4]).BaseConnectionEvent.Stats;
connection.off(Stats, this.sampleStats);
}}, {key: 'getPttQueueLatencyStats', value: function() {
var value = this.pttQueueLatencyHistogram.getReport([50, 95]);
return {ptt_queue_latency_max: value.max, ptt_queue_latency_mean: value.mean,
ptt_queue_latency_p50: value.percentiles[50], ptt_queue_latency_p95: value.percentiles[95],
ptt_queue_latency_samples: value.samples};
}}]);
function SystemResponsiveness(a0) { // fn#94571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1057, offset: 0x0211db4a, size: 107 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__;
env1_3(this, SystemResponsiveness);
this.connection = a0;
this.sampleStats = sampleStats;
const Histogram = (HistogramModule).Histogram;
this.pttQueueLatencyHistogram = new Histogram();
function SystemResponsivenessSampleStats(a0) { // fn#94572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1154, owner: SystemResponsiveness.sampleStats, offset: 0x0211dbb5, size: 70 bytes, params: 2, frame: 13
var environment;
var value;
if (a0 != null) {
value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(a0.rtp.outbound, _fun94573);
}
function _fun94573(a0) { // fn#94573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12590:1199, offset: 0x0211dbfb, size: 116 bytes, params: 2, frame: 16
var r0;
var r1;
var value;
var _createForOfIteratorHelperLoose_94567Binding;
var pttQueueLatencyMicrosSamples;
var value2;
var done;
var value3;
var value4;
var value5;
var pttQueueLatencyHistogram;
var addSample;
var value6;
reducibleJoin5: while (true) {
if (a0.type !== 'audio') {
break reducibleJoin5;
}
value = environment.__proto__.__proto__.__proto__;
_createForOfIteratorHelperLoose_94567Binding = _createForOfIteratorHelperLoose_94567;
pttQueueLatencyMicrosSamples = a0.pttQueueLatencyMicrosSamples;
reducibleJoin3: while (true) {
if (pttQueueLatencyMicrosSamples != null) {
r0 = pttQueueLatencyMicrosSamples;
break reducibleJoin3;
}
r0 = [];
break reducibleJoin3;
}
value = _createForOfIteratorHelperLoose_94567Binding(r0);
value2 = value();
done = value2.done;
value3 = environment.__proto__;
if (done) {
break reducibleJoin5;
}
r1 = value2;
reducibleLoop4: while (true) {
value4 = r1.value;
value5 = value4 / 1000;
pttQueueLatencyHistogram = env1_0.pttQueueLatencyHistogram;
addSample = pttQueueLatencyHistogram.addSample;
Reflect.apply(addSample, pttQueueLatencyHistogram, [value5]);
value6 = value();
done = value6.done;
if (done) {
break reducibleJoin5;
}
r1 = value6;
continue reducibleLoop4;
}
}
}
}
}
}
}
global.__d(_fun94566, 12404, [6, 7, 22, 7131, 4406,
2]) /* metro module 12404, dependencies: [6, 7, 22, 7131, 4406, 2] */;
+82 -79
View File
@@ -1,16 +1,20 @@
/* Metro module 14953; source: lib/TapSequencer.tsx; dependencies: [57, 6, 7, 31, 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 Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun113090(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:6, offset: 0x023e88e1, size: 243 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
let env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
let value = require(31) /* metro dependency 31 */;
let env0_1 = ClassCallCheck;
let value = ReactModule;
const env0_3 = value.useState;
const env0_4 = value.useEffect;
const env0_6 = {'long': 1250, 'short': 500};
value = _fun113091();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/TapSequencer.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/TapSequencer.tsx');
exports.TapSequencerPressType = {SHORT: 'short', LONG: 'long'};
exports.TapSequencer = value;
exports.useTapSequencer = function(a0) {
@@ -19,88 +23,87 @@ function _fun113090(global, require, importDefault, importAll, module, exports,
useEffect(_fun113101);
return property;
};
}
function _fun113091() { // fn#113091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:247, offset: 0x023e89d4, size: 138 bytes, params: 1, frame: 15
return CreateClass(TapSequencer, [{key: 'setTapSequenceHandlers', value: function(a0) {
this.tapSequenceHandlers = a0;
}}, {key: 'getState', value: value_113096}, {key: 'progressState', value: function(a0) {
var r1;
var object;
var value = null;
if (value == a0) {
r1 = value;
} else {
object = {handlers: a0};
object.timestamp = global.Date.now();
r1 = object;
}
this._state = r1;
}}, {key: 'handlePress', value: function(a0) {
var r4;
var value = this.getState(a0);
var progressState = this.progressState;
var property = value[a0];
var value2 = undefined;
if (property == null) {
r4 = value2;
} else {
value = property.call(value);
r4 = value;
}
Reflect.apply(progressState, this, [r4 ?? value2]);
return value2;
}}]);
function TapSequencer(a0) { // fn#113092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:268, offset: 0x023e8a5e, size: 76 bytes, params: 2, frame: 14
env1_1(this, TapSequencer);
this.tapSequenceHandlers = a0;
this._state = null;
this.handleShortPress = handleShortPress;
this.handleLongPress = handleLongPress;
function handleShortPress() { // fn#113093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:380, owner: TapSequencer.handleShortPress, offset: 0x023e8aaa, size: 33 bytes, params: 1, frame: 11
const handlePress = Module00057.handlePress;
const SHORT = env2_5.SHORT;
return Reflect.apply(handlePress, Module00057, [SHORT]);
}
function handleLongPress() { // fn#113094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:431, owner: TapSequencer.handleLongPress, offset: 0x023e8acb, size: 33 bytes, params: 1, frame: 11
const handlePress = Module00057.handlePress;
const LONG = env2_5.LONG;
return Reflect.apply(handlePress, Module00057, [LONG]);
}
function _fun113091() { // fn#113091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:247, offset: 0x023e89d4, size: 138 bytes, params: 1, frame: 15
return env0_2(TapSequencer, [{key: 'setTapSequenceHandlers', value: function(a0) {
this.tapSequenceHandlers = a0;
}}, {key: 'getState', value: value_113096}, {key: 'progressState', value: function(a0) {
var r1;
var object;
var value = null;
if (value == a0) {
r1 = value;
} else {
object = {handlers: a0};
object.timestamp = global.Date.now();
r1 = object;
}
this._state = r1;
}}, {key: 'handlePress', value: function(a0) {
var r4;
var value = this.getState(a0);
var progressState = this.progressState;
var property = value[a0];
var value2 = undefined;
if (property == null) {
r4 = value2;
} else {
value = property.call(value);
r4 = value;
function value_113096(a0) { // fn#113096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:562, offset: 0x023e8afc, size: 110 bytes, params: 2, frame: 12
const Date = global.Date;
const value = Date.now();
if (this._state === null || this._state.timestamp + env1_6[a0] < value) {
this._state = {handlers: this.tapSequenceHandlers, timestamp: value};
}
return this._state.handlers;
}
Reflect.apply(progressState, this, [r4 ?? value2]);
return value2;
}}]);
}
function useTapSequencer(a0) { // fn#113099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1095, offset: 0x023e8bea, size: 71 bytes, params: 2, frame: 15
const property = a0(useState(_fun113100), 1)[0];
useEffect(_fun113101);
return property;
}
function TapSequencer(a0) { // fn#113092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:268, offset: 0x023e8a5e, size: 76 bytes, params: 2, frame: 14
env1_1(this, TapSequencer);
this.tapSequenceHandlers = a0;
this._state = null;
this.handleShortPress = handleShortPress;
this.handleLongPress = handleLongPress;
}
function value_113096(a0) { // fn#113096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:562, offset: 0x023e8afc, size: 110 bytes, params: 2, frame: 12
const Date = global.Date;
const value = Date.now();
if (this._state === null || this._state.timestamp + env1_6[a0] < value) {
this._state = {handlers: this.tapSequenceHandlers, timestamp: value};
}
return this._state.handlers;
}
function _fun113100() { // fn#113100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1132, offset: 0x023e8c31, size: 66 bytes, params: 1, frame: 12
let value = environment.__proto__;
const binding = env1_7;
const r0 = typeof env0_0 === 'function' ? env0_0() : env0_0;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function useTapSequencer(a0) { // fn#113099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1095, offset: 0x023e8bea, size: 71 bytes, params: 2, frame: 15
const property = a0(useState(_fun113100), 1)[0];
useEffect(_fun113101);
return property;
function _fun113100() { // fn#113100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1132, offset: 0x023e8c31, size: 66 bytes, params: 1, frame: 12
let value = environment.__proto__;
const binding = env1_7;
const r0 = typeof Module00057 === 'function' ? Module00057() : Module00057;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function _fun113101() { // fn#113101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1194, offset: 0x023e8c73, size: 55 bytes, params: 1, frame: 13
const binding = env0_1;
binding.setTapSequenceHandlers(typeof env0_0 === 'function' ? env0_0() : env0_0);
}
function _fun113101() { // fn#113101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:1194, offset: 0x023e8c73, size: 55 bytes, params: 1, frame: 13
const binding = env0_1;
binding.setTapSequenceHandlers(typeof Module00057 === 'function' ? Module00057() : Module00057);
}
function handleShortPress() { // fn#113093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:380, owner: TapSequencer.handleShortPress, offset: 0x023e8aaa, size: 33 bytes, params: 1, frame: 11
const binding = env0_0;
const handlePress = binding.handlePress;
const SHORT = env2_5.SHORT;
return Reflect.apply(handlePress, binding, [SHORT]);
}
}
function TapSequencerHandleLongPress() { // fn#113094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15150:431, owner: TapSequencer.handleLongPress, offset: 0x023e8acb, size: 33 bytes, params: 1, frame: 11
const binding = env0_0;
const handlePress = binding.handlePress;
const LONG = env2_5.LONG;
return Reflect.apply(handlePress, binding, [LONG]);
}
global.__d(_fun113090, 14953, [57, 6, 7, 31, 2]) /* metro module 14953, dependencies: [57, 6, 7, 31, 2] */;
+251 -248
View File
@@ -1,101 +1,271 @@
/* Metro module 12407; source: lib/VideoHealthManager.tsx; dependencies: [6, 7, 661, 3, 12408, 4303, 672, 4140, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun94656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:6, offset: 0x0212289e, size: 204 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
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 env0_5 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
const value = _fun94657();
object2 = {'featureEnabled': null, 'windowLength': 5, 'allowedPoorFpsRatio': 1, 'fpsThreshold': 5,
object = {'featureEnabled': null, 'windowLength': 5, 'allowedPoorFpsRatio': 1, 'fpsThreshold': 5,
'backoffTimeSec': 15};
object2.featureEnabled = (require(4140) /* metro dependency 4140: PlatformUtils */).isMobile;
value.defaultConfig = object2;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VideoHealthManager.tsx');
object.featureEnabled = (require(4140) /* metro dependency 4140: PlatformUtils */).isMobile;
value.defaultConfig = object;
(FileImportTrackerModule).fileFinishedImporting('lib/VideoHealthManager.tsx');
exports.VideoHealthManager = value;
}
function _fun94657() { // fn#94657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:145, offset: 0x0212296a, size: 346 bytes, params: 1, frame: 15
return env0_4(VideoHealthManager, [{key: 'calculateFps', value: value_94659}, {key: 'updateFps',
value: value_94660}, {key: 'startReenableBackoffTimer', value: value_94662}, {key: 'queueReenable',
value: function(a0) {
this.enableQueue.push(a0);
this.tryReenableQueue();
}}, {key: 'tryReenableQueue', value: function() {
var property;
var value;
reducibleJoin7: while (true) {
if (this.disabled) {
break reducibleJoin7;
}
if (this.probingUserId != null) {
if (this.probingUserId in this.perUserFpsWindow) {
function _fun94657() { // fn#94657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:145, offset: 0x0212296a, size: 346 bytes, params: 1, frame: 15
return CreateClass(VideoHealthManager, [{key: 'calculateFps', value: value_94659}, {key: 'updateFps',
value: value_94660}, {key: 'startReenableBackoffTimer', value: value_94662}, {key: 'queueReenable',
value: function(a0) {
this.enableQueue.push(a0);
this.tryReenableQueue();
}}, {key: 'tryReenableQueue', value: function() {
var property;
var value;
reducibleJoin7: while (true) {
if (this.disabled) {
break reducibleJoin7;
}
}
property = this.enableQueue;
value = property.shift();
if (value == null) {
break reducibleJoin7;
}
if (this.reenableVideo(value)) {
break reducibleJoin7;
}
reducibleLoop5: while (true) {
if (this.probingUserId != null) {
if (this.probingUserId in this.perUserFpsWindow) {
break reducibleJoin7;
}
}
property = this.enableQueue;
value = property.shift();
if (value == null) {
break reducibleJoin7;
}
if (this.reenableVideo(value)) {
break reducibleJoin7;
}
continue reducibleLoop5;
reducibleLoop5: while (true) {
if (value == null) {
break reducibleJoin7;
}
if (this.reenableVideo(value)) {
break reducibleJoin7;
}
continue reducibleLoop5;
}
}
}}, {key: 'reenableVideo', value: value_94666}, {key: 'elapsedSeconds', value: function(a0, a1) {
return (a0 - a1) / 1000;
}}, {key: 'stateCleanupBeforeEnable', value: function(a0) {
this.logger.info('VideoHealthManager::stateCleanupBeforeEnable');
this.perUserFpsWindow[a0] = [];
this.prevFramesCodec[a0] = -1;
this.streamDisabledUsers.delete(a0);
}}, {key: 'getCurrentVideoToggleState', value: function(a0) {
return this.currentVideoAutoToggleState[a0];
}}, {key: 'createUser', value: value_94670}, {key: 'deleteUser', value: value_94671}, {key: 'disable',
value: function() {
var propertyName;
this.disabled = true;
for (propertyName in this.perUserFpsWindow) {
this.deleteUser(propertyName);
}
}}]);
function VideoHealthManager(a0, a1, a2, a3) { // fn#94658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:166, offset: 0x02122ac4, size: 330 bytes, params: 5, frame: 26
let value = environment.__proto__;
env1_3(this, VideoHealthManager);
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('VideoHealthManager');
this.logger = value;
this.disabled = false;
this.perUserFpsWindow = {};
this.prevFramesCodec = {};
this.prevTimestamp = {};
const Set = global.Set;
this.streamDisabledUsers = new Set();
this.retryBackoffCache = {};
this.timeoutIdCache = {};
this.currentVideoAutoToggleState = {};
this.enableQueue = [];
this.windowLength = a0;
this.fpsThreshold = a2;
const Math = global.Math;
this.fpsWindowBorderlineCount = Math.ceil(a0 * a1);
this.backoffTimeSec = a3;
let logger = this.logger;
logger.enableNativeLogger(true);
logger = this.logger;
logger.info('constructor with windowLength = ' + this.windowLength + ',\n fpsWindowBorderlineCount = ' + this.fpsWindowBorderlineCount + ',\n fpsThreshold = ' + this.fpsThreshold + ',\n backoffTimeSec = ' + a3);
}
function value_94660(a0, a1, a2) { // fn#94660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:1338, offset: 0x02122d01, size: 538 bytes, params: 4, frame: 19
var environment;
var perUserFpsWindow;
var property;
var length;
var windowLength;
var currentVideoAutoToggleState;
var AUTO_ENABLED;
var DISABLED;
if (!this.disabled) {
var streamDisabledUsers = this.streamDisabledUsers;
if (streamDisabledUsers.has(a0)) {
return undefined;
}
var value = this.calculateFps(a0, a1, a2);
if (value < 0) {
return undefined;
}
var Number = global.Number;
if (Number.isFinite(value)) {
perUserFpsWindow = this.perUserFpsWindow;
property = perUserFpsWindow[a0];
property.push(value);
perUserFpsWindow = this.perUserFpsWindow;
length = perUserFpsWindow[a0].length;
windowLength = this.windowLength;
if (length < windowLength) {
return undefined;
}
perUserFpsWindow = this.perUserFpsWindow;
length = perUserFpsWindow[a0].length;
windowLength = this.windowLength;
if (length > windowLength) {
this.perUserFpsWindow[a0].shift();
}
perUserFpsWindow = this.perUserFpsWindow;
property = perUserFpsWindow[a0];
length = property.filter(_fun94661).length;
if (length >= this.fpsWindowBorderlineCount) {
this.logger.info('' + a0 + ': detected poor network quality, turning off video');
this.streamDisabledUsers.add(a0);
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
value = environment.__proto__;
DISABLED = VideoToggleState.DISABLED;
currentVideoAutoToggleState[a0] = DISABLED;
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
DISABLED = VideoToggleState.DISABLED;
value(a0, DISABLED);
this.startReenableBackoffTimer(a0);
} else {
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
property = currentVideoAutoToggleState[a0];
value = environment.__proto__;
if (property === VideoToggleState.AUTO_PROBING) {
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
AUTO_ENABLED = VideoToggleState.AUTO_ENABLED;
currentVideoAutoToggleState[a0] = AUTO_ENABLED;
this.logger.info('acceptable conditions reached, will reset and send a AUTO_ENABLED for user ' + a0);
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
AUTO_ENABLED = VideoToggleState.AUTO_ENABLED;
value(a0, AUTO_ENABLED);
}
}
if (this.probingUserId === a0) {
this.probingUserId = undefined;
this.tryReenableQueue();
}
return undefined;
}
}
function _fun94661(a0) { // fn#94661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:1683, offset: 0x02122f1b, size: 22 bytes, params: 2, frame: 2
return a0 < env0_0.fpsThreshold;
}
}
function value_94662(a0) { // fn#94662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:2309, offset: 0x02122f31, size: 361 bytes, params: 2, frame: 21
var environment;
var r7;
var logger;
var retryBackoffCache;
var property;
var lastBackoffTime;
var expBackoffFactor;
var value;
var elapsedSeconds;
var value2;
var moduleValue;
var object;
const env0_1 = a0;
if (!this.disabled) {
logger = this.logger;
logger.info('startReenableBackoffTimer for user ' + a0);
retryBackoffCache = this.retryBackoffCache;
property = retryBackoffCache[a0];
lastBackoffTime = property.lastBackoffTime;
expBackoffFactor = property.expBackoffFactor;
value = 1;
if (lastBackoffTime === null) {
r7 = value;
} else if (expBackoffFactor > 16) {
r7 = value;
} else {
elapsedSeconds = this.elapsedSeconds;
value2 = environment.__proto__;
moduleValue = require(4303) /* metro dependency 4303: TimeUtils */;
r7 = Reflect.apply(elapsedSeconds, this, [moduleValue.now(),
lastBackoffTime]) > 600 ? value : expBackoffFactor * 2;
}
retryBackoffCache = this.retryBackoffCache;
object = {};
value = environment.__proto__;
object.lastBackoffTime = (require(4303) /* metro dependency 4303: TimeUtils */).now();
object.expBackoffFactor = r7;
retryBackoffCache[a0] = object;
value = r7 * this.backoffTimeSec * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
logger = this.logger;
logger.info('starting backoff timer with time = ' + value + ' milliseconds');
this.timeoutIdCache[a0] = global.setTimeout(_fun94663, value);
}
function _fun94663() { // fn#94663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:2774, offset: 0x0212309a, size: 28 bytes, params: 1, frame: 11
env0_0.queueReenable(env0_1);
}
}
function value_94666(a0) { // fn#94666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:3130, offset: 0x0212313c, size: 176 bytes, params: 2, frame: 22
var r0;
var logger;
var info;
var currentVideoAutoToggleState;
var AUTO_PROBING;
let value = a0 in this.perUserFpsWindow;
if (value) {
logger = this.logger;
info = logger.info;
value = environment.__proto__;
Reflect.apply(info, logger,
['reenableVideo called for user ' + a0 + ' - time = ' + (require(4303) /* metro dependency 4303: TimeUtils */).now()]);
this.stateCleanupBeforeEnable(a0);
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
AUTO_PROBING = VideoToggleState.AUTO_PROBING;
currentVideoAutoToggleState[a0] = AUTO_PROBING;
this.probingUserId = a0;
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
AUTO_PROBING = VideoToggleState.AUTO_PROBING;
value(a0, AUTO_PROBING);
value = true;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_94670(a0) { // fn#94670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:3784, offset: 0x02123263, size: 141 bytes, params: 2, frame: 14
var currentVideoAutoToggleState;
var value;
this.logger.info('VideoHealthManager::createUser ' + a0);
if (!(a0 in this.perUserFpsWindow)) {
this.perUserFpsWindow[a0] = [];
this.prevFramesCodec[a0] = -1;
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
value = environment.__proto__;
currentVideoAutoToggleState[a0] = VideoToggleState.NONE;
this.retryBackoffCache[a0] = {'lastBackoffTime': null, 'expBackoffFactor': 1};
}
}
}}, {key: 'reenableVideo', value: value_94666}, {key: 'elapsedSeconds', value: function(a0, a1) {
return (a0 - a1) / 1000;
}}, {key: 'stateCleanupBeforeEnable', value: function(a0) {
this.logger.info('VideoHealthManager::stateCleanupBeforeEnable');
this.perUserFpsWindow[a0] = [];
this.prevFramesCodec[a0] = -1;
this.streamDisabledUsers.delete(a0);
}}, {key: 'getCurrentVideoToggleState', value: function(a0) {
return this.currentVideoAutoToggleState[a0];
}}, {key: 'createUser', value: value_94670}, {key: 'deleteUser', value: value_94671}, {key: 'disable',
value: function() {
var propertyName;
this.disabled = true;
for (propertyName in this.perUserFpsWindow) {
this.deleteUser(propertyName);
}
}}]);
}
function VideoHealthManager(a0, a1, a2, a3) { // fn#94658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:166, offset: 0x02122ac4, size: 330 bytes, params: 5, frame: 26
let value = environment.__proto__;
env1_3(this, VideoHealthManager);
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('VideoHealthManager');
this.logger = value;
this.disabled = false;
this.perUserFpsWindow = {};
this.prevFramesCodec = {};
this.prevTimestamp = {};
const Set = global.Set;
this.streamDisabledUsers = new Set();
this.retryBackoffCache = {};
this.timeoutIdCache = {};
this.currentVideoAutoToggleState = {};
this.enableQueue = [];
this.windowLength = a0;
this.fpsThreshold = a2;
const Math = global.Math;
this.fpsWindowBorderlineCount = Math.ceil(a0 * a1);
this.backoffTimeSec = a3;
let logger = this.logger;
logger.enableNativeLogger(true);
logger = this.logger;
logger.info('constructor with windowLength = ' + this.windowLength + ',\n fpsWindowBorderlineCount = ' + this.fpsWindowBorderlineCount + ',\n fpsThreshold = ' + this.fpsThreshold + ',\n backoffTimeSec = ' + a3);
}
}
function value_94659(a0, a1, a2) { // fn#94659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:889, offset: 0x02122c0e, size: 243 bytes, params: 4, frame: 16
@@ -133,167 +303,6 @@ function value_94659(a0, a1, a2) { // fn#94659, source: /ci/build/discord/discor
return value;
}
function value_94660(a0, a1, a2) { // fn#94660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:1338, offset: 0x02122d01, size: 538 bytes, params: 4, frame: 19
var environment;
var perUserFpsWindow;
var property;
var length;
var windowLength;
var currentVideoAutoToggleState;
var AUTO_ENABLED;
var DISABLED;
if (!this.disabled) {
var streamDisabledUsers = this.streamDisabledUsers;
if (streamDisabledUsers.has(a0)) {
return undefined;
}
var value = this.calculateFps(a0, a1, a2);
if (value < 0) {
return undefined;
}
var Number = global.Number;
if (Number.isFinite(value)) {
perUserFpsWindow = this.perUserFpsWindow;
property = perUserFpsWindow[a0];
property.push(value);
perUserFpsWindow = this.perUserFpsWindow;
length = perUserFpsWindow[a0].length;
windowLength = this.windowLength;
if (length < windowLength) {
return undefined;
}
perUserFpsWindow = this.perUserFpsWindow;
length = perUserFpsWindow[a0].length;
windowLength = this.windowLength;
if (length > windowLength) {
this.perUserFpsWindow[a0].shift();
}
perUserFpsWindow = this.perUserFpsWindow;
property = perUserFpsWindow[a0];
length = property.filter(_fun94661).length;
if (length >= this.fpsWindowBorderlineCount) {
this.logger.info('' + a0 + ': detected poor network quality, turning off video');
this.streamDisabledUsers.add(a0);
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
value = environment.__proto__;
DISABLED = VideoToggleState.DISABLED;
currentVideoAutoToggleState[a0] = DISABLED;
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
DISABLED = VideoToggleState.DISABLED;
value(a0, DISABLED);
this.startReenableBackoffTimer(a0);
} else {
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
property = currentVideoAutoToggleState[a0];
value = environment.__proto__;
if (property === VideoToggleState.AUTO_PROBING) {
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
AUTO_ENABLED = VideoToggleState.AUTO_ENABLED;
currentVideoAutoToggleState[a0] = AUTO_ENABLED;
this.logger.info('acceptable conditions reached, will reset and send a AUTO_ENABLED for user ' + a0);
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
AUTO_ENABLED = VideoToggleState.AUTO_ENABLED;
value(a0, AUTO_ENABLED);
}
}
if (this.probingUserId === a0) {
this.probingUserId = undefined;
this.tryReenableQueue();
}
return undefined;
}
}
}
function value_94662(a0) { // fn#94662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:2309, offset: 0x02122f31, size: 361 bytes, params: 2, frame: 21
var environment;
var r7;
var logger;
var retryBackoffCache;
var property;
var lastBackoffTime;
var expBackoffFactor;
var value;
var elapsedSeconds;
var value2;
var moduleValue;
var object2;
const env0_1 = a0;
if (!this.disabled) {
logger = this.logger;
logger.info('startReenableBackoffTimer for user ' + a0);
retryBackoffCache = this.retryBackoffCache;
property = retryBackoffCache[a0];
lastBackoffTime = property.lastBackoffTime;
expBackoffFactor = property.expBackoffFactor;
value = 1;
if (lastBackoffTime === null) {
r7 = value;
} else if (expBackoffFactor > 16) {
r7 = value;
} else {
elapsedSeconds = this.elapsedSeconds;
value2 = environment.__proto__;
moduleValue = require(4303) /* metro dependency 4303: TimeUtils */;
r7 = Reflect.apply(elapsedSeconds, this, [moduleValue.now(),
lastBackoffTime]) > 600 ? value : expBackoffFactor * 2;
}
retryBackoffCache = this.retryBackoffCache;
object2 = {};
value = environment.__proto__;
object2.lastBackoffTime = (require(4303) /* metro dependency 4303: TimeUtils */).now();
object2.expBackoffFactor = r7;
retryBackoffCache[a0] = object2;
value = r7 * this.backoffTimeSec * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND;
logger = this.logger;
logger.info('starting backoff timer with time = ' + value + ' milliseconds');
this.timeoutIdCache[a0] = global.setTimeout(_fun94663, value);
}
}
function value_94666(a0) { // fn#94666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:3130, offset: 0x0212313c, size: 176 bytes, params: 2, frame: 22
var r0;
var logger;
var info;
var currentVideoAutoToggleState;
var AUTO_PROBING;
let value = a0 in this.perUserFpsWindow;
if (value) {
logger = this.logger;
info = logger.info;
value = environment.__proto__;
Reflect.apply(info, logger,
['reenableVideo called for user ' + a0 + ' - time = ' + (require(4303) /* metro dependency 4303: TimeUtils */).now()]);
this.stateCleanupBeforeEnable(a0);
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
AUTO_PROBING = VideoToggleState.AUTO_PROBING;
currentVideoAutoToggleState[a0] = AUTO_PROBING;
this.probingUserId = a0;
value = importDefault(12408) /* metro dependency 12408: dispatchAutoDisableVideo */;
AUTO_PROBING = VideoToggleState.AUTO_PROBING;
value(a0, AUTO_PROBING);
value = true;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_94670(a0) { // fn#94670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:3784, offset: 0x02123263, size: 141 bytes, params: 2, frame: 14
var currentVideoAutoToggleState;
var value;
this.logger.info('VideoHealthManager::createUser ' + a0);
if (!(a0 in this.perUserFpsWindow)) {
this.perUserFpsWindow[a0] = [];
this.prevFramesCodec[a0] = -1;
currentVideoAutoToggleState = this.currentVideoAutoToggleState;
value = environment.__proto__;
currentVideoAutoToggleState[a0] = VideoToggleState.NONE;
this.retryBackoffCache[a0] = {'lastBackoffTime': null, 'expBackoffFactor': 1};
}
}
function value_94671(a0) { // fn#94671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:4074, offset: 0x021232f0, size: 166 bytes, params: 2, frame: 15
this.logger.info('VideoHealthManager::deleteUser ' + a0);
delete this.perUserFpsWindow[a0];
@@ -309,11 +318,5 @@ function value_94671(a0) { // fn#94671, source: /ci/build/discord/discord/discor
delete this.timeoutIdCache[a0];
}
function _fun94661(a0) { // fn#94661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:1683, offset: 0x02122f1b, size: 22 bytes, params: 2, frame: 2
return a0 < env0_0.fpsThreshold;
}
function _fun94663() { // fn#94663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12593:2774, offset: 0x0212309a, size: 28 bytes, params: 1, frame: 11
env0_0.queueReenable(env0_1);
}
global.__d(_fun94656, 12407, [6, 7, 661, 3, 12408, 4303, 672, 4140,
2]) /* metro module 12407, dependencies: [6, 7, 661, 3, 12408, 4303, 672, 4140, 2] */;
+1386 -1366
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+98 -83
View File
@@ -1,99 +1,114 @@
/* Metro module 10680; source: lib/VideoSpinnerTimer.tsx; dependencies: [6, 7, 1226, 1379, 4401, 4294, 4297, 661, 3, 4303, 683, 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 AuthenticationStore from '../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import RTCConnectionStore from '../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoiceStateStore from '../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import NetworkStore from '../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun82116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:6, offset: 0x01eebbcd, size: 350 bytes, params: 8, frame: 20
const env0_0 = require;
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 authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const Map = global.Map;
let map = new Map();
map = _fun82117();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VideoSpinnerTimer.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/VideoSpinnerTimer.tsx');
exports.VideoSpinnerContext = {SELF_VIDEO: 'self_video', SELF_STREAM: 'self_stream', REMOTE_VIDEO: 'remote_video',
REMOTE_STREAM: 'remote_stream', CHANGE_VIDEO_BACKGROUND: 'change_video_background',
REPLAY_VIDEO_STREAM: 'replay_video_stream'};
exports.VideoSpinnerTimer = map;
}
function _fun82117() { // fn#82117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:447, offset: 0x01eebd2b, size: 88 bytes, params: 1, frame: 15
return env0_4(VideoSpinnerTimer, [{key: 'onSpinnerStarted', value: value_82119}, {key: 'trackSpinnerDuration',
value: value_82120}]);
}
function VideoSpinnerTimer(a0) { // fn#82118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:468, offset: 0x01eebd83, size: 84 bytes, params: 2, frame: 14
let value = environment.__proto__;
env1_3(this, VideoSpinnerTimer);
this.spinnerVisibleStart = null;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value(a0);
this.logger = value;
}
function value_82119() { // fn#82119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:615, offset: 0x01eebdd7, size: 59 bytes, params: 1, frame: 12
var value;
if (this.spinnerVisibleStart == null) {
value = environment.__proto__;
value = require(4303) /* metro dependency 4303: TimeUtils */;
this.spinnerVisibleStart = value.now();
}
}
function value_82120(a0, a1, a2) { // fn#82120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:735, offset: 0x01eebe12, size: 575 bytes, params: 4, frame: 27
var r6;
var value2;
var binding;
var value3;
var value4;
var value5;
var value7;
var guildId;
var value9;
var channel;
var track;
var VIDEO_SPINNER_SHOWN_V2;
var object2;
const spinnerVisibleStart = this.spinnerVisibleStart;
let value = null;
if (value != spinnerVisibleStart) {
value2 = environment.__proto__;
binding = env1_11;
value3 = binding.get(a2);
value4 = 0;
value5 = (value != value3 ? value3 : value4) + 1;
binding = env1_11;
binding.set(a2, value5);
value7 = (require(4303) /* metro dependency 4303: TimeUtils */).now() - this.spinnerVisibleStart;
this.spinnerVisibleStart = value;
if (value7 < value4) {
this.logger.warn('spinner duration is negative: ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
} else {
this.logger.info('spinner visible for ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
guildId = RTCConnectionStore.getGuildId();
value9 = VoiceStateStore.getUserVoiceChannelId(guildId, AuthenticationStore.getId());
channel = ChannelStore.getChannel(value9);
r6 = value != channel ? channel.isGuildVoice() ? 'guild_voice' : channel.isGuildStageVoice() ? 'is_stage_channel' : channel.isDM() ? 'dm' : channel.isGroupDM() ? 'group_dm' : value : value;
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = value.track;
VIDEO_SPINNER_SHOWN_V2 = AnalyticEvents.VIDEO_SPINNER_SHOWN_V2;
object2 = {video_spinner_context: a0, duration_video_spinner_visible_ms: value7};
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
object2.event_count_for_stream = value5;
object2.guild_id = guildId;
object2.channel_id = value9;
object2.channel_type = r6;
object2.spinning_user_id = a1;
object2.connection_type = NetworkStore.getType();
object2.effective_connection_speed = NetworkStore.getEffectiveConnectionSpeed();
object2.service_provider = NetworkStore.getServiceProvider();
Reflect.apply(track, value, [VIDEO_SPINNER_SHOWN_V2, object2]);
function _fun82117() { // fn#82117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:447, offset: 0x01eebd2b, size: 88 bytes, params: 1, frame: 15
return CreateClass(VideoSpinnerTimer, [{key: 'onSpinnerStarted', value: value_82119}, {key: 'trackSpinnerDuration',
value: value_82120}]);
function VideoSpinnerTimer(a0) { // fn#82118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:468, offset: 0x01eebd83, size: 84 bytes, params: 2, frame: 14
let value = environment.__proto__;
env1_3(this, VideoSpinnerTimer);
this.spinnerVisibleStart = null;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value(a0);
this.logger = value;
}
function value_82119() { // fn#82119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:615, offset: 0x01eebdd7, size: 59 bytes, params: 1, frame: 12
var value;
if (this.spinnerVisibleStart == null) {
value = environment.__proto__;
value = require(4303) /* metro dependency 4303: TimeUtils */;
this.spinnerVisibleStart = value.now();
}
}
function value_82120(a0, a1, a2) { // fn#82120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10866:735, offset: 0x01eebe12, size: 575 bytes, params: 4, frame: 27
var r6;
var value2;
var binding;
var value3;
var value4;
var value5;
var value7;
var rtcConnectionStoreBinding;
var guildId;
var voiceStateStoreBinding;
var getUserVoiceChannelId;
var authenticationStoreBinding;
var value9;
var channel;
var track;
var VIDEO_SPINNER_SHOWN_V2;
var object;
var networkStoreBinding;
const spinnerVisibleStart = this.spinnerVisibleStart;
let value = null;
if (value != spinnerVisibleStart) {
value2 = environment.__proto__;
binding = env1_11;
value3 = binding.get(a2);
value4 = 0;
value5 = (value != value3 ? value3 : value4) + 1;
binding = env1_11;
binding.set(a2, value5);
value7 = (require(4303) /* metro dependency 4303: TimeUtils */).now() - this.spinnerVisibleStart;
this.spinnerVisibleStart = value;
if (value7 < value4) {
this.logger.warn('spinner duration is negative: ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
} else {
this.logger.info('spinner visible for ' + value7 + ' ms\n [' + a0 + ', count for stream: ' + value5 + ']');
rtcConnectionStoreBinding = RTCConnectionStore;
guildId = rtcConnectionStoreBinding.getGuildId();
voiceStateStoreBinding = VoiceStateStore;
getUserVoiceChannelId = voiceStateStoreBinding.getUserVoiceChannelId;
authenticationStoreBinding = AuthenticationStore;
value9 = Reflect.apply(getUserVoiceChannelId, voiceStateStoreBinding, [guildId,
authenticationStoreBinding.getId()]);
channel = ChannelStore.getChannel(value9);
r6 = value != channel ? channel.isGuildVoice() ? 'guild_voice' : channel.isGuildStageVoice() ? 'is_stage_channel' : channel.isDM() ? 'dm' : channel.isGroupDM() ? 'group_dm' : value : value;
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = value.track;
VIDEO_SPINNER_SHOWN_V2 = AnalyticEvents.VIDEO_SPINNER_SHOWN_V2;
object = {video_spinner_context: a0, duration_video_spinner_visible_ms: value7};
object.rtc_connection_id = rtcConnectionStoreBinding.getRTCConnectionId();
object.media_session_id = rtcConnectionStoreBinding.getMediaSessionId();
object.event_count_for_stream = value5;
object.guild_id = guildId;
object.channel_id = value9;
object.channel_type = r6;
object.spinning_user_id = a1;
networkStoreBinding = NetworkStore;
object.connection_type = networkStoreBinding.getType();
object.effective_connection_speed = networkStoreBinding.getEffectiveConnectionSpeed();
object.service_provider = networkStoreBinding.getServiceProvider();
Reflect.apply(track, value, [VIDEO_SPINNER_SHOWN_V2, object]);
}
}
}
}
}
global.__d(_fun82116, 10680, [6, 7, 1226, 1379, 4401, 4294, 4297, 661, 3, 4303, 683,
2]) /* metro module 10680, dependencies: [6, 7, 1226, 1379, 4401, 4294, 4297, 661, 3, 4303, 683, 2] */;
+244 -240
View File
@@ -1,124 +1,259 @@
/* Metro module 12405; source: lib/VoiceDuration.tsx; dependencies: [6, 7, 4303, 4464, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BaseConnectionEventModule from '../external/discord_common/js/packages/media-engine/BaseConnectionEvent.tsx'; /* Metro dependency 4464 */
function _fun94577(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:6, offset: 0x0211dd63, size: 162 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = [1, 100, 1000, 10000];
const env0_5 = [100, 500, 1000, 5000];
const value = _fun94578();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VoiceDuration.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/VoiceDuration.tsx');
exports.default = value;
}
function _fun94578() { // fn#94578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:156, offset: 0x0211de05, size: 313 bytes, params: 1, frame: 15
return env0_3(VoiceDuration, [{key: 'start', value: value_94580}, {key: 'onSpeaking', value: value_94584},
{key: 'onListening', value: value_94585}, {key: 'onMuted', value: function(a0) {
var muted = this.muted;
if (a0) {
muted.start();
} else {
muted.stop();
function _fun94578() { // fn#94578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:156, offset: 0x0211de05, size: 313 bytes, params: 1, frame: 15
return CreateClass(VoiceDuration, [{key: 'start', value: value_94580}, {key: 'onSpeaking', value: value_94584},
{key: 'onListening', value: value_94585}, {key: 'onMuted', value: function(a0) {
var muted = this.muted;
if (a0) {
muted.start();
} else {
muted.stop();
}
}}, {key: 'onDeafened', value: function(a0) {
var deafened = this.deafened;
if (a0) {
deafened.start();
} else {
deafened.stop();
}
}}, {key: 'computeSpeakingDurationMilestones', value: value_94588}, {key: 'addSpeechChunk', value: value_94592},
{key: 'setNoiseCancellationEnabled', value: function(a0) {
this.noiseCancellation.value = a0;
}}, {key: 'setSpatialAudioEnabled', value: function(a0) {
this.spatialAudio.value = a0;
}}, {key: 'stop', value: value_94597}, {key: 'getDurationStats', value: value_94598}]);
function VoiceDuration(a0, a1) { // fn#94579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:177, offset: 0x0211df3e, size: 634 bytes, params: 3, frame: 19
let value = a2;
const r4 = value !== undefined ? value : (require(4303) /* metro dependency 4303: TimeUtils */).TimeStampProducer;
value = environment.__proto__;
env1_2(this, VoiceDuration);
this.userId = a0;
this.connection = a1;
this.timestampProducer = r4;
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
this.listeningUsers = set instanceof Object ? set : value3;
let Map = global.Map;
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
let map = new Map();
this.timesUntilSpeakingDurationMilestonesMs = map instanceof Object ? map : value5;
Map = global.Map;
const value7 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
this.speakingMinimumChunks = map instanceof Object ? map : value7;
Map = global.Map;
const value9 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
this.speakingMinimumChunkCounts = map instanceof Object ? map : value9;
this.speechEventCount = 0;
const StopWatch = (require(4303) /* metro dependency 4303: TimeUtils */).StopWatch;
let timestampProducer = this.timestampProducer;
let stopWatch = new StopWatch(timestampProducer);
this.listening = stopWatch;
this.speaking = new StopWatch(this.timestampProducer);
this.participation = new StopWatch(this.timestampProducer);
this.connected = new StopWatch(this.timestampProducer);
this.muted = new StopWatch(this.timestampProducer);
this.deafened = new StopWatch(this.timestampProducer);
const DurationEnabled = (require(4303) /* metro dependency 4303: TimeUtils */).DurationEnabled;
stopWatch = a1.getNoiseCancellation();
timestampProducer = this.timestampProducer;
const value11 = Object.create(DurationEnabled.prototype, {constructor: {value: DurationEnabled}});
let durationEnabled = new DurationEnabled(stopWatch, timestampProducer);
this.noiseCancellation = durationEnabled instanceof Object ? durationEnabled : value11;
stopWatch = a1.getSpatialAudioEnabled();
timestampProducer = this.timestampProducer;
const value12 = Object.create(DurationEnabled.prototype, {constructor: {value: DurationEnabled}});
durationEnabled = new DurationEnabled(stopWatch, timestampProducer);
this.spatialAudio = durationEnabled instanceof Object ? durationEnabled : value12;
}
}}, {key: 'onDeafened', value: function(a0) {
var deafened = this.deafened;
if (a0) {
deafened.start();
} else {
deafened.stop();
function value_94580() { // fn#94580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1082, offset: 0x0211e1b8, size: 420 bytes, params: 1, frame: 21
var environment;
let value = a0;
const value2 = a1;
const r8 = value !== undefined ? value : false;
const r7 = value2 !== undefined ? value2 : false;
this.listeningUsers.clear();
this.listening.reset();
this.speaking.reset();
this.participation.reset();
this.muted.reset();
this.deafened.reset();
this.connected.reset();
this.noiseCancellation.reset();
this.spatialAudio.reset();
this.timesUntilSpeakingDurationMilestonesMs.clear();
this.speakingMinimumChunks.clear();
this.speakingMinimumChunkCounts.clear();
this.speechEventCount = 0;
this.connected.start();
let connection = this.connection;
let on = connection.on;
value = environment.__proto__;
const BaseConnectionEvent = (BaseConnectionEventModule).BaseConnectionEvent;
const Speaking = BaseConnectionEvent.Speaking;
Reflect.apply(on, connection, [Speaking, _fun94581]);
this.onMuted(r8);
this.onDeafened(r7);
connection = this.connection;
on = connection.on;
const Mute = BaseConnectionEvent.Mute;
Reflect.apply(on, connection, [Mute, _fun94582]);
connection = this.connection;
on = connection.on;
const Deafen = BaseConnectionEvent.Deafen;
Reflect.apply(on, connection, [Deafen, _fun94583]);
function _fun94581(a0, a1) { // fn#94581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1554, offset: 0x0211e35c, size: 75 bytes, params: 3, frame: 15
const userId = env0_0.userId;
if (userId === a0) {
env0_0.onSpeaking(a1 !== 0);
} else {
env0_0.onListening(a1 !== 0, a0);
}
}
function _fun94582(a0) { // fn#94582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1718, offset: 0x0211e3a7, size: 25 bytes, params: 2, frame: 11
env0_0.onMuted(a0);
}
function _fun94583(a0) { // fn#94583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1796, offset: 0x0211e3c0, size: 25 bytes, params: 2, frame: 11
env0_0.onDeafened(a0);
}
}
}}, {key: 'computeSpeakingDurationMilestones', value: value_94588}, {key: 'addSpeechChunk', value: value_94592},
{key: 'setNoiseCancellationEnabled', value: function(a0) {
this.noiseCancellation.value = a0;
}}, {key: 'setSpatialAudioEnabled', value: function(a0) {
this.spatialAudio.value = a0;
}}, {key: 'stop', value: value_94597}, {key: 'getDurationStats', value: value_94598}]);
}
function VoiceDuration(a0, a1) { // fn#94579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:177, offset: 0x0211df3e, size: 634 bytes, params: 3, frame: 19
let value = a2;
const r4 = value !== undefined ? value : (require(4303) /* metro dependency 4303: TimeUtils */).TimeStampProducer;
value = environment.__proto__;
env1_2(this, VoiceDuration);
this.userId = a0;
this.connection = a1;
this.timestampProducer = r4;
const Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
this.listeningUsers = set instanceof Object ? set : value3;
let Map = global.Map;
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
let map = new Map();
this.timesUntilSpeakingDurationMilestonesMs = map instanceof Object ? map : value5;
Map = global.Map;
const value7 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
this.speakingMinimumChunks = map instanceof Object ? map : value7;
Map = global.Map;
const value9 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
this.speakingMinimumChunkCounts = map instanceof Object ? map : value9;
this.speechEventCount = 0;
const StopWatch = (require(4303) /* metro dependency 4303: TimeUtils */).StopWatch;
let timestampProducer = this.timestampProducer;
let stopWatch = new StopWatch(timestampProducer);
this.listening = stopWatch;
this.speaking = new StopWatch(this.timestampProducer);
this.participation = new StopWatch(this.timestampProducer);
this.connected = new StopWatch(this.timestampProducer);
this.muted = new StopWatch(this.timestampProducer);
this.deafened = new StopWatch(this.timestampProducer);
const DurationEnabled = (require(4303) /* metro dependency 4303: TimeUtils */).DurationEnabled;
stopWatch = a1.getNoiseCancellation();
timestampProducer = this.timestampProducer;
const value11 = Object.create(DurationEnabled.prototype, {constructor: {value: DurationEnabled}});
let durationEnabled = new DurationEnabled(stopWatch, timestampProducer);
this.noiseCancellation = durationEnabled instanceof Object ? durationEnabled : value11;
stopWatch = a1.getSpatialAudioEnabled();
timestampProducer = this.timestampProducer;
const value12 = Object.create(DurationEnabled.prototype, {constructor: {value: DurationEnabled}});
durationEnabled = new DurationEnabled(stopWatch, timestampProducer);
this.spatialAudio = durationEnabled instanceof Object ? durationEnabled : value12;
}
function value_94588(a0, a1, a2) { // fn#94588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2646, offset: 0x0211e567, size: 132 bytes, params: 4, frame: 13
var environment;
var value;
const env0_1 = a0;
const env0_2 = a1;
const env0_3 = a2;
if (a0 != null) {
if (a1 != null) {
value = this.speaking.elapsed();
var env0_4 = value.asMilliseconds();
value = environment.__proto__;
value = env1_4.filter(_fun94589);
value = value.filter(_fun94590);
value.forEach(_fun94591);
}
}
function _fun94589(a0) { // fn#94589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2740, offset: 0x0211e5eb, size: 31 bytes, params: 2, frame: 11
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
return !timesUntilSpeakingDurationMilestonesMs.has(a0);
}
function _fun94590(a0) { // fn#94590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2805, offset: 0x0211e60a, size: 16 bytes, params: 2, frame: 2
return env0_4 >= a0;
}
function _fun94591(a0) { // fn#94591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2824, offset: 0x0211e61a, size: 55 bytes, params: 2, frame: 15
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
timesUntilSpeakingDurationMilestonesMs.set(a0, require - env0_1 + a0 - importDefault);
}
}
function value_94592() { // fn#94592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2921, offset: 0x0211e651, size: 95 bytes, params: 1, frame: 12
var environment;
var timestampProducer;
var value;
const lastStartTime = this.speaking.lastStartTime;
if (lastStartTime != null) {
timestampProducer = this.timestampProducer;
var env0_1 = timestampProducer.now() - lastStartTime;
value = environment.__proto__;
value = env1_5.filter(_fun94593);
value.forEach(_fun94594);
}
function _fun94593(a0) { // fn#94593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3025, offset: 0x0211e6b0, size: 16 bytes, params: 2, frame: 2
return env0_1 >= a0;
}
function _fun94594(a0) { // fn#94594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3044, offset: 0x0211e6c0, size: 129 bytes, params: 2, frame: 18
const value2 = env0_0.speakingMinimumChunks.get(a0);
const value3 = 0;
const r8 = value2 ?? value3;
const binding = env0_0;
binding.speakingMinimumChunks.set(a0, r8 + env0_1);
env0_0.speakingMinimumChunkCounts.set(a0, (binding.speakingMinimumChunkCounts.get(a0) ?? value3) + 1);
}
}
function value_94598() { // fn#94598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3804, offset: 0x0211e819, size: 464 bytes, params: 1, frame: 17
var environment;
const lastStartTime = this.speaking.lastStartTime;
let value = this.timestampProducer.now();
if (lastStartTime != null) {
value -= lastStartTime;
}
this.computeSpeakingDurationMilestones(this.connected.lastStartTime, this.speaking.lastStartTime,
this.speaking.lastElapsed);
const object = {};
object.duration_listening_ms = this.listening.elapsed().asMilliseconds();
object.duration_speaking_ms = this.speaking.elapsed().asMilliseconds();
object.duration_participation_ms = this.participation.elapsed().asMilliseconds();
object.duration_connected_ms = this.connected.elapsed().asMilliseconds();
object.duration_muted_ms = this.muted.elapsed().asMilliseconds();
object.duration_deafened_ms = this.deafened.elapsed().asMilliseconds();
object.duration_noise_cancellation_enabled_ms = this.noiseCancellation.totalDuration();
object.duration_spatial_ms = this.spatialAudio.totalDuration();
object.speech_event_count = this.speechEventCount;
value = environment.__proto__;
const value3 = env1_4.filter(_fun94599);
copyDataProperties(object, value3.reduce(_fun94600, {}), undefined);
value = env1_5.filter(_fun94601);
copyDataProperties(object, value.reduce(_fun94602, {}), undefined);
return object;
function _fun94599(a0) { // fn#94599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4593, offset: 0x0211e9e9, size: 28 bytes, params: 2, frame: 11
return env0_0.timesUntilSpeakingDurationMilestonesMs.has(a0);
}
function _fun94600(a0, a1) { // fn#94600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4657, offset: 0x0211ea05, size: 76 bytes, params: 3, frame: 14
const object = {};
copyDataProperties(object, a0, a1);
const value = 'time_to_first_' + a1 + 'ms_speech_ms';
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
const get = timesUntilSpeakingDurationMilestonesMs.get;
object[value] = Reflect.apply(get, timesUntilSpeakingDurationMilestonesMs, [a1]);
return object;
}
function _fun94601(a0) { // fn#94601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4777, offset: 0x0211ea51, size: 39 bytes, params: 2, frame: 12
return env0_0.speakingMinimumChunks.has(a0) || env0_1 >= a0;
}
function _fun94602(a0, a1) { // fn#94602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4830, offset: 0x0211ea78, size: 195 bytes, params: 3, frame: 19
const object = {};
copyDataProperties(object, a0, undefined);
const value = 'duration_speaking_gte_' + a1 + 'ms_ms';
const value3 = env0_0.speakingMinimumChunks.get(a1);
const value4 = 0;
object[value] = (value3 ?? value4) + (env0_1 >= a1 ? env0_1 : value4);
object['speech_event_count_gte_' + a1 + 'ms'] = (env0_0.speakingMinimumChunkCounts.get(a1) ?? value4) + (env0_1 >= a1 ? 1 : value4);
return object;
}
}
}
function value_94580() { // fn#94580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1082, offset: 0x0211e1b8, size: 420 bytes, params: 1, frame: 21
var environment;
let value = a0;
const value2 = a1;
const r8 = value !== undefined ? value : false;
const r7 = value2 !== undefined ? value2 : false;
this.listeningUsers.clear();
this.listening.reset();
this.speaking.reset();
this.participation.reset();
this.muted.reset();
this.deafened.reset();
this.connected.reset();
this.noiseCancellation.reset();
this.spatialAudio.reset();
this.timesUntilSpeakingDurationMilestonesMs.clear();
this.speakingMinimumChunks.clear();
this.speakingMinimumChunkCounts.clear();
this.speechEventCount = 0;
this.connected.start();
let connection = this.connection;
let on = connection.on;
value = environment.__proto__;
const BaseConnectionEvent = (require(4464) /* metro dependency 4464: BaseConnectionEvent */).BaseConnectionEvent;
const Speaking = BaseConnectionEvent.Speaking;
Reflect.apply(on, connection, [Speaking, _fun94581]);
this.onMuted(r8);
this.onDeafened(r7);
connection = this.connection;
on = connection.on;
const Mute = BaseConnectionEvent.Mute;
Reflect.apply(on, connection, [Mute, _fun94582]);
connection = this.connection;
on = connection.on;
const Deafen = BaseConnectionEvent.Deafen;
Reflect.apply(on, connection, [Deafen, _fun94583]);
}
function value_94584(a0) { // fn#94584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1848, offset: 0x0211e3d9, size: 170 bytes, params: 2, frame: 16
@@ -166,38 +301,6 @@ function value_94585(a0, a1) { // fn#94585, source: /ci/build/discord/discord/di
}
}
function value_94588(a0, a1, a2) { // fn#94588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2646, offset: 0x0211e567, size: 132 bytes, params: 4, frame: 13
var environment;
var value;
const env0_1 = a0;
const env0_2 = a1;
const env0_3 = a2;
if (a0 != null) {
if (a1 != null) {
value = this.speaking.elapsed();
var env0_4 = value.asMilliseconds();
value = environment.__proto__;
value = env1_4.filter(_fun94589);
value = value.filter(_fun94590);
value.forEach(_fun94591);
}
}
}
function value_94592() { // fn#94592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2921, offset: 0x0211e651, size: 95 bytes, params: 1, frame: 12
var environment;
var timestampProducer;
var value;
const lastStartTime = this.speaking.lastStartTime;
if (lastStartTime != null) {
timestampProducer = this.timestampProducer;
var env0_1 = timestampProducer.now() - lastStartTime;
value = environment.__proto__;
value = env1_5.filter(_fun94593);
value.forEach(_fun94594);
}
}
function value_94597() { // fn#94597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3432, offset: 0x0211e76d, size: 172 bytes, params: 1, frame: 16
this.addSpeechChunk();
const lastStartTime = this.connected.lastStartTime;
@@ -213,103 +316,4 @@ function value_94597() { // fn#94597, source: /ci/build/discord/discord/discord_
this.computeSpeakingDurationMilestones(lastStartTime, lastStartTime2, lastElapsed);
}
function value_94598() { // fn#94598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3804, offset: 0x0211e819, size: 464 bytes, params: 1, frame: 17
var environment;
const lastStartTime = this.speaking.lastStartTime;
let value = this.timestampProducer.now();
if (lastStartTime != null) {
value -= lastStartTime;
}
this.computeSpeakingDurationMilestones(this.connected.lastStartTime, this.speaking.lastStartTime,
this.speaking.lastElapsed);
const object2 = {};
object2.duration_listening_ms = this.listening.elapsed().asMilliseconds();
object2.duration_speaking_ms = this.speaking.elapsed().asMilliseconds();
object2.duration_participation_ms = this.participation.elapsed().asMilliseconds();
object2.duration_connected_ms = this.connected.elapsed().asMilliseconds();
object2.duration_muted_ms = this.muted.elapsed().asMilliseconds();
object2.duration_deafened_ms = this.deafened.elapsed().asMilliseconds();
object2.duration_noise_cancellation_enabled_ms = this.noiseCancellation.totalDuration();
object2.duration_spatial_ms = this.spatialAudio.totalDuration();
object2.speech_event_count = this.speechEventCount;
value = environment.__proto__;
const value3 = env1_4.filter(_fun94599);
copyDataProperties(object2, value3.reduce(_fun94600, {}), undefined);
value = env1_5.filter(_fun94601);
copyDataProperties(object2, value.reduce(_fun94602, {}), undefined);
return object2;
}
function _fun94581(a0, a1) { // fn#94581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1554, offset: 0x0211e35c, size: 75 bytes, params: 3, frame: 15
const userId = env0_0.userId;
if (userId === a0) {
env0_0.onSpeaking(a1 !== 0);
} else {
env0_0.onListening(a1 !== 0, a0);
}
}
function _fun94582(a0) { // fn#94582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1718, offset: 0x0211e3a7, size: 25 bytes, params: 2, frame: 11
env0_0.onMuted(a0);
}
function _fun94583(a0) { // fn#94583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:1796, offset: 0x0211e3c0, size: 25 bytes, params: 2, frame: 11
env0_0.onDeafened(a0);
}
function _fun94589(a0) { // fn#94589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2740, offset: 0x0211e5eb, size: 31 bytes, params: 2, frame: 11
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
return !timesUntilSpeakingDurationMilestonesMs.has(a0);
}
function _fun94590(a0) { // fn#94590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2805, offset: 0x0211e60a, size: 16 bytes, params: 2, frame: 2
return env0_4 >= a0;
}
function _fun94591(a0) { // fn#94591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:2824, offset: 0x0211e61a, size: 55 bytes, params: 2, frame: 15
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
timesUntilSpeakingDurationMilestonesMs.set(a0, require - env0_1 + a0 - importDefault);
}
function _fun94593(a0) { // fn#94593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3025, offset: 0x0211e6b0, size: 16 bytes, params: 2, frame: 2
return env0_1 >= a0;
}
function _fun94594(a0) { // fn#94594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:3044, offset: 0x0211e6c0, size: 129 bytes, params: 2, frame: 18
const value2 = env0_0.speakingMinimumChunks.get(a0);
const value3 = 0;
const r8 = value2 ?? value3;
const binding = env0_0;
binding.speakingMinimumChunks.set(a0, r8 + env0_1);
env0_0.speakingMinimumChunkCounts.set(a0, (binding.speakingMinimumChunkCounts.get(a0) ?? value3) + 1);
}
function _fun94599(a0) { // fn#94599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4593, offset: 0x0211e9e9, size: 28 bytes, params: 2, frame: 11
return env0_0.timesUntilSpeakingDurationMilestonesMs.has(a0);
}
function _fun94600(a0, a1) { // fn#94600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4657, offset: 0x0211ea05, size: 76 bytes, params: 3, frame: 14
const object2 = {};
copyDataProperties(object2, a0, a1);
const value = 'time_to_first_' + a1 + 'ms_speech_ms';
const timesUntilSpeakingDurationMilestonesMs = env0_0.timesUntilSpeakingDurationMilestonesMs;
const get = timesUntilSpeakingDurationMilestonesMs.get;
object2[value] = Reflect.apply(get, timesUntilSpeakingDurationMilestonesMs, [a1]);
return object2;
}
function _fun94601(a0) { // fn#94601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4777, offset: 0x0211ea51, size: 39 bytes, params: 2, frame: 12
return env0_0.speakingMinimumChunks.has(a0) || env0_1 >= a0;
}
function _fun94602(a0, a1) { // fn#94602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12591:4830, offset: 0x0211ea78, size: 195 bytes, params: 3, frame: 19
const object2 = {};
copyDataProperties(object2, a0, undefined);
const value = 'duration_speaking_gte_' + a1 + 'ms_ms';
const value3 = env0_0.speakingMinimumChunks.get(a1);
const value4 = 0;
object2[value] = (value3 ?? value4) + (env0_1 >= a1 ? env0_1 : value4);
object2['speech_event_count_gte_' + a1 + 'ms'] = (env0_0.speakingMinimumChunkCounts.get(a1) ?? value4) + (env0_1 >= a1 ? 1 : value4);
return object2;
}
global.__d(_fun94577, 12405, [6, 7, 4303, 4464, 2]) /* metro module 12405, dependencies: [6, 7, 4303, 4464, 2] */;
+1053 -1038
View File
File diff suppressed because it is too large. Load diff
+198 -188
View File
@@ -1,207 +1,217 @@
/* Metro module 12410; source: lib/VoiceStateAnalytics.tsx; dependencies: [6, 7, 4259, 4297, 4300, 4291, 22, 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 MediaEngineStore from '../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import SortedVoiceStateStore from '../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun94684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:6, offset: 0x02123918, size: 204 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_7 = (require(4291) /* metro dependency 4291: Constants */).SpeakingFlags;
const value = _fun94685();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/VoiceStateAnalytics.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/VoiceStateAnalytics.tsx');
exports.default = value;
}
function _fun94685() { // fn#94685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:172, offset: 0x021239e4, size: 163 bytes, params: 1, frame: 15
return env0_3(VoiceStateAnalytics, [{key: 'updateVoiceStates', value: value_94687}, {key: 'getStats',
value: function() {
var object = {max_voice_state_count: this.maxVoiceStateCount,
total_voice_state_count: this.totalParticipants.size,
max_listener_count: this.maxListenerCount, total_listener_count: this.totalListeners.size,
max_speaker_count: this.maxSpeakerCount};
var Object = global.Object;
object.total_speaker_count = Object.keys(this.totalSpeakers).length;
return object;
}}, {key: 'getUserVoiceSettingsStats', value: value_94689}, {key: 'setSpeaking', value: value_94690},
{key: 'setChannelId', value: value_94694}]);
}
function VoiceStateAnalytics(a0, a1) { // fn#94686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:193, offset: 0x02123a87, size: 163 bytes, params: 3, frame: 15
const value = environment.__proto__;
env1_2(this, VoiceStateAnalytics);
this.maxVoiceStateCount = 1;
let Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
this.totalParticipants = set instanceof Object ? set : value3;
const NONE = SpeakingFlags.NONE;
this.speaking = NONE;
this.maxListenerCount = 0;
Set = global.Set;
this.totalListeners = new Set();
this.maxSpeakerCount = 0;
this.totalSpeakers = {};
this.userId = a0;
this.setChannelId(a1);
}
function value_94687(a0, a1) { // fn#94687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:499, offset: 0x02123b2a, size: 164 bytes, params: 3, frame: 15
var r0;
var value;
var totalSpeakers;
var Math;
var max;
if (a1 === this.channelId) {
this.totalParticipants.add(a0);
Math = global.Math;
max = Math.max;
value = environment.__proto__;
value = SortedVoiceStateStore.countVoiceStatesForChannel(a1);
this.maxVoiceStateCount = Reflect.apply(max, Math, [value, this.maxVoiceStateCount]);
} else {
value = a1 == null;
r0 = value && a0 in this.totalSpeakers;
if (r0) {
totalSpeakers = this.totalSpeakers;
value = environment.__proto__;
totalSpeakers[a0] = SpeakingFlags.NONE;
}
value = a0 === this.userId;
r0 = value && a1 != null;
if (r0) {
function _fun94685() { // fn#94685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:172, offset: 0x021239e4, size: 163 bytes, params: 1, frame: 15
return CreateClass(VoiceStateAnalytics, [{key: 'updateVoiceStates', value: value_94687}, {key: 'getStats',
value: function() {
var object = {max_voice_state_count: this.maxVoiceStateCount,
total_voice_state_count: this.totalParticipants.size,
max_listener_count: this.maxListenerCount, total_listener_count: this.totalListeners.size,
max_speaker_count: this.maxSpeakerCount};
var Object = global.Object;
object.total_speaker_count = Object.keys(this.totalSpeakers).length;
return object;
}}, {key: 'getUserVoiceSettingsStats', value: value_94689}, {key: 'setSpeaking', value: value_94690},
{key: 'setChannelId', value: value_94694}]);
function VoiceStateAnalytics(a0, a1) { // fn#94686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:193, offset: 0x02123a87, size: 163 bytes, params: 3, frame: 15
const value = environment.__proto__;
env1_2(this, VoiceStateAnalytics);
this.maxVoiceStateCount = 1;
let Set = global.Set;
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
this.totalParticipants = set instanceof Object ? set : value3;
const NONE = SpeakingFlags.NONE;
this.speaking = NONE;
this.maxListenerCount = 0;
Set = global.Set;
this.totalListeners = new Set();
this.maxSpeakerCount = 0;
this.totalSpeakers = {};
this.userId = a0;
this.setChannelId(a1);
}
}
}
function value_94689(a0) { // fn#94689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:1135, offset: 0x02123c42, size: 311 bytes, params: 2, frame: 23
let value = environment.__proto__;
const settings = MediaEngineStore.getSettings(a0);
let Set = global.Set;
let Object = global.Object;
let set = new Set(Object.keys(settings.localMutes));
Set = global.Set;
Object = global.Object;
set = new Set(Object.keys(settings.localVolumes));
let userId = this.userId;
set.delete(userId);
userId = this.userId;
set.delete(userId);
const object2 = {};
value = require(22) /* metro dependency 22 */;
let intersection = value.intersection;
let Array = global.Array;
const value9 = Array.from(set);
Array = global.Array;
object2.num_local_voice_user_mutes = Reflect.apply(intersection, value, [value9,
Array.from(this.totalParticipants)]).length;
value = require(22) /* metro dependency 22 */;
intersection = value.intersection;
Array = global.Array;
const value10 = Array.from(set);
Array = global.Array;
object2.num_local_voice_volumes = Reflect.apply(intersection, value, [value10,
Array.from(this.totalParticipants)]).length;
return object2;
}
function value_94690(a0, a1) { // fn#94690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:1533, offset: 0x02123d79, size: 362 bytes, params: 3, frame: 18
var environment;
var totalSpeakers;
var value2;
var Object;
var values;
var value3;
var length;
var Math;
let value = environment.__proto__;
const NONE = SpeakingFlags.NONE;
if (a1 !== NONE) {
value2 = VoiceStateStore.getVoiceStateForChannel(this.channelId, a0);
if (value2 != null) {
if (!value2.selfMute) {
if (!value2.mute) {
function value_94687(a0, a1) { // fn#94687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:499, offset: 0x02123b2a, size: 164 bytes, params: 3, frame: 15
var r0;
var value;
var totalSpeakers;
var Math;
var max;
if (a1 === this.channelId) {
this.totalParticipants.add(a0);
Math = global.Math;
max = Math.max;
value = environment.__proto__;
value = SortedVoiceStateStore.countVoiceStatesForChannel(a1);
this.maxVoiceStateCount = Reflect.apply(max, Math, [value, this.maxVoiceStateCount]);
} else {
value = a1 == null;
r0 = value && a0 in this.totalSpeakers;
if (r0) {
totalSpeakers = this.totalSpeakers;
totalSpeakers[a0] = a1;
Object = global.Object;
values = Object.values;
totalSpeakers = this.totalSpeakers;
value3 = Reflect.apply(values, Object, [totalSpeakers]);
length = value3.filter(function(a0) {
return a0 !== SpeakingFlags.NONE;
}).length;
Math = global.Math;
this.maxSpeakerCount = Math.max(this.maxSpeakerCount, length);
value = environment.__proto__;
totalSpeakers[a0] = SpeakingFlags.NONE;
}
value = a0 === this.userId;
r0 = value && a1 != null;
if (r0) {
this.setChannelId(a1);
}
}
}
} else if (a0 in this.totalSpeakers) {
this.totalSpeakers[a0] = SpeakingFlags.NONE;
}
const userId = this.userId;
if (userId === a0) {
if (a1 === this.speaking) {
return undefined;
}
if (a1 !== SpeakingFlags.NONE) {
function value_94689(a0) { // fn#94689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:1135, offset: 0x02123c42, size: 311 bytes, params: 2, frame: 23
let value = environment.__proto__;
const settings = MediaEngineStore.getSettings(a0);
let Set = global.Set;
let Object = global.Object;
let set = new Set(Object.keys(settings.localMutes));
Set = global.Set;
Object = global.Object;
value = Object.values(VoiceStateStore.getVoiceStatesForChannel(this.channelId));
value = value.filter(function(a0) {
return !a0.selfDeaf && !a0.deaf;
});
value.forEach(_fun94693);
Math = global.Math;
this.maxListenerCount = Math.max(value.length, this.maxListenerCount);
set = new Set(Object.keys(settings.localVolumes));
let userId = this.userId;
set.delete(userId);
userId = this.userId;
set.delete(userId);
const object = {};
value = require(22) /* metro dependency 22 */;
let intersection = value.intersection;
let Array = global.Array;
const value9 = Array.from(set);
Array = global.Array;
object.num_local_voice_user_mutes = Reflect.apply(intersection, value, [value9,
Array.from(this.totalParticipants)]).length;
value = require(22) /* metro dependency 22 */;
intersection = value.intersection;
Array = global.Array;
const value10 = Array.from(set);
Array = global.Array;
object.num_local_voice_volumes = Reflect.apply(intersection, value, [value10,
Array.from(this.totalParticipants)]).length;
return object;
}
this.speaking = a1;
function value_94690(a0, a1) { // fn#94690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:1533, offset: 0x02123d79, size: 362 bytes, params: 3, frame: 18
var environment;
var totalSpeakers;
var voiceStateStoreBinding;
var value2;
var Object;
var values;
var value3;
var length;
var Math;
let value = environment.__proto__;
const NONE = SpeakingFlags.NONE;
if (a1 !== NONE) {
voiceStateStoreBinding = VoiceStateStore;
value2 = voiceStateStoreBinding.getVoiceStateForChannel(this.channelId, a0);
if (value2 != null) {
if (!value2.selfMute) {
if (!value2.mute) {
totalSpeakers = this.totalSpeakers;
totalSpeakers[a0] = a1;
Object = global.Object;
values = Object.values;
totalSpeakers = this.totalSpeakers;
value3 = Reflect.apply(values, Object, [totalSpeakers]);
length = value3.filter(function(a0) {
return a0 !== SpeakingFlags.NONE;
}).length;
Math = global.Math;
this.maxSpeakerCount = Math.max(this.maxSpeakerCount, length);
}
}
}
} else if (a0 in this.totalSpeakers) {
this.totalSpeakers[a0] = SpeakingFlags.NONE;
}
const userId = this.userId;
if (userId === a0) {
if (a1 === this.speaking) {
return undefined;
}
if (a1 !== SpeakingFlags.NONE) {
Object = global.Object;
values = Object.values;
voiceStateStoreBinding = VoiceStateStore;
value = Reflect.apply(values, Object, [voiceStateStoreBinding.getVoiceStatesForChannel(this.channelId)]);
value = value.filter(function(a0) {
return !a0.selfDeaf && !a0.deaf;
});
value.forEach(_fun94693);
Math = global.Math;
this.maxListenerCount = Math.max(value.length, this.maxListenerCount);
}
this.speaking = a1;
}
function _fun94693({userId}) { // fn#94693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2029, offset: 0x02123f13, size: 33 bytes, params: 2, frame: 11
return env0_0.totalListeners.add(userId);
}
}
function value_94694(a0) { // fn#94694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2176, offset: 0x02123f34, size: 221 bytes, params: 2, frame: 17
var environment;
var Set;
var items;
var prototype;
var value;
var set;
var Object;
var keys;
var voiceStateStoreBinding;
var value2;
if (a0 !== this.channelId) {
this.channelId = a0;
Set = global.Set;
items = [this.userId];
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
this.totalParticipants = value;
Object = global.Object;
keys = Object.keys;
value = environment.__proto__;
voiceStateStoreBinding = VoiceStateStore;
value2 = Reflect.apply(keys, Object, [voiceStateStoreBinding.getVoiceStatesForChannel(this.channelId)]);
value2.forEach(_fun94695);
this.maxVoiceStateCount = value2.length;
this.speaking = SpeakingFlags.NONE;
this.maxListenerCount = 0;
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
this.totalListeners = value;
this.maxSpeakerCount = 0;
this.totalSpeakers = {};
}
function _fun94695(a0) { // fn#94695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2347, offset: 0x02124011, size: 28 bytes, params: 2, frame: 11
return env0_0.totalParticipants.add(a0);
}
}
}
}
function value_94694(a0) { // fn#94694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2176, offset: 0x02123f34, size: 221 bytes, params: 2, frame: 17
var environment;
var Set;
var items;
var prototype;
var value;
var set;
var Object;
var keys;
var value2;
if (a0 !== this.channelId) {
this.channelId = a0;
Set = global.Set;
items = [this.userId];
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
this.totalParticipants = value;
Object = global.Object;
keys = Object.keys;
value = environment.__proto__;
value2 = Reflect.apply(keys, Object, [VoiceStateStore.getVoiceStatesForChannel(this.channelId)]);
value2.forEach(_fun94695);
this.maxVoiceStateCount = value2.length;
this.speaking = SpeakingFlags.NONE;
this.maxListenerCount = 0;
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
this.totalListeners = value;
this.maxSpeakerCount = 0;
this.totalSpeakers = {};
}
}
function _fun94693({userId}) { // fn#94693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2029, offset: 0x02123f13, size: 33 bytes, params: 2, frame: 11
return env0_0.totalListeners.add(userId);
}
function _fun94695(a0) { // fn#94695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12596:2347, offset: 0x02124011, size: 28 bytes, params: 2, frame: 11
return env0_0.totalParticipants.add(a0);
}
global.__d(_fun94684, 12410, [6, 7, 4259, 4297, 4300, 4291, 22,
2]) /* metro module 12410, dependencies: [6, 7, 4259, 4297, 4300, 4291, 22, 2] */;
+16 -12
View File
@@ -1,19 +1,23 @@
/* Metro module 10683; source: lib/WindowVisibilityUtils.native.tsx; dependencies: [7030, 661, 10684, 2] */
import AppStateStore from '../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import ExternalPipAndroid from '../modules/external_pip/ExternalPip.android.tsx'; /* Metro dependency 10684 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun82138(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10869:6, offset: 0x01eec82a, size: 136 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AppStates;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/WindowVisibilityUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/WindowVisibilityUtils.native.tsx');
exports.default = isDiscordVisible;
function isDiscordVisible() { // fn#82139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10869:206, offset: 0x01eec8b2, size: 74 bytes, params: 1, frame: 12
const state = AppStateStore.getState();
const BACKGROUND = AppStates.BACKGROUND;
const value3 = state === BACKGROUND;
let value = ExternalPipAndroid;
value = value.isInPipMode();
return value3 ? value : !value3;
}
}
function isDiscordVisible() { // fn#82139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10869:206, offset: 0x01eec8b2, size: 74 bytes, params: 1, frame: 12
const state = AppStateStore.getState();
const BACKGROUND = AppStates.BACKGROUND;
const value3 = state === BACKGROUND;
let value = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */;
value = value.isInPipMode();
return value3 ? value : !value3;
}
global.__d(_fun82138, 10683, [7030, 661, 10684, 2]) /* metro module 10683, dependencies: [7030, 661, 10684, 2] */;
+135 -128
View File
@@ -1,142 +1,149 @@
/* Metro module 10682; source: lib/WindowVisibilityVideoManager.tsx; dependencies: [6, 7, 15, 17, 18, 4041, 3, 672, 10683, 694, 10684, 4479, 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 Durations from '../utils/Durations.tsx'; /* Metro dependency 672 */
import TypedEventEmitter from '../external/discord_common/js/shared/utils/TypedEventEmitter.tsx'; /* Metro dependency 4479 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TimersModule from '../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
function _fun82127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:6, offset: 0x01eec358, size: 266 bytes, params: 8, frame: 19
const env0_0 = require;
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 env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4479) /* metro dependency 4479: TypedEventEmitter */;
let value = TypedEventEmitter;
value = _fun82131(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/WindowVisibilityVideoManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/WindowVisibilityVideoManager.tsx');
exports.WindowVisibilityEvent = {WindowVisibilityChanged: 'window-visibility-changed',
IncomingVideoEnabledChanged: 'incoming-video-enabled-changed'};
exports.WindowVisibilityVideoManager = value;
}
function _isNativeReflectConstruct_82128() { // fn#82128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:148, offset: 0x01eec462, 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_82128_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun82131(a0) { // fn#82131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:496, offset: 0x01eec4c4, size: 124 bytes, params: 2, frame: 16
const closure = WindowVisibilityVideoManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'isIncomingVideoEnabled', value: function() {
return this.incomingVideoEnabled;
}}, {key: 'lastIncomingVideoEnabledChangeTime', value: function() {
return this.lastEnabledChange;
}}, {key: 'setIncomingVideoEnabled', value: value_82137}]);
}
function WindowVisibilityVideoManager() { // fn#82132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:508, offset: 0x01eec540, size: 395 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__;
env1_3(this, WindowVisibilityVideoManager);
const value3 = env1_6(WindowVisibilityVideoManager);
const value6 = env1_5(this, _isNativeReflectConstruct_82128() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const value7 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
const timeout = new Timeout();
value6.disableVideoTimer = timeout instanceof Object ? timeout : value7;
value6.discordVisible = true;
value6.incomingVideoEnabled = true;
value6.lastEnabledChange = global.performance.now();
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('WindowVisibilityVideoManager');
value6.logger = value;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
value6.HIDDEN_WINDOW_DISABLE_VIDEO_DURATION_MS = 30 * SECOND;
value6.update = update_82133;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('WINDOW_VISIBILITY_CHANGE', value6.update);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('APP_STATE_UPDATE', value6.update);
value = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */;
value.addOnPipModeChangedListener(value6.update);
return value6;
}
function value_82137(a0) { // fn#82137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1755, offset: 0x01eec7ad, size: 125 bytes, params: 2, frame: 16
var logger;
var info;
var performance;
var emit;
var value;
var IncomingVideoEnabledChanged;
let incomingVideoEnabled = this.incomingVideoEnabled;
this.incomingVideoEnabled = a0;
if (incomingVideoEnabled !== a0) {
logger = this.logger;
info = logger.info;
incomingVideoEnabled = this.incomingVideoEnabled;
Reflect.apply(info, logger, ['Incoming video enabled changed, incomingVideoEnabled = ' + incomingVideoEnabled]);
performance = global.performance;
this.lastEnabledChange = performance.now();
emit = this.emit;
value = environment.__proto__;
IncomingVideoEnabledChanged = env1_8.IncomingVideoEnabledChanged;
incomingVideoEnabled = this.incomingVideoEnabled;
Reflect.apply(emit, this, [IncomingVideoEnabledChanged, incomingVideoEnabled]);
}
}
function WindowVisibilityVideoManagerUpdate() { // fn#82133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1022, owner: WindowVisibilityVideoManager.update, offset: 0x01eec6cb, size: 180 bytes, params: 1, frame: 16
var binding;
var emit;
var WindowVisibilityChanged;
var disableVideoTimer;
let discordVisible = env0_0.discordVisible;
if (discordVisible !== (importDefault(10683) /* metro dependency 10683: WindowVisibilityUtilsNative */)()) {
binding = env0_0;
binding.discordVisible = (importDefault(10683) /* metro dependency 10683: WindowVisibilityUtilsNative */)();
emit = binding.emit;
WindowVisibilityChanged = env2_8.WindowVisibilityChanged;
discordVisible = binding.discordVisible;
Reflect.apply(emit, binding, [WindowVisibilityChanged, discordVisible]);
discordVisible = binding.discordVisible;
binding = env0_0;
disableVideoTimer = binding.disableVideoTimer;
if (discordVisible) {
disableVideoTimer.stop();
binding.setIncomingVideoEnabled(true);
} else {
disableVideoTimer.start(binding.HIDDEN_WINDOW_DISABLE_VIDEO_DURATION_MS, _fun82134);
function _isNativeReflectConstruct_82128() { // fn#82128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:148, offset: 0x01eec462, 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_82128_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun82131(a0) { // fn#82131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:496, offset: 0x01eec4c4, size: 124 bytes, params: 2, frame: 16
const WindowVisibilityVideoManager2 = WindowVisibilityVideoManager;
Inherits(WindowVisibilityVideoManager2, a0);
return CreateClass(WindowVisibilityVideoManager2, [{key: 'isIncomingVideoEnabled', value: function() {
return this.incomingVideoEnabled;
}}, {key: 'lastIncomingVideoEnabledChangeTime', value: function() {
return this.lastEnabledChange;
}}, {key: 'setIncomingVideoEnabled', value: value_82137}]);
function WindowVisibilityVideoManager() { // fn#82132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:508, offset: 0x01eec540, size: 395 bytes, params: 1, frame: 21
var environment;
let value = environment.__proto__;
env1_3(this, WindowVisibilityVideoManager);
const value3 = env1_6(WindowVisibilityVideoManager);
const value6 = env1_5(this, _isNativeReflectConstruct_82128() ? global.Reflect.construct(value3, [],
env1_6(this).constructor) : value3.apply(this, undefined));
const Timeout = (TimersModule).Timeout;
const value7 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
const timeout = new Timeout();
value6.disableVideoTimer = timeout instanceof Object ? timeout : value7;
value6.discordVisible = true;
value6.incomingVideoEnabled = true;
value6.lastEnabledChange = global.performance.now();
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('WindowVisibilityVideoManager');
value6.logger = value;
const Millis = (Durations).Millis;
const SECOND = Millis.SECOND;
value6.HIDDEN_WINDOW_DISABLE_VIDEO_DURATION_MS = 30 * SECOND;
value6.update = update_82133;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('WINDOW_VISIBILITY_CHANGE', value6.update);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('APP_STATE_UPDATE', value6.update);
value = importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */;
value.addOnPipModeChangedListener(value6.update);
return value6;
function WindowVisibilityVideoManagerUpdate() { // fn#82133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1022, owner: WindowVisibilityVideoManager.update, offset: 0x01eec6cb, size: 180 bytes, params: 1, frame: 16
var binding;
var emit;
var WindowVisibilityChanged;
var disableVideoTimer;
let discordVisible = env0_0.discordVisible;
if (discordVisible !== (importDefault(10683) /* metro dependency 10683: WindowVisibilityUtilsNative */)()) {
binding = env0_0;
binding.discordVisible = (importDefault(10683) /* metro dependency 10683: WindowVisibilityUtilsNative */)();
emit = binding.emit;
WindowVisibilityChanged = env2_8.WindowVisibilityChanged;
discordVisible = binding.discordVisible;
Reflect.apply(emit, binding, [WindowVisibilityChanged, discordVisible]);
discordVisible = binding.discordVisible;
binding = env0_0;
disableVideoTimer = binding.disableVideoTimer;
if (discordVisible) {
disableVideoTimer.stop();
binding.setIncomingVideoEnabled(true);
} else {
disableVideoTimer.start(binding.HIDDEN_WINDOW_DISABLE_VIDEO_DURATION_MS, _fun82134);
}
}
function _fun82134() { // fn#82134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1281, offset: 0x01eec77f, size: 24 bytes, params: 1, frame: 11
env1_0.setIncomingVideoEnabled(false);
}
}
}
function value_82137(a0) { // fn#82137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1755, offset: 0x01eec7ad, size: 125 bytes, params: 2, frame: 16
var logger;
var info;
var performance;
var emit;
var value;
var IncomingVideoEnabledChanged;
let incomingVideoEnabled = this.incomingVideoEnabled;
this.incomingVideoEnabled = a0;
if (incomingVideoEnabled !== a0) {
logger = this.logger;
info = logger.info;
incomingVideoEnabled = this.incomingVideoEnabled;
Reflect.apply(info, logger, ['Incoming video enabled changed, incomingVideoEnabled = ' + incomingVideoEnabled]);
performance = global.performance;
this.lastEnabledChange = performance.now();
emit = this.emit;
value = environment.__proto__;
IncomingVideoEnabledChanged = env1_8.IncomingVideoEnabledChanged;
incomingVideoEnabled = this.incomingVideoEnabled;
Reflect.apply(emit, this, [IncomingVideoEnabledChanged, incomingVideoEnabled]);
}
}
}
}
function _fun82134() { // fn#82134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10868:1281, offset: 0x01eec77f, size: 24 bytes, params: 1, frame: 11
env1_0.setIncomingVideoEnabled(false);
}
global.__d(_fun82127, 10682, [6, 7, 15, 17, 18, 4041, 3, 672, 10683, 694, 10684, 4479,
2]) /* metro module 10682, dependencies: [6, 7, 15, 17, 18, 4041, 3, 672, 10683, 694, 10684, 4479, 2] */;
+86 -70
View File
@@ -1,4 +1,9 @@
/* Metro module 4024; source: lib/ZustandStore.tsx; dependencies: [685, 4025, 690, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00685Module from '../by-id/module-00685.js'; /* Metro dependency 685 */
import * as ReactBatchUpdatesNativeModule from '../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as Module04025Module from '../by-id/module-04025.js'; /* Metro dependency 4025 */
function _fun33121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:6, offset: 0x010281e4, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const defaultStatesAreEqual = function(a0, a1) {
@@ -6,81 +11,92 @@ function _fun33121(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/ZustandStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/ZustandStore.tsx');
exports.createZustandStore = createZustandStore;
}
function createZustandStore(a0) { // fn#33123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:216, offset: 0x0102824b, size: 161 bytes, params: 2, frame: 17
let env0_0 = a0;
const useState_331242 = useState_33124;
const getState_331252 = getState_33125;
const createWithEqualityFn = Module00685Module.createWithEqualityFn;
const env0_1 = Reflect.apply(createWithEqualityFn, Module00685Module, [Module04025Module.subscribeWithSelector(function(a0, a1, a2) {
return a0(_fun33127, a1, a2);
})]);
return {useState: useState_331242, getState: getState_331252, useField: useField, getField: function(a0) {
var env0_0 = a0;
return getState_33125(_fun33134);
}, subscribe: subscribe_33135, setState: setState_33129, resetState: resetState};
function createZustandStoreUseState(a0) { // fn#33124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:370, owner: createZustandStore.useState, offset: 0x010282ec, size: 34 bytes, params: 2, frame: 13
const value = a1;
return env0_1(a0, value !== undefined ? value : defaultStatesAreEqual);
}
function createZustandStore(a0) { // fn#33123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:216, offset: 0x0102824b, size: 161 bytes, params: 2, frame: 17
let env0_0 = a0;
const closure = useState_33124;
const closure2 = getState_33125;
const value = require(685) /* metro dependency 685 */;
const createWithEqualityFn = value.createWithEqualityFn;
const moduleValue = require(4025) /* metro dependency 4025 */;
const env0_1 = Reflect.apply(createWithEqualityFn, value, [moduleValue.subscribeWithSelector(function(a0, a1, a2) {
return a0(_fun33127, a1, a2);
})]);
return {useState: closure, getState: closure2, useField: useField, getField: function(a0) {
var env0_0 = a0;
return getState_33125(_fun33134);
}, subscribe: subscribe_33135, setState: setState_33129, resetState: resetState_33136};
}
function createZustandStoreGetState(a0) { // fn#33125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:429, owner: createZustandStore.getState, offset: 0x0102830e, size: 38 bytes, params: 2, frame: 12
var r0;
let value = env0_1.getState();
if (a0 == null) {
r0 = value;
} else {
value = a0(value);
r0 = value;
}
return r0;
}
function createZustandStoreUseState(a0) { // fn#33124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:370, owner: createZustandStore.useState, offset: 0x010282ec, size: 34 bytes, params: 2, frame: 13
const value = a1;
return env0_1(a0, value !== undefined ? value : defaultStatesAreEqual);
}
function _fun33126(a0, a1, a2) { // fn#33126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:313, offset: 0x01028334, size: 38 bytes, params: 4, frame: 15
return a0(_fun33127, a1, a2);
function _fun33127(a0) { // fn#33127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:325, offset: 0x0102835a, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
return (ReactBatchUpdatesNativeModule).batchUpdates(_fun33128);
function _fun33128() { // fn#33128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:350, offset: 0x0102838e, size: 23 bytes, params: 1, frame: 11
return env1_0(env0_0);
}
}
}
function createZustandStoreSetState(a0) { // fn#33129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:504, owner: createZustandStore.setState, offset: 0x010283a5, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun33130);
function _fun33130() { // fn#33130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:530, offset: 0x010283d9, size: 27 bytes, params: 1, frame: 11
return env1_1.setState(env0_0);
}
}
function useField(a0) { // fn#33131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:603, owner: createZustandStore.useField, offset: 0x010283f4, size: 45 bytes, params: 2, frame: 13
const value = a1;
const env0_0 = a0;
return useState_33124(_fun33132, value !== undefined ? value : defaultStatesAreEqual);
function _fun33132(a0) { // fn#33132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:656, offset: 0x00c8a4e1, size: 16 bytes, params: 2, frame: 2
return a0[env0_0];
}
}
function getField(a0) { // fn#33133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:678, owner: createZustandStore.getField, offset: 0x01028421, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return getState_33125(_fun33134);
function _fun33134(a0) { // fn#33134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:707, offset: 0x00c8a4e1, size: 16 bytes, params: 2, frame: 2
return a0[env0_0];
}
}
function createZustandStoreSubscribe(a0, a1, a2) { // fn#33135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:728, owner: createZustandStore.subscribe, offset: 0x0102843f, size: 31 bytes, params: 4, frame: 15
return env0_1.subscribe(a0, a1, a2);
}
function resetState() { // fn#33136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:800, owner: createZustandStore.resetState, offset: 0x0102845e, size: 30 bytes, params: 1, frame: 11
setState_33129(env0_1.getInitialState());
}
function createZustandStoreGetState(a0) { // fn#33125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:429, owner: createZustandStore.getState, offset: 0x0102830e, size: 38 bytes, params: 2, frame: 12
var r0;
let value = env0_1.getState();
if (a0 == null) {
r0 = value;
} else {
value = a0(value);
r0 = value;
}
return r0;
}
function _fun33126(a0, a1, a2) { // fn#33126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:313, offset: 0x01028334, size: 38 bytes, params: 4, frame: 15
return a0(_fun33127, a1, a2);
}
function createZustandStoreSetState(a0) { // fn#33129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:504, owner: createZustandStore.setState, offset: 0x010283a5, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun33130);
}
function useField(a0) { // fn#33131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:603, owner: createZustandStore.useField, offset: 0x010283f4, size: 45 bytes, params: 2, frame: 13
const value = a1;
const env0_0 = a0;
return useState_33124(_fun33132, value !== undefined ? value : defaultStatesAreEqual);
}
function getField(a0) { // fn#33133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:678, owner: createZustandStore.getField, offset: 0x01028421, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return getState_33125(_fun33134);
}
function createZustandStoreSubscribe(a0, a1, a2) { // fn#33135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:728, owner: createZustandStore.subscribe, offset: 0x0102843f, size: 31 bytes, params: 4, frame: 15
return env0_1.subscribe(a0, a1, a2);
}
function createZustandStoreResetState() { // fn#33136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:800, owner: createZustandStore.resetState, offset: 0x0102845e, size: 30 bytes, params: 1, frame: 11
setState_33129(env0_1.getInitialState());
}
function _fun33127(a0) { // fn#33127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:325, offset: 0x0102835a, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
return (require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun33128);
}
function _fun33130() { // fn#33130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4182:530, offset: 0x010283d9, size: 27 bytes, params: 1, frame: 11
return env1_1.setState(env0_0);
}
global.__d(_fun33121, 4024, [685, 4025, 690, 2]) /* metro module 4024, dependencies: [685, 4025, 690, 2] */;
+691 -658
View File
File diff suppressed because it is too large. Load diff
+9 -5
View File
@@ -1,13 +1,17 @@
/* Metro module 15631; source: lib/getTimeZone.native.tsx; dependencies: [4092, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DeviceUtilsModule from '../utils/native/DeviceUtils.tsx'; /* Metro dependency 4092 */
function _fun119716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15839:6, offset: 0x02516e9c, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/getTimeZone.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/getTimeZone.native.tsx');
exports.default = getTimeZone_119717;
function getTimeZone_119717() { // fn#119717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15839:162, offset: 0x02516efc, size: 36 bytes, params: 1, frame: 11
return (DeviceUtilsModule).getTimeZone();
}
}
function getTimeZone_119717() { // fn#119717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15839:162, offset: 0x02516efc, size: 36 bytes, params: 1, frame: 11
return (require(4092) /* metro dependency 4092: DeviceUtils */).getTimeZone();
}
global.__d(_fun119716, 15631, [4092, 2]) /* metro module 15631, dependencies: [4092, 2] */;
+60 -51
View File
@@ -1,4 +1,8 @@
/* Metro module 6890; source: lib/guild/GuildChannelSubscriptions.tsx; dependencies: [6, 7, 1393, 22, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54712(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:6, offset: 0x0136c7e8, size: 174 bytes, params: 8, frame: 18
const serializeChannelRanges = function(a0) {
a0.forEach(_fun54714);
@@ -6,63 +10,68 @@ function _fun54712(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun54715();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildChannelSubscriptions.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/guild/GuildChannelSubscriptions.tsx');
exports.default = value;
exports.MINIMUM_RANGE = 100;
exports.DEFAULT_RANGES = [[0, 99]];
}
function serializeChannelRanges(a0) { // fn#54713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:116, offset: 0x0136c896, size: 28 bytes, params: 2, frame: 12
a0.forEach(_fun54714);
return {};
}
function _fun54715() { // fn#54715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:204, offset: 0x0136c8b2, size: 147 bytes, params: 1, frame: 15
return env0_3(GuildChannelSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
}}, {key: 'get', value: value_54718}, {key: '_get', value: value_54719}, {key: 'clear', value: function(a0) {
delete this._subscriptions[a0];
}}, {key: 'subscribe', value: function(a0, a1, a2) {
var r0;
var value = this._get(a0);
var isEqual = importDefault(dependencyMap[3]).isEqual(value.get(a1), a2);
if (isEqual) {
r0 = !isEqual;
} else {
value.set(a1, a2);
this._subscriptions[a0] = value;
this._onChange(a0, serializeChannelRanges(value));
value = true;
r0 = value;
function serializeChannelRanges(a0) { // fn#54713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:116, offset: 0x0136c896, size: 28 bytes, params: 2, frame: 12
a0.forEach(_fun54714);
return {};
function _fun54714(a0, a1) { // fn#54714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:178, offset: 0x00daaa50, size: 21 bytes, params: 3, frame: 3
env0_0[a1] = a0;
}
return r0;
}}]);
}
function _fun54714(a0, a1) { // fn#54714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:178, offset: 0x00daaa50, size: 21 bytes, params: 3, frame: 3
env0_0[a1] = a0;
}
function value_54718(a0) { // fn#54718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:412, offset: 0x0136c980, size: 33 bytes, params: 2, frame: 12
const value = environment.__proto__;
return serializeChannelRanges(this._get(a0));
}
function value_54719(a0) { // fn#54719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:488, offset: 0x0136c9a1, size: 81 bytes, params: 2, frame: 12
var r0;
var value;
const property = this._subscriptions[a0];
if (property != null) {
r0 = property;
} else {
value = environment.__proto__;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 5});
r0 = value;
}
return r0;
function _fun54715() { // fn#54715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:204, offset: 0x0136c8b2, size: 147 bytes, params: 1, frame: 15
return CreateClass(GuildChannelSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
}}, {key: 'get', value: value_54718}, {key: '_get', value: value_54719}, {key: 'clear', value: function(a0) {
delete this._subscriptions[a0];
}}, {key: 'subscribe', value: function(a0, a1, a2) {
var r0;
var value = this._get(a0);
var isEqual = importDefault(dependencyMap[3]).isEqual(value.get(a1), a2);
if (isEqual) {
r0 = !isEqual;
} else {
value.set(a1, a2);
this._subscriptions[a0] = value;
this._onChange(a0, serializeChannelRanges(value));
value = true;
r0 = value;
}
return r0;
}}]);
function GuildChannelSubscriptions(a0) { // fn#54716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:225, offset: 0x0136c945, size: 44 bytes, params: 2, frame: 13
env1_2(this, GuildChannelSubscriptions);
this._subscriptions = {};
this._onChange = a0;
}
function value_54718(a0) { // fn#54718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:412, offset: 0x0136c980, size: 33 bytes, params: 2, frame: 12
const value = environment.__proto__;
return serializeChannelRanges(this._get(a0));
}
function value_54719(a0) { // fn#54719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7068:488, offset: 0x0136c9a1, size: 81 bytes, params: 2, frame: 12
var r0;
var value;
const property = this._subscriptions[a0];
if (property != null) {
r0 = property;
} else {
value = environment.__proto__;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 5});
r0 = value;
}
return r0;
}
}
}
global.__d(_fun54712, 6890, [6, 7, 1393, 22, 2]) /* metro module 6890, dependencies: [6, 7, 1393, 22, 2] */;
+210 -206
View File
@@ -1,229 +1,233 @@
/* Metro module 6270; source: lib/guild/GuildMemberRequester.tsx; dependencies: [6, 7, 4041, 22, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
function _fun49525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:6, offset: 0x011fc0cd, size: 149 bytes, params: 8, frame: 19
const env0_0 = require;
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 env0_5 = _fun49526();
const value = _fun49535();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildMemberRequester.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/guild/GuildMemberRequester.tsx');
exports.default = value;
}
function _fun49526() { // fn#49526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:118, offset: 0x011fc162, size: 124 bytes, params: 1, frame: 15
return env0_4(GuildMemberRequestState, [{key: 'acknowledge', value: function(a0) {
this._unacknowledgedRequests.delete(a0);
this._pendingRequests.delete(a0);
}}, {key: 'flushRequests', value: function(a0) {
var items;
var _pendingRequests;
var env0_0 = this;
if (this._pendingRequests.size !== 0) {
items = [];
var env0_1 = items;
_pendingRequests = this._pendingRequests;
_pendingRequests.forEach(_fun49531);
if (items.length > 0) {
a0(this._guildId, items);
function _fun49526() { // fn#49526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:118, offset: 0x011fc162, size: 124 bytes, params: 1, frame: 15
return CreateClass(GuildMemberRequestState, [{key: 'acknowledge', value: function(a0) {
this._unacknowledgedRequests.delete(a0);
this._pendingRequests.delete(a0);
}}, {key: 'flushRequests', value: function(a0) {
var items;
var _pendingRequests;
var env0_0 = this;
if (this._pendingRequests.size !== 0) {
items = [];
var env0_1 = items;
_pendingRequests = this._pendingRequests;
_pendingRequests.forEach(_fun49531);
if (items.length > 0) {
a0(this._guildId, items);
}
_pendingRequests = this._pendingRequests;
_pendingRequests.clear();
}
_pendingRequests = this._pendingRequests;
_pendingRequests.clear();
}}, {key: 'requestUnacknowledged', value: function() {
var r0;
var env0_0 = this;
var value = this._unacknowledgedRequests.size !== 0;
if (value) {
this._unacknowledgedRequests.forEach(_fun49533);
r0 = this._pendingRequests.size !== 0 && undefined;
} else {
r0 = value;
}
return r0;
}}, {key: 'request', value: function(a0) {
if (this._guildMemberExists(a0)) {
return false;
}
if (this._sentRequests.has(a0)) {
return false;
}
if (this._pendingRequests.has(a0)) {
return false;
}
this._pendingRequests.add(a0);
}}]);
function GuildMemberRequestState(a0, a1) { // fn#49527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:139, offset: 0x011fc1de, size: 158 bytes, params: 3, frame: 16
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
env1_3(this, GuildMemberRequestState);
let Set = global.Set;
this._pendingRequests = new Set();
Set = global.Set;
this._sentRequests = new Set();
Set = global.Set;
this._unacknowledgedRequests = new Set();
this._guildId = a0;
this._guildMemberExists = _guildMemberExists;
function _guildMemberExists(a0) { // fn#49528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:343, owner: GuildMemberRequestState._guildMemberExists, offset: 0x011fc27c, size: 24 bytes, params: 2, frame: 13
return require(env0_0, a0);
}
}
}}, {key: 'requestUnacknowledged', value: function() {
var r0;
var env0_0 = this;
var value = this._unacknowledgedRequests.size !== 0;
if (value) {
this._unacknowledgedRequests.forEach(_fun49533);
r0 = this._pendingRequests.size !== 0 && undefined;
} else {
r0 = value;
function value_49530(a0) { // fn#49530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:493, offset: 0x011fc2be, size: 101 bytes, params: 2, frame: 15
var items2;
let _pendingRequests = this._pendingRequests;
if (_pendingRequests.size !== 0) {
items2 = [];
_pendingRequests = this._pendingRequests;
_pendingRequests.forEach(_fun49531);
if (items2.length > 0) {
a0(this._guildId, items2);
}
_pendingRequests = this._pendingRequests;
_pendingRequests.clear();
}
function _fun49531(a0) { // fn#49531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:580, offset: 0x011fc323, size: 78 bytes, params: 2, frame: 13
let binding = env0_0;
if (!binding._guildMemberExists(a0)) {
binding = env0_0;
binding._unacknowledgedRequests.add(a0);
binding._sentRequests.add(a0);
binding = env0_1;
binding.push(a0);
}
}
}
return r0;
}}, {key: 'request', value: function(a0) {
if (this._guildMemberExists(a0)) {
return false;
function value_49532() { // fn#49532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:788, offset: 0x011fc371, size: 75 bytes, params: 1, frame: 14
var r0;
const value = this._unacknowledgedRequests.size !== 0;
if (value) {
this._unacknowledgedRequests.forEach(_fun49533);
r0 = this._pendingRequests.size !== 0 && undefined;
} else {
r0 = value;
}
return r0;
function _fun49533(a0) { // fn#49533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:884, offset: 0x011fc3bc, size: 66 bytes, params: 2, frame: 12
let binding = env0_0;
const value2 = binding._guildMemberExists(a0);
binding = env0_0;
if (value2) {
binding._unacknowledgedRequests.delete(a0);
} else {
binding._pendingRequests.add(a0);
}
}
}
if (this._sentRequests.has(a0)) {
return false;
}
function _fun49535() { // fn#49535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1195, offset: 0x011fc450, size: 195 bytes, params: 1, frame: 15
return CreateClass(GuildMemberRequester, [{key: 'reset', value: function() {
this._guildStates = {};
this._flush.cancel();
}}, {key: 'request', value: function(a0, a1) {
var value = this._getGuildState(a0);
value = value.request(a1);
if (value !== false) {
this._flush.delay(false);
}
}}, {key: 'acknowledge', value: function(a0, a1) {
this._getGuildState(a0).acknowledge(a1);
}}, {key: 'flushRequests', value: value_49541}, {key: 'requestUnacknowledged', value: value_49543},
{key: '_getGuildState', value: value_49545}, {key: 'getDebugState', value: value_49546}]);
function GuildMemberRequester(a0, a1) { // fn#49536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1216, offset: 0x011fc513, size: 118 bytes, params: 3, frame: 15
var environment;
const value = environment.__proto__;
env1_3(this, GuildMemberRequester);
this._guildStates = {};
const DelayedCall = (TimersModule).DelayedCall;
this._flush = new DelayedCall(0, _fun49537);
this._guildMemberExists = a0;
this._onChange = a1;
function _fun49537() { // fn#49537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1341, offset: 0x011fc589, size: 19 bytes, params: 1, frame: 9
return env0_0.flushRequests();
}
}
if (this._pendingRequests.has(a0)) {
return false;
function value_49541() { // fn#49541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1693, offset: 0x011fc618, size: 58 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._guildStates, _fun49542);
function _fun49542(a0) { // fn#49542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1739, offset: 0x011fc652, size: 29 bytes, params: 2, frame: 11
return a0.flushRequests(env0_0._onChange);
}
}
this._pendingRequests.add(a0);
}}]);
}
function _fun49535() { // fn#49535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1195, offset: 0x011fc450, size: 195 bytes, params: 1, frame: 15
return env0_4(GuildMemberRequester, [{key: 'reset', value: function() {
this._guildStates = {};
this._flush.cancel();
}}, {key: 'request', value: function(a0, a1) {
var value = this._getGuildState(a0);
value = value.request(a1);
if (value !== false) {
this._flush.delay(false);
function value_49543() { // fn#49543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1813, offset: 0x011fc66f, size: 77 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
if (value.reduce(this._guildStates, function(a0, a1) {
return a1.requestUnacknowledged() !== false || a0;
}, false)) {
this._flush.delay();
}
}
}}, {key: 'acknowledge', value: function(a0, a1) {
this._getGuildState(a0).acknowledge(a1);
}}, {key: 'flushRequests', value: value_49541}, {key: 'requestUnacknowledged', value: value_49543},
{key: '_getGuildState', value: value_49545}, {key: 'getDebugState', value: value_49546}]);
}
function GuildMemberRequestState(a0, a1) { // fn#49527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:139, offset: 0x011fc1de, size: 158 bytes, params: 3, frame: 16
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
env1_3(this, GuildMemberRequestState);
let Set = global.Set;
this._pendingRequests = new Set();
Set = global.Set;
this._sentRequests = new Set();
Set = global.Set;
this._unacknowledgedRequests = new Set();
this._guildId = a0;
this._guildMemberExists = _guildMemberExists;
}
function value_49530(a0) { // fn#49530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:493, offset: 0x011fc2be, size: 101 bytes, params: 2, frame: 15
var items2;
let _pendingRequests = this._pendingRequests;
if (_pendingRequests.size !== 0) {
items2 = [];
_pendingRequests = this._pendingRequests;
_pendingRequests.forEach(_fun49531);
if (items2.length > 0) {
a0(this._guildId, items2);
function value_49545(a0) { // fn#49545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1955, offset: 0x011fc6da, size: 73 bytes, params: 2, frame: 15
var r0;
var value;
var binding;
var _guildMemberExists;
var binding2;
let _guildStates = this._guildStates;
const property = _guildStates[a0];
if (property != null) {
r0 = property;
} else {
_guildStates = this._guildStates;
value = environment.__proto__;
binding = env1_5;
_guildMemberExists = this._guildMemberExists;
binding2 = new binding(a0);
_guildStates[a0] = binding2;
r0 = binding2;
}
return r0;
}
_pendingRequests = this._pendingRequests;
_pendingRequests.clear();
}
}
function value_49532() { // fn#49532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:788, offset: 0x011fc371, size: 75 bytes, params: 1, frame: 14
var r0;
const value = this._unacknowledgedRequests.size !== 0;
if (value) {
this._unacknowledgedRequests.forEach(_fun49533);
r0 = this._pendingRequests.size !== 0 && undefined;
} else {
r0 = value;
}
return r0;
}
function value_49546(a0) { // fn#49546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:2099, offset: 0x011fc723, size: 108 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._guildStates, _fun49547);
return {pendingRequestGuildIds: [], unacknowledgedRequestGuildIds: [], sentRequestGuildIds: []};
function _fun49547(a0) { // fn#49547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:2172, offset: 0x011fc78f, size: 139 bytes, params: 2, frame: 13
var binding;
const _pendingRequests = a0._pendingRequests;
if (_pendingRequests.has(env0_0)) {
binding = env0_1;
binding.push(a0._guildId);
}
const _unacknowledgedRequests = a0._unacknowledgedRequests;
if (_unacknowledgedRequests.has(env0_0)) {
binding = env0_2;
binding.push(a0._guildId);
}
const _sentRequests = a0._sentRequests;
if (_sentRequests.has(env0_0)) {
binding = ClassCallCheck;
binding.push(a0._guildId);
}
}
}
function GuildMemberRequester(a0, a1) { // fn#49536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1216, offset: 0x011fc513, size: 118 bytes, params: 3, frame: 15
var environment;
const value = environment.__proto__;
env1_3(this, GuildMemberRequester);
this._guildStates = {};
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
this._flush = new DelayedCall(0, _fun49537);
this._guildMemberExists = a0;
this._onChange = a1;
}
function value_49541() { // fn#49541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1693, offset: 0x011fc618, size: 58 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._guildStates, _fun49542);
}
function value_49543() { // fn#49543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1813, offset: 0x011fc66f, size: 77 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
if (value.reduce(this._guildStates, function(a0, a1) {
return a1.requestUnacknowledged() !== false || a0;
}, false)) {
this._flush.delay();
}
}
function value_49545(a0) { // fn#49545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1955, offset: 0x011fc6da, size: 73 bytes, params: 2, frame: 15
var r0;
var value;
var binding;
var _guildMemberExists;
var binding2;
let _guildStates = this._guildStates;
const property = _guildStates[a0];
if (property != null) {
r0 = property;
} else {
_guildStates = this._guildStates;
value = environment.__proto__;
binding = env1_5;
_guildMemberExists = this._guildMemberExists;
binding2 = new binding(a0);
_guildStates[a0] = binding2;
r0 = binding2;
}
return r0;
}
function value_49546(a0) { // fn#49546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:2099, offset: 0x011fc723, size: 108 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._guildStates, _fun49547);
return {pendingRequestGuildIds: [], unacknowledgedRequestGuildIds: [], sentRequestGuildIds: []};
}
function _guildMemberExists(a0) { // fn#49528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:343, owner: GuildMemberRequestState._guildMemberExists, offset: 0x011fc27c, size: 24 bytes, params: 2, frame: 13
return require(env0_0, a0);
}
function _fun49531(a0) { // fn#49531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:580, offset: 0x011fc323, size: 78 bytes, params: 2, frame: 13
let binding = env0_0;
if (!binding._guildMemberExists(a0)) {
binding = env0_0;
binding._unacknowledgedRequests.add(a0);
binding._sentRequests.add(a0);
binding = env0_1;
binding.push(a0);
}
}
function _fun49533(a0) { // fn#49533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:884, offset: 0x011fc3bc, size: 66 bytes, params: 2, frame: 12
let binding = env0_0;
const value2 = binding._guildMemberExists(a0);
binding = env0_0;
if (value2) {
binding._unacknowledgedRequests.delete(a0);
} else {
binding._pendingRequests.add(a0);
}
}
function _fun49537() { // fn#49537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1341, offset: 0x011fc589, size: 19 bytes, params: 1, frame: 9
return env0_0.flushRequests();
}
function _fun49542(a0) { // fn#49542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:1739, offset: 0x011fc652, size: 29 bytes, params: 2, frame: 11
return a0.flushRequests(env0_0._onChange);
}
function _fun49547(a0) { // fn#49547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6448:2172, offset: 0x011fc78f, size: 139 bytes, params: 2, frame: 13
var binding;
const _pendingRequests = a0._pendingRequests;
if (_pendingRequests.has(env0_0)) {
binding = env0_1;
binding.push(a0._guildId);
}
const _unacknowledgedRequests = a0._unacknowledgedRequests;
if (_unacknowledgedRequests.has(env0_0)) {
binding = env0_2;
binding.push(a0._guildId);
}
const _sentRequests = a0._sentRequests;
if (_sentRequests.has(env0_0)) {
binding = env0_3;
binding.push(a0._guildId);
}
}
global.__d(_fun49525, 6270, [6, 7, 4041, 22, 2]) /* metro module 6270, dependencies: [6, 7, 4041, 22, 2] */;
+118 -110
View File
@@ -1,130 +1,138 @@
/* Metro module 6889; source: lib/guild/GuildMemberSubscriptions.tsx; dependencies: [6, 7, 672, 4041, 21, 3, 22, 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 SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import defaultImport22 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
function _fun54697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:6, offset: 0x0136c22e, size: 168 bytes, params: 8, frame: 19
const env0_0 = require;
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 Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const env0_5 = 1 * MINUTE;
const value = _fun54698();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildMemberSubscriptions.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/guild/GuildMemberSubscriptions.tsx');
exports.default = value;
}
function _fun54698() { // fn#54698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:144, offset: 0x0136c2d6, size: 243 bytes, params: 1, frame: 15
return env0_4(GuildMemberSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
this._unsubscriptions = {};
this._unsubscribe.cancel();
}}, {key: 'get', value: value_54702}, {key: 'clear', value: function(a0) {
delete this._subscriptions[a0];
delete this._unsubscriptions[a0];
}}, {key: 'subscribe', value: function(a0, a1) {
var r0;
r0 = this._subscriptions[a0] ?? ({});
r0[a1] = (r0[a1] ?? 0) + 1;
this._subscriptions[a0] = r0;
if (r0[a1] === 1) {
this._onChange(a0, this.get(a0));
}
this.checkForLeaks(a0, a1);
}}, {key: 'isSubscribed', value: function(a0, a1) {
return this._subscriptions[a0] != null && this._subscriptions[a0][a1] != null;
}}, {key: 'isSubscribedToAnyMember', value: function(a0) {
return this.get(a0).length > 0;
}}, {key: 'unsubscribe', value: function(a0, a1) {
var r1;
var property;
if (this.isSubscribed(a0, a1)) {
property = this._unsubscriptions[a0];
r1 = property ?? ({});
property = r1[a1];
r1[a1] = (property ?? 0) + 1;
this._unsubscriptions[a0] = r1;
if (r1[a1] === 1) {
this._unsubscribe.delay(false);
function _fun54698() { // fn#54698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:144, offset: 0x0136c2d6, size: 243 bytes, params: 1, frame: 15
return CreateClass(GuildMemberSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
this._unsubscriptions = {};
this._unsubscribe.cancel();
}}, {key: 'get', value: value_54702}, {key: 'clear', value: function(a0) {
delete this._subscriptions[a0];
delete this._unsubscriptions[a0];
}}, {key: 'subscribe', value: function(a0, a1) {
var r0;
r0 = this._subscriptions[a0] ?? ({});
r0[a1] = (r0[a1] ?? 0) + 1;
this._subscriptions[a0] = r0;
if (r0[a1] === 1) {
this._onChange(a0, this.get(a0));
}
this.checkForLeaks(a0, a1);
}}, {key: 'isSubscribed', value: function(a0, a1) {
return this._subscriptions[a0] != null && this._subscriptions[a0][a1] != null;
}}, {key: 'isSubscribedToAnyMember', value: function(a0) {
return this.get(a0).length > 0;
}}, {key: 'unsubscribe', value: function(a0, a1) {
var r1;
var property;
if (this.isSubscribed(a0, a1)) {
property = this._unsubscriptions[a0];
r1 = property ?? ({});
property = r1[a1];
r1[a1] = (property ?? 0) + 1;
this._unsubscriptions[a0] = r1;
if (r1[a1] === 1) {
this._unsubscribe.delay(false);
}
}
}}, {key: 'checkForLeaks', value: value_54708}, {key: 'flushUnsubscriptions', value: value_54709}]);
function GuildMemberSubscriptions(a0) { // fn#54699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:165, offset: 0x0136c3c9, size: 119 bytes, params: 2, frame: 16
var environment;
const value = environment.__proto__;
env1_3(this, GuildMemberSubscriptions);
this._subscriptions = {};
this._unsubscriptions = {};
const DelayedCall = (TimersModule).DelayedCall;
this._unsubscribe = new DelayedCall(env1_5, _fun54700);
this._onChange = a0;
function _fun54700() { // fn#54700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:329, offset: 0x0136c440, size: 21 bytes, params: 1, frame: 9
return env0_0.flushUnsubscriptions();
}
}
}}, {key: 'checkForLeaks', value: value_54708}, {key: 'flushUnsubscriptions', value: value_54709}]);
}
function GuildMemberSubscriptions(a0) { // fn#54699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:165, offset: 0x0136c3c9, size: 119 bytes, params: 2, frame: 16
var environment;
const value = environment.__proto__;
env1_3(this, GuildMemberSubscriptions);
this._subscriptions = {};
this._unsubscriptions = {};
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
this._unsubscribe = new DelayedCall(env1_5, _fun54700);
this._onChange = a0;
}
function value_54702(a0) { // fn#54702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:507, offset: 0x0136c47c, size: 61 bytes, params: 2, frame: 12
const r2 = this._subscriptions[a0] ?? ({});
const value = environment.__proto__;
return (SnowflakeUtils).keys(r2);
}
function value_54702(a0) { // fn#54702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:507, offset: 0x0136c47c, size: 61 bytes, params: 2, frame: 12
const r2 = this._subscriptions[a0] ?? ({});
const value = environment.__proto__;
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(r2);
}
function value_54708(a0, a1) { // fn#54708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1322, offset: 0x0136c602, size: 183 bytes, params: 3, frame: 18
var value4;
var defaultImport;
var value5;
var defaultImport2;
let property = this._subscriptions[a0];
const value = undefined;
const r7 = property == null ? value : property[a1];
const value2 = 0;
const r1 = r7 ?? value2;
property = this._unsubscriptions[a0];
const value3 = r1 - ((property == null ? value : property[a1]) ?? value2);
if (value3 > 5) {
value4 = environment.__proto__;
defaultImport = importDefault(3) /* metro dependency 3: Logger */;
value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
defaultImport2 = new defaultImport('GuildMemberSubscriptions');
(defaultImport2 instanceof Object ? defaultImport2 : value5).warn('GuildMemberSubscriptions.subscribe(...): Potential reference leak! (' + value3 + ' subscriptions)');
}
return value;
}
function value_54708(a0, a1) { // fn#54708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1322, offset: 0x0136c602, size: 183 bytes, params: 3, frame: 18
var value4;
var defaultImport;
var value5;
var defaultImport2;
let property = this._subscriptions[a0];
const value = undefined;
const r7 = property == null ? value : property[a1];
const value2 = 0;
const r1 = r7 ?? value2;
property = this._unsubscriptions[a0];
const value3 = r1 - ((property == null ? value : property[a1]) ?? value2);
if (value3 > 5) {
value4 = environment.__proto__;
defaultImport = importDefault(3) /* metro dependency 3: Logger */;
value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
defaultImport2 = new defaultImport('GuildMemberSubscriptions');
(defaultImport2 instanceof Object ? defaultImport2 : value5).warn('GuildMemberSubscriptions.subscribe(...): Potential reference leak! (' + value3 + ' subscriptions)');
}
return value;
}
function value_54709() { // fn#54709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1652, offset: 0x0136c6b9, size: 103 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = defaultImport22;
if (!defaultImport.isEmpty(this._unsubscriptions)) {
value = defaultImport;
value.forEach(this._unsubscriptions, _fun54710);
this._unsubscriptions = {};
}
function _fun54710(a0, a1) { // fn#54710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1743, offset: 0x0136c720, size: 135 bytes, params: 3, frame: 20
const property = property2._subscriptions[a1];
var property2 = property;
(defaultImport22).forEach(a0, _fun54711);
const defaultImport2 = defaultImport22;
if (defaultImport2.isEmpty(property)) {
delete property2._subscriptions[a1];
}
const binding = property2;
const _onChange = binding._onChange;
const get = binding.get;
Reflect.apply(_onChange, binding, [a1, Reflect.apply(get, binding, [a1])]);
function _fun54711(a0, a1) { // fn#54711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1799, offset: 0x0136c7a7, size: 65 bytes, params: 3, frame: 7
const binding = env0_0;
const property = binding[a1];
const value2 = 0;
binding[a1] = (property ?? value2) - a0;
if (env0_0[a1] <= value2) {
delete env0_0[a1];
}
}
function value_54709() { // fn#54709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1652, offset: 0x0136c6b9, size: 103 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (!defaultImport.isEmpty(this._unsubscriptions)) {
value = defaultImport;
value.forEach(this._unsubscriptions, _fun54710);
this._unsubscriptions = {};
}
}
}
function _fun54700() { // fn#54700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:329, offset: 0x0136c440, size: 21 bytes, params: 1, frame: 9
return env0_0.flushUnsubscriptions();
}
}
function _fun54710(a0, a1) { // fn#54710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1743, offset: 0x0136c720, size: 135 bytes, params: 3, frame: 20
const property = env0_0._subscriptions[a1];
var env0_0 = property;
(importDefault(22) /* metro dependency 22 */).forEach(a0, _fun54711);
const defaultImport2 = importDefault(22) /* metro dependency 22 */;
if (defaultImport2.isEmpty(property)) {
delete env0_0._subscriptions[a1];
}
const binding = env0_0;
const _onChange = binding._onChange;
const get = binding.get;
Reflect.apply(_onChange, binding, [a1, Reflect.apply(get, binding, [a1])]);
}
function _fun54711(a0, a1) { // fn#54711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7067:1799, offset: 0x0136c7a7, size: 65 bytes, params: 3, frame: 7
const binding = env0_0;
const property = binding[a1];
const value2 = 0;
binding[a1] = (property ?? value2) - a0;
if (env0_0[a1] <= value2) {
delete env0_0[a1];
}
}
global.__d(_fun54697, 6889, [6, 7, 672, 4041, 21, 3, 22,
2]) /* metro module 6889, dependencies: [6, 7, 672, 4041, 21, 3, 22, 2] */;
+179 -165
View File
@@ -1,121 +1,185 @@
/* Metro module 6888; source: lib/guild/GuildSubscriptions.tsx; dependencies: [6, 7, 661, 6889, 6890, 6891, 4041, 22, 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 GuildMemberSubscriptions from './GuildMemberSubscriptions.tsx'; /* Metro dependency 6889 */
import GuildChannelSubscriptions from './GuildChannelSubscriptions.tsx'; /* Metro dependency 6890 */
import GuildThreadSubscriptions from './GuildThreadSubscriptions.tsx'; /* Metro dependency 6891 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
import * as GuildChannelSubscriptionsModule from './GuildChannelSubscriptions.tsx'; /* Metro dependency 6890 */
function _fun54669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:6, offset: 0x0136b7fd, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
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 */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_5 = value.FAVORITES;
const env0_6 = value.ME;
value = _fun54671();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildSubscriptions.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/guild/GuildSubscriptions.tsx');
exports.default = value;
const MINIMUM_RANGE = (require(6890) /* metro dependency 6890: GuildChannelSubscriptions */).MINIMUM_RANGE;
const MINIMUM_RANGE = (GuildChannelSubscriptionsModule).MINIMUM_RANGE;
exports.MINIMUM_RANGE = MINIMUM_RANGE;
const DEFAULT_RANGES = (require(6890) /* metro dependency 6890: GuildChannelSubscriptions */).DEFAULT_RANGES;
const DEFAULT_RANGES = (GuildChannelSubscriptionsModule).DEFAULT_RANGES;
exports.DEFAULT_RANGES = DEFAULT_RANGES;
}
function validateGuildId(a0) { // fn#54670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:147, offset: 0x0136b8db, size: 61 bytes, params: 2, frame: 3
let r0 = a0 != null && a0 !== 'null' && a0 !== ME;
r0 = r0 && a0 !== 'undefined' && a0 !== FAVORITES;
return r0;
}
function validateGuildId(a0) { // fn#54670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:147, offset: 0x0136b8db, size: 61 bytes, params: 2, frame: 3
let r0 = a0 != null && a0 !== 'null' && a0 !== ME;
r0 = r0 && a0 !== 'undefined' && a0 !== FAVORITES;
return r0;
}
function _fun54671() { // fn#54671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:239, offset: 0x0136b918, size: 471 bytes, params: 1, frame: 15
return env0_4(GuildSubscriptions, [{key: '_enqueue', value: function(a0, a1) {
var property = this._pending;
var object = {};
var _pending = this._pending;
copyDataProperties(object, a1, copyDataProperties(object, _pending[a0], _pending));
property[a0] = object;
this._flush.delay();
}}, {key: 'reset', value: value_54678}, {key: 'get', value: value_54679}, {key: 'getSubscribedThreadIds',
value: function() {
return this._threadMemberLists.getSubscribedThreadIds();
}}, {key: 'isSubscribedToThreads', value: function(a0) {
return this._threads.has(a0);
}}, {key: 'isSubscribedToAnyMember', value: function(a0) {
var isSubscribedToAnyMember = this._members.isSubscribedToAnyMember(a0);
return isSubscribedToAnyMember != null && isSubscribedToAnyMember;
}}, {key: 'isSubscribedToMemberUpdates', value: function(a0) {
var member_updates = this.get(a0).member_updates;
return member_updates != null && member_updates;
}}, {key: 'forEach', value: function(a0) {
this._subscribed.forEach(a0);
}}, {key: 'clearWithoutFlushing', value: value_54685}, {key: 'flush', value: value_54686}, {key: 'subscribeUser',
value: function(a0, a1) {
if (validateGuildId(a0)) {
this._members.subscribe(a0, a1);
}
}}, {key: 'unsubscribeUser', value: function(a0, a1) {
if (validateGuildId(a0)) {
this._members.unsubscribe(a0, a1);
}
}}, {key: 'subscribeChannel', value: value_54690}, {key: 'subscribeToMemberUpdates', value: function(a0) {
if (validateGuildId(a0)) {
this._enqueue(a0, {member_updates: true});
this._memberUpdates.add(a0);
return undefined;
}
return false;
}}, {key: 'unsubscribeFromMemberUpdates', value: value_54692}, {key: 'subscribeThreadMemberList',
value: value_54693}, {key: 'unsubscribeThreadMemberList', value: value_54694}, {key: 'subscribeToGuild',
value: function(a0) {
this._subscribeToFeature(a0, this._typing, {typing: true});
this._subscribeToFeature(a0, this._activities, {activities: true});
this._subscribeToFeature(a0, this._threads, {threads: true});
}}, {key: '_subscribeToFeature', value: function(a0, a1, a2) {
if (validateGuildId(a0)) {
if (!a1.has(a0)) {
a1.add(a0);
this._enqueue(a0, a2);
function _fun54671() { // fn#54671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:239, offset: 0x0136b918, size: 471 bytes, params: 1, frame: 15
return CreateClass(GuildSubscriptions, [{key: '_enqueue', value: function(a0, a1) {
var property = this._pending;
var object = {};
var _pending = this._pending;
copyDataProperties(object, a1, copyDataProperties(object, _pending[a0], _pending));
property[a0] = object;
this._flush.delay();
}}, {key: 'reset', value: value_54678}, {key: 'get', value: value_54679}, {key: 'getSubscribedThreadIds',
value: function() {
return this._threadMemberLists.getSubscribedThreadIds();
}}, {key: 'isSubscribedToThreads', value: function(a0) {
return this._threads.has(a0);
}}, {key: 'isSubscribedToAnyMember', value: function(a0) {
var isSubscribedToAnyMember = this._members.isSubscribedToAnyMember(a0);
return isSubscribedToAnyMember != null && isSubscribedToAnyMember;
}}, {key: 'isSubscribedToMemberUpdates', value: function(a0) {
var member_updates = this.get(a0).member_updates;
return member_updates != null && member_updates;
}}, {key: 'forEach', value: function(a0) {
this._subscribed.forEach(a0);
}}, {key: 'clearWithoutFlushing', value: value_54685}, {key: 'flush', value: value_54686}, {key: 'subscribeUser',
value: function(a0, a1) {
if (validateGuildId(a0)) {
this._members.subscribe(a0, a1);
}
}}, {key: 'unsubscribeUser', value: function(a0, a1) {
if (validateGuildId(a0)) {
this._members.unsubscribe(a0, a1);
}
}}, {key: 'subscribeChannel', value: value_54690}, {key: 'subscribeToMemberUpdates', value: function(a0) {
if (validateGuildId(a0)) {
this._enqueue(a0, {member_updates: true});
this._memberUpdates.add(a0);
return undefined;
}
return false;
}}, {key: 'unsubscribeFromMemberUpdates', value: value_54692}, {key: 'subscribeThreadMemberList',
value: value_54693}, {key: 'unsubscribeThreadMemberList', value: value_54694}, {key: 'subscribeToGuild',
value: function(a0) {
this._subscribeToFeature(a0, this._typing, {typing: true});
this._subscribeToFeature(a0, this._activities, {activities: true});
this._subscribeToFeature(a0, this._threads, {threads: true});
}}, {key: '_subscribeToFeature', value: function(a0, a1, a2) {
if (validateGuildId(a0)) {
if (!a1.has(a0)) {
a1.add(a0);
this._enqueue(a0, a2);
}
}
}}]);
function GuildSubscriptions(a0) { // fn#54672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:260, offset: 0x0136baef, size: 404 bytes, params: 2, frame: 18
var environment;
const value = environment.__proto__;
env1_3(this, GuildSubscriptions);
const defaultImport = GuildMemberSubscriptions;
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport4 = new defaultImport(_fun54673);
this._members = defaultImport4 instanceof Object ? defaultImport4 : value3;
const defaultImport2 = GuildChannelSubscriptions;
const value6 = Object.create(defaultImport2.prototype, {constructor: {value: defaultImport2}});
const defaultImport22 = new defaultImport2(_fun54674);
this._channels = defaultImport22 instanceof Object ? defaultImport22 : value6;
const defaultImport3 = GuildThreadSubscriptions;
const value9 = Object.create(defaultImport3.prototype, {constructor: {value: defaultImport3}});
const defaultImport32 = new defaultImport3(_fun54675);
this._threadMemberLists = defaultImport32 instanceof Object ? defaultImport32 : value9;
let Set = global.Set;
const value12 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set();
this._typing = set instanceof Object ? set : value12;
Set = global.Set;
const value14 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._threads = set instanceof Object ? set : value14;
Set = global.Set;
const value16 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._activities = set instanceof Object ? set : value16;
Set = global.Set;
const value18 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._memberUpdates = set instanceof Object ? set : value18;
Set = global.Set;
const value20 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._subscribed = set instanceof Object ? set : value20;
this._pending = {};
const DelayedCall = (TimersModule).DelayedCall;
this._flush = new DelayedCall(0, _fun54676);
this._onChange = a0;
function _fun54673(a0, a1) { // fn#54673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:346, offset: 0x0136bc83, size: 34 bytes, params: 3, frame: 13
return env0_0._enqueue(a0, {members: a1});
}
}
}}]);
}
function GuildSubscriptions(a0) { // fn#54672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:260, offset: 0x0136baef, size: 404 bytes, params: 2, frame: 18
var environment;
const value = environment.__proto__;
env1_3(this, GuildSubscriptions);
const defaultImport = importDefault(6889) /* metro dependency 6889: GuildMemberSubscriptions */;
const value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport4 = new defaultImport(_fun54673);
this._members = defaultImport4 instanceof Object ? defaultImport4 : value3;
const defaultImport2 = importDefault(6890) /* metro dependency 6890: GuildChannelSubscriptions */;
const value6 = Object.create(defaultImport2.prototype, {constructor: {value: defaultImport2}});
const defaultImport22 = new defaultImport2(_fun54674);
this._channels = defaultImport22 instanceof Object ? defaultImport22 : value6;
const defaultImport3 = importDefault(6891) /* metro dependency 6891: GuildThreadSubscriptions */;
const value9 = Object.create(defaultImport3.prototype, {constructor: {value: defaultImport3}});
const defaultImport32 = new defaultImport3(_fun54675);
this._threadMemberLists = defaultImport32 instanceof Object ? defaultImport32 : value9;
let Set = global.Set;
const value12 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set();
this._typing = set instanceof Object ? set : value12;
Set = global.Set;
const value14 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._threads = set instanceof Object ? set : value14;
Set = global.Set;
const value16 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._activities = set instanceof Object ? set : value16;
Set = global.Set;
const value18 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._memberUpdates = set instanceof Object ? set : value18;
Set = global.Set;
const value20 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
this._subscribed = set instanceof Object ? set : value20;
this._pending = {};
const DelayedCall = (require(4041) /* metro dependency 4041: Timers */).DelayedCall;
this._flush = new DelayedCall(0, _fun54676);
this._onChange = a0;
function _fun54674(a0, a1) { // fn#54674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:413, offset: 0x0136bca5, size: 34 bytes, params: 3, frame: 13
return env0_0._enqueue(a0, {channels: a1});
}
function _fun54675(a0, a1) { // fn#54675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:490, offset: 0x0136bcc7, size: 34 bytes, params: 3, frame: 13
return env0_0._enqueue(a0, {thread_member_lists: a1});
}
function _fun54676() { // fn#54676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:718, offset: 0x0136bce9, size: 19 bytes, params: 1, frame: 9
return env0_0.flush();
}
}
function value_54686() { // fn#54686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2193, offset: 0x0136bfaf, size: 83 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._pending, _fun54687);
this._onChange(this._pending);
this._pending = {};
function _fun54687(a0, a1) { // fn#54687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2235, offset: 0x0136c002, size: 30 bytes, params: 3, frame: 11
env0_0._subscribed.add(a1);
}
}
function value_54690(a0, a1, a2) { // fn#54690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2537, offset: 0x0136c07c, size: 56 bytes, params: 4, frame: 16
let value = environment.__proto__;
value = validateGuildId(a0);
return value ? this._channels.subscribe(a0, a1, a2) : !!value;
}
function value_54692(a0) { // fn#54692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2805, offset: 0x0136c0f6, size: 48 bytes, params: 2, frame: 15
const value = environment.__proto__;
if (validateGuildId(a0)) {
this._enqueue(a0, {member_updates: false});
return undefined;
}
return false;
}
function value_54693(a0, a1, a2) { // fn#54693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2927, offset: 0x0136c126, size: 56 bytes, params: 4, frame: 16
let value = environment.__proto__;
value = validateGuildId(a0);
return value ? this._threadMemberLists.subscribe(a0, a1, a2) : !!value;
}
function value_54694(a0, a1) { // fn#54694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:3055, offset: 0x0136c15e, size: 52 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = validateGuildId(a0);
return value ? this._threadMemberLists.unsubscribe(a0, a1) : !!value;
}
}
}
function value_54678() { // fn#54678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:878, offset: 0x0136bd3d, size: 143 bytes, params: 1, frame: 10
@@ -131,15 +195,15 @@ function value_54678() { // fn#54678, source: /ci/build/discord/discord/discord_
}
function value_54679(a0) { // fn#54679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:1123, offset: 0x0136bdcc, size: 157 bytes, params: 2, frame: 13
const object2 = {};
object2.typing = this._typing.has(a0);
object2.threads = this._threads.has(a0);
object2.activities = this._activities.has(a0);
object2.members = this._members.get(a0);
object2.member_updates = this._memberUpdates.has(a0);
object2.channels = this._channels.get(a0);
object2.thread_member_lists = this._threadMemberLists.get(a0);
return object2;
const object = {};
object.typing = this._typing.has(a0);
object.threads = this._threads.has(a0);
object.activities = this._activities.has(a0);
object.members = this._members.get(a0);
object.member_updates = this._memberUpdates.has(a0);
object.channels = this._channels.get(a0);
object.thread_member_lists = this._threadMemberLists.get(a0);
return object;
}
function value_54685(a0, a1) { // fn#54685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:1894, offset: 0x0136bef9, size: 182 bytes, params: 3, frame: 14
@@ -158,55 +222,5 @@ function value_54685(a0, a1) { // fn#54685, source: /ci/build/discord/discord/di
this._activities.delete(a0);
}
function value_54686() { // fn#54686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2193, offset: 0x0136bfaf, size: 83 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._pending, _fun54687);
this._onChange(this._pending);
this._pending = {};
}
function value_54690(a0, a1, a2) { // fn#54690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2537, offset: 0x0136c07c, size: 56 bytes, params: 4, frame: 16
let value = environment.__proto__;
value = validateGuildId(a0);
return value ? this._channels.subscribe(a0, a1, a2) : !!value;
}
function value_54692(a0) { // fn#54692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2805, offset: 0x0136c0f6, size: 48 bytes, params: 2, frame: 15
const value = environment.__proto__;
if (validateGuildId(a0)) {
this._enqueue(a0, {member_updates: false});
return undefined;
}
return false;
}
function value_54693(a0, a1, a2) { // fn#54693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2927, offset: 0x0136c126, size: 56 bytes, params: 4, frame: 16
let value = environment.__proto__;
value = validateGuildId(a0);
return value ? this._threadMemberLists.subscribe(a0, a1, a2) : !!value;
}
function value_54694(a0, a1) { // fn#54694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:3055, offset: 0x0136c15e, size: 52 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = validateGuildId(a0);
return value ? this._threadMemberLists.unsubscribe(a0, a1) : !!value;
}
function _fun54673(a0, a1) { // fn#54673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:346, offset: 0x0136bc83, size: 34 bytes, params: 3, frame: 13
return env0_0._enqueue(a0, {members: a1});
}
function _fun54674(a0, a1) { // fn#54674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:413, offset: 0x0136bca5, size: 34 bytes, params: 3, frame: 13
return env0_0._enqueue(a0, {channels: a1});
}
function _fun54675(a0, a1) { // fn#54675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:490, offset: 0x0136bcc7, size: 34 bytes, params: 3, frame: 13
return env0_0._enqueue(a0, {thread_member_lists: a1});
}
function _fun54687(a0, a1) { // fn#54687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7066:2235, offset: 0x0136c002, size: 30 bytes, params: 3, frame: 11
env0_0._subscribed.add(a1);
}
global.__d(_fun54669, 6888, [6, 7, 661, 6889, 6890, 6891, 4041, 22,
2]) /* metro module 6888, dependencies: [6, 7, 661, 6889, 6890, 6891, 4041, 22, 2] */;
+164 -150
View File
@@ -1,4 +1,8 @@
/* Metro module 6891; source: lib/guild/GuildThreadSubscriptions.tsx; dependencies: [6, 7, 1393, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:6, offset: 0x0136ca80, size: 150 bytes, params: 8, frame: 18
const _arrayLikeToArray_54725 = function(a0, a1) {
var r0;
@@ -45,176 +49,185 @@ function _fun54722(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
let value = _fun54726();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/GuildThreadSubscriptions.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/guild/GuildThreadSubscriptions.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_54723(a0, a1) { // fn#54723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:120, offset: 0x0136cb16, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_54723(a0, a1) { // fn#54723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:120, offset: 0x0136cb16, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun54724;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54725(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun54724;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54725(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_54725(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_54725(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun54724;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun54724() { // fn#54724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:691, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _fun54726() { // fn#54726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1036, offset: 0x0136cc88, size: 193 bytes, params: 1, frame: 15
return CreateClass(GuildThreadSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
}}, {key: 'get', value: function(a0) {
return this._get(a0).keys();
}}, {key: 'getSubscribedThreadIds', value: value_54730}, {key: '_get', value: value_54731}, {key: 'clear',
value: function(a0) {
if (a0 in this._subscriptions) {
delete this._subscriptions[a0];
this._onChange(a0, []);
}
}}, {key: 'subscribe', value: value_54733}, {key: 'unsubscribe', value: function(a0, a1) {
var r0;
var property;
var value;
if (a0 in this._subscriptions) {
property = this._subscriptions[a0];
value = property.has(a1);
if (value) {
property.del(a1);
this._onChange(a0, property.keys());
r0 = true;
} else {
r0 = !!value;
}
return r0;
}
return false;
}}]);
function GuildThreadSubscriptions(a0) { // fn#54727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1057, offset: 0x0136c945, size: 44 bytes, params: 2, frame: 13
env1_2(this, GuildThreadSubscriptions);
this._subscriptions = {};
this._onChange = a0;
}
function value_54730() { // fn#54730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1319, offset: 0x0136cd65, size: 136 bytes, params: 1, frame: 21
var r8;
var r2;
var propertyName;
var propertyName2;
var _createForOfIteratorHelperLoose_54723Binding;
var _subscriptions2;
var property;
var keys;
var value3;
var value4;
var done;
var value5;
var add;
var value6;
const Set = global.Set;
const set = new Set();
const properties = Object.keys(this._subscriptions);
const properties2 = 0;
const properties3 = properties.length;
if (properties !== undefined) {
r8 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r8];
propertyName2 = r8 + 1;
if (propertyName === undefined) {
break reducibleLoop1;
}
_createForOfIteratorHelperLoose_54723Binding = _createForOfIteratorHelperLoose_54723;
_subscriptions2 = this._subscriptions;
property = _subscriptions2[propertyName];
keys = property.keys;
value3 = _createForOfIteratorHelperLoose_54723Binding(Reflect.apply(keys, property, []));
value4 = value3();
done = value4.done;
if (done) {
r8 = propertyName2;
continue reducibleLoop1;
}
r2 = value4;
reducibleLoop3: while (true) {
value5 = r2.value;
add = set.add;
Reflect.apply(add, set, [value5]);
value6 = value3();
done = value6.done;
if (done) {
r8 = propertyName2;
continue reducibleLoop1;
}
r2 = value6;
continue reducibleLoop3;
}
continue reducibleLoop1;
}
}
r5 = r6;
return set;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun54724;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun54726() { // fn#54726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1036, offset: 0x0136cc88, size: 193 bytes, params: 1, frame: 15
return env0_3(GuildThreadSubscriptions, [{key: 'reset', value: function() {
this._subscriptions = {};
}}, {key: 'get', value: function(a0) {
return this._get(a0).keys();
}}, {key: 'getSubscribedThreadIds', value: value_54730}, {key: '_get', value: value_54731}, {key: 'clear',
value: function(a0) {
if (a0 in this._subscriptions) {
delete this._subscriptions[a0];
this._onChange(a0, []);
}
}}, {key: 'subscribe', value: value_54733}, {key: 'unsubscribe', value: function(a0, a1) {
var r0;
var property;
var value;
if (a0 in this._subscriptions) {
property = this._subscriptions[a0];
value = property.has(a1);
if (value) {
property.del(a1);
this._onChange(a0, property.keys());
r0 = true;
function value_54731(a0) { // fn#54731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1520, offset: 0x0136cded, size: 83 bytes, params: 2, frame: 12
var r0;
var value;
const property = this._subscriptions[a0];
if (property != null) {
r0 = property;
} else {
r0 = !!value;
value = environment.__proto__;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({'max': 3, 'updateAgeOnGet': true});
r0 = value;
}
return r0;
}
return false;
}}]);
}
function value_54730() { // fn#54730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1319, offset: 0x0136cd65, size: 136 bytes, params: 1, frame: 21
var r8;
var r2;
var propertyName;
var propertyName2;
var _createForOfIteratorHelperLoose_54723Binding;
var _subscriptions2;
var property;
var keys;
var value3;
var value4;
var done;
var value5;
var add;
var value6;
const Set = global.Set;
const set = new Set();
const properties = Object.keys(this._subscriptions);
const properties2 = 0;
const properties3 = properties.length;
if (properties !== undefined) {
r8 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r8];
propertyName2 = r8 + 1;
if (propertyName === undefined) {
break reducibleLoop1;
}
_createForOfIteratorHelperLoose_54723Binding = _createForOfIteratorHelperLoose_54723;
_subscriptions2 = this._subscriptions;
property = _subscriptions2[propertyName];
keys = property.keys;
value3 = _createForOfIteratorHelperLoose_54723Binding(Reflect.apply(keys, property, []));
value4 = value3();
done = value4.done;
if (done) {
r8 = propertyName2;
continue reducibleLoop1;
}
r2 = value4;
reducibleLoop3: while (true) {
value5 = r2.value;
add = set.add;
Reflect.apply(add, set, [value5]);
value6 = value3();
done = value6.done;
if (done) {
r8 = propertyName2;
continue reducibleLoop1;
}
r2 = value6;
continue reducibleLoop3;
}
continue reducibleLoop1;
}
}
return set;
}
function value_54731(a0) { // fn#54731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1520, offset: 0x0136cded, size: 83 bytes, params: 2, frame: 12
var r0;
var value;
const property = this._subscriptions[a0];
if (property != null) {
r0 = property;
} else {
value = environment.__proto__;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({'max': 3, 'updateAgeOnGet': true});
r0 = value;
}
return r0;
}
function value_54733(a0, a1, a2) { // fn#54733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7069:1757, offset: 0x0136ce71, size: 181 bytes, params: 4, frame: 17
@@ -246,3 +259,4 @@ function value_54733(a0, a1, a2) { // fn#54733, source: /ci/build/discord/discor
return r0;
}
global.__d(_fun54722, 6891, [6, 7, 1393, 2]) /* metro module 6891, dependencies: [6, 7, 1393, 2] */;
+186 -170
View File
@@ -1,190 +1,206 @@
/* Metro module 6902; source: lib/guild/subscribeGuildMembers.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216, 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 Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildSubscriptionsActionCreatorsModule from '../../actions/GuildSubscriptionsActionCreators.tsx'; /* Metro dependency 6903 */
function _fun54904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:6, offset: 0x01370aa8, size: 287 bytes, params: 8, frame: 19
let env0_0 = require;
const env0_3 = ['forwardedRef'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
const env0_10 = importAll(31) /* metro dependency 31 */;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/guild/subscribeGuildMembers.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/guild/subscribeGuildMembers.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return _fun54909;
};
exports.MAX_GUILD_MEMBER_SUBSCRIPTIONS = 50;
exports.useSubscribeGuildMembers = useSubscribeGuildMembers;
}
function _isNativeReflectConstruct_54905() { // fn#54905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:205, offset: 0x01370bc7, 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_54905_isNativeReflectConstruct = function() {
return !!result;
})();
}
function subscribeGuildMembers(a0) { // fn#54908, offset: 0x01370c25, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun54909;
}
function useSubscribeGuildMembers(a0, a1) { // fn#54920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1859, offset: 0x01370fd4, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
env0_10.useEffect(_fun54921, [a0, a1]);
}
function _fun54909(a0) { // fn#54909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:529, offset: 0x01370c35, size: 152 bytes, params: 2, frame: 17
const env0_0 = a0;
value = 'SubscribeGuildMembersContainer(' + (a0.displayName ?? a0.name ?? 'Component') + ')';
const binding = env1_10;
const Component = binding.Component;
_fun54910(Component).displayName = value;
const value4 = binding.forwardRef(_fun54919);
value4.displayName = 'ForwardRef(' + value + ')';
return value4;
}
function _fun54921() { // fn#54921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1911, offset: 0x0137100b, size: 57 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(env0_0, _fun54922);
return _fun54923;
}
function _fun54910(a0) { // fn#54910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:681, offset: 0x01370ccd, size: 114 bytes, params: 2, frame: 16
const closure = WrappedComponent_54911;
env2_9(closure, a0);
return env2_6(closure, [{key: 'componentDidUpdate', value: value_54913}, {key: 'componentWillUnmount',
value: value_54916}, {key: 'render', value: value_54918}]);
}
function _fun54919(a0, a1) { // fn#54919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1714, offset: 0x01370fa4, size: 48 bytes, params: 3, frame: 14
return ((Component) => <Component {...a0} {...{['forwardedRef']: a1}} />)(env0_1);
}
function _fun54922(a0, a1) { // fn#54922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1935, offset: 0x01371044, size: 150 bytes, params: 3, frame: 17
var defaultImport;
var captureMessage;
var value4;
const value = environment.__proto__.__proto__;
if (!env2_12 && a0.length > 50) {
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
captureMessage = defaultImport.captureMessage;
value4 = environment.__proto__;
Reflect.apply(captureMessage, defaultImport, ['SubscribeGuildMembers called with more than 50 userIds.',
{extra: {count: a0.length, guildId: a1, reason: require}}]);
}
(require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).subscribeMembers(a1, a0);
}
function _fun54923() { // fn#54923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2127, offset: 0x013710da, size: 52 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(env1_0, _fun54924);
}
function WrappedComponent_54911(a0) { // fn#54911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:693, offset: 0x01370d3f, size: 171 bytes, params: 2, frame: 21
var environment;
const value = environment.__proto__.__proto__.__proto__;
env3_5(this, WrappedComponent_54911);
const items2 = [a0];
const value3 = env3_8(WrappedComponent_54911);
const value6 = env3_7(this, _isNativeReflectConstruct_54905() ? global.Reflect.construct(value3, items2,
env3_8(this).constructor) : value3.apply(this, items2));
const value8 = env2_0(a0);
(importDefault(22) /* metro dependency 22 */).forEach(value8, _fun54912);
value6._subscriptions = value8;
return value6;
}
function value_54913(a0) { // fn#54913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1092, offset: 0x01370e17, size: 219 bytes, params: 2, frame: 19
var environment;
var r5;
var value2;
var value3;
var value4;
var defaultImport2;
var defaultImport3;
const value = environment.__proto__.__proto__.__proto__;
if (!(importDefault(628) /* metro dependency 628: shallowEqual */)(this.props, a0)) {
value2 = environment.__proto__.__proto__;
value3 = env2_0(this.props);
value4 = this._subscriptions != null;
if (value4) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
r5 = defaultImport2.isEqual(this._subscriptions, value3);
} else {
r5 = value4;
function _isNativeReflectConstruct_54905() { // fn#54905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:205, offset: 0x01370bc7, 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) {
}
if (!r5) {
if (this._subscriptions != null) {
defaultImport3 = importDefault(22) /* metro dependency 22 */;
defaultImport3.forEach(this._subscriptions, _fun54914);
return (_isNativeReflectConstruct_54905_isNativeReflectConstruct = function() {
return !!result;
})();
}
function subscribeGuildMembers(a0) { // fn#54908, offset: 0x01370c25, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun54909;
function _fun54909(a0) { // fn#54909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:529, offset: 0x01370c35, size: 152 bytes, params: 2, frame: 17
const env0_0 = a0;
value = 'SubscribeGuildMembersContainer(' + (a0.displayName ?? a0.name ?? 'Component') + ')';
const binding = env1_10;
const Component = binding.Component;
_fun54910(Component).displayName = value;
const value4 = binding.forwardRef(_fun54919);
value4.displayName = 'ForwardRef(' + value + ')';
return value4;
function _fun54910(a0) { // fn#54910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:681, offset: 0x01370ccd, size: 114 bytes, params: 2, frame: 16
const WrappedComponent_549112 = WrappedComponent_54911;
env2_9(WrappedComponent_549112, a0);
return env2_6(WrappedComponent_549112, [{key: 'componentDidUpdate', value: value_54913},
{key: 'componentWillUnmount', value: value_54916}, {key: 'render', value: value_54918}]);
function WrappedComponent_54911(a0) { // fn#54911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:693, offset: 0x01370d3f, size: 171 bytes, params: 2, frame: 21
var environment;
const value = environment.__proto__.__proto__.__proto__;
env3_5(this, WrappedComponent_54911);
const items2 = [a0];
const value3 = env3_8(WrappedComponent_54911);
const value6 = env3_7(this, _isNativeReflectConstruct_54905() ? global.Reflect.construct(value3, items2,
env3_8(this).constructor) : value3.apply(this, items2));
const value8 = env2_0(a0);
(Module00022).forEach(value8, _fun54912);
value6._subscriptions = value8;
return value6;
function _fun54912(a0, a1) { // fn#54912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:951, offset: 0x01370dea, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).subscribeMembers(a1, a0);
}
}
function value_54913(a0) { // fn#54913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1092, offset: 0x01370e17, size: 219 bytes, params: 2, frame: 19
var environment;
var r5;
var value2;
var value3;
var value4;
var defaultImport2;
var defaultImport3;
const value = environment.__proto__.__proto__.__proto__;
if (!(importDefault(628) /* metro dependency 628: shallowEqual */)(this.props, a0)) {
value2 = environment.__proto__.__proto__;
value3 = env2_0(this.props);
value4 = this._subscriptions != null;
if (value4) {
defaultImport2 = importDefault(22) /* metro dependency 22 */;
r5 = defaultImport2.isEqual(this._subscriptions, value3);
} else {
r5 = value4;
}
if (!r5) {
if (this._subscriptions != null) {
defaultImport3 = importDefault(22) /* metro dependency 22 */;
defaultImport3.forEach(this._subscriptions, _fun54914);
}
(importDefault(22) /* metro dependency 22 */).forEach(value3, _fun54915);
this._subscriptions = value3;
}
}
function _fun54914(a0, a1) { // fn#54914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1284, offset: 0x01370ef2, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).unsubscribeMembers(a1, a0);
}
function _fun54915(a0, a1) { // fn#54915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1344, offset: 0x01370dea, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).subscribeMembers(a1, a0);
}
}
function value_54916() { // fn#54916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1443, offset: 0x01370f1f, size: 68 bytes, params: 1, frame: 13
var environment;
var value;
if (this._subscriptions != null) {
value = environment.__proto__.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._subscriptions, _fun54917);
}
function _fun54917(a0, a1) { // fn#54917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1518, offset: 0x01370ef2, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).unsubscribeMembers(a1, a0);
}
}
function value_54918() { // fn#54918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1581, offset: 0x01370f63, size: 65 bytes, params: 1, frame: 15
const props = this.props;
return ((Component) => <Component ref={props.forwardedRef} {...env3_4(props, env3_3)} />)(env1_0);
}
}
(importDefault(22) /* metro dependency 22 */).forEach(value3, _fun54915);
this._subscriptions = value3;
function _fun54919(a0, a1) { // fn#54919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1714, offset: 0x01370fa4, size: 48 bytes, params: 3, frame: 14
return ((Component) => <Component {...a0} {...{['forwardedRef']: a1}} />)(env0_1);
}
}
}
}
function value_54916() { // fn#54916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1443, offset: 0x01370f1f, size: 68 bytes, params: 1, frame: 13
var environment;
var value;
if (this._subscriptions != null) {
value = environment.__proto__.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(this._subscriptions, _fun54917);
function useSubscribeGuildMembers(a0, a1) { // fn#54920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1859, offset: 0x01370fd4, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
ReactModule.useEffect(_fun54921, [a0, a1]);
function _fun54921() { // fn#54921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1911, offset: 0x0137100b, size: 57 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(env0_0, _fun54922);
return _fun54923;
function _fun54922(a0, a1) { // fn#54922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1935, offset: 0x01371044, size: 150 bytes, params: 3, frame: 17
var defaultImport;
var captureMessage;
var value4;
const value = environment.__proto__.__proto__;
if (!env2_12 && a0.length > 50) {
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
captureMessage = defaultImport.captureMessage;
value4 = environment.__proto__;
Reflect.apply(captureMessage, defaultImport, ['SubscribeGuildMembers called with more than 50 userIds.',
{extra: {count: a0.length, guildId: a1, reason: require}}]);
}
(GuildSubscriptionsActionCreatorsModule).subscribeMembers(a1, a0);
}
function _fun54923() { // fn#54923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2127, offset: 0x013710da, size: 52 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value.forEach(env1_0, _fun54924);
function _fun54924(a0, a1) { // fn#54924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2151, offset: 0x0137110e, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (GuildSubscriptionsActionCreatorsModule).unsubscribeMembers(a1, a0);
}
}
}
}
}
function value_54918() { // fn#54918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1581, offset: 0x01370f63, size: 65 bytes, params: 1, frame: 15
const props = this.props;
return ((Component) => <Component ref={props.forwardedRef} {...env3_4(props, env3_3)} />)(env1_0);
}
function _fun54924(a0, a1) { // fn#54924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:2151, offset: 0x0137110e, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return (require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).unsubscribeMembers(a1, a0);
}
function _fun54912(a0, a1) { // fn#54912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:951, offset: 0x01370dea, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).subscribeMembers(a1, a0);
}
function _fun54914(a0, a1) { // fn#54914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7080:1284, offset: 0x01370ef2, size: 45 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (require(6903) /* metro dependency 6903: GuildSubscriptionsActionCreators */).unsubscribeMembers(a1, a0);
}
global.__d(_fun54904, 6902, [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216,
2]) /* metro module 6902, dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 22, 6903, 628, 1216, 2] */;
+4 -1
View File
@@ -1,8 +1,10 @@
/* Metro module 12419; source: lib/hook/Hook.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun94716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12605:6, offset: 0x0212484b, size: 130 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/hook/Hook.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/hook/Hook.native.tsx');
exports.isHookModuleTooOld = function() {
return true;
};
@@ -20,3 +22,4 @@ function _fun94716(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun94716, 12419, [2]) /* metro module 12419, dependencies: [2] */;
+4 -1
View File
@@ -1,4 +1,6 @@
/* Metro module 4260; source: lib/injectMediaEngine.native.tsx; dependencies: [4261, 4262, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun35842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4432:6, offset: 0x0107e0db, size: 122 bytes, params: 8, frame: 16
const env0_0 = require;
(require(4261) /* metro dependency 4261: inject */).inject({supported: function() {
@@ -10,6 +12,7 @@ function _fun35842(global, require, importDefault, importAll, module, exports, d
return require(dependencyMap[1]).default;
}, getOpenH264LibraryPath: function() {
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/injectMediaEngine.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/injectMediaEngine.native.tsx');
}
global.__d(_fun35842, 4260, [4261, 4262, 2]) /* metro module 4260, dependencies: [4261, 4262, 2] */;
+225 -222
View File
@@ -1,4 +1,7 @@
/* Metro module 3846; source: lib/intlFormatDate.tsx; dependencies: [1949, 3843, 1244, 2] */
import LocaleStore from '../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun31714(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:6, offset: 0x01001c69, size: 121 bytes, params: 8, frame: 18
const env0_0 = require;
const makeIntlFormatter = function(a0, a1) {
@@ -17,228 +20,228 @@ function _fun31714(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/intlFormatDate.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/intlFormatDate.tsx');
exports.makeFormatter = makeFormatter_31716;
function makeFormatter_31716(a0) { // fn#31716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:310, offset: 0x01001d2b, size: 49 bytes, params: 2, frame: 15
const locale = LocaleStore.locale;
return tryMakeNativeFormatter(locale, a0) ?? makeIntlFormatter(locale, a0);
function tryMakeNativeFormatter(a0, a1) { // fn#31717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:353, owner: makeFormatter_31716.tryMakeNativeFormatter, offset: 0x01001d5c, size: 268 bytes, params: 3, frame: 25
var r9;
var r8;
var value4;
var split;
var value5;
var property;
var property2;
var moduleValue;
var systemLocale;
var value6;
var property3;
var moduleValue2;
var value7;
var property4;
var moduleValue3;
var moduleValue4;
var initialLocale;
var value9;
var error;
let value = a0;
const env0_1 = a1;
const value2 = undefined;
let makeFormatter = require(dependencyMap[1]).makeFormatter;
if (makeFormatter == null) {
return null;
}
try {
value4 = value != null;
} catch (error) {
return null;
}
if (value4) {
try {
split = value.split;
} catch (error) {
return null;
}
try {
value5 = Reflect.apply(split, value, ['-']);
} catch (error) {
return null;
}
try {
property = value5[0];
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
property2 = dependencyMap[2];
} catch (error) {
return null;
}
try {
moduleValue = require(property2);
} catch (error) {
return null;
}
try {
systemLocale = moduleValue.systemLocale;
} catch (error) {
return null;
}
try {
value6 = systemLocale == null;
} catch (error) {
return null;
}
if (value6) {
r9 = value2;
} else {
try {
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
property3 = dependencyMap[2];
} catch (error) {
return null;
}
try {
moduleValue2 = require(property3);
} catch (error) {
return null;
}
try {
systemLocale = moduleValue2.systemLocale;
} catch (error) {
return null;
}
try {
split = systemLocale.split;
} catch (error) {
return null;
}
try {
value7 = Reflect.apply(split, systemLocale, ['-']);
} catch (error) {
return null;
}
try {
property4 = value7[0];
} catch (error) {
return null;
}
r9 = property4;
}
r8 = property === r9;
} else {
r8 = value4;
}
try {
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
property = dependencyMap[1];
} catch (error) {
return null;
}
try {
moduleValue3 = require(property);
} catch (error) {
return null;
}
try {
makeFormatter = moduleValue3.makeFormatter;
} catch (error) {
return null;
}
try {
property = dependencyMap[2];
} catch (error) {
return null;
}
try {
moduleValue4 = require(property);
} catch (error) {
return null;
}
try {
initialLocale = moduleValue4.initialLocale;
} catch (error) {
return null;
}
try {
value9 = value !== initialLocale;
} catch (error) {
return null;
}
try {
value = Reflect.apply(makeFormatter, moduleValue3, [value9 ? value : r8 ? value2 : value, a1]);
} catch (error) {
return null;
}
try {
var env0_2 = value;
} catch (error) {
return null;
}
try {
value = value == null;
} catch (error) {
return null;
}
if (value) {
return null;
}
try {
var env0_3 = null;
} catch (error) {
return null;
}
return _fun31718;
function _fun31718(a0) { // fn#31718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:652, offset: 0x01001e68, size: 80 bytes, params: 2, frame: 15
var value;
var binding;
var value2;
var error;
var value3;
var makeIntlFormatterBinding;
try {
value = environment;
binding = env0_2;
value2 = binding(a0);
} catch (error) {
if (intlFormatterBinding == null) {
value3 = environment.__proto__.__proto__;
makeIntlFormatterBinding = makeIntlFormatter;
binding = env0_0;
intlFormatterBinding = makeIntlFormatterBinding(binding, require);
}
return intlFormatterBinding(a0);
}
return value2;
}
}
}
}
function makeFormatter_31716(a0) { // fn#31716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:310, offset: 0x01001d2b, size: 49 bytes, params: 2, frame: 15
const locale = LocaleStore.locale;
return tryMakeNativeFormatter(locale, a0) ?? makeIntlFormatter(locale, a0);
}
function tryMakeNativeFormatter(a0, a1) { // fn#31717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:353, owner: makeFormatter_31716.tryMakeNativeFormatter, offset: 0x01001d5c, size: 268 bytes, params: 3, frame: 25
var r9;
var r8;
var value4;
var split;
var value5;
var property;
var property2;
var moduleValue;
var systemLocale;
var value6;
var property3;
var moduleValue2;
var value7;
var property4;
var moduleValue3;
var moduleValue4;
var initialLocale;
var value9;
var error;
let value = a0;
const env0_1 = a1;
const value2 = undefined;
let makeFormatter = require(dependencyMap[1]).makeFormatter;
if (makeFormatter == null) {
return null;
}
try {
value4 = value != null;
} catch (error) {
return null;
}
if (value4) {
try {
split = value.split;
} catch (error) {
return null;
}
try {
value5 = Reflect.apply(split, value, ['-']);
} catch (error) {
return null;
}
try {
property = value5[0];
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
property2 = dependencyMap[2];
} catch (error) {
return null;
}
try {
moduleValue = require(property2);
} catch (error) {
return null;
}
try {
systemLocale = moduleValue.systemLocale;
} catch (error) {
return null;
}
try {
value6 = systemLocale == null;
} catch (error) {
return null;
}
if (value6) {
r9 = value2;
} else {
try {
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
property3 = dependencyMap[2];
} catch (error) {
return null;
}
try {
moduleValue2 = require(property3);
} catch (error) {
return null;
}
try {
systemLocale = moduleValue2.systemLocale;
} catch (error) {
return null;
}
try {
split = systemLocale.split;
} catch (error) {
return null;
}
try {
value7 = Reflect.apply(split, systemLocale, ['-']);
} catch (error) {
return null;
}
try {
property4 = value7[0];
} catch (error) {
return null;
}
r9 = property4;
}
r8 = property === r9;
} else {
r8 = value4;
}
try {
} catch (error) {
return null;
}
try {
} catch (error) {
return null;
}
try {
property = dependencyMap[1];
} catch (error) {
return null;
}
try {
moduleValue3 = require(property);
} catch (error) {
return null;
}
try {
makeFormatter = moduleValue3.makeFormatter;
} catch (error) {
return null;
}
try {
property = dependencyMap[2];
} catch (error) {
return null;
}
try {
moduleValue4 = require(property);
} catch (error) {
return null;
}
try {
initialLocale = moduleValue4.initialLocale;
} catch (error) {
return null;
}
try {
value9 = value !== initialLocale;
} catch (error) {
return null;
}
try {
value = Reflect.apply(makeFormatter, moduleValue3, [value9 ? value : r8 ? value2 : value, a1]);
} catch (error) {
return null;
}
try {
var env0_2 = value;
} catch (error) {
return null;
}
try {
value = value == null;
} catch (error) {
return null;
}
if (value) {
return null;
}
try {
var env0_3 = null;
} catch (error) {
return null;
}
return _fun31718;
}
function _fun31718(a0) { // fn#31718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3985:652, offset: 0x01001e68, size: 80 bytes, params: 2, frame: 15
var value;
var binding;
var value2;
var error;
var value3;
var makeIntlFormatterBinding;
try {
value = environment;
binding = env0_2;
value2 = binding(a0);
} catch (error) {
if (env0_3 == null) {
value3 = environment.__proto__.__proto__;
makeIntlFormatterBinding = makeIntlFormatter;
binding = env0_0;
env0_3 = makeIntlFormatterBinding(binding, require);
}
return env0_3(a0);
}
return value2;
}
global.__d(_fun31714, 3846, [1949, 3843, 1244, 2]) /* metro module 3846, dependencies: [1949, 3843, 1244, 2] */;
File diff suppressed because it is too large. Load diff
+160 -147
View File
@@ -1,171 +1,184 @@
/* Metro module 10560; source: lib/native/BundleUpdater.tsx; dependencies: [5, 6, 7, 27, 661, 3, 477, 90, 1962, 4242, 683, 4826, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
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 AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
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 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun81412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:6, offset: 0x01ececf1, size: 297 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const NativeModules = value.NativeModules;
const NativeEventEmitter = value.NativeEventEmitter;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('BundleUpdater');
const BundleUpdaterManager = NativeModules.BundleUpdaterManager;
let nativeEventEmitter = new NativeEventEmitter(BundleUpdaterManager);
const env0_10 = {'downloaded': 'BundleDownloaded', 'otaUpdateChecked': 'OtaUpdateChecked'};
nativeEventEmitter = _fun81413();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/native/BundleUpdater.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/native/BundleUpdater.tsx');
exports.default = nativeEventEmitter;
}
function _fun81413() { // fn#81413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:342, offset: 0x01ecee1a, size: 384 bytes, params: 1, frame: 18
const BundleUpdater2 = BundleUpdater;
const items2 = [{key: 'getInitialBundleDownloaded', value: function() {
return BundleUpdaterManager.getInitialBundleDownloaded();
}}];
items2[1] = {key: 'getInitialOtaUpdateChecked', value: function() {
return BundleUpdaterManager.getInitialOtaUpdateChecked();
}};
items2[2] = {key: 'addEventListener', value: value_81417};
items2[3] = {key: 'checkForUpdateAndReload', value: function() {
BundleUpdaterManager.checkForUpdateAndReload();
}};
items2[4] = {key: 'verifyOtaFiles', value: function() {
return BundleUpdaterManager.verifyOtaFiles();
}};
items2[5] = {key: 'getBuildOverrideCookieContents', value: function() {
return BundleUpdaterManager.getBuildOverrideCookieContents();
}};
items2[6] = {key: 'setBuildOverrideCookieHeader', value: function(a0) {
return BundleUpdaterManager.setBuildOverrideCookieHeader(a0);
}};
items2[7] = {key: 'getOtaRootPath', value: function() {
return BundleUpdaterManager.getOtaRootPath();
}};
items2[8] = {key: 'getOtaStatus', value: function() {
return BundleUpdaterManager.getOtaStatus();
}};
items2[9] = {key: 'getManifestInfo', value: function() {
return BundleUpdaterManager.getManifestInfo();
}};
let env0_0 = Module00005(_fun81426);
items2[10] = {key: 'setupOTAAssetFallback', value: value_81428};
items2[11] = {key: 'emitOtaMetric', value: value_81429};
items2[12] = {key: 'prepareOtaMetricForDatadog', value: function(a0) {
var value = a1;
var env0_0 = a0;
return {name: a0.type, tags: (value !== undefined ? value : []).map(_fun81433)};
}};
return CreateClass(BundleUpdater2, null, items2);
function BundleUpdater() { // fn#81414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:353, offset: 0x01ecef9a, size: 27 bytes, params: 1, frame: 13
env1_4(this, BundleUpdater);
}
function _fun81413() { // fn#81413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:342, offset: 0x01ecee1a, size: 384 bytes, params: 1, frame: 18
const closure = BundleUpdater;
const binding = env0_5;
const items2 = [{key: 'getInitialBundleDownloaded', value: function() {
return BundleUpdaterManager.getInitialBundleDownloaded();
}}];
items2[1] = {key: 'getInitialOtaUpdateChecked', value: function() {
return BundleUpdaterManager.getInitialOtaUpdateChecked();
}};
items2[2] = {key: 'addEventListener', value: value_81417};
items2[3] = {key: 'checkForUpdateAndReload', value: function() {
BundleUpdaterManager.checkForUpdateAndReload();
}};
items2[4] = {key: 'verifyOtaFiles', value: function() {
return BundleUpdaterManager.verifyOtaFiles();
}};
items2[5] = {key: 'getBuildOverrideCookieContents', value: function() {
return BundleUpdaterManager.getBuildOverrideCookieContents();
}};
items2[6] = {key: 'setBuildOverrideCookieHeader', value: function(a0) {
return BundleUpdaterManager.setBuildOverrideCookieHeader(a0);
}};
items2[7] = {key: 'getOtaRootPath', value: function() {
return BundleUpdaterManager.getOtaRootPath();
}};
items2[8] = {key: 'getOtaStatus', value: function() {
return BundleUpdaterManager.getOtaStatus();
}};
items2[9] = {key: 'getManifestInfo', value: function() {
return BundleUpdaterManager.getManifestInfo();
}};
let env0_0 = env0_3(_fun81426);
items2[10] = {key: 'setupOTAAssetFallback', value: value_81428};
items2[11] = {key: 'emitOtaMetric', value: value_81429};
items2[12] = {key: 'prepareOtaMetricForDatadog', value: function(a0) {
var value = a1;
var env0_0 = a0;
return {name: a0.type, tags: (value !== undefined ? value : []).map(_fun81433)};
}};
return binding(closure, null, items2);
}
function value_81417(a0, a1) { // fn#81417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:641, offset: 0x01ecefdb, size: 37 bytes, params: 3, frame: 13
env1_9.addListener(env1_10[a0], a1);
}
function BundleUpdater() { // fn#81414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:353, offset: 0x01ecef9a, size: 27 bytes, params: 1, frame: 13
env1_4(this, BundleUpdater);
}
function value_81417(a0, a1) { // fn#81417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:641, offset: 0x01ecefdb, size: 37 bytes, params: 3, frame: 13
env1_9.addListener(env1_10[a0], a1);
}
function* _fun81426() { // fn#81426, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1268, offset: 0x01ecf096, size: 142 bytes, params: 1, frame: 15
var environment;
var binding2;
var property;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var value3 = binding(env2_2[6]);
if (value3.isIOS()) {
binding = env2_0;
binding2 = env2_2;
value = binding(binding2[8]);
property = binding2[7];
yield value(property, binding2.paths);
value = undefined;
if (false) {
return value;
function* _fun81426() { // fn#81426, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1268, offset: 0x01ecf096, size: 142 bytes, params: 1, frame: 15
var environment;
var binding2;
var property;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var value3 = binding(env2_2[6]);
if (value3.isIOS()) {
binding = env2_0;
binding2 = env2_2;
value = binding(binding2[8]);
property = binding2[7];
yield value(property, binding2.paths);
value = undefined;
if (false) {
return value;
}
property = value.default;
(property ?? value).addCustomSourceTransformer(_fun81427);
}
}
property = value.default;
(property ?? value).addCustomSourceTransformer(_fun81427);
function _fun81427(a0) { // fn#81427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1394, offset: 0x01ecf124, size: 92 bytes, params: 2, frame: 13
var r0;
var value;
var value2;
var binding;
var resolvedOTAAssetURI;
var uri;
var value3;
var object;
if (a0.isLoadedFromFileSystem()) {
value = a0.scaledAssetURLNearBundle();
value2 = environment.__proto__.__proto__.__proto__;
binding = env3_8;
resolvedOTAAssetURI = binding.resolvedOTAAssetURI;
uri = value.uri;
value3 = Reflect.apply(resolvedOTAAssetURI, binding, [uri]);
uri = value.uri;
if (value3 === uri) {
r0 = null;
} else {
object = {};
copyDataProperties(object, value, value3);
object['uri'] = value3;
r0 = object;
}
return r0;
}
return null;
}
}
}
}
function value_81429(a0) { // fn#81429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1643, offset: 0x01ecf180, size: 115 bytes, params: 2, frame: 15
var environment;
let value = environment.__proto__;
value = require(4242) /* metro dependency 4242 */;
value = value.match(a0);
value = value.with({type: 'OtaCheckAttempt'}, _fun81430);
value = value.with({type: 'OtaAssetDownloadAttempt'}, _fun81431);
value.exhaustive();
}
function value_81432(a0) { // fn#81432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:2375, offset: 0x01ecf357, size: 57 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const r3 = value !== undefined ? value : [];
const object2 = {};
object2.name = a0.type;
object2.tags = r3.map(_fun81433);
return object2;
}
function _fun81427(a0) { // fn#81427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1394, offset: 0x01ecf124, size: 92 bytes, params: 2, frame: 13
var r0;
var value;
var value2;
var binding;
var resolvedOTAAssetURI;
var uri;
var value3;
var object2;
if (a0.isLoadedFromFileSystem()) {
value = a0.scaledAssetURLNearBundle();
value2 = environment.__proto__.__proto__.__proto__;
binding = env3_8;
resolvedOTAAssetURI = binding.resolvedOTAAssetURI;
uri = value.uri;
value3 = Reflect.apply(resolvedOTAAssetURI, binding, [uri]);
uri = value.uri;
if (value3 === uri) {
r0 = null;
} else {
object2 = {};
copyDataProperties(object2, value, value3);
object2['uri'] = value3;
r0 = object2;
function value_81428() { // fn#81428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1549, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
return r0;
function value_81429(a0) { // fn#81429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1643, offset: 0x01ecf180, size: 115 bytes, params: 2, frame: 15
var environment;
let value = environment.__proto__;
value = require(4242) /* metro dependency 4242 */;
value = value.match(a0);
value = value.with({type: 'OtaCheckAttempt'}, _fun81430);
value = value.with({type: 'OtaAssetDownloadAttempt'}, _fun81431);
value.exhaustive();
function _fun81430(a0) { // fn#81430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1703, offset: 0x01ecf1f3, size: 167 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
env2_7.verbose('OTA check attempt', a0);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const MOBILE_OTA_CHECK_ATTEMPT = AnalyticEvents.MOBILE_OTA_CHECK_ATTEMPT;
Reflect.apply(track, defaultImport, [MOBILE_OTA_CHECK_ATTEMPT, {result: a0.result,
duration_seconds: a0.durationSeconds, bytes_received: a0.bytesReceived, error: a0.error}]);
value = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
return value.increment(BundleUpdater.prepareOtaMetricForDatadog(a0, ['result']));
}
function _fun81431(a0) { // fn#81431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1998, offset: 0x01ecf29a, size: 189 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
env2_7.verbose('OTA asset download attempt', a0);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT = AnalyticEvents.MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT;
Reflect.apply(track, defaultImport, [MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT, {result: a0.result,
duration_seconds: a0.durationSeconds, error: a0.error, url: a0.url, status_code: a0.statusCode,
bytes_received: a0.bytesReceived}]);
value = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
return value.increment(BundleUpdater.prepareOtaMetricForDatadog(a0, ['result', 'statusCode']));
}
}
function value_81432(a0) { // fn#81432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:2375, offset: 0x01ecf357, size: 57 bytes, params: 2, frame: 12
const value = a1;
const env0_0 = a0;
const r3 = value !== undefined ? value : [];
const object = {};
object.name = a0.type;
object.tags = r3.map(_fun81433);
return object;
function _fun81433(a0) { // fn#81433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:2423, offset: 0x0102abe3, size: 44 bytes, params: 2, frame: 15
return '' + a0 + ':' + env0_0[a0];
}
}
}
return null;
}
function _fun81430(a0) { // fn#81430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1703, offset: 0x01ecf1f3, size: 167 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
env2_7.verbose('OTA check attempt', a0);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const MOBILE_OTA_CHECK_ATTEMPT = AnalyticEvents.MOBILE_OTA_CHECK_ATTEMPT;
Reflect.apply(track, defaultImport, [MOBILE_OTA_CHECK_ATTEMPT, {result: a0.result,
duration_seconds: a0.durationSeconds, bytes_received: a0.bytesReceived, error: a0.error}]);
value = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
return value.increment(BundleUpdater.prepareOtaMetricForDatadog(a0, ['result']));
}
function _fun81431(a0) { // fn#81431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10746:1998, offset: 0x01ecf29a, size: 189 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
env2_7.verbose('OTA asset download attempt', a0);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT = AnalyticEvents.MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT;
Reflect.apply(track, defaultImport, [MOBILE_OTA_ASSET_DOWNLOAD_ATTEMPT, {result: a0.result,
duration_seconds: a0.durationSeconds, error: a0.error, url: a0.url, status_code: a0.statusCode,
bytes_received: a0.bytesReceived}]);
value = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
return value.increment(BundleUpdater.prepareOtaMetricForDatadog(a0, ['result', 'statusCode']));
}
global.__d(_fun81412, 10560, [5, 6, 7, 27, 661, 3, 477, 90, 1962, 4242, 683, 4826,
2]) /* metro module 10560, dependencies: [5, 6, 7, 27, 661, 3, 477, 90, 1962, 4242, 683, 4826, 2] */;
File diff suppressed because it is too large. Load diff
+16 -14
View File
@@ -1,25 +1,27 @@
/* Metro module 3853; source: lib/native/Linking.tsx; dependencies: [27, 3848, 2] */
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 _fun31782(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:6, offset: 0x010034d2, size: 142 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).Linking;
object2 = {openURL: openURL_31783, openURLExternally: function(a0, a1) {
object = {openURL: openURL_31783, openURLExternally: function(a0, a1) {
require(dependencyMap[1]).default(a0, a1, {forceExternalBrowser: true});
}, performURLNavigation: performURLNavigation};
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/native/Linking.tsx');
exports.default = object2;
}
(FileImportTrackerModule).fileFinishedImporting('lib/native/Linking.tsx');
exports.default = object;
function openURL_31783(a0, a1) { // fn#31783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:117, offset: 0x01003560, size: 61 bytes, params: 3, frame: 15
const value = a2;
(require(3848) /* metro dependency 3848: handleURL */).default(a0, a1,
{allowExternal: !(value !== undefined) || value});
}
function openURL_31783(a0, a1) { // fn#31783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:117, offset: 0x01003560, size: 61 bytes, params: 3, frame: 15
const value = a2;
(require(3848) /* metro dependency 3848: handleURL */).default(a0, a1,
{allowExternal: !(value !== undefined) || value});
}
function performURLNavigation(a0) { // fn#31785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:254, offset: 0x010035d3, size: 43 bytes, params: 2, frame: 11
Linking.openURL(a0).catch(function() {
});
}
function performURLNavigation(a0) { // fn#31785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3992:254, offset: 0x010035d3, size: 43 bytes, params: 2, frame: 11
Linking.openURL(a0).catch(function() {
});
}
global.__d(_fun31782, 3853, [27, 3848, 2]) /* metro module 3853, dependencies: [27, 3848, 2] */;
+23 -19
View File
@@ -1,31 +1,35 @@
/* Metro module 3847; source: lib/openURL.tsx; dependencies: [5, 3848, 8878, 1962, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun31719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:6, offset: 0x01001eb8, size: 121 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/openURL.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/openURL.tsx');
exports.default = function() {
return _openURL.apply(this, arguments);
};
}
function _openURL() { // fn#31720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:106, offset: 0x01001f31, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun31722).apply(this, arguments);
}
function* _fun31722(a0, a1) { // fn#31722, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:145, offset: 0x01001f6a, size: 124 bytes, params: 3, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_1;
(0, binding(binding2[1]).default)(a0);
yield binding(binding2[3])(binding2[2], binding2.paths);
value = undefined;
if (false) {
return value;
function _openURL() { // fn#31720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:106, offset: 0x01001f31, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun31722).apply(this, arguments);
function* _fun31722(a0, a1) { // fn#31722, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3986:145, offset: 0x01001f6a, size: 124 bytes, params: 3, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_1;
(0, binding(binding2[1]).default)(a0);
yield binding(binding2[3])(binding2[2], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.default(a0, {skipExtensionCheck: a1, analyticsLocations: []});
}
}
value.default(a0, {skipExtensionCheck: a1, analyticsLocations: []});
}
}
global.__d(_fun31719, 3847, [5, 3848, 8878, 1962,
2]) /* metro module 3847, dependencies: [5, 3848, 8878, 1962, 2] */;
+326 -276
View File
@@ -1,6 +1,10 @@
/* Metro module 10741; source: lib/pushnotification/PushNotification.tsx; dependencies: [27, 477, 10742, 10743, 10744, 2] */
import Module10742 from '../../by-id/module-10742.js'; /* Metro dependency 10742 */
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 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun82510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:6, offset: 0x01ef9c1b, size: 497 bytes, params: 8, frame: 19
var object2;
var nativeEventEmitter;
let env0_0 = require;
const createNotification = function(a0) {
@@ -12,12 +16,12 @@ function _fun82510(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const {NativeModules, NativeEventEmitter} = require(27) /* metro dependency 27 */;
const {NativeModules, NativeEventEmitter} = ReactNativeModule;
const PushNotificationAndroid = NativeModules.PushNotificationAndroid;
if (PushNotificationAndroid != null) {
nativeEventEmitter = new NativeEventEmitter(NativeModules.PushNotificationAndroid);
}
object2 = {getInitialNotification: getInitialNotification, setCurrentUser: function(a0, a1) {
object = {getInitialNotification: getInitialNotification, setCurrentUser: function(a0, a1) {
if (require(dependencyMap[1]).isAndroid()) {
PushNotificationAndroid.setCurrentUser(a0, a1);
}
@@ -72,300 +76,346 @@ function _fun82510(global, require, importDefault, importAll, module, exports, d
var value2 = new Promise(_fun82559);
return value2 instanceof Object ? value2 : value;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/pushnotification/PushNotification.tsx');
exports.default = object2;
}
function createNotification(a0) { // fn#82511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:223, offset: 0x01ef9e0c, size: 121 bytes, params: 2, frame: 4
const env0_0 = a0;
let value = null;
return value == a0 ? value : {getData: getData_82512, getMessage: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getSound: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getCategory: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getAlert: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getContentAvailable: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getBadgeCount: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, finish: function(a0) {
var Error = global.Error;
var value = 'Not implemented on Android: ' + a0;
value = new Error(value);
throw value;
}};
}
function getInitialNotification() { // fn#82520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:810, offset: 0x01ef9f28, size: 109 bytes, params: 1, frame: 12
var r0;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
r0 = new global.Promise(_fun82521);
} else {
value = importDefault(10742) /* metro dependency 10742 */;
value = value.getInitialNotification();
r0 = value;
}
return r0;
}
function setMultiAccountUsers(a0) { // fn#82524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1016, offset: 0x01efa021, size: 152 bytes, params: 2, frame: 15
var NSUserDefaultsBridge;
const JSON = global.JSON;
const value = JSON.stringify(a0);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (!(PushNotificationAndroid == null || PushNotificationAndroid.setMultiAccountUsernames == null)) {
PushNotificationAndroid.setMultiAccountUsernames(value);
(FileImportTrackerModule).fileFinishedImporting('lib/pushnotification/PushNotification.tsx');
exports.default = object;
function createNotification(a0) { // fn#82511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:223, offset: 0x01ef9e0c, size: 121 bytes, params: 2, frame: 4
const env0_0 = a0;
let value = null;
return value == a0 ? value : {getData: getData, getMessage: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getSound: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getCategory: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getAlert: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getContentAvailable: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, getBadgeCount: function() {
var Error = global.Error;
throw new Error('TODO: Implement on Android');
}, finish: function(a0) {
var Error = global.Error;
var value = 'Not implemented on Android: ' + a0;
value = new Error(value);
throw value;
}};
function getData() { // fn#82512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:283, owner: createNotification.getData, offset: 0x01ef9e85, size: 72 bytes, params: 1, frame: 14
const object = {};
const binding = env0_0;
copyDataProperties(object, binding, undefined);
const message = binding.message;
const value2 = null;
object['message'] = value2 != message ? global.JSON.parse(env0_0.message) : value2;
return object;
}
} else {
NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
if (!(NSUserDefaultsBridge == null || NSUserDefaultsBridge.setMultiAccountUsersJSONString == null)) {
NSUserDefaultsBridge.setMultiAccountUsersJSONString(value);
}
function getInitialNotification() { // fn#82520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:810, offset: 0x01ef9f28, size: 109 bytes, params: 1, frame: 12
var r0;
var value;
if (PlatformUtilsModule.isAndroid()) {
r0 = new global.Promise(_fun82521);
} else {
value = importDefault(10742) /* metro dependency 10742 */;
value = value.getInitialNotification();
r0 = value;
}
return r0;
function _fun82521(a0) { // fn#82521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:847, offset: 0x01ef9f95, size: 47 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
const value = environment.__proto__;
PushNotificationAndroid.getInitialNotification().then(_fun82522);
function _fun82522(a0) { // fn#82522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:884, offset: 0x01ef9fc4, size: 31 bytes, params: 2, frame: 12
env0_0(createNotification(a0));
}
}
}
function setMultiAccountUsers(a0) { // fn#82524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1016, offset: 0x01efa021, size: 152 bytes, params: 2, frame: 15
var NSUserDefaultsBridge;
const JSON = global.JSON;
const value = JSON.stringify(a0);
if (PlatformUtilsModule.isAndroid()) {
if (!(PushNotificationAndroid == null || PushNotificationAndroid.setMultiAccountUsernames == null)) {
PushNotificationAndroid.setMultiAccountUsernames(value);
}
} else {
NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
if (!(NSUserDefaultsBridge == null || NSUserDefaultsBridge.setMultiAccountUsersJSONString == null)) {
NSUserDefaultsBridge.setMultiAccountUsersJSONString(value);
}
}
}
}
function setApplicationIconBadgeNumber(a0) { // fn#82526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1348, offset: 0x01efa104, size: 74 bytes, params: 2, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).setApplicationIconBadgeNumber(a0);
}
}
function clearAllNotifications() { // fn#82527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1444, offset: 0x01efa14e, size: 89 bytes, params: 1, frame: 13
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
PushNotificationAndroid.clearAllNotifications();
} else {
(importDefault(10742) /* metro dependency 10742 */).setApplicationIconBadgeNumber(0);
}
}
function presentLocalNotification(a0) { // fn#82528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1556, offset: 0x01efa1a7, size: 91 bytes, params: 2, frame: 14
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
PushNotificationAndroid.presentLocalNotification(a0);
} else {
(importDefault(10742) /* metro dependency 10742 */).presentLocalNotification(a0);
}
}
function getDeliveredNotifications() { // fn#82529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1697, offset: 0x01efa202, size: 93 bytes, params: 1, frame: 12
let value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
const Promise = global.Promise;
return value ? Promise.resolve([]) : new Promise(_fun82530);
}
function removeDeliveredNotifications(a0) { // fn#82531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1798, offset: 0x01efa288, size: 74 bytes, params: 2, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).removeDeliveredNotifications(a0);
}
}
function scheduleLocalNotification(a0) { // fn#82532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1892, offset: 0x01efa2d2, size: 74 bytes, params: 2, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).scheduleLocalNotification(a0);
}
}
function getScheduledLocalNotifications(a0) { // fn#82533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1980, offset: 0x01efa31c, size: 74 bytes, params: 2, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).getScheduledLocalNotifications(a0);
}
}
function cancelLocalNotifications(a0) { // fn#82534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2078, offset: 0x01efa366, size: 74 bytes, params: 2, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).cancelLocalNotifications(a0);
}
}
function cancelAllLocalNotifications() { // fn#82535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2164, offset: 0x01efa3b0, size: 70 bytes, params: 1, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).cancelAllLocalNotifications();
}
}
function checkPermissions(a0) { // fn#82536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2254, offset: 0x01efa3f6, size: 83 bytes, params: 2, frame: 13
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
a0({});
} else {
(importDefault(10742) /* metro dependency 10742 */).checkPermissions(a0);
}
}
function requestPermissions(a0) { // fn#82537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2348, offset: 0x01efa449, size: 113 bytes, params: 2, frame: 12
var r0;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
r0 = new global.Promise(function(a0) {
return a0({});
});
} else {
value = importDefault(10742) /* metro dependency 10742 */;
value = value.requestPermissions(a0);
r0 = value;
}
return r0;
}
function addNotificationEventListener(a0, a1) { // fn#82540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2463, offset: 0x01efa4e7, size: 165 bytes, params: 3, frame: 17
const env0_0 = a1;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (a0 === 'notification') {
env0_5.addListener('notification', _fun82541);
function setApplicationIconBadgeNumber(a0) { // fn#82526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1348, offset: 0x01efa104, size: 74 bytes, params: 2, frame: 12
if (!PlatformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).setApplicationIconBadgeNumber(a0);
}
if (a0 === 'localNotification') {
env0_5.addListener('localNotification', _fun82542);
}
function clearAllNotifications() { // fn#82527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1444, offset: 0x01efa14e, size: 89 bytes, params: 1, frame: 13
if (PlatformUtilsModule.isAndroid()) {
PushNotificationAndroid.clearAllNotifications();
} else {
(importDefault(10742) /* metro dependency 10742 */).setApplicationIconBadgeNumber(0);
}
PushNotificationAndroid.registerEventListener(a0);
} else {
(importDefault(10742) /* metro dependency 10742 */).addEventListener(a0, a1);
}
}
function addRegisterEventListener(a0) { // fn#82543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2785, offset: 0x01efa5b1, size: 129 bytes, params: 2, frame: 16
const env0_0 = a0;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
env0_5.addListener('register', _fun82544);
PushNotificationAndroid.registerEventListener('register');
} else {
(importDefault(10742) /* metro dependency 10742 */).addEventListener('register', a0);
function presentLocalNotification(a0) { // fn#82528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1556, offset: 0x01efa1a7, size: 91 bytes, params: 2, frame: 14
if (PlatformUtilsModule.isAndroid()) {
PushNotificationAndroid.presentLocalNotification(a0);
} else {
(importDefault(10742) /* metro dependency 10742 */).presentLocalNotification(a0);
}
}
}
function getSoundsEnabled() { // fn#82545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2976, offset: 0x01efa64b, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82546);
return promise instanceof Object ? promise : value;
}
function getDeliveredNotifications() { // fn#82529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1697, offset: 0x01efa202, size: 93 bytes, params: 1, frame: 12
let value = PlatformUtilsModule;
value = value.isAndroid();
const Promise = global.Promise;
return value ? Promise.resolve([]) : new Promise(_fun82530);
function _fun82530(a0) { // fn#82530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1754, offset: 0x01efa25f, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(Module10742).getDeliveredNotifications(a0);
}
function getVibrationsEnabled() { // fn#82548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3084, offset: 0x01efa6cb, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82549);
return promise instanceof Object ? promise : value;
}
function getLightsEnabled() { // fn#82551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3192, offset: 0x01efa74b, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82552);
return promise instanceof Object ? promise : value;
}
function shouldAndroidNotifyEveryTime() { // fn#82558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3583, offset: 0x01efa8b5, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82559);
return promise instanceof Object ? promise : value;
}
function createNotificationGetData() { // fn#82512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:283, owner: createNotification.getData, offset: 0x01ef9e85, size: 72 bytes, params: 1, frame: 14
const object2 = {};
const binding = env0_0;
copyDataProperties(object2, binding, undefined);
const message = binding.message;
const value2 = null;
object2['message'] = value2 != message ? global.JSON.parse(env0_0.message) : value2;
return object2;
}
function _fun82521(a0) { // fn#82521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:847, offset: 0x01ef9f95, size: 47 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
const value = environment.__proto__;
PushNotificationAndroid.getInitialNotification().then(_fun82522);
}
function _fun82530(a0) { // fn#82530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1754, offset: 0x01efa25f, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(10742) /* metro dependency 10742 */).getDeliveredNotifications(a0);
}
function _fun82541(a0) { // fn#82541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2568, offset: 0x01efa58c, size: 37 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = createNotification(a0);
if (value != null) {
require(value);
}
}
function _fun82544({token}) { // fn#82544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2860, offset: 0x01efa632, size: 25 bytes, params: 2, frame: 11
env0_0(token);
}
function _fun82546(a0) { // fn#82546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2993, offset: 0x01efa672, size: 89 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
PushNotificationAndroid.getSoundsEnabled().then(_fun82547);
} else {
a0(false);
function removeDeliveredNotifications(a0) { // fn#82531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1798, offset: 0x01efa288, size: 74 bytes, params: 2, frame: 12
if (!PlatformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).removeDeliveredNotifications(a0);
}
}
}
function _fun82549(a0) { // fn#82549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3101, offset: 0x01efa6f2, size: 89 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
PushNotificationAndroid.getVibrationsEnabled().then(_fun82550);
} else {
a0(false);
function scheduleLocalNotification(a0) { // fn#82532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1892, offset: 0x01efa2d2, size: 74 bytes, params: 2, frame: 12
if (!PlatformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).scheduleLocalNotification(a0);
}
}
}
function _fun82552(a0) { // fn#82552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3209, offset: 0x01efa772, size: 89 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
PushNotificationAndroid.getLightsEnabled().then(_fun82553);
} else {
a0(false);
function getScheduledLocalNotifications(a0) { // fn#82533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:1980, offset: 0x01efa31c, size: 74 bytes, params: 2, frame: 12
if (!PlatformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).getScheduledLocalNotifications(a0);
}
}
}
function _fun82559(a0) { // fn#82559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3600, offset: 0x01efa8dc, size: 91 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
PushNotificationAndroid.shouldNotifyEveryTime().then(_fun82560);
} else {
a0(false);
function cancelLocalNotifications(a0) { // fn#82534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2078, offset: 0x01efa366, size: 74 bytes, params: 2, frame: 12
if (!PlatformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).cancelLocalNotifications(a0);
}
}
function cancelAllLocalNotifications() { // fn#82535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2164, offset: 0x01efa3b0, size: 70 bytes, params: 1, frame: 12
if (!PlatformUtilsModule.isAndroid()) {
(importDefault(10742) /* metro dependency 10742 */).cancelAllLocalNotifications();
}
}
function checkPermissions(a0) { // fn#82536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2254, offset: 0x01efa3f6, size: 83 bytes, params: 2, frame: 13
if (PlatformUtilsModule.isAndroid()) {
a0({});
} else {
(importDefault(10742) /* metro dependency 10742 */).checkPermissions(a0);
}
}
function requestPermissions(a0) { // fn#82537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2348, offset: 0x01efa449, size: 113 bytes, params: 2, frame: 12
var r0;
var value;
if (PlatformUtilsModule.isAndroid()) {
r0 = new global.Promise(function(a0) {
return a0({});
});
} else {
value = importDefault(10742) /* metro dependency 10742 */;
value = value.requestPermissions(a0);
r0 = value;
}
return r0;
}
function addNotificationEventListener(a0, a1) { // fn#82540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2463, offset: 0x01efa4e7, size: 165 bytes, params: 3, frame: 17
const env0_0 = a1;
if (PlatformUtilsModule.isAndroid()) {
if (a0 === 'notification') {
env0_5.addListener('notification', _fun82541);
}
if (a0 === 'localNotification') {
env0_5.addListener('localNotification', _fun82542);
}
PushNotificationAndroid.registerEventListener(a0);
} else {
(importDefault(10742) /* metro dependency 10742 */).addEventListener(a0, a1);
}
function _fun82541(a0) { // fn#82541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2568, offset: 0x01efa58c, size: 37 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = createNotification(a0);
if (value != null) {
require(value);
}
}
function _fun82542(a0) { // fn#82542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2677, offset: 0x01efa58c, size: 37 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = createNotification(a0);
if (value != null) {
require(value);
}
}
}
function addRegisterEventListener(a0) { // fn#82543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2785, offset: 0x01efa5b1, size: 129 bytes, params: 2, frame: 16
const env0_0 = a0;
if (PlatformUtilsModule.isAndroid()) {
env0_5.addListener('register', _fun82544);
PushNotificationAndroid.registerEventListener('register');
} else {
(importDefault(10742) /* metro dependency 10742 */).addEventListener('register', a0);
}
function _fun82544({token}) { // fn#82544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2860, offset: 0x01efa632, size: 25 bytes, params: 2, frame: 11
env0_0(token);
}
}
function getSoundsEnabled() { // fn#82545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2976, offset: 0x01efa64b, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82546);
return promise instanceof Object ? promise : value;
function _fun82546(a0) { // fn#82546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:2993, offset: 0x01efa672, size: 89 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
PushNotificationAndroid.getSoundsEnabled().then(_fun82547);
} else {
a0(false);
}
function _fun82547(a0) { // fn#82547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3044, offset: 0x00c3fb7a, size: 19 bytes, params: 2, frame: 11
return env0_0(a0);
}
}
}
function getVibrationsEnabled() { // fn#82548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3084, offset: 0x01efa6cb, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82549);
return promise instanceof Object ? promise : value;
function _fun82549(a0) { // fn#82549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3101, offset: 0x01efa6f2, size: 89 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
PushNotificationAndroid.getVibrationsEnabled().then(_fun82550);
} else {
a0(false);
}
function _fun82550(a0) { // fn#82550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3156, offset: 0x00c3fb7a, size: 19 bytes, params: 2, frame: 11
return env0_0(a0);
}
}
}
function getLightsEnabled() { // fn#82551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3192, offset: 0x01efa74b, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82552);
return promise instanceof Object ? promise : value;
function _fun82552(a0) { // fn#82552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3209, offset: 0x01efa772, size: 89 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
PushNotificationAndroid.getLightsEnabled().then(_fun82553);
} else {
a0(false);
}
function _fun82553(a0) { // fn#82553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3260, offset: 0x00c3fb7a, size: 19 bytes, params: 2, frame: 11
return env0_0(a0);
}
}
}
function shouldAndroidNotifyEveryTime() { // fn#82558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3583, offset: 0x01efa8b5, size: 39 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun82559);
return promise instanceof Object ? promise : value;
function _fun82559(a0) { // fn#82559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3600, offset: 0x01efa8dc, size: 91 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
const value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
PushNotificationAndroid.shouldNotifyEveryTime().then(_fun82560);
} else {
a0(false);
}
function _fun82560(a0) { // fn#82560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:3656, offset: 0x00c3fb7a, size: 19 bytes, params: 2, frame: 11
return env0_0(a0);
}
}
}
}
function _fun82522(a0) { // fn#82522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:884, offset: 0x01ef9fc4, size: 31 bytes, params: 2, frame: 12
env0_0(createNotification(a0));
function createNotificationGetMessage() { // fn#82513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:347, owner: createNotification.getMessage, offset: 0x01ef9ecd, size: 36 bytes, params: 1, frame: 11
const Error = global.Error;
throw new Error('TODO: Implement on Android');
}
function getSound() { // fn#82514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:407, owner: createNotification.getSound, offset: 0x01ef9ecd, size: 36 bytes, params: 1, frame: 11
const Error = global.Error;
throw new Error('TODO: Implement on Android');
}
function getCategory() { // fn#82515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:465, owner: createNotification.getCategory, offset: 0x01ef9ecd, size: 36 bytes, params: 1, frame: 11
const Error = global.Error;
throw new Error('TODO: Implement on Android');
}
function getAlert() { // fn#82516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:526, owner: createNotification.getAlert, offset: 0x01ef9ecd, size: 36 bytes, params: 1, frame: 11
const Error = global.Error;
throw new Error('TODO: Implement on Android');
}
function getContentAvailable() { // fn#82517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:584, owner: createNotification.getContentAvailable, offset: 0x01ef9ecd, size: 36 bytes, params: 1, frame: 11
const Error = global.Error;
throw new Error('TODO: Implement on Android');
}
function getBadgeCount() { // fn#82518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:653, owner: createNotification.getBadgeCount, offset: 0x01ef9ecd, size: 36 bytes, params: 1, frame: 11
const Error = global.Error;
throw new Error('TODO: Implement on Android');
}
function createNotificationFinish(a0) { // fn#82519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10927:716, owner: createNotification.finish, offset: 0x01ef9ef1, size: 55 bytes, params: 2, frame: 12
const Error = global.Error;
const value = 'Not implemented on Android: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value2;
}
global.__d(_fun82510, 10741, [27, 477, 10742, 10743, 10744,
2]) /* metro module 10741, dependencies: [27, 477, 10742, 10743, 10744, 2] */;
+57 -54
View File
@@ -1,8 +1,10 @@
/* Metro module 12529; source: lib/rateLimit.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun95464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:6, offset: 0x02146ec3, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/rateLimit.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/rateLimit.tsx');
exports.default = function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
@@ -12,62 +14,63 @@ function _fun95464(global, require, importDefault, importAll, module, exports, d
var env0_5 = closure;
return closure;
};
}
function rateLimit(a0, a1, a2) { // fn#95465, offset: 0x02146f1a, size: 44 bytes, params: 4, frame: 2
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_4 = [];
return wrapper;
}
function wrapper(a0) { // fn#95466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:198, owner: rateLimit.wrapper, offset: 0x02146f46, size: 239 bytes, params: 2, frame: 20
var r9;
var clearTimeout;
var binding;
var items2;
const value = copyRestArgs(0, undefined);
const env0_0 = value;
const Date = global.Date;
const value2 = Date.now();
if (env0_3 != null) {
clearTimeout = global.clearTimeout;
clearTimeout(env0_3);
r9 = clearTimeout;
}
let length = env0_4.length;
if (length > 0) {
if (env0_4[0] <= value2) {
while (true) {
binding = env0_4;
binding.shift();
length = binding.length;
if (!(length > 0)) {
break;
}
if (env0_4[0] <= value2) {
continue;
}
break;
function rateLimit(a0, a1, a2) { // fn#95465, offset: 0x02146f1a, size: 44 bytes, params: 4, frame: 2
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_4 = [];
return rateLimitWrapper;
function rateLimitWrapper(a0) { // fn#95466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:198, owner: rateLimit.wrapper, offset: 0x02146f46, size: 239 bytes, params: 2, frame: 20
var r9;
var clearTimeout;
var binding;
var items2;
const value = copyRestArgs(0, undefined);
const env0_0 = value;
const Date = global.Date;
const value2 = Date.now();
if (env0_3 != null) {
clearTimeout = global.clearTimeout;
clearTimeout(env0_3);
r9 = clearTimeout;
}
let length = env0_4.length;
if (length > 0) {
if (env0_4[0] <= value2) {
while (true) {
binding = env0_4;
binding.shift();
length = binding.length;
if (!(length > 0)) {
break;
}
if (env0_4[0] <= value2) {
continue;
}
break;
}
}
}
if (env0_4.length < env0_0) {
env0_4.push(value2 + require);
items2 = [];
arraySpread(items2, value, 0, r9);
apply(importDefault, items2, undefined, r9);
} else {
env0_3 = global.setTimeout(_fun95467, env0_4[0] - value2);
}
function _fun95467() { // fn#95467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:340, offset: 0x02147035, size: 41 bytes, params: 1, frame: 14
const rateLimitWrapperBinding = rateLimitWrapper;
const binding = env0_0;
const items2 = [];
arraySpread(items2, binding, 0, undefined);
return apply(rateLimitWrapperBinding, items2, undefined, undefined);
}
}
}
if (env0_4.length < env0_0) {
env0_4.push(value2 + require);
items2 = [];
arraySpread(items2, value, 0, r9);
apply(importDefault, items2, undefined, r9);
} else {
env0_3 = global.setTimeout(_fun95467, env0_4[0] - value2);
}
}
function _fun95467() { // fn#95467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12719:340, offset: 0x02147035, size: 41 bytes, params: 1, frame: 14
const wrapperBinding = wrapper;
const binding = env0_0;
const items2 = [];
arraySpread(items2, binding, 0, undefined);
return apply(wrapperBinding, items2, undefined, undefined);
}
global.__d(_fun95464, 12529, [2]) /* metro module 12529, dependencies: [2] */;
+177 -158
View File
@@ -1,4 +1,8 @@
/* Metro module 15102; source: lib/search/EnglishAnalyzer.tsx; dependencies: [22, 15103, 15105, 2] */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SnowballStemmerModule from './snowballStemmer.tsx'; /* Metro dependency 15103 */
function _fun114263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:6, offset: 0x02419f24, size: 264 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_114266 = function(a0, a1) {
@@ -47,209 +51,224 @@ function _fun114263(global, require, importDefault, importAll, module, exports,
const stripPossessive = function(a0) {
return a0.replace(RegExp("('|\\u2019|\\uFF07)(s|S)$", ''), '');
};
const lowercase = function(a0) {
const lowercase_114268 = function(a0) {
return a0.toLowerCase();
};
const isBlank = function(a0) {
return a0.length === 0;
};
const closure = analyze;
const closure2 = shouldHighlight;
const closure3 = highlightAST;
const analyze_1142712 = analyze_114271;
const shouldHighlight2 = shouldHighlight;
const highlightAST2 = highlightAST;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const set = new Set(['a', 'an', 'and', 'are', 'as', 'at', 'be', 'but', 'by', 'for', 'if', 'in', 'into', 'is', 'it',
'no', 'not', 'of', 'on', 'or', 'such', 'that', 'the', 'their', 'then', 'there', 'these', 'they', 'this', 'to',
'was', 'will', 'with']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/search/EnglishAnalyzer.tsx');
exports.analyze = closure;
exports.shouldHighlight = closure2;
exports.highlightAST = closure3;
(FileImportTrackerModule).fileFinishedImporting('lib/search/EnglishAnalyzer.tsx');
exports.analyze = analyze_1142712;
exports.shouldHighlight = shouldHighlight2;
exports.highlightAST = highlightAST2;
exports.createASTHighlighter = createASTHighlighter;
}
function _createForOfIteratorHelperLoose_114264(a0, a1) { // fn#114264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:46, offset: 0x0241a02c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_114264(a0, a1) { // fn#114264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:46, offset: 0x0241a02c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun114265;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_114266(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun114265;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_114266(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_114266(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_114266(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun114265;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun114265() { // fn#114265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:617, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun114265;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function analyze(a0) { // fn#114271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1418, offset: 0x0241a1d2, size: 157 bytes, params: 2, frame: 15
const value2 = (importDefault(22) /* metro dependency 22 */)(a0.split(RegExp('\\W+', '')));
const value3 = value2.map(stripPossessive);
const value4 = value3.reject(isBlank);
const value5 = value4.map(lowercase);
const value6 = value5.reject(isStopWord);
return value6.map((require(15103) /* metro dependency 15103: snowballStemmer */).snowballStem).value();
}
}
function shouldHighlight(a0, a1) { // fn#114272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1575, offset: 0x0241a26f, size: 192 bytes, params: 3, frame: 16
var value4;
var done;
var value5;
var includes;
var value6;
let value = a2;
let r1 = value !== undefined ? value : false;
const isBlankBinding = isBlank;
const value2 = lowercase(stripPossessive(a0));
if (isBlankBinding(value2)) {
return false;
function isStopWord(a0) { // fn#114269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1339, offset: 0x0102724a, size: 22 bytes, params: 2, frame: 11
return env0_3.has(a0);
}
if (isStopWord(value2)) {
return false;
function analyze_114271(a0) { // fn#114271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1418, offset: 0x0241a1d2, size: 157 bytes, params: 2, frame: 15
const value2 = (Module00022)(a0.split(RegExp('\\W+', '')));
const value3 = value2.map(stripPossessive);
const value4 = value3.reject(isBlank);
const value5 = value4.map(lowercase_114268);
const value6 = value5.reject(isStopWord);
return value6.map((SnowballStemmerModule).snowballStem).value();
}
const value3 = (require(15103) /* metro dependency 15103: snowballStemmer */).snowballStem(value2);
if (r1) {
value = _createForOfIteratorHelperLoose_114264(a1.values());
value4 = value();
done = value4.done;
if (done) {
function shouldHighlight(a0, a1) { // fn#114272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1575, offset: 0x0241a26f, size: 192 bytes, params: 3, frame: 16
var value4;
var done;
var value5;
var includes;
var value6;
let value = a2;
let r1 = value !== undefined ? value : false;
const isBlankBinding = isBlank;
const value2 = lowercase_114268(stripPossessive(a0));
if (isBlankBinding(value2)) {
return false;
}
r1 = value4;
loopExit7: while (true) {
value5 = r1.value;
includes = value3.includes;
if (Reflect.apply(includes, value3, [value5])) {
break loopExit7;
}
value6 = value();
done = value6.done;
if (isStopWord(value2)) {
return false;
}
const value3 = (SnowballStemmerModule).snowballStem(value2);
if (r1) {
value = _createForOfIteratorHelperLoose_114264(a1.values());
value4 = value();
done = value4.done;
if (done) {
return false;
}
r1 = value6;
continue;
r1 = value4;
loopExit7: while (true) {
value5 = r1.value;
includes = value3.includes;
if (Reflect.apply(includes, value3, [value5])) {
break loopExit7;
}
value6 = value();
done = value6.done;
if (done) {
return false;
}
r1 = value6;
continue;
}
return true;
}
return true;
return a1.has(value3);
}
return a1.has(value3);
}
function highlightAST(a0, a1, a2) { // fn#114273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1863, offset: 0x0241a32f, size: 336 bytes, params: 4, frame: 17
var items2;
const env0_0 = a1;
const env0_1 = a2;
const Array = global.Array;
if (Array.isArray(a0)) {
a0.forEach(function(a0) {
highlightAST(a0, require, importDefault);
return a0;
});
} else if (a0.type === 'list') {
a0.items.forEach(_fun114275);
} else if (typeof a0.content !== 'string') {
if (a0.content != null) {
function highlightAST(a0, a1, a2) { // fn#114273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1863, offset: 0x0241a32f, size: 336 bytes, params: 4, frame: 17
var items2;
const env0_0 = a1;
const env0_1 = a2;
const Array = global.Array;
if (Array.isArray(a0)) {
a0.forEach(function(a0) {
highlightAST(a0, require, importDefault);
return a0;
});
} else if (a0.type === 'list') {
a0.items.forEach(_fun114275);
} else if (typeof a0.content !== 'string') {
if (a0.content != null) {
highlightAST(a0.content, a1, a2);
}
} else if (a0.type !== 'codeBlock') {
items2 = [];
var env0_3 = '';
a0.content.split(RegExp('(\\W+)', 'g')).forEach(_fun114276);
if (items2.length > 0) {
if (env0_3.length > 0) {
items2.push({type: 'text', content: env0_3});
}
if (a0.type === 'text') {
a0.content = items2;
} else {
items2 = [{type: 'text', content: items2}];
a0.content = items2;
}
}
} else if (a0.content != null) {
highlightAST(a0.content, a1, a2);
}
} else if (a0.type !== 'codeBlock') {
items2 = [];
var env0_3 = '';
a0.content.split(RegExp('(\\W+)', 'g')).forEach(_fun114276);
if (items2.length > 0) {
if (env0_3.length > 0) {
items2.push({type: 'text', content: env0_3});
}
if (a0.type === 'text') {
a0.content = items2;
return a0;
function _fun114275(a0) { // fn#114275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:1989, offset: 0x0241a47f, size: 32 bytes, params: 2, frame: 15
highlightAST(a0, require, importDefault);
return a0;
}
function _fun114276(a0) { // fn#114276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2121, offset: 0x0241a49f, size: 128 bytes, params: 2, frame: 17
const shouldHighlight2 = shouldHighlight(a0, require, importDefault);
let binding = env0_3;
if (shouldHighlight2) {
if (binding.length > 0) {
binding = env0_2;
binding.push({type: 'text', content: env0_3});
}
binding = env0_2;
binding.push({type: 'highlight', content: a0});
} else {
items2 = [{type: 'text', content: items2}];
a0.content = items2;
env0_3 = binding + a0;
}
}
} else if (a0.content != null) {
highlightAST(a0.content, a1, a2);
}
return a0;
}
function createASTHighlighter(a0) { // fn#114277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2597, offset: 0x0241a51f, size: 155 bytes, params: 2, frame: 17
var value3;
const value = a1;
const env0_0 = value !== undefined ? value : false;
const length = a0.length;
const SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH = (require(15105) /* metro dependency 15105: Search */).SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH;
if (length >= SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH) {
value3 = a0.length <= (require(15105) /* metro dependency 15105: Search */).SEARCH_PARTIAL_NAME_MATCH_MAX_QUERY_LENGTH;
}
const Set = global.Set;
const set = new Set(analyze(a0));
return _fun114278;
}
function _fun114276(a0) { // fn#114276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2121, offset: 0x0241a49f, size: 128 bytes, params: 2, frame: 17
const shouldHighlight2 = shouldHighlight(a0, require, importDefault);
let binding = env0_3;
if (shouldHighlight2) {
if (binding.length > 0) {
binding = env0_2;
binding.push({type: 'text', content: env0_3});
function createASTHighlighter(a0) { // fn#114277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2597, offset: 0x0241a51f, size: 155 bytes, params: 2, frame: 17
var value3;
const value = a1;
const env0_0 = value !== undefined ? value : false;
const length = a0.length;
const SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH = (require(15105) /* metro dependency 15105: Search */).SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH;
if (length >= SEARCH_PARTIAL_NAME_MATCH_MIN_QUERY_LENGTH) {
value3 = a0.length <= (require(15105) /* metro dependency 15105: Search */).SEARCH_PARTIAL_NAME_MATCH_MAX_QUERY_LENGTH;
}
binding = env0_2;
binding.push({type: 'highlight', content: a0});
} else {
env0_3 = binding + a0;
const Set = global.Set;
const set = new Set(analyze_114271(a0));
return _fun114278;
function _fun114278(a0) { // fn#114278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2795, offset: 0x0241a5ba, size: 39 bytes, params: 2, frame: 16
highlightAST(a0, env0_2, env0_1 && env0_0);
return a0;
}
}
}
function _fun114278(a0) { // fn#114278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15299:2795, offset: 0x0241a5ba, size: 39 bytes, params: 2, frame: 16
highlightAST(a0, env0_2, env0_1 && env0_0);
return a0;
}
global.__d(_fun114263, 15102, [22, 15103, 15105, 2]) /* metro module 15102, dependencies: [22, 15103, 15105, 2] */;
+10 -6
View File
@@ -1,13 +1,17 @@
/* Metro module 15103; source: lib/search/snowballStemmer.tsx; dependencies: [15104, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module15104Module from '../../by-id/module-15104.js'; /* Metro dependency 15104 */
function _fun114279(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15300:6, offset: 0x0241a5e1, size: 120 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(15104) /* metro dependency 15104 */).newStemmer('english');
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/search/snowballStemmer.tsx');
const env0_0 = (Module15104Module).newStemmer('english');
(FileImportTrackerModule).fileFinishedImporting('lib/search/snowballStemmer.tsx');
exports.snowballStem = snowballStem;
function snowballStem(a0) { // fn#114280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15300:207, offset: 0x0241a659, size: 23 bytes, params: 2, frame: 11
return env0_0.stem(a0);
}
}
function snowballStem(a0) { // fn#114280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15300:207, offset: 0x0241a659, size: 23 bytes, params: 2, frame: 11
return env0_0.stem(a0);
}
global.__d(_fun114279, 15103, [15104, 2]) /* metro module 15103, dependencies: [15104, 2] */;
+112 -109
View File
@@ -1,129 +1,132 @@
/* Metro module 6730; source: lib/spellcheck/LanguageDetector.tsx; dependencies: [6, 7, 6731, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun52864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:6, offset: 0x01338c37, size: 132 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const value = _fun52865();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/LanguageDetector.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/spellcheck/LanguageDetector.tsx');
exports.default = value;
}
function _fun52865() { // fn#52865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:122, offset: 0x01338cbb, size: 135 bytes, params: 1, frame: 15
return env0_3(LanguageDetector, [{key: 'language', get: function() {
return this._language;
}, set: function(a0) {
if (this._language !== a0) {
function _fun52865() { // fn#52865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:122, offset: 0x01338cbb, size: 135 bytes, params: 1, frame: 15
return CreateClass(LanguageDetector, [{key: 'language', get: function() {
return this._language;
}, set: function(a0) {
if (this._language !== a0) {
this._language = a0;
this._onChange(a0);
}
}}, {key: 'languageHint', set: function(a0) {
this._languageHint = a0;
}}, {key: 'process', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (!this._processing) {
this._processing = true;
global.requestIdleCallback(_fun52871);
}
}}, {key: '_processEnd', value: function() {
var r1;
var _minimumTimeRemaining;
var value = a0;
r1 = value !== undefined ? value : false;
this._processing = false;
if (r1) {
_minimumTimeRemaining = this._minimumTimeRemaining;
this._minimumTimeRemaining = typeof _minimumTimeRemaining === 'bigint' ? _minimumTimeRemaining + 1n : +_minimumTimeRemaining + 1;
}
}}]);
function LanguageDetector(a0, a1) { // fn#52866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:143, offset: 0x01338d42, size: 81 bytes, params: 3, frame: 15
env1_2(this, LanguageDetector);
this._shouldProcess = false;
this._processing = false;
this._minimumTimeRemaining = 5;
this._language = a0;
this._onChange(a0);
this._languageHint = a0;
this._onChange = a1;
a1(a0);
}
}}, {key: 'languageHint', set: function(a0) {
this._languageHint = a0;
}}, {key: 'process', value: function(a0) {
var env0_0 = this;
var env0_1 = a0;
if (!this._processing) {
this._processing = true;
global.requestIdleCallback(_fun52871);
}
}}, {key: '_processEnd', value: function() {
var r1;
var _minimumTimeRemaining;
var value = a0;
r1 = value !== undefined ? value : false;
this._processing = false;
if (r1) {
_minimumTimeRemaining = this._minimumTimeRemaining;
this._minimumTimeRemaining = typeof _minimumTimeRemaining === 'bigint' ? _minimumTimeRemaining + 1n : +_minimumTimeRemaining + 1;
}
}}]);
}
function LanguageDetector(a0, a1) { // fn#52866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:143, offset: 0x01338d42, size: 81 bytes, params: 3, frame: 15
env1_2(this, LanguageDetector);
this._shouldProcess = false;
this._processing = false;
this._minimumTimeRemaining = 5;
this._language = a0;
this._languageHint = a0;
this._onChange = a1;
a1(a0);
}
function value_52870(a0) { // fn#52870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:543, offset: 0x01338dd3, size: 57 bytes, params: 2, frame: 11
const env0_1 = a0;
if (!this._processing) {
this._processing = true;
global.requestIdleCallback(_fun52871);
}
function _fun52871(a0) { // fn#52871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:615, offset: 0x01338e0c, size: 144 bytes, params: 2, frame: 15
const env0_0 = a0;
if (a0.timeRemaining() <= env0_0._minimumTimeRemaining) {
env0_0._processEnd();
} else {
env0_1 = env0_1.length > 256 ? env0_1.slice(0, 256) : env0_1;
detectLanguage(env0_1, env0_0._languageHint).then(_fun52876, _fun52877);
}
function detectLanguage(a0, a1) { // fn#52872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:718, offset: 0x01338e9c, size: 75 bytes, params: 3, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
value = value.ensureModule('discord_spellcheck');
return value.then(_fun52873);
function _fun52873() { // fn#52873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:803, offset: 0x01338ee7, size: 91 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
const env0_0 = value.requireModule('discord_spellcheck').cld;
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun52874);
return promise instanceof Object ? promise : value;
function _fun52874(a0, a1) { // fn#52874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:882, offset: 0x01338f42, size: 80 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const cldBinding = cld;
cldBinding.detect(env1_0, {httpHint: require, encodingHint: 'UTF8'}, _fun52875);
function _fun52875(a0, a1) { // fn#52875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:935, offset: 0x01338f92, size: 209 bytes, params: 3, frame: 13
var Error;
var message;
if (a0 != null) {
Error = global.Error;
message = a0.message;
require(new Error());
} else if (a1.reliable) {
if (a1.languages[0].percent < 90) {
require(new global.Error('Not enough reliable text.'));
} else if (a1.languages[0].score < 500) {
require(new global.Error('Not enough reliable text.'));
} else {
env0_0(a1.languages[0].code);
}
} else {
require(new global.Error('Not enough reliable text.'));
}
}
function value_52870(a0) { // fn#52870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:543, offset: 0x01338dd3, size: 57 bytes, params: 2, frame: 11
const env0_1 = a0;
if (!this._processing) {
this._processing = true;
global.requestIdleCallback(_fun52871);
}
}
}
function _fun52871(a0) { // fn#52871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:615, offset: 0x01338e0c, size: 144 bytes, params: 2, frame: 15
const env0_0 = a0;
if (a0.timeRemaining() <= env0_0._minimumTimeRemaining) {
env0_0._processEnd();
} else {
env0_1 = env0_1.length > 256 ? env0_1.slice(0, 256) : env0_1;
detectLanguage(env0_1, env0_0._languageHint).then(_fun52876, _fun52877);
}
}
}
function detectLanguage(a0, a1) { // fn#52872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:718, offset: 0x01338e9c, size: 75 bytes, params: 3, frame: 12
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
value = value.ensureModule('discord_spellcheck');
return value.then(_fun52873);
}
}
function _fun52876(a0) { // fn#52876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1143, offset: 0x01339063, size: 44 bytes, params: 2, frame: 11
const binding = env1_0;
binding.language = a0;
binding._processEnd(env0_0.didTimeout);
}
function _fun52876(a0) { // fn#52876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1143, offset: 0x01339063, size: 44 bytes, params: 2, frame: 11
const binding = env1_0;
binding.language = a0;
binding._processEnd(env0_0.didTimeout);
}
function _fun52877() { // fn#52877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1197, offset: 0x0133908f, size: 35 bytes, params: 1, frame: 11
const binding = env1_0;
binding._processEnd(env0_0.didTimeout);
}
function _fun52877() { // fn#52877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:1197, offset: 0x0133908f, size: 35 bytes, params: 1, frame: 11
const binding = env1_0;
binding._processEnd(env0_0.didTimeout);
}
function _fun52873() { // fn#52873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:803, offset: 0x01338ee7, size: 91 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__.__proto__.__proto__;
value = importDefault(6731) /* metro dependency 6731: DesktopNativeUtils */;
const env0_0 = value.requireModule('discord_spellcheck').cld;
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun52874);
return promise instanceof Object ? promise : value;
}
}
function _fun52874(a0, a1) { // fn#52874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:882, offset: 0x01338f42, size: 80 bytes, params: 3, frame: 16
const env0_0 = a0;
const env0_1 = a1;
const cldBinding = cld;
cldBinding.detect(env1_0, {httpHint: require, encodingHint: 'UTF8'}, _fun52875);
}
function _fun52875(a0, a1) { // fn#52875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6908:935, offset: 0x01338f92, size: 209 bytes, params: 3, frame: 13
var Error;
var message;
if (a0 != null) {
Error = global.Error;
message = a0.message;
require(new Error());
} else if (a1.reliable) {
if (a1.languages[0].percent < 90) {
require(new global.Error('Not enough reliable text.'));
} else if (a1.languages[0].score < 500) {
require(new global.Error('Not enough reliable text.'));
} else {
env0_0(a1.languages[0].code);
}
} else {
require(new global.Error('Not enough reliable text.'));
}
}
global.__d(_fun52864, 6730, [6, 7, 6731, 2]) /* metro module 6730, dependencies: [6, 7, 6731, 2] */;
+195 -188
View File
@@ -1,211 +1,218 @@
/* Metro module 6727; source: lib/spellcheck/Spellchecker.tsx; dependencies: [5, 57, 6, 7, 1949, 3, 3767, 6728, 6729, 6730, 22, 1864, 1360, 2] */
import Logger from '../../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
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 Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import LanguageDetector from './LanguageDetector.tsx'; /* Metro dependency 6730 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun52835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:6, offset: 0x013380be, size: 339 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const value4 = new (importDefault(3) /* metro dependency 3: Logger */)('Spellchecker');
const value4 = new (Logger)('Spellchecker');
const env0_9 = (importDefault(3767) /* metro dependency 3767: DiscordNative */) == null ? value : (importDefault(3767) /* metro dependency 3767: DiscordNative */).spellCheck;
const value7 = _fun52842();
const env0_11 = (importDefault(22) /* metro dependency 22 */).debounce(_fun52859, 250);
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/Spellchecker.tsx');
const env0_11 = (Module00022).debounce(_fun52859, 250);
(FileImportTrackerModule).fileFinishedImporting('lib/spellcheck/Spellchecker.tsx');
exports.Spellchecker = value7;
exports.install = function() {
return _install.apply(this, arguments);
};
return value;
}
function normalizeLocale(a0) { // fn#52836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:221, offset: 0x01338211, size: 255 bytes, params: 2, frame: 19
let value = a0;
const r3 = (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[value] ?? value;
value = Reflect.apply((require(6729) /* metro dependency 6729 */).parse, value, [r3.replace(RegExp('[_-]', 'g'),
'-')]);
if (value == null) {
env0_8.error('' + r3 + ' is not a valid locale.');
} else {
var langtag = value.langtag;
var language = langtag.language;
if (language == null) {
function normalizeLocale_52836(a0) { // fn#52836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:221, offset: 0x01338211, size: 255 bytes, params: 2, frame: 19
let value = a0;
const r3 = (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[value] ?? value;
value = Reflect.apply((require(6729) /* metro dependency 6729 */).parse, value, [r3.replace(RegExp('[_-]', 'g'),
'-')]);
if (value == null) {
env0_8.error('' + r3 + ' is not a valid locale.');
return undefined;
}
langtag = value.langtag;
var region = langtag.region;
if (region != null) {
langtag = value.langtag;
language = langtag.language;
region = langtag.region;
language = language.language;
value = language.toLowerCase();
return '' + value + '-' + region.toUpperCase();
}
env0_8.error('' + r3 + ' is not a valid locale.');
}
}
function _install() { // fn#52837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2371, offset: 0x01338310, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52839).apply(this, arguments);
}
function _fun52842() { // fn#52842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:528, offset: 0x01338444, size: 277 bytes, params: 1, frame: 15
return env0_6(Spellchecker, [{key: 'enabled', get: function() {
return this._enabled;
}, set: function(a0) {
this._enabled = a0;
}}, {key: 'setLearnedWords', value: function(a0) {
spellCheck.setLearnedWords(a0);
}}, {key: 'setLocale', value: value_52849}, {key: 'setAppLocale', value: function(a0) {
this.regionPreference = a0.split('-')[1];
}}, {key: 'detectLanguage', value: function(a0) {
if (this.enabled) {
this.languageDetector.process(a0);
}
}}, {key: 'getAvailableLanguages', value: function(a0) {
a0.forEach(_fun52854);
return {};
}}, {key: 'isMisspelled', value: function(a0) {
return this.misspelledWord !== '' && a0 === this.misspelledWord;
}}, {key: 'getCorrectionsForMisspelling', value: function(a0, a1) {
return this.isMisspelled(a0, a1) ? this.corrections : [];
}}, {key: 'getCachedMisspelling', value: function() {
return {misspelledWord: this.misspelledWord, corrections: this.corrections};
}}, {key: 'replaceMisspelling', value: function(a0) {
spellCheck.replaceMisspelling(a0);
}}]);
}
function _fun52859(a0, a1) { // fn#52859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2080, offset: 0x013388db, size: 195 bytes, params: 3, frame: 20
var r1;
var value3;
var moduleValue;
var moduleValue2;
var moduleValue3;
const value = null;
if (value == a1) {
r1 = value;
} else {
value3 = undefined;
moduleValue = require(1864) /* metro dependency 1864: DOMUtils */;
if (moduleValue.isElement(a1, global.HTMLInputElement)) {
r1 = a1.value;
} else {
moduleValue2 = require(1864) /* metro dependency 1864: DOMUtils */;
if (moduleValue2.isElement(a1, global.HTMLTextAreaElement)) {
var langtag = value.langtag;
var language = langtag.language;
if (language == null) {
env0_8.error('' + r3 + ' is not a valid locale.');
return undefined;
}
langtag = value.langtag;
var region = langtag.region;
if (region != null) {
langtag = value.langtag;
language = langtag.language;
region = langtag.region;
language = language.language;
value = language.toLowerCase();
return '' + value + '-' + region.toUpperCase();
}
env0_8.error('' + r3 + ' is not a valid locale.');
}
}
function _install() { // fn#52837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2371, offset: 0x01338310, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52839).apply(this, arguments);
function* _fun52839() { // fn#52839, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2410, offset: 0x01338349, size: 149 bytes, params: 1, frame: 16
var environment;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_9;
const getAvailableDictionaries = binding.getAvailableDictionaries;
yield Reflect.apply(getAvailableDictionaries, binding, []);
const value3 = undefined;
if (false) {
return value3;
}
const value5 = (value3 ?? []).map(env2_12);
const env2_103 = new env2_10(value5.filter(env2_0(env2_2[12]).isNotNullish));
((a0) => {
var env0_0 = a0;
if (global.document.body != null) {
global.document.body.addEventListener('beforeinput', _fun52841, true);
}
})(env2_103);
return env2_103;
function attachToInput(a0) { // fn#52840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2551, offset: 0x013383de, size: 69 bytes, params: 2, frame: 15
const env0_0 = a0;
if (global.document.body != null) {
global.document.body.addEventListener('beforeinput', _fun52841, true);
}
function _fun52841({target}) { // fn#52841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2644, offset: 0x01338423, size: 33 bytes, params: 2, frame: 13
return env4_11(env0_0, target);
}
}
}
}
function _fun52842() { // fn#52842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:528, offset: 0x01338444, size: 277 bytes, params: 1, frame: 15
return CreateClass(Spellchecker, [{key: 'enabled', get: function() {
return this._enabled;
}, set: function(a0) {
this._enabled = a0;
}}, {key: 'setLearnedWords', value: function(a0) {
spellCheck.setLearnedWords(a0);
}}, {key: 'setLocale', value: value_52849}, {key: 'setAppLocale', value: function(a0) {
this.regionPreference = a0.split('-')[1];
}}, {key: 'detectLanguage', value: function(a0) {
if (this.enabled) {
this.languageDetector.process(a0);
}
}}, {key: 'getAvailableLanguages', value: function(a0) {
a0.forEach(_fun52854);
return {};
}}, {key: 'isMisspelled', value: function(a0) {
return this.misspelledWord !== '' && a0 === this.misspelledWord;
}}, {key: 'getCorrectionsForMisspelling', value: function(a0, a1) {
return this.isMisspelled(a0, a1) ? this.corrections : [];
}}, {key: 'getCachedMisspelling', value: function() {
return {misspelledWord: this.misspelledWord, corrections: this.corrections};
}}, {key: 'replaceMisspelling', value: function(a0) {
spellCheck.replaceMisspelling(a0);
}}]);
function Spellchecker(a0) { // fn#52843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:549, offset: 0x01338559, size: 226 bytes, params: 2, frame: 17
const env0_1 = a0;
env1_5(this, Spellchecker);
this._enabled = true;
this.misspelledWord = '';
this.corrections = [];
const value4 = env1_4(LocaleStore.locale.split('-'), 2);
const property = value4[0];
this.regionPreference = value4[1];
const env0_3 = this.getAvailableLanguages(a0);
const defaultImport = LanguageDetector;
const value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport(property, _fun52844);
this.languageDetector = defaultImport2 instanceof Object ? defaultImport2 : value5;
spellCheck.on('spellcheck-result', _fun52845);
function _fun52844(a0) { // fn#52844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:802, offset: 0x0133863b, size: 156 bytes, params: 2, frame: 17
var r4;
const value2 = '' + a0 + '-' + env0_0.regionPreference;
if (env0_1.indexOf(value2) !== -1) {
env0_0.setLocale(value2);
} else {
r4 = env0_3[a0] ?? (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[env0_2];
if (r4 != null) {
env0_0.setLocale(r4);
}
}
}
function _fun52845(a0, a1) { // fn#52845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:981, offset: 0x013386d7, size: 57 bytes, params: 3, frame: 7
const value = a0;
const value2 = a1;
env0_0.misspelledWord = value ?? '';
env0_0.corrections = value2 ?? [];
}
}
function value_52849(a0) { // fn#52849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1231, offset: 0x01338739, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = spellCheck.setLocale(a0);
if (value != null) {
value.then(_fun52850);
}
function _fun52850(a0) { // fn#52850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1283, offset: 0x0133876d, size: 72 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
const binding = env2_8;
binding.info('Switching to ' + env0_0, a0 ? '(available)' : '(unavailable)');
}
}
function value_52853(a0) { // fn#52853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1554, offset: 0x013387fd, size: 28 bytes, params: 2, frame: 12
a0.forEach(_fun52854);
return {};
function _fun52854(a0) { // fn#52854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1593, offset: 0x01338819, size: 67 bytes, params: 2, frame: 15
const value = a0;
const property = env2_4(value.split('-'), 1)[0];
const binding = env0_0;
binding[property] = binding[property] ?? value;
}
}
}
function _fun52859(a0, a1) { // fn#52859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2080, offset: 0x013388db, size: 195 bytes, params: 3, frame: 20
var r1;
var value3;
var moduleValue;
var moduleValue2;
var moduleValue3;
const value = null;
if (value == a1) {
r1 = value;
} else {
value3 = undefined;
moduleValue = require(1864) /* metro dependency 1864: DOMUtils */;
if (moduleValue.isElement(a1, global.HTMLInputElement)) {
r1 = a1.value;
} else {
moduleValue3 = require(1864) /* metro dependency 1864: DOMUtils */;
r1 = moduleValue3.isElement(a1) && a1.hasAttribute('contenteditable') ? a1.textContent : value3;
moduleValue2 = require(1864) /* metro dependency 1864: DOMUtils */;
if (moduleValue2.isElement(a1, global.HTMLTextAreaElement)) {
r1 = a1.value;
} else {
moduleValue3 = require(1864) /* metro dependency 1864: DOMUtils */;
r1 = moduleValue3.isElement(a1) && a1.hasAttribute('contenteditable') ? a1.textContent : value3;
}
}
}
}
if (value != r1) {
a0.detectLanguage(r1);
}
}
function* _fun52839() { // fn#52839, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2410, offset: 0x01338349, size: 149 bytes, params: 1, frame: 16
var environment;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_9;
const getAvailableDictionaries = binding.getAvailableDictionaries;
yield Reflect.apply(getAvailableDictionaries, binding, []);
const value3 = undefined;
if (false) {
return value3;
}
const value5 = (value3 ?? []).map(env2_12);
const env2_102 = new env2_10(value5.filter(env2_0(env2_2[12]).isNotNullish));
((a0) => {
var env0_0 = a0;
if (global.document.body != null) {
global.document.body.addEventListener('beforeinput', _fun52841, true);
}
})(env2_102);
return env2_102;
}
function Spellchecker(a0) { // fn#52843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:549, offset: 0x01338559, size: 226 bytes, params: 2, frame: 17
const env0_1 = a0;
env1_5(this, Spellchecker);
this._enabled = true;
this.misspelledWord = '';
this.corrections = [];
const value4 = env1_4(LocaleStore.locale.split('-'), 2);
const property = value4[0];
this.regionPreference = value4[1];
const env0_3 = this.getAvailableLanguages(a0);
const defaultImport = importDefault(6730) /* metro dependency 6730: LanguageDetector */;
const value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport(property, _fun52844);
this.languageDetector = defaultImport2 instanceof Object ? defaultImport2 : value5;
spellCheck.on('spellcheck-result', _fun52845);
}
function value_52849(a0) { // fn#52849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1231, offset: 0x01338739, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
value = spellCheck.setLocale(a0);
if (value != null) {
value.then(_fun52850);
}
}
function value_52853(a0) { // fn#52853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1554, offset: 0x013387fd, size: 28 bytes, params: 2, frame: 12
a0.forEach(_fun52854);
return {};
}
function attachToInput(a0) { // fn#52840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2551, offset: 0x013383de, size: 69 bytes, params: 2, frame: 15
const env0_0 = a0;
if (global.document.body != null) {
global.document.body.addEventListener('beforeinput', _fun52841, true);
}
}
function _fun52844(a0) { // fn#52844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:802, offset: 0x0133863b, size: 156 bytes, params: 2, frame: 17
var r4;
const value2 = '' + a0 + '-' + env0_0.regionPreference;
if (env0_1.indexOf(value2) !== -1) {
env0_0.setLocale(value2);
} else {
r4 = env0_3[a0] ?? (importDefault(6728) /* metro dependency 6728: fallbackLocales */)[env0_2];
if (r4 != null) {
env0_0.setLocale(r4);
if (value != r1) {
a0.detectLanguage(r1);
}
}
}
function _fun52845(a0, a1) { // fn#52845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:981, offset: 0x013386d7, size: 57 bytes, params: 3, frame: 7
const value = a0;
const value2 = a1;
env0_0.misspelledWord = value ?? '';
env0_0.corrections = value2 ?? [];
}
function _fun52850(a0) { // fn#52850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1283, offset: 0x0133876d, size: 72 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
const binding = env2_8;
binding.info('Switching to ' + env0_0, a0 ? '(available)' : '(unavailable)');
}
function _fun52854(a0) { // fn#52854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:1593, offset: 0x01338819, size: 67 bytes, params: 2, frame: 15
const value = a0;
const property = env2_4(value.split('-'), 1)[0];
const binding = env0_0;
binding[property] = binding[property] ?? value;
}
function _fun52841({target}) { // fn#52841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6905:2644, offset: 0x01338423, size: 33 bytes, params: 2, frame: 13
return env4_11(env0_0, target);
}
global.__d(_fun52835, 6727, [5, 57, 6, 7, 1949, 3, 3767, 6728, 6729, 6730, 22, 1864, 1360,
2]) /* metro module 6727, dependencies: [5, 57, 6, 7, 1949, 3, 3767, 6728, 6729, 6730, 22, 1864, 1360, 2] */;
+4 -1
View File
@@ -1,8 +1,10 @@
/* Metro module 6728; source: lib/spellcheck/fallbackLocales.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun52861(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6906:6, offset: 0x0133899e, size: 92 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/spellcheck/fallbackLocales.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/spellcheck/fallbackLocales.tsx');
exports.default = {'aa': 'aa-ET', 'af': 'af-ZA', 'ak': 'ak-GH', 'am': 'am-ET', 'an': 'an-ES', 'ar': 'ar-MA',
'as': 'as-IN', 'ay': 'ay-PE', 'az': 'az-AZ', 'be': 'be-BY', 'bg': 'bg-BG', 'bi': 'bi-TV', 'bn': 'bn-BD',
'bo': 'bo-CN', 'br': 'br-FR', 'bs': 'bs-BA', 'ca': 'ca-ES', 'ce': 'ce-RU', 'cs': 'cs-CZ', 'cv': 'cv-RU',
@@ -25,3 +27,4 @@ function _fun52861(global, require, importDefault, importAll, module, exports, d
'xh': 'xh-ZA', 'yi': 'yi-US', 'yo': 'yo-NG', 'zh': 'zh-CN', 'zu': 'zu-ZA'};
}
global.__d(_fun52861, 6728, [2]) /* metro module 6728, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
+274 -269
View File
@@ -1,329 +1,334 @@
/* Metro module 11217; source: lib/uploadRtcLogFiles.android.tsx; dependencies: [5, 661, 3, 11218, 4131, 507, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun85739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:6, offset: 0x01f7a3fd, size: 197 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_3 = value.DebugLogCategory;
const env0_4 = value.Endpoints;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('uploadRtcLogFiles');
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploadRtcLogFiles.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploadRtcLogFiles.android.tsx');
exports.uploadRtcLogFiles = function() {
return _uploadRtcLogFiles.apply(this, arguments);
};
}
function _uploadRtcLogFiles() { // fn#85740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:187, offset: 0x01f7a4c2, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun85742).apply(this, arguments);
}
function* _fun85742(a0) { // fn#85742, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:246, offset: 0x01f7a4ff, size: 659 bytes, params: 2, frame: 36
var r16;
var value;
var value2;
var items2;
var length;
var value3;
var property;
var binding;
var binding2;
var property2;
var readFile;
var value4;
var value5;
var value6;
var binding3;
var property3;
var value7;
var HTTP;
var post;
var object3;
var DEBUG_LOG;
var binding4;
var ANDROID_APP;
var value8;
var object4;
var value9;
var error;
var error2;
var status;
var message;
var HermesInternal;
var concat;
var binding5;
var UploadVoiceDebugLogsError;
var UploadErrorCodes;
var UPLOAD;
var prototype;
var uploadVoiceDebugLogsError;
var binding6;
var PROGRESS;
var warn;
var error3;
var binding7;
var READ;
exceptionSkip53: while (true) {
exceptionLanding53: while (true) {
exceptionSkip44: while (true) {
exceptionLanding44: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = 0;
items2 = ['discord-webrtc_0', 'discord-webrtc_1', 'discord-last-webrtc_0', 'discord-last-webrtc_1'];
length = items2.length;
value3 = environment.__proto__.__proto__;
if (value < length) {
r16 = value;
reducibleLoop2: while (true) {
property = items2[r16];
try {
binding = env2_0;
} catch (error) {
break exceptionLanding53;
}
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding53;
}
try {
property2 = binding2[3];
} catch (error) {
break exceptionLanding53;
}
try {
value = binding(property2);
} catch (error) {
break exceptionLanding53;
}
try {
readFile = value.readFile;
} catch (error) {
break exceptionLanding53;
}
try {
value = Reflect.apply(readFile, value, ['documents', property, 'utf8']);
} catch (error) {
break exceptionLanding53;
}
yield value;
try {
value = undefined;
value4 = false;
} catch (error) {
break exceptionLanding53;
}
if (value4) {
function _uploadRtcLogFiles() { // fn#85740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:187, offset: 0x01f7a4c2, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun85742).apply(this, arguments);
function* _fun85742(a0) { // fn#85742, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:246, offset: 0x01f7a4ff, size: 659 bytes, params: 2, frame: 36
var r16;
var value;
var value2;
var items2;
var length;
var value3;
var property;
var binding;
var binding2;
var property2;
var readFile;
var value4;
var value5;
var value6;
var binding3;
var property3;
var value7;
var HTTP;
var post;
var object;
var DEBUG_LOG;
var binding4;
var ANDROID_APP;
var value8;
var object2;
var value9;
var error;
var error2;
var status;
var message;
var HermesInternal;
var concat;
var binding5;
var UploadVoiceDebugLogsError;
var UploadErrorCodes;
var UPLOAD;
var prototype;
var uploadVoiceDebugLogsError;
var binding6;
var PROGRESS;
var warn;
var error3;
var binding7;
var READ;
exceptionSkip53: while (true) {
exceptionLanding53: while (true) {
exceptionSkip44: while (true) {
exceptionLanding44: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
try {
value5 = value == null;
} catch (error) {
break exceptionLanding53;
}
if (!value5) {
try {
length = value.length;
} catch (error) {
break exceptionLanding53;
}
try {
value6 = length > a0;
} catch (error) {
break exceptionLanding53;
}
if (value6) {
try {
binding = env2_5;
} catch (error) {
break exceptionLanding53;
}
try {
warn = binding.warn;
} catch (error) {
break exceptionLanding53;
}
try {
Reflect.apply(warn, binding,
['uploadRtcLogFiles: Log file is too big, skipping upload']);
} catch (error) {
break exceptionLanding53;
}
} else {
value = 0;
items2 = ['discord-webrtc_0', 'discord-webrtc_1', 'discord-last-webrtc_0', 'discord-last-webrtc_1'];
length = items2.length;
value3 = environment.__proto__.__proto__;
if (value < length) {
r16 = value;
reducibleLoop2: while (true) {
property = items2[r16];
try {
binding = env2_0;
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
try {
binding3 = env2_1;
binding2 = env2_1;
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
try {
property3 = binding3[5];
property2 = binding2[3];
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
try {
value7 = binding(property3);
value = binding(property2);
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
try {
HTTP = value7.HTTP;
readFile = value.readFile;
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
try {
post = HTTP.post;
value = Reflect.apply(readFile, value, ['documents', property, 'utf8']);
} catch (error) {
break exceptionLanding44;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding44;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding44;
}
try {
DEBUG_LOG = binding.DEBUG_LOG;
} catch (error) {
break exceptionLanding44;
}
try {
binding4 = env2_3;
} catch (error) {
break exceptionLanding44;
}
try {
ANDROID_APP = binding4.ANDROID_APP;
} catch (error) {
break exceptionLanding44;
}
try {
value8 = Reflect.apply(DEBUG_LOG, binding, [ANDROID_APP, property]);
} catch (error) {
break exceptionLanding44;
}
try {
object3.url = value8;
} catch (error) {
break exceptionLanding44;
}
try {
object3.body = value;
} catch (error) {
break exceptionLanding44;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding44;
}
try {
object4['Content-Type'] = 'text/plain';
} catch (error) {
break exceptionLanding44;
}
try {
object3.headers = object4;
} catch (error) {
break exceptionLanding44;
}
try {
object3.rejectWithError = false;
} catch (error) {
break exceptionLanding44;
}
try {
value = Reflect.apply(post, HTTP, [object3]);
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
yield value;
try {
value = undefined;
value9 = false;
value4 = false;
} catch (error) {
break exceptionLanding44;
break exceptionLanding53;
}
reducibleJoin50: while (true) {
if (value9) {
return value;
if (value4) {
return value;
}
try {
value5 = value == null;
} catch (error) {
break exceptionLanding53;
}
if (!value5) {
try {
length = value.length;
} catch (error) {
break exceptionLanding53;
}
try {
value6 = length > a0;
} catch (error) {
break exceptionLanding53;
}
if (value6) {
try {
binding = env2_5;
} catch (error) {
break exceptionLanding53;
}
try {
warn = binding.warn;
} catch (error) {
break exceptionLanding53;
}
try {
Reflect.apply(warn, binding,
['uploadRtcLogFiles: Log file is too big, skipping upload']);
} catch (error) {
break exceptionLanding53;
}
} else {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding44;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding44;
}
try {
property3 = binding3[5];
} catch (error) {
break exceptionLanding44;
}
try {
value7 = binding(property3);
} catch (error) {
break exceptionLanding44;
}
try {
HTTP = value7.HTTP;
} catch (error) {
break exceptionLanding44;
}
try {
post = HTTP.post;
} catch (error) {
break exceptionLanding44;
}
try {
object = {};
} catch (error) {
break exceptionLanding44;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding44;
}
try {
DEBUG_LOG = binding.DEBUG_LOG;
} catch (error) {
break exceptionLanding44;
}
try {
binding4 = env2_3;
} catch (error) {
break exceptionLanding44;
}
try {
ANDROID_APP = binding4.ANDROID_APP;
} catch (error) {
break exceptionLanding44;
}
try {
value8 = Reflect.apply(DEBUG_LOG, binding, [ANDROID_APP, property]);
} catch (error) {
break exceptionLanding44;
}
try {
object.url = value8;
} catch (error) {
break exceptionLanding44;
}
try {
object.body = value;
} catch (error) {
break exceptionLanding44;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding44;
}
try {
object2['Content-Type'] = 'text/plain';
} catch (error) {
break exceptionLanding44;
}
try {
object.headers = object2;
} catch (error) {
break exceptionLanding44;
}
try {
object.rejectWithError = false;
} catch (error) {
break exceptionLanding44;
}
try {
value = Reflect.apply(post, HTTP, [object]);
} catch (error) {
break exceptionLanding44;
}
yield value;
try {
value = undefined;
value9 = false;
} catch (error) {
break exceptionLanding44;
}
reducibleJoin50: while (true) {
if (value9) {
return value;
}
break reducibleJoin50;
}
}
break reducibleJoin50;
}
value = typeof r16 === 'bigint' ? r16 + 1n : +r16 + 1;
length = items2.length;
if (!(value < length)) {
return undefined;
}
r16 = value;
continue reducibleLoop2;
}
}
value = typeof r16 === 'bigint' ? r16 + 1n : +r16 + 1;
length = items2.length;
if (!(value < length)) {
return undefined;
}
r16 = value;
continue reducibleLoop2;
return undefined;
break exceptionSkip44;
}
binding = env2_5;
error2 = binding.error;
status = error.status;
message = error.message;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error2, binding,
['uploadRtcLogFiles: Log file upload error: status: ' + status + ', message: ' + message]);
status = error.status;
if (status === 429) {
binding = env2_0;
binding6 = env2_1;
UploadVoiceDebugLogsError = binding(binding6[4]).UploadVoiceDebugLogsError;
PROGRESS = binding(binding6[4]).UploadErrorCodes.PROGRESS;
throw new UploadVoiceDebugLogsError();
}
binding = env2_0;
binding5 = env2_1;
UploadVoiceDebugLogsError = binding(binding5[4]).UploadVoiceDebugLogsError;
UploadErrorCodes = binding(binding5[4]).UploadErrorCodes;
UPLOAD = UploadErrorCodes.UPLOAD;
prototype = UploadVoiceDebugLogsError.prototype;
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
throw value;
break exceptionSkip44;
}
return undefined;
break exceptionSkip44;
break exceptionSkip53;
}
binding = env2_5;
error2 = binding.error;
status = error.status;
error3 = binding.error;
message = error.message;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error2, binding,
['uploadRtcLogFiles: Log file upload error: status: ' + status + ', message: ' + message]);
status = error.status;
if (status === 429) {
binding = env2_0;
binding6 = env2_1;
UploadVoiceDebugLogsError = binding(binding6[4]).UploadVoiceDebugLogsError;
PROGRESS = binding(binding6[4]).UploadErrorCodes.PROGRESS;
throw new UploadVoiceDebugLogsError();
}
Reflect.apply(error3, binding, ['uploadRtcLogFiles: Log file reading error: ' + message]);
binding = env2_0;
binding5 = env2_1;
UploadVoiceDebugLogsError = binding(binding5[4]).UploadVoiceDebugLogsError;
UploadErrorCodes = binding(binding5[4]).UploadErrorCodes;
UPLOAD = UploadErrorCodes.UPLOAD;
binding7 = env2_1;
UploadVoiceDebugLogsError = binding(binding7[4]).UploadVoiceDebugLogsError;
UploadErrorCodes = binding(binding7[4]).UploadErrorCodes;
READ = UploadErrorCodes.READ;
prototype = UploadVoiceDebugLogsError.prototype;
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
throw value;
break exceptionSkip44;
break exceptionSkip53;
}
break exceptionSkip53;
}
binding = env2_5;
error3 = binding.error;
message = error.message;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error3, binding, ['uploadRtcLogFiles: Log file reading error: ' + message]);
binding = env2_0;
binding7 = env2_1;
UploadVoiceDebugLogsError = binding(binding7[4]).UploadVoiceDebugLogsError;
UploadErrorCodes = binding(binding7[4]).UploadErrorCodes;
READ = UploadErrorCodes.READ;
prototype = UploadVoiceDebugLogsError.prototype;
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
throw value;
break exceptionSkip53;
}
}
global.__d(_fun85739, 11217, [5, 661, 3, 11218, 4131, 507,
2]) /* metro module 11217, dependencies: [5, 661, 3, 11218, 4131, 507, 2] */;
File diff suppressed because it is too large. Load diff
+116 -112
View File
@@ -1,128 +1,132 @@
/* Metro module 4650; source: lib/uploader/Upload.tsx; dependencies: [6, 7, 15, 17, 18, 4651, 22, 4655, 491, 639, 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 Module00639Module from '../../by-id/module-00639.js'; /* Metro dependency 639 */
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;
object = {REACT_NATIVE: 0};
object[0] = 'REACT_NATIVE';
object.WEB = 1;
object[1] = 'WEB';
const object2 = {FILE_ATTACHMENT: 0};
object2[0] = 'FILE_ATTACHMENT';
object2.IMAGE_PICKER = 1;
object2[1] = 'IMAGE_PICKER';
object2.IMAGE_EDITOR = 2;
object2[2] = 'IMAGE_EDITOR';
const EventEmitter = (Module00639Module).EventEmitter;
const value = _fun40126(EventEmitter);
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/Upload.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/Upload.tsx');
exports.default = value;
exports.UploadPlatform = object3;
exports.UploadPlatform = object;
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) {
exports.UploadOrigin = object2;
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;
})();
}
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 _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 Upload2 = Upload;
Inherits(Upload2, a0);
return CreateClass(Upload2, [{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;
}
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;
}
global.__d(_fun40122, 4650, [6, 7, 15, 17, 18, 4651, 22, 4655, 491, 639,
2]) /* metro module 4650, dependencies: [6, 7, 15, 17, 18, 4651, 22, 4655, 491, 639, 2] */;
+62 -57
View File
@@ -1,71 +1,76 @@
/* Metro module 4692; source: lib/uploader/UploadTargets.tsx; dependencies: [6, 7, 1379, 661, 4655, 4651, 4693, 4695, 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 ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as FileUtilsModule from '../../utils/FileUtils.tsx'; /* Metro dependency 4655 */
function _fun40570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:6, offset: 0x0110535c, size: 256 bytes, params: 8, frame: 20
var object2;
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.Endpoints;
const env0_8 = constantsModule.MAX_UPLOAD_COUNT;
const env0_9 = _fun40571();
object2 = {MESSAGE_ATTACHMENT: 0};
object2[0] = 'MESSAGE_ATTACHMENT';
object2.GUILD_PRODUCT_ATTACHMENT = 1;
object2[1] = 'GUILD_PRODUCT_ATTACHMENT';
object2.GRAVITY_ATTACHMENT = 2;
object2[2] = 'GRAVITY_ATTACHMENT';
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploadTargets.tsx');
exports.UploadTargets = object2;
object = {MESSAGE_ATTACHMENT: 0};
object[0] = 'MESSAGE_ATTACHMENT';
object.GUILD_PRODUCT_ATTACHMENT = 1;
object[1] = 'GUILD_PRODUCT_ATTACHMENT';
object.GRAVITY_ATTACHMENT = 2;
object[2] = 'GRAVITY_ATTACHMENT';
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/UploadTargets.tsx');
exports.UploadTargets = object;
exports.getUploadTarget = getUploadTarget;
}
function _fun40571() { // fn#40571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:173, offset: 0x0110545c, size: 176 bytes, params: 1, frame: 15
return CreateClass(MessageAttachmentUploadTarget, [{key: 'getCreateAttachmentURL', value: function(a0) {
return Endpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(a0);
}}, {key: 'getDeleteUploadURL', value: function(a0) {
return Endpoints.MESSAGE_DELETE_UPLOAD(a0);
}}, {key: 'getMaxFileSize', value: value_40575}, {key: 'getMaxAttachmentsCount', value: function() {
return MAX_UPLOAD_COUNT;
}}, {key: 'getMaxTotalAttachmentSize', value: function() {
return require(dependencyMap[5]).MAX_TOTAL_ATTACHMENT_SIZE;
}}, {key: 'shouldReactNativeCompressUploads', get: function() {
return true;
}}]);
function MessageAttachmentUploadTarget() { // fn#40572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:194, offset: 0x00c8063e, size: 27 bytes, params: 1, frame: 13
env1_4(this, MessageAttachmentUploadTarget);
}
function _fun40571() { // fn#40571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:173, offset: 0x0110545c, size: 176 bytes, params: 1, frame: 15
return env0_5(MessageAttachmentUploadTarget, [{key: 'getCreateAttachmentURL', value: function(a0) {
return Endpoints.MESSAGE_CREATE_ATTACHMENT_UPLOAD(a0);
}}, {key: 'getDeleteUploadURL', value: function(a0) {
return Endpoints.MESSAGE_DELETE_UPLOAD(a0);
}}, {key: 'getMaxFileSize', value: value_40575}, {key: 'getMaxAttachmentsCount', value: function() {
return MAX_UPLOAD_COUNT;
}}, {key: 'getMaxTotalAttachmentSize', value: function() {
return require(dependencyMap[5]).MAX_TOTAL_ATTACHMENT_SIZE;
}}, {key: 'shouldReactNativeCompressUploads', get: function() {
return true;
}}]);
}
function value_40575(a0) { // fn#40575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:479, offset: 0x0110553a, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
const basicChannel = ChannelStore.getBasicChannel(a0);
value = undefined;
return FileUtilsModule.maxFileSize(basicChannel == null ? value : basicChannel.guild_id);
}
function getUploadTarget(a0) { // fn#40579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:1077, offset: 0x011055a1, size: 158 bytes, params: 2, frame: 12
var value3;
var value4;
var value;
const GUILD_PRODUCT_ATTACHMENT = env0_10.GUILD_PRODUCT_ATTACHMENT;
if (GUILD_PRODUCT_ATTACHMENT === a0) {
value = importDefault(4693) /* metro dependency 4693: GuildProductAttachmentUploadTarget */;
value4 = Object.create(value.prototype, {constructor: {value: value}});
value = new value();
return value instanceof Object ? value : value4;
}
const GRAVITY_ATTACHMENT = env0_10.GRAVITY_ATTACHMENT;
if (GRAVITY_ATTACHMENT === a0) {
value = importDefault(4695) /* metro dependency 4695: ICYMIAttachmentUploadTarget */;
value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value();
return value instanceof Object ? value : value3;
function getUploadTarget(a0) { // fn#40579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:1077, offset: 0x011055a1, size: 158 bytes, params: 2, frame: 12
var value3;
var value4;
var value;
const GUILD_PRODUCT_ATTACHMENT = env0_10.GUILD_PRODUCT_ATTACHMENT;
if (GUILD_PRODUCT_ATTACHMENT === a0) {
value = importDefault(4693) /* metro dependency 4693: GuildProductAttachmentUploadTarget */;
value4 = Object.create(value.prototype, {constructor: {value: value}});
value = new value();
return value instanceof Object ? value : value4;
}
const GRAVITY_ATTACHMENT = env0_10.GRAVITY_ATTACHMENT;
if (GRAVITY_ATTACHMENT === a0) {
value = importDefault(4695) /* metro dependency 4695: ICYMIAttachmentUploadTarget */;
value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value();
return value instanceof Object ? value : value3;
}
env0_10.MESSAGE_ATTACHMENT;
const binding = env0_9;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
env0_10.MESSAGE_ATTACHMENT;
const binding = env0_9;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function value_40575(a0) { // fn#40575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4870:479, offset: 0x0110553a, size: 70 bytes, params: 2, frame: 13
let value = environment.__proto__;
const basicChannel = ChannelStore.getBasicChannel(a0);
value = undefined;
const fileUtilsModule = importAll(4655) /* metro dependency 4655: FileUtils */;
return fileUtilsModule.maxFileSize(basicChannel == null ? value : basicChannel.guild_id);
}
global.__d(_fun40570, 4692, [6, 7, 1379, 661, 4655, 4651, 4693, 4695,
2]) /* metro module 4692, dependencies: [6, 7, 1379, 661, 4655, 4651, 4693, 4695, 2] */;
+221 -211
View File
@@ -1,13 +1,17 @@
/* Metro module 4658; source: lib/uploader/UploadUtils.tsx; dependencies: [6, 7, 4650, 507, 4659, 1873, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ShimNativeModule from '../../external/discord_common/js/packages/libdiscore/js_shim/js/shim.native.tsx'; /* Metro dependency 1873 */
import * as UploadModule from './Upload.tsx'; /* Metro dependency 4650 */
function _fun40246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:6, offset: 0x010fa529, size: 180 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
let value = _fun40247();
const value2 = _fun40251();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploadUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/UploadUtils.tsx');
exports.doesImageMatchUpload = doesImageMatchUpload;
exports.calculateProgress = function(a0, a1) {
var value = 0;
@@ -16,220 +20,226 @@ function _fun40246(global, require, importDefault, importAll, module, exports, d
exports.DefaultHttpClient = value;
exports.canUploadNatively = canUploadNatively;
exports.LibdiscoreHttpClient = value2;
}
function _fun40247() { // fn#40247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:122, offset: 0x010fa5dd, size: 80 bytes, params: 1, frame: 15
return CreateClass(DefaultHttpClient, [{key: 'sliceBody', value: function(a0, a1) {
var r0;
var value = a0;
if (value instanceof global.File) {
value = value.slice(a1);
r0 = value;
} else {
r0 = value;
}
return r0;
}}, {key: 'doUpload', value: function(a0, a1) {
if (a1?.fileByteRange != null) {
a0.body = this.sliceBody(a0.body, a1.fileByteRange.start);
}
return require(dependencyMap[3]).HTTP.put(a0);
}}]);
function DefaultHttpClient() { // fn#40248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:143, offset: 0x00c618a4, size: 27 bytes, params: 1, frame: 13
env1_2(this, DefaultHttpClient);
}
function _fun40247() { // fn#40247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:122, offset: 0x010fa5dd, size: 80 bytes, params: 1, frame: 15
return env0_3(DefaultHttpClient, [{key: 'sliceBody', value: function(a0, a1) {
var r0;
var value = a0;
if (value instanceof global.File) {
value = value.slice(a1);
r0 = value;
}
function _fun40251() { // fn#40251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:448, offset: 0x010fa6be, size: 55 bytes, params: 1, frame: 14
return CreateClass(LibdiscoreHttpClient, [{key: 'doUpload', value: value_40253}]);
function LibdiscoreHttpClient() { // fn#40252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:469, offset: 0x010fa6f5, size: 96 bytes, params: 1, frame: 14
let value = environment.__proto__;
env1_2(this, LibdiscoreHttpClient);
value = require(1873) /* metro dependency 1873: shimNative */;
if (value.isLibdiscoreInitialized()) {
return undefined;
}
const Error = global.Error;
throw new Error('Libdiscore is not loaded');
}
function value_40253(a0, a1) { // fn#40253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:637, offset: 0x010fa755, size: 426 bytes, params: 3, frame: 20
var environment;
var r1;
var value5;
let env0_0 = a0;
let value = environment.__proto__;
value = undefined;
const httpClientAPI = (ShimNativeModule).getHttpClientAPI();
if (httpClientAPI == null) {
throw new global.Error('Libdiscore client is not available');
}
let body = a0.body;
let uri = body == null ? value : body.uri;
if (value !== uri && typeof a0.body.uri === 'string') {
body = a0.body;
uri = body.uri;
value5 = uri.startsWith('file://');
body = a0.body;
uri = body.uri;
r1 = value5 ? uri.slice(7) : uri;
} else {
r1 = value;
}
if (value === r1) {
throw new global.Error('No file path found in request body');
}
if (r1 === '') {
throw new global.Error('No file path found in request body');
}
let env0_2 = httpClientAPI.httpRequest(a0.url, {method: 'PUT', body: {path: r1,
byteRangeStart: a1 == null || a1.fileByteRange == null ? value : a1.fileByteRange.start,
byteRangeEnd: a1 == null || a1.fileByteRange == null ? value : a1.fileByteRange.end}, headers: a0.headers});
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
var closure = _fun40255;
var env0_2 = closure;
closure();
});
return promise instanceof Object ? promise : value;
function _fun40254(a0, a1) { // fn#40254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1196, offset: 0x010fa8ff, size: 33 bytes, params: 3, frame: 9
const env0_0 = a0;
const env0_1 = a1;
pollStatus();
function pollStatus() { // fn#40255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1219, offset: 0x010fa920, size: 491 bytes, params: 1, frame: 18
var binding;
var httpRequestStatus;
var Error;
var error;
var object;
var response;
var value5;
const value = environment.__proto__;
const signal = env1_0.signal;
if (signal == null) {
httpRequestStatus = env1_1.getHttpRequestStatus(env1_2);
} else {
if (signal.aborted) {
Error = global.Error;
value5 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('Request cancelled');
require(error instanceof Object ? error : value5);
env1_1.cancelHttpRequest(env1_2);
return undefined;
}
httpRequestStatus = env1_1.getHttpRequestStatus(env1_2);
}
const value3 = undefined;
if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'success') {
binding = env0_0;
object = {};
response = httpRequestStatus.response;
object.status = response == null ? value3 : response.status;
response = httpRequestStatus.response;
object.headers = response == null ? value3 : response.headers;
response = httpRequestStatus.response;
object.text = response == null ? value3 : response.body;
binding(object);
} else if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'error') {
Error = global.Error;
error = httpRequestStatus.error;
error = new Error();
require(error);
} else if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'progressing') {
if (value3 !== env1_0.onRequestProgress) {
if (httpRequestStatus.uploaded_bytes != null) {
if (httpRequestStatus.uploaded_bytes > 0) {
env1_0.onRequestProgress({loaded: httpRequestStatus.uploaded_bytes,
total: httpRequestStatus.total_bytes});
}
}
}
global.setTimeout(pollStatus, 50);
} else {
require(new global.Error('Unknown upload status'));
}
return value3;
}
}
}
}
function doesImageMatchUpload(a0, a1) { // fn#40256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1993, offset: 0x010fab0b, size: 176 bytes, params: 3, frame: 15
var item;
const UploadPlatform = (UploadModule).UploadPlatform;
var filename;
var originalUri;
if (a1.id === a0.uri) {
return true;
}
if (a1.id == null) {
item = a1.item;
if (item.platform === UploadPlatform.REACT_NATIVE) {
item = a1.item;
filename = a0.filename;
originalUri = item.originalUri;
if (originalUri === a0.uri) {
return true;
}
if (filename == null) {
return false;
}
originalUri = item.originalUri;
if (originalUri == null) {
return false;
}
if (originalUri.includes(filename)) {
return true;
}
return false;
}
} else {
if (a1.id === a0.id) {
return true;
}
item = a1.item;
if (item.platform === UploadPlatform.REACT_NATIVE) {
item = a1.item;
filename = a0.filename;
originalUri = item.originalUri;
if (originalUri === a0.uri) {
return true;
}
if (filename == null) {
return false;
}
originalUri = item.originalUri;
if (originalUri == null) {
return false;
}
if (originalUri.includes(filename)) {
return true;
}
return false;
}
}
return false;
}
function canUploadNatively(a0) { // fn#40258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:2423, offset: 0x010fabf8, size: 138 bytes, params: 2, frame: 15
var moduleValue;
const platform = a0.platform;
var value;
const UploadPlatform = (UploadModule).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
let r0 = platform === REACT_NATIVE && a0.uri != null;
if (r0) {
moduleValue = require(4659) /* metro dependency 4659: AttachmentFileNative */;
r0 = moduleValue.fileIsInAppDir(a0.uri);
}
if (r0) {
value = require(1873) /* metro dependency 1873: shimNative */;
value = value.isLibdiscoreInitialized();
r0 = value;
}
return r0;
}}, {key: 'doUpload', value: function(a0, a1) {
if (a1?.fileByteRange != null) {
a0.body = this.sliceBody(a0.body, a1.fileByteRange.start);
}
return require(dependencyMap[3]).HTTP.put(a0);
}}]);
}
function _fun40251() { // fn#40251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:448, offset: 0x010fa6be, size: 55 bytes, params: 1, frame: 14
return env0_3(LibdiscoreHttpClient, [{key: 'doUpload', value: value_40253}]);
}
function doesImageMatchUpload(a0, a1) { // fn#40256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1993, offset: 0x010fab0b, size: 176 bytes, params: 3, frame: 15
var item;
const UploadPlatform = (require(4650) /* metro dependency 4650: Upload */).UploadPlatform;
var filename;
var originalUri;
if (a1.id === a0.uri) {
return true;
}
if (a1.id == null) {
item = a1.item;
if (item.platform === UploadPlatform.REACT_NATIVE) {
item = a1.item;
filename = a0.filename;
originalUri = item.originalUri;
if (originalUri === a0.uri) {
return true;
}
if (filename == null) {
return false;
}
originalUri = item.originalUri;
if (originalUri == null) {
return false;
}
if (originalUri.includes(filename)) {
return true;
}
return false;
}
} else {
if (a1.id === a0.id) {
return true;
}
item = a1.item;
if (item.platform === UploadPlatform.REACT_NATIVE) {
item = a1.item;
filename = a0.filename;
originalUri = item.originalUri;
if (originalUri === a0.uri) {
return true;
}
if (filename == null) {
return false;
}
originalUri = item.originalUri;
if (originalUri == null) {
return false;
}
if (originalUri.includes(filename)) {
return true;
}
return false;
}
}
return false;
}
function canUploadNatively(a0) { // fn#40258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:2423, offset: 0x010fabf8, size: 138 bytes, params: 2, frame: 15
var moduleValue;
const platform = a0.platform;
var value;
const UploadPlatform = (require(4650) /* metro dependency 4650: Upload */).UploadPlatform;
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
let r0 = platform === REACT_NATIVE && a0.uri != null;
if (r0) {
moduleValue = require(4659) /* metro dependency 4659: AttachmentFileNative */;
r0 = moduleValue.fileIsInAppDir(a0.uri);
}
if (r0) {
value = require(1873) /* metro dependency 1873: shimNative */;
value = value.isLibdiscoreInitialized();
r0 = value;
}
return r0;
}
function LibdiscoreHttpClient() { // fn#40252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:469, offset: 0x010fa6f5, size: 96 bytes, params: 1, frame: 14
let value = environment.__proto__;
env1_2(this, LibdiscoreHttpClient);
value = require(1873) /* metro dependency 1873: shimNative */;
if (value.isLibdiscoreInitialized()) {
return undefined;
}
const Error = global.Error;
throw new Error('Libdiscore is not loaded');
}
function value_40253(a0, a1) { // fn#40253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:637, offset: 0x010fa755, size: 426 bytes, params: 3, frame: 20
var environment;
var r1;
var value5;
let env0_0 = a0;
let value = environment.__proto__;
value = undefined;
const httpClientAPI = (require(1873) /* metro dependency 1873: shimNative */).getHttpClientAPI();
if (httpClientAPI == null) {
throw new global.Error('Libdiscore client is not available');
}
let body = a0.body;
let uri = body == null ? value : body.uri;
if (value !== uri && typeof a0.body.uri === 'string') {
body = a0.body;
uri = body.uri;
value5 = uri.startsWith('file://');
body = a0.body;
uri = body.uri;
r1 = value5 ? uri.slice(7) : uri;
} else {
r1 = value;
}
if (value === r1) {
throw new global.Error('No file path found in request body');
}
if (r1 === '') {
throw new global.Error('No file path found in request body');
}
let env0_2 = httpClientAPI.httpRequest(a0.url, {method: 'PUT', body: {path: r1,
byteRangeStart: a1 == null || a1.fileByteRange == null ? value : a1.fileByteRange.start,
byteRangeEnd: a1 == null || a1.fileByteRange == null ? value : a1.fileByteRange.end}, headers: a0.headers});
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
var closure = _fun40255;
var env0_2 = closure;
closure();
});
return promise instanceof Object ? promise : value;
}
function _fun40254(a0, a1) { // fn#40254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1196, offset: 0x010fa8ff, size: 33 bytes, params: 3, frame: 9
const env0_0 = a0;
const env0_1 = a1;
pollStatus();
}
function pollStatus() { // fn#40255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4836:1219, offset: 0x010fa920, size: 491 bytes, params: 1, frame: 18
var binding;
var httpRequestStatus;
var Error;
var error;
var object2;
var response;
var value5;
const value = environment.__proto__;
const signal = env1_0.signal;
if (signal == null) {
httpRequestStatus = env1_1.getHttpRequestStatus(env1_2);
} else {
if (signal.aborted) {
Error = global.Error;
value5 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('Request cancelled');
require(error instanceof Object ? error : value5);
env1_1.cancelHttpRequest(env1_2);
return undefined;
}
httpRequestStatus = env1_1.getHttpRequestStatus(env1_2);
}
const value3 = undefined;
if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'success') {
binding = env0_0;
object2 = {};
response = httpRequestStatus.response;
object2.status = response == null ? value3 : response.status;
response = httpRequestStatus.response;
object2.headers = response == null ? value3 : response.headers;
response = httpRequestStatus.response;
object2.text = response == null ? value3 : response.body;
binding(object2);
} else if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'error') {
Error = global.Error;
error = httpRequestStatus.error;
error = new Error();
require(error);
} else if ((httpRequestStatus == null ? value3 : httpRequestStatus.status) === 'progressing') {
if (value3 !== env1_0.onRequestProgress) {
if (httpRequestStatus.uploaded_bytes != null) {
if (httpRequestStatus.uploaded_bytes > 0) {
env1_0.onRequestProgress({loaded: httpRequestStatus.uploaded_bytes,
total: httpRequestStatus.total_bytes});
}
}
}
global.setTimeout(pollStatus, 50);
} else {
require(new global.Error('Unknown upload status'));
}
return value3;
}
global.__d(_fun40246, 4658, [6, 7, 4650, 507, 4659, 1873,
2]) /* metro module 4658, dependencies: [6, 7, 4650, 507, 4659, 1873, 2] */;
File diff suppressed because it is too large. Load diff
+194 -179
View File
@@ -1,192 +1,207 @@
/* Metro module 7225; source: lib/uploader/UploaderQueue.tsx; dependencies: [5, 6, 7, 3, 2] */
import Logger from '../../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:6, offset: 0x016b7650, size: 202 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(5) /* metro dependency 5 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('UploaderQueue.tsx');
value = _fun57839();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploaderQueue.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/UploaderQueue.tsx');
exports.default = value;
}
function _fun57839() { // fn#57839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:166, offset: 0x016b771a, size: 96 bytes, params: 1, frame: 17
const binding = env0_2;
const closure = UploaderQueue;
const items2 = [{key: 'enqueue', value: value_57841}];
const env0_0Binding = env0_0(_fun57843);
items2[1] = {key: 'drainQueue', value: value_57847};
return binding(closure, items2);
}
function UploaderQueue() { // fn#57840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:187, offset: 0x016b777a, size: 45 bytes, params: 1, frame: 13
env1_1(this, UploaderQueue);
this.queue = [];
this.drainingQueue = false;
}
function value_57841(a0) { // fn#57841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:294, offset: 0x016b77a7, size: 93 bytes, params: 2, frame: 13
this.queue.unshift(a0);
const value = environment.__proto__;
const binding = env1_3;
binding.log('enqueue() - alreadying draining? ' + (this.drainingQueue ? 'yes' : 'no'));
if (!this.drainingQueue) {
this.drainQueue();
}
}
function* _fun57843() { // fn#57843, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:473, offset: 0x016b780d, size: 298 bytes, params: 1, frame: 21
var environment;
var value4;
var Promise;
var prototype;
var closure;
var promise;
var value6;
var value7;
var value8;
var id;
var value9;
var error;
var error2;
var drainQueue;
if (true) {
var env0_0;
this.drainingQueue = true;
value = environment.__proto__.__proto__;
var binding = env2_3;
var log = binding.log;
Reflect.apply(log, binding, ['drainQueue() - starting, queue length: ' + this.queue.length]);
var value3 = this.queue.pop();
if (value3 == null) {
env2_3.log('drainQueue() - No uploads left, setting drainingQueue to false');
function _fun57839() { // fn#57839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:166, offset: 0x016b771a, size: 96 bytes, params: 1, frame: 17
const UploaderQueue2 = UploaderQueue;
const items2 = [{key: 'enqueue', value: value_57841}];
const env0_0Binding = Module00005(_fun57843);
items2[1] = {key: 'drainQueue', value: value_57847};
return CreateClass(UploaderQueue2, items2);
function UploaderQueue() { // fn#57840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:187, offset: 0x016b777a, size: 45 bytes, params: 1, frame: 13
env1_1(this, UploaderQueue);
this.queue = [];
this.drainingQueue = false;
} else {
reducibleJoin3: while (true) {
reduciblePort29: while (true) {
exceptionLanding28: while (true) {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding28;
}
break reducibleJoin3;
}
binding = env2_3;
error2 = binding.error;
Reflect.apply(error2, binding, [error]);
break reduciblePort29;
}
drainQueue = this.drainQueue;
Reflect.apply(drainQueue, this, []);
return undefined;
}
try {
log = binding.log;
} catch (error) {
break exceptionLanding28;
}
try {
Reflect.apply(log, binding, ['drainQueue() - start uploader']);
} catch (error) {
break exceptionLanding28;
}
try {
value4 = value3();
} catch (error) {
break exceptionLanding28;
}
try {
env0_0 = value4;
} catch (error) {
break exceptionLanding28;
}
try {
Promise = global.Promise;
} catch (error) {
break exceptionLanding28;
}
try {
prototype = Promise.prototype;
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
closure = _fun57844;
} catch (error) {
break exceptionLanding28;
}
try {
promise = new Promise();
} catch (error) {
break exceptionLanding28;
}
try {
value6 = promise instanceof Object ? promise : undefined;
} catch (error) {
break exceptionLanding28;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding28;
}
if (value8) {
return value7;
}
try {
binding = env2_3;
} catch (error) {
break exceptionLanding28;
}
try {
log = binding.log;
} catch (error) {
break exceptionLanding28;
}
try {
id = value4.id;
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
value9 = 'drainQueue() Uploader complete - ' + id;
} catch (error) {
break exceptionLanding28;
}
try {
Reflect.apply(log, binding, [value9]);
} catch (error) {
break exceptionLanding28;
}
this.drainQueue();
}
function value_57841(a0) { // fn#57841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:294, offset: 0x016b77a7, size: 93 bytes, params: 2, frame: 13
this.queue.unshift(a0);
const value = environment.__proto__;
const binding = env1_3;
binding.log('enqueue() - alreadying draining? ' + (this.drainingQueue ? 'yes' : 'no'));
if (!this.drainingQueue) {
this.drainQueue();
}
}
function* _fun57843() { // fn#57843, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:473, offset: 0x016b780d, size: 298 bytes, params: 1, frame: 21
var environment;
var value4;
var Promise;
var prototype;
var closure;
var promise;
var value6;
var value7;
var value8;
var id;
var value9;
var error;
var error2;
var drainQueue;
if (true) {
var env0_0;
this.drainingQueue = true;
value = environment.__proto__.__proto__;
var binding = env2_3;
var log = binding.log;
Reflect.apply(log, binding, ['drainQueue() - starting, queue length: ' + this.queue.length]);
var value3 = this.queue.pop();
if (value3 == null) {
env2_3.log('drainQueue() - No uploads left, setting drainingQueue to false');
this.drainingQueue = false;
} else {
reducibleJoin3: while (true) {
reduciblePort29: while (true) {
exceptionLanding28: while (true) {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding28;
}
break reducibleJoin3;
}
binding = env2_3;
error2 = binding.error;
Reflect.apply(error2, binding, [error]);
break reduciblePort29;
}
drainQueue = this.drainQueue;
Reflect.apply(drainQueue, this, []);
return undefined;
}
try {
log = binding.log;
} catch (error) {
break exceptionLanding28;
}
try {
Reflect.apply(log, binding, ['drainQueue() - start uploader']);
} catch (error) {
break exceptionLanding28;
}
try {
value4 = value3();
} catch (error) {
break exceptionLanding28;
}
try {
env0_0 = value4;
} catch (error) {
break exceptionLanding28;
}
try {
Promise = global.Promise;
} catch (error) {
break exceptionLanding28;
}
try {
prototype = Promise.prototype;
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
closure = _fun57844;
} catch (error) {
break exceptionLanding28;
}
try {
promise = new Promise();
} catch (error) {
break exceptionLanding28;
}
try {
value6 = promise instanceof Object ? promise : undefined;
} catch (error) {
break exceptionLanding28;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding28;
}
if (value8) {
return value7;
}
try {
binding = env2_3;
} catch (error) {
break exceptionLanding28;
}
try {
log = binding.log;
} catch (error) {
break exceptionLanding28;
}
try {
id = value4.id;
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
} catch (error) {
break exceptionLanding28;
}
try {
value9 = 'drainQueue() Uploader complete - ' + id;
} catch (error) {
break exceptionLanding28;
}
try {
Reflect.apply(log, binding, [value9]);
} catch (error) {
break exceptionLanding28;
}
this.drainQueue();
}
}
function _fun57844(a0) { // fn#57844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:789, offset: 0x016b7937, size: 98 bytes, params: 2, frame: 15
const env0_0 = a0;
if (env0_0._aborted || env0_0._errored) {
a0();
}
env0_0.addListener('complete', _fun57845);
env0_0.addListener('error', _fun57846);
function _fun57845() { // fn#57845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:849, offset: 0x00cefeb4, size: 15 bytes, params: 1, frame: 9
return env0_0();
}
function _fun57846() { // fn#57846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:882, offset: 0x00cefeb4, size: 15 bytes, params: 1, frame: 9
return env0_0();
}
}
}
function value_57847() { // fn#57847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:986, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return Module00005.apply(this, arguments);
}
}
}
function _fun57844(a0) { // fn#57844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:789, offset: 0x016b7937, size: 98 bytes, params: 2, frame: 15
const env0_0 = a0;
if (env0_0._aborted || env0_0._errored) {
a0();
}
env0_0.addListener('complete', _fun57845);
env0_0.addListener('error', _fun57846);
}
global.__d(_fun57838, 7225, [5, 6, 7, 3, 2]) /* metro module 7225, dependencies: [5, 6, 7, 3, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,87 +1,92 @@
/* Metro module 4691; source: lib/uploader/native/CloudUploaderUtils.tsx; dependencies: [1949, 1226, 691, 4651, 22, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import DeveloperOptionsStore from '../../../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import LocaleStore from '../../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun40565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:6, offset: 0x011050d7, size: 183 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = getUploadPayload;
const getUploadPayload2 = getUploadPayload;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
object2 = {getUploadPayload: closure};
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/native/CloudUploaderUtils.tsx');
exports.default = object2;
object = {getUploadPayload: getUploadPayload2};
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/native/CloudUploaderUtils.tsx');
exports.default = object;
exports.prepareMessagePayload = prepareMessagePayload;
exports.getUploadPayload = closure;
}
exports.getUploadPayload = getUploadPayload2;
function _prepareMessageRequestBodyCloud(a0, a1, a2) { // fn#40566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:126, offset: 0x0110518e, size: 166 bytes, params: 4, frame: 21
var r0;
var object;
var object2;
var value;
var value2;
var items2;
const items3 = [];
a0.forEach(_fun40567);
if (a2 == null) {
object = {};
copyDataProperties(object, a1, undefined);
object['attachments'] = items3;
r0 = object;
} else if (a1 != null) {
object2 = {};
copyDataProperties(object2, a1, undefined);
value = importDefault(22) /* metro dependency 22 */;
value2 = value.get(object2, a2, []);
items2 = [];
arraySpread(items2, items3, arraySpread(items2, value2, 0, value), value);
value = importDefault(22) /* metro dependency 22 */;
value = value.set(object2, a2, items2);
r0 = value;
} else {
object = {};
copyDataProperties(object, a1, undefined);
object['attachments'] = items3;
r0 = object;
}
return r0;
function _fun40567(a0, a1) { // fn#40567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:201, offset: 0x01105234, size: 71 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = require(4651) /* metro dependency 4651: UploadUtils */;
const attachmentPayload = value.getAttachmentPayload(a0, a1);
const binding = env0_0;
const push = binding.push;
const object = {};
copyDataProperties(object, attachmentPayload, value);
Reflect.apply(push, binding, [object]);
}
function _prepareMessageRequestBodyCloud(a0, a1, a2) { // fn#40566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:126, offset: 0x0110518e, size: 166 bytes, params: 4, frame: 21
var r0;
var object3;
var object4;
var value;
var value2;
var items2;
const items3 = [];
a0.forEach(_fun40567);
if (a2 == null) {
object3 = {};
copyDataProperties(object3, a1, undefined);
object3['attachments'] = items3;
r0 = object3;
} else if (a1 != null) {
object4 = {};
copyDataProperties(object4, a1, undefined);
value = importDefault(22) /* metro dependency 22 */;
value2 = value.get(object4, a2, []);
items2 = [];
arraySpread(items2, items3, arraySpread(items2, value2, 0, value), value);
value = importDefault(22) /* metro dependency 22 */;
value = value.set(object4, a2, items2);
r0 = value;
} else {
object3 = {};
copyDataProperties(object3, a1, undefined);
object3['attachments'] = items3;
r0 = object3;
}
return r0;
}
function getUploadPayload({filename, currentSize}) { // fn#40568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:425, offset: 0x0110527b, size: 73 bytes, params: 2, frame: 12
const object2 = {};
object2.filename = filename;
object2.file_size = currentSize;
object2.id = (importDefault(22) /* metro dependency 22 */).uniqueId();
object2.original_content_type = undefined;
return object2;
}
function prepareMessagePayload(a0, a1, a2, a3) { // fn#40569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:711, offset: 0x011052c4, size: 152 bytes, params: 5, frame: 18
const value2 = _prepareMessageRequestBodyCloud(a1, a2, a3);
const object = {Authorization: a0};
const getDebugOptionsHeaderValue = DeveloperOptionsStore.getDebugOptionsHeaderValue;
object['X-Debug-Options'] = Reflect.apply(getDebugOptionsHeaderValue, DeveloperOptionsStore, []);
object['Accept-Language'] = LocaleStore.locale;
const superPropertiesBase64 = (importDefault(683) /* metro dependency 683: AnalyticsUtils */).getSuperPropertiesBase64();
if (superPropertiesBase64 != null) {
object['X-Super-Properties'] = superPropertiesBase64;
function getUploadPayload({filename, currentSize}) { // fn#40568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:425, offset: 0x0110527b, size: 73 bytes, params: 2, frame: 12
const object = {};
object.filename = filename;
object.file_size = currentSize;
object.id = (importDefault(22) /* metro dependency 22 */).uniqueId();
object.original_content_type = undefined;
return object;
}
const fingerprint = AuthenticationStore.getFingerprint();
if (fingerprint != null) {
object['X-Fingerprint'] = fingerprint;
function prepareMessagePayload(a0, a1, a2, a3) { // fn#40569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:711, offset: 0x011052c4, size: 152 bytes, params: 5, frame: 18
const value2 = _prepareMessageRequestBodyCloud(a1, a2, a3);
const object2 = {Authorization: a0};
const developerOptionsStoreBinding = DeveloperOptionsStore;
const getDebugOptionsHeaderValue = developerOptionsStoreBinding.getDebugOptionsHeaderValue;
object2['X-Debug-Options'] = Reflect.apply(getDebugOptionsHeaderValue, developerOptionsStoreBinding, []);
object2['Accept-Language'] = LocaleStore.locale;
const superPropertiesBase64 = (AnalyticsUtils).getSuperPropertiesBase64();
if (superPropertiesBase64 != null) {
object2['X-Super-Properties'] = superPropertiesBase64;
}
const fingerprint = AuthenticationStore.getFingerprint();
if (fingerprint != null) {
object2['X-Fingerprint'] = fingerprint;
}
return {headers: object2, body: value2};
}
return {headers: object, body: value2};
}
function _fun40567(a0, a1) { // fn#40567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4869:201, offset: 0x01105234, size: 71 bytes, params: 3, frame: 14
let value = environment.__proto__;
value = require(4651) /* metro dependency 4651: UploadUtils */;
const attachmentPayload = value.getAttachmentPayload(a0, a1);
const binding = env0_0;
const push = binding.push;
const object2 = {};
copyDataProperties(object2, attachmentPayload, value);
Reflect.apply(push, binding, [object2]);
}
global.__d(_fun40565, 4691, [1949, 1226, 691, 4651, 22, 683,
2]) /* metro module 4691, dependencies: [1949, 1226, 691, 4651, 22, 683, 2] */;
+105 -102
View File
@@ -1,116 +1,119 @@
/* Metro module 7226; source: lib/uploader/stageAttachmentFiles.tsx; dependencies: [5, 661, 4648, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun57848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:6, offset: 0x016b7999, size: 143 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/stageAttachmentFiles.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader/stageAttachmentFiles.tsx');
exports.default = function() {
return _stageAttachmentFiles.apply(this, arguments);
};
}
function _stageAttachmentFiles() { // fn#57849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:127, offset: 0x016b7a28, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun57851).apply(this, arguments);
}
async function _fun57851(a0) { // fn#57851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:192, offset: 0x016b7a6a, size: 100 bytes, params: 2, frame: 15
let value = a1;
if (true) {
var env0_0 = value !== undefined ? value : false;
var env0_1 = a2;
await undefined;
if (false) {
return undefined;
}
value = a0.map(function(a0) {
var env0_0 = a0;
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun57853);
return value2 instanceof Object ? value2 : value;
});
var Promise = global.Promise;
await Promise.all(value);
}
}
function _fun57852(a0) { // fn#57852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:225, offset: 0x016b7ace, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun57853);
return promise instanceof Object ? promise : value;
}
function _fun57853(a0, a1) { // fn#57853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:241, offset: 0x016b7afa, size: 482 bytes, params: 3, frame: 19
var environment;
var Error;
var value3;
var error;
var value5;
var value7;
var value8;
const env0_0 = a0;
const env0_1 = a1;
const status = env0_0.status;
let binding = env4_0;
const CloudUploadStatus = binding(env4_1[2]).CloudUploadStatus;
const NOT_STARTED = CloudUploadStatus.NOT_STARTED;
if (NOT_STARTED === status) {
env0_0.upload();
} else if (env4_0(env4_1[2]).CloudUploadStatus.COMPLETED === status) {
a0('complete');
} else if (env4_0(env4_1[2]).CloudUploadStatus.ERROR === status) {
value7 = environment.__proto__;
if (env1_0) {
error = env0_0.error;
if (error !== env4_3.ENTITY_TOO_LARGE) {
env0_0.upload();
} else {
Error = global.Error;
value8 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('File failed to upload');
a1(error instanceof Object ? error : value8);
function _stageAttachmentFiles() { // fn#57849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:127, offset: 0x016b7a28, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun57851).apply(this, arguments);
async function _fun57851(a0) { // fn#57851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:192, offset: 0x016b7a6a, size: 100 bytes, params: 2, frame: 15
let value = a1;
if (true) {
var env0_0 = value !== undefined ? value : false;
var env0_1 = a2;
await undefined;
if (false) {
return undefined;
}
value = a0.map(function(a0) {
var env0_0 = a0;
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun57853);
return value2 instanceof Object ? value2 : value;
});
var Promise = global.Promise;
await Promise.all(value);
}
} else {
Error = global.Error;
value8 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('File failed to upload');
a1(error instanceof Object ? error : value8);
function _fun57852(a0) { // fn#57852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:225, offset: 0x016b7ace, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun57853);
return promise instanceof Object ? promise : value;
function _fun57853(a0, a1) { // fn#57853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:241, offset: 0x016b7afa, size: 482 bytes, params: 3, frame: 19
var environment;
var Error;
var value3;
var error;
var value5;
var value7;
var value8;
const env0_0 = a0;
const env0_1 = a1;
const status = env0_0.status;
let binding = env4_0;
const CloudUploadStatus = binding(env4_1[2]).CloudUploadStatus;
const NOT_STARTED = CloudUploadStatus.NOT_STARTED;
if (NOT_STARTED === status) {
env0_0.upload();
} else if (env4_0(env4_1[2]).CloudUploadStatus.COMPLETED === status) {
a0('complete');
} else if (env4_0(env4_1[2]).CloudUploadStatus.ERROR === status) {
value7 = environment.__proto__;
if (env1_0) {
error = env0_0.error;
if (error !== env4_3.ENTITY_TOO_LARGE) {
env0_0.upload();
} else {
Error = global.Error;
value8 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('File failed to upload');
a1(error instanceof Object ? error : value8);
}
} else {
Error = global.Error;
value8 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('File failed to upload');
a1(error instanceof Object ? error : value8);
}
} else if (env4_0(env4_1[2]).CloudUploadStatus.CANCELED === status) {
Error = global.Error;
value5 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('Upload is canceled');
a1(error instanceof Object ? error : value5);
} else if (env4_0(env4_1[2]).CloudUploadStatus.REMOVED_FROM_MSG_DRAFT === status) {
Error = global.Error;
value3 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('Upload is removed from draft');
a1(error instanceof Object ? error : value3);
}
binding = env0_0;
binding.on('complete', _fun57854);
binding.on('error', _fun57855);
binding.on('progress', function(a0, a1) {
if (importDefault != null) {
importDefault(a0, a1);
}
});
function _fun57854() { // fn#57854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:708, offset: 0x016b7cdc, size: 20 bytes, params: 1, frame: 11
env0_0('complete');
}
function _fun57855() { // fn#57855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:744, offset: 0x016b7cf0, size: 85 bytes, params: 1, frame: 15
const Error = global.Error;
let value = environment.__proto__;
value = 'File ' + env1_0.id + ' failed to upload';
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
require(error instanceof Object ? error : value2);
}
}
}
}
} else if (env4_0(env4_1[2]).CloudUploadStatus.CANCELED === status) {
Error = global.Error;
value5 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('Upload is canceled');
a1(error instanceof Object ? error : value5);
} else if (env4_0(env4_1[2]).CloudUploadStatus.REMOVED_FROM_MSG_DRAFT === status) {
Error = global.Error;
value3 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('Upload is removed from draft');
a1(error instanceof Object ? error : value3);
}
binding = env0_0;
binding.on('complete', _fun57854);
binding.on('error', _fun57855);
binding.on('progress', function(a0, a1) {
if (importDefault != null) {
importDefault(a0, a1);
}
});
}
function _fun57854() { // fn#57854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:708, offset: 0x016b7cdc, size: 20 bytes, params: 1, frame: 11
env0_0('complete');
}
function _fun57855() { // fn#57855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7404:744, offset: 0x016b7cf0, size: 85 bytes, params: 1, frame: 15
const Error = global.Error;
let value = environment.__proto__;
value = 'File ' + env1_0.id + ' failed to upload';
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
require(error instanceof Object ? error : value2);
}
global.__d(_fun57848, 7226, [5, 661, 4648, 2]) /* metro module 7226, dependencies: [5, 661, 4648, 2] */;
File diff suppressed because it is too large. Load diff
+152 -145
View File
@@ -1,160 +1,165 @@
/* Metro module 7618; source: lib/uploader_inline/InlineUploader.tsx; dependencies: [5, 6, 7, 4680, 7619, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun61016(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:6, offset: 0x017183d8, size: 170 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = RegExp('^[a-f0-9]{32}$', '');
const value = _fun61017();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader_inline/InlineUploader.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader_inline/InlineUploader.tsx');
exports.default = value;
}
function _fun61017() { // fn#61017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:152, offset: 0x01718482, size: 151 bytes, params: 1, frame: 18
const closure = InlineUploader;
const binding = env0_5;
const env0_0 = env0_3(_fun61021);
return binding(closure, [{key: 'getOriginalMd5', value: function() {
return this.originalMd5Promise;
}}, {key: 'buildHeaders', value: value_61022}], [{key: 'fromBlob', value: value_61023}, {key: 'buildHeadersForMd5',
value: value_61025}]);
}
function InlineUploader(a0, a1) { // fn#61018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:163, offset: 0x01718519, size: 45 bytes, params: 3, frame: 13
env1_4(this, InlineUploader);
this.surface = a0;
this.originalMd5Promise = a1;
}
function* _fun61021(a0) { // fn#61021, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:385, offset: 0x0171855a, size: 57 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__;
const buildHeadersForMd5 = importDefault.buildHeadersForMd5;
yield this.originalMd5Promise;
value = undefined;
if (false) {
return value;
}
return Reflect.apply(buildHeadersForMd5, importDefault, [value, a0]);
}
function value_61023(a0, a1) { // fn#61023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:557, offset: 0x01718593, size: 89 bytes, params: 3, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(4680) /* metro dependency 4680: DiscordMd5 */;
value = value.fromBlob(a1);
value = value.catch(function() {
return null;
});
const value2 = Object.create(InlineUploader.prototype, {constructor: {value: InlineUploader}});
const inlineUploader = new InlineUploader(a0);
return inlineUploader instanceof Object ? inlineUploader : value2;
}
function value_61025(a0, a1) { // fn#61025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:672, offset: 0x017185ec, size: 80 bytes, params: 3, frame: 16
var environment;
var r0;
var object2;
let value = a1;
const value2 = serializeOriginalMd5Header(a0);
if (value2 == null) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
value = environment.__proto__;
object2[(require(7619) /* metro dependency 7619: originalMd5Header */).ORIGINAL_MD5_HEADER] = value2;
r0 = object2;
}
return r0;
}
function serializeOriginalMd5Header(a0) { // fn#61026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:692, owner: value_61025.serializeOriginalMd5Header, offset: 0x0171863c, size: 224 bytes, params: 2, frame: 21
var environment;
var r4;
var r1;
var property;
var property2;
var value6;
var binding;
var value7;
var value8;
var value9;
let value = a0;
let value2 = null;
if (value2 == value) {
return value2;
}
if (typeof value === 'string') {
value9 = environment.__proto__.__proto__;
binding = env2_6;
return binding.test(value) ? value : value2;
}
const items2 = [];
const Object = global.Object;
let value3 = Object.keys(value);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r4 = value4;
while (true) {
property = value3[r4];
property2 = value[property];
value6 = value2 != property2;
if (value6) {
binding = env2_6;
value7 = binding.test(property2);
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
continue;
}
items2.push([property, property2]);
value8 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value3.length;
if (value8 < length) {
r4 = value8;
continue;
}
break;
function _fun61017() { // fn#61017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:152, offset: 0x01718482, size: 151 bytes, params: 1, frame: 18
const InlineUploader2 = InlineUploader;
const env0_0 = Module00005(_fun61021);
return CreateClass(InlineUploader2, [{key: 'getOriginalMd5', value: function() {
return this.originalMd5Promise;
}}, {key: 'buildHeaders', value: value_61022}], [{key: 'fromBlob', value: value_61023}, {key: 'buildHeadersForMd5',
value: value_61025}]);
function InlineUploader(a0, a1) { // fn#61018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:163, offset: 0x01718519, size: 45 bytes, params: 3, frame: 13
env1_4(this, InlineUploader);
this.surface = a0;
this.originalMd5Promise = a1;
}
}
if (value4 === items2.length) {
r1 = value2;
} else {
items2.sort(function(a0, a1) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (!value2) {
item2.return();
function* _fun61021(a0) { // fn#61021, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:385, offset: 0x0171855a, size: 57 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
iterator = a1[Symbol.iterator]();
var item3 = iterator.next();
item = item3.value;
item3 = item3.done ? undefined : iterator;
var value3 = item3 === value;
var r2 = value3 ? value : item;
if (!value3) {
item3.return();
value = environment.__proto__;
const buildHeadersForMd5 = importDefault.buildHeadersForMd5;
yield this.originalMd5Promise;
value = undefined;
if (false) {
return value;
}
return r1 < r2 ? -1 : r1 > r2 ? 1 : 0;
});
value = items2.map(_fun61028);
value = value.join(', ');
r1 = value;
return Reflect.apply(buildHeadersForMd5, importDefault, [value, a0]);
}
function value_61022() { // fn#61022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:475, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function value_61023(a0, a1) { // fn#61023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:557, offset: 0x01718593, size: 89 bytes, params: 3, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(4680) /* metro dependency 4680: DiscordMd5 */;
value = value.fromBlob(a1);
value = value.catch(function() {
return null;
});
const value2 = Object.create(InlineUploader.prototype, {constructor: {value: InlineUploader}});
const inlineUploader = new InlineUploader(a0);
return inlineUploader instanceof Object ? inlineUploader : value2;
}
function value_61025(a0, a1) { // fn#61025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:672, offset: 0x017185ec, size: 80 bytes, params: 3, frame: 16
var environment;
var r0;
var object;
let value = a1;
const value2 = serializeOriginalMd5Header(a0);
if (value2 == null) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, undefined);
value = environment.__proto__;
object[(require(7619) /* metro dependency 7619: originalMd5Header */).ORIGINAL_MD5_HEADER] = value2;
r0 = object;
}
return r0;
function serializeOriginalMd5Header(a0) { // fn#61026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:692, owner: value_61025.serializeOriginalMd5Header, offset: 0x0171863c, size: 224 bytes, params: 2, frame: 21
var environment;
var r4;
var r1;
var property;
var property2;
var value6;
var binding;
var value7;
var value8;
var value9;
let value = a0;
let value2 = null;
if (value2 == value) {
return value2;
}
if (typeof value === 'string') {
value9 = environment.__proto__.__proto__;
binding = env2_6;
return binding.test(value) ? value : value2;
}
const items2 = [];
const Object = global.Object;
let value3 = Object.keys(value);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r4 = value4;
while (true) {
property = value3[r4];
property2 = value[property];
value6 = value2 != property2;
if (value6) {
binding = env2_6;
value7 = binding.test(property2);
r1 = value7;
} else {
r1 = value6;
}
if (!r1) {
continue;
}
items2.push([property, property2]);
value8 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = value3.length;
if (value8 < length) {
r4 = value8;
continue;
}
break;
}
}
if (value4 === items2.length) {
r1 = value2;
} else {
items2.sort(function(a0, a1) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
iterator = a1[Symbol.iterator]();
var item3 = iterator.next();
item = item3.value;
item3 = item3.done ? undefined : iterator;
var value3 = item3 === value;
var r2 = value3 ? value : item;
if (!value3) {
item3.return();
}
return r1 < r2 ? -1 : r1 > r2 ? 1 : 0;
});
value = items2.map(_fun61028);
value = value.join(', ');
r1 = value;
}
return r1;
}
}
}
return r1;
}
function _fun61028(a0) { // fn#61028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7796:971, offset: 0x0171877a, size: 109 bytes, params: 2, frame: 18
@@ -196,3 +201,5 @@ function _fun61028(a0) { // fn#61028, source: /ci/build/discord/discord/discord_
return '' + r1.toLowerCase() + '="' + r5 + '"';
}
global.__d(_fun61016, 7618, [5, 6, 7, 4680, 7619,
2]) /* metro module 7618, dependencies: [5, 6, 7, 4680, 7619, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 7619; source: lib/uploader_inline/originalMd5Header.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun61029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7797:6, offset: 0x017187e7, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader_inline/originalMd5Header.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader_inline/originalMd5Header.tsx');
exports.ORIGINAL_MD5_HEADER = 'X-Discord-Original-MD5';
}
global.__d(_fun61029, 7619, [2]) /* metro module 7619, dependencies: [2] */;
@@ -1,49 +1,52 @@
/* Metro module 7615; source: lib/uploader_inline/safetyScannedUploadSurfaces.tsx; dependencies: [7616, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ImageCroppingConstantsModule from '../../modules/image_cropping/web/ImageCroppingConstants.tsx'; /* Metro dependency 7616 */
function _fun61011(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7793:6, offset: 0x01717e6e, size: 221 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(7616) /* metro dependency 7616: ImageCroppingConstants */).UploadTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader_inline/safetyScannedUploadSurfaces.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/uploader_inline/safetyScannedUploadSurfaces.tsx');
exports.SafetyScannedUploadSurface = {USER_DEFAULT_PROFILE_AVATAR: 'USER_DEFAULT_PROFILE_AVATAR',
USER_DEFAULT_PROFILE_BANNER: 'USER_DEFAULT_PROFILE_BANNER',
USER_GUILD_PROFILE_AVATAR: 'USER_GUILD_PROFILE_AVATAR', USER_GUILD_PROFILE_BANNER: 'USER_GUILD_PROFILE_BANNER',
GUILD_ICON: 'GUILD_ICON', GUILD_BANNER: 'GUILD_BANNER', GUILD_DISCOVERY_SPLASH: 'GUILD_DISCOVERY_SPLASH',
GUILD_INVITE_SPLASH: 'GUILD_INVITE_SPLASH', EMOJI: 'EMOJI', STICKER: 'STICKER'};
exports.getSafetyScannedUploadSurfaceForProfileCustomization = getSafetyScannedUploadSurfaceForProfileCustomization;
function getSafetyScannedUploadSurfaceForProfileCustomization(a0, a1) { // fn#61012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7793:735, offset: 0x01717f4b, size: 192 bytes, params: 3, frame: 4
const AVATAR = UploadTypes.AVATAR;
if (AVATAR === a0) {
return a1 != null ? env0_1.USER_GUILD_PROFILE_AVATAR : env0_1.USER_DEFAULT_PROFILE_AVATAR;
}
const BANNER = UploadTypes.BANNER;
if (BANNER === a0) {
return a1 != null ? env0_1.USER_GUILD_PROFILE_BANNER : env0_1.USER_DEFAULT_PROFILE_BANNER;
}
const GUILD_BANNER = UploadTypes.GUILD_BANNER;
if (GUILD_BANNER === a0) {
return null;
}
const VIDEO_BACKGROUND = UploadTypes.VIDEO_BACKGROUND;
if (VIDEO_BACKGROUND === a0) {
return null;
}
const SCHEDULED_EVENT_IMAGE = UploadTypes.SCHEDULED_EVENT_IMAGE;
if (SCHEDULED_EVENT_IMAGE === a0) {
return null;
}
const HOME_HEADER = UploadTypes.HOME_HEADER;
if (HOME_HEADER === a0) {
return null;
}
const AVATAR_DECORATION = UploadTypes.AVATAR_DECORATION;
if (AVATAR_DECORATION === a0) {
return null;
}
const GUILD_ICON = UploadTypes.GUILD_ICON;
if (GUILD_ICON === a0) {
return null;
}
}
}
function getSafetyScannedUploadSurfaceForProfileCustomization(a0, a1) { // fn#61012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7793:735, offset: 0x01717f4b, size: 192 bytes, params: 3, frame: 4
const AVATAR = UploadTypes.AVATAR;
if (AVATAR === a0) {
return a1 != null ? env0_1.USER_GUILD_PROFILE_AVATAR : env0_1.USER_DEFAULT_PROFILE_AVATAR;
}
const BANNER = UploadTypes.BANNER;
if (BANNER === a0) {
return a1 != null ? env0_1.USER_GUILD_PROFILE_BANNER : env0_1.USER_DEFAULT_PROFILE_BANNER;
}
const GUILD_BANNER = UploadTypes.GUILD_BANNER;
if (GUILD_BANNER === a0) {
return null;
}
const VIDEO_BACKGROUND = UploadTypes.VIDEO_BACKGROUND;
if (VIDEO_BACKGROUND === a0) {
return null;
}
const SCHEDULED_EVENT_IMAGE = UploadTypes.SCHEDULED_EVENT_IMAGE;
if (SCHEDULED_EVENT_IMAGE === a0) {
return null;
}
const HOME_HEADER = UploadTypes.HOME_HEADER;
if (HOME_HEADER === a0) {
return null;
}
const AVATAR_DECORATION = UploadTypes.AVATAR_DECORATION;
if (AVATAR_DECORATION === a0) {
return null;
}
const GUILD_ICON = UploadTypes.GUILD_ICON;
if (GUILD_ICON === a0) {
return null;
}
}
global.__d(_fun61011, 7615, [7616, 2]) /* metro module 7615, dependencies: [7616, 2] */;
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,8 +1,10 @@
/* Metro module 12388; source: lib/zipWithNext.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun94365(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12574:6, offset: 0x021152ff, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/zipWithNext.tsx');
(FileImportTrackerModule).fileFinishedImporting('lib/zipWithNext.tsx');
exports.default = function(a0, a1) {
var r3;
var r4;
@@ -31,3 +33,4 @@ function _fun94365(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun94365, 12388, [2]) /* metro module 12388, dependencies: [2] */;