/* Metro module 3982; source: unknown; dependencies: [3983] */ function _fun32745(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:6, offset: 0x0101cc42, size: 223 bytes, params: 8, frame: 16 const env0_0 = require; const parse_327462 = parse_32746; const encodeURIComponentPretty = function(a0) { return (0, global.encodeURI)(a0).replace(RegExp('[\\/?#]', 'g'), _fun32748); }; const tokensToFunction2 = tokensToFunction; const escapeString = function(a0) { return a0.replace(RegExp('([.+*?=^!:${}()[\\]|\\/\\\\])', 'g'), '\\$1'); }; const escapeGroup = function(a0) { return a0.replace(RegExp('([=!:$\\/()])', 'g'), '\\$1'); }; const attachKeys = function(a0, a1) { a0.keys = a1; return a0; }; const flags = function(a0) { return a0.sensitive ? '' : 'i'; }; const tokensToRegExp2 = tokensToRegExp; module.exports = exports_32757; module.exports.parse = parse_327462; module.exports.compile = function(a0, a1) { return tokensToFunction(parse_32746(a0, a1)); }; module.exports.tokensToFunction = tokensToFunction2; module.exports.tokensToRegExp = tokensToRegExp2; const RegExp = global.RegExp; const regExp = new RegExp(['(\\\\.)', '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'].join('|'), 'g'); function parse_32746(a0, a1) { // fn#32746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:392, offset: 0x0101cd21, size: 595 bytes, params: 3, frame: 70 var r16; var r17; var r18; var r19; var r40; var r46; var r45; var r44; var r43; var r42; var r54; var r58; var r3; var r4; var property; var property2; var index; var slice; var value6; var length; var value7; var property3; var property4; var property5; var property6; var property7; var property8; var push; var value8; var value9; var value10; var value11; var value12; var value13; var value14; var object; var value15; var value16; var value17; var value18; var value19; var value20; const value = a1; const items2 = []; let r38 = value && value.delimiter; r38 = !r38 ? '/' : r38; let binding = env0_2; const value2 = binding.exec(a0); const value3 = 0; const value4 = ''; if (value2 != null) { r16 = value4; r17 = value3; r18 = value3; r19 = value2; while (true) { property = r19[value3]; property2 = r19[1]; index = r19.index; slice = a0.slice; value6 = r16 + Reflect.apply(slice, a0, [r17, index]); length = property.length; value7 = index + length; if (property2) { value19 = value6 + property2[1]; r40 = value19; r54 = r18; } else { property = a0[value7]; property3 = r19[2]; property4 = r19[3]; property5 = r19[4]; property6 = r19[5]; property7 = r19[6]; property8 = r19[7]; if (!value6) { r40 = value6; continue; } items2.push(value6); r40 = value4; value8 = property3 != null; if (!value8) { r46 = value8; continue; } value9 = property != null; r46 = value9; if (!r46) { continue; } value10 = property !== property3; r46 = value10; value11 = property7 === '+'; if (value11) { r45 = value11; continue; } value12 = property7 === '*'; r45 = value12; value13 = property7 === '?'; if (value13) { r44 = value13; continue; } value14 = property7 === '*'; r44 = value14; property = r19[2]; if (property) { r43 = property; continue; } r43 = r38; continue; if (property5) { r42 = property5; continue; } r42 = property6; continue; push = items2.push; object = {}; if (property4) { r54 = r18; r58 = property4; continue; } value15 = typeof r18 === 'bigint' ? r18 : +r18; value16 = typeof value15 === 'bigint' ? value15 + 1n : +value15 + 1; r54 = value16; r58 = value15; object.name = r58; if (property3) { r58 = property3; continue; } r58 = value4; continue; object.prefix = r58; object.delimiter = r43; object.optional = r44; object.repeat = r45; object.partial = r46; object.asterisk = !!property8; if (r42) { value18 = escapeGroup(r42); r58 = value18; } else { if (property8) { r58 = '.*'; continue; } value17 = '[^' + escapeString(r43) + ']+?'; r58 = value17; } object.pattern = r58; Reflect.apply(push, items2, [object]); } binding = env0_2; value20 = binding.exec(a0); if (value20 != null) { r16 = r40; r17 = value7; r18 = r54; r19 = value20; continue; } r3 = r40; r4 = value7; break; } } else { r3 = value4; r4 = value3; } const r2 = r4 < a0.length ? r3 + a0.substr(r4) : r3; if (r2) { items2.push(r2); } return items2; } function encodeURIComponentPretty(a0) { // fn#32747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:918, offset: 0x0101cf74, size: 52 bytes, params: 2, frame: 13 let value = global.encodeURI(a0); return value.replace(RegExp('[\\/?#]', 'g'), function(a0) { var value = a0.charCodeAt(0); value = value.toString(16); value = value.toUpperCase(); return '%' + value; }); } function tokensToFunction(a0) { // fn#32749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:1062, offset: 0x0101cfd9, size: 154 bytes, params: 2, frame: 19 var r5; var RegExp; var pattern; var value3; var value4; var value5; var regExp; var value6; var value7; const env0_0 = a0; const Array = global.Array; let length = a0.length; let prototype = Array.prototype; let value = Object.create(prototype, {constructor: {value: Array}}); const array = new Array(length); value = array instanceof Object ? array : value; length = a0.length; const value2 = 0; if (value2 < length) { r5 = value2; while (true) { if (typeof a0[r5] === 'object') { RegExp = global.RegExp; pattern = a0[r5].pattern; value3 = '^(?:' + pattern; prototype = RegExp.prototype; value4 = Object.create(prototype, {constructor: {value: RegExp}}); value5 = value3 + ')$'; regExp = new RegExp(); value6 = regExp instanceof Object ? regExp : value4; value[r5] = value6; } value7 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1; length = a0.length; if (value7 < length) { r5 = value7; continue; } break; } } return _fun32750; function _fun32750(a0, a1) { // fn#32750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:1214, offset: 0x0101d073, size: 897 bytes, params: 3, frame: 37 var environment; var r15; var r0; var r5; var r6; var r21; var r22; var r23; var r17; var property; var value6; var name; var property2; var asterisk; var value7; var encodeURI; var value8; var replace; var regexp; var value9; var property3; var test; var TypeError; var value10; var typeError; var prefix; var value11; var repeat; var JSON; var value13; var value14; var property4; var value16; var delimiter; var value17; var value18; var optional; var value19; var value20; var partial; var value21; var value22; let value = a0; const value2 = a1; reducibleJoin2: while (true) { if (value) { r15 = value; break reducibleJoin2; } r15 = {}; break reducibleJoin2; } reducibleJoin4: while (true) { if (value2) { r0 = value2; break reducibleJoin4; } r0 = {}; break reducibleJoin4; } const r14 = r0.pretty ? encodeURIComponentPretty : global.encodeURIComponent; value = environment; let length = env0_0.length; const value3 = 0; const value4 = ''; if (value3 < length) { r5 = value3; r6 = value4; reducibleLoop8: while (true) { property = env0_0[r5]; if (typeof property !== 'string') { name = property.name; property2 = r15[name]; if (property2 == null) { optional = property.optional; if (!optional) { TypeError = global.TypeError; value = 'Expected "' + property.name; value20 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += '" to be defined'; typeError = new TypeError(value); value = typeError instanceof Object ? typeError : value20; throw value; } partial = property.partial; reducibleJoin34: while (true) { if (partial) { prefix = property.prefix; value21 = r6 + prefix; r17 = value21; break reducibleJoin34; } r17 = r6; break reducibleJoin34; } } else if (require(dependencyMap[value3])(property2)) { repeat = property.repeat; if (!repeat) { TypeError = global.TypeError; value = 'Expected "' + property.name; JSON = global.JSON; value = value + '" to not repeat, but received `' + JSON.stringify(property2); value13 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += '`'; typeError = new TypeError(value); value = typeError instanceof Object ? typeError : value13; throw value; } length = property2.length; if (value3 === length) { optional = property.optional; reducibleJoin34: while (true) { if (!optional) { TypeError = global.TypeError; value = 'Expected "' + property.name; value19 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += '" to not be empty'; typeError = new TypeError(value); value = typeError instanceof Object ? typeError : value19; throw value; } r17 = r6; break reducibleJoin34; } } else { length = property2.length; if (value3 < length) { r22 = value3; r23 = r6; reducibleLoop22: while (true) { value14 = r14(property2[r22]); property4 = env0_1[r5]; test = property4.test; if (!Reflect.apply(test, property4, [value14])) { TypeError = global.TypeError; value = 'Expected all "' + property.name; value = value + '" to match "' + property.pattern; JSON = global.JSON; value = value + '", but received `' + JSON.stringify(value14); value16 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += '`'; typeError = new TypeError(value); value = typeError instanceof Object ? typeError : value16; throw value; } if (value3 === r22) { prefix = property.prefix; r21 = prefix; } else { delimiter = property.delimiter; r21 = delimiter; } value17 = r23 + (r21 + value14); value18 = typeof r22 === 'bigint' ? r22 + 1n : +r22 + 1; length = property2.length; if (value18 < length) { r22 = value18; r23 = value17; continue reducibleLoop22; } r17 = value17; break reducibleLoop22; } } else { r17 = r6; } } } else { asterisk = property.asterisk; if (asterisk) { encodeURI = global.encodeURI; value8 = encodeURI(property2); replace = value8.replace; regexp = RegExp('[?#]', 'g'); value9 = Reflect.apply(replace, value8, [regexp, function(a0) { var value = a0.charCodeAt(0); value = value.toString(16); value = value.toUpperCase(); return '%' + value; }]); r21 = value9; } else { value7 = r14(property2); r21 = value7; } property3 = env0_1[r5]; test = property3.test; if (!Reflect.apply(test, property3, [r21])) { TypeError = global.TypeError; value = 'Expected "' + property.name; value = value + '" to match "' + property.pattern + '", but received "' + r21; value10 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += '"'; typeError = new TypeError(value); value = typeError instanceof Object ? typeError : value10; throw value; } prefix = property.prefix; value11 = r6 + (prefix + r21); r17 = value11; } } else { value6 = r6 + property; r17 = value6; } value22 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1; length = env0_0.length; if (!(value22 < length)) { return r17; } r5 = value22; r6 = r17; continue reducibleLoop8; } } else { r0 = value4; } return r0; } } function tokensToRegExp(a0, a1, a2) { // fn#32756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:2426, offset: 0x0101d460, size: 542 bytes, params: 4, frame: 36 var r0; var r2; var r5; var r8; var r12; var r26; var r22; var r23; var r14; var property; var escapeStringBinding; var prefix; var value5; var pattern; var value6; var repeat; var value7; var optional; var value8; var partial; var value9; var value10; var value11; var value12; var value13; let value = a1; const value2 = a2; const value4 = 0; if (require(dependencyMap[value4])(value)) { r2 = value; r5 = value2; } else { r0 = value || value2; r2 = []; r5 = r0; } r5 = !r5 ? {} : r5; const strict = r5.strict; const end = r5.end; let length = a0.length; value = ''; if (value4 < length) { r8 = value4; r12 = value; while (true) { property = a0[r8]; if (typeof property === 'string') { value12 = r12 + escapeString(property); r22 = value12; } else { escapeStringBinding = escapeString; prefix = property.prefix; value5 = escapeStringBinding(prefix); pattern = property.pattern; value6 = '(?:' + pattern + ')'; r2.push(property); repeat = property.repeat; if (!repeat) { r26 = value6; continue; } value7 = value6 + ('(?:' + value5 + value6 + ')*'); r26 = value7; optional = property.optional; if (optional) { partial = property.partial; if (partial) { value10 = value5 + '(' + r26 + ')?'; r22 = value10; } else { value9 = '(?:' + value5 + '(' + r26 + '))?'; r22 = value9; } r23 = r22; } else { value8 = value5 + '(' + r26 + ')'; r23 = value8; } value11 = r12 + r23; r22 = value11; } value13 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1; length = a0.length; if (value13 < length) { r8 = value13; r12 = r22; continue; } r14 = r22; break; } } else { r14 = value; } escapeStringBinding = escapeString; let delimiter = r5.delimiter; delimiter = !delimiter ? '/' : delimiter; const value15 = escapeStringBinding(delimiter); const value16 = r14.slice(-value15.length) === value15; r8 = strict ? r14 : (value16 ? r14.slice(value4, -value15.length) : r14) + '(?:' + value15 + '(?=$))?'; r0 = end !== false ? '$' : strict && value16 ? value : '(?=' + value15 + '|$)'; const attachKeysBinding = attachKeys; const RegExp = global.RegExp; const regExp = new RegExp('^' + (r8 + r0), flags(r5)); attachKeysBinding(regExp, r2); return regExp; } function exports_32757(a0, a1, a2) { // fn#32757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:2961, offset: 0x0101d67e, size: 385 bytes, params: 4, frame: 23 var r0; var r3; var r8; var r9; var r7; var items2; var length; var push; var source; var value6; var attachKeysBinding; var value7; var value8; var regExp; var value9; var value10; let value = a0; const value2 = a1; const value3 = a2; const value5 = 0; reducibleJoin3: while (true) { if (require(dependencyMap[value5])(value2)) { r3 = value2; r8 = value3; break reducibleJoin3; } r0 = value2 || value3; r3 = []; r8 = r0; break reducibleJoin3; } reducibleJoin5: while (true) { if (r8) { break reducibleJoin5; } r8 = {}; break reducibleJoin5; } let RegExp = global.RegExp; if (value instanceof RegExp) { value9 = value.source.match(RegExp('\\((?!\\?)', 'g')); reducibleJoin15: while (true) { if (!value9) { break reducibleJoin15; } length = value9.length; if (!(value5 < length)) { break reducibleJoin15; } r7 = value5; reducibleLoop14: while (true) { push = r3.push; Reflect.apply(push, r3, [{'name': null, 'prefix': null, 'delimiter': null, 'optional': false, 'repeat': false, 'partial': false, 'asterisk': false, 'pattern': null, name: r7}]); value10 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1; length = value9.length; if (value10 < length) { r7 = value10; continue reducibleLoop14; } break reducibleJoin15; } } attachKeys(value, r3); r0 = value; } else if (require(dependencyMap[value5])(value)) { items2 = []; length = value.length; if (value5 < length) { r9 = value5; reducibleLoop9: while (true) { push = items2.push; source = exports_32757(value[r9], r3, r8).source; Reflect.apply(push, items2, [source]); value6 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1; length = value.length; if (value6 < length) { r9 = value6; continue reducibleLoop9; } break reducibleLoop9; } } attachKeysBinding = attachKeys; RegExp = global.RegExp; value = items2.join('|'); value = '(?:' + value; value7 = flags(r8); value8 = Object.create(RegExp.prototype, {constructor: {value: RegExp}}); value += ')'; regExp = new RegExp(value); value = regExp instanceof Object ? regExp : value8; attachKeysBinding(value, r3); r0 = value; } else { value = tokensToRegExp(parse_32746(value, r8), r3, r8); r0 = value; } return r0; } } function _fun32748(a0) { // fn#32748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4131:994, offset: 0x0101cfa8, size: 49 bytes, params: 2, frame: 11 let value = a0.charCodeAt(0); value = value.toString(16); value = value.toUpperCase(); return '%' + value; } global.__d(_fun32745, 3982, [3983]) /* metro module 3982, dependencies: [3983] */;