168 lines
7.9 KiB
React
168 lines
7.9 KiB
React
/* Metro module 1038; source: unknown; dependencies: [6, 7, 15, 17, 102, 18, 1036, 826, 1039] */
|
|
function _fun11017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:6, offset: 0x00d9e6ad, size: 222 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const closure = applyDefaultOptions;
|
|
const env0_2 = require(6) /* metro dependency 6 */;
|
|
const env0_3 = require(7) /* metro dependency 7 */;
|
|
const env0_4 = require(15) /* metro dependency 15 */;
|
|
const env0_5 = require(17) /* metro dependency 17 */;
|
|
const env0_6 = require(102) /* metro dependency 102 */;
|
|
const env0_7 = require(18) /* metro dependency 18 */;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const Client = (require(826) /* metro dependency 826 */).Client;
|
|
exports.BrowserClient = _fun11022(Client);
|
|
exports.applyDefaultOptions = closure;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_11018() { // fn#11018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:102, offset: 0x00d9e78b, 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_11018_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function applyDefaultOptions(a0) { // fn#11021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:2207, offset: 0x00d9e7e9, size: 116 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var value;
|
|
var SENTRY_RELEASE;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
if (typeof global.__SENTRY_RELEASE__ === 'string') {
|
|
r0 = global.__SENTRY_RELEASE__;
|
|
} else {
|
|
value = undefined;
|
|
SENTRY_RELEASE = (require(1036) /* metro dependency 1036 */).WINDOW.SENTRY_RELEASE;
|
|
r0 = SENTRY_RELEASE == null ? value : SENTRY_RELEASE.id;
|
|
}
|
|
return Reflect.apply(assign, Object, [{'release': null, 'sendClientReports': true,
|
|
'parentSpanIsAlwaysRootSpan': true, release: r0}, a0]);
|
|
}
|
|
|
|
function _fun11022(a0) { // fn#11022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:389, offset: 0x00d9e85d, size: 114 bytes, params: 2, frame: 16
|
|
const closure = BrowserClient;
|
|
env0_7(closure, a0);
|
|
return env0_3(closure, [{key: 'eventFromException', value: value_11025}, {key: 'eventFromMessage',
|
|
value: value_11026}, {key: '_prepareEvent', value: value_11027}]);
|
|
}
|
|
|
|
function BrowserClient(a0) { // fn#11023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:414, offset: 0x00d9e8cf, size: 585 bytes, params: 2, frame: 26
|
|
var r7;
|
|
var sdk;
|
|
var Object;
|
|
var assign;
|
|
const binding = env1_2;
|
|
const value3 = undefined;
|
|
binding(this, BrowserClient);
|
|
const value4 = applyDefaultOptions(a0);
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
const SENTRY_SDK_SOURCE = WINDOW.SENTRY_SDK_SOURCE;
|
|
(require(826) /* metro dependency 826 */).applySdkMetadata(value4, 'browser', ['browser'],
|
|
SENTRY_SDK_SOURCE || (require(826) /* metro dependency 826 */).getSDKSource());
|
|
let _metadata = value4._metadata;
|
|
if (_metadata != null && _metadata.sdk) {
|
|
_metadata = value4._metadata;
|
|
sdk = _metadata.sdk;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
_metadata = value4._metadata;
|
|
sdk.settings = Reflect.apply(assign, Object, [{infer_ip: value4.sendDefaultPii ? 'auto' : 'never'},
|
|
_metadata.sdk.settings]);
|
|
}
|
|
const items = [value4];
|
|
const value9 = env1_5(BrowserClient);
|
|
const value12 = env1_4(this, _isNativeReflectConstruct_11018() ? global.Reflect.construct(value9, items,
|
|
env1_5(this).constructor) : value9.apply(this, items));
|
|
const {sendDefaultPii, sendClientReports, enableLogs, _experiments, enableMetrics} = value12._options;
|
|
let r6 = enableMetrics ?? (_experiments == null ? value3 : _experiments.enableMetrics);
|
|
const r9 = r6 == null || r6;
|
|
const document = WINDOW.document;
|
|
if (document) {
|
|
r7 = sendClientReports || enableLogs;
|
|
r7 = !r7 ? r9 : r7;
|
|
r6 = r7;
|
|
} else {
|
|
r6 = document;
|
|
}
|
|
if (r6) {
|
|
WINDOW.document.addEventListener('visibilitychange', _fun11024);
|
|
}
|
|
if (sendDefaultPii) {
|
|
value12.on('beforeSendSession', (require(826) /* metro dependency 826 */).addAutoIpAddressToSession);
|
|
}
|
|
return value12;
|
|
}
|
|
|
|
function value_11025(a0, a1) { // fn#11025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:1500, offset: 0x00d9ebbb, size: 73 bytes, params: 3, frame: 17
|
|
let value = environment.__proto__;
|
|
value = require(1039) /* metro dependency 1039 */;
|
|
return value.eventFromException(this._options.stackParser, a0, a1, this._options.attachStacktrace);
|
|
}
|
|
|
|
function value_11026(a0) { // fn#11026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:1662, offset: 0x00d9ec04, size: 132 bytes, params: 2, frame: 19
|
|
let value = undefined;
|
|
const value2 = 'info';
|
|
const r6 = arguments.length > 1 ? value === arguments[1] ? value2 : arguments[1] : value2;
|
|
const r5 = arguments.length > 2 ? arguments[2] : value;
|
|
value = require(1039) /* metro dependency 1039 */;
|
|
return value.eventFromMessage(this._options.stackParser, a0, r6, r5, this._options.attachStacktrace);
|
|
}
|
|
|
|
function value_11027(a0, a1, a2, a3) { // fn#11027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:1926, offset: 0x00d9ec88, size: 90 bytes, params: 5, frame: 18
|
|
let platform = a0.platform;
|
|
platform = !platform ? 'javascript' : platform;
|
|
a0.platform = platform;
|
|
return value_11027_superPropGet(BrowserClient, '_prepareEvent', this, 3)([a0, a1, a2, a3]);
|
|
}
|
|
|
|
function _fun11024() { // fn#11024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:1183, offset: 0x00d9eb18, size: 163 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__.__proto__;
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
if (WINDOW.document.visibilityState === 'hidden') {
|
|
if (sendClientReports) {
|
|
env0_0._flushOutcomes();
|
|
}
|
|
if (enableLogs) {
|
|
(require(826) /* metro dependency 826 */)._INTERNAL_flushLogsBuffer(env0_0);
|
|
}
|
|
if (env0_3) {
|
|
(require(826) /* metro dependency 826 */)._INTERNAL_flushMetricsBuffer(env0_0);
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_11027_superPropGet(a0, a1, a2, a3) { // fn#11028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1165:2001, owner: value_11027._superPropGet, offset: 0x00d9ece2, size: 100 bytes, params: 5, frame: 18
|
|
let value = a0;
|
|
const env0_0 = a2;
|
|
const binding = env2_6;
|
|
value = env2_5(1 & 3 ? value.prototype : value);
|
|
value = binding(value, '_prepareEvent', a2);
|
|
return 2 & 3 ? typeof value !== 'function' ? value : _fun11029 : value;
|
|
}
|
|
|