Second frontend, written in Next.JS + Typescript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
988 B

{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction getRouteRegex(normalizedRoute) {\n // Escape all characters that could be considered RegEx\n const escapedRoute = (normalizedRoute.replace(/\\/$/, '') || '/').replace(/[|\\\\{}()[\\]^$+*?.-]/g, '\\\\$&');\n const groups = {};\n let groupIndex = 1;\n const parameterizedRoute = escapedRoute.replace(/\\/\\\\\\[([^/]+?)\\\\\\](?=\\/|$)/g, (_, $1) => {\n const isCatchAll = /^(\\\\\\.){3}/.test($1);\n groups[$1 // Un-escape key\n .replace(/\\\\([|\\\\{}()[\\]^$+*?.-])/g, '$1').replace(/^\\.{3}/, '') // eslint-disable-next-line no-sequences\n ] = {\n pos: groupIndex++,\n repeat: isCatchAll\n };\n return isCatchAll ? '/(.+?)' : '/([^/]+?)';\n });\n return {\n re: new RegExp('^' + parameterizedRoute + '(?:/)?$', 'i'),\n groups\n };\n}\n\nexports.getRouteRegex = getRouteRegex;","map":null,"metadata":{},"sourceType":"script"}