Files
discord-decomp/sources/by-id/module-00977.jsx
T
2026-07-27 16:20:00 +03:00

1187 lines
48 KiB
React

/* Metro module 977; source: unknown; dependencies: [5, 77, 966, 968, 848, 978, 877, 849, 874, 980, 875, 857] */
function _fun10269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:6, offset: 0x00d84846, size: 154 bytes, params: 8, frame: 18
let env0_0 = require;
const instrumentMethod_10276 = function(a0, a1, a2, a3) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
var env0_3 = a3;
var Proxy = global.Proxy;
var value = Object.create(Proxy.prototype, {constructor: {value: Proxy}});
var value2 = new Proxy(a0, {apply: _fun10277});
return value2 instanceof Object ? value2 : value;
};
const createDeepProxy_10289 = function(a0) {
var value = undefined;
var value2 = '';
var env0_0 = arguments.length > 1 ? value === arguments[1] ? value2 : arguments[1] : value2;
var env0_1 = arguments.length > 2 ? arguments[2] : value;
var Proxy = global.Proxy;
value = Object.create(Proxy.prototype, {constructor: {value: Proxy}});
var value4 = new Proxy(a0, {get: _fun10290});
return value4 instanceof Object ? value4 : value;
};
let env0_2 = require(5) /* metro dependency 5 */;
let env0_3 = require(77) /* metro dependency 77 */;
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.instrumentAnthropicAiClient = instrumentAnthropicAiClient;
}
function addPrivateRequestAttributes(a0, a1) { // fn#10270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:54, offset: 0x00d848e0, size: 151 bytes, params: 3, frame: 19
var setAttributes;
var binding;
var GEN_AI_PROMPT_ATTRIBUTE;
var JSON;
(require(978) /* metro dependency 978 */).setMessagesAttribute(a0,
(require(978) /* metro dependency 978 */).messagesFromParams(a1));
if ('prompt' in a1) {
setAttributes = a0.setAttributes;
binding = env0_3;
GEN_AI_PROMPT_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_PROMPT_ATTRIBUTE;
JSON = global.JSON;
Reflect.apply(setAttributes, a0, [binding({}, GEN_AI_PROMPT_ATTRIBUTE, JSON.stringify(a1.prompt))]);
}
}
function addResponseAttributes(a0, a1, a2) { // fn#10271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:260, offset: 0x00d84977, size: 604 bytes, params: 4, frame: 24
var r1;
var setAttributes;
var binding;
const GEN_AI_RESPONSE_ID_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_RESPONSE_ID_ATTRIBUTE;
const GEN_AI_RESPONSE_MODEL_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_RESPONSE_MODEL_ATTRIBUTE;
const ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE = (require(966) /* metro dependency 966 */).ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE;
var Date;
var value9;
var value10;
var date;
var value15;
var value16;
var usage;
var moduleValue;
var setTokenUsageAttributes;
var input_tokens;
var output_tokens;
var cache_creation_input_tokens;
const value = a1;
if (value && typeof value === 'object') {
if ('type' in value) {
if (value.type === 'error') {
(require(978) /* metro dependency 978 */).handleResponseError(a0, value);
} else {
if (a2) {
addContentAttributes(a0, value);
}
if ('id' in value && 'model' in value) {
setAttributes = a0.setAttributes;
binding = env0_3;
Reflect.apply(setAttributes, a0, [binding(binding({}, GEN_AI_RESPONSE_ID_ATTRIBUTE, value.id),
GEN_AI_RESPONSE_MODEL_ATTRIBUTE, value.model)]);
r1 = 'created' in value && typeof value.created === 'number';
if (r1) {
setAttributes = a0.setAttributes;
binding = env0_3;
Date = global.Date;
value9 = 1000 * value.created;
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
Reflect.apply(setAttributes, a0, [binding({}, ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE,
(date instanceof Object ? date : value10).toISOString())]);
}
r1 = 'created_at' in value && typeof value.created_at === 'number';
if (r1) {
setAttributes = a0.setAttributes;
binding = env0_3;
Date = global.Date;
value15 = 1000 * value.created_at;
value16 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
Reflect.apply(setAttributes, a0, [binding({}, ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE,
(date instanceof Object ? date : value16).toISOString())]);
}
r1 = 'usage' in value && value.usage;
if (r1) {
moduleValue = require(968) /* metro dependency 968 */;
setTokenUsageAttributes = moduleValue.setTokenUsageAttributes;
usage = value.usage;
input_tokens = usage.input_tokens;
usage = value.usage;
output_tokens = usage.output_tokens;
usage = value.usage;
cache_creation_input_tokens = usage.cache_creation_input_tokens;
usage = value.usage;
Reflect.apply(setTokenUsageAttributes, moduleValue, [a0, input_tokens, output_tokens,
cache_creation_input_tokens,
usage.cache_read_input_tokens]);
}
}
}
} else {
if (a2) {
addContentAttributes(a0, value);
}
if ('id' in value && 'model' in value) {
setAttributes = a0.setAttributes;
binding = env0_3;
Reflect.apply(setAttributes, a0, [binding(binding({}, GEN_AI_RESPONSE_ID_ATTRIBUTE, value.id),
GEN_AI_RESPONSE_MODEL_ATTRIBUTE, value.model)]);
r1 = 'created' in value && typeof value.created === 'number';
if (r1) {
setAttributes = a0.setAttributes;
binding = env0_3;
Date = global.Date;
value9 = 1000 * value.created;
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
Reflect.apply(setAttributes, a0, [binding({}, ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE,
(date instanceof Object ? date : value10).toISOString())]);
}
r1 = 'created_at' in value && typeof value.created_at === 'number';
if (r1) {
setAttributes = a0.setAttributes;
binding = env0_3;
Date = global.Date;
value15 = 1000 * value.created_at;
value16 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
Reflect.apply(setAttributes, a0, [binding({}, ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE,
(date instanceof Object ? date : value16).toISOString())]);
}
r1 = 'usage' in value && value.usage;
if (r1) {
moduleValue = require(968) /* metro dependency 968 */;
setTokenUsageAttributes = moduleValue.setTokenUsageAttributes;
usage = value.usage;
input_tokens = usage.input_tokens;
usage = value.usage;
output_tokens = usage.output_tokens;
usage = value.usage;
cache_creation_input_tokens = usage.cache_creation_input_tokens;
usage = value.usage;
Reflect.apply(setTokenUsageAttributes, moduleValue, [a0, input_tokens, output_tokens,
cache_creation_input_tokens,
usage.cache_read_input_tokens]);
}
}
}
}
}
function handleStreamingError(a0, a1, a2) { // fn#10275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:1686, offset: 0x00d84dcb, size: 155 bytes, params: 4, frame: 19
var setStatus;
const moduleValue = require(877) /* metro dependency 877 */;
const captureException = moduleValue.captureException;
let object2 = {};
object2.mechanism = {'handled': false, 'type': 'auto.ai.anthropic', data: {function: a2}};
Reflect.apply(captureException, moduleValue, [a0, object2]);
if (a1.isRecording()) {
setStatus = a1.setStatus;
object2 = {};
object2.code = (require(849) /* metro dependency 849 */).SPAN_STATUS_ERROR;
object2.message = 'internal_error';
Reflect.apply(setStatus, a1, [object2]);
a1.end();
}
throw a0;
}
function instrumentMethod_10276(a0, a1, a2, a3) { // fn#10276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:1925, offset: 0x00d84e66, size: 77 bytes, params: 5, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const Proxy = global.Proxy;
const object2 = {apply: apply_10277};
const value = Object.create(Proxy.prototype, {constructor: {value: Proxy}});
const proxy = new Proxy(a0, object2);
return proxy instanceof Object ? proxy : value;
}
function createDeepProxy_10289(a0) { // fn#10289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:4510, offset: 0x00d85636, size: 115 bytes, params: 2, frame: 16
let value = undefined;
const value2 = '';
const env0_0 = arguments.length > 1 ? value === arguments[1] ? value2 : arguments[1] : value2;
const env0_1 = arguments.length > 2 ? arguments[2] : value;
const Proxy = global.Proxy;
const object2 = {get: get_10290};
value = Object.create(Proxy.prototype, {constructor: {value: Proxy}});
const proxy = new Proxy(a0, object2);
return proxy instanceof Object ? proxy : value;
}
function addContentAttributes(a0, a1) { // fn#10272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:388, owner: addResponseAttributes.addContentAttributes, offset: 0x00d84bd3, size: 494 bytes, params: 3, frame: 25
var environment;
var r7;
var r12;
var Array;
var isArray;
var content;
var setAttributes;
var value;
var binding;
const GEN_AI_RESPONSE_TEXT_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_RESPONSE_TEXT_ATTRIBUTE;
var map;
var value2;
var filter;
var value3;
var join;
var value4;
var items2;
var iterator;
var iterator2;
var item;
var item2;
var type;
var value5;
var value6;
var push;
var error;
var length;
var GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE;
var JSON;
var stringify;
var completion;
var input_tokens;
exceptionSkip15: while (true) {
exceptionLanding15: while (true) {
if ('content' in a1) {
Array = global.Array;
isArray = Array.isArray;
content = a1.content;
if (Reflect.apply(isArray, Array, [content])) {
setAttributes = a0.setAttributes;
value = environment.__proto__;
binding = env1_3;
content = a1.content;
map = content.map;
value2 = Reflect.apply(map, content, [function(a0) {
return a0.text;
}]);
filter = value2.filter;
value3 = Reflect.apply(filter, value2, [_fun10274]);
join = value3.join;
value4 = Reflect.apply(join, value3, ['']);
Reflect.apply(setAttributes, a0, [binding({}, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, value4)]);
items2 = [];
content = a1.content;
iterator = content[Symbol.iterator]();
iterator2 = iterator.next;
r7 = iterator;
while (true) {
item2 = Reflect.apply(iterator2, r7, []);
item = item2.value;
item2 = item2.done ? undefined : r7;
if (item2 === undefined) {
break;
}
try {
type = item.type;
} catch (error) {
break exceptionLanding15;
}
value5 = type !== 'tool_use';
if (!value5) {
r12 = value5;
continue;
}
try {
type = item.type;
} catch (error) {
break exceptionLanding15;
}
value6 = type !== 'server_tool_use';
r12 = value6;
if (r12) {
r7 = item2;
continue;
}
try {
push = items2.push;
} catch (error) {
break exceptionLanding15;
}
try {
Reflect.apply(push, items2, [item]);
} catch (error) {
break exceptionLanding15;
}
r7 = item2;
}
length = items2.length;
if (length > 0) {
setAttributes = a0.setAttributes;
binding = env1_3;
GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE;
JSON = global.JSON;
stringify = JSON.stringify;
value = Reflect.apply(stringify, JSON, [items2]);
Reflect.apply(setAttributes, a0, [binding({}, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, value)]);
break;
}
break;
}
break;
}
if ('completion' in a1) {
setAttributes = a0.setAttributes;
value = environment.__proto__;
binding = env1_3;
completion = a1.completion;
Reflect.apply(setAttributes, a0, [binding({}, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, completion)]);
}
if ('input_tokens' in a1) {
setAttributes = a0.setAttributes;
value = environment.__proto__;
binding = env1_3;
JSON = global.JSON;
stringify = JSON.stringify;
input_tokens = a1.input_tokens;
value = Reflect.apply(stringify, JSON, [input_tokens]);
Reflect.apply(setAttributes, a0, [binding({}, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, value)]);
}
return undefined;
break exceptionSkip15;
}
try {
item2.return();
} catch {
}
throw error;
break exceptionSkip15;
}
}
function instrumentMethod_10276Apply(a0, a1, a2) { // fn#10277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:1986, owner: instrumentMethod_10276.apply, offset: 0x00d84eb3, size: 954 bytes, params: 4, frame: 38
var r0;
const GEN_AI_REQUEST_MODEL_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_REQUEST_MODEL_ATTRIBUTE;
var property;
var GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE;
var JSON;
var moduleValue3;
var startSpan;
var object2;
const env0_0 = a0;
const env0_1 = a2;
const binding = env1_3;
const value3 = undefined;
const GEN_AI_SYSTEM_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_SYSTEM_ATTRIBUTE;
const value4 = binding({}, GEN_AI_SYSTEM_ATTRIBUTE, 'anthropic');
const GEN_AI_OPERATION_NAME_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_OPERATION_NAME_ATTRIBUTE;
const moduleValue = require(968) /* metro dependency 968 */;
const getFinalOperationName = moduleValue.getFinalOperationName;
const value5 = binding(value4, GEN_AI_OPERATION_NAME_ATTRIBUTE, Reflect.apply(getFinalOperationName, moduleValue,
[require]));
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
const value6 = binding(value5, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.ai.anthropic');
if (a2.length > 0) {
if (typeof a2[0] !== 'object') {
value6[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = require === 'models.retrieve' ? a2[0] : require !== 'models.get' ? 'unknown' : a2[0];
} else if (a2[0] !== null) {
property = a2[0];
if (property.tools && global.Array.isArray(property.tools)) {
GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE;
JSON = global.JSON;
value6[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE] = JSON.stringify(property.tools);
}
value6[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = property.model ?? 'unknown';
if ('temperature' in property) {
value6[(require(966) /* metro dependency 966 */).GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = property.temperature;
}
if ('top_p' in property) {
value6[(require(966) /* metro dependency 966 */).GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = property.top_p;
}
if ('stream' in property) {
value6[(require(966) /* metro dependency 966 */).GEN_AI_REQUEST_STREAM_ATTRIBUTE] = property.stream;
}
if ('top_k' in property) {
value6[(require(966) /* metro dependency 966 */).GEN_AI_REQUEST_TOP_K_ATTRIBUTE] = property.top_k;
}
if ('frequency_penalty' in property) {
value6[(require(966) /* metro dependency 966 */).GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = property.frequency_penalty;
}
if ('max_tokens' in property) {
value6[(require(966) /* metro dependency 966 */).GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE] = property.max_tokens;
}
} else {
value6[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = require === 'models.retrieve' ? a2[0] : require !== 'models.get' ? 'unknown' : a2[0];
}
} else {
value6[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = require === 'models.retrieve' ? a2[0] : require !== 'models.get' ? 'unknown' : a2[0];
}
const r19 = value6[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown';
const finalOperationName = moduleValue.getFinalOperationName(require);
const r8 = typeof a2[0] !== 'object' ? value3 : a2[0];
const Boolean = global.Boolean;
const value11 = Boolean(r8 == null ? value3 : r8.stream);
const value12 = require === 'messages.stream';
if (value11) {
r0 = handleStreamingRequest(env0_0, a0, importDefault, a2, value6, finalOperationName, require, r8, importAll,
value11, value12);
} else if (value12) {
r0 = handleStreamingRequest(env0_0, a0, importDefault, a2, value6, finalOperationName, require, r8, importAll,
value11, value12);
} else {
moduleValue3 = require(874) /* metro dependency 874 */;
startSpan = moduleValue3.startSpan;
object2 = {};
object2.name = '' + finalOperationName + ' ' + r19;
object2.op = moduleValue.getSpanOperation(require);
object2.attributes = value6;
r0 = Reflect.apply(startSpan, moduleValue3, [object2, _fun10284]);
}
return r0;
}
function createDeepProxy_10289Get(a0, a1) { // fn#10290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:4667, owner: createDeepProxy_10289.get, offset: 0x00d856a9, size: 189 bytes, params: 3, frame: 22
var r0;
var moduleValue2;
const property = a0[a1];
const value = environment.__proto__;
const moduleValue = require(968) /* metro dependency 968 */;
const buildMethodPath = moduleValue.buildMethodPath;
const binding = env0_0;
const String = global.String;
const methodPath = Reflect.apply(buildMethodPath, moduleValue, [binding, String(a1)]);
const value3 = typeof property;
const value4 = value3 === 'function';
if (value4) {
moduleValue2 = require(978) /* metro dependency 978 */;
r0 = moduleValue2.shouldInstrument(methodPath) ? instrumentMethod_10276(property, methodPath, a0,
env0_1) : value4 ? property.bind(a0) : property && (value3 !== 'object' ? property : createDeepProxy_10289(property,
methodPath, env0_1));
} else {
r0 = value4 ? property.bind(a0) : property && (value3 !== 'object' ? property : createDeepProxy_10289(property,
methodPath, env0_1));
}
return r0;
}
function handleStreamingRequest(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { // fn#10278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:3285, owner: instrumentMethod_10276.apply.handleStreamingRequest, offset: 0x00d8526d, size: 284 bytes, params: 12, frame: 23
var environment;
var r0;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a6;
const env0_5 = a7;
const env0_6 = a8;
const object2 = {};
let value = environment.__proto__.__proto__;
const GEN_AI_REQUEST_MODEL_ATTRIBUTE = (require(966) /* metro dependency 966 */).GEN_AI_REQUEST_MODEL_ATTRIBUTE;
object2.name = '' + a5 + ' ' + (a4[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? 'unknown') + ' stream-response';
object2.op = (require(968) /* metro dependency 968 */).getSpanOperation(a6);
object2.attributes = a4;
if (a9) {
if (a10) {
value = require(874) /* metro dependency 874 */;
value = value.startSpanManual(object2, _fun10283);
r0 = value;
} else {
value = require(874) /* metro dependency 874 */;
value = value.startSpanManual(object2, _fun10279());
r0 = value;
}
} else {
value = require(874) /* metro dependency 874 */;
value = value.startSpanManual(object2, _fun10283);
r0 = value;
}
return r0;
}
function _fun10284(a0) { // fn#10284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:4177, offset: 0x00d85528, size: 117 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
let value = environment.__proto__;
if (importAll.recordInputs && env0_2) {
value = environment.__proto__.__proto__;
addPrivateRequestAttributes(a0, env0_2);
}
value = environment.__proto__.__proto__;
return (require(875) /* metro dependency 875 */).handleCallbackErrors(_fun10285, _fun10286, function() {
}, _fun10288);
}
function _fun10279() { // fn#10279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:3528, offset: 0x00d85389, size: 32 bytes, params: 1, frame: 12
const env0_0 = env3_2(_fun10281);
return _fun10282;
}
function _fun10283(a0) { // fn#10283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:3857, offset: 0x00d8547b, size: 173 bytes, params: 2, frame: 20
var r2;
var value;
var binding;
var recordInputs;
var value2;
var value3;
var value4;
var property;
var moduleValue;
var instrumentMessageStream;
var recordOutputs;
var value5;
var value6;
var error;
var value7;
try {
value = environment;
binding = env0_6;
recordInputs = binding.recordInputs;
r2 = recordInputs && env0_5;
if (r2) {
value2 = environment.__proto__.__proto__.__proto__;
addPrivateRequestAttributes(a0, env0_5);
}
value3 = require.apply(importDefault, importAll);
value4 = environment.__proto__.__proto__.__proto__;
property = dependencyMap[9];
moduleValue = require(property);
instrumentMessageStream = moduleValue.instrumentMessageStream;
binding = env0_6;
recordOutputs = binding.recordOutputs;
value5 = recordOutputs != null;
r2 = value5 && recordOutputs;
value6 = Reflect.apply(instrumentMessageStream, moduleValue, [value3, a0, r2]);
} catch (error) {
value7 = environment.__proto__.__proto__.__proto__;
handleStreamingError(error, a0, dependencyMap);
return undefined;
}
return value6;
}
function _fun10285() { // fn#10285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:4279, offset: 0x00d8559d, size: 31 bytes, params: 1, frame: 13
return env1_0.apply(importDefault, importDefault);
}
function _fun10286(a0) { // fn#10286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:4313, offset: 0x00d855bc, size: 81 bytes, params: 2, frame: 16
const value = environment.__proto__.__proto__.__proto__;
(require(877) /* metro dependency 877 */).captureException(a0, {mechanism: {'handled': false,
'type': 'auto.ai.anthropic', data: {function: require}}});
}
function _fun10288(a0) { // fn#10288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:4439, offset: 0x00d8560d, size: 41 bytes, params: 2, frame: 15
addResponseAttributes(env0_0, a0, importAll.recordOutputs);
}
function* _fun10281(a0) { // fn#10281, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1104:3548, offset: 0x00d853b2, size: 201 bytes, params: 2, frame: 21
var r3;
var binding;
var recordInputs;
var value3;
var binding2;
var apply;
var binding3;
var binding4;
var value4;
var value5;
var value6;
var value7;
var binding5;
var property;
var value8;
var instrumentAsyncIterableStream;
var recordOutputs;
var value9;
var value10;
var error;
var value11;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_6;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
recordInputs = binding.recordInputs;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
if (recordInputs) {
try {
binding = env2_5;
r3 = binding;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
if (r3) {
value3 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
try {
binding = env5_4;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding2 = env2_5;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding(a0, binding2);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding = env2_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
apply = binding.apply;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding4 = env2_3;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value4 = Reflect.apply(apply, binding, [binding3, binding4]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
if (value6) {
return value5;
}
value7 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
try {
binding = env5_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding5 = env5_1;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
property = binding5[9];
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
instrumentAsyncIterableStream = value8.instrumentAsyncIterableStream;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding = env2_6;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
recordOutputs = binding.recordOutputs;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value9 = recordOutputs != null;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value10 = Reflect.apply(instrumentAsyncIterableStream, value8, [value5, a0, value9 && recordOutputs]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
return value10;
}
try {
binding = env2_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
apply = binding.apply;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding4 = env2_3;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value4 = Reflect.apply(apply, binding, [binding3, binding4]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
if (value6) {
return value5;
}
value7 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
try {
binding = env5_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding5 = env5_1;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
property = binding5[9];
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
instrumentAsyncIterableStream = value8.instrumentAsyncIterableStream;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding = env2_6;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
recordOutputs = binding.recordOutputs;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value9 = recordOutputs != null;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value10 = Reflect.apply(instrumentAsyncIterableStream, value8, [value5, a0, value9 && recordOutputs]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
} else {
if (recordInputs) {
value3 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
try {
binding = env5_4;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding2 = env2_5;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding(a0, binding2);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding = env2_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
apply = binding.apply;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding4 = env2_3;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value4 = Reflect.apply(apply, binding, [binding3, binding4]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
if (value6) {
return value5;
}
value7 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
try {
binding = env5_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding5 = env5_1;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
property = binding5[9];
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
instrumentAsyncIterableStream = value8.instrumentAsyncIterableStream;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding = env2_6;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
recordOutputs = binding.recordOutputs;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value9 = recordOutputs != null;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value10 = Reflect.apply(instrumentAsyncIterableStream, value8, [value5, a0, value9 && recordOutputs]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
return value10;
}
try {
binding = env2_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
apply = binding.apply;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding4 = env2_3;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value4 = Reflect.apply(apply, binding, [binding3, binding4]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env5_0;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding5 = env5_1;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
property = binding5[9];
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
instrumentAsyncIterableStream = value8.instrumentAsyncIterableStream;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
binding = env2_6;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
recordOutputs = binding.recordOutputs;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value9 = recordOutputs != null;
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
try {
value10 = Reflect.apply(instrumentAsyncIterableStream, value8, [value5, a0, value9 && recordOutputs]);
} catch (error) {
value11 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_6;
binding(error, a0, env2_4);
return undefined;
}
}
return value10;
}