48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
// Metro module 1465 (f1466).
|
|
module.exports = function(a0, a1, a2, a3) {
|
|
const r10 = a1 ? a1 : "&";
|
|
const r13 = a2 ? a2 : "=";
|
|
const r6 = {};
|
|
if (typeof a0 === "string" && a0.length !== 0) {
|
|
const r12 = /\+/g;
|
|
const r11 = a0.split(r10);
|
|
const r23 = (a3 ? typeof a3.maxKeys === "number" : a3) ? a3.maxKeys : 1000;
|
|
let length = r11.length;
|
|
if (r23 > 0 && length > r23) {
|
|
length = r23;
|
|
}
|
|
const r5 = 0 < length;
|
|
let r0 = 0;
|
|
if (r5) {
|
|
do {
|
|
const r19 = r11[r0].replace(r12, "%20");
|
|
const r17 = r19.indexOf(r13);
|
|
const r30 = r17 >= 0;
|
|
const r3 = r0;
|
|
let r31 = "";
|
|
let r16 = r19;
|
|
if (r30) {
|
|
r16 = r19.substr(0, r17);
|
|
r31 = r19.substr(r17 + 1);
|
|
}
|
|
const r35 = decodeURIComponent(r16);
|
|
const r37 = decodeURIComponent(r31);
|
|
if (Object.prototype.hasOwnProperty.call(r6, r35)) {
|
|
const isArray = Array.isArray(r6[r35]);
|
|
const r47 = r6[r35];
|
|
if (isArray) {
|
|
r47.push(r37);
|
|
} else {
|
|
r6[r35] = [r47, r37];
|
|
}
|
|
} else {
|
|
r6[r35] = r37;
|
|
}
|
|
r0 = r3 + 1;
|
|
} while (r0 < length);
|
|
}
|
|
return r6;
|
|
}
|
|
return r6;
|
|
};
|