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

282 lines
13 KiB
React

/* Metro module 1324; source: unknown; dependencies: [6, 7, 1325, 1322, 1323] */
function _fun15141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:6, offset: 0x00e24883, size: 149 bytes, params: 8, frame: 18
const env0_0 = require;
const env0_2 = require(6) /* metro dependency 6 */;
const env0_3 = require(7) /* metro dependency 7 */;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.binaryWriteOptions = undefined;
exports.BinaryWriter = undefined;
object = {writeUnknownFields: true, writerFactory: writerFactory};
exports.binaryWriteOptions = binaryWriteOptions;
exports.BinaryWriter = _fun15144();
}
function writerFactory() { // fn#15142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:204, offset: 0x00e24918, size: 29 bytes, params: 1, frame: 9
const binding = env0_5;
const value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function binaryWriteOptions(a0) { // fn#15143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:265, offset: 0x00e24935, size: 62 bytes, params: 2, frame: 17
return a0 ? global.Object.assign(global.Object.assign({}, env0_4), a0) : env0_4;
}
function _fun15144() { // fn#15144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:351, offset: 0x00e24973, size: 500 bytes, params: 1, frame: 15
return env0_3(BinaryWriter, [{key: 'finish', value: value_15146}, {key: 'fork', value: function() {
this.stack.push({chunks: this.chunks, buf: this.buf});
this.chunks = [];
this.buf = [];
return this;
}}, {key: 'join', value: function() {
var value = this.finish();
var value2 = this.stack.pop();
if (value2) {
this.chunks = value2.chunks;
this.buf = value2.buf;
this.uint32(value.byteLength);
return this.raw(value);
}
throw new global.Error('invalid state, fork stack empty');
}}, {key: 'tag', value: function(a0, a1) {
return this.uint32((a0 << 3 | a1) >>> 0);
}}, {key: 'raw', value: function(a0) {
var chunks;
var Uint8Array;
var buf;
if (this.buf.length) {
chunks = this.chunks;
Uint8Array = global.Uint8Array;
buf = this.buf;
chunks.push(new Uint8Array());
this.buf = [];
}
this.chunks.push(a0);
return this;
}}, {key: 'uint32', value: function(a0) {
var r1;
var r3;
var buf;
var value = a0;
require(dependencyMap[2]).assertUInt32(value);
if (value > 127) {
for (r1 = value; true; r1 = value) {
buf = this.buf;
buf.push(127 & r1 | 128);
value = r1 >>> 7;
if (!(value > 127)) {
r3 = value;
break;
}
}
} else {
r3 = value;
}
this.buf.push(r3);
return this;
}}, {key: 'int32', value: value_15152}, {key: 'bool', value: function(a0) {
this.buf.push(a0 ? 1 : 0);
return this;
}}, {key: 'bytes', value: function(a0) {
this.uint32(a0.byteLength);
return this.raw(a0);
}}, {key: 'string', value: function(a0) {
var value = this.textEncoder.encode(a0);
this.uint32(value.byteLength);
return this.raw(value);
}}, {key: 'float', value: value_15156}, {key: 'double', value: function(a0) {
var property = global.Uint8Array;
var value2 = new property(8);
property = global.DataView;
var buffer = value2.buffer;
var value3 = Object.create(property.prototype, {constructor: {value: property}});
var value4 = new property(buffer);
(value4 instanceof Object ? value4 : value3).setFloat64(0, a0, true);
return this.raw(value2);
}}, {key: 'fixed32', value: value_15158}, {key: 'sfixed32', value: value_15159}, {key: 'sint32',
value: value_15160}, {key: 'sfixed64', value: value_15161}, {key: 'fixed64', value: value_15162}, {key: 'int64',
value: value_15163}, {key: 'sint64', value: value_15164}, {key: 'uint64', value: value_15165}]);
}
function BinaryWriter(a0) { // fn#15145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:372, offset: 0x00e24b67, size: 100 bytes, params: 2, frame: 14
const value = a0;
env1_2(this, BinaryWriter);
this.stack = [];
this.textEncoder = value ?? new global.TextEncoder();
this.chunks = [];
this.buf = [];
}
function value_15146() { // fn#15146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:525, offset: 0x00e24bcb, size: 240 bytes, params: 1, frame: 17
var r5;
var r6;
var r4;
var r3;
var value2;
var value3;
var set;
var value6;
let chunks = this.chunks;
const push = chunks.push;
let Uint8Array = global.Uint8Array;
let uint8Array = new Uint8Array(this.buf);
Reflect.apply(push, chunks, [uint8Array]);
let length = this.chunks.length;
uint8Array = 0;
if (uint8Array < length) {
r5 = uint8Array;
for (r6 = uint8Array; true; r6 = value2) {
chunks = this.chunks;
length = chunks[r5].length;
value2 = r6 + length;
value3 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
chunks = this.chunks;
length = chunks.length;
if (!(value3 < length)) {
r4 = value2;
break;
}
r5 = value3;
}
} else {
r4 = uint8Array;
}
Uint8Array = global.Uint8Array;
uint8Array = new Uint8Array();
length = this.chunks.length;
if (uint8Array < length) {
r3 = uint8Array;
for (r4 = uint8Array; true; r4 = uint8Array) {
set = uint8Array.set;
chunks = this.chunks;
Reflect.apply(set, uint8Array, [chunks[r3], r4]);
chunks = this.chunks;
length = chunks[r3].length;
uint8Array = r4 + length;
value6 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
chunks = this.chunks;
length = chunks.length;
if (!(value6 < length)) {
break;
}
r3 = value6;
}
}
this.chunks = [];
return uint8Array;
}
function value_15152(a0) { // fn#15152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:1494, offset: 0x00e24e70, size: 74 bytes, params: 2, frame: 16
let value = environment.__proto__;
(require(1325) /* metro dependency 1325 */).assertInt32(a0);
value = require(1322) /* metro dependency 1322 */;
value.varint32write(a0, this.buf);
return this;
}
function value_15156(a0) { // fn#15156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:1875, offset: 0x00e24f31, size: 136 bytes, params: 2, frame: 17
const value = environment.__proto__;
(require(1325) /* metro dependency 1325 */).assertFloat32(a0);
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(4);
const DataView = global.DataView;
const buffer = uint8Array.buffer;
const value2 = Object.create(DataView.prototype, {constructor: {value: DataView}});
const dataView = new DataView(buffer);
(dataView instanceof Object ? dataView : value2).setFloat32(0, a0, true);
return this.raw(uint8Array);
}
function value_15158(a0) { // fn#15158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:2152, offset: 0x00e2501d, size: 134 bytes, params: 2, frame: 17
const value = environment.__proto__;
(require(1325) /* metro dependency 1325 */).assertUInt32(a0);
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(4);
const DataView = global.DataView;
const buffer = uint8Array.buffer;
const value2 = Object.create(DataView.prototype, {constructor: {value: DataView}});
const dataView = new DataView(buffer);
(dataView instanceof Object ? dataView : value2).setUint32(0, a0, true);
return this.raw(uint8Array);
}
function value_15159(a0) { // fn#15159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:2304, offset: 0x00e250a3, size: 134 bytes, params: 2, frame: 17
const value = environment.__proto__;
(require(1325) /* metro dependency 1325 */).assertInt32(a0);
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(4);
const DataView = global.DataView;
const buffer = uint8Array.buffer;
const value2 = Object.create(DataView.prototype, {constructor: {value: DataView}});
const dataView = new DataView(buffer);
(dataView instanceof Object ? dataView : value2).setInt32(0, a0, true);
return this.raw(uint8Array);
}
function value_15160(a0) { // fn#15160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:2453, offset: 0x00e25129, size: 98 bytes, params: 2, frame: 16
let value = environment.__proto__;
(require(1325) /* metro dependency 1325 */).assertInt32(a0);
value = a0 << 1;
const value2 = a0 >> 31;
const moduleValue = require(1322) /* metro dependency 1322 */;
moduleValue.varint32write((value ^ value2) >>> 0, this.buf);
return this;
}
function value_15161(a0) { // fn#15161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:2584, offset: 0x00e2518b, size: 164 bytes, params: 2, frame: 19
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(8);
const DataView = global.DataView;
const dataView = new DataView(uint8Array.buffer);
const PbLong = (require(1323) /* metro dependency 1323 */).PbLong;
const value5 = PbLong.from(a0);
dataView.setInt32(0, value5.lo, true);
dataView.setInt32(4, value5.hi, true);
return this.raw(uint8Array);
}
function value_15162(a0) { // fn#15162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:2765, offset: 0x00e2522f, size: 164 bytes, params: 2, frame: 19
const Uint8Array = global.Uint8Array;
const uint8Array = new Uint8Array(8);
const DataView = global.DataView;
const dataView = new DataView(uint8Array.buffer);
const PbULong = (require(1323) /* metro dependency 1323 */).PbULong;
const value5 = PbULong.from(a0);
dataView.setInt32(0, value5.lo, true);
dataView.setInt32(4, value5.hi, true);
return this.raw(uint8Array);
}
function value_15163(a0) { // fn#15163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:2944, offset: 0x00e252d3, size: 92 bytes, params: 2, frame: 17
let value = environment.__proto__;
const PbLong = (require(1323) /* metro dependency 1323 */).PbLong;
value = PbLong.from(a0);
const moduleValue = require(1322) /* metro dependency 1322 */;
moduleValue.varint64write(value.lo, value.hi, this.buf);
return this;
}
function value_15164(a0) { // fn#15164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:3067, offset: 0x00e2532f, size: 138 bytes, params: 2, frame: 20
let value = environment.__proto__;
const PbLong = (require(1323) /* metro dependency 1323 */).PbLong;
value = PbLong.from(a0);
const value2 = value.hi >> 31;
const value3 = value.lo << 1;
const value4 = value.hi << 1;
value = value.lo >>> 31;
const moduleValue = require(1322) /* metro dependency 1322 */;
moduleValue.varint64write(value3 ^ value2, (value4 | value) ^ value2, this.buf);
return this;
}
function value_15165(a0) { // fn#15165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1451:3232, offset: 0x00e253b9, size: 92 bytes, params: 2, frame: 17
let value = environment.__proto__;
const PbULong = (require(1323) /* metro dependency 1323 */).PbULong;
value = PbULong.from(a0);
const moduleValue = require(1322) /* metro dependency 1322 */;
moduleValue.varint64write(value.lo, value.hi, this.buf);
return this;
}