Files
2026-07-28 01:06:53 +03:00

391 lines
17 KiB
JavaScript

/* Metro module 4104; source: unknown; dependencies: [] */
function _fun33632(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4262:6, offset: 0x0103675e, size: 89 bytes, params: 8, frame: 3
exports.parse = parse_33633;
exports.serialize = serialize_33635;
const env0_0 = global.decodeURIComponent;
const env0_1 = global.encodeURIComponent;
const env0_2 = RegExp('; *', '');
const env0_3 = RegExp('^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$', '');
function parse_33633(a0, a1) { // fn#33633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4269:10, offset: 0x010367b7, size: 117 bytes, params: 3, frame: 15
const value = a1;
if (typeof a0 !== 'string') {
throw new global.TypeError('argument str must be a string');
}
let r2 = value || ({});
const value2 = a0.split(env0_2);
r2 = r2.decode || decodeURIComponent;
value2.forEach(_fun33634);
return {};
function _fun33634(a0) { // fn#33634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4269:167, offset: 0x0103682c, size: 173 bytes, params: 2, frame: 15
var r5;
var r0;
var substr;
var value3;
var binding;
var error;
let value = a0.indexOf('=');
if (!(value < 0)) {
value3 = a0.substr(0, value).trim();
substr = a0.substr;
value = typeof value === 'bigint' ? value + 1n : +value + 1;
value = Reflect.apply(substr, a0, [value, a0.length]);
value = value.trim();
if (value[0] != '"') {
r5 = value;
} else {
value = value.slice(1, -1);
r5 = value;
}
value = environment;
if (env0_0[value3] == null) {
binding = env0_0;
try {
value = env0_1(r5);
r0 = value;
} catch (error) {
r0 = r5;
}
binding[value3] = r0;
}
}
}
}
function serialize_33635(a0, a1, a2) { // fn#33635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4269:403, offset: 0x010368d9, size: 613 bytes, params: 4, frame: 16
var items2;
var value2;
var maxAge;
var value4;
const r1 = a2 || ({});
const r3 = r1.encode || encodeURIComponent;
let binding = env0_3;
if (binding.test(a0)) {
value2 = r3(a1);
if (value2) {
binding = env0_3;
if (binding.test(value2)) {
items2 = [a0 + '=' + value2];
maxAge = r1.maxAge;
if (maxAge == null) {
if (r1.domain) {
binding = env0_3;
if (binding.test(r1.domain)) {
items2.push('Domain=' + r1.domain);
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option domain is invalid');
}
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
maxAge = r1.maxAge;
value4 = maxAge - 0;
if (global.isNaN(value4)) {
throw new global.Error('maxAge should be a Number');
}
items2.push('Max-Age=' + global.Math.floor(value4));
if (r1.domain) {
binding = env0_3;
if (binding.test(r1.domain)) {
items2.push('Domain=' + r1.domain);
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option domain is invalid');
}
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('argument val is invalid');
}
items2 = [a0 + '=' + value2];
maxAge = r1.maxAge;
if (maxAge == null) {
if (r1.domain) {
binding = env0_3;
if (binding.test(r1.domain)) {
items2.push('Domain=' + r1.domain);
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option domain is invalid');
}
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
maxAge = r1.maxAge;
value4 = maxAge - 0;
if (global.isNaN(value4)) {
throw new global.Error('maxAge should be a Number');
}
items2.push('Max-Age=' + global.Math.floor(value4));
if (r1.domain) {
binding = env0_3;
if (binding.test(r1.domain)) {
items2.push('Domain=' + r1.domain);
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option domain is invalid');
}
if (r1.path) {
binding = env0_3;
if (binding.test(r1.path)) {
items2.push('Path=' + r1.path);
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
throw new global.TypeError('option path is invalid');
}
if (r1.expires) {
items2.push('Expires=' + r1.expires.toUTCString());
}
if (r1.httpOnly) {
items2.push('HttpOnly');
}
if (r1.secure) {
items2.push('Secure');
}
if (r1.firstPartyOnly) {
items2.push('First-Party-Only');
}
return items2.join('; ');
}
const TypeError = global.TypeError;
throw new TypeError('argument name is invalid');
}
}
global.__d(_fun33632, 4104, []) /* metro module 4104 */;