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

748 lines
24 KiB
JavaScript

/* Metro module 1396; source: unknown; dependencies: [] */
function _fun16372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:6, offset: 0x00e4df8f, size: 397 bytes, params: 8, frame: 4
const exports_163732 = exports_16373;
const Node2 = Node;
module.exports = exports_163732;
exports_163732.Node = Node2;
exports_163732.create = exports_163732;
exports_163732.prototype.removeNode = removeNode_16378;
exports_163732.prototype.unshiftNode = function(a0) {
var property;
if (a0 !== this.head) {
if (a0.list) {
a0.list.removeNode(a0);
}
property = this.head;
a0.list = this;
a0.next = property;
if (property) {
property.prev = a0;
}
this.head = a0;
if (!this.tail) {
this.tail = a0;
}
property = this.length;
this.length = typeof property === 'bigint' ? property + 1n : +property + 1;
}
};
exports_163732.prototype.pushNode = function(a0) {
var property;
if (a0 !== this.tail) {
if (a0.list) {
a0.list.removeNode(a0);
}
property = this.tail;
a0.list = this;
a0.prev = property;
if (property) {
property.next = a0;
}
this.tail = a0;
if (!this.head) {
this.head = a0;
}
property = this.length;
this.length = typeof property === 'bigint' ? property + 1n : +property + 1;
}
};
exports_163732.prototype.push = function() {
var r2;
var value4;
var value = arguments.length;
var value2 = 0;
if (value2 < value) {
for (r2 = value2; true; r2 = value4) {
push_16375(this, arguments[r2]);
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value4 < value)) {
break;
}
}
}
return this.length;
};
exports_163732.prototype.unshift = function() {
var r2;
var value4;
var value = arguments.length;
var value2 = 0;
if (value2 < value) {
for (r2 = value2; true; r2 = value4) {
unshift_16376(this, arguments[r2]);
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value4 < value)) {
break;
}
}
}
return this.length;
};
exports_163732.prototype.pop = function() {
var value;
var length;
if (this.tail) {
value = this.tail.value;
this.tail = this.tail.prev;
if (this.tail) {
this.tail.next = null;
} else {
this.head = null;
}
length = this.length;
this.length = typeof length === 'bigint' ? length - 1n : +length - 1;
return value;
}
};
exports_163732.prototype.shift = function() {
var value;
var length;
if (this.head) {
value = this.head.value;
this.head = this.head.next;
if (this.head) {
this.head.prev = null;
} else {
this.tail = null;
}
length = this.length;
this.length = typeof length === 'bigint' ? length - 1n : +length - 1;
return value;
}
};
exports_163732.prototype.forEach = function(a0, a1) {
var r1;
var r2;
var value = a1;
var value2 = this;
var r4 = value || value2;
var property = value2.head;
value = 0;
if (property !== null) {
r1 = value;
r2 = property;
reducibleLoop2: while (true) {
a0.call(r4, r2.value, r1, value2);
property = r2.next;
value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (property !== null) {
r1 = value;
r2 = property;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
};
exports_163732.prototype.forEachReverse = function(a0, a1) {
var r1;
var r2;
var value = a1;
var value2 = this;
var r4 = value || value2;
var property = value2.tail;
value = value2.length - 1;
if (property !== null) {
r1 = value;
r2 = property;
reducibleLoop2: while (true) {
a0.call(r4, r2.value, r1, value2);
property = r2.prev;
value = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
if (property !== null) {
r1 = value;
r2 = property;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
};
exports_163732.prototype.get = function(a0) {
var r4;
var r5;
var r0;
var r2;
var property = this.head;
var value = 0;
if (property === null) {
r0 = property;
r2 = value;
} else if (value < a0) {
r4 = property;
r5 = value;
while (true) {
property = r4.next;
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (property === null) {
r0 = property;
r2 = value;
break;
}
if (value < a0) {
r4 = property;
r5 = value;
continue;
}
r0 = property;
r2 = value;
break;
}
} else {
r0 = property;
r2 = value;
}
if (r2 === a0) {
if (r0 !== null) {
return r0.value;
}
}
};
exports_163732.prototype.getReverse = function(a0) {
var r4;
var r5;
var r0;
var r2;
var property = this.tail;
var value = 0;
if (property === null) {
r0 = property;
r2 = value;
} else if (value < a0) {
r4 = property;
r5 = value;
while (true) {
property = r4.prev;
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (property === null) {
r0 = property;
r2 = value;
break;
}
if (value < a0) {
r4 = property;
r5 = value;
continue;
}
r0 = property;
r2 = value;
break;
}
} else {
r0 = property;
r2 = value;
}
if (r2 === a0) {
if (r0 !== null) {
return r0.value;
}
}
};
exports_163732.prototype.map = map_16389;
exports_163732.prototype.mapReverse = mapReverse;
exports_163732.prototype.reduce = reduce_16391;
exports_163732.prototype.reduceReverse = reduceReverse;
exports_163732.prototype.toArray = function() {
var r2;
var r3;
var value4;
var property = global.Array;
var value2 = new property(this.length);
property = this.head;
if (property !== null) {
r2 = 0;
for (r3 = property; true; r3 = property) {
value2[r2] = r3.value;
property = r3.next;
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (property === null) {
break;
}
r2 = value4;
}
}
return value2;
};
exports_163732.prototype.toArrayReverse = function() {
var r2;
var r3;
var value4;
var property = global.Array;
var value2 = new property(this.length);
property = this.tail;
if (property !== null) {
r2 = 0;
for (r3 = property; true; r3 = property) {
value2[r2] = r3.value;
property = r3.prev;
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (property === null) {
break;
}
r2 = value4;
}
}
return value2;
};
exports_163732.prototype.slice = slice_16395;
exports_163732.prototype.sliceReverse = sliceReverse;
exports_163732.prototype.reverse = function() {
var r3;
var prev;
var prev2;
var head = this.head;
var tail = this.tail;
if (head !== null) {
for (r3 = head; true; r3 = prev2) {
prev = r3.prev;
r3.prev = r3.next;
r3.next = prev;
prev2 = r3.prev;
if (prev2 === null) {
break;
}
}
}
this.head = tail;
this.tail = head;
return this;
};
function create_16373(a0) { // fn#16373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:31, offset: 0x00e4e11c, size: 158 bytes, params: 2, frame: 16
var r0;
var r4;
var prototype;
var exports_163732;
var forEach;
var length;
var push;
let value = this;
var env0_0;
let exports_16373Binding = exports_16373;
reducibleJoin2: while (true) {
if (value instanceof exports_16373Binding) {
r0 = value;
break reducibleJoin2;
}
exports_16373Binding = exports_16373;
prototype = exports_16373Binding.prototype;
value = Object.create(prototype, {constructor: {value: exports_16373Binding}});
exports_163732 = new exports_16373Binding();
value = exports_163732 instanceof Object ? exports_163732 : value;
env0_0 = value;
r0 = value;
break reducibleJoin2;
}
r0.tail = null;
r0.head = null;
r0.length = 0;
reducibleJoin8: while (true) {
reducibleJoin4: while (true) {
if (a0) {
forEach = a0.forEach;
if (typeof forEach === 'function') {
forEach = a0.forEach;
Reflect.apply(forEach, a0, [_fun16374]);
break reducibleJoin8;
}
break reducibleJoin4;
}
break reducibleJoin4;
}
if (!(arguments.length > value)) {
break reducibleJoin8;
}
length = arguments.length;
if (!(value < length)) {
break reducibleJoin8;
}
r4 = value;
reducibleLoop6: while (true) {
push = r0.push;
Reflect.apply(push, r0, [arguments[r4]]);
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
if (value < length) {
r4 = value;
continue reducibleLoop6;
}
break reducibleJoin8;
}
break reducibleJoin8;
}
return r0;
function _fun16374(a0) { // fn#16374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:181, offset: 0x00c786d6, size: 24 bytes, params: 2, frame: 11
env0_0.push(a0);
}
}
function push_16375(a0, a1) { // fn#16375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:302, offset: 0x00e4e1ba, size: 89 bytes, params: 3, frame: 17
a0.tail = new Node(a1, a0.tail, null, a0);
if (!a0.head) {
a0.head = a0.tail;
}
const length = a0.length;
a0.length = typeof length === 'bigint' ? length + 1n : +length + 1;
}
function unshift_16376(a0, a1) { // fn#16376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:389, offset: 0x00e4e213, size: 89 bytes, params: 3, frame: 17
a0.head = new Node(a1, null, a0.head, a0);
if (!a0.tail) {
a0.tail = a0.head;
}
const length = a0.length;
a0.length = typeof length === 'bigint' ? length + 1n : +length + 1;
}
function Node(a0, a1, a2, a3) { // fn#16377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:479, offset: 0x00e4e26c, size: 132 bytes, params: 5, frame: 18
if (this instanceof Node) {
this.list = a3;
this.value = a0;
if (a1) {
a1.next = this;
this.prev = a1;
} else {
this.prev = null;
}
if (a2) {
a2.prev = this;
this.next = a2;
} else {
this.next = null;
}
return undefined;
}
const value = Object.create(Node.prototype, {constructor: {value: Node}});
const node = new Node(a0, a1, a2, a3);
return node instanceof Object ? node : value;
}
function map_16389(a0, a1) { // fn#16389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:2496, offset: 0x00e4e6cd, size: 91 bytes, params: 3, frame: 19
var r2;
var push;
var call;
var value3;
var next;
const value = a1;
const value2 = this;
const r4 = value || value2;
const exports_163732 = new exports_16373();
const head = value2.head;
if (head !== null) {
r2 = head;
reducibleLoop2: while (true) {
push = exports_163732.push;
call = a0.call;
value3 = r2.value;
Reflect.apply(push, exports_163732, [Reflect.apply(call, a0, [r4, value3, value2])]);
next = r2.next;
if (next !== null) {
r2 = next;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
return exports_163732;
}
function mapReverse(a0, a1) { // fn#16390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:2643, offset: 0x00e4e728, size: 92 bytes, params: 3, frame: 19
var r2;
var push;
var call;
var value3;
var prev;
const value = a1;
const value2 = this;
const r4 = value || value2;
const exports_163732 = new exports_16373();
const tail = value2.tail;
if (tail !== null) {
r2 = tail;
reducibleLoop2: while (true) {
push = exports_163732.push;
call = a0.call;
value3 = r2.value;
Reflect.apply(push, exports_163732, [Reflect.apply(call, a0, [r4, value3, value2])]);
prev = r2.prev;
if (prev !== null) {
r2 = prev;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
return exports_163732;
}
function slice_16395(a0, a1) { // fn#16395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:3601, offset: 0x00e4e932, size: 227 bytes, params: 3, frame: 19
var r6;
var r7;
var r1;
var next;
var value5;
var push;
var value6;
var value7;
const value = a0;
const r3 = a1 || this.length;
const value3 = 0;
let r4 = r3 < value3 ? r3 + this.length : r3;
let r2 = value || value3;
let r8 = r2 < value3 ? r2 + this.length : r2;
const exports_163732 = new exports_16373();
if (!(r4 < r8)) {
if (r4 < value3) {
return exports_163732;
}
r8 = r8 < value3 ? value3 : r8;
r4 = r4 > this.length ? this.length : r4;
var head = this.head;
if (head === null) {
r1 = head;
r2 = value3;
} else if (value3 < r8) {
r6 = head;
r7 = value3;
while (true) {
next = r6.next;
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (next === null) {
r1 = next;
r2 = value5;
break;
}
if (value5 < r8) {
r6 = next;
r7 = value5;
continue;
}
r1 = next;
r2 = value5;
break;
}
} else {
r1 = head;
r2 = value3;
}
if (r1 !== null) {
if (r2 < r4) {
while (true) {
push = exports_163732.push;
value6 = r1.value;
Reflect.apply(push, exports_163732, [value6]);
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
next = r1.next;
if (next === null) {
break;
}
if (value7 < r4) {
r1 = next;
r2 = value7;
continue;
}
break;
}
}
}
}
return exports_163732;
}
function sliceReverse(a0, a1) { // fn#16396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:3904, offset: 0x00e4ea15, size: 234 bytes, params: 3, frame: 19
var r6;
var r7;
var r1;
var r2;
var prev;
var value5;
var push;
var value6;
var value7;
const value = a0;
let r4 = a1 || this.length;
const value3 = 0;
let r8 = r4 < value3 ? r4 + this.length : r4;
const r3 = value || value3;
r4 = r3 < value3 ? r3 + this.length : r3;
const exports_163732 = new exports_16373();
if (!(r8 < r4)) {
if (r8 < value3) {
return exports_163732;
}
r4 = r4 < value3 ? value3 : r4;
var length = this.length;
r8 = r8 > length ? this.length : r8;
length = this.length;
var tail = this.tail;
if (tail === null) {
r1 = tail;
r2 = length;
} else if (length > r8) {
r6 = tail;
r7 = length;
while (true) {
prev = r6.prev;
value5 = typeof r7 === 'bigint' ? r7 - 1n : +r7 - 1;
if (prev === null) {
r1 = prev;
r2 = value5;
break;
}
if (value5 > r8) {
r6 = prev;
r7 = value5;
continue;
}
r1 = prev;
r2 = value5;
break;
}
} else {
r1 = tail;
r2 = length;
}
if (r1 !== null) {
if (r2 > r4) {
while (true) {
push = exports_163732.push;
value6 = r1.value;
Reflect.apply(push, exports_163732, [value6]);
value7 = typeof r2 === 'bigint' ? r2 - 1n : +r2 - 1;
prev = r1.prev;
if (prev === null) {
break;
}
if (value7 > r4) {
r1 = prev;
r2 = value7;
continue;
}
break;
}
}
}
}
return exports_163732;
}
}
function removeNode_16378(a0) { // fn#16378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:753, offset: 0x00e4e2f0, size: 156 bytes, params: 2, frame: 13
let list = a0.list;
if (list !== this) {
throw new global.Error('removing node which does not belong to this list');
}
const next = a0.next;
const prev = a0.prev;
if (next) {
next.prev = prev;
}
if (prev) {
prev.next = next;
}
if (a0 === this.head) {
this.head = next;
}
if (a0 === this.tail) {
this.tail = prev;
}
list = a0.list;
const length = list.length;
list.length = typeof length === 'bigint' ? length - 1n : +length - 1;
a0.next = null;
a0.prev = null;
a0.list = null;
}
function reduce_16391(a0, a1) { // fn#16391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:2786, offset: 0x00e4e784, size: 138 bytes, params: 3, frame: 18
var r0;
var r4;
var r1;
var r3;
var next;
var value2;
let value = a1;
let head = this.head;
if (arguments.length > 1) {
r0 = value;
r4 = head;
} else {
head = this.head;
if (!head) {
throw new global.TypeError('Reduce of empty list with no initial value');
}
head = this.head;
next = head.next;
head = this.head;
r0 = head.value;
r4 = next;
}
value = 0;
if (r4 !== null) {
r1 = r0;
r3 = value;
reducibleLoop5: while (true) {
value = r4.value;
value = a0(r1, value, r3);
next = r4.next;
value2 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (next !== null) {
r1 = value;
r3 = value2;
r4 = next;
continue reducibleLoop5;
}
r0 = value;
break reducibleLoop5;
}
}
return r0;
}
function reduceReverse(a0, a1) { // fn#16392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1523:3057, offset: 0x00e4e80e, size: 147 bytes, params: 3, frame: 19
var r0;
var r4;
var r1;
var r3;
var prev;
var value2;
let value = a1;
let tail = this.tail;
if (arguments.length > 1) {
r0 = value;
r4 = tail;
} else {
tail = this.tail;
if (!tail) {
throw new global.TypeError('Reduce of empty list with no initial value');
}
tail = this.tail;
prev = tail.prev;
tail = this.tail;
r0 = tail.value;
r4 = prev;
}
value = this.length - 1;
if (r4 !== null) {
r1 = r0;
r3 = value;
reducibleLoop5: while (true) {
value = r4.value;
value = a0(r1, value, r3);
prev = r4.prev;
value2 = typeof r3 === 'bigint' ? r3 - 1n : +r3 - 1;
if (prev !== null) {
r1 = value;
r3 = value2;
r4 = prev;
continue reducibleLoop5;
}
r0 = value;
break reducibleLoop5;
}
}
return r0;
}
global.__d(_fun16372, 1396, []) /* metro module 1396 */;