42 lines
1.5 KiB
JavaScript
42 lines
1.5 KiB
JavaScript
// Metro module 507 (f508).
|
|
const getAuthenticationPath = function getAuthenticationPath(a0, r8 = null, r6 = true, r13 = "") {
|
|
const r22 = window.GLOBAL_ENV.WEBAPP_ENDPOINT != null ? window.GLOBAL_ENV.WEBAPP_ENDPOINT : "";
|
|
const r9 = r8 != null ? `?redirect_to=${encodeURIComponent(r8)}` : "";
|
|
return `${r6 ? r22 : ""}/${a0}${r9}${r13.length !== 0 ? r9.length === 0 ? `?${r13}` : `&${r13}` : r13}`;
|
|
};
|
|
class UnescapedPathParam {
|
|
constructor(a0) {
|
|
this.value = a0;
|
|
}
|
|
toString() {
|
|
return this.value;
|
|
}
|
|
}
|
|
export function getLoginPath(a0, r6 = true, r5 = "") {
|
|
return getAuthenticationPath("login", a0, r6, r5);
|
|
}
|
|
export { getAuthenticationPath };
|
|
export { UnescapedPathParam };
|
|
export function wrapPaths(a0, c12350_1) {
|
|
let c12350_3;
|
|
const r20 = {};
|
|
let c12350_2 = r20;
|
|
const _loop = function _loop() {
|
|
const r7 = a0[c12350_3];
|
|
let c23795_0 = r7;
|
|
if (typeof r7 !== "function") {
|
|
c12350_2[c12350_3] = r7;
|
|
return 1;
|
|
}
|
|
c12350_2[c12350_3] = function(...args) {
|
|
let c28659_0 = c12350_1;
|
|
return c23795_0.apply(void 0, [...args.map((arg) => arg != null ? arg instanceof UnescapedPathParam ? arg.toString() : c28659_0 == null ? encodeURIComponent(arg) : String(arg).split("").map((item) => c28659_0 != null ? c28659_0.includes(item) ? item : encodeURIComponent(item) : encodeURIComponent(item)).join("") : arg)]);
|
|
};
|
|
};
|
|
for (const item of Object.keys(a0)) {
|
|
c12350_3 = item;
|
|
_loop();
|
|
}
|
|
return r20;
|
|
}
|