520 lines
17 KiB
React
520 lines
17 KiB
React
/* Metro module 6406; source: unknown; dependencies: [6374, 6375, 6396, 6398, 6399, 6401, 6403] */
|
|
function _fun50210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:6, offset: 0x01213de8, size: 188 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_0 = importDefault(6374) /* metro dependency 6374 */;
|
|
const env0_1 = importDefault(6375) /* metro dependency 6375 */;
|
|
const env0_2 = importDefault(6396) /* metro dependency 6396 */;
|
|
const env0_3 = importDefault(6398) /* metro dependency 6398 */;
|
|
const env0_4 = importDefault(6399) /* metro dependency 6399 */;
|
|
const env0_5 = importDefault(6401) /* metro dependency 6401 */;
|
|
const RVLayoutManager = (require(6403) /* metro dependency 6403 */).RVLayoutManager;
|
|
exports.RVGridLayoutManagerImpl = _fun50214(RVLayoutManager);
|
|
}
|
|
|
|
function _isNativeReflectConstruct_50211() { // fn#50211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:166, offset: 0x01213ea4, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_50211_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun50214(a0) { // fn#50214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:391, offset: 0x01213f02, size: 329 bytes, params: 2, frame: 16
|
|
const closure = RVGridLayoutManagerImpl;
|
|
env0_5(closure, a0);
|
|
return env0_1(closure, [{key: 'updateLayoutParams', value: value_50216}, {key: 'processLayoutInfo',
|
|
value: function(a0, a1) {
|
|
var property;
|
|
var dimensions;
|
|
var layouts;
|
|
var height;
|
|
var error;
|
|
var iterator = a0[Symbol.iterator]();
|
|
var iterator2 = iterator.next;
|
|
var r3 = iterator;
|
|
var item2 = Reflect.apply(iterator2, r3, []);
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : r3;
|
|
reducibleJoin2: while (true) {
|
|
if (item2 === undefined) {
|
|
if (this.fullRelayoutRequired) {
|
|
this.updateAllWidths();
|
|
this.fullRelayoutRequired = false;
|
|
return 0;
|
|
}
|
|
return undefined;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleLoop2: while (true) {
|
|
try {
|
|
property = item.index;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
dimensions = item.dimensions;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
layouts = this.layouts;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property = layouts[property];
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
height = dimensions.height;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property.height = height;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property.isHeightMeasured = true;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
property.isWidthMeasured = true;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r3 = item2;
|
|
item2 = Reflect.apply(iterator2, r3, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r3;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop2;
|
|
}
|
|
continue reducibleLoop2;
|
|
}
|
|
if (this.fullRelayoutRequired) {
|
|
this.updateAllWidths();
|
|
this.fullRelayoutRequired = false;
|
|
return 0;
|
|
}
|
|
}}, {key: 'estimateLayout', value: function(a0) {
|
|
var property = this.layouts[a0];
|
|
property.width = this.getWidth(a0);
|
|
property.height = this.getEstimatedHeight(a0);
|
|
property.isWidthMeasured = true;
|
|
property.enforcedWidth = true;
|
|
}}, {key: 'handleSpanChange', value: function(a0) {
|
|
this.fullRelayoutRequired = true;
|
|
}}, {key: 'getLayoutSize', value: function() {
|
|
if (this.layouts.length === 0) {
|
|
return {'width': 0, 'height': 0};
|
|
}
|
|
return {width: this.boundedSize, height: this.computeTotalHeightTillRow(this.layouts.length - 1)};
|
|
}}, {key: 'recomputeLayouts', value: value_50223}, {key: 'getWidth', value: function(a0) {
|
|
return this.boundedSize / this.maxColumns * this.getSpan(a0);
|
|
}}, {key: 'processAndReturnTallestItemInRow', value: value_50225}, {key: 'computeTotalHeightTillRow',
|
|
value: value_50226}, {key: 'updateAllWidths', value: function() {
|
|
var r1;
|
|
var property;
|
|
var value = 0;
|
|
if (value < this.layouts.length) {
|
|
for (r1 = value; true; r1 = value) {
|
|
property = this.layouts[r1];
|
|
property.width = this.getWidth(r1);
|
|
value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (!(value < this.layouts.length)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}}, {key: 'checkBounds', value: function(a0, a1) {
|
|
return a0 + a1 <= this.boundedSize + 0.9;
|
|
}}, {key: 'locateFirstIndexInRow', value: function(a0) {
|
|
var r2;
|
|
var r3;
|
|
var value = a0;
|
|
if (value === 0) {
|
|
return 0;
|
|
}
|
|
if (value >= 0) {
|
|
if (this.layouts[value].x === 0) {
|
|
r3 = value;
|
|
} else {
|
|
r2 = value;
|
|
while (true) {
|
|
value = typeof r2 === 'bigint' ? r2 - 1n : +r2 - 1;
|
|
if (!(value >= 0)) {
|
|
r3 = value;
|
|
break;
|
|
}
|
|
if (this.layouts[value].x !== 0) {
|
|
r2 = value;
|
|
continue;
|
|
}
|
|
r3 = value;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
r3 = value;
|
|
}
|
|
var Math = global.Math;
|
|
return Math.max(r3, 0);
|
|
}}]);
|
|
}
|
|
|
|
function RVGridLayoutManagerImpl(a0, a1) { // fn#50215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:403, offset: 0x0121404b, size: 147 bytes, params: 3, frame: 20
|
|
let value = environment.__proto__;
|
|
env1_0(this, RVGridLayoutManagerImpl);
|
|
const items2 = [a0, a1];
|
|
const value3 = env1_3(RVGridLayoutManagerImpl);
|
|
value = env1_2(this, _isNativeReflectConstruct_50211() ? global.Reflect.construct(value3, items2,
|
|
env1_3(this).constructor) : value3.apply(this, items2));
|
|
value.fullRelayoutRequired = false;
|
|
value.boundedSize = a0.windowSize.width;
|
|
return value;
|
|
}
|
|
|
|
function value_50216(a0) { // fn#50216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:812, offset: 0x012140de, size: 181 bytes, params: 2, frame: 19
|
|
const maxColumns = this.maxColumns;
|
|
value_50216_superPropGet(RVGridLayoutManagerImpl, 'updateLayoutParams', this, 3)([a0]);
|
|
if (!(this.boundedSize === a0.windowSize.width && maxColumns === a0.maxColumns)) {
|
|
this.boundedSize = a0.windowSize.width;
|
|
if (this.layouts.length > 0) {
|
|
this.updateAllWidths();
|
|
this.recomputeLayouts(0, this.layouts.length - 1);
|
|
this.requiresRepaint = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_50223(a0, a1) { // fn#50223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:2060, offset: 0x012142b6, size: 203 bytes, params: 3, frame: 21
|
|
var r0;
|
|
var r4;
|
|
var r5;
|
|
var r9;
|
|
var layout;
|
|
var checkBounds;
|
|
var width;
|
|
var value5;
|
|
var height;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
const locateFirstIndexInRow = this.locateFirstIndexInRow;
|
|
const Math = global.Math;
|
|
const max = Math.max;
|
|
const value = 0;
|
|
const value2 = Reflect.apply(locateFirstIndexInRow, this, [Reflect.apply(max, Math, [value, a0 - 1])]);
|
|
let {x, y} = this.getLayout(value2);
|
|
if (value2 <= a1) {
|
|
r0 = value2;
|
|
r4 = y;
|
|
r5 = x;
|
|
while (true) {
|
|
layout = this.getLayout(r0);
|
|
checkBounds = this.checkBounds;
|
|
width = layout.width;
|
|
if (Reflect.apply(checkBounds, this, [r5, width])) {
|
|
r9 = r5;
|
|
} else {
|
|
value5 = this.processAndReturnTallestItemInRow(r0 - 1);
|
|
y = value5.y;
|
|
height = value5.height;
|
|
value6 = y + height;
|
|
r4 = value6;
|
|
r9 = value;
|
|
}
|
|
layout.x = r9;
|
|
layout.y = r4;
|
|
width = layout.width;
|
|
value7 = r9 + width;
|
|
value8 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
|
if (value8 <= a1) {
|
|
r0 = value8;
|
|
r5 = value7;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (a1 === this.layouts.length - 1) {
|
|
this.processAndReturnTallestItemInRow(a1);
|
|
}
|
|
}
|
|
|
|
function value_50225(a0) { // fn#50225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:2556, offset: 0x01214381, size: 446 bytes, params: 2, frame: 33
|
|
var r11;
|
|
var r12;
|
|
var r13;
|
|
var r14;
|
|
var r19;
|
|
var height;
|
|
var r21;
|
|
var r0;
|
|
var r3;
|
|
var r7;
|
|
var layouts;
|
|
var property;
|
|
var Boolean;
|
|
var isHeightMeasured;
|
|
var value5;
|
|
var Math;
|
|
var max;
|
|
var value6;
|
|
var minHeight;
|
|
var value7;
|
|
var height2;
|
|
var value8;
|
|
var value9;
|
|
var length;
|
|
let value = this.locateFirstIndexInRow(a0);
|
|
const value2 = undefined;
|
|
const value3 = 0;
|
|
const value4 = false;
|
|
if (value <= a0) {
|
|
r11 = value4;
|
|
r12 = value;
|
|
r13 = value3;
|
|
r14 = value2;
|
|
while (true) {
|
|
layouts = this.layouts;
|
|
property = layouts[r12];
|
|
if (!r11) {
|
|
Boolean = global.Boolean;
|
|
isHeightMeasured = property.isHeightMeasured;
|
|
value5 = Boolean(isHeightMeasured);
|
|
r11 = value5;
|
|
}
|
|
Math = global.Math;
|
|
max = Math.max;
|
|
height = property.height;
|
|
value6 = Reflect.apply(max, Math, [r13, height]);
|
|
height = property.height;
|
|
minHeight = property.minHeight;
|
|
if (minHeight != null) {
|
|
r19 = minHeight;
|
|
continue;
|
|
}
|
|
r19 = value3;
|
|
continue;
|
|
value7 = height > r19;
|
|
if (!value7) {
|
|
r19 = value7;
|
|
continue;
|
|
}
|
|
height2 = property.height;
|
|
if (r14 == null) {
|
|
height = value2;
|
|
continue;
|
|
}
|
|
height = r14.height;
|
|
if (height != null) {
|
|
r21 = height;
|
|
continue;
|
|
}
|
|
r21 = value3;
|
|
continue;
|
|
value8 = height2 > r21;
|
|
r19 = value8;
|
|
if (r19) {
|
|
r14 = property;
|
|
continue;
|
|
}
|
|
continue;
|
|
value9 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
|
|
layouts = this.layouts;
|
|
length = layouts.length;
|
|
if (value9 >= length) {
|
|
r0 = r14;
|
|
r3 = r11;
|
|
r7 = value6;
|
|
break;
|
|
}
|
|
if (value9 <= a0) {
|
|
r12 = value9;
|
|
r13 = value6;
|
|
continue;
|
|
}
|
|
r0 = r14;
|
|
r3 = r11;
|
|
r7 = value6;
|
|
break;
|
|
}
|
|
} else {
|
|
r0 = value2;
|
|
r3 = value4;
|
|
r7 = value3;
|
|
}
|
|
r7 = !r0 && r7 > value3 ? global.Number.MAX_SAFE_INTEGER : r7;
|
|
r0 = r0 ?? this.layouts[value];
|
|
if (r3) {
|
|
if (r0) {
|
|
height = r0.height;
|
|
if (r7 - r0.height > 1) {
|
|
this.requiresRepaint = true;
|
|
height = value3;
|
|
}
|
|
if (value <= a0) {
|
|
layouts = this.layouts;
|
|
layouts[value].minHeight = height;
|
|
if (height > value3) {
|
|
this.layouts[value].height = height;
|
|
}
|
|
value = typeof value === 'bigint' ? value + 1n : +value + 1;
|
|
layouts = this.layouts;
|
|
length = layouts.length;
|
|
if (!(value >= length)) {
|
|
r3 = value;
|
|
while (true) {
|
|
if (!(r3 <= a0)) {
|
|
break;
|
|
}
|
|
layouts = this.layouts;
|
|
layouts[r3].minHeight = height;
|
|
if (!(height > value3)) {
|
|
continue;
|
|
}
|
|
this.layouts[r3].height = height;
|
|
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
layouts = this.layouts;
|
|
length = layouts.length;
|
|
if (value >= length) {
|
|
break;
|
|
}
|
|
r3 = value;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
r0.minHeight = value3;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_50226(a0) { // fn#50226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:3194, offset: 0x0121453f, size: 164 bytes, params: 2, frame: 19
|
|
var r3;
|
|
var r4;
|
|
var r0;
|
|
var Math;
|
|
var max;
|
|
var height;
|
|
var value3;
|
|
var length;
|
|
var value4;
|
|
let value = this.locateFirstIndexInRow(a0);
|
|
let layouts = this.layouts;
|
|
const y = layouts[value].y;
|
|
const value2 = 0;
|
|
if (value <= a0) {
|
|
Math = global.Math;
|
|
max = Math.max;
|
|
layouts = this.layouts;
|
|
height = layouts[value].height;
|
|
value3 = Reflect.apply(max, Math, [value2, height]);
|
|
value = typeof value === 'bigint' ? value + 1n : +value + 1;
|
|
layouts = this.layouts;
|
|
length = layouts.length;
|
|
if (value >= length) {
|
|
r0 = value3;
|
|
} else {
|
|
r3 = value3;
|
|
r4 = value;
|
|
while (true) {
|
|
if (!(r4 <= a0)) {
|
|
r0 = r3;
|
|
break;
|
|
}
|
|
Math = global.Math;
|
|
max = Math.max;
|
|
layouts = this.layouts;
|
|
height = layouts[r4].height;
|
|
value = Reflect.apply(max, Math, [r3, height]);
|
|
value4 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
layouts = this.layouts;
|
|
length = layouts.length;
|
|
if (value4 >= length) {
|
|
r0 = value;
|
|
break;
|
|
}
|
|
r3 = value;
|
|
r4 = value4;
|
|
continue;
|
|
}
|
|
}
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return y + r0;
|
|
}
|
|
|
|
function value_50216_superPropGet(a0, a1, a2, a3) { // fn#50217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6584:866, owner: value_50216._superPropGet, offset: 0x01214193, size: 100 bytes, params: 5, frame: 18
|
|
let value = a0;
|
|
const env0_0 = a2;
|
|
const binding = env2_4;
|
|
value = env2_3(1 & 3 ? value.prototype : value);
|
|
value = binding(value, 'updateLayoutParams', a2);
|
|
return 2 & 3 ? typeof value !== 'function' ? value : _fun50218 : value;
|
|
}
|
|
|