19 lines
666 B
JavaScript
19 lines
666 B
JavaScript
// Metro module 1565 (f1566).
|
|
import Module1525 from "./Module1525";
|
|
export default function extractPathFromURL(a0, a1) {
|
|
for (const item of a0) {
|
|
const r41 = item.match(/^[^:]+:/);
|
|
let r19 = r41 == null ? void 0 : r41[0];
|
|
if (r19 == null) {
|
|
r19 = "";
|
|
}
|
|
const r58 = item.replace(new RegExp(`^${Module1525(r19)}`), "").replace(/\/+/g, "/").replace(/^\//, "");
|
|
const regExp = new RegExp(`^${Module1525(r19)}(/)*${r58.split(".").map((item) => item !== "*" ? Module1525(item) : "[^/]+").join("\\.")}`);
|
|
const r80 = a1.replace(/\/+/g, "/");
|
|
if (!regExp.test(r80)) {
|
|
continue;
|
|
}
|
|
return r80.replace(regExp, "");
|
|
}
|
|
};
|