Files
discord-decomp/sources/by-id/module-00918.js
T
2026-07-28 01:06:53 +03:00

384 lines
18 KiB
JavaScript

/* Metro module 918; source: unknown; dependencies: [65, 895, 832, 833, 839, 896, 841] */
import * as Module00065Module from './module-00065.js'; /* Metro dependency 65 */
import * as DEBUG_BUILDModule from './module-00832-DEBUG_BUILD.js'; /* Metro dependency 832 */
import * as Module00833Module from './module-00833.js'; /* Metro dependency 833 */
import * as Module00841Module from './module-00841.js'; /* Metro dependency 841 */
import * as Module00895Module from './module-00895.js'; /* Metro dependency 895 */
function _fun9827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:6, offset: 0x00d73262, size: 351 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
object = [RegExp('^Script error\\.?$', ''), RegExp('^Javascript error: Script error\\.? on line 0$', ''),
RegExp('^ResizeObserver loop completed with undelivered notifications.$', ''),
RegExp('^Cannot redefine property: googletag$', ''), RegExp("^Can't find variable: gmo$", ''),
RegExp("^undefined is not an object \\(evaluating 'a\\.[A-Z]'\\)$", ''),
'can\'t redefine non-configurable property "solana"',
"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)",
"Can't find variable: _AutofillCallbackHandler",
RegExp('^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$',
''), RegExp('^Java exception was raised during method invocation$', '')];
let value = Module00895Module;
value = value.defineIntegration(function() {
var env0_1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return {name: 'EventFilters', setup: _fun9833, processEvent: _fun9834};
});
const value3 = (Module00895Module).defineIntegration(_fun9840);
exports.eventFiltersIntegration = value;
exports.inboundFiltersIntegration = value3;
function _mergeOptions() { // fn#9828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:3081, offset: 0x00d733c1, size: 347 bytes, params: 1, frame: 22
const r2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const r1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
const object = {};
const items2 = [];
object.allowUrls = items2.concat(Module00065Module(r2.allowUrls || []), Module00065Module(r1.allowUrls || []));
const items4 = [];
object.denyUrls = items4.concat(Module00065Module(r2.denyUrls || []), Module00065Module(r1.denyUrls || []));
const items7 = [];
object.ignoreErrors = items7.concat(Module00065Module(r2.ignoreErrors || []), Module00065Module(r1.ignoreErrors || []),
Module00065Module(r2.disableErrorDefaults ? [] : env0_3));
const items11 = [];
object.ignoreTransactions = items11.concat(Module00065Module(r2.ignoreTransactions || []), Module00065Module(r1.ignoreTransactions || []));
return object;
}
function _getEventFilterUrl(a0) { // fn#9829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:3538, offset: 0x00d7351c, size: 276 bytes, params: 2, frame: 20
var environment;
var values;
var r4;
var frames;
var r1;
var value2;
var binding;
var exception;
var value3;
var value4;
var value5;
var value6;
var value7;
var closure;
var value8;
var value9;
var stacktrace;
var value10;
var value11;
var error;
var DEBUG_BUILD;
var debug;
let value = undefined;
try {
value2 = environment;
binding = Module00065Module;
exception = a0.exception;
value3 = null;
value4 = value3 == exception;
values = value4 ? value : exception.values;
value5 = value3 != values;
r4 = value5 ? values : [];
value6 = binding(r4);
value7 = value6.reverse();
closure = function(a0) {
var property = a0.mechanism;
var value = undefined;
return value === (property == null ? value : property.parent_id) && (a0.stacktrace == null || a0.stacktrace.frames == null ? value : a0.stacktrace.frames.length);
};
value8 = value7.find(closure);
value9 = value3 == value8;
if (value9) {
frames = value;
} else {
stacktrace = value8.stacktrace;
value10 = value3 == stacktrace;
frames = value10 ? value : stacktrace.frames;
}
if (frames) {
closure = _getLastValidUrl;
value11 = closure(frames);
r1 = value11;
} else {
r1 = value3;
}
} catch (error) {
DEBUG_BUILD = (require(832) /* metro dependency 832 */).DEBUG_BUILD;
if (DEBUG_BUILD) {
debug = (require(833) /* metro dependency 833 */).debug;
error = debug.error;
value = require(839) /* metro dependency 839 */;
value = value.getEventDescription(a0);
Reflect.apply(error, debug, ['Cannot extract url for event ' + value]);
}
return null;
}
return r1;
}
function _fun9832() { // fn#9832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:799, offset: 0x00d736e9, size: 69 bytes, params: 1, frame: 5
const env0_1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return {name: 'EventFilters', setup: setup_9833, processEvent: processEvent_9834};
function setup_9833(a0) { // fn#9833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:909, offset: 0x00d7372e, size: 41 bytes, params: 2, frame: 14
env0_0 = _mergeOptions(env0_1, a0.getOptions());
}
function processEvent_9834(a0, a1, a2) { // fn#9834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:983, offset: 0x00d73757, size: 78 bytes, params: 4, frame: 15
var environment;
var options;
var value4;
const value = a0;
if (!env0_0) {
options = a2.getOptions();
value4 = environment.__proto__;
env0_0 = _mergeOptions(env0_1, options);
}
return _shouldDropEvent(value, env0_0) ? null : value;
function _shouldDropEvent(a0, a1) { // fn#9835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:1068, owner: processEvent_9834._shouldDropEvent, offset: 0x00d737a5, size: 966 bytes, params: 3, frame: 21
var environment;
var r3;
var r2;
var r1;
var r0;
var value;
var value2;
var value4;
var value5;
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
const debug = (Module00833Module).debug;
var warn;
var ignoreTransactions;
var transaction;
if (a0.type) {
if (a0.type !== 'transaction') {
return false;
}
ignoreTransactions = a1.ignoreTransactions;
value = false;
if (ignoreTransactions == null) {
r0 = value;
} else if (ignoreTransactions.length) {
transaction = a0.transaction;
value = !!transaction;
if (transaction) {
value = environment.__proto__.__proto__;
value = require(841) /* metro dependency 841 */;
value = value.stringMatchesSomePattern(transaction, ignoreTransactions);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
if (DEBUG_BUILD) {
warn = debug.warn;
value = require(839) /* metro dependency 839 */;
value = value.getEventDescription(a0);
Reflect.apply(warn, debug,
['Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ' + value]);
}
return true;
}
return false;
}
if (_isIgnoredError(a0, a1.ignoreErrors)) {
value = environment.__proto__.__proto__;
if (DEBUG_BUILD) {
warn = debug.warn;
value = require(839) /* metro dependency 839 */;
value = value.getEventDescription(a0);
Reflect.apply(warn, debug,
['Event dropped due to being matched by `ignoreErrors` option.\nEvent: ' + value]);
}
return true;
}
if (((a0) => {
var property = a0.exception;
if (property != null) {
property = property.values;
if (property == null) {
return false;
}
if (property.length) {
return !a0.message && !a0.exception.values.some(_fun9839);
}
}
return false;
})(a0)) {
value = environment.__proto__.__proto__;
if (DEBUG_BUILD) {
warn = debug.warn;
value = require(839) /* metro dependency 839 */;
value = value.getEventDescription(a0);
Reflect.apply(warn, debug,
['Event dropped due to not having an error message, error type or stacktrace.\nEvent: ' + value]);
}
return true;
}
const denyUrls = a1.denyUrls;
value = false;
if (denyUrls == null) {
r2 = value;
} else if (denyUrls.length) {
value = environment.__proto__.__proto__;
value2 = _getEventFilterUrl(a0);
if (value2) {
value = require(841) /* metro dependency 841 */;
value = value.stringMatchesSomePattern(value2, denyUrls);
r3 = value;
} else {
r3 = !!value2;
}
r2 = r3;
} else {
r2 = value;
}
if (r2) {
value = environment.__proto__.__proto__;
if (DEBUG_BUILD) {
debug.warn('Event dropped due to being matched by `denyUrls` option.\nEvent: ' + (require(839) /* metro dependency 839 */).getEventDescription(a0) + '.\nUrl: ' + _getEventFilterUrl(a0));
}
return true;
}
const allowUrls = a1.allowUrls;
value = true;
if (allowUrls == null) {
r2 = value;
} else if (allowUrls.length) {
value4 = environment.__proto__.__proto__;
value5 = _getEventFilterUrl(a0);
r2 = value5 ? (require(841) /* metro dependency 841 */).stringMatchesSomePattern(value5, allowUrls) : !value5;
} else {
r2 = value;
}
if (r2) {
return false;
}
if (DEBUG_BUILD) {
debug.warn('Event dropped due to not being matched by `allowUrls` option.\nEvent: ' + (require(839) /* metro dependency 839 */).getEventDescription(a0) + '.\nUrl: ' + _getEventFilterUrl(a0));
}
return value;
function _isIgnoredError(a0, a1) { // fn#9836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:1470, owner: processEvent_9834._shouldDropEvent._isIgnoredError, offset: 0x00d73b6b, size: 84 bytes, params: 3, frame: 12
var environment;
var value;
const env0_0 = a1;
if (a1 != null) {
if (a1.length) {
value = environment.__proto__.__proto__.__proto__;
value = require(896) /* metro dependency 896 */;
value = value.getPossibleEventMessages(a0);
return value.some(_fun9837);
}
}
return false;
function _fun9837(a0) { // fn#9837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:1580, offset: 0x00d73bbf, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__;
return (Module00841Module).stringMatchesSomePattern(a0, require);
}
}
function _isUselessError(a0) { // fn#9838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:1820, owner: processEvent_9834._shouldDropEvent._isUselessError, offset: 0x00d73bf0, size: 81 bytes, params: 2, frame: 12
const exception = a0.exception;
if (exception != null) {
var values = exception.values;
if (values == null) {
return false;
}
if (values.length) {
return !a0.message && !a0.exception.values.some(function(a0) {
var r0;
r0 = a0.stacktrace || a0.type && a0.type !== 'Error';
r0 = !r0 ? a0.value : r0;
return r0;
});
}
}
return false;
}
}
}
}
function _fun9840() { // fn#9840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:2949, offset: 0x00d73c6f, size: 77 bytes, params: 1, frame: 15
const r1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const Object = global.Object;
return Object.assign({}, env0_4(r1), {name: 'InboundFilters'});
}
}
function _getLastValidUrl() { // fn#9831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:3860, owner: _getEventFilterUrl._getLastValidUrl, offset: 0x00d7367b, size: 110 bytes, params: 1, frame: 7
var r4;
var r3;
var filename;
var value;
var property;
reducibleJoin4: while (true) {
reducibleJoin2: while (true) {
if (arguments.length > 0) {
if (arguments[0] !== undefined) {
value = arguments[0];
r4 = value;
break reducibleJoin4;
}
break reducibleJoin2;
}
break reducibleJoin2;
}
r4 = [];
break reducibleJoin4;
}
value = r4.length - 1;
if (value >= 0) {
r3 = value;
reducibleLoop5: while (true) {
property = r4[r3];
if (property) {
filename = property.filename;
reducibleJoin8: while (true) {
if (filename === '<anonymous>') {
break reducibleJoin8;
}
filename = property.filename;
if (filename !== '[native code]') {
break reducibleLoop5;
}
break reducibleJoin8;
}
}
value = typeof r3 === 'bigint' ? r3 - 1n : +r3 - 1;
if (!(value >= 0)) {
return null;
}
r3 = value;
continue reducibleLoop5;
}
filename = property.filename;
reducibleJoin12: while (true) {
if (filename) {
break reducibleJoin12;
}
value = null;
filename = value;
break reducibleJoin12;
}
return filename;
}
return null;
}
function _fun9839(a0) { // fn#9839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1045:1963, offset: 0x00d73c41, size: 46 bytes, params: 2, frame: 5
let r0 = a0.stacktrace || a0.type && a0.type !== 'Error';
r0 = !r0 ? a0.value : r0;
return r0;
}
global.__d(_fun9827, 918, [65, 895, 832, 833, 839, 896,
841]) /* metro module 918, dependencies: [65, 895, 832, 833, 839, 896, 841] */;