/opt/canhelp/node_modules/next/dist/esm/build
NameSizeModeActions
adapter/-0755rm
analysis/-0755rm
babel/-0755rm
manifests/-0755rm
next-config-ts/-0755rm
output/-0755rm
polyfills/-0755rm
segment-config/-0755rm
static-paths/-0755rm
swc/-0755rm
templates/-0755rm
turbopack-build/-0755rm
turborepo-access-trace/-0755rm
webpack/-0755rm
webpack-build/-0755rm
webpack-config-rules/-0755rm
after-production-compile.js16220644editdlrm
after-production-compile.js.map31390644editdlrm
build-context.js13530644editdlrm
build-context.js.map40560644editdlrm
collect-build-traces.js215980644editdlrm
collect-build-traces.js.map353920644editdlrm
compiler.js28840644editdlrm
compiler.js.map47860644editdlrm
create-compiler-aliases.js245640644editdlrm
create-compiler-aliases.js.map399610644editdlrm
define-env.js143350644editdlrm
define-env.js.map231660644editdlrm
deployment-id.js2180644editdlrm
deployment-id.js.map5060644editdlrm
duration-to-string.js5440644editdlrm
duration-to-string.js.map10840644editdlrm
entries.js362600644editdlrm
entries.js.map616600644editdlrm
generate-build-id.js7940644editdlrm
generate-build-id.js.map11980644editdlrm
get-babel-config-file.js6220644editdlrm
get-babel-config-file.js.map11000644editdlrm
get-babel-loader-config.js29370644editdlrm
get-babel-loader-config.js.map48850644editdlrm
handle-entrypoints.js45710644editdlrm
handle-entrypoints.js.map70760644editdlrm
handle-externals.js136230644editdlrm
handle-externals.js.map216530644editdlrm
index.js1472390644editdlrm
index.js.map2255750644editdlrm
is-writeable.js2620644editdlrm
is-writeable.js.map6350644editdlrm
load-entrypoint.js17000644editdlrm
load-entrypoint.js.map30980644editdlrm
load-jsconfig.js34510644editdlrm
load-jsconfig.js.map65080644editdlrm
next-dir-paths.js3010644editdlrm
next-dir-paths.js.map6810644editdlrm
normalize-catchall-routes.js41950644editdlrm
normalize-catchall-routes.js.map66430644editdlrm
page-extensions-type.js610644editdlrm
page-extensions-type.js.map1800644editdlrm
preview-key-utils.js34080644editdlrm
preview-key-utils.js.map59660644editdlrm
progress.js29490644editdlrm
progress.js.map45880644editdlrm
rendering-mode.js6180644editdlrm
rendering-mode.js.map7110644editdlrm
spinner.js28690644editdlrm
spinner.js.map49330644editdlrm
type-check.js52780644editdlrm
type-check.js.map92510644editdlrm
utils.js538060644editdlrm
utils.js.map953930644editdlrm
webpack-config.js1084980644editdlrm
webpack-config.js.map1582060644editdlrm
worker.js2060644editdlrm
worker.js.map4810644editdlrm
write-build-id.js3310644editdlrm
write-build-id.js.map7430644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/build/normalize-catchall-routes.js.map (6643B)
{"version":3,"sources":["../../src/build/normalize-catchall-routes.ts"],"sourcesContent":["import { isInterceptionRouteAppPath } from '../shared/lib/router/utils/interception-routes'\nimport { AppPathnameNormalizer } from '../server/normalizers/built/app/app-pathname-normalizer'\n\n/**\n * This function will transform the appPaths in order to support catch-all routes and parallel routes.\n * It will traverse the appPaths, looking for catch-all routes and try to find parallel routes that could match\n * the catch-all. If it finds a match, it will add the catch-all to the parallel route's list of possible routes.\n *\n * @param appPaths The appPaths to transform\n */\nexport function normalizeCatchAllRoutes(\n appPaths: Record,\n normalizer = new AppPathnameNormalizer()\n) {\n const catchAllRoutes = [\n ...new Set(\n Object.values(appPaths)\n .flat()\n .filter(isCatchAllRoute)\n // Sorting is important because we want to match the most specific path.\n .sort((a, b) => b.split('/').length - a.split('/').length)\n ),\n ]\n\n // interception routes should only be matched by a single entrypoint\n // we don't want to push a catch-all route to an interception route\n // because it would mean the interception would be handled by the wrong page component\n const filteredAppPaths = Object.keys(appPaths).filter(\n (route) => !isInterceptionRouteAppPath(route)\n )\n\n for (const appPath of filteredAppPaths) {\n for (const catchAllRoute of catchAllRoutes) {\n const normalizedCatchAllRoute = normalizer.normalize(catchAllRoute)\n const normalizedCatchAllRouteBasePath = normalizedCatchAllRoute.slice(\n 0,\n normalizedCatchAllRoute.search(catchAllRouteRegex)\n )\n\n if (\n // check if the appPath could match the catch-all\n appPath.startsWith(normalizedCatchAllRouteBasePath) &&\n // check if there's not already a slot value that could match the catch-all\n !appPaths[appPath].some((path) => hasMatchedSlots(path, catchAllRoute))\n ) {\n // optional catch-all routes are not currently supported, but leaving this logic in place\n // for when they are eventually supported.\n if (isOptionalCatchAll(catchAllRoute)) {\n // optional catch-all routes should match both the root segment and any segment after it\n // for example, `/[[...slug]]` should match `/` and `/foo` and `/foo/bar`\n appPaths[appPath].push(catchAllRoute)\n } else if (isCatchAll(catchAllRoute)) {\n // regular catch-all (single bracket) should only match segments after it\n // for example, `/[...slug]` should match `/foo` and `/foo/bar` but not `/`\n if (normalizedCatchAllRouteBasePath !== appPath) {\n appPaths[appPath].push(catchAllRoute)\n }\n }\n }\n }\n }\n}\n\nfunction hasMatchedSlots(path1: string, path2: string): boolean {\n const slots1 = path1.split('/').filter(isMatchableSlot)\n const slots2 = path2.split('/').filter(isMatchableSlot)\n\n // if the catch-all route does not have the same number of slots as the app path, it can't match\n if (slots1.length !== slots2.length) return false\n\n // compare the slots in both paths. For there to be a match, each slot must be the same\n for (let i = 0; i < slots1.length; i++) {\n if (slots1[i] !== slots2[i]) return false\n }\n\n return true\n}\n\n/**\n * Returns true for slots that should be considered when checking for match compatibility.\n * Excludes children slots because these are similar to having a segment-level `page`\n * which would cause a slot length mismatch when comparing it to a catch-all route.\n */\nfunction isMatchableSlot(segment: string): boolean {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nconst catchAllRouteRegex = /\\[?\\[\\.\\.\\./\n\nfunction isCatchAllRoute(pathname: string): boolean {\n // Optional catch-all slots are not currently supported, and as such they are not considered when checking for match compatability.\n return !isOptionalCatchAll(pathname) && isCatchAll(pathname)\n}\n\nfunction isOptionalCatchAll(pathname: string): boolean {\n return pathname.includes('[[...')\n}\n\nfunction isCatchAll(pathname: string): boolean {\n return pathname.includes('[...')\n}\n"],"names":["isInterceptionRouteAppPath","AppPathnameNormalizer","normalizeCatchAllRoutes","appPaths","normalizer","catchAllRoutes","Set","Object","values","flat","filter","isCatchAllRoute","sort","a","b","split","length","filteredAppPaths","keys","route","appPath","catchAllRoute","normalizedCatchAllRoute","normalize","normalizedCatchAllRouteBasePath","slice","search","catchAllRouteRegex","startsWith","some","path","hasMatchedSlots","isOptionalCatchAll","push","isCatchAll","path1","path2","slots1","isMatchableSlot","slots2","i","segment","pathname","includes"],"mappings":"AAAA,SAASA,0BAA0B,QAAQ,iDAAgD;AAC3F,SAASC,qBAAqB,QAAQ,0DAAyD;AAE/F;;;;;;CAMC,GACD,OAAO,SAASC,wBACdC,QAAkC,EAClCC,aAAa,IAAIH,uBAAuB;IAExC,MAAMI,iBAAiB;WAClB,IAAIC,IACLC,OAAOC,MAAM,CAACL,UACXM,IAAI,GACJC,MAAM,CAACC,gBACR,wEAAwE;SACvEC,IAAI,CAAC,CAACC,GAAGC,IAAMA,EAAEC,KAAK,CAAC,KAAKC,MAAM,GAAGH,EAAEE,KAAK,CAAC,KAAKC,MAAM;KAE9D;IAED,oEAAoE;IACpE,mEAAmE;IACnE,sFAAsF;IACtF,MAAMC,mBAAmBV,OAAOW,IAAI,CAACf,UAAUO,MAAM,CACnD,CAACS,QAAU,CAACnB,2BAA2BmB;IAGzC,KAAK,MAAMC,WAAWH,iBAAkB;QACtC,KAAK,MAAMI,iBAAiBhB,eAAgB;YAC1C,MAAMiB,0BAA0BlB,WAAWmB,SAAS,CAACF;YACrD,MAAMG,kCAAkCF,wBAAwBG,KAAK,CACnE,GACAH,wBAAwBI,MAAM,CAACC;YAGjC,IACE,iDAAiD;YACjDP,QAAQQ,UAAU,CAACJ,oCACnB,2EAA2E;YAC3E,CAACrB,QAAQ,CAACiB,QAAQ,CAACS,IAAI,CAAC,CAACC,OAASC,gBAAgBD,MAAMT,iBACxD;gBACA,yFAAyF;gBACzF,0CAA0C;gBAC1C,IAAIW,mBAAmBX,gBAAgB;oBACrC,wFAAwF;oBACxF,yEAAyE;oBACzElB,QAAQ,CAACiB,QAAQ,CAACa,IAAI,CAACZ;gBACzB,OAAO,IAAIa,WAAWb,gBAAgB;oBACpC,yEAAyE;oBACzE,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