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

201 lines
8.3 KiB
React

/* Metro module 3912; source: unknown; dependencies: [5, 27, 3888] */
function _fun32144(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:6, offset: 0x0100d78e, size: 146 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_1 = importDefault(5) /* metro dependency 5 */;
let env0_2 = (require(27) /* metro dependency 27 */).Image;
const NitroModules = (require(3888) /* metro dependency 3888 */).NitroModules;
let env0_3 = NitroModules.createHybridObject('RiveFileFactory');
object2 = {};
((a0) => {
var env0_0 = _fun32146;
var env0_1 = _fun32149;
var env0_2 = _fun32152;
var env0_3 = _fun32155;
var env0_4 = _fun32158;
a0.fromURL = _fun32161;
a0.fromFileURL = _fun32162;
a0.fromResource = _fun32163;
a0.fromBytes = _fun32164;
a0.fromSource = _fun32165;
})(object2);
exports.RiveFileFactory = object2;
}
function _fun32145(a0) { // fn#32145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:186, offset: 0x0100d820, size: 109 bytes, params: 2, frame: 3
a0.fromURL = function(a0, a1) {
return _fromURL.apply(this, arguments);
};
a0.fromFileURL = function(a0) {
return _fromFileURL.apply(this, arguments);
};
a0.fromResource = function(a0, a1) {
return _fromResource.apply(this, arguments);
};
a0.fromBytes = function(a0, a1) {
return _fromBytes.apply(this, arguments);
};
a0.fromSource = function(a0, a1) {
return _fromSource.apply(this, arguments);
};
}
function _fromURL() { // fn#32146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:198, offset: 0x0100d88d, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_1(_fun32148).apply(this, arguments);
}
function _fromFileURL() { // fn#32149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:391, offset: 0x0100d921, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_1(_fun32151).apply(this, arguments);
}
function _fromResource() { // fn#32152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:662, offset: 0x0100d9cf, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_1(_fun32154).apply(this, arguments);
}
function _fromBytes() { // fn#32155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:875, offset: 0x0100da63, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_1(_fun32157).apply(this, arguments);
}
function _fromSource() { // fn#32158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:1076, offset: 0x0100daf7, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_1(_fun32160).apply(this, arguments);
}
function* _fun32148(a0, a1) { // fn#32148, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:237, offset: 0x0100d8c9, size: 88 bytes, params: 3, frame: 17
if (false) {
return undefined;
}
value = undefined;
const r3 = arguments.length > 2 && value !== arguments[2];
const r4 = r3 ? arguments[2] : !r3;
const binding = env3_3;
return binding.fromURL(a0, r4, a1 ? {data: a1} : value);
}
function* _fun32151(a0) { // fn#32151, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:438, offset: 0x0100d95d, size: 114 bytes, params: 2, frame: 17
if (false) {
return undefined;
}
value = undefined;
const r6 = arguments.length > 1 ? value === arguments[1] ? value : arguments[1] : value;
const r3 = arguments.length > 2 && value !== arguments[2];
const r4 = r3 ? arguments[2] : !r3;
const binding = env3_3;
return binding.fromFileURL(a0, r4, r6 ? {data: r6} : value);
}
function* _fun32154(a0, a1) { // fn#32154, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:711, offset: 0x0100da0b, size: 88 bytes, params: 3, frame: 17
if (false) {
return undefined;
}
value = undefined;
const r3 = arguments.length > 2 && value !== arguments[2];
const r4 = r3 ? arguments[2] : !r3;
const binding = env3_3;
return binding.fromResource(a0, r4, a1 ? {data: a1} : value);
}
function* _fun32157(a0, a1) { // fn#32157, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:918, offset: 0x0100da9f, size: 88 bytes, params: 3, frame: 17
if (false) {
return undefined;
}
value = undefined;
const r3 = arguments.length > 2 && value !== arguments[2];
const r4 = r3 ? arguments[2] : !r3;
const binding = env3_3;
return binding.fromBytes(a0, r4, a1 ? {data: a1} : value);
}
function* _fun32160(a0, a1) { // fn#32160, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4061:1121, offset: 0x0100db33, size: 425 bytes, params: 3, frame: 23
var r12;
var r4;
var value11;
var binding;
var assetSource;
var Error;
var prototype;
var error;
var match;
var regexp;
var value13;
var String;
var message;
var value14;
let value = a0;
if (false) {
return undefined;
}
const value4 = undefined;
const r9 = arguments.length > 2 && value4 !== arguments[2];
let r1 = r9 ? arguments[2] : !r9;
const value9 = typeof value;
const value10 = null;
const r11 = value9 !== 'number' ? value10 : value;
if (r11) {
value11 = environment.__proto__.__proto__.__proto__;
binding = env3_2;
assetSource = binding.resolveAssetSource(r11);
r12 = value10 == assetSource ? value4 : assetSource.uri;
} else {
r12 = value9 !== 'object' ? value10 : value.uri;
}
if (r12) {
try {
match = r12.match;
regexp = RegExp('https?:\\/\\/', '');
value = Reflect.apply(match, r12, [regexp]);
value13 = environment.__proto__.__proto__.__proto__;
if (value) {
binding = env3_0;
value = binding.fromURL(r12, a1, r1);
r1 = value;
} else {
match = r12.match;
regexp = RegExp('file:\\/\\/', '');
value = Reflect.apply(match, r12, [regexp]);
binding = env3_0;
if (value) {
value = binding.fromFileURL(r12, a1, r1);
r1 = value;
} else {
value = binding.fromResource(r12, a1, r1);
r1 = value;
}
}
} catch (error) {
Error = global.Error;
if (error instanceof Error) {
message = error.message;
r4 = message;
} else {
String = global.String;
r4 = String(error);
}
Error = global.Error;
value = 'Failed to load Rive file from source: ' + r4;
prototype = Error.prototype;
value14 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value14;
throw value;
}
return r1;
}
Error = global.Error;
value = 'Invalid source: could not resolve asset ' + value + ". Ensure 'riv' is in metro.config.js assetExts.";
const value12 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error(value);
throw error instanceof Object ? error : value12;
}