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

260 lines
11 KiB
React

/* Metro module 6480; source: unknown; dependencies: [6465] */
function _fun51010(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:6, offset: 0x01226f36, size: 147 bytes, params: 8, frame: 18
var closure;
const value = this;
const env0_0 = require;
if (value && value.__extends) {
}
if (!(value && value.__assign)) {
closure = function() {
var r3;
r3 = global.Object.assign || _fun51017;
env0_4 = r3;
return r3.apply(this, arguments);
};
}
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.default = _fun51018((require(6465) /* metro dependency 6465 */).default);
}
function extendStatics_51011(a0, a1) { // fn#51011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:78, offset: 0x01226fc9, size: 78 bytes, params: 3, frame: 13
var r3;
var Array;
var value;
const Object = global.Object;
const setPrototypeOf = Object.setPrototypeOf;
if (setPrototypeOf) {
r3 = setPrototypeOf;
} else {
Array = global.Array;
value = Object.create([]);
value = value instanceof Array;
r3 = value && (function(a0, a1) {
a0.__proto__ = a1;
});
}
r3 = !r3 ? function(a0, a1) {
var r3;
var propertyName;
var propertyName2;
var hasOwnProperty;
for (propertyName in a1) {
hasOwnProperty = global.Object.prototype.hasOwnProperty;
if (!hasOwnProperty.call(a1, propertyName)) {
r3 = propertyName2;
continue;
}
a0[propertyName] = a1[propertyName];
r3 = propertyName2;
}
} : r3;
return r3(a0, a1);
}
function _fun51014(a0, a1) { // fn#51014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:293, offset: 0x01227017, size: 177 bytes, params: 3, frame: 15
var r1;
var value;
var prototype;
var closure2;
var TypeError;
var value3;
var typeError;
const env0_0 = a0;
const closure = ___51015;
if (typeof a1 === 'function') {
extendStatics_51011(a0, a1);
if (a1 === null) {
r1 = global.Object.create(a1);
} else {
prototype = a1.prototype;
closure.prototype = prototype;
prototype = closure.prototype;
value = Object.create(prototype, {constructor: {value: closure}});
closure2 = new closure();
value = closure2 instanceof Object ? closure2 : value;
r1 = value;
}
a0.prototype = r1;
} else {
if (a1 !== null) {
TypeError = global.TypeError;
value = global.String(a1);
value = 'Class extends value ' + value;
value3 = Object.create(TypeError.prototype, {constructor: {value: TypeError}});
value += ' is not a constructor or null';
typeError = new TypeError();
value = typeError instanceof Object ? typeError : value3;
throw value;
}
extendStatics_51011(a0, a1);
if (a1 === null) {
r1 = global.Object.create(a1);
} else {
prototype = a1.prototype;
closure.prototype = prototype;
prototype = closure.prototype;
value = Object.create(prototype, {constructor: {value: closure}});
closure2 = new closure();
value = closure2 instanceof Object ? closure2 : value;
r1 = value;
}
a0.prototype = r1;
}
}
function _fun51016() { // fn#51016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:564, offset: 0x012270c8, size: 53 bytes, params: 1, frame: 13
const Object = global.Object;
return (Object.assign || (function(a0) {
var r2;
var r10;
var value3;
var propertyName;
var propertyName2;
var hasOwnProperty;
var value4;
var value = arguments.length;
var value2 = 1;
if (value2 < value) {
r2 = value2;
while (true) {
value3 = arguments[r2];
for (propertyName in value3) {
hasOwnProperty = global.Object.prototype.hasOwnProperty;
if (!hasOwnProperty.call(value3, propertyName)) {
r10 = propertyName2;
continue;
}
a0[propertyName] = value3[propertyName];
r10 = propertyName2;
}
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value4 < value) {
r2 = value4;
continue;
}
break;
}
}
return a0;
})).apply(this, arguments);
}
function _fun51018(a0) { // fn#51018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:825, offset: 0x012270fd, size: 231 bytes, params: 2, frame: 15
let env0_0 = a0;
const closure = ProgressiveListView;
env0_3(closure, a0);
closure.prototype.componentDidMount = componentDidMount_51020;
closure.prototype.componentWillUnmount = componentWillUnmount_51021;
closure.prototype.onItemLayout = onItemLayout_51022;
closure.prototype.updateRenderAheadProgressively = function(a0) {
var env0_0 = a0;
var env0_1 = this;
this.cancelRenderAheadUpdate();
this.renderAheadUpdateCallbackId = global.requestAnimationFrame(_fun51024);
};
closure.prototype.incrementRenderAhead = incrementRenderAhead;
closure.prototype.performFinalUpdate = function() {
var env0_0 = this;
this.cancelRenderAheadUpdate();
this.renderAheadUpdateCallbackId = global.requestAnimationFrame(_fun51027);
};
closure.prototype.cancelRenderAheadUpdate = function() {
if (this.renderAheadUpdateCallbackId !== undefined) {
global.cancelAnimationFrame(this.renderAheadUpdateCallbackId);
}
};
const binding = env0_4;
const value = binding({}, (require(6465) /* metro dependency 6465 */).default.defaultProps);
const Number = global.Number;
const MAX_VALUE = Number.MAX_VALUE;
closure.defaultProps = binding(value, {'maxRenderAhead': null, 'renderAheadStep': 300, 'renderAheadOffset': 0,
maxRenderAhead: MAX_VALUE});
return closure;
}
function ProgressiveListView() { // fn#51019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:837, offset: 0x012271e4, size: 54 bytes, params: 1, frame: 15
const value = this;
let r0 = env0_0 !== null && env0_0.apply(value, arguments);
r0 = !r0 ? value : r0;
r0.isFirstLayoutComplete = false;
return r0;
}
function componentDidMount_51020() { // fn#51020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:1030, offset: 0x0122721a, size: 70 bytes, params: 1, frame: 11
env0_0.prototype.componentDidMount.call(this);
if (!this.props.forceNonDeterministicRendering) {
this.updateRenderAheadProgressively(this.getCurrentRenderAheadOffset());
}
}
function componentWillUnmount_51021() { // fn#51021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:1249, offset: 0x01227260, size: 45 bytes, params: 1, frame: 11
this.cancelRenderAheadUpdate();
env0_0.prototype.componentWillUnmount.call(this);
}
function onItemLayout_51022(a0) { // fn#51022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:1379, offset: 0x0122728d, size: 91 bytes, params: 2, frame: 13
if (!this.isFirstLayoutComplete) {
this.isFirstLayoutComplete = true;
if (this.props.forceNonDeterministicRendering) {
this.updateRenderAheadProgressively(this.getCurrentRenderAheadOffset());
}
}
env0_0.prototype.onItemLayout.call(this, a0);
}
function updateRenderAheadProgressively(a0) { // fn#51023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:1666, offset: 0x012272e8, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
this.cancelRenderAheadUpdate();
this.renderAheadUpdateCallbackId = global.requestAnimationFrame(_fun51024);
}
function incrementRenderAhead() { // fn#51025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:1932, offset: 0x0122735a, size: 167 bytes, params: 1, frame: 13
var value;
var currentRenderAheadOffset;
if (this.props.maxRenderAhead) {
if (this.props.renderAheadStep) {
value = this.getVirtualRenderer();
value = value.getLayoutManager();
currentRenderAheadOffset = this.getCurrentRenderAheadOffset();
if (value) {
value = value.getContentDimension();
if (currentRenderAheadOffset < (this.props.isHorizontal ? value.width : value.height)) {
if (currentRenderAheadOffset < this.props.maxRenderAhead) {
this.updateRenderAheadProgressively(currentRenderAheadOffset + this.props.renderAheadStep);
} else {
this.performFinalUpdate();
}
} else {
this.performFinalUpdate();
}
}
}
}
}
function performFinalUpdate() { // fn#51026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:2360, offset: 0x01227401, size: 47 bytes, params: 1, frame: 12
this.cancelRenderAheadUpdate();
this.renderAheadUpdateCallbackId = global.requestAnimationFrame(_fun51027);
}
function _fun51024() { // fn#51024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:1776, offset: 0x0122731e, size: 60 bytes, params: 1, frame: 12
let binding = env0_1;
const value2 = binding.updateRenderAheadOffset(env0_0);
binding = env0_1;
if (value2) {
binding.incrementRenderAhead();
} else {
binding.updateRenderAheadProgressively(env0_0);
}
}
function _fun51027() { // fn#51027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6658:2469, offset: 0x01227430, size: 52 bytes, params: 1, frame: 12
var binding;
if (env0_0.props.finalRenderAheadOffset !== undefined) {
binding = env0_0;
binding.updateRenderAheadOffset(binding.props.finalRenderAheadOffset);
}
}