Rocky_Mountain_Vending/.pnpm-store/v10/files/54/a931b3c834de56eea18ae1278755a92e213ecd668e1c0067a2489a5118be529a89317156ff4ea2877705a3cac2025ee352508d81ae9c07a005c8f8a2fe2381
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

42 lines
No EOL
1.4 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "decodePathParams", {
enumerable: true,
get: function() {
return decodePathParams;
}
});
const _escapepathdelimiters = /*#__PURE__*/ _interop_require_default(require("../../../shared/lib/router/utils/escape-path-delimiters"));
const _utils = require("../../../shared/lib/utils");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
/**
* We only encode path delimiters for path segments from
* getStaticPaths so we need to attempt decoding the URL
* to match against and only escape the path delimiters
* this allows non-ascii values to be handled e.g.
* Japanese characters.
* */ function decodePathParams(pathname) {
// TODO: investigate adding this handling for non-SSG
// pages so non-ascii names also work there.
return pathname.split('/').map((seg)=>{
try {
seg = (0, _escapepathdelimiters.default)(decodeURIComponent(seg), true);
} catch (_) {
// An improperly encoded URL was provided
throw Object.defineProperty(new _utils.DecodeError('Failed to decode path param(s).'), "__NEXT_ERROR_CODE", {
value: "E539",
enumerable: false,
configurable: true
});
}
return seg;
}).join('/');
}
//# sourceMappingURL=decode-path-params.js.map