Rocky_Mountain_Vending/.pnpm-store/v10/files/f5/345e25afbd0cf6a1cbf5c0995243bb02d7df1913b5f849e25312380438923e4c701b5728e4c799564d16ca6acfd998c92147e0db0eedf349e01758afac52f3
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

36 lines
No EOL
1.4 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseRelativeUrl", {
enumerable: true,
get: function() {
return parseRelativeUrl;
}
});
const _utils = require("../../utils");
const _querystring = require("./querystring");
function parseRelativeUrl(url, base, parseQuery = true) {
const globalBase = new URL(typeof window === 'undefined' ? 'http://n' : (0, _utils.getLocationOrigin)());
const resolvedBase = base ? new URL(base, globalBase) : url.startsWith('.') ? new URL(typeof window === 'undefined' ? 'http://n' : window.location.href) : globalBase;
const { pathname, searchParams, search, hash, href, origin } = new URL(url, resolvedBase);
if (origin !== globalBase.origin) {
throw Object.defineProperty(new Error(`invariant: invalid relative URL, router received ${url}`), "__NEXT_ERROR_CODE", {
value: "E159",
enumerable: false,
configurable: true
});
}
return {
pathname,
query: parseQuery ? (0, _querystring.searchParamsToUrlQuery)(searchParams) : undefined,
search,
hash,
href: href.slice(origin.length),
// We don't know for relative URLs at this point since we set a custom, internal
// base that isn't surfaced to users.
slashes: undefined
};
}
//# sourceMappingURL=parse-relative-url.js.map