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

127 lines
7.6 KiB
JavaScript

/* Metro module 949; source: unknown; dependencies: [77, 948, 848, 950, 946, 951, 857, 952, 874] */
import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */
import * as SEMANTIC_Module from './module-00848-SEMANTIC_.js'; /* Metro dependency 848 */
import * as Module00857Module from './module-00857.js'; /* Metro dependency 857 */
import * as moduleValue4 from './module-00874.js'; /* Metro dependency 874 */
import * as Module00946Module from './module-00946.js'; /* Metro dependency 946 */
import * as Module00948Module from './module-00948.js'; /* Metro dependency 948 */
import * as Module00950Module from './module-00950.js'; /* Metro dependency 950 */
import * as moduleValue2 from './module-00951.js'; /* Metro dependency 951 */
import * as FilterMcpPiiFromSpanDataModule from './module-00952-filterMcpPiiFromSpanData.js'; /* Metro dependency 952 */
function _fun10075(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1076:6, offset: 0x00d7b805, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const createSpanName = function(a0, a1) {
var value = a0;
return a1 ? '' + value + ' ' + a1 : value;
};
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.buildMcpServerSpanConfig = buildMcpServerSpanConfig;
exports.createMcpNotificationSpan = function(a0, a1, a2, a3, a4) {
return createMcpSpan({type: 'notification-incoming', message: a0, transport: a1, extra: a2, callback: a4,
options: a3});
};
exports.createMcpOutgoingNotificationSpan = function(a0, a1, a2, a3) {
return createMcpSpan({type: 'notification-outgoing', message: a0, transport: a1, options: a2, callback: a3});
};
function buildSentryAttributes(a0) { // fn#10077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1076:96, offset: 0x00d7b8bf, size: 291 bytes, params: 2, frame: 19
var r7;
var r8;
var value;
var MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE;
const MCP_NOTIFICATION_ORIGIN_VALUE = (require(948) /* metro dependency 948 */).MCP_NOTIFICATION_ORIGIN_VALUE;
var MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE;
var MCP_SERVER_OP_VALUE;
if (a0 === 'request') {
MCP_SERVER_OP_VALUE = (require(948) /* metro dependency 948 */).MCP_SERVER_OP_VALUE;
r7 = (require(948) /* metro dependency 948 */).MCP_FUNCTION_ORIGIN_VALUE;
r8 = MCP_SERVER_OP_VALUE;
} else if (a0 === 'notification-incoming') {
MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE = (require(948) /* metro dependency 948 */).MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE;
r7 = MCP_NOTIFICATION_ORIGIN_VALUE;
r8 = MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE;
} else {
value = undefined;
if (a0 !== 'notification-outgoing') {
r7 = value;
r8 = value;
} else {
MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE = (require(948) /* metro dependency 948 */).MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE;
r7 = MCP_NOTIFICATION_ORIGIN_VALUE;
r8 = MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE;
}
}
const SEMANTIC_ATTRIBUTE_SENTRY_OP = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_OP;
value = Module00077Module({}, SEMANTIC_ATTRIBUTE_SENTRY_OP, r8);
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
value = Module00077Module(value, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, r7);
const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
const MCP_ROUTE_SOURCE_VALUE = (require(948) /* metro dependency 948 */).MCP_ROUTE_SOURCE_VALUE;
return Module00077Module(value, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, MCP_ROUTE_SOURCE_VALUE);
}
function createMcpSpan({type, message, transport, extra, callback, options}) { // fn#10078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1076:655, offset: 0x00d7b9e2, size: 421 bytes, params: 2, frame: 30
var r5;
var value;
var createSpanNameBinding;
const method = message.method;
const params = message.params;
if (type !== 'request') {
r5 = method;
} else {
createSpanNameBinding = createSpanName;
value = require(950) /* metro dependency 950 */;
value = createSpanNameBinding(method, value.extractTargetInfo(method, params || ({})).target);
r5 = value;
}
const Object = global.Object;
const assign = Object.assign;
const transportAttributes = (Module00946Module).buildTransportAttributes(transport, extra);
const MCP_METHOD_NAME_ATTRIBUTE = (Module00948Module).MCP_METHOD_NAME_ATTRIBUTE;
const value3 = Module00077Module({}, MCP_METHOD_NAME_ATTRIBUTE, method);
const value4 = Reflect.apply(assign, Object, [{}, transportAttributes, value3,
moduleValue2.buildTypeSpecificAttributes(type, message, params, options?.recordInputs),
buildSentryAttributes(type)]);
const client = (Module00857Module).getClient();
const Boolean = global.Boolean;
const value6 = Boolean(client == null ? undefined : client.getOptions().sendDefaultPii);
value = require(952) /* metro dependency 952 */;
value = value.filterMcpPiiFromSpanData(value4, value6);
return moduleValue4.startSpan({name: r5, forceTransaction: true, attributes: value}, callback);
}
function buildMcpServerSpanConfig(a0, a1, a2, a3) { // fn#10079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1076:1337, offset: 0x00d7bb87, size: 380 bytes, params: 5, frame: 29
const method = a0.method;
const params = a0.params;
const createSpanNameBinding = createSpanName;
const value2 = undefined;
const spanName = createSpanNameBinding(method, Module00950Module.extractTargetInfo(method, params || ({})).target);
const Object = global.Object;
const assign = Object.assign;
const transportAttributes = (Module00946Module).buildTransportAttributes(a1, a2);
const MCP_METHOD_NAME_ATTRIBUTE = (Module00948Module).MCP_METHOD_NAME_ATTRIBUTE;
const value3 = Module00077Module({}, MCP_METHOD_NAME_ATTRIBUTE, method);
const value4 = Reflect.apply(assign, Object, [{}, transportAttributes, value3,
moduleValue2.buildTypeSpecificAttributes('request', a0, params, a3 == null ? value2 : a3.recordInputs),
buildSentryAttributes('request')]);
const client = (Module00857Module).getClient();
const Boolean = global.Boolean;
const value6 = Boolean(client == null ? value2 : client.getOptions().sendDefaultPii);
let value = FilterMcpPiiFromSpanDataModule;
value = value.filterMcpPiiFromSpanData(value4, value6);
const object = {name: spanName};
const MCP_SERVER_OP_VALUE = (Module00948Module).MCP_SERVER_OP_VALUE;
object.op = MCP_SERVER_OP_VALUE;
object.forceTransaction = true;
object.attributes = value;
return object;
}
}
global.__d(_fun10075, 949, [77, 948, 848, 950, 946, 951, 857, 952,
874]) /* metro module 949, dependencies: [77, 948, 848, 950, 946, 951, 857, 952, 874] */;