first commit
This commit is contained in:
commit
db5762abd4
687 files changed
+171307
No files matched your search
@@ -0,0 +1,42 @@
|
||||
var e = Symbol(`order-login-continuation`);
|
||||
function t(e) {
|
||||
if (typeof e != `number` && typeof e != `string`) return;
|
||||
let t = Number(e);
|
||||
if (!(
|
||||
!Number.isSafeInteger(t) ||
|
||||
t <= 0 ||
|
||||
(typeof e == `string` && String(t) !== e)
|
||||
))
|
||||
return t;
|
||||
}
|
||||
function n(e) {
|
||||
let t = decodeURIComponent(e);
|
||||
return (
|
||||
t.startsWith(`/`) &&
|
||||
!t.startsWith(`//`) &&
|
||||
!/[\\\u0000-\u0020\u007f]/.test(t)
|
||||
);
|
||||
}
|
||||
function r(e, r) {
|
||||
try {
|
||||
if (
|
||||
typeof e != `string` ||
|
||||
/[\\\u0000-\u0020\u007f]/.test(e) ||
|
||||
!n(e.split(/[?#]/, 1)[0] || ``)
|
||||
)
|
||||
return `/products`;
|
||||
let i = new URL(e, `https://console.invalid`);
|
||||
if (i.origin !== `https://console.invalid` || !n(i.pathname))
|
||||
return `/products`;
|
||||
let a = t(r);
|
||||
return (
|
||||
a === void 0
|
||||
? i.searchParams.delete(`order_image`)
|
||||
: i.searchParams.set(`order_image`, String(a)),
|
||||
`${i.pathname}${i.search}${i.hash}`
|
||||
);
|
||||
} catch {
|
||||
return `/products`;
|
||||
}
|
||||
}
|
||||
export { r as n, t as r, e as t };
|
||||
Reference in new issue
Block a user