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>
1 line
No EOL
35 KiB
Text
1 line
No EOL
35 KiB
Text
{"version":3,"sources":["../../src/build/collect-build-traces.ts"],"sourcesContent":["import { Span } from '../trace'\nimport type { NextConfigComplete } from '../server/config-shared'\n\nimport {\n TRACE_IGNORES,\n type BuildTraceContext,\n getFilesMapFromReasons,\n} from './webpack/plugins/next-trace-entrypoints-plugin'\n\nimport path from 'path'\nimport fs from 'fs/promises'\nimport { nonNullable } from '../lib/non-nullable'\nimport * as ciEnvironment from '../server/ci-info'\nimport debugOriginal from 'next/dist/compiled/debug'\nimport picomatch from 'next/dist/compiled/picomatch'\nimport { defaultOverrides } from '../server/require-hook'\nimport { nodeFileTrace } from 'next/dist/compiled/@vercel/nft'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\nimport { normalizeAppPath } from '../shared/lib/router/utils/app-paths'\nimport isError from '../lib/is-error'\nimport type { NodeFileTraceReasons } from '@vercel/nft'\nimport type { RoutesUsingEdgeRuntime } from './utils'\n\nconst debug = debugOriginal('next:build:build-traces')\n\nexport const makeIgnoreFn = (root: string, ignores: string[]) => {\n // pre compile the ignore globs\n const isMatch = picomatch(ignores, {\n contains: true,\n dot: true,\n })\n\n return (pathname: string) => {\n if (path.isAbsolute(pathname) && !pathname.startsWith(root)) {\n return true\n }\n\n return isMatch(pathname)\n }\n}\n\nfunction shouldIgnore(\n file: string,\n serverIgnoreFn: (file: string) => boolean,\n reasons: NodeFileTraceReasons,\n cachedIgnoreFiles: Map<string, boolean>,\n children: Set<string> = new Set()\n) {\n if (cachedIgnoreFiles.has(file)) {\n return cachedIgnoreFiles.get(file)\n }\n\n if (serverIgnoreFn(file)) {\n cachedIgnoreFiles.set(file, true)\n return true\n }\n children.add(file)\n\n const reason = reasons.get(file)\n if (!reason || reason.parents.size === 0 || reason.type.includes('initial')) {\n cachedIgnoreFiles.set(file, false)\n return false\n }\n\n // if all parents are ignored the child file\n // should be ignored as well\n let allParentsIgnored = true\n\n for (const parent of reason.parents.values()) {\n if (!children.has(parent)) {\n children.add(parent)\n if (\n !shouldIgnore(\n parent,\n serverIgnoreFn,\n reasons,\n cachedIgnoreFiles,\n children\n )\n ) {\n allParentsIgnored = false\n break\n }\n }\n }\n\n cachedIgnoreFiles.set(file, allParentsIgnored)\n return allParentsIgnored\n}\n\nexport async function collectBuildTraces({\n dir,\n config,\n distDir,\n edgeRuntimeRoutes,\n staticPages,\n nextBuildSpan = new Span({ name: 'build' }),\n buildTraceContext,\n outputFileTracingRoot,\n}: {\n dir: string\n distDir: string\n staticPages: string[]\n outputFileTracingRoot: string\n // pageInfos is serialized when this function runs in a worker.\n edgeRuntimeRoutes: RoutesUsingEdgeRuntime\n nextBuildSpan?: Span\n config: NextConfigComplete\n buildTraceContext?: BuildTraceContext\n}) {\n const startTime = Date.now()\n debug('starting build traces')\n\n const { outputFileTracingIncludes = {}, outputFileTracingExcludes = {} } =\n config\n const excludeGlobKeys = Object.keys(outputFileTracingExcludes)\n const includeGlobKeys = Object.keys(outputFileTracingIncludes)\n\n await nextBuildSpan\n .traceChild('node-file-trace-build', {\n isTurbotrace: 'false', // TODO(arlyon): remove this\n })\n .traceAsyncFn(async () => {\n const nextServerTraceOutput = path.join(\n distDir,\n 'next-server.js.nft.json'\n )\n const nextMinimalTraceOutput = path.join(\n distDir,\n 'next-minimal-server.js.nft.json'\n )\n const root = outputFileTracingRoot\n\n // Under standalone mode, we need to trace the extra IPC server and\n // worker files.\n const isStandalone = config.output === 'standalone'\n const sharedEntriesSet = Object.keys(defaultOverrides).map((value) =>\n require.resolve(value, {\n paths: [require.resolve('next/dist/server/require-hook')],\n })\n )\n\n const { cacheHandler, cacheHandlers } = config\n\n // ensure we trace any dependencies needed for custom\n // incremental cache handler\n if (cacheHandler) {\n sharedEntriesSet.push(\n require.resolve(\n path.isAbsolute(cacheHandler)\n ? cacheHandler\n : path.join(dir, cacheHandler)\n )\n )\n }\n\n // Under standalone mode, we need to ensure that the cache entry debug\n // handler is traced so it can be copied. This is only used for testing,\n // and is not used in production.\n if (\n process.env.__NEXT_TEST_MODE &&\n process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS\n ) {\n sharedEntriesSet.push(\n require.resolve(\n path.isAbsolute(process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS)\n ? process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS\n : path.join(\n dir,\n process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS\n )\n )\n )\n }\n\n if (cacheHandlers) {\n for (const handlerPath of Object.values(cacheHandlers)) {\n if (handlerPath) {\n sharedEntriesSet.push(\n require.resolve(\n path.isAbsolute(handlerPath)\n ? handlerPath\n : path.join(dir, handlerPath)\n )\n )\n }\n }\n }\n\n const serverEntries = [\n ...sharedEntriesSet,\n ...(isStandalone\n ? [\n require.resolve('next/dist/server/lib/start-server'),\n require.resolve('next/dist/server/next'),\n require.resolve('next/dist/server/require-hook'),\n ]\n : []),\n require.resolve('next/dist/server/next-server'),\n ].filter(Boolean) as string[]\n\n const minimalServerEntries = [\n ...sharedEntriesSet,\n require.resolve('next/dist/compiled/next-server/server.runtime.prod'),\n ].filter(Boolean)\n\n const additionalIgnores = new Set<string>()\n\n for (const glob of excludeGlobKeys) {\n if (picomatch(glob)('next-server')) {\n outputFileTracingExcludes[glob].forEach((exclude) => {\n additionalIgnores.add(exclude)\n })\n }\n }\n\n const sharedIgnores = [\n '**/next/dist/compiled/next-server/**/*.dev.js',\n ...(isStandalone ? [] : ['**/next/dist/compiled/jest-worker/**/*']),\n '**/next/dist/compiled/webpack/*',\n '**/node_modules/webpack5/**/*',\n '**/next/dist/server/lib/route-resolver*',\n 'next/dist/compiled/semver/semver/**/*.js',\n\n ...(ciEnvironment.hasNextSupport\n ? [\n // only ignore image-optimizer code when\n // this is being handled outside of next-server\n '**/next/dist/server/image-optimizer.js',\n ]\n : []),\n\n ...(isStandalone ? [] : TRACE_IGNORES),\n ...additionalIgnores,\n ]\n\n const sharedIgnoresFn = makeIgnoreFn(root, sharedIgnores)\n\n const serverIgnores = [\n ...sharedIgnores,\n '**/node_modules/react{,-dom,-dom-server-turbopack}/**/*.development.js',\n '**/*.d.ts',\n '**/*.map',\n '**/next/dist/pages/**/*',\n ...(ciEnvironment.hasNextSupport\n ? ['**/node_modules/sharp/**/*', '**/@img/sharp-libvips*/**/*']\n : []),\n ].filter(nonNullable)\n const serverIgnoreFn = makeIgnoreFn(root, serverIgnores)\n\n const minimalServerIgnores = [\n ...serverIgnores,\n '**/next/dist/compiled/edge-runtime/**/*',\n '**/next/dist/server/web/sandbox/**/*',\n '**/next/dist/server/post-process.js',\n ]\n const minimalServerIgnoreFn = makeIgnoreFn(root, minimalServerIgnores)\n\n const routesIgnores = [\n ...sharedIgnores,\n // server chunks are provided via next-trace-entrypoints-plugin plugin\n // as otherwise all chunks are traced here and included for all pages\n // whether they are needed or not\n '**/.next/server/chunks/**',\n '**/next/dist/server/post-process.js',\n ].filter(nonNullable)\n\n const routeIgnoreFn = makeIgnoreFn(root, routesIgnores)\n\n const serverTracedFiles = new Set<string>()\n const minimalServerTracedFiles = new Set<string>()\n\n function addToTracedFiles(base: string, file: string, dest: Set<string>) {\n dest.add(\n path.relative(distDir, path.join(base, file)).replace(/\\\\/g, '/')\n )\n }\n\n if (isStandalone) {\n addToTracedFiles(\n '',\n require.resolve('next/dist/compiled/jest-worker/processChild'),\n serverTracedFiles\n )\n addToTracedFiles(\n '',\n require.resolve('next/dist/compiled/jest-worker/threadChild'),\n serverTracedFiles\n )\n }\n\n {\n const chunksToTrace: string[] = [\n ...(buildTraceContext?.chunksTrace?.action.input || []),\n ...serverEntries,\n ...minimalServerEntries,\n ]\n const result = await nodeFileTrace(chunksToTrace, {\n base: outputFileTracingRoot,\n processCwd: dir,\n mixedModules: true,\n async readFile(p) {\n try {\n return await fs.readFile(p, 'utf8')\n } catch (e) {\n if (isError(e) && (e.code === 'ENOENT' || e.code === 'EISDIR')) {\n // since tracing runs in parallel with static generation server\n // files might be removed from that step so tolerate ENOENT\n // errors gracefully\n return ''\n }\n throw e\n }\n },\n async readlink(p) {\n try {\n return await fs.readlink(p)\n } catch (e) {\n if (\n isError(e) &&\n (e.code === 'EINVAL' ||\n e.code === 'ENOENT' ||\n e.code === 'UNKNOWN')\n ) {\n return null\n }\n throw e\n }\n },\n async stat(p) {\n try {\n return await fs.stat(p)\n } catch (e) {\n if (isError(e) && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) {\n return null\n }\n throw e\n }\n },\n // handle shared ignores at top-level as it\n // avoids over-tracing when we don't need to\n // and speeds up total trace time\n ignore(p) {\n if (sharedIgnoresFn(p)) {\n return true\n }\n\n // if a chunk is attempting to be traced that isn't\n // in our initial list we need to ignore it to prevent\n // over tracing as webpack needs to be the source of\n // truth for which chunks should be included for each entry\n if (\n p.includes('.next/server/chunks') &&\n !chunksToTrace.includes(path.join(outputFileTracingRoot, p))\n ) {\n return true\n }\n return false\n },\n })\n const reasons = result.reasons\n const fileList = result.fileList\n for (const file of result.esmFileList) {\n fileList.add(file)\n }\n\n const parentFilesMap = getFilesMapFromReasons(fileList, reasons)\n const cachedLookupIgnore = new Map<string, boolean>()\n const cachedLookupIgnoreMinimal = new Map<string, boolean>()\n\n for (const [entries, tracedFiles] of [\n [serverEntries, serverTracedFiles],\n [minimalServerEntries, minimalServerTracedFiles],\n ] as Array<[string[], Set<string>]>) {\n for (const file of entries) {\n const curFiles = [\n ...(parentFilesMap\n .get(path.relative(outputFileTracingRoot, file))\n ?.keys() || []),\n ]\n tracedFiles.add(path.relative(distDir, file).replace(/\\\\/g, '/'))\n\n for (const curFile of curFiles || []) {\n const filePath = path.join(outputFileTracingRoot, curFile)\n\n if (\n !shouldIgnore(\n curFile,\n tracedFiles === minimalServerTracedFiles\n ? minimalServerIgnoreFn\n : serverIgnoreFn,\n reasons,\n tracedFiles === minimalServerTracedFiles\n ? cachedLookupIgnoreMinimal\n : cachedLookupIgnore\n )\n ) {\n tracedFiles.add(\n path.relative(distDir, filePath).replace(/\\\\/g, '/')\n )\n }\n }\n }\n }\n\n const { entryNameFilesMap } = buildTraceContext?.chunksTrace || {}\n\n const cachedLookupIgnoreRoutes = new Map<string, boolean>()\n\n await Promise.all(\n [\n ...(entryNameFilesMap\n ? Object.entries(entryNameFilesMap)\n : new Map()),\n ].map(async ([entryName, entryNameFiles]) => {\n const isApp = entryName.startsWith('app/')\n const isPages = entryName.startsWith('pages/')\n let route = entryName\n if (isApp) {\n route = normalizeAppPath(route.substring('app'.length))\n }\n if (isPages) {\n route = normalizePagePath(route.substring('pages'.length))\n }\n\n // we don't need to trace for automatically statically optimized\n // pages as they don't have server bundles, note there is\n // the caveat with flying shuttle mode as it needs this for\n // detecting changed entries\n if (staticPages.includes(route)) {\n return\n }\n const entryOutputPath = path.join(\n distDir,\n 'server',\n `${entryName}.js`\n )\n const traceOutputPath = `${entryOutputPath}.nft.json`\n const existingTrace = JSON.parse(\n await fs.readFile(traceOutputPath, 'utf8')\n ) as {\n version: number\n files: string[]\n fileHashes: Record<string, string>\n }\n const traceOutputDir = path.dirname(traceOutputPath)\n const curTracedFiles = new Set<string>()\n\n for (const file of [...entryNameFiles, entryOutputPath]) {\n const curFiles = [\n ...(parentFilesMap\n .get(path.relative(outputFileTracingRoot, file))\n ?.keys() || []),\n ]\n for (const curFile of curFiles || []) {\n if (\n !shouldIgnore(\n curFile,\n routeIgnoreFn,\n reasons,\n cachedLookupIgnoreRoutes\n )\n ) {\n const filePath = path.join(outputFileTracingRoot, curFile)\n const outputFile = path\n .relative(traceOutputDir, filePath)\n .replace(/\\\\/g, '/')\n curTracedFiles.add(outputFile)\n }\n }\n }\n\n for (const file of existingTrace.files || []) {\n curTracedFiles.add(file)\n }\n\n await fs.writeFile(\n traceOutputPath,\n JSON.stringify({\n ...existingTrace,\n files: [...curTracedFiles].sort(),\n })\n )\n })\n )\n }\n\n const moduleTypes = ['app-page', 'pages']\n\n for (const type of moduleTypes) {\n const modulePath = require.resolve(\n `next/dist/server/route-modules/${type}/module.compiled`\n )\n const relativeModulePath = path.relative(root, modulePath)\n\n const contextDir = path.join(\n path.dirname(modulePath),\n 'vendored',\n 'contexts'\n )\n\n for (const item of await fs.readdir(contextDir)) {\n const itemPath = path.relative(root, path.join(contextDir, item))\n if (!serverIgnoreFn(itemPath)) {\n addToTracedFiles(root, itemPath, serverTracedFiles)\n addToTracedFiles(root, itemPath, minimalServerTracedFiles)\n }\n }\n addToTracedFiles(root, relativeModulePath, serverTracedFiles)\n addToTracedFiles(root, relativeModulePath, minimalServerTracedFiles)\n }\n\n const serverTracedFilesSorted = Array.from(serverTracedFiles)\n serverTracedFilesSorted.sort()\n const minimalServerTracedFilesSorted = Array.from(\n minimalServerTracedFiles\n )\n minimalServerTracedFilesSorted.sort()\n\n await Promise.all([\n fs.writeFile(\n nextServerTraceOutput,\n JSON.stringify({\n version: 1,\n files: serverTracedFilesSorted,\n } as {\n version: number\n files: string[]\n })\n ),\n fs.writeFile(\n nextMinimalTraceOutput,\n JSON.stringify({\n version: 1,\n files: minimalServerTracedFilesSorted,\n } as {\n version: number\n files: string[]\n })\n ),\n ])\n })\n\n // apply outputFileTracingIncludes/outputFileTracingExcludes after runTurbotrace\n const includeExcludeSpan = nextBuildSpan.traceChild('apply-include-excludes')\n await includeExcludeSpan.traceAsyncFn(async () => {\n const globOrig =\n require('next/dist/compiled/glob') as typeof import('next/dist/compiled/glob')\n const glob = (pattern: string): Promise<string[]> => {\n return new Promise((resolve, reject) => {\n globOrig(\n pattern,\n { cwd: dir, nodir: true, dot: true },\n (err, files) => {\n if (err) {\n return reject(err)\n }\n resolve(files)\n }\n )\n })\n }\n\n const { entryNameFilesMap } = buildTraceContext?.chunksTrace || {}\n\n await Promise.all(\n [\n ...(entryNameFilesMap ? Object.entries(entryNameFilesMap) : new Map()),\n ].map(async ([entryName]) => {\n const isApp = entryName.startsWith('app/')\n const isPages = entryName.startsWith('pages/')\n let route = entryName\n if (isApp) {\n route = normalizeAppPath(entryName)\n }\n if (isPages) {\n route = normalizePagePath(entryName)\n }\n\n if (staticPages.includes(route)) {\n return\n }\n\n // edge routes have no trace files\n if (edgeRuntimeRoutes.hasOwnProperty(route)) {\n return\n }\n\n const combinedIncludes = new Set<string>()\n const combinedExcludes = new Set<string>()\n for (const curGlob of includeGlobKeys) {\n const isMatch = picomatch(curGlob, { dot: true, contains: true })\n if (isMatch(route)) {\n for (const include of outputFileTracingIncludes[curGlob]) {\n combinedIncludes.add(include.replace(/\\\\/g, '/'))\n }\n }\n }\n\n for (const curGlob of excludeGlobKeys) {\n const isMatch = picomatch(curGlob, { dot: true, contains: true })\n if (isMatch(route)) {\n for (const exclude of outputFileTracingExcludes[curGlob]) {\n combinedExcludes.add(exclude)\n }\n }\n }\n\n if (!combinedIncludes?.size && !combinedExcludes?.size) {\n return\n }\n\n const traceFile = path.join(\n distDir,\n `server`,\n `${entryName}.js.nft.json`\n )\n const pageDir = path.dirname(traceFile)\n const traceContent = JSON.parse(await fs.readFile(traceFile, 'utf8'))\n const includes: string[] = []\n const resolvedTraceIncludes = new Map<string, string[]>()\n\n if (combinedIncludes?.size) {\n await Promise.all(\n [...combinedIncludes].map(async (includeGlob) => {\n const results = await glob(includeGlob)\n const resolvedInclude = resolvedTraceIncludes.get(\n includeGlob\n ) || [\n ...results.map((file) => {\n return path.relative(pageDir, path.join(dir, file))\n }),\n ]\n includes.push(...resolvedInclude)\n resolvedTraceIncludes.set(includeGlob, resolvedInclude)\n })\n )\n }\n const combined = new Set([...traceContent.files, ...includes])\n\n if (combinedExcludes?.size) {\n const resolvedGlobs = [...combinedExcludes].map((exclude) =>\n path.join(dir, exclude)\n )\n\n // pre compile before forEach\n const isMatch = picomatch(resolvedGlobs, {\n dot: true,\n contains: true,\n })\n\n combined.forEach((file) => {\n if (isMatch(path.join(pageDir, file))) {\n combined.delete(file)\n }\n })\n }\n\n // overwrite trace file with custom includes/excludes\n await fs.writeFile(\n traceFile,\n JSON.stringify({\n version: traceContent.version,\n files: [...combined],\n })\n )\n })\n )\n })\n\n debug(`finished build tracing ${Date.now() - startTime}ms`)\n}\n"],"names":["collectBuildTraces","makeIgnoreFn","debug","debugOriginal","root","ignores","isMatch","picomatch","contains","dot","pathname","path","isAbsolute","startsWith","shouldIgnore","file","serverIgnoreFn","reasons","cachedIgnoreFiles","children","Set","has","get","set","add","reason","parents","size","type","includes","allParentsIgnored","parent","values","dir","config","distDir","edgeRuntimeRoutes","staticPages","nextBuildSpan","Span","name","buildTraceContext","outputFileTracingRoot","startTime","Date","now","outputFileTracingIncludes","outputFileTracingExcludes","excludeGlobKeys","Object","keys","includeGlobKeys","traceChild","isTurbotrace","traceAsyncFn","nextServerTraceOutput","join","nextMinimalTraceOutput","isStandalone","output","sharedEntriesSet","defaultOverrides","map","value","require","resolve","paths","cacheHandler","cacheHandlers","push","process","env","__NEXT_TEST_MODE","NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS","handlerPath","serverEntries","filter","Boolean","minimalServerEntries","additionalIgnores","glob","forEach","exclude","sharedIgnores","ciEnvironment","hasNextSupport","TRACE_IGNORES","sharedIgnoresFn","serverIgnores","nonNullable","minimalServerIgnores","minimalServerIgnoreFn","routesIgnores","routeIgnoreFn","serverTracedFiles","minimalServerTracedFiles","addToTracedFiles","base","dest","relative","replace","chunksToTrace","chunksTrace","action","input","result","nodeFileTrace","processCwd","mixedModules","readFile","p","fs","e","isError","code","readlink","stat","ignore","fileList","esmFileList","parentFilesMap","getFilesMapFromReasons","cachedLookupIgnore","Map","cachedLookupIgnoreMinimal","entries","tracedFiles","curFiles","curFile","filePath","entryNameFilesMap","cachedLookupIgnoreRoutes","Promise","all","entryName","entryNameFiles","isApp","isPages","route","normalizeAppPath","substring","length","normalizePagePath","entryOutputPath","traceOutputPath","existingTrace","JSON","parse","traceOutputDir","dirname","curTracedFiles","outputFile","files","writeFile","stringify","sort","moduleTypes","modulePath","relativeModulePath","contextDir","item","readdir","itemPath","serverTracedFilesSorted","Array","from","minimalServerTracedFilesSorted","version","includeExcludeSpan","globOrig","pattern","reject","cwd","nodir","err","hasOwnProperty","combinedIncludes","combinedExcludes","curGlob","include","traceFile","pageDir","traceContent","resolvedTraceIncludes","includeGlob","results","resolvedInclude","combined","resolvedGlobs","delete"],"mappings":";;;;;;;;;;;;;;;IA0FsBA,kBAAkB;eAAlBA;;IAjETC,YAAY;eAAZA;;;uBAzBQ;4CAOd;6DAEU;iEACF;6BACa;gEACG;8DACL;kEACJ;6BACW;qBACH;mCACI;0BACD;gEACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIpB,MAAMC,QAAQC,IAAAA,cAAa,EAAC;AAErB,MAAMF,eAAe,CAACG,MAAcC;IACzC,+BAA+B;IAC/B,MAAMC,UAAUC,IAAAA,kBAAS,EAACF,SAAS;QACjCG,UAAU;QACVC,KAAK;IACP;IAEA,OAAO,CAACC;QACN,IAAIC,aAAI,CAACC,UAAU,CAACF,aAAa,CAACA,SAASG,UAAU,CAACT,OAAO;YAC3D,OAAO;QACT;QAEA,OAAOE,QAAQI;IACjB;AACF;AAEA,SAASI,aACPC,IAAY,EACZC,cAAyC,EACzCC,OAA6B,EAC7BC,iBAAuC,EACvCC,WAAwB,IAAIC,KAAK;IAEjC,IAAIF,kBAAkBG,GAAG,CAACN,OAAO;QAC/B,OAAOG,kBAAkBI,GAAG,CAACP;IAC/B;IAEA,IAAIC,eAAeD,OAAO;QACxBG,kBAAkBK,GAAG,CAACR,MAAM;QAC5B,OAAO;IACT;IACAI,SAASK,GAAG,CAACT;IAEb,MAAMU,SAASR,QAAQK,GAAG,CAACP;IAC3B,IAAI,CAACU,UAAUA,OAAOC,OAAO,CAACC,IAAI,KAAK,KAAKF,OAAOG,IAAI,CAACC,QAAQ,CAAC,YAAY;QAC3EX,kB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