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

144 lines
6.0 KiB
JavaScript

/* Metro module 6449; source: unknown; dependencies: [31] */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
function _fun50620(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6627:6, offset: 0x0121e68e, size: 122 bytes, params: 8, frame: 16
const value = this;
if (value && value.__extends) {
}
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.ComponentCompat = undefined;
const Component = (ReactModule).Component;
exports.ComponentCompat = _fun50626(Component);
function extendStatics_50621(a0, a1) { // fn#50621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6627:77, offset: 0x0121e708, 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 _fun50624(a0, a1) { // fn#50624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6627:292, offset: 0x0121e756, size: 177 bytes, params: 3, frame: 15
var r1;
var value;
var prototype;
var ___5062522;
var TypeError;
var value3;
var typeError;
const env0_0 = a0;
const ___506252 = ___50625;
if (typeof a1 === 'function') {
extendStatics_50621(a0, a1);
if (a1 === null) {
r1 = global.Object.create(a1);
} else {
prototype = a1.prototype;
___506252.prototype = prototype;
prototype = ___506252.prototype;
value = Object.create(prototype, {constructor: {value: ___506252}});
___5062522 = new ___506252();
value = ___5062522 instanceof Object ? ___5062522 : 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_50621(a0, a1);
if (a1 === null) {
r1 = global.Object.create(a1);
} else {
prototype = a1.prototype;
___506252.prototype = prototype;
prototype = ___506252.prototype;
value = Object.create(prototype, {constructor: {value: ___506252}});
___5062522 = new ___506252();
value = ___5062522 instanceof Object ? ___5062522 : value;
r1 = value;
}
a0.prototype = r1;
}
function ___50625() { // fn#50625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6627:426, offset: 0x0121c997, size: 20 bytes, params: 1, frame: 2
this.constructor = env0_0;
}
}
function _fun50626(a0) { // fn#50626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6627:620, offset: 0x0121e807, size: 127 bytes, params: 2, frame: 14
const env0_0 = a0;
const ComponentCompat2 = ComponentCompat;
env0_1(ComponentCompat2, a0);
ComponentCompat2.prototype.shouldComponentUpdate = function(a0, a1) {
if (this.props !== a0) {
this.componentWillReceivePropsCompat(a0);
}
return true;
};
ComponentCompat2.prototype.getHasRenderedOnce = function() {
return this._hasRenderedOnce;
};
ComponentCompat2.prototype.componentWillReceivePropsCompat = function(a0) {
};
ComponentCompat2.prototype.componentWillMountCompat = function() {
};
ComponentCompat2.prototype.componentWillUpdateCompat = function() {
};
ComponentCompat2.prototype.render = function() {
if (this._hasRenderedOnce) {
this.componentWillUpdateCompat();
} else {
this._hasRenderedOnce = true;
this.componentWillMountCompat();
}
return this.renderCompat();
};
return ComponentCompat2;
function ComponentCompat(a0, a1) { // fn#50627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6627:632, offset: 0x0121e886, size: 52 bytes, params: 3, frame: 15
const value = this;
const r0 = env0_0.call(value, a0, a1) || value;
r0._hasRenderedOnce = false;
r0._didPropsChange = false;
return r0;
}
}
}
global.__d(_fun50620, 6449, [31]) /* metro module 6449, dependencies: [31] */;