Speed up tests: lower argon2 params in CI, env overrides
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 2m1s

- Allow ARGON2_MEMORY_SIZE, ARGON2_ITERATIONS, ARGON2_PARALLELISM env overrides
- Use m=1024,t=1 in tests (was m=65536,t=4 → ~1s per hash)
- Set fast params in CI and deploy workflows
This commit is contained in:
openhands committed 2026-07-23 19:21:24 +02:00
1 parent b6ba554386
commit f7551166c5
34 files changed
+16 -12902

No files matched your search

+2
View File
@@ -30,6 +30,8 @@ jobs:
git checkout -f "${REF}"
export SKIP_ENV_VALIDATION=1
export ARGON2_MEMORY_SIZE=1024
export ARGON2_ITERATIONS=1
pnpm install --frozen-lockfile
pnpm prisma:generate
pnpm biome:lint
+1
View File
@@ -307,6 +307,7 @@ jobs:
pnpm install --frozen-lockfile
# prisma generate does not need a live DB connection.
pnpm prisma:generate
export ARGON2_MEMORY_SIZE=1024 ARGON2_ITERATIONS=1
pnpm typecheck
pnpm test
# Validate production env (AUTH_SECRET, DATABASE_URL, …) during build.
-6
View File
@@ -1,6 +0,0 @@
var R=require("./chunks/[turbopack]_runtime.js")("56416d4ae4ce586f.js")
R.c("chunks/[turbopack-node]_transforms_postcss_ts_0b7xl6g._.js")
R.c("chunks/[root-of-the-server]__1f933tp._.js")
R.m("[turbopack-node]/child_process/globals.ts [postcss] (ecmascript)")
R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)")
module.exports=R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)").exports
-5
View File
@@ -1,5 +0,0 @@
{
"version": 3,
"sources": [],
"sections": []
}
-6
View File
@@ -1,6 +0,0 @@
var R=require("./chunks/[turbopack]_runtime.js")("cf208e1b0e4c4caf.js")
R.c("chunks/[turbopack-node]_transforms_webpack-loaders_ts_1nw9y6m._.js")
R.c("chunks/[root-of-the-server]__1nvwxt6._.js")
R.m("[turbopack-node]/child_process/globals.ts [webpack_loaders] (ecmascript)")
R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)\" } [webpack_loaders] (ecmascript)")
module.exports=R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)\" } [webpack_loaders] (ecmascript)").exports
-5
View File
@@ -1,5 +0,0 @@
{
"version": 3,
"sources": [],
"sections": []
}
@@ -1,205 +0,0 @@
module.exports = [
"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("path", () => require("path"));
module.exports = mod;
}),
"[externals]/url [external] (url, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("url", () => require("url"));
module.exports = mod;
}),
"[externals]/fs [external] (fs, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("fs", () => require("fs"));
module.exports = mod;
}),
"[project]/postcss.config.mjs [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>__TURBOPACK__default__export__
]);
const __TURBOPACK__default__export__ = {
plugins: {
"@tailwindcss/postcss": {}
}
};
}),
"[turbopack-node]/transforms/transforms.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
/**
* Shared utilities for our 2 transform implementations.
*/ __turbopack_context__.s([
"fromPath",
()=>fromPath,
"getReadEnvVariables",
()=>getReadEnvVariables,
"toPath",
()=>toPath
]);
var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)");
;
const contextDir = process.cwd();
const toPath = (file)=>{
const relPath = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, file);
if ((0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["isAbsolute"])(relPath)) {
throw new Error(`Cannot depend on path (${file}) outside of root directory (${contextDir})`);
}
return __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? relPath.replaceAll(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"], '/') : relPath;
};
const fromPath = (path)=>{
return (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["join"])(/* turbopackIgnore: true */ contextDir, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? path.replaceAll('/', __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"]) : path);
};
// Patch process.env to track which env vars are read
const originalEnv = process.env;
const readEnvVars = new Set();
process.env = new Proxy(originalEnv, {
get (target, prop) {
if (typeof prop === 'string') {
// We register the env var as dependency on the
// current transform and all future transforms
// since the env var might be cached in module scope
// and influence them all
readEnvVars.add(prop);
}
return Reflect.get(target, prop);
},
set (target, prop, value) {
return Reflect.set(target, prop, value);
}
});
function getReadEnvVariables() {
return Array.from(readEnvVars);
}
}),
"[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>transform,
"init",
()=>init
]);
// @ts-ignore
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$postcss$40$8$2e$5$2e$21$2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/postcss.mjs [postcss] (ecmascript)");
// @ts-ignore
var __TURBOPACK__imported__module__$5b$project$5d2f$postcss$2e$config$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/postcss.config.mjs [postcss] (ecmascript)");
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/transforms/transforms.ts [postcss] (ecmascript)");
;
;
;
let processor;
const init = async (ipc)=>{
let config = __TURBOPACK__imported__module__$5b$project$5d2f$postcss$2e$config$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__["default"];
if (typeof config === 'function') {
config = await config({
env: 'development'
});
}
if (typeof config === 'undefined') {
throw new Error('PostCSS config is undefined (make sure to export an function or object from config file)');
}
let plugins;
if (Array.isArray(config.plugins)) {
plugins = config.plugins.map((plugin)=>{
if (Array.isArray(plugin)) {
return plugin;
} else if (typeof plugin === 'string') {
return [
plugin,
{}
];
} else {
return plugin;
}
});
} else if (typeof config.plugins === 'object') {
plugins = Object.entries(config.plugins).filter(([, options])=>options);
} else {
plugins = [];
}
const loadedPlugins = plugins.map((plugin)=>{
if (Array.isArray(plugin)) {
const [arg, options] = plugin;
let pluginFactory = arg;
if (typeof pluginFactory === 'string') {
pluginFactory = require(/* turbopackIgnore: true */ pluginFactory);
}
if (pluginFactory.default) {
pluginFactory = pluginFactory.default;
}
return pluginFactory(options);
}
return plugin;
});
processor = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$postcss$40$8$2e$5$2e$21$2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__["default"])(loadedPlugins);
};
async function transform(ipc, cssContent, name, sourceMap) {
const { css, map, messages } = await processor.process(cssContent, {
from: name,
to: name,
map: sourceMap ? {
inline: false,
annotation: false
} : undefined
});
const assets = [];
const filePaths = [];
const buildFilePaths = [];
const directories = [];
for (const msg of messages){
switch(msg.type){
case 'asset':
assets.push({
file: msg.file,
content: msg.content,
sourceMap: !sourceMap ? undefined : typeof msg.sourceMap === 'string' ? msg.sourceMap : JSON.stringify(msg.sourceMap)
});
break;
case 'dependency':
case 'missing-dependency':
filePaths.push((0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.file));
break;
case 'build-dependency':
buildFilePaths.push((0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.file));
break;
case 'dir-dependency':
directories.push([
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.dir),
msg.glob
]);
break;
case 'context-dependency':
directories.push([
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.dir),
'**'
]);
break;
default:
break;
}
}
ipc.sendInfo({
type: 'dependencies',
filePaths,
directories,
buildFilePaths,
envVariables: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["getReadEnvVariables"])()
});
return {
css,
map: sourceMap ? JSON.stringify(map) : undefined,
assets
};
}
}),
];
//# sourceMappingURL=%5Broot-of-the-server%5D__0oj80bi._.js.map
@@ -1,8 +0,0 @@
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/postcss.config.mjs"],"sourcesContent":["export default {\n\tplugins: {\n\t\t\"@tailwindcss/postcss\": {},\n\t},\n};\n"],"names":["plugins"],"mappings":";;;;uCAAe;IACdA,SAAS;QACR,wBAAwB,CAAC;IAC1B;AACD"}},
{"offset": {"line": 35, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/transforms.ts"],"sourcesContent":["/**\n * Shared utilities for our 2 transform implementations.\n */\n\nimport type { Channel as Ipc } from '../types'\nimport { relative, isAbsolute, join, sep } from 'path'\nimport { type StructuredError } from '../error'\nimport { type StackFrame } from '../compiled/stacktrace-parser'\n\nexport type IpcInfoMessage =\n | {\n type: 'dependencies'\n envVariables?: string[]\n directories?: Array<[string, string]>\n filePaths?: string[]\n buildFilePaths?: string[]\n }\n | {\n type: 'emittedError'\n severity: 'warning' | 'error'\n error: StructuredError\n }\n | {\n type: 'log'\n logs: Array<{\n time: number\n logType: string\n args: any[]\n trace?: StackFrame[]\n }>\n }\n\nexport type IpcRequestMessage =\n | {\n type: 'resolve'\n options: any\n lookupPath: string\n request: string\n }\n | {\n type: 'trackFileRead'\n file: string\n }\n\nexport type TransformIpc = Ipc<IpcInfoMessage, IpcRequestMessage>\n\nconst contextDir = process.cwd()\nexport const toPath = (file: string) => {\n const relPath = relative(contextDir, file)\n if (isAbsolute(relPath)) {\n throw new Error(\n `Cannot depend on path (${file}) outside of root directory (${contextDir})`\n )\n }\n return sep !== '/' ? relPath.replaceAll(sep, '/') : relPath\n}\nexport const fromPath = (path: string) => {\n return join(\n /* turbopackIgnore: true */ contextDir,\n sep !== '/' ? path.replaceAll('/', sep) : path\n )\n}\n\n// Patch process.env to track which env vars are read\nconst originalEnv = process.env\nconst readEnvVars = new Set<string>()\nprocess.env = new Proxy(originalEnv, {\n get(target, prop) {\n if (typeof prop === 'string') {\n // We register the env var as dependency on the\n // current transform and all future transforms\n // since the env var might be cached in module scope\n // and influence them all\n readEnvVars.add(prop)\n }\n return Reflect.get(target, prop)\n },\n set(target, prop, value) {\n return Reflect.set(target, prop, value)\n },\n})\n\nexport function getReadEnvVariables(): string[] {\n return Array.from(readEnvVars)\n}\n"],"names":["contextDir","process","cwd","toPath","file","relPath","Error","replaceAll","fromPath","path","originalEnv","env","readEnvVars","Set","Proxy","get","target","prop","add","Reflect","set","value","getReadEnvVariables","Array","from"],"mappings":"AAAA;;CAEC;;;;;;;;AAGD;;AAyCA,MAAMA,aAAaC,QAAQC,GAAG;AACvB,MAAMC,SAAS,CAACC;IACrB,MAAMC,UAAU,IAAA,6GAAQ,EAACL,YAAYI;IACrC,IAAI,IAAA,+GAAU,EAACC,UAAU;QACvB,MAAM,IAAIC,MACR,CAAC,uBAAuB,EAAEF,KAAK,6BAA6B,EAAEJ,WAAW,CAAC,CAAC;IAE/E;IACA,OAAO,wGAAG,KAAK,MAAMK,QAAQE,UAAU,CAAC,wGAAG,EAAE,OAAOF;AACtD;AACO,MAAMG,WAAW,CAACC;IACvB,OAAO,IAAA,yGAAI,EACT,yBAAyB,GAAGT,YAC5B,wGAAG,KAAK,MAAMS,KAAKF,UAAU,CAAC,KAAK,wGAAG,IAAIE;AAE9C;AAEA,qDAAqD;AACrD,MAAMC,cAAcT,QAAQU,GAAG;AAC/B,MAAMC,cAAc,IAAIC;AACxBZ,QAAQU,GAAG,GAAG,IAAIG,MAAMJ,aAAa;IACnCK,KAAIC,MAAM,EAAEC,IAAI;QACd,IAAI,OAAOA,SAAS,UAAU;YAC5B,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,yBAAyB;YACzBL,YAAYM,GAAG,CAACD;QAClB;QACA,OAAOE,QAAQJ,GAAG,CAACC,QAAQC;IAC7B;IACAG,KAAIJ,MAAM,EAAEC,IAAI,EAAEI,KAAK;QACrB,OAAOF,QAAQC,GAAG,CAACJ,QAAQC,MAAMI;IACnC;AACF;AAEO,SAASC;IACd,OAAOC,MAAMC,IAAI,CAACZ;AACpB"}},
{"offset": {"line": 83, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/postcss.ts"],"sourcesContent":["declare const __turbopack_external_require__: (\n id: string,\n thunk: () => any,\n esm?: boolean\n) => any\n\nimport type { Processor } from 'postcss'\n\n// @ts-ignore\nimport postcss from '@vercel/turbopack/postcss'\n// @ts-ignore\nimport importedConfig from 'CONFIG'\nimport { getReadEnvVariables, toPath, type TransformIpc } from './transforms'\n\nlet processor: Processor | undefined\n\nexport const init = async (ipc: TransformIpc) => {\n let config = importedConfig\n if (typeof config === 'function') {\n config = await config({ env: 'development' })\n }\n if (typeof config === 'undefined') {\n throw new Error(\n 'PostCSS config is undefined (make sure to export an function or object from config file)'\n )\n }\n let plugins: any[]\n if (Array.isArray(config.plugins)) {\n plugins = config.plugins.map((plugin: [string, any] | string | any) => {\n if (Array.isArray(plugin)) {\n return plugin\n } else if (typeof plugin === 'string') {\n return [plugin, {}]\n } else {\n return plugin\n }\n })\n } else if (typeof config.plugins === 'object') {\n plugins = Object.entries(config.plugins).filter(([, options]) => options)\n } else {\n plugins = []\n }\n const loadedPlugins = plugins.map((plugin) => {\n if (Array.isArray(plugin)) {\n const [arg, options] = plugin\n let pluginFactory = arg\n\n if (typeof pluginFactory === 'string') {\n pluginFactory = require(/* turbopackIgnore: true */ pluginFactory)\n }\n\n if (pluginFactory.default) {\n pluginFactory = pluginFactory.default\n }\n\n return pluginFactory(options)\n }\n return plugin\n })\n\n processor = postcss(loadedPlugins)\n}\n\nexport default async function transform(\n ipc: TransformIpc,\n cssContent: string,\n name: string,\n sourceMap: boolean\n) {\n const { css, map, messages } = await processor!.process(cssContent, {\n from: name,\n to: name,\n map: sourceMap\n ? {\n inline: false,\n annotation: false,\n }\n : undefined,\n })\n\n const assets = []\n const filePaths: string[] = []\n const buildFilePaths: string[] = []\n const directories: Array<[string, string]> = []\n\n for (const msg of messages) {\n switch (msg.type) {\n case 'asset':\n assets.push({\n file: msg.file,\n content: msg.content,\n sourceMap: !sourceMap\n ? undefined\n : typeof msg.sourceMap === 'string'\n ? msg.sourceMap\n : JSON.stringify(msg.sourceMap),\n // There is also an info field, which we currently ignore\n })\n break\n case 'dependency':\n case 'missing-dependency':\n filePaths.push(toPath(msg.file))\n break\n case 'build-dependency':\n buildFilePaths.push(toPath(msg.file))\n break\n case 'dir-dependency':\n directories.push([toPath(msg.dir), msg.glob])\n break\n case 'context-dependency':\n directories.push([toPath(msg.dir), '**'])\n break\n default:\n // TODO: do we need to do anything here?\n break\n }\n }\n ipc.sendInfo({\n type: 'dependencies',\n filePaths,\n directories,\n buildFilePaths,\n envVariables: getReadEnvVariables(),\n })\n return {\n css,\n map: sourceMap ? JSON.stringify(map) : undefined,\n assets,\n }\n}\n"],"names":["processor","init","ipc","config","env","Error","plugins","Array","isArray","map","plugin","Object","entries","filter","options","loadedPlugins","arg","pluginFactory","require","default","transform","cssContent","name","sourceMap","css","messages","process","from","to","inline","annotation","undefined","assets","filePaths","buildFilePaths","directories","msg","type","push","file","content","JSON","stringify","dir","glob","sendInfo","envVariables"],"mappings":";;;;;;AAQA,aAAa;AACb;AACA,aAAa;AACb;AACA;;;;AAEA,IAAIA;AAEG,MAAMC,OAAO,OAAOC;IACzB,IAAIC,SAAS,0HAAc;IAC3B,IAAI,OAAOA,WAAW,YAAY;QAChCA,SAAS,MAAMA,OAAO;YAAEC,KAAK;QAAc;IAC7C;IACA,IAAI,OAAOD,WAAW,aAAa;QACjC,MAAM,IAAIE,MACR;IAEJ;IACA,IAAIC;IACJ,IAAIC,MAAMC,OAAO,CAACL,OAAOG,OAAO,GAAG;QACjCA,UAAUH,OAAOG,OAAO,CAACG,GAAG,CAAC,CAACC;YAC5B,IAAIH,MAAMC,OAAO,CAACE,SAAS;gBACzB,OAAOA;YACT,OAAO,IAAI,OAAOA,WAAW,UAAU;gBACrC,OAAO;oBAACA;oBAAQ,CAAC;iBAAE;YACrB,OAAO;gBACL,OAAOA;YACT;QACF;IACF,OAAO,IAAI,OAAOP,OAAOG,OAAO,KAAK,UAAU;QAC7CA,UAAUK,OAAOC,OAAO,CAACT,OAAOG,OAAO,EAAEO,MAAM,CAAC,CAAC,GAAGC,QAAQ,GAAKA;IACnE,OAAO;QACLR,UAAU,EAAE;IACd;IACA,MAAMS,gBAAgBT,QAAQG,GAAG,CAAC,CAACC;QACjC,IAAIH,MAAMC,OAAO,CAACE,SAAS;YACzB,MAAM,CAACM,KAAKF,QAAQ,GAAGJ;YACvB,IAAIO,gBAAgBD;YAEpB,IAAI,OAAOC,kBAAkB,UAAU;gBACrCA,gBAAgBC,QAAQ,yBAAyB,GAAGD;YACtD;YAEA,IAAIA,cAAcE,OAAO,EAAE;gBACzBF,gBAAgBA,cAAcE,OAAO;YACvC;YAEA,OAAOF,cAAcH;QACvB;QACA,OAAOJ;IACT;IAEAV,YAALine truncated
}
@@ -1,476 +0,0 @@
module.exports = [
"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("path", () => require("path"));
module.exports = mod;
}),
"[turbopack-node]/transforms/transforms.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
/**
* Shared utilities for our 2 transform implementations.
*/ __turbopack_context__.s([
"fromPath",
()=>fromPath,
"getReadEnvVariables",
()=>getReadEnvVariables,
"toPath",
()=>toPath
]);
var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)");
;
const contextDir = process.cwd();
const toPath = (file)=>{
const relPath = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, file);
if ((0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["isAbsolute"])(relPath)) {
throw new Error(`Cannot depend on path (${file}) outside of root directory (${contextDir})`);
}
return __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? relPath.replaceAll(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"], '/') : relPath;
};
const fromPath = (path)=>{
return (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["join"])(/* turbopackIgnore: true */ contextDir, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? path.replaceAll('/', __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"]) : path);
};
// Patch process.env to track which env vars are read
const originalEnv = process.env;
const readEnvVars = new Set();
process.env = new Proxy(originalEnv, {
get (target, prop) {
if (typeof prop === 'string') {
// We register the env var as dependency on the
// current transform and all future transforms
// since the env var might be cached in module scope
// and influence them all
readEnvVars.add(prop);
}
return Reflect.get(target, prop);
},
set (target, prop, value) {
return Reflect.set(target, prop, value);
}
});
function getReadEnvVariables() {
return Array.from(readEnvVars);
}
}),
"[externals]/fs [external] (fs, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("fs", () => require("fs"));
module.exports = mod;
}),
"[externals]/next/dist/compiled/loader-runner [external] (next/dist/compiled/loader-runner, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("next/dist/compiled/loader-runner", () => require("next/dist/compiled/loader-runner"));
module.exports = mod;
}),
"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>transform
]);
var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)");
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [webpack_loaders] (ecmascript)");
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [webpack_loaders] (ecmascript)");
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/transforms/transforms.ts [webpack_loaders] (ecmascript)");
var __TURBOPACK__imported__module__$5b$externals$5d2f$fs__$5b$external$5d$__$28$fs$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/fs [external] (fs, cjs)");
;
;
;
;
;
;
const { runLoaders } = __turbopack_context__.r("[externals]/next/dist/compiled/loader-runner [external] (next/dist/compiled/loader-runner, cjs)");
const contextDir = process.cwd();
const LogType = Object.freeze({
error: 'error',
warn: 'warn',
info: 'info',
log: 'log',
debug: 'debug',
trace: 'trace',
group: 'group',
groupCollapsed: 'groupCollapsed',
groupEnd: 'groupEnd',
profile: 'profile',
profileEnd: 'profileEnd',
time: 'time',
clear: 'clear',
status: 'status'
});
const loaderFlag = 'LOADER_EXECUTION';
const cutOffByFlag = (stack, flag)=>{
const errorStack = stack.split('\n');
for(let i = 0; i < errorStack.length; i++){
if (errorStack[i].includes(flag)) {
errorStack.length = i;
}
}
return errorStack.join('\n');
};
/**
* @param stack stack trace
* @returns stack trace without the loader execution flag included
*/ const cutOffLoaderExecution = (stack)=>cutOffByFlag(stack, loaderFlag);
class DummySpan {
traceChild() {
return new DummySpan();
}
traceFn(fn) {
return fn(this);
}
async traceAsyncFn(fn) {
return await fn(this);
}
stop() {
return;
}
}
const transform = (ipc, content, name, query, loaders, sourceMap)=>{
return new Promise((resolve, reject)=>{
const resource = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["resolve"])(contextDir, name);
const resourceDir = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["dirname"])(resource);
const loadersWithOptions = loaders.map((loader)=>typeof loader === 'string' ? {
loader,
options: {}
} : loader);
const logs = [];
runLoaders({
resource: resource + query,
context: {
_module: {
// For debugging purpose, if someone find context is not full compatible to
// webpack they can guess this comes from turbopack
__reserved: 'TurbopackContext'
},
currentTraceSpan: new DummySpan(),
rootContext: contextDir,
sourceMap,
getOptions () {
const entry = this.loaders[this.loaderIndex];
return entry.options && typeof entry.options === 'object' ? entry.options : {};
},
fs: {
readFile (p, optionsOrCb, maybeCb) {
ipc.sendRequest({
type: 'trackFileRead',
file: (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["resolve"])(p))
}).then(()=>{
__TURBOPACK__imported__module__$5b$externals$5d2f$fs__$5b$external$5d$__$28$fs$2c$__cjs$29$__["default"].readFile(p, optionsOrCb, maybeCb);
}, (err)=>{
ipc.sendError(err);
// sendError is going to stop the process, no need to call callback
});
}
},
getResolve: (options)=>{
const rustOptions = {
aliasFields: undefined,
conditionNames: undefined,
noPackageJson: false,
extensions: undefined,
mainFields: undefined,
noExportsField: false,
mainFiles: undefined,
noModules: false,
preferRelative: false
};
if (options.alias) {
if (!Array.isArray(options.alias) || options.alias.length > 0) {
throw new Error('alias resolve option is not supported');
}
}
if (options.aliasFields) {
if (!Array.isArray(options.aliasFields)) {
throw new Error('aliasFields resolve option must be an array');
}
rustOptions.aliasFields = options.aliasFields;
}
if (options.conditionNames) {
if (!Array.isArray(options.conditionNames)) {
throw new Error('conditionNames resolve option must be an array');
}
rustOptions.conditionNames = options.conditionNames;
}
if (options.descriptionFiles) {
if (!Array.isArray(options.descriptionFiles) || options.descriptionFiles.length > 0) {
throw new Error('descriptionFiles resolve option is not supported');
}
rustOptions.noPackageJson = true;
}
if (options.extensions) {
if (!Array.isArray(options.extensions)) {
throw new Error('extensions resolve option must be an array');
}
rustOptions.extensions = options.extensions;
}
if (options.mainFields) {
if (!Array.isArray(options.mainFields)) {
throw new Error('mainFields resolve option must be an array');
}
rustOptions.mainFields = options.mainFields;
}
if (options.exportsFields) {
if (!Array.isArray(options.exportsFields) || options.exportsFields.length > 0) {
throw new Error('exportsFields resolve option is not supported');
}
rustOptions.noExportsField = true;
}
if (options.mainFiles) {
if (!Array.isArray(options.mainFiles)) {
throw new Error('mainFiles resolve option must be an array');
}
rustOptions.mainFiles = options.mainFiles;
}
if (options.modules) {
if (!Array.isArray(options.modules) || options.modules.length > 0) {
throw new Error('modules resolve option is not supported');
}
rustOptions.noModules = true;
}
if (options.restrictions) {
// TODO This is ignored for now
}
if (options.dependencyType) {
// TODO This is ignored for now
}
if (options.preferRelative) {
if (typeof options.preferRelative !== 'boolean') {
throw new Error('preferRelative resolve option must be a boolean');
}
rustOptions.preferRelative = options.preferRelative;
}
return (lookupPath, request, callback)=>{
if (__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].isAbsolute(request)) {
// Relativize absolute requests. Turbopack disallow them in JS code, but here it's
// generated programatically and there is a smaller problem of
// non-cacheable/non-portable builds.
request = __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].relative(lookupPath, request);
// On Windows, the path might be still absolute if it's on a different drive. Just
// let the resolver throw the error in that case.
if (!__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].isAbsolute(request) && request.split(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].sep)[0] !== '..') {
request = './' + request;
}
}
const promise = ipc.sendRequest({
type: 'resolve',
options: rustOptions,
lookupPath: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["toPath"])(lookupPath),
request
}).then((unknownResult)=>{
let result = unknownResult;
if (result && typeof result.path === 'string') {
return (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["fromPath"])(result.path);
} else {
throw Error('Expected { path: string } from resolve request');
}
});
if (callback) {
promise.then((result)=>callback(undefined, result), (err)=>callback(err)).catch((err)=>{
ipc.sendError(err);
});
} else {
return promise;
}
};
},
emitWarning: makeErrorEmitter('warning', ipc),
emitError: makeErrorEmitter('error', ipc),
getLogger (name) {
const logFn = (logType, ...args)=>{
let trace;
switch(logType){
case LogType.warn:
case LogType.error:
case LogType.trace:
case LogType.debug:
trace = (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["parse"])(cutOffLoaderExecution(new Error('Trace').stack).split('\n').slice(3).join('\n'));
break;
default:
break;
}
// Batch logs messages to be sent at the end
logs.push({
time: Date.now(),
logType,
args,
trace
});
};
let timers;
let timersAggregates;
// See https://github.com/webpack/webpack/blob/a48c34b34d2d6c44f9b2b221d7baf278d34ac0be/lib/logging/Logger.js#L8
return {
error: logFn.bind(this, LogType.error),
warn: logFn.bind(this, LogType.warn),
info: logFn.bind(this, LogType.info),
log: logFn.bind(this, LogType.log),
debug: logFn.bind(this, LogType.debug),
assert: (assertion, ...args)=>{
if (!assertion) {
logFn(LogType.error, ...args);
}
},
trace: logFn.bind(this, LogType.trace),
clear: logFn.bind(this, LogType.clear),
status: logFn.bind(this, LogType.status),
group: logFn.bind(this, LogType.group),
groupCollapsed: logFn.bind(this, LogType.groupCollapsed),
groupEnd: logFn.bind(this, LogType.groupEnd),
profile: logFn.bind(this, LogType.profile),
profileEnd: logFn.bind(this, LogType.profileEnd),
time: (label)=>{
timers = timers || new Map();
timers.set(label, process.hrtime());
},
timeLog: (label)=>{
const prev = timers && timers.get(label);
if (!prev) {
throw new Error(`No such label '${label}' for WebpackLogger.timeLog()`);
}
const time = process.hrtime(prev);
logFn(LogType.time, [
label,
...time
]);
},
timeEnd: (label)=>{
const prev = timers && timers.get(label);
if (!prev) {
throw new Error(`No such label '${label}' for WebpackLogger.timeEnd()`);
}
const time = process.hrtime(prev);
/** @type {Map<string | undefined, [number, number]>} */ timers.delete(label);
logFn(LogType.time, [
label,
...time
]);
},
timeAggregate: (label)=>{
const prev = timers && timers.get(label);
if (!prev) {
throw new Error(`No such label '${label}' for WebpackLogger.timeAggregate()`);
}
const time = process.hrtime(prev);
/** @type {Map<string | undefined, [number, number]>} */ timers.delete(label);
/** @type {Map<string | undefined, [number, number]>} */ timersAggregates = timersAggregates || new Map();
const current = timersAggregates.get(label);
if (current !== undefined) {
if (time[1] + current[1] > 1e9) {
time[0] += current[0] + 1;
time[1] = time[1] - 1e9 + current[1];
} else {
time[0] += current[0];
time[1] += current[1];
}
}
timersAggregates.set(label, time);
},
timeAggregateEnd: (label)=>{
if (timersAggregates === undefined) return;
const time = timersAggregates.get(label);
if (time === undefined) return;
timersAggregates.delete(label);
logFn(LogType.time, [
label,
...time
]);
}
};
}
},
loaders: loadersWithOptions.map((loader)=>({
loader: /*TURBOPACK member replacement*/ __turbopack_context__.x.resolve(loader.loader, {
paths: [
contextDir,
resourceDir
]
}),
options: loader.options
})),
readResource: (_filename, callback)=>{
// TODO assuming that filename === resource, but loaders might change that
let data = typeof content === 'string' ? Buffer.from(content, 'utf-8') : Buffer.from(content.binary, 'base64');
callback(null, data);
}
}, (err, result)=>{
if (logs.length) {
ipc.sendInfo({
type: 'log',
logs: logs
});
logs.length = 0;
}
ipc.sendInfo({
type: 'dependencies',
envVariables: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["getReadEnvVariables"])(),
filePaths: result.fileDependencies.map(__TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["toPath"]),
directories: result.contextDependencies.map((dep)=>[
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["toPath"])(dep),
'**'
])
});
if (err) {
// Resolve loader paths to include in the error message using
// the same "(from ...)" style as webpack's format-webpack-messages.
const loaderPathList = loadersWithOptions.map((l)=>{
try {
return /*TURBOPACK member replacement*/ __turbopack_context__.x.resolve(l.loader, {
paths: [
contextDir,
resourceDir
]
});
} catch {
return l.loader;
}
});
const loaderPaths = loaderPathList.join(', ');
if (!(err instanceof Error)) {
// String throws lose their stack trace, so we create a
// synthetic one pointing at the loader.
const wrappedErr = new Error(`${String(err)}\n (from ${loaderPaths})`);
wrappedErr.stack = `Error: ${String(err)}\n at loader (${loaderPaths})`;
return reject(wrappedErr);
}
// Only append "(from ...)" when no loader path is already
// visible in the stack trace, to avoid redundant noise.
const stack = typeof err.stack === 'string' ? err.stack : '';
if (!loaderPathList.some((p)=>stack.includes(p))) {
err.message += `\n (from ${loaderPaths})`;
}
return reject(err);
}
if (!result.result) return reject(new Error('No result from loaders'));
const [source, map] = result.result;
const resolvedValue = {
source: Buffer.isBuffer(source) ? {
binary: source.toString('base64')
} : source,
map: typeof map === 'string' ? map : typeof map === 'object' ? JSON.stringify(map) : undefined
};
// Delay resolution by one event loop turn to catch deferred errors
// from loaders (e.g. unhandled Promise rejections, setTimeout throws).
// During this delay, uncaughtException/unhandledRejection handlers can
// fire and send the error via IPC before we send the 'end' message.
setTimeout(()=>resolve(resolvedValue), 0);
});
});
};
;
function makeErrorEmitter(severity, ipc) {
return function(error) {
ipc.sendInfo({
type: 'emittedError',
severity: severity,
error: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["structuredError"])(error)
});
};
}
}),
];
//# sourceMappingURL=%5Broot-of-the-server%5D__0x8m--0._.js.map
@@ -1,7 +0,0 @@
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/transforms.ts"],"sourcesContent":["/**\n * Shared utilities for our 2 transform implementations.\n */\n\nimport type { Channel as Ipc } from '../types'\nimport { relative, isAbsolute, join, sep } from 'path'\nimport { type StructuredError } from '../error'\nimport { type StackFrame } from '../compiled/stacktrace-parser'\n\nexport type IpcInfoMessage =\n | {\n type: 'dependencies'\n envVariables?: string[]\n directories?: Array<[string, string]>\n filePaths?: string[]\n buildFilePaths?: string[]\n }\n | {\n type: 'emittedError'\n severity: 'warning' | 'error'\n error: StructuredError\n }\n | {\n type: 'log'\n logs: Array<{\n time: number\n logType: string\n args: any[]\n trace?: StackFrame[]\n }>\n }\n\nexport type IpcRequestMessage =\n | {\n type: 'resolve'\n options: any\n lookupPath: string\n request: string\n }\n | {\n type: 'trackFileRead'\n file: string\n }\n\nexport type TransformIpc = Ipc<IpcInfoMessage, IpcRequestMessage>\n\nconst contextDir = process.cwd()\nexport const toPath = (file: string) => {\n const relPath = relative(contextDir, file)\n if (isAbsolute(relPath)) {\n throw new Error(\n `Cannot depend on path (${file}) outside of root directory (${contextDir})`\n )\n }\n return sep !== '/' ? relPath.replaceAll(sep, '/') : relPath\n}\nexport const fromPath = (path: string) => {\n return join(\n /* turbopackIgnore: true */ contextDir,\n sep !== '/' ? path.replaceAll('/', sep) : path\n )\n}\n\n// Patch process.env to track which env vars are read\nconst originalEnv = process.env\nconst readEnvVars = new Set<string>()\nprocess.env = new Proxy(originalEnv, {\n get(target, prop) {\n if (typeof prop === 'string') {\n // We register the env var as dependency on the\n // current transform and all future transforms\n // since the env var might be cached in module scope\n // and influence them all\n readEnvVars.add(prop)\n }\n return Reflect.get(target, prop)\n },\n set(target, prop, value) {\n return Reflect.set(target, prop, value)\n },\n})\n\nexport function getReadEnvVariables(): string[] {\n return Array.from(readEnvVars)\n}\n"],"names":["contextDir","process","cwd","toPath","file","relPath","Error","replaceAll","fromPath","path","originalEnv","env","readEnvVars","Set","Proxy","get","target","prop","add","Reflect","set","value","getReadEnvVariables","Array","from"],"mappings":"AAAA;;CAEC;;;;;;;;AAGD;;AAyCA,MAAMA,aAAaC,QAAQC,GAAG;AACvB,MAAMC,SAAS,CAACC;IACrB,MAAMC,UAAU,IAAA,6GAAQ,EAACL,YAAYI;IACrC,IAAI,IAAA,+GAAU,EAACC,UAAU;QACvB,MAAM,IAAIC,MACR,CAAC,uBAAuB,EAAEF,KAAK,6BAA6B,EAAEJ,WAAW,CAAC,CAAC;IAE/E;IACA,OAAO,wGAAG,KAAK,MAAMK,QAAQE,UAAU,CAAC,wGAAG,EAAE,OAAOF;AACtD;AACO,MAAMG,WAAW,CAACC;IACvB,OAAO,IAAA,yGAAI,EACT,yBAAyB,GAAGT,YAC5B,wGAAG,KAAK,MAAMS,KAAKF,UAAU,CAAC,KAAK,wGAAG,IAAIE;AAE9C;AAEA,qDAAqD;AACrD,MAAMC,cAAcT,QAAQU,GAAG;AAC/B,MAAMC,cAAc,IAAIC;AACxBZ,QAAQU,GAAG,GAAG,IAAIG,MAAMJ,aAAa;IACnCK,KAAIC,MAAM,EAAEC,IAAI;QACd,IAAI,OAAOA,SAAS,UAAU;YAC5B,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,yBAAyB;YACzBL,YAAYM,GAAG,CAACD;QAClB;QACA,OAAOE,QAAQJ,GAAG,CAACC,QAAQC;IAC7B;IACAG,KAAIJ,MAAM,EAAEC,IAAI,EAAEI,KAAK;QACrB,OAAOF,QAAQC,GAAG,CAACJ,QAAQC,MAAMI;IACnC;AACF;AAEO,SAASC;IACd,OAAOC,MAAMC,IAAI,CAACZ;AACpB"}},
{"offset": {"line": 70, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/webpack-loaders.ts"],"sourcesContent":["declare const __turbopack_external_require__: {\n resolve: (name: string, opt?: { paths: string[] }) => string\n} & ((id: string, thunk: () => any, esm?: boolean) => any)\n\nimport type { Channel as Ipc } from '../types'\nimport { dirname, resolve as pathResolve, relative } from 'path'\nimport {\n StackFrame,\n parse as parseStackTrace,\n} from '../compiled/stacktrace-parser'\nimport { structuredError, type StructuredError } from '../error'\nimport {\n fromPath,\n getReadEnvVariables,\n toPath,\n type TransformIpc,\n} from './transforms'\nimport fs from 'fs'\nimport path from 'path'\n\nexport type IpcInfoMessage =\n | {\n type: 'dependencies'\n envVariables?: string[]\n directories?: Array<[string, string]>\n filePaths?: string[]\n buildFilePaths?: string[]\n }\n | {\n type: 'emittedError'\n severity: 'warning' | 'error'\n error: StructuredError\n }\n | {\n type: 'log'\n logs: Array<{\n time: number\n logType: string\n args: any[]\n trace?: StackFrame[]\n }>\n }\n\nexport type IpcRequestMessage = {\n type: 'resolve'\n options: any\n lookupPath: string\n request: string\n}\n\ntype LoaderConfig =\n | string\n | {\n loader: string\n options: { [k: string]: unknown }\n }\n\nconst {\n runLoaders,\n}: typeof import('loader-runner') = require('@vercel/turbopack/loader-runner')\n\nconst contextDir = process.cwd()\n\nconst LogType = Object.freeze({\n error: 'error',\n warn: 'warn',\n info: 'info',\n log: 'log',\n debug: 'debug',\n\n trace: 'trace',\n\n group: 'group',\n groupCollapsed: 'groupCollapsed',\n groupEnd: 'groupEnd',\n\n profile: 'profile',\n profileEnd: 'profileEnd',\n\n time: 'time',\n\n clear: 'clear',\n status: 'status',\n})\n\nconst loaderFlag = 'LOADER_EXECUTION'\n\nconst cutOffByFlag = (stack: string, flag: string): string => {\n const errorStack = stack.split('\\n')\n for (let i = 0; i < errorStack.length; i++) {\n if (errorStack[i].includes(flag)) {\n errorStack.length = i\n }\n }\n return errorStack.join('\\n')\n}\n\n/**\n * @param stack stack trace\n * @returns stack trace without the loader execution flag included\n */\nconst cutOffLoaderExecution = (stack: string): string =>\n cutOffByFlag(stack, loaderFlag)\n\nclass DummySpan {\n traceChild() {\n return new DummySpan()\n }\n\n traceFn<T>(fn: (span: DummySpan) => T): T {\n return fn(this)\n }\n\n async traceAsyncFn<T>(fn: (span: DummySpan) => T | Promise<T>): Promise<T> {\n return await fn(this)\n }\n\n stop() {\n return\n }\n}\n\ntype ResolveOptions = {\n dependencyType?: string\n alias?: Record<string, string[]> | unknown[]\n aliasFields?: string[]\n cacheWithContext?: boolean\n conditionNames?: string[]\n descriptionFiles?: string[]\n enforceExtension?: boolean\n extensionAlias: Record<string, string[]>\n extensions?: string[]\n fallback?: Record<string, string[]>\n mainFields?: string[]\n mainFiles?: string[]\n exportsFields?: string[]\n modules?: string[]\n plugins?: unknown[]\n symlinks?: boolean\n unsafeCache?: boolean\n useSyncFileSystemCalls?: boolean\n preferRelative?: boolean\n preferAbsolute?: boolean\n restrictions?: unknown[]\n roots?: string[]\n importFields?: string[]\n}\n\nconst transform = (\n ipc: TransformIpc,\n content: string | { binary: string },\n name: string,\n query: string,\n loaders: LoaderConfig[],\n sourceMap: boolean\n) => {\n return new Promise((resolve, reject) => {\n const resource = pathResolve(contextDir, name)\n const resourceDir = dirname(resource)\n\n const loadersWithOptions = loaders.map((loader) =>\n typeof loader === 'string' ? { loader, options: {} } : loader\n )\n\n const logs: Array<{\n time: number\n logType: string\n args: unknown[]\n trace: StackFrame[] | undefined\n }> = []\n\n runLoaders(\n {\n resource: resource + query,\n context: {\n _module: {\n // For debugging purpose, if someone find context is not full compatible to\n // webpack they can guess this comes from turbopack\n __reserved: 'TurbopackContext',\n },\n currentTraceSpan: new DummySpan(),\n rootContext: contextDir,\n sourceMap,\n getOptions() {\n const entry = this.loaders[this.loaderIndex]\n return entry.options && typeof entry.options === 'object'\n ? entry.options\n : {}\n },\n fs: {\n readFile(p: string, optionsOrCb: any, maybeCb: any) {\n ipc\n .sendRequest({\n type: 'trackFileRead',\n file: relative(contextDir, pathResolve(p)),\n })\n .then(\n Line truncated
}
@@ -1,500 +0,0 @@
module.exports = [
"[turbopack-node]/child_process/globals.ts [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => {
// @ts-ignore
process.turbopack = {};
}),
"[externals]/node:net [external] (node:net, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("node:net", () => require("node:net"));
module.exports = mod;
}),
"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("node:stream", () => require("node:stream"));
module.exports = mod;
}),
"[turbopack-node]/compiled/stacktrace-parser/index.js [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"parse",
()=>parse
]);
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/compiled/stacktrace-parser") + "/";
var n = "<unknown>";
function parse(e) {
var r = e.split("\n");
return r.reduce(function(e, r) {
var n = parseChrome(r) || parseWinjs(r) || parseGecko(r) || parseNode(r) || parseJSC(r);
if (n) {
e.push(n);
}
return e;
}, []);
}
var a = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
var l = /\((\S*)(?::(\d+))(?::(\d+))\)/;
function parseChrome(e) {
var r = a.exec(e);
if (!r) {
return null;
}
var u = r[2] && r[2].indexOf("native") === 0;
var t = r[2] && r[2].indexOf("eval") === 0;
var i = l.exec(r[2]);
if (t && i != null) {
r[2] = i[1];
r[3] = i[2];
r[4] = i[3];
}
return {
file: !u ? r[2] : null,
methodName: r[1] || n,
arguments: u ? [
r[2]
] : [],
lineNumber: r[3] ? +r[3] : null,
column: r[4] ? +r[4] : null
};
}
var u = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
function parseWinjs(e) {
var r = u.exec(e);
if (!r) {
return null;
}
return {
file: r[2],
methodName: r[1] || n,
arguments: [],
lineNumber: +r[3],
column: r[4] ? +r[4] : null
};
}
var t = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;
var i = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
function parseGecko(e) {
var r = t.exec(e);
if (!r) {
return null;
}
var a = r[3] && r[3].indexOf(" > eval") > -1;
var l = i.exec(r[3]);
if (a && l != null) {
r[3] = l[1];
r[4] = l[2];
r[5] = null;
}
return {
file: r[3],
methodName: r[1] || n,
arguments: r[2] ? r[2].split(",") : [],
lineNumber: r[4] ? +r[4] : null,
column: r[5] ? +r[5] : null
};
}
var s = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;
function parseJSC(e) {
var r = s.exec(e);
if (!r) {
return null;
}
return {
file: r[3],
methodName: r[1] || n,
arguments: [],
lineNumber: +r[4],
column: r[5] ? +r[5] : null
};
}
var o = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
function parseNode(e) {
var r = o.exec(e);
if (!r) {
return null;
}
return {
file: r[2],
methodName: r[1] || n,
arguments: [],
lineNumber: +r[3],
column: r[4] ? +r[4] : null
};
}
}),
"[turbopack-node]/error.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>isError,
"getProperError",
()=>getProperError,
"structuredError",
()=>structuredError
]);
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [postcss] (ecmascript)");
;
function isError(err) {
return typeof err === 'object' && err !== null && 'name' in err && 'message' in err;
}
function getProperError(err) {
if (isError(err)) {
return err;
}
if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
;
return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '');
}
function getObjectClassLabel(value) {
return Object.prototype.toString.call(value);
}
function isPlainObject(value) {
if (getObjectClassLabel(value) !== '[object Object]') {
return false;
}
const prototype = Object.getPrototypeOf(value);
/**
* this used to be previously:
*
* `return prototype === null || prototype === Object.prototype`
*
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
*
* It was changed to the current implementation since it's resilient to serialization.
*/ return prototype === null || prototype.hasOwnProperty('isPrototypeOf');
}
function structuredError(e) {
e = getProperError(e);
return {
name: e.name,
message: e.message,
stack: typeof e.stack === 'string' ? (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["parse"])(e.stack) : [],
cause: e.cause ? structuredError(getProperError(e.cause)) : undefined
};
}
}),
"[turbopack-node]/child_process/index.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"IPC",
()=>IPC
]);
var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:net [external] (node:net, cjs)");
var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:stream [external] (node:stream, cjs)");
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [postcss] (ecmascript)");
;
;
;
function createIpc(port) {
const socket = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__["createConnection"])({
port,
host: '127.0.0.1'
});
/**
* A writable stream that writes to the socket.
* We don't write directly to the socket because we need to
* handle backpressure and wait for the socket to be drained
* before writing more data.
*/ const socketWritable = new __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__["Writable"]({
write (chunk, _enc, cb) {
if (socket.write(chunk)) {
cb();
} else {
socket.once('drain', cb);
}
},
final (cb) {
socket.end(cb);
}
});
const packetQueue = [];
const recvPromiseResolveQueue = [];
function pushPacket(packet) {
const recvPromiseResolve = recvPromiseResolveQueue.shift();
if (recvPromiseResolve != null) {
recvPromiseResolve(JSON.parse(packet.toString('utf8')));
} else {
packetQueue.push(packet);
}
}
let state = {
type: 'waiting'
};
let buffer = Buffer.alloc(0);
socket.once('connect', ()=>{
socket.setNoDelay(true);
socket.on('data', (chunk)=>{
buffer = Buffer.concat([
buffer,
chunk
]);
loop: while(true){
switch(state.type){
case 'waiting':
{
if (buffer.length >= 4) {
const length = buffer.readUInt32BE(0);
buffer = buffer.subarray(4);
state = {
type: 'packet',
length
};
} else {
break loop;
}
break;
}
case 'packet':
{
if (buffer.length >= state.length) {
const packet = buffer.subarray(0, state.length);
buffer = buffer.subarray(state.length);
state = {
type: 'waiting'
};
pushPacket(packet);
} else {
break loop;
}
break;
}
default:
invariant(state, (state)=>`Unknown state type: ${state?.type}`);
}
}
});
});
// When the socket is closed, this process is no longer needed.
// This might happen e. g. when parent process is killed or
// node.js pool is garbage collected.
socket.once('close', ()=>{
process.exit(0);
});
// TODO(lukesandberg): some of the messages being sent are very large and contain lots
// of redundant information. Consider adding gzip compression to our stream.
function doSend(message) {
return new Promise((resolve, reject)=>{
// Reserve 4 bytes for our length prefix, we will over-write after encoding.
const packet = Buffer.from('0000' + message, 'utf8');
packet.writeUInt32BE(packet.length - 4, 0);
socketWritable.write(packet, (err)=>{
process.stderr.write(`TURBOPACK_OUTPUT_D\n`);
process.stdout.write(`TURBOPACK_OUTPUT_D\n`);
if (err != null) {
reject(err);
} else {
resolve();
}
});
});
}
function send(message) {
return doSend(JSON.stringify(message));
}
function sendReady() {
return doSend('');
}
return {
async recv () {
const packet = packetQueue.shift();
if (packet != null) {
return JSON.parse(packet.toString('utf8'));
}
const result = await new Promise((resolve)=>{
recvPromiseResolveQueue.push((result)=>{
resolve(result);
});
});
return result;
},
send (message) {
return send(message);
},
sendReady,
async sendError (error) {
let failed = false;
try {
await send({
type: 'error',
...(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["structuredError"])(error)
});
} catch (err) {
// There's nothing we can do about errors that happen after this point, we can't tell anyone
// about them.
console.error('failed to send error back to rust:', err);
failed = true;
}
await new Promise((res)=>socket.end(()=>res()));
process.exit(failed ? 1 : 0);
}
};
}
const PORT = process.argv[2];
const IPC = createIpc(parseInt(PORT, 10));
process.on('uncaughtException', (err)=>{
IPC.sendError(err);
});
process.on('unhandledRejection', (reason)=>{
IPC.sendError(reason instanceof Error ? reason : new Error(String(reason)));
});
const improveConsole = (name, stream, addStack)=>{
// @ts-ignore
const original = console[name];
// @ts-ignore
const stdio = process[stream];
// @ts-ignore
console[name] = (...args)=>{
stdio.write(`TURBOPACK_OUTPUT_B\n`);
original(...args);
if (addStack) {
const stack = new Error().stack?.replace(/^.+\n.+\n/, '') + '\n';
stdio.write('TURBOPACK_OUTPUT_S\n');
stdio.write(stack);
}
stdio.write('TURBOPACK_OUTPUT_E\n');
};
};
improveConsole('error', 'stderr', true);
improveConsole('warn', 'stderr', true);
improveConsole('count', 'stdout', true);
improveConsole('trace', 'stderr', false);
improveConsole('log', 'stdout', true);
improveConsole('group', 'stdout', true);
improveConsole('groupCollapsed', 'stdout', true);
improveConsole('table', 'stdout', true);
improveConsole('debug', 'stdout', true);
improveConsole('info', 'stdout', true);
improveConsole('dir', 'stdout', true);
improveConsole('dirxml', 'stdout', true);
improveConsole('timeEnd', 'stdout', true);
improveConsole('timeLog', 'stdout', true);
improveConsole('timeStamp', 'stdout', true);
improveConsole('assert', 'stderr', true);
/**
* Utility function to ensure all variants of an enum are handled.
*/ function invariant(never, computeMessage) {
throw new Error(`Invariant: ${computeMessage(never)}`);
}
}),
"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"run",
()=>run
]);
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/index.ts [postcss] (ecmascript)");
;
const ipc = __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["IPC"];
const queue = [];
const run = async (moduleFactory)=>{
let nextId = 1;
const requests = new Map();
const internalIpc = {
sendInfo: (message)=>ipc.send({
type: 'info',
data: message
}),
sendRequest: (message)=>{
const id = nextId++;
let resolve, reject;
const promise = new Promise((res, rej)=>{
resolve = res;
reject = rej;
});
requests.set(id, {
resolve,
reject
});
return ipc.send({
type: 'request',
id,
data: message
}).then(()=>promise);
},
sendError: (error)=>{
return ipc.sendError(error);
}
};
// Initialize module and send ready message
let getValue;
try {
const module = await moduleFactory();
if (typeof module.init === 'function') {
await module.init();
}
getValue = module.default;
await ipc.sendReady();
} catch (err) {
await ipc.sendReady();
await ipc.sendError(err);
}
// Queue handling
let isRunning = false;
const run = async ()=>{
while(queue.length > 0){
const args = queue.shift();
try {
const value = await getValue(internalIpc, ...args);
await ipc.send({
type: 'end',
data: value === undefined ? undefined : JSON.stringify(value, null, 2),
duration: 0
});
} catch (e) {
await ipc.sendError(e);
}
}
isRunning = false;
};
// Communication handling
while(true){
const msg = await ipc.recv();
switch(msg.type){
case 'evaluate':
{
queue.push(msg.args);
if (!isRunning) {
isRunning = true;
run();
}
break;
}
case 'result':
{
const request = requests.get(msg.id);
if (request) {
requests.delete(msg.id);
if (msg.error) {
request.reject(new Error(msg.error));
} else {
request.resolve(msg.data);
}
}
break;
}
default:
{
console.error('unexpected message type', msg.type);
process.exit(1);
}
}
}
};
}),
"[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)");
;
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["run"])(()=>__turbopack_context__.A('[turbopack-node]/transforms/postcss.ts { CONFIG => "[project]/postcss.config.mjs [postcss] (ecmascript)" } [postcss] (ecmascript, async loader)'));
}),
];
//# sourceMappingURL=%5Broot-of-the-server%5D__1f933tp._.js.map
@@ -1,11 +0,0 @@
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/globals.ts"],"sourcesContent":["// @ts-ignore\nprocess.turbopack = {}\n"],"names":["process","turbopack"],"mappings":"AAAA,aAAa;AACbA,QAAQC,SAAS,GAAG,CAAC"}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/compiled/stacktrace-parser/index.js"],"sourcesContent":["if (typeof __nccwpck_require__ !== \"undefined\")\n __nccwpck_require__.ab = __dirname + \"/\";\n\nvar n = \"<unknown>\";\nexport function parse(e) {\n var r = e.split(\"\\n\");\n return r.reduce(function (e, r) {\n var n =\n parseChrome(r) ||\n parseWinjs(r) ||\n parseGecko(r) ||\n parseNode(r) ||\n parseJSC(r);\n if (n) {\n e.push(n);\n }\n return e;\n }, []);\n}\nvar a =\n /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar l = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nfunction parseChrome(e) {\n var r = a.exec(e);\n if (!r) {\n return null;\n }\n var u = r[2] && r[2].indexOf(\"native\") === 0;\n var t = r[2] && r[2].indexOf(\"eval\") === 0;\n var i = l.exec(r[2]);\n if (t && i != null) {\n r[2] = i[1];\n r[3] = i[2];\n r[4] = i[3];\n }\n return {\n file: !u ? r[2] : null,\n methodName: r[1] || n,\n arguments: u ? [r[2]] : [],\n lineNumber: r[3] ? +r[3] : null,\n column: r[4] ? +r[4] : null,\n };\n}\nvar u =\n /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinjs(e) {\n var r = u.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\nvar t =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar i = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGecko(e) {\n var r = t.exec(e);\n if (!r) {\n return null;\n }\n var a = r[3] && r[3].indexOf(\" > eval\") > -1;\n var l = i.exec(r[3]);\n if (a && l != null) {\n r[3] = l[1];\n r[4] = l[2];\n r[5] = null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: r[2] ? r[2].split(\",\") : [],\n lineNumber: r[4] ? +r[4] : null,\n column: r[5] ? +r[5] : null,\n };\n}\nvar s = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\nfunction parseJSC(e) {\n var r = s.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[4],\n column: r[5] ? +r[5] : null,\n };\n}\nvar o =\n /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseNode(e) {\n var r = o.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\n"],"names":["__nccwpck_require__","ab","n","parse","e","r","split","reduce","parseChrome","parseWinjs","parseGecko","parseNode","parseJSC","push","a","l","exec","u","indexOf","t","i","file","methodName","arguments","lineNumber","column","s","o"],"mappings":";;;;AAAA,IAAI,OAAOA,wBAAwB,aACjCA,oBAAoBC,EAAE,GAAG,uEAAY;AAEvC,IAAIC,IAAI;AACD,SAASC,MAAMC,CAAC;IACrB,IAAIC,IAAID,EAAEE,KAAK,CAAC;IAChB,OAAOD,EAAEE,MAAM,CAAC,SAAUH,CAAC,EAAEC,CAAC;QAC5B,IAAIH,IACFM,YAAYH,MACZI,WAAWJ,MACXK,WAAWL,MACXM,UAAUN,MACVO,SAASP;QACX,IAAIH,GAAG;YACLE,EAAES,IAAI,CAACX;QACT;QACA,OAAOE;IACT,GAAG,EAAE;AACP;AACA,IAAIU,IACF;AACF,IAAIC,IAAI;AACR,SAASP,YAAYJ,CAAC;IACpB,IAAIC,IAAIS,EAAEE,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,IAAIY,IAAIZ,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,cAAc;IAC3C,IAAIC,IAAId,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,YAAY;IACzC,IAAIE,IAAIL,EAAEC,IAAI,CAACX,CAAC,CAAC,EAAE;IACnB,IAAIc,KAAKC,KAAK,MAAM;QAClBf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;QACXf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;QACXf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;IACb;IACA,OAAO;QACLC,MAAM,CAACJ,IAAIZ,CAAC,CAAC,EAAE,GAAG;QAClBiB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAWN,IAAI;YAACZ,CAAC,CAAC,EAAE;SAAC,GAAG,EAAE;QAC1BmB,YAAYnB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;QAC3BoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIY,IACF;AACF,SAASR,WAAWL,CAAC;IACnB,IAAIC,IAAIY,EAAED,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAW,EAAE;QACbC,YAAY,CAACnB,CAAC,CAAC,EAAE;QACjBoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIc,IACF;AACF,IAAIC,IAAI;AACR,SAASV,WAAWN,CAAC;IACnB,IAAIC,IAAIc,EAAEH,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,IAAIS,IAAIT,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,aAAa,CAAC;IAC3C,IAAIH,IAAIK,EAAEJ,IAAI,CAACX,CAAC,CAAC,EAAE;IACnB,IAAIS,KAAKC,KAAK,MAAM;QAClBV,CAAC,CAAC,EAAE,GAAGU,CAAC,CAAC,EAAE;QACXV,CAAC,CAAC,EAAE,GAAGU,CAAC,CAAC,EAAE;QACXV,CAAC,CAAC,EAAE,GAAG;IACT;IACA,OAAO;QACLgB,MAAMhB,CALine truncated
{"offset": {"line": 130, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/error.ts"],"sourcesContent":["import type { StackFrame } from './compiled/stacktrace-parser'\nimport { parse as parseStackTrace } from './compiled/stacktrace-parser'\n\n// merged from next.js\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/lib/is-error.ts\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/shared/lib/is-plain-object.ts\n\nexport default function isError(err: unknown): err is Error {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Provide a better error message for cases where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error('`undefined` was thrown instead of a real error')\n }\n\n if (err === null) {\n return new Error('`null` was thrown instead of a real error')\n }\n }\n\n return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '')\n}\n\nfunction getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nfunction isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n\nexport type StructuredError = {\n name: string\n message: string\n stack: StackFrame[]\n cause: StructuredError | undefined\n}\n\nexport function structuredError(e: Error | string): StructuredError {\n e = getProperError(e)\n\n return {\n name: e.name,\n message: e.message,\n stack: typeof e.stack === 'string' ? parseStackTrace(e.stack) : [],\n cause: e.cause ? structuredError(getProperError(e.cause)) : undefined,\n }\n}\n"],"names":["isError","err","getProperError","Error","isPlainObject","JSON","stringify","getObjectClassLabel","value","Object","prototype","toString","call","getPrototypeOf","hasOwnProperty","structuredError","e","name","message","stack","cause","undefined"],"mappings":";;;;;;;;AACA;;AAMe,SAASA,QAAQC,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEO,SAASC,eAAeD,GAAY;IACzC,IAAID,QAAQC,MAAM;QAChB,OAAOA;IACT;IAEA;;IAYA,OAAO,IAAIE,MAAMC,cAAcH,OAAOI,KAAKC,SAAS,CAACL,OAAOA,MAAM;AACpE;AAEA,SAASM,oBAAoBC,KAAU;IACrC,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEA,SAASJ,cAAcI,KAAU;IAC/B,IAAID,oBAAoBC,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOI,cAAc,CAACL;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUI,cAAc,CAAC;AACxD;AASO,SAASC,gBAAgBC,CAAiB;IAC/CA,IAAId,eAAec;IAEnB,OAAO;QACLC,MAAMD,EAAEC,IAAI;QACZC,SAASF,EAAEE,OAAO;QAClBC,OAAO,OAAOH,EAAEG,KAAK,KAAK,WAAW,IAAA,yJAAe,EAACH,EAAEG,KAAK,IAAI,EAAE;QAClEC,OAAOJ,EAAEI,KAAK,GAAGL,gBAAgBb,eAAec,EAAEI,KAAK,KAAKC;IAC9D;AACF"}},
{"offset": {"line": 182, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/index.ts"],"sourcesContent":["import { createConnection } from 'node:net'\nimport { Writable } from 'node:stream'\nimport { structuredError } from '../error'\n\ntype State =\n | {\n type: 'waiting'\n }\n | {\n type: 'packet'\n length: number\n }\n\nexport type Ipc<TIncoming, TOutgoing> = {\n recv(): Promise<TIncoming>\n send(message: TOutgoing): Promise<void>\n sendError(error: Error | string): Promise<never>\n sendReady(): Promise<void>\n}\n\nfunction createIpc<TIncoming, TOutgoing>(\n port: number\n): Ipc<TIncoming, TOutgoing> {\n const socket = createConnection({\n port,\n host: '127.0.0.1',\n })\n\n /**\n * A writable stream that writes to the socket.\n * We don't write directly to the socket because we need to\n * handle backpressure and wait for the socket to be drained\n * before writing more data.\n */\n const socketWritable = new Writable({\n write(chunk, _enc, cb) {\n if (socket.write(chunk)) {\n cb()\n } else {\n socket.once('drain', cb)\n }\n },\n final(cb) {\n socket.end(cb)\n },\n })\n\n const packetQueue: Buffer[] = []\n const recvPromiseResolveQueue: Array<(message: TIncoming) => void> = []\n\n function pushPacket(packet: Buffer) {\n const recvPromiseResolve = recvPromiseResolveQueue.shift()\n if (recvPromiseResolve != null) {\n recvPromiseResolve(JSON.parse(packet.toString('utf8')) as TIncoming)\n } else {\n packetQueue.push(packet)\n }\n }\n\n let state: State = { type: 'waiting' }\n let buffer: Buffer = Buffer.alloc(0)\n socket.once('connect', () => {\n socket.setNoDelay(true)\n socket.on('data', (chunk) => {\n buffer = Buffer.concat([buffer, chunk])\n\n loop: while (true) {\n switch (state.type) {\n case 'waiting': {\n if (buffer.length >= 4) {\n const length = buffer.readUInt32BE(0)\n buffer = buffer.subarray(4)\n state = { type: 'packet', length }\n } else {\n break loop\n }\n break\n }\n case 'packet': {\n if (buffer.length >= state.length) {\n const packet = buffer.subarray(0, state.length)\n buffer = buffer.subarray(state.length)\n state = { type: 'waiting' }\n pushPacket(packet)\n } else {\n break loop\n }\n break\n }\n default:\n invariant(state, (state) => `Unknown state type: ${state?.type}`)\n }\n }\n })\n })\n // When the socket is closed, this process is no longer needed.\n // This might happen e. g. when parent process is killed or\n // node.js pool is garbage collected.\n socket.once('close', () => {\n process.exit(0)\n })\n\n // TODO(lukesandberg): some of the messages being sent are very large and contain lots\n // of redundant information. Consider adding gzip compression to our stream.\n function doSend(message: string): Promise<void> {\n return new Promise((resolve, reject) => {\n // Reserve 4 bytes for our length prefix, we will over-write after encoding.\n const packet = Buffer.from('0000' + message, 'utf8')\n packet.writeUInt32BE(packet.length - 4, 0)\n socketWritable.write(packet, (err) => {\n process.stderr.write(`TURBOPACK_OUTPUT_D\\n`)\n process.stdout.write(`TURBOPACK_OUTPUT_D\\n`)\n if (err != null) {\n reject(err)\n } else {\n resolve()\n }\n })\n })\n }\n\n function send(message: any): Promise<void> {\n return doSend(JSON.stringify(message))\n }\n function sendReady(): Promise<void> {\n return doSend('')\n }\n\n return {\n async recv() {\n const packet = packetQueue.shift()\n if (packet != null) {\n return JSON.parse(packet.toString('utf8')) as TIncoming\n }\n\n const result = await new Promise<TIncoming>((resolve) => {\n recvPromiseResolveQueue.push((result) => {\n resolve(result)\n })\n })\n\n return result\n },\n\n send(message: TOutgoing) {\n return send(message)\n },\n\n sendReady,\n\n async sendError(error: Error): Promise<never> {\n let failed = false\n try {\n await send({\n type: 'error',\n ...structuredError(error),\n })\n } catch (err) {\n // There's nothing we can do about errors that happen after this point, we can't tell anyone\n // about them.\n console.error('failed to send error back to rust:', err)\n failed = true\n }\n await new Promise<void>((res) => socket.end(() => res()))\n process.exit(failed ? 1 : 0)\n },\n }\n}\n\nconst PORT = process.argv[2]\n\nexport const IPC = createIpc<unknown, unknown>(parseInt(PORT, 10))\n\nprocLine truncated
{"offset": {"line": 386, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts"],"sourcesContent":["import { IPC } from './index'\nimport type { Ipc as GenericIpc } from './index'\n\nimport type { Channel as Ipc } from '../types'\n\ntype IpcIncomingMessage =\n | {\n type: 'evaluate'\n args: string[]\n }\n | {\n type: 'result'\n id: number\n error: string | null\n data: any | null\n }\n\ntype IpcOutgoingMessage =\n | {\n type: 'end'\n data: string | undefined\n duration: number\n }\n | {\n type: 'info'\n data: any\n }\n | {\n type: 'request'\n id: number\n data: any\n }\n\nconst ipc = IPC as GenericIpc<IpcIncomingMessage, IpcOutgoingMessage>\n\nconst queue: string[][] = []\n\nexport const run = async (\n moduleFactory: () => Promise<{\n init?: () => Promise<void>\n default: (ipc: Ipc<any, any>, ...deserializedArgs: any[]) => any\n }>\n) => {\n let nextId = 1\n const requests = new Map()\n const internalIpc = {\n sendInfo: (message: any) =>\n ipc.send({\n type: 'info',\n data: message,\n }),\n sendRequest: (message: any) => {\n const id = nextId++\n let resolve, reject\n const promise = new Promise((res, rej) => {\n resolve = res\n reject = rej\n })\n requests.set(id, { resolve, reject })\n return ipc\n .send({ type: 'request', id, data: message })\n .then(() => promise)\n },\n sendError: (error: Error) => {\n return ipc.sendError(error)\n },\n }\n\n // Initialize module and send ready message\n let getValue: (ipc: Ipc<any, any>, ...deserializedArgs: any[]) => any\n try {\n const module = await moduleFactory()\n if (typeof module.init === 'function') {\n await module.init()\n }\n getValue = module.default\n await ipc.sendReady()\n } catch (err) {\n await ipc.sendReady()\n await ipc.sendError(err as Error)\n }\n\n // Queue handling\n let isRunning = false\n const run = async () => {\n while (queue.length > 0) {\n const args = queue.shift()!\n try {\n const value = await getValue(internalIpc, ...args)\n await ipc.send({\n type: 'end',\n data:\n value === undefined ? undefined : JSON.stringify(value, null, 2),\n duration: 0,\n })\n } catch (e) {\n await ipc.sendError(e as Error)\n }\n }\n isRunning = false\n }\n\n // Communication handling\n while (true) {\n const msg = await ipc.recv()\n\n switch (msg.type) {\n case 'evaluate': {\n queue.push(msg.args)\n if (!isRunning) {\n isRunning = true\n run()\n }\n break\n }\n case 'result': {\n const request = requests.get(msg.id)\n if (request) {\n requests.delete(msg.id)\n if (msg.error) {\n request.reject(new Error(msg.error))\n } else {\n request.resolve(msg.data)\n }\n }\n break\n }\n default: {\n console.error('unexpected message type', (msg as any).type)\n process.exit(1)\n }\n }\n }\n}\n\nexport type { IpcIncomingMessage, IpcOutgoingMessage }\n"],"names":["ipc","queue","run","moduleFactory","nextId","requests","Map","internalIpc","sendInfo","message","send","type","data","sendRequest","id","resolve","reject","promise","Promise","res","rej","set","then","sendError","error","getValue","module","init","default","sendReady","err","isRunning","length","args","shift","value","undefined","JSON","stringify","duration","e","msg","recv","push","request","get","delete","Error","console","process","exit"],"mappings":";;;;AAAA;;AAiCA,MAAMA,MAAM,oIAAG;AAEf,MAAMC,QAAoB,EAAE;AAErB,MAAMC,MAAM,OACjBC;IAKA,IAAIC,SAAS;IACb,MAAMC,WAAW,IAAIC;IACrB,MAAMC,cAAc;QAClBC,UAAU,CAACC,UACTT,IAAIU,IAAI,CAAC;gBACPC,MAAM;gBACNC,MAAMH;YACR;QACFI,aAAa,CAACJ;YACZ,MAAMK,KAAKV;YACX,IAAIW,SAASC;YACb,MAAMC,UAAU,IAAIC,QAAQ,CAACC,KAAKC;gBAChCL,UAAUI;gBACVH,SAASI;YACX;YACAf,SAASgB,GAAG,CAACP,IAAI;gBAAEC;gBAASC;YAAO;YACnC,OAAOhB,IACJU,IAAI,CAAC;gBAAEC,MAAM;gBAAWG;gBAAIF,MAAMH;YAAQ,GAC1Ca,IAAI,CAAC,IAAML;QAChB;QACAM,WAAW,CAACC;YACV,OAAOxB,IAAIuB,SAAS,CAACC;QACvB;IACF;IAEA,2CAA2C;IAC3C,IAAIC;IACJ,IAAI;QACF,MAAMC,SAAS,MAAMvB;QACrB,IAAI,OAAOuB,OAAOC,IAAI,KAAK,YAAY;YACrC,MAAMD,OAAOC,IAAI;QACnB;QACAF,WAAWC,OAAOE,OAAO;QACzB,MAAM5B,IAAI6B,SAAS;IACrB,EAAE,OAAOC,KAAK;QACZ,MAAM9B,IAAI6B,SAAS;QACnB,MAAM7B,IAAIuB,SAAS,CAACO;IACtB;IAEA,iBAAiB;IACjB,IAAIC,YAAY;IAChB,MAAM7B,MAAM;QACV,MAAOD,MAAM+B,MAAM,GAAG,EAAG;YACvB,MAAMC,OAAOhC,MAAMiC,KAAK;YACxB,IAAI;gBACF,MAAMC,QAAQ,MAAMV,SAASlB,gBAAgB0B;gBAC7C,MAAMjC,IAAIU,IAAI,CAAC;oBACbC,MAAM;oBACNC,MACEuB,UAAUC,YAAYA,YAAYC,KAAKC,SAAS,CAACH,OAAO,MAAM;oBAChEI,UAAU;gBACZ;YACF,EAAE,OAAOC,GAAG;gBACV,MAAMxC,IAAIuB,SAAS,CAACiB;YACtB;QACF;QACAT,YAAY;IACd;IAEA,yBAAyB;IACzB,MAAO,KAAM;QACX,MAAMU,MAAM,MAAMzC,IAAI0C,IAAI;QAE1B,OAAQLine truncated
{"offset": {"line": 492, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts/evaluate.js"],"sourcesContent":["import { run } from 'RUNTIME'; run(() => import('INNER'))"],"names":[],"mappings":";AAAA;;AAA+B,IAAA,uIAAG,EAAC"}}]
}
@@ -1,500 +0,0 @@
module.exports = [
"[turbopack-node]/child_process/globals.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__, module, exports) => {
// @ts-ignore
process.turbopack = {};
}),
"[externals]/node:net [external] (node:net, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("node:net", () => require("node:net"));
module.exports = mod;
}),
"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => {
const mod = __turbopack_context__.x("node:stream", () => require("node:stream"));
module.exports = mod;
}),
"[turbopack-node]/compiled/stacktrace-parser/index.js [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"parse",
()=>parse
]);
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/compiled/stacktrace-parser") + "/";
var n = "<unknown>";
function parse(e) {
var r = e.split("\n");
return r.reduce(function(e, r) {
var n = parseChrome(r) || parseWinjs(r) || parseGecko(r) || parseNode(r) || parseJSC(r);
if (n) {
e.push(n);
}
return e;
}, []);
}
var a = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
var l = /\((\S*)(?::(\d+))(?::(\d+))\)/;
function parseChrome(e) {
var r = a.exec(e);
if (!r) {
return null;
}
var u = r[2] && r[2].indexOf("native") === 0;
var t = r[2] && r[2].indexOf("eval") === 0;
var i = l.exec(r[2]);
if (t && i != null) {
r[2] = i[1];
r[3] = i[2];
r[4] = i[3];
}
return {
file: !u ? r[2] : null,
methodName: r[1] || n,
arguments: u ? [
r[2]
] : [],
lineNumber: r[3] ? +r[3] : null,
column: r[4] ? +r[4] : null
};
}
var u = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
function parseWinjs(e) {
var r = u.exec(e);
if (!r) {
return null;
}
return {
file: r[2],
methodName: r[1] || n,
arguments: [],
lineNumber: +r[3],
column: r[4] ? +r[4] : null
};
}
var t = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;
var i = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
function parseGecko(e) {
var r = t.exec(e);
if (!r) {
return null;
}
var a = r[3] && r[3].indexOf(" > eval") > -1;
var l = i.exec(r[3]);
if (a && l != null) {
r[3] = l[1];
r[4] = l[2];
r[5] = null;
}
return {
file: r[3],
methodName: r[1] || n,
arguments: r[2] ? r[2].split(",") : [],
lineNumber: r[4] ? +r[4] : null,
column: r[5] ? +r[5] : null
};
}
var s = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;
function parseJSC(e) {
var r = s.exec(e);
if (!r) {
return null;
}
return {
file: r[3],
methodName: r[1] || n,
arguments: [],
lineNumber: +r[4],
column: r[5] ? +r[5] : null
};
}
var o = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
function parseNode(e) {
var r = o.exec(e);
if (!r) {
return null;
}
return {
file: r[2],
methodName: r[1] || n,
arguments: [],
lineNumber: +r[3],
column: r[4] ? +r[4] : null
};
}
}),
"[turbopack-node]/error.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>isError,
"getProperError",
()=>getProperError,
"structuredError",
()=>structuredError
]);
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [webpack_loaders] (ecmascript)");
;
function isError(err) {
return typeof err === 'object' && err !== null && 'name' in err && 'message' in err;
}
function getProperError(err) {
if (isError(err)) {
return err;
}
if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
;
return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '');
}
function getObjectClassLabel(value) {
return Object.prototype.toString.call(value);
}
function isPlainObject(value) {
if (getObjectClassLabel(value) !== '[object Object]') {
return false;
}
const prototype = Object.getPrototypeOf(value);
/**
* this used to be previously:
*
* `return prototype === null || prototype === Object.prototype`
*
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
*
* It was changed to the current implementation since it's resilient to serialization.
*/ return prototype === null || prototype.hasOwnProperty('isPrototypeOf');
}
function structuredError(e) {
e = getProperError(e);
return {
name: e.name,
message: e.message,
stack: typeof e.stack === 'string' ? (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["parse"])(e.stack) : [],
cause: e.cause ? structuredError(getProperError(e.cause)) : undefined
};
}
}),
"[turbopack-node]/child_process/index.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"IPC",
()=>IPC
]);
var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:net [external] (node:net, cjs)");
var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:stream [external] (node:stream, cjs)");
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [webpack_loaders] (ecmascript)");
;
;
;
function createIpc(port) {
const socket = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__["createConnection"])({
port,
host: '127.0.0.1'
});
/**
* A writable stream that writes to the socket.
* We don't write directly to the socket because we need to
* handle backpressure and wait for the socket to be drained
* before writing more data.
*/ const socketWritable = new __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__["Writable"]({
write (chunk, _enc, cb) {
if (socket.write(chunk)) {
cb();
} else {
socket.once('drain', cb);
}
},
final (cb) {
socket.end(cb);
}
});
const packetQueue = [];
const recvPromiseResolveQueue = [];
function pushPacket(packet) {
const recvPromiseResolve = recvPromiseResolveQueue.shift();
if (recvPromiseResolve != null) {
recvPromiseResolve(JSON.parse(packet.toString('utf8')));
} else {
packetQueue.push(packet);
}
}
let state = {
type: 'waiting'
};
let buffer = Buffer.alloc(0);
socket.once('connect', ()=>{
socket.setNoDelay(true);
socket.on('data', (chunk)=>{
buffer = Buffer.concat([
buffer,
chunk
]);
loop: while(true){
switch(state.type){
case 'waiting':
{
if (buffer.length >= 4) {
const length = buffer.readUInt32BE(0);
buffer = buffer.subarray(4);
state = {
type: 'packet',
length
};
} else {
break loop;
}
break;
}
case 'packet':
{
if (buffer.length >= state.length) {
const packet = buffer.subarray(0, state.length);
buffer = buffer.subarray(state.length);
state = {
type: 'waiting'
};
pushPacket(packet);
} else {
break loop;
}
break;
}
default:
invariant(state, (state)=>`Unknown state type: ${state?.type}`);
}
}
});
});
// When the socket is closed, this process is no longer needed.
// This might happen e. g. when parent process is killed or
// node.js pool is garbage collected.
socket.once('close', ()=>{
process.exit(0);
});
// TODO(lukesandberg): some of the messages being sent are very large and contain lots
// of redundant information. Consider adding gzip compression to our stream.
function doSend(message) {
return new Promise((resolve, reject)=>{
// Reserve 4 bytes for our length prefix, we will over-write after encoding.
const packet = Buffer.from('0000' + message, 'utf8');
packet.writeUInt32BE(packet.length - 4, 0);
socketWritable.write(packet, (err)=>{
process.stderr.write(`TURBOPACK_OUTPUT_D\n`);
process.stdout.write(`TURBOPACK_OUTPUT_D\n`);
if (err != null) {
reject(err);
} else {
resolve();
}
});
});
}
function send(message) {
return doSend(JSON.stringify(message));
}
function sendReady() {
return doSend('');
}
return {
async recv () {
const packet = packetQueue.shift();
if (packet != null) {
return JSON.parse(packet.toString('utf8'));
}
const result = await new Promise((resolve)=>{
recvPromiseResolveQueue.push((result)=>{
resolve(result);
});
});
return result;
},
send (message) {
return send(message);
},
sendReady,
async sendError (error) {
let failed = false;
try {
await send({
type: 'error',
...(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["structuredError"])(error)
});
} catch (err) {
// There's nothing we can do about errors that happen after this point, we can't tell anyone
// about them.
console.error('failed to send error back to rust:', err);
failed = true;
}
await new Promise((res)=>socket.end(()=>res()));
process.exit(failed ? 1 : 0);
}
};
}
const PORT = process.argv[2];
const IPC = createIpc(parseInt(PORT, 10));
process.on('uncaughtException', (err)=>{
IPC.sendError(err);
});
process.on('unhandledRejection', (reason)=>{
IPC.sendError(reason instanceof Error ? reason : new Error(String(reason)));
});
const improveConsole = (name, stream, addStack)=>{
// @ts-ignore
const original = console[name];
// @ts-ignore
const stdio = process[stream];
// @ts-ignore
console[name] = (...args)=>{
stdio.write(`TURBOPACK_OUTPUT_B\n`);
original(...args);
if (addStack) {
const stack = new Error().stack?.replace(/^.+\n.+\n/, '') + '\n';
stdio.write('TURBOPACK_OUTPUT_S\n');
stdio.write(stack);
}
stdio.write('TURBOPACK_OUTPUT_E\n');
};
};
improveConsole('error', 'stderr', true);
improveConsole('warn', 'stderr', true);
improveConsole('count', 'stdout', true);
improveConsole('trace', 'stderr', false);
improveConsole('log', 'stdout', true);
improveConsole('group', 'stdout', true);
improveConsole('groupCollapsed', 'stdout', true);
improveConsole('table', 'stdout', true);
improveConsole('debug', 'stdout', true);
improveConsole('info', 'stdout', true);
improveConsole('dir', 'stdout', true);
improveConsole('dirxml', 'stdout', true);
improveConsole('timeEnd', 'stdout', true);
improveConsole('timeLog', 'stdout', true);
improveConsole('timeStamp', 'stdout', true);
improveConsole('assert', 'stderr', true);
/**
* Utility function to ensure all variants of an enum are handled.
*/ function invariant(never, computeMessage) {
throw new Error(`Invariant: ${computeMessage(never)}`);
}
}),
"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"run",
()=>run
]);
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/index.ts [webpack_loaders] (ecmascript)");
;
const ipc = __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["IPC"];
const queue = [];
const run = async (moduleFactory)=>{
let nextId = 1;
const requests = new Map();
const internalIpc = {
sendInfo: (message)=>ipc.send({
type: 'info',
data: message
}),
sendRequest: (message)=>{
const id = nextId++;
let resolve, reject;
const promise = new Promise((res, rej)=>{
resolve = res;
reject = rej;
});
requests.set(id, {
resolve,
reject
});
return ipc.send({
type: 'request',
id,
data: message
}).then(()=>promise);
},
sendError: (error)=>{
return ipc.sendError(error);
}
};
// Initialize module and send ready message
let getValue;
try {
const module = await moduleFactory();
if (typeof module.init === 'function') {
await module.init();
}
getValue = module.default;
await ipc.sendReady();
} catch (err) {
await ipc.sendReady();
await ipc.sendError(err);
}
// Queue handling
let isRunning = false;
const run = async ()=>{
while(queue.length > 0){
const args = queue.shift();
try {
const value = await getValue(internalIpc, ...args);
await ipc.send({
type: 'end',
data: value === undefined ? undefined : JSON.stringify(value, null, 2),
duration: 0
});
} catch (e) {
await ipc.sendError(e);
}
}
isRunning = false;
};
// Communication handling
while(true){
const msg = await ipc.recv();
switch(msg.type){
case 'evaluate':
{
queue.push(msg.args);
if (!isRunning) {
isRunning = true;
run();
}
break;
}
case 'result':
{
const request = requests.get(msg.id);
if (request) {
requests.delete(msg.id);
if (msg.error) {
request.reject(new Error(msg.error));
} else {
request.resolve(msg.data);
}
}
break;
}
default:
{
console.error('unexpected message type', msg.type);
process.exit(1);
}
}
}
};
}),
"[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)\" } [webpack_loaders] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)");
;
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["run"])(()=>__turbopack_context__.A("[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript, async loader)"));
}),
];
//# sourceMappingURL=%5Broot-of-the-server%5D__1nvwxt6._.js.map
@@ -1,11 +0,0 @@
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/globals.ts"],"sourcesContent":["// @ts-ignore\nprocess.turbopack = {}\n"],"names":["process","turbopack"],"mappings":"AAAA,aAAa;AACbA,QAAQC,SAAS,GAAG,CAAC"}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/compiled/stacktrace-parser/index.js"],"sourcesContent":["if (typeof __nccwpck_require__ !== \"undefined\")\n __nccwpck_require__.ab = __dirname + \"/\";\n\nvar n = \"<unknown>\";\nexport function parse(e) {\n var r = e.split(\"\\n\");\n return r.reduce(function (e, r) {\n var n =\n parseChrome(r) ||\n parseWinjs(r) ||\n parseGecko(r) ||\n parseNode(r) ||\n parseJSC(r);\n if (n) {\n e.push(n);\n }\n return e;\n }, []);\n}\nvar a =\n /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar l = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nfunction parseChrome(e) {\n var r = a.exec(e);\n if (!r) {\n return null;\n }\n var u = r[2] && r[2].indexOf(\"native\") === 0;\n var t = r[2] && r[2].indexOf(\"eval\") === 0;\n var i = l.exec(r[2]);\n if (t && i != null) {\n r[2] = i[1];\n r[3] = i[2];\n r[4] = i[3];\n }\n return {\n file: !u ? r[2] : null,\n methodName: r[1] || n,\n arguments: u ? [r[2]] : [],\n lineNumber: r[3] ? +r[3] : null,\n column: r[4] ? +r[4] : null,\n };\n}\nvar u =\n /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinjs(e) {\n var r = u.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\nvar t =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar i = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGecko(e) {\n var r = t.exec(e);\n if (!r) {\n return null;\n }\n var a = r[3] && r[3].indexOf(\" > eval\") > -1;\n var l = i.exec(r[3]);\n if (a && l != null) {\n r[3] = l[1];\n r[4] = l[2];\n r[5] = null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: r[2] ? r[2].split(\",\") : [],\n lineNumber: r[4] ? +r[4] : null,\n column: r[5] ? +r[5] : null,\n };\n}\nvar s = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\nfunction parseJSC(e) {\n var r = s.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[4],\n column: r[5] ? +r[5] : null,\n };\n}\nvar o =\n /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseNode(e) {\n var r = o.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\n"],"names":["__nccwpck_require__","ab","n","parse","e","r","split","reduce","parseChrome","parseWinjs","parseGecko","parseNode","parseJSC","push","a","l","exec","u","indexOf","t","i","file","methodName","arguments","lineNumber","column","s","o"],"mappings":";;;;AAAA,IAAI,OAAOA,wBAAwB,aACjCA,oBAAoBC,EAAE,GAAG,uEAAY;AAEvC,IAAIC,IAAI;AACD,SAASC,MAAMC,CAAC;IACrB,IAAIC,IAAID,EAAEE,KAAK,CAAC;IAChB,OAAOD,EAAEE,MAAM,CAAC,SAAUH,CAAC,EAAEC,CAAC;QAC5B,IAAIH,IACFM,YAAYH,MACZI,WAAWJ,MACXK,WAAWL,MACXM,UAAUN,MACVO,SAASP;QACX,IAAIH,GAAG;YACLE,EAAES,IAAI,CAACX;QACT;QACA,OAAOE;IACT,GAAG,EAAE;AACP;AACA,IAAIU,IACF;AACF,IAAIC,IAAI;AACR,SAASP,YAAYJ,CAAC;IACpB,IAAIC,IAAIS,EAAEE,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,IAAIY,IAAIZ,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,cAAc;IAC3C,IAAIC,IAAId,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,YAAY;IACzC,IAAIE,IAAIL,EAAEC,IAAI,CAACX,CAAC,CAAC,EAAE;IACnB,IAAIc,KAAKC,KAAK,MAAM;QAClBf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;QACXf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;QACXf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;IACb;IACA,OAAO;QACLC,MAAM,CAACJ,IAAIZ,CAAC,CAAC,EAAE,GAAG;QAClBiB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAWN,IAAI;YAACZ,CAAC,CAAC,EAAE;SAAC,GAAG,EAAE;QAC1BmB,YAAYnB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;QAC3BoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIY,IACF;AACF,SAASR,WAAWL,CAAC;IACnB,IAAIC,IAAIY,EAAED,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAW,EAAE;QACbC,YAAY,CAACnB,CAAC,CAAC,EAAE;QACjBoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIc,IACF;AACF,IAAIC,IAAI;AACR,SAASV,WAAWN,CAAC;IACnB,IAAIC,IAAIc,EAAEH,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,IAAIS,IAAIT,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,aAAa,CAAC;IAC3C,IAAIH,IAAIK,EAAEJ,IAAI,CAACX,CAAC,CAAC,EAAE;IACnB,IAAIS,KAAKC,KAAK,MAAM;QAClBV,CAAC,CAAC,EAAE,GAAGU,CAAC,CAAC,EAAE;QACXV,CAAC,CAAC,EAAE,GAAGU,CAAC,CAAC,EAAE;QACXV,CAAC,CAAC,EAAE,GAAG;IACT;IACA,OAAO;QACLgB,MAAMhB,CALine truncated
{"offset": {"line": 130, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/error.ts"],"sourcesContent":["import type { StackFrame } from './compiled/stacktrace-parser'\nimport { parse as parseStackTrace } from './compiled/stacktrace-parser'\n\n// merged from next.js\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/lib/is-error.ts\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/shared/lib/is-plain-object.ts\n\nexport default function isError(err: unknown): err is Error {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Provide a better error message for cases where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error('`undefined` was thrown instead of a real error')\n }\n\n if (err === null) {\n return new Error('`null` was thrown instead of a real error')\n }\n }\n\n return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '')\n}\n\nfunction getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nfunction isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n\nexport type StructuredError = {\n name: string\n message: string\n stack: StackFrame[]\n cause: StructuredError | undefined\n}\n\nexport function structuredError(e: Error | string): StructuredError {\n e = getProperError(e)\n\n return {\n name: e.name,\n message: e.message,\n stack: typeof e.stack === 'string' ? parseStackTrace(e.stack) : [],\n cause: e.cause ? structuredError(getProperError(e.cause)) : undefined,\n }\n}\n"],"names":["isError","err","getProperError","Error","isPlainObject","JSON","stringify","getObjectClassLabel","value","Object","prototype","toString","call","getPrototypeOf","hasOwnProperty","structuredError","e","name","message","stack","cause","undefined"],"mappings":";;;;;;;;AACA;;AAMe,SAASA,QAAQC,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEO,SAASC,eAAeD,GAAY;IACzC,IAAID,QAAQC,MAAM;QAChB,OAAOA;IACT;IAEA;;IAYA,OAAO,IAAIE,MAAMC,cAAcH,OAAOI,KAAKC,SAAS,CAACL,OAAOA,MAAM;AACpE;AAEA,SAASM,oBAAoBC,KAAU;IACrC,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEA,SAASJ,cAAcI,KAAU;IAC/B,IAAID,oBAAoBC,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOI,cAAc,CAACL;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUI,cAAc,CAAC;AACxD;AASO,SAASC,gBAAgBC,CAAiB;IAC/CA,IAAId,eAAec;IAEnB,OAAO;QACLC,MAAMD,EAAEC,IAAI;QACZC,SAASF,EAAEE,OAAO;QAClBC,OAAO,OAAOH,EAAEG,KAAK,KAAK,WAAW,IAAA,iKAAe,EAACH,EAAEG,KAAK,IAAI,EAAE;QAClEC,OAAOJ,EAAEI,KAAK,GAAGL,gBAAgBb,eAAec,EAAEI,KAAK,KAAKC;IAC9D;AACF"}},
{"offset": {"line": 182, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/index.ts"],"sourcesContent":["import { createConnection } from 'node:net'\nimport { Writable } from 'node:stream'\nimport { structuredError } from '../error'\n\ntype State =\n | {\n type: 'waiting'\n }\n | {\n type: 'packet'\n length: number\n }\n\nexport type Ipc<TIncoming, TOutgoing> = {\n recv(): Promise<TIncoming>\n send(message: TOutgoing): Promise<void>\n sendError(error: Error | string): Promise<never>\n sendReady(): Promise<void>\n}\n\nfunction createIpc<TIncoming, TOutgoing>(\n port: number\n): Ipc<TIncoming, TOutgoing> {\n const socket = createConnection({\n port,\n host: '127.0.0.1',\n })\n\n /**\n * A writable stream that writes to the socket.\n * We don't write directly to the socket because we need to\n * handle backpressure and wait for the socket to be drained\n * before writing more data.\n */\n const socketWritable = new Writable({\n write(chunk, _enc, cb) {\n if (socket.write(chunk)) {\n cb()\n } else {\n socket.once('drain', cb)\n }\n },\n final(cb) {\n socket.end(cb)\n },\n })\n\n const packetQueue: Buffer[] = []\n const recvPromiseResolveQueue: Array<(message: TIncoming) => void> = []\n\n function pushPacket(packet: Buffer) {\n const recvPromiseResolve = recvPromiseResolveQueue.shift()\n if (recvPromiseResolve != null) {\n recvPromiseResolve(JSON.parse(packet.toString('utf8')) as TIncoming)\n } else {\n packetQueue.push(packet)\n }\n }\n\n let state: State = { type: 'waiting' }\n let buffer: Buffer = Buffer.alloc(0)\n socket.once('connect', () => {\n socket.setNoDelay(true)\n socket.on('data', (chunk) => {\n buffer = Buffer.concat([buffer, chunk])\n\n loop: while (true) {\n switch (state.type) {\n case 'waiting': {\n if (buffer.length >= 4) {\n const length = buffer.readUInt32BE(0)\n buffer = buffer.subarray(4)\n state = { type: 'packet', length }\n } else {\n break loop\n }\n break\n }\n case 'packet': {\n if (buffer.length >= state.length) {\n const packet = buffer.subarray(0, state.length)\n buffer = buffer.subarray(state.length)\n state = { type: 'waiting' }\n pushPacket(packet)\n } else {\n break loop\n }\n break\n }\n default:\n invariant(state, (state) => `Unknown state type: ${state?.type}`)\n }\n }\n })\n })\n // When the socket is closed, this process is no longer needed.\n // This might happen e. g. when parent process is killed or\n // node.js pool is garbage collected.\n socket.once('close', () => {\n process.exit(0)\n })\n\n // TODO(lukesandberg): some of the messages being sent are very large and contain lots\n // of redundant information. Consider adding gzip compression to our stream.\n function doSend(message: string): Promise<void> {\n return new Promise((resolve, reject) => {\n // Reserve 4 bytes for our length prefix, we will over-write after encoding.\n const packet = Buffer.from('0000' + message, 'utf8')\n packet.writeUInt32BE(packet.length - 4, 0)\n socketWritable.write(packet, (err) => {\n process.stderr.write(`TURBOPACK_OUTPUT_D\\n`)\n process.stdout.write(`TURBOPACK_OUTPUT_D\\n`)\n if (err != null) {\n reject(err)\n } else {\n resolve()\n }\n })\n })\n }\n\n function send(message: any): Promise<void> {\n return doSend(JSON.stringify(message))\n }\n function sendReady(): Promise<void> {\n return doSend('')\n }\n\n return {\n async recv() {\n const packet = packetQueue.shift()\n if (packet != null) {\n return JSON.parse(packet.toString('utf8')) as TIncoming\n }\n\n const result = await new Promise<TIncoming>((resolve) => {\n recvPromiseResolveQueue.push((result) => {\n resolve(result)\n })\n })\n\n return result\n },\n\n send(message: TOutgoing) {\n return send(message)\n },\n\n sendReady,\n\n async sendError(error: Error): Promise<never> {\n let failed = false\n try {\n await send({\n type: 'error',\n ...structuredError(error),\n })\n } catch (err) {\n // There's nothing we can do about errors that happen after this point, we can't tell anyone\n // about them.\n console.error('failed to send error back to rust:', err)\n failed = true\n }\n await new Promise<void>((res) => socket.end(() => res()))\n process.exit(failed ? 1 : 0)\n },\n }\n}\n\nconst PORT = process.argv[2]\n\nexport const IPC = createIpc<unknown, unknown>(parseInt(PORT, 10))\n\nprocLine truncated
{"offset": {"line": 386, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts"],"sourcesContent":["import { IPC } from './index'\nimport type { Ipc as GenericIpc } from './index'\n\nimport type { Channel as Ipc } from '../types'\n\ntype IpcIncomingMessage =\n | {\n type: 'evaluate'\n args: string[]\n }\n | {\n type: 'result'\n id: number\n error: string | null\n data: any | null\n }\n\ntype IpcOutgoingMessage =\n | {\n type: 'end'\n data: string | undefined\n duration: number\n }\n | {\n type: 'info'\n data: any\n }\n | {\n type: 'request'\n id: number\n data: any\n }\n\nconst ipc = IPC as GenericIpc<IpcIncomingMessage, IpcOutgoingMessage>\n\nconst queue: string[][] = []\n\nexport const run = async (\n moduleFactory: () => Promise<{\n init?: () => Promise<void>\n default: (ipc: Ipc<any, any>, ...deserializedArgs: any[]) => any\n }>\n) => {\n let nextId = 1\n const requests = new Map()\n const internalIpc = {\n sendInfo: (message: any) =>\n ipc.send({\n type: 'info',\n data: message,\n }),\n sendRequest: (message: any) => {\n const id = nextId++\n let resolve, reject\n const promise = new Promise((res, rej) => {\n resolve = res\n reject = rej\n })\n requests.set(id, { resolve, reject })\n return ipc\n .send({ type: 'request', id, data: message })\n .then(() => promise)\n },\n sendError: (error: Error) => {\n return ipc.sendError(error)\n },\n }\n\n // Initialize module and send ready message\n let getValue: (ipc: Ipc<any, any>, ...deserializedArgs: any[]) => any\n try {\n const module = await moduleFactory()\n if (typeof module.init === 'function') {\n await module.init()\n }\n getValue = module.default\n await ipc.sendReady()\n } catch (err) {\n await ipc.sendReady()\n await ipc.sendError(err as Error)\n }\n\n // Queue handling\n let isRunning = false\n const run = async () => {\n while (queue.length > 0) {\n const args = queue.shift()!\n try {\n const value = await getValue(internalIpc, ...args)\n await ipc.send({\n type: 'end',\n data:\n value === undefined ? undefined : JSON.stringify(value, null, 2),\n duration: 0,\n })\n } catch (e) {\n await ipc.sendError(e as Error)\n }\n }\n isRunning = false\n }\n\n // Communication handling\n while (true) {\n const msg = await ipc.recv()\n\n switch (msg.type) {\n case 'evaluate': {\n queue.push(msg.args)\n if (!isRunning) {\n isRunning = true\n run()\n }\n break\n }\n case 'result': {\n const request = requests.get(msg.id)\n if (request) {\n requests.delete(msg.id)\n if (msg.error) {\n request.reject(new Error(msg.error))\n } else {\n request.resolve(msg.data)\n }\n }\n break\n }\n default: {\n console.error('unexpected message type', (msg as any).type)\n process.exit(1)\n }\n }\n }\n}\n\nexport type { IpcIncomingMessage, IpcOutgoingMessage }\n"],"names":["ipc","queue","run","moduleFactory","nextId","requests","Map","internalIpc","sendInfo","message","send","type","data","sendRequest","id","resolve","reject","promise","Promise","res","rej","set","then","sendError","error","getValue","module","init","default","sendReady","err","isRunning","length","args","shift","value","undefined","JSON","stringify","duration","e","msg","recv","push","request","get","delete","Error","console","process","exit"],"mappings":";;;;AAAA;;AAiCA,MAAMA,MAAM,4IAAG;AAEf,MAAMC,QAAoB,EAAE;AAErB,MAAMC,MAAM,OACjBC;IAKA,IAAIC,SAAS;IACb,MAAMC,WAAW,IAAIC;IACrB,MAAMC,cAAc;QAClBC,UAAU,CAACC,UACTT,IAAIU,IAAI,CAAC;gBACPC,MAAM;gBACNC,MAAMH;YACR;QACFI,aAAa,CAACJ;YACZ,MAAMK,KAAKV;YACX,IAAIW,SAASC;YACb,MAAMC,UAAU,IAAIC,QAAQ,CAACC,KAAKC;gBAChCL,UAAUI;gBACVH,SAASI;YACX;YACAf,SAASgB,GAAG,CAACP,IAAI;gBAAEC;gBAASC;YAAO;YACnC,OAAOhB,IACJU,IAAI,CAAC;gBAAEC,MAAM;gBAAWG;gBAAIF,MAAMH;YAAQ,GAC1Ca,IAAI,CAAC,IAAML;QAChB;QACAM,WAAW,CAACC;YACV,OAAOxB,IAAIuB,SAAS,CAACC;QACvB;IACF;IAEA,2CAA2C;IAC3C,IAAIC;IACJ,IAAI;QACF,MAAMC,SAAS,MAAMvB;QACrB,IAAI,OAAOuB,OAAOC,IAAI,KAAK,YAAY;YACrC,MAAMD,OAAOC,IAAI;QACnB;QACAF,WAAWC,OAAOE,OAAO;QACzB,MAAM5B,IAAI6B,SAAS;IACrB,EAAE,OAAOC,KAAK;QACZ,MAAM9B,IAAI6B,SAAS;QACnB,MAAM7B,IAAIuB,SAAS,CAACO;IACtB;IAEA,iBAAiB;IACjB,IAAIC,YAAY;IAChB,MAAM7B,MAAM;QACV,MAAOD,MAAM+B,MAAM,GAAG,EAAG;YACvB,MAAMC,OAAOhC,MAAMiC,KAAK;YACxB,IAAI;gBACF,MAAMC,QAAQ,MAAMV,SAASlB,gBAAgB0B;gBAC7C,MAAMjC,IAAIU,IAAI,CAAC;oBACbC,MAAM;oBACNC,MACEuB,UAAUC,YAAYA,YAAYC,KAAKC,SAAS,CAACH,OAAO,MAAM;oBAChEI,UAAU;gBACZ;YACF,EAAE,OAAOC,GAAG;gBACV,MAAMxC,IAAIuB,SAAS,CAACiB;YACtB;QACF;QACAT,YAAY;IACd;IAEA,yBAAyB;IACzB,MAAO,KAAM;QACX,MAAMU,MAAM,MAAMzC,IAAI0C,IAAI;QAE1B,OAAQLine truncated
{"offset": {"line": 492, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts/evaluate.js"],"sourcesContent":["import { run } from 'RUNTIME'; run(() => import('INNER'))"],"names":[],"mappings":";AAAA;;AAA+B,IAAA,+IAAG,EAAC"}}]
}
@@ -1,13 +0,0 @@
module.exports = [
"[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"chunks/node_modules__pnpm_1k5k_4d._.js",
"chunks/[root-of-the-server]__0oj80bi._.js"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {
return parentImport("[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript)");
});
});
}),
];
@@ -1,5 +0,0 @@
{
"version": 3,
"sources": [],
"sections": []
}
@@ -1,12 +0,0 @@
module.exports = [
"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"chunks/[root-of-the-server]__0x8m--0._.js"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {
return parentImport("[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)");
});
});
}),
];
@@ -1,5 +0,0 @@
{
"version": 3,
"sources": [],
"sections": []
}
@@ -1,890 +0,0 @@
const RUNTIME_PUBLIC_PATH = "chunks/[turbopack]_runtime.js";
const RELATIVE_ROOT_PATH = "..";
const ASSET_PREFIX = "/";
const WORKER_FORWARDED_GLOBALS = [];
/**
* This file contains runtime types and functions that are shared between all
* TurboPack ECMAScript runtimes.
*
* It will be prepended to the runtime code of each runtime.
*/ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-types.d.ts" />
/**
* Describes why a module was instantiated.
* Shared between browser and Node.js runtimes.
*/ var SourceType = /*#__PURE__*/ function(SourceType) {
/**
* The module was instantiated because it was included in an evaluated chunk's
* runtime.
* SourceData is a ChunkPath.
*/ SourceType[SourceType["Runtime"] = 0] = "Runtime";
/**
* The module was instantiated because a parent module imported it.
* SourceData is a ModuleId.
*/ SourceType[SourceType["Parent"] = 1] = "Parent";
/**
* The module was instantiated because it was included in a chunk's hot module
* update.
* SourceData is an array of ModuleIds or undefined.
*/ SourceType[SourceType["Update"] = 2] = "Update";
return SourceType;
}(SourceType || {});
/**
* Flag indicating which module object type to create when a module is merged. Set to `true`
* by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,
* nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it
* uses plain Module objects.
*/ let createModuleWithDirectionFlag = false;
const REEXPORTED_OBJECTS = new WeakMap();
/**
* Constructs the `__turbopack_context__` object for a module.
*/ function Context(module, exports) {
this.m = module;
// We need to store this here instead of accessing it from the module object to:
// 1. Make it available to factories directly, since we rewrite `this` to
// `__turbopack_context__.e` in CJS modules.
// 2. Support async modules which rewrite `module.exports` to a promise, so we
// can still access the original exports object from functions like
// `esmExport`
// Ideally we could find a new approach for async modules and drop this property altogether.
this.e = exports;
}
const contextPrototype = Context.prototype;
const hasOwnProperty = Object.prototype.hasOwnProperty;
const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
function defineProp(obj, name, options) {
if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
}
function getOverwrittenModule(moduleCache, id) {
let module = moduleCache[id];
if (!module) {
if (createModuleWithDirectionFlag) {
// set in development modes for hmr support
module = createModuleWithDirection(id);
} else {
module = createModuleObject(id);
}
moduleCache[id] = module;
}
return module;
}
/**
* Creates the module object. Only done here to ensure all module objects have the same shape.
*/ function createModuleObject(id) {
return {
exports: {},
error: undefined,
id,
namespaceObject: undefined
};
}
function createModuleWithDirection(id) {
return {
exports: {},
error: undefined,
id,
namespaceObject: undefined,
parents: [],
children: []
};
}
const BindingTag_Value = 0;
/**
* Adds the getters to the exports object.
*/ function esm(exports, bindings) {
defineProp(exports, '__esModule', {
value: true
});
if (toStringTag) defineProp(exports, toStringTag, {
value: 'Module'
});
let i = 0;
while(i < bindings.length){
const propName = bindings[i++];
const tagOrFunction = bindings[i++];
if (typeof tagOrFunction === 'number') {
if (tagOrFunction === BindingTag_Value) {
defineProp(exports, propName, {
value: bindings[i++],
enumerable: true,
writable: false
});
} else {
throw new Error(`unexpected tag: ${tagOrFunction}`);
}
} else {
const getterFn = tagOrFunction;
if (typeof bindings[i] === 'function') {
const setterFn = bindings[i++];
defineProp(exports, propName, {
get: getterFn,
set: setterFn,
enumerable: true
});
} else {
defineProp(exports, propName, {
get: getterFn,
enumerable: true
});
}
}
}
Object.seal(exports);
}
/**
* Makes the module an ESM with exports
*/ function esmExport(bindings, id) {
let module;
let exports;
if (id != null) {
module = getOverwrittenModule(this.c, id);
exports = module.exports;
} else {
module = this.m;
exports = this.e;
}
module.namespaceObject = exports;
esm(exports, bindings);
}
contextPrototype.s = esmExport;
function ensureDynamicExports(module, exports) {
let reexportedObjects = REEXPORTED_OBJECTS.get(module);
if (!reexportedObjects) {
REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
module.exports = module.namespaceObject = new Proxy(exports, {
get (target, prop) {
if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
return Reflect.get(target, prop);
}
for (const obj of reexportedObjects){
const value = Reflect.get(obj, prop);
if (value !== undefined) return value;
}
return undefined;
},
ownKeys (target) {
const keys = Reflect.ownKeys(target);
for (const obj of reexportedObjects){
for (const key of Reflect.ownKeys(obj)){
if (key !== 'default' && !keys.includes(key)) keys.push(key);
}
}
return keys;
}
});
}
return reexportedObjects;
}
/**
* Dynamically exports properties from an object
*/ function dynamicExport(object, id) {
let module;
let exports;
if (id != null) {
module = getOverwrittenModule(this.c, id);
exports = module.exports;
} else {
module = this.m;
exports = this.e;
}
const reexportedObjects = ensureDynamicExports(module, exports);
if (typeof object === 'object' && object !== null) {
reexportedObjects.push(object);
}
}
contextPrototype.j = dynamicExport;
function exportValue(value, id) {
let module;
if (id != null) {
module = getOverwrittenModule(this.c, id);
} else {
module = this.m;
}
module.exports = value;
}
contextPrototype.v = exportValue;
function exportNamespace(namespace, id) {
let module;
if (id != null) {
module = getOverwrittenModule(this.c, id);
} else {
module = this.m;
}
module.exports = module.namespaceObject = namespace;
}
contextPrototype.n = exportNamespace;
function createGetter(obj, key) {
return ()=>obj[key];
}
/**
* @returns prototype of the object
*/ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
/** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
null,
getProto({}),
getProto([]),
getProto(getProto)
];
/**
* @param raw
* @param ns
* @param allowExportDefault
* * `false`: will have the raw module as default export
* * `true`: will have the default property as default export
*/ function interopEsm(raw, ns, allowExportDefault) {
const bindings = [];
let defaultLocation = -1;
for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
for (const key of Object.getOwnPropertyNames(current)){
bindings.push(key, createGetter(raw, key));
if (defaultLocation === -1 && key === 'default') {
defaultLocation = bindings.length - 1;
}
}
}
// this is not really correct
// we should set the `default` getter if the imported module is a `.cjs file`
if (!(allowExportDefault && defaultLocation >= 0)) {
// Replace the binding with one for the namespace itself in order to preserve iteration order.
if (defaultLocation >= 0) {
// Replace the getter with the value
bindings.splice(defaultLocation, 1, BindingTag_Value, raw);
} else {
bindings.push('default', BindingTag_Value, raw);
}
}
esm(ns, bindings);
return ns;
}
function createNS(raw) {
if (typeof raw === 'function') {
return function(...args) {
return raw.apply(this, args);
};
} else {
return Object.create(null);
}
}
function esmImport(id) {
const module = getOrInstantiateModuleFromParent(id, this.m);
// any ES module has to have `module.namespaceObject` defined.
if (module.namespaceObject) return module.namespaceObject;
// only ESM can be an async module, so we don't need to worry about exports being a promise here.
const raw = module.exports;
return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
}
contextPrototype.i = esmImport;
function asyncLoader(moduleId) {
const loader = this.r(moduleId);
return loader(esmImport.bind(this));
}
contextPrototype.A = asyncLoader;
// Add a simple runtime require so that environments without one can still pass
// `typeof require` CommonJS checks so that exports are correctly registered.
const runtimeRequire = // @ts-ignore
typeof require === 'function' ? require : function require1() {
throw new Error('Unexpected use of runtime require');
};
contextPrototype.t = runtimeRequire;
function commonJsRequire(id) {
return getOrInstantiateModuleFromParent(id, this.m).exports;
}
contextPrototype.r = commonJsRequire;
/**
* Remove fragments and query parameters since they are never part of the context map keys
*
* This matches how we parse patterns at resolving time. Arguably we should only do this for
* strings passed to `import` but the resolve does it for `import` and `require` and so we do
* here as well.
*/ function parseRequest(request) {
// Per the URI spec fragments can contain `?` characters, so we should trim it off first
// https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
const hashIndex = request.indexOf('#');
if (hashIndex !== -1) {
request = request.substring(0, hashIndex);
}
const queryIndex = request.indexOf('?');
if (queryIndex !== -1) {
request = request.substring(0, queryIndex);
}
return request;
}
/**
* `require.context` and require/import expression runtime.
*/ function moduleContext(map) {
function moduleContext(id) {
id = parseRequest(id);
if (hasOwnProperty.call(map, id)) {
return map[id].module();
}
const e = new Error(`Cannot find module '${id}'`);
e.code = 'MODULE_NOT_FOUND';
throw e;
}
moduleContext.keys = ()=>{
return Object.keys(map);
};
moduleContext.resolve = (id)=>{
id = parseRequest(id);
if (hasOwnProperty.call(map, id)) {
return map[id].id();
}
const e = new Error(`Cannot find module '${id}'`);
e.code = 'MODULE_NOT_FOUND';
throw e;
};
moduleContext.import = async (id)=>{
return await moduleContext(id);
};
return moduleContext;
}
contextPrototype.f = moduleContext;
/**
* Returns the path of a chunk defined by its data.
*/ function getChunkPath(chunkData) {
return typeof chunkData === 'string' ? chunkData : chunkData.path;
}
function isPromise(maybePromise) {
return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
}
function isAsyncModuleExt(obj) {
return turbopackQueues in obj;
}
function createPromise() {
let resolve;
let reject;
const promise = new Promise((res, rej)=>{
reject = rej;
resolve = res;
});
return {
promise,
resolve: resolve,
reject: reject
};
}
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
let i = offset;
while(i < chunkModules.length){
let end = i + 1;
// Find our factory function
while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
end++;
}
if (end === chunkModules.length) {
throw new Error('malformed chunk format, expected a factory function');
}
// Install the factory for each module ID that doesn't already have one.
// When some IDs in this group already have a factory, reuse that existing
// group factory for the missing IDs to keep all IDs in the group consistent.
// Otherwise, install the factory from this chunk.
const moduleFactoryFn = chunkModules[end];
let existingGroupFactory = undefined;
for(let j = i; j < end; j++){
const id = chunkModules[j];
const existingFactory = moduleFactories.get(id);
if (existingFactory) {
existingGroupFactory = existingFactory;
break;
}
}
const factoryToInstall = existingGroupFactory ?? moduleFactoryFn;
let didInstallFactory = false;
for(let j = i; j < end; j++){
const id = chunkModules[j];
if (!moduleFactories.has(id)) {
if (!didInstallFactory) {
if (factoryToInstall === moduleFactoryFn) {
applyModuleFactoryName(moduleFactoryFn);
}
didInstallFactory = true;
}
moduleFactories.set(id, factoryToInstall);
newModuleId?.(id);
}
}
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
}
}
// everything below is adapted from webpack
// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
const turbopackQueues = Symbol('turbopack queues');
const turbopackExports = Symbol('turbopack exports');
const turbopackError = Symbol('turbopack error');
function resolveQueue(queue) {
if (queue && queue.status !== 1) {
queue.status = 1;
queue.forEach((fn)=>fn.queueCount--);
queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
}
}
function wrapDeps(deps) {
return deps.map((dep)=>{
if (dep !== null && typeof dep === 'object') {
if (isAsyncModuleExt(dep)) return dep;
if (isPromise(dep)) {
const queue = Object.assign([], {
status: 0
});
const obj = {
[turbopackExports]: {},
[turbopackQueues]: (fn)=>fn(queue)
};
dep.then((res)=>{
obj[turbopackExports] = res;
resolveQueue(queue);
}, (err)=>{
obj[turbopackError] = err;
resolveQueue(queue);
});
return obj;
}
}
return {
[turbopackExports]: dep,
[turbopackQueues]: ()=>{}
};
});
}
function asyncModule(body, hasAwait) {
const module = this.m;
const queue = hasAwait ? Object.assign([], {
status: -1
}) : undefined;
const depQueues = new Set();
const { resolve, reject, promise: rawPromise } = createPromise();
const promise = Object.assign(rawPromise, {
[turbopackExports]: module.exports,
[turbopackQueues]: (fn)=>{
queue && fn(queue);
depQueues.forEach(fn);
promise['catch'](()=>{});
}
});
const attributes = {
get () {
return promise;
},
set (v) {
// Calling `esmExport` leads to this.
if (v !== promise) {
promise[turbopackExports] = v;
}
}
};
Object.defineProperty(module, 'exports', attributes);
Object.defineProperty(module, 'namespaceObject', attributes);
function handleAsyncDependencies(deps) {
const currentDeps = wrapDeps(deps);
const getResult = ()=>currentDeps.map((d)=>{
if (d[turbopackError]) throw d[turbopackError];
return d[turbopackExports];
});
const { promise, resolve } = createPromise();
const fn = Object.assign(()=>resolve(getResult), {
queueCount: 0
});
function fnQueue(q) {
if (q !== queue && !depQueues.has(q)) {
depQueues.add(q);
if (q && q.status === 0) {
fn.queueCount++;
q.push(fn);
}
}
}
currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
return fn.queueCount ? promise : getResult();
}
function asyncResult(err) {
if (err) {
reject(promise[turbopackError] = err);
} else {
resolve(promise[turbopackExports]);
}
resolveQueue(queue);
}
body(handleAsyncDependencies, asyncResult);
if (queue && queue.status === -1) {
queue.status = 0;
}
}
contextPrototype.a = asyncModule;
/**
* A pseudo "fake" URL object to resolve to its relative path.
*
* When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
* runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
* hydration mismatch.
*
* This is based on webpack's existing implementation:
* https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
*/ const relativeURL = function relativeURL(inputUrl) {
const realUrl = new URL(inputUrl, 'x:/');
const values = {};
for(const key in realUrl)values[key] = realUrl[key];
values.href = inputUrl;
values.pathname = inputUrl.replace(/[?#].*/, '');
values.origin = values.protocol = '';
values.toString = values.toJSON = (..._args)=>inputUrl;
for(const key in values)Object.defineProperty(this, key, {
enumerable: true,
configurable: true,
value: values[key]
});
};
relativeURL.prototype = URL.prototype;
contextPrototype.U = relativeURL;
/**
* Utility function to ensure all variants of an enum are handled.
*/ function invariant(never, computeMessage) {
throw new Error(`Invariant: ${computeMessage(never)}`);
}
/**
* Constructs an error message for when a module factory is not available.
*/ function factoryNotAvailableMessage(moduleId, sourceType, sourceData) {
let instantiationReason;
switch(sourceType){
case 0:
instantiationReason = `as a runtime entry of chunk ${sourceData}`;
break;
case 1:
instantiationReason = `because it was required from module ${sourceData}`;
break;
case 2:
instantiationReason = 'because of an HMR update';
break;
default:
invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
}
return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`;
}
/**
* A stub function to make `require` available but non-functional in ESM.
*/ function requireStub(_moduleId) {
throw new Error('dynamic usage of require is not supported');
}
contextPrototype.z = requireStub;
// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
contextPrototype.g = globalThis;
function applyModuleFactoryName(factory) {
// Give the module factory a nice name to improve stack traces.
Object.defineProperty(factory, 'name', {
value: 'module evaluation'
});
}
/// <reference path="../shared/runtime/runtime-utils.ts" />
/// A 'base' utilities to support runtime can have externals.
/// Currently this is for node.js / edge runtime both.
/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.
async function externalImport(id) {
let raw;
try {
raw = await import(id);
} catch (err) {
// TODO(alexkirsz) This can happen when a client-side module tries to load
// an external module we don't provide a shim for (e.g. querystring, url).
// For now, we fail semi-silently, but in the future this should be a
// compilation error.
throw new Error(`Failed to load external module ${id}: ${err}`);
}
if (raw && raw.__esModule && raw.default && 'default' in raw.default) {
return interopEsm(raw.default, createNS(raw), true);
}
return raw;
}
contextPrototype.y = externalImport;
function externalRequire(id, thunk, esm = false) {
let raw;
try {
raw = thunk();
} catch (err) {
// TODO(alexkirsz) This can happen when a client-side module tries to load
// an external module we don't provide a shim for (e.g. querystring, url).
// For now, we fail semi-silently, but in the future this should be a
// compilation error.
throw new Error(`Failed to load external module ${id}: ${err}`);
}
if (!esm || raw.__esModule) {
return raw;
}
return interopEsm(raw, createNS(raw), true);
}
externalRequire.resolve = (id, options)=>{
return require.resolve(id, options);
};
contextPrototype.x = externalRequire;
/* eslint-disable @typescript-eslint/no-unused-vars */ const path = require('path');
const relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.');
// Compute the relative path to the `distDir`.
const relativePathToDistRoot = path.join(relativePathToRuntimeRoot, RELATIVE_ROOT_PATH);
const RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot);
// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.
const ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot);
/**
* Returns an absolute path to the given module path.
* Module path should be relative, either path to a file or a directory.
*
* This fn allows to calculate an absolute path for some global static values, such as
* `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.
* See ImportMetaBinding::code_generation for the usage.
*/ function resolveAbsolutePath(modulePath) {
if (modulePath) {
return path.join(ABSOLUTE_ROOT, modulePath);
}
return ABSOLUTE_ROOT;
}
Context.prototype.P = resolveAbsolutePath;
/* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../shared/runtime/runtime-utils.ts" />
function readWebAssemblyAsResponse(path) {
const { createReadStream } = require('fs');
const { Readable } = require('stream');
const stream = createReadStream(path);
// @ts-ignore unfortunately there's a slight type mismatch with the stream.
return new Response(Readable.toWeb(stream), {
headers: {
'content-type': 'application/wasm'
}
});
}
async function compileWebAssemblyFromPath(path) {
const response = readWebAssemblyAsResponse(path);
return await WebAssembly.compileStreaming(response);
}
async function instantiateWebAssemblyFromPath(path, importsObj) {
const response = readWebAssemblyAsResponse(path);
const { instance } = await WebAssembly.instantiateStreaming(response, importsObj);
return instance.exports;
}
/* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../../shared/runtime/runtime-utils.ts" />
/// <reference path="../../shared-node/base-externals-utils.ts" />
/// <reference path="../../shared-node/node-externals-utils.ts" />
/// <reference path="../../shared-node/node-wasm-utils.ts" />
/// <reference path="./nodejs-globals.d.ts" />
/**
* Base Node.js runtime shared between production and development.
* Contains chunk loading, module caching, and other non-HMR functionality.
*/ process.env.TURBOPACK = '1';
const url = require('url');
const moduleFactories = new Map();
const moduleCache = Object.create(null);
/**
* Returns an absolute path to the given module's id.
*/ function resolvePathFromModule(moduleId) {
const exported = this.r(moduleId);
const exportedPath = exported?.default ?? exported;
if (typeof exportedPath !== 'string') {
return exported;
}
const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
return url.pathToFileURL(resolved).href;
}
/**
* Exports a URL value. No suffix is added in Node.js runtime.
*/ function exportUrl(urlValue, id) {
exportValue.call(this, urlValue, id);
}
function loadRuntimeChunk(sourcePath, chunkData) {
if (typeof chunkData === 'string') {
loadRuntimeChunkPath(sourcePath, chunkData);
} else {
loadRuntimeChunkPath(sourcePath, chunkData.path);
}
}
const loadedChunks = new Set();
const unsupportedLoadChunk = Promise.resolve(undefined);
const loadedChunk = Promise.resolve(undefined);
const chunkCache = new Map();
function clearChunkCache() {
chunkCache.clear();
loadedChunks.clear();
}
function loadRuntimeChunkPath(sourcePath, chunkPath) {
if (!isJs(chunkPath)) {
// We only support loading JS chunks in Node.js.
// This branch can be hit when trying to load a CSS chunk.
return;
}
if (loadedChunks.has(chunkPath)) {
return;
}
try {
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
const chunkModules = require(resolved);
installCompressedModuleFactories(chunkModules, 0, moduleFactories);
loadedChunks.add(chunkPath);
} catch (cause) {
let errorMessage = `Failed to load chunk ${chunkPath}`;
if (sourcePath) {
errorMessage += ` from runtime for chunk ${sourcePath}`;
}
const error = new Error(errorMessage, {
cause
});
error.name = 'ChunkLoadError';
throw error;
}
}
function loadChunkAsync(chunkData) {
const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path;
if (!isJs(chunkPath)) {
// We only support loading JS chunks in Node.js.
// This branch can be hit when trying to load a CSS chunk.
return unsupportedLoadChunk;
}
let entry = chunkCache.get(chunkPath);
if (entry === undefined) {
try {
// resolve to an absolute path to simplify `require` handling
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
// TODO: consider switching to `import()` to enable concurrent chunk loading and async file io
// However this is incompatible with hot reloading (since `import` doesn't use the require cache)
const chunkModules = require(resolved);
installCompressedModuleFactories(chunkModules, 0, moduleFactories);
entry = loadedChunk;
} catch (cause) {
const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`;
const error = new Error(errorMessage, {
cause
});
error.name = 'ChunkLoadError';
// Cache the failure promise, future requests will also get this same rejection
entry = Promise.reject(error);
}
chunkCache.set(chunkPath, entry);
}
// TODO: Return an instrumented Promise that React can use instead of relying on referential equality.
return entry;
}
contextPrototype.l = loadChunkAsync;
function loadChunkAsyncByUrl(chunkUrl) {
const path1 = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT));
return loadChunkAsync.call(this, path1);
}
contextPrototype.L = loadChunkAsyncByUrl;
function loadWebAssembly(chunkPath, _edgeModule, imports) {
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
return instantiateWebAssemblyFromPath(resolved, imports);
}
contextPrototype.w = loadWebAssembly;
function loadWebAssemblyModule(chunkPath, _edgeModule) {
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
return compileWebAssemblyFromPath(resolved);
}
contextPrototype.u = loadWebAssemblyModule;
/**
* Creates a Node.js worker thread by instantiating the given WorkerConstructor
* with the appropriate path and options, including forwarded globals.
*
* @param WorkerConstructor The Worker constructor from worker_threads
* @param workerPath Path to the worker entry chunk
* @param workerOptions options to pass to the Worker constructor (optional)
*/ function createWorker(WorkerConstructor, workerPath, workerOptions) {
// Build the forwarded globals object
const forwardedGlobals = {};
for (const name of WORKER_FORWARDED_GLOBALS){
forwardedGlobals[name] = globalThis[name];
}
// Merge workerData with forwarded globals
const existingWorkerData = workerOptions?.workerData || {};
const options = {
...workerOptions,
workerData: {
...typeof existingWorkerData === 'object' ? existingWorkerData : {},
__turbopack_globals__: forwardedGlobals
}
};
return new WorkerConstructor(workerPath, options);
}
const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
/**
* Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
*/ function isJs(chunkUrlOrPath) {
return regexJsUrl.test(chunkUrlOrPath);
}
/* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-base.ts" />
/**
* Production Node.js runtime.
* Uses ModuleWithDirection and simple module instantiation without HMR support.
*/ // moduleCache and moduleFactories are declared in runtime-base.ts
// this is read in runtime-utils.ts so it creates a module with direction for hmr
createModuleWithDirectionFlag = true;
const nodeContextPrototype = Context.prototype;
nodeContextPrototype.q = exportUrl;
nodeContextPrototype.M = moduleFactories;
// Cast moduleCache to ModuleWithDirection for production mode
nodeContextPrototype.c = moduleCache;
nodeContextPrototype.R = resolvePathFromModule;
nodeContextPrototype.b = createWorker;
nodeContextPrototype.C = clearChunkCache;
function instantiateModule(id, sourceType, sourceData) {
const moduleFactory = moduleFactories.get(id);
if (typeof moduleFactory !== 'function') {
// This can happen if modules incorrectly handle HMR disposes/updates,
// e.g. when they keep a `setTimeout` around which still executes old code
// and contains e.g. a `require("something")` call.
throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData));
}
const module1 = createModuleWithDirection(id);
const exports = module1.exports;
moduleCache[id] = module1;
const context = new Context(module1, exports);
// NOTE(alexkirsz) This can fail when the module encounters a runtime error.
try {
moduleFactory(context, module1, exports);
} catch (error) {
module1.error = error;
throw error;
}
;
module1.loaded = true;
if (module1.namespaceObject && module1.exports !== module1.namespaceObject) {
// in case of a circular dependency: cjs1 -> esm2 -> cjs1
interopEsm(module1.exports, module1.namespaceObject);
}
return module1;
}
/**
* Retrieves a module from the cache, or instantiate it if it is not cached.
*/ // @ts-ignore
function getOrInstantiateModuleFromParent(id, sourceModule) {
const module1 = moduleCache[id];
if (module1) {
if (module1.error) {
throw module1.error;
}
return module1;
}
return instantiateModule(id, SourceType.Parent, sourceModule.id);
}
/**
* Instantiates a runtime module.
*/ function instantiateRuntimeModule(chunkPath, moduleId) {
return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
}
/**
* Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.
*/ // @ts-ignore TypeScript doesn't separate this module space from the browser runtime
function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
const module1 = moduleCache[moduleId];
if (module1) {
if (module1.error) {
throw module1.error;
}
return module1;
}
return instantiateRuntimeModule(chunkPath, moduleId);
}
module.exports = (sourcePath)=>({
m: (id)=>getOrInstantiateRuntimeModule(sourcePath, id),
c: (chunkData)=>loadRuntimeChunk(sourcePath, chunkData)
});
//# sourceMappingURL=%5Bturbopack%5D_runtime.js.map
@@ -1,11 +0,0 @@
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-types.d.ts\" />\n\ntype EsmNamespaceObject = Record<string, any>\n\n/**\n * Describes why a module was instantiated.\n * Shared between browser and Node.js runtimes.\n */\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent<M>(\n id: ModuleId,\n sourceModule: M\n): M\n\n// @ts-ignore Defined in `hmr-runtime.ts` (dev mode only)\ndeclare let devModuleCache: Record<ModuleId, any> | undefined\n\n/**\n * Flag indicating which module object type to create when a module is merged. Set to `true`\n * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,\n * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it\n * uses plain Module objects.\n */\nlet createModuleWithDirectionFlag = false\n\nconst REEXPORTED_OBJECTS = new WeakMap<Module, ReexportedObjects>()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext<Module>,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext<Module>\n\ntype ModuleContextMap = Record<ModuleId, ModuleContextEntry>\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise<Exports | EsmNamespaceObject>\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent<M extends Module> = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType<any>\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache<Module>,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n if (createModuleWithDirectionFlag) {\n // set in development modes for hmr support\n module = createModuleWithDirection(id)\n } else {\n module = createModuleObject(id)\n }\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\nfunction createModuleWithDirection(id: ModuleId): ModuleWithDirection {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n parents: [],\n children: [],\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (Line truncated
{"offset": {"line": 580, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/base-externals-utils.ts"],"sourcesContent":["/// <reference path=\"../shared/runtime/runtime-utils.ts\" />\n\n/// A 'base' utilities to support runtime can have externals.\n/// Currently this is for node.js / edge runtime both.\n/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.\n\nasync function externalImport(id: DependencySpecifier) {\n let raw\n try {\n raw = await import(id)\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (raw && raw.__esModule && raw.default && 'default' in raw.default) {\n return interopEsm(raw.default, createNS(raw), true)\n }\n\n return raw\n}\ncontextPrototype.y = externalImport\n\nfunction externalRequire(\n id: ModuleId,\n thunk: () => any,\n esm: boolean = false\n): Exports | EsmNamespaceObject {\n let raw\n try {\n raw = thunk()\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (!esm || raw.__esModule) {\n return raw\n }\n\n return interopEsm(raw, createNS(raw), true)\n}\n\nexternalRequire.resolve = (\n id: string,\n options?: {\n paths?: string[]\n }\n) => {\n return require.resolve(id, options)\n}\ncontextPrototype.x = externalRequire\n"],"names":["externalImport","id","raw","err","Error","__esModule","default","interopEsm","createNS","contextPrototype","y","externalRequire","thunk","esm","resolve","options","require","x"],"mappings":"AAAA,2DAA2D;AAE3D,6DAA6D;AAC7D,sDAAsD;AACtD,qGAAqG;AAErG,eAAeA,eAAeC,EAAuB;IACnD,IAAIC;IACJ,IAAI;QACFA,MAAM,MAAM,MAAM,CAACD;IACrB,EAAE,OAAOE,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAID,OAAOA,IAAIG,UAAU,IAAIH,IAAII,OAAO,IAAI,aAAaJ,IAAII,OAAO,EAAE;QACpE,OAAOC,WAAWL,IAAII,OAAO,EAAEE,SAASN,MAAM;IAChD;IAEA,OAAOA;AACT;AACAO,iBAAiBC,CAAC,GAAGV;AAErB,SAASW,gBACPV,EAAY,EACZW,KAAgB,EAChBC,MAAe,KAAK;IAEpB,IAAIX;IACJ,IAAI;QACFA,MAAMU;IACR,EAAE,OAAOT,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAI,CAACU,OAAOX,IAAIG,UAAU,EAAE;QAC1B,OAAOH;IACT;IAEA,OAAOK,WAAWL,KAAKM,SAASN,MAAM;AACxC;AAEAS,gBAAgBG,OAAO,GAAG,CACxBb,IACAc;IAIA,OAAOC,QAAQF,OAAO,CAACb,IAAIc;AAC7B;AACAN,iBAAiBQ,CAAC,GAAGN","ignoreList":[0]}},
{"offset": {"line": 621, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\ndeclare var RUNTIME_PUBLIC_PATH: string\ndeclare var RELATIVE_ROOT_PATH: string\ndeclare var ASSET_PREFIX: string\n\nconst path = require('path')\n\nconst relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.')\n// Compute the relative path to the `distDir`.\nconst relativePathToDistRoot = path.join(\n relativePathToRuntimeRoot,\n RELATIVE_ROOT_PATH\n)\nconst RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot)\n// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.\nconst ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot)\n\n/**\n * Returns an absolute path to the given module path.\n * Module path should be relative, either path to a file or a directory.\n *\n * This fn allows to calculate an absolute path for some global static values, such as\n * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.\n * See ImportMetaBinding::code_generation for the usage.\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n if (modulePath) {\n return path.join(ABSOLUTE_ROOT, modulePath)\n }\n return ABSOLUTE_ROOT\n}\nContext.prototype.P = resolveAbsolutePath\n"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P"],"mappings":"AAAA,oDAAoD,GAMpD,MAAMA,OAAOC,QAAQ;AAErB,MAAMC,4BAA4BF,KAAKG,QAAQ,CAACC,qBAAqB;AACrE,8CAA8C;AAC9C,MAAMC,yBAAyBL,KAAKM,IAAI,CACtCJ,2BACAK;AAEF,MAAMC,eAAeR,KAAKS,OAAO,CAACC,YAAYR;AAC9C,mGAAmG;AACnG,MAAMS,gBAAgBX,KAAKS,OAAO,CAACC,YAAYL;AAE/C;;;;;;;CAOC,GACD,SAASO,oBAAoBC,UAAmB;IAC9C,IAAIA,YAAY;QACd,OAAOb,KAAKM,IAAI,CAACK,eAAeE;IAClC;IACA,OAAOF;AACT;AACAG,QAAQC,SAAS,CAACC,CAAC,GAAGJ","ignoreList":[0]}},
{"offset": {"line": 642, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-wasm-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"../shared/runtime/runtime-utils.ts\" />\n\nfunction readWebAssemblyAsResponse(path: string) {\n const { createReadStream } = require('fs') as typeof import('fs')\n const { Readable } = require('stream') as typeof import('stream')\n\n const stream = createReadStream(path)\n\n // @ts-ignore unfortunately there's a slight type mismatch with the stream.\n return new Response(Readable.toWeb(stream), {\n headers: {\n 'content-type': 'application/wasm',\n },\n })\n}\n\nasync function compileWebAssemblyFromPath(\n path: string\n): Promise<WebAssembly.Module> {\n const response = readWebAssemblyAsResponse(path)\n\n return await WebAssembly.compileStreaming(response)\n}\n\nasync function instantiateWebAssemblyFromPath(\n path: string,\n importsObj: WebAssembly.Imports\n): Promise<Exports> {\n const response = readWebAssemblyAsResponse(path)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n response,\n importsObj\n )\n\n return instance.exports\n}\n"],"names":["readWebAssemblyAsResponse","path","createReadStream","require","Readable","stream","Response","toWeb","headers","compileWebAssemblyFromPath","response","WebAssembly","compileStreaming","instantiateWebAssemblyFromPath","importsObj","instance","instantiateStreaming","exports"],"mappings":"AAAA,oDAAoD,GAEpD,2DAA2D;AAE3D,SAASA,0BAA0BC,IAAY;IAC7C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,QAAQ;IACrC,MAAM,EAAEC,QAAQ,EAAE,GAAGD,QAAQ;IAE7B,MAAME,SAASH,iBAAiBD;IAEhC,2EAA2E;IAC3E,OAAO,IAAIK,SAASF,SAASG,KAAK,CAACF,SAAS;QAC1CG,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,eAAeC,2BACbR,IAAY;IAEZ,MAAMS,WAAWV,0BAA0BC;IAE3C,OAAO,MAAMU,YAAYC,gBAAgB,CAACF;AAC5C;AAEA,eAAeG,+BACbZ,IAAY,EACZa,UAA+B;IAE/B,MAAMJ,WAAWV,0BAA0BC;IAE3C,MAAM,EAAEc,QAAQ,EAAE,GAAG,MAAMJ,YAAYK,oBAAoB,CACzDN,UACAI;IAGF,OAAOC,SAASE,OAAO;AACzB","ignoreList":[0]}},
{"offset": {"line": 663, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/runtime-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"../../shared/runtime/runtime-utils.ts\" />\n/// <reference path=\"../../shared-node/base-externals-utils.ts\" />\n/// <reference path=\"../../shared-node/node-externals-utils.ts\" />\n/// <reference path=\"../../shared-node/node-wasm-utils.ts\" />\n/// <reference path=\"./nodejs-globals.d.ts\" />\n\n/**\n * Base Node.js runtime shared between production and development.\n * Contains chunk loading, module caching, and other non-HMR functionality.\n */\n\nprocess.env.TURBOPACK = '1'\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nconst moduleCache: ModuleCache<Module> = Object.create(null)\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext<Module>,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\n\n/**\n * Exports a URL value. No suffix is added in Node.js runtime.\n */\nfunction exportUrl(\n this: TurbopackBaseContext<Module>,\n urlValue: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, urlValue, id)\n}\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set<ChunkPath>()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise<void> = Promise.resolve(undefined)\nconst chunkCache = new Map<ChunkPath, Promise<void>>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n loadedChunks.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkData: ChunkData\n): Promise<void> {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.ImpLine truncated
{"offset": {"line": 810, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/build-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-base.ts\" />\n\n/**\n * Production Node.js runtime.\n * Uses ModuleWithDirection and simple module instantiation without HMR support.\n */\n\n// moduleCache and moduleFactories are declared in runtime-base.ts\n\n// this is read in runtime-utils.ts so it creates a module with direction for hmr\ncreateModuleWithDirectionFlag = true\n\ninterface TurbopackNodeBuildContext\n extends TurbopackBaseContext<ModuleWithDirection> {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n C: typeof clearChunkCache\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\nnodeContextPrototype.q = exportUrl\nnodeContextPrototype.M = moduleFactories\n// Cast moduleCache to ModuleWithDirection for production mode\nnodeContextPrototype.c = moduleCache as ModuleCache<ModuleWithDirection>\nnodeContextPrototype.R = resolvePathFromModule\nnodeContextPrototype.b = createWorker\nnodeContextPrototype.C = clearChunkCache\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): ModuleWithDirection {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData))\n }\n\n const module: ModuleWithDirection = createModuleWithDirection(id)\n const exports = module.exports\n moduleCache[id] = module\n\n const context =\n new (Context as any as ContextConstructor<ModuleWithDirection>)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n ;(module as any).loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: ModuleWithDirection\n): ModuleWithDirection {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): ModuleWithDirection {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): ModuleWithDirection {\n const module = moduleCache[moduleId]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["createModuleWithDirectionFlag","nodeContextPrototype","Context","prototype","q","exportUrl","M","moduleFactories","c","moduleCache","R","resolvePathFromModule","b","createWorker","C","clearChunkCache","instantiateModule","id","sourceType","sourceData","moduleFactory","get","Error","factoryNotAvailableMessage","module1","createModuleWithDirection","exports","context","error","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","SourceType","Parent","instantiateRuntimeModule","chunkPath","moduleId","Runtime","getOrInstantiateRuntimeModule","module","sourcePath","m","chunkData","loadRuntimeChunk"],"mappings":"AAAA,oDAAoD,GAEpD,0CAA0C;AAE1C;;;CAGC,GAED,kEAAkE;AAElE,iFAAiF;AACjFA,gCAAgC;AAUhC,MAAMC,uBAAuBC,QAAQC,SAAS;AAE9CF,qBAAqBG,CAAC,GAAGC;AACzBJ,qBAAqBK,CAAC,GAAGC;AACzB,8DAA8D;AAC9DN,qBAAqBO,CAAC,GAAGC;AACzBR,qBAAqBS,CAAC,GAAGC;AACzBV,qBAAqBW,CAAC,GAAGC;AACzBZ,qBAAqBa,CAAC,GAAGC;AAEzB,SAASC,kBACPC,EAAY,EACZC,UAAsB,EACtBC,UAAsB;IAEtB,MAAMC,gBAAgBb,gBAAgBc,GAAG,CAACJ;IAC1C,IAAI,OAAOG,kBAAkB,YAAY;QACvC,sEAAsE;QACtE,0EAA0E;QAC1E,mDAAmD;QACnD,MAAM,IAAIE,MAAMC,2BAA2BN,IAAIC,YAAYC;IAC7D;IAEA,MAAMK,UAA8BC,0BAA0BR;IAC9Line truncated
}
File diff suppressed because it is too large. Load diff
@@ -1,47 +0,0 @@
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/picocolors/picocolors.js"],"sourcesContent":["let p = process || {}, argv = p.argv || [], env = p.env || {}\nlet isColorSupported =\n\t!(!!env.NO_COLOR || argv.includes(\"--no-color\")) &&\n\t(!!env.FORCE_COLOR || argv.includes(\"--color\") || p.platform === \"win32\" || ((p.stdout || {}).isTTY && env.TERM !== \"dumb\") || !!env.CI)\n\nlet formatter = (open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input, index = string.indexOf(close, open.length)\n\t\treturn ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet result = \"\", cursor = 0\n\tdo {\n\t\tresult += string.substring(cursor, index) + replace\n\t\tcursor = index + close.length\n\t\tindex = string.indexOf(close, cursor)\n\t} while (~index)\n\treturn result + string.substring(cursor)\n}\n\nlet createColors = (enabled = isColorSupported) => {\n\tlet f = enabled ? formatter : () => String\n\treturn {\n\t\tisColorSupported: enabled,\n\t\treset: f(\"\\x1b[0m\", \"\\x1b[0m\"),\n\t\tbold: f(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\"),\n\t\tdim: f(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\"),\n\t\titalic: f(\"\\x1b[3m\", \"\\x1b[23m\"),\n\t\tunderline: f(\"\\x1b[4m\", \"\\x1b[24m\"),\n\t\tinverse: f(\"\\x1b[7m\", \"\\x1b[27m\"),\n\t\thidden: f(\"\\x1b[8m\", \"\\x1b[28m\"),\n\t\tstrikethrough: f(\"\\x1b[9m\", \"\\x1b[29m\"),\n\n\t\tblack: f(\"\\x1b[30m\", \"\\x1b[39m\"),\n\t\tred: f(\"\\x1b[31m\", \"\\x1b[39m\"),\n\t\tgreen: f(\"\\x1b[32m\", \"\\x1b[39m\"),\n\t\tyellow: f(\"\\x1b[33m\", \"\\x1b[39m\"),\n\t\tblue: f(\"\\x1b[34m\", \"\\x1b[39m\"),\n\t\tmagenta: f(\"\\x1b[35m\", \"\\x1b[39m\"),\n\t\tcyan: f(\"\\x1b[36m\", \"\\x1b[39m\"),\n\t\twhite: f(\"\\x1b[37m\", \"\\x1b[39m\"),\n\t\tgray: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\n\t\tbgBlack: f(\"\\x1b[40m\", \"\\x1b[49m\"),\n\t\tbgRed: f(\"\\x1b[41m\", \"\\x1b[49m\"),\n\t\tbgGreen: f(\"\\x1b[42m\", \"\\x1b[49m\"),\n\t\tbgYellow: f(\"\\x1b[43m\", \"\\x1b[49m\"),\n\t\tbgBlue: f(\"\\x1b[44m\", \"\\x1b[49m\"),\n\t\tbgMagenta: f(\"\\x1b[45m\", \"\\x1b[49m\"),\n\t\tbgCyan: f(\"\\x1b[46m\", \"\\x1b[49m\"),\n\t\tbgWhite: f(\"\\x1b[47m\", \"\\x1b[49m\"),\n\n\t\tblackBright: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\t\tredBright: f(\"\\x1b[91m\", \"\\x1b[39m\"),\n\t\tgreenBright: f(\"\\x1b[92m\", \"\\x1b[39m\"),\n\t\tyellowBright: f(\"\\x1b[93m\", \"\\x1b[39m\"),\n\t\tblueBright: f(\"\\x1b[94m\", \"\\x1b[39m\"),\n\t\tmagentaBright: f(\"\\x1b[95m\", \"\\x1b[39m\"),\n\t\tcyanBright: f(\"\\x1b[96m\", \"\\x1b[39m\"),\n\t\twhiteBright: f(\"\\x1b[97m\", \"\\x1b[39m\"),\n\n\t\tbgBlackBright: f(\"\\x1b[100m\", \"\\x1b[49m\"),\n\t\tbgRedBright: f(\"\\x1b[101m\", \"\\x1b[49m\"),\n\t\tbgGreenBright: f(\"\\x1b[102m\", \"\\x1b[49m\"),\n\t\tbgYellowBright: f(\"\\x1b[103m\", \"\\x1b[49m\"),\n\t\tbgBlueBright: f(\"\\x1b[104m\", \"\\x1b[49m\"),\n\t\tbgMagentaBright: f(\"\\x1b[105m\", \"\\x1b[49m\"),\n\t\tbgCyanBright: f(\"\\x1b[106m\", \"\\x1b[49m\"),\n\t\tbgWhiteBright: f(\"\\x1b[107m\", \"\\x1b[49m\"),\n\t}\n}\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n"],"names":["p","process","argv","env","isColorSupported","NO_COLOR","includes","FORCE_COLOR","platform","stdout","isTTY","TERM","CI","formatter","open","close","replace","input","string","index","indexOf","length","replaceClose","result","cursor","substring","createColors","enabled","f","String","reset","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","module","exports"],"mappings":"AAAA,IAAIA,IAAIC,WAAW,CAAC,GAAGC,OAAOF,EAAEE,IAAI,IAAI,EAAE,EAAEC,MAAMH,EAAEG,GAAG,IAAI,CAAC;AAC5D,IAAIC,mBACH,CAAC,CAAC,CAAC,CAACD,IAAIE,QAAQ,IAAIH,KAAKI,QAAQ,CAAC,aAAa,KAC/C,CAAC,CAAC,CAACH,IAAII,WAAW,IAAIL,KAAKI,QAAQ,CAAC,cAAcN,EAAEQ,QAAQ,KAAK,WAAY,CAACR,EAAES,MAAM,IAAI,CAAC,CAAC,EAAEC,KAAK,IAAIP,IAAIQ,IAAI,KAAK,UAAW,CAAC,CAACR,IAAIS,EAAE;AAExI,IAAIC,YAAY,CAACC,MAAMC,OAAOC,UAAUF,IAAI,GAC3CG,CAAAA;QACC,IAAIC,SAAS,KAAKD,OAAOE,QAAQD,OAAOE,OAAO,CAACL,OAAOD,KAAKO,MAAM;QAClE,OAAO,CAACF,QAAQL,OAAOQ,aAAaJ,QAAQH,OAAOC,SAASG,SAASJ,QAAQD,OAAOI,SAASH;IAC9F;AAED,IAAIO,eAAe,CAACJ,QAAQH,OAAOC,SAASG;IAC3C,IAAII,SAAS,IAAIC,SAAS;IAC1B,GAAG;QACFD,UAAUL,OAAOO,SAAS,CAACD,QAAQL,SAASH;QAC5CQ,SAASL,QAAQJ,MAAMM,MAAM;QAC7BF,QAAQD,OAAOE,OAAO,CAACL,OAAOS;IAC/B,QAAS,CAACL,MAAM;IAChB,OAAOI,SAASL,OAAOO,SAAS,CAACD;AAClC;AAEA,IAAIE,eAAe,CAACC,UAAUvB,gBAAgB;IAC7C,IAAIwB,IAAID,UAAUd,YAAY,IAAMgB;IACpC,OAAO;QACNzB,kBAAkBuB;QALine truncated
{"offset": {"line": 71, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/tokenize.js"],"sourcesContent":["'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, content, escape, next, quote\n let currentToken, escaped, escapePos, n, prev\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n let lastBadParen = -1\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else if (pos <= lastBadParen) {\n currentToken = ['(', '(', pos]\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n lastBadParen = next === -1 ? length : next\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n Line truncated
{"offset": {"line": 344, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/terminal-highlight.js"],"sourcesContent":["'use strict'\n\nlet pico = require('picocolors')\n\nlet tokenizer = require('./tokenize')\n\nlet Input\n\nfunction registerInput(dependant) {\n Input = dependant\n}\n\nconst HIGHLIGHT_THEME = {\n ';': pico.yellow,\n ':': pico.yellow,\n '(': pico.cyan,\n ')': pico.cyan,\n '[': pico.yellow,\n ']': pico.yellow,\n '{': pico.yellow,\n '}': pico.yellow,\n 'at-word': pico.cyan,\n 'brackets': pico.cyan,\n 'call': pico.cyan,\n 'class': pico.yellow,\n 'comment': pico.gray,\n 'hash': pico.magenta,\n 'string': pico.green\n}\n\nfunction getTokenType([type, value], processor) {\n if (type === 'word') {\n if (value[0] === '.') {\n return 'class'\n }\n if (value[0] === '#') {\n return 'hash'\n }\n }\n\n if (!processor.endOfFile()) {\n let next = processor.nextToken()\n processor.back(next)\n if (next[0] === 'brackets' || next[0] === '(') return 'call'\n }\n\n return type\n}\n\nfunction terminalHighlight(css) {\n let processor = tokenizer(new Input(css), { ignoreErrors: true })\n let result = ''\n while (!processor.endOfFile()) {\n let token = processor.nextToken()\n let color = HIGHLIGHT_THEME[getTokenType(token, processor)]\n if (color) {\n result += token[1]\n .split(/\\r?\\n/)\n .map(i => color(i))\n .join('\\n')\n } else {\n result += token[1]\n }\n }\n return result\n}\n\nterminalHighlight.registerInput = registerInput\n\nmodule.exports = terminalHighlight\n"],"names":["pico","tokenizer","Input","registerInput","dependant","HIGHLIGHT_THEME","yellow","cyan","gray","magenta","green","getTokenType","type","value","processor","endOfFile","next","nextToken","back","terminalHighlight","css","ignoreErrors","result","token","color","split","map","i","join","module","exports"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC;AAEJ,IAAIC;AAEJ,SAASC,cAAcC,SAAS;IAC9BF,QAAQE;AACV;AAEA,MAAMC,kBAAkB;IACtB,KAAKL,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,KAAKN,KAAKO,IAAI;IACd,KAAKP,KAAKO,IAAI;IACd,KAAKP,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,WAAWN,KAAKO,IAAI;IACpB,YAAYP,KAAKO,IAAI;IACrB,QAAQP,KAAKO,IAAI;IACjB,SAASP,KAAKM,MAAM;IACpB,WAAWN,KAAKQ,IAAI;IACpB,QAAQR,KAAKS,OAAO;IACpB,UAAUT,KAAKU,KAAK;AACtB;AAEA,SAASC,aAAa,CAACC,MAAMC,MAAM,EAAEC,SAAS;IAC5C,IAAIF,SAAS,QAAQ;QACnB,IAAIC,KAAK,CAAC,EAAE,KAAK,KAAK;YACpB,OAAO;QACT;QACA,IAAIA,KAAK,CAAC,EAAE,KAAK,KAAK;YACpB,OAAO;QACT;IACF;IAEA,IAAI,CAACC,UAAUC,SAAS,IAAI;QAC1B,IAAIC,OAAOF,UAAUG,SAAS;QAC9BH,UAAUI,IAAI,CAACF;QACf,IAAIA,IAAI,CAAC,EAAE,KAAK,cAAcA,IAAI,CAAC,EAAE,KAAK,KAAK,OAAO;IACxD;IAEA,OAAOJ;AACT;AAEA,SAASO,kBAAkBC,GAAG;IAC5B,IAAIN,YAAYb,UAAU,IAAIC,MAAMkB,MAAM;QAAEC,cAAc;IAAK;IAC/D,IAAIC,SAAS;IACb,MAAO,CAACR,UAAUC,SAAS,GAAI;QAC7B,IAAIQ,QAAQT,UAAUG,SAAS;QAC/B,IAAIO,QAAQnB,eAAe,CAACM,aAAaY,OAAOT,WAAW;QAC3D,IAAIU,OAAO;YACTF,UAAUC,KAAK,CAAC,EAAE,CACfE,KAAK,CAAC,SACNC,GAAG,CAACC,CAAAA,IAAKH,MAAMG,IACfC,IAAI,CAAC;QACV,OAAO;YACLN,UAAUC,KAAK,CAAC,EAAE;QACpB;IACF;IACA,OAAOD;AACT;AAEAH,kBAAkBhB,aAAa,GAAGA;AAElC0B,OAAOC,OAAO,GAAGX","ignoreList":[0]}},
{"offset": {"line": 405, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/css-syntax-error.js"],"sourcesContent":["'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : '<css input>'\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n\n let aside = text => text\n let mark = text => text\n let highlight = text => text\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n if (terminalHighlight) {\n highlight = text => terminalHighlight(text)\n }\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n let maxWidth = String(end).length\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n if (line.length > 160) {\n let padding = 20\n let subLineStart = Math.max(0, this.column - padding)\n let subLineEnd = Math.max(\n this.column + padding,\n this.endColumn + padding\n )\n let subLine = line.slice(subLineStart, subLineEnd)\n\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line\n .slice(0, Math.min(this.column - 1, padding - 1))\n .replace(/[^\\t]/g, ' ')\n\n return (\n mark('>') +\n aside(gutter) +\n highlight(subLine) +\n '\\n ' +\n spacing +\n mark('^')\n )\n }\n\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n\n return (\n mark('>') +\n aside(gutter) +\n highlight(line) +\n '\\n ' +\n spacing +\n mark('^')\n )\n }\n\n return ' ' + aside(gutter) + highlight(line)\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n"],"names":["pico","terminalHighlight","CssSyntaxError","Error","message","line","column","source","file","plugin","name","reason","endLine","endColumn","setMessage","captureStackTrace","showSourceCode","color","css","isColorSupported","aside","text","mark","highlight","bold","gray","red","createColors","lines","split","start","Math","max","end","min","length","maxWidth","String","slice","map","index","number","gutter","padding","subLineStart","subLineEnd","subLine","spacing","replace","join","toString","code","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC;AAEJ,MAAMC,uBAAuBC;IAC3BD,YAAYE,OAAO,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAEC,MAAM,CAAE;QACvD,KAAK,CAACL;QACN,IAAI,CAACM,IAAI,GAAG;QACZ,IAAI,CAACC,MAAM,GAAGP;QAEd,IAAII,MAAM;YACR,IAAI,CAACA,IAAI,GAAGA;QACd;QACA,IAAID,QAAQ;YACV,IAAI,CAACA,MAAM,GAAGA;QAChB;QACA,IAAIE,QAAQ;YACV,IAAI,CAACA,MAAM,GAAGA;QAChB;QACA,IAAI,OAAOJ,SAAS,eAAe,OAAOC,WAAW,aAAa;YAChE,IAAI,OAAOD,SAAS,UAAU;gBAC5B,IAAI,CAACA,IAAI,GAAGA;gBACZ,IAAI,CAACC,MAAM,GAAGA;YAChB,OAAO;gBACL,IAAI,CAACD,IAAI,GAAGA,KAAKA,IAAI;gBACrB,IAAI,CAACC,MAAM,GAAGD,KAAKC,MAAM;gBACzB,IAAI,CAACM,OAAO,GAAGN,OAAOD,IAAI;gBAC1B,IAAI,CAACQ,SAAS,GAAGP,OAAOA,MAAM;YAChC;QACF;QAEA,IAAI,CAACQ,UAAU;QAEf,IAAIX,MAAMY,iBAAiB,EAAE;YAC3Line truncated
{"offset": {"line": 496, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/stringifier.js"],"sourcesContent":["'use strict'\n\n// Escapes sequences that could break out of an HTML <style> context.\n// Uses CSS unicode escaping (\\3c = '<') which is valid CSS and parsed\n// correctly by all compliant CSS consumers.\nconst STYLE_TAG = /(<)(\\/?style\\b)/gi\nconst COMMENT_OPEN = /(<)(!--)/g\n\n// Characters that end an at-rule name, mirroring RE_AT_END in the tokenizer.\n// Params starting with anything else need a space to stay separate tokens.\nconst AT_NAME_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/\n\nfunction escapeHTMLInCSS(str) {\n if (typeof str !== 'string') return str\n if (!str.includes('<')) return str\n return str.replace(STYLE_TAG, '\\\\3c $2').replace(COMMENT_OPEN, '\\\\3c $2')\n}\n\nconst DEFAULT_RAW = {\n after: '\\n',\n beforeClose: '\\n',\n beforeComment: '\\n',\n beforeDecl: '\\n',\n beforeOpen: ' ',\n beforeRule: '\\n',\n colon: ': ',\n commentLeft: ' ',\n commentRight: ' ',\n emptyBody: '',\n indent: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nfunction atruleStart(str, node) {\n let name = '@' + node.name\n let params = node.params ? str.rawValue(node, 'params') : ''\n let afterName = node.raws.afterName\n\n if (typeof afterName === 'undefined') {\n afterName = params ? ' ' : ''\n } else if (afterName === '' && params && !AT_NAME_END.test(params[0])) {\n afterName = ' '\n }\n\n return name + afterName + params\n}\n\nfunction pushBody(str, stack, node) {\n let nodes = node.nodes\n let last = nodes.length - 1\n while (last > 0) {\n if (nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = str.raw(node, 'semicolon')\n let isDocument = node.type === 'document'\n for (let i = nodes.length - 1; i >= 0; i--) {\n let child = nodes[i]\n let childSemicolon = last !== i || semicolon\n // A childless at-rule that still has following siblings must be\n // terminated. Without the semicolon those trailing comments are folded\n // into the at-rule's prelude and disappear when the output is re-parsed.\n if (\n !childSemicolon &&\n i < nodes.length - 1 &&\n child.type === 'atrule' &&\n !child.nodes\n ) {\n childSemicolon = true\n }\n stack.push({\n document: isDocument,\n node: child,\n semicolon: childSemicolon\n })\n }\n}\n\nfunction pushBlock(str, stack, node, start) {\n let between = str.raw(node, 'between', 'beforeOpen')\n str.builder(escapeHTMLInCSS(start + between) + '{', node, 'start')\n\n let hasNodes = node.nodes && node.nodes.length\n let close = () => {\n let after = hasNodes\n ? str.raw(node, 'after')\n : str.raw(node, 'after', 'emptyBody')\n if (after) str.builder(escapeHTMLInCSS(after))\n str.builder('}', node, 'end')\n if (node.type === 'rule' && node.raws.ownSemicolon) {\n str.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, 'end')\n }\n }\n\n if (hasNodes) {\n stack.push(close)\n pushBody(str, stack, node)\n } else {\n close()\n }\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n atrule(node, semicolon) {\n let start = atruleStart(this, node)\n if (node.nodes) {\n this.block(node, start)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(escapeHTMLInCSS(start + end), node)\n }\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(escapeHTMLInCSS(start + between) + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(escapeHTMLInCSS(after))\n this.builder('}', node, 'end')\n }\n\n body(node) {\n // Rules and at-rules are expanded into an explicit stack instead of\n // recursive `stringify()` calls to survive deeply nested trees.\n // If a subclass changes the traversLine truncated
{"offset": {"line": 888, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/stringify.js"],"sourcesContent":["'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n"],"names":["Stringifier","stringify","node","builder","str","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,SAASC,UAAUC,IAAI,EAAEC,OAAO;IAC9B,IAAIC,MAAM,IAAIJ,YAAYG;IAC1BC,IAAIH,SAAS,CAACC;AAChB;AAEAG,OAAOC,OAAO,GAAGL;AACjBA,UAAUM,OAAO,GAAGN","ignoreList":[0]}},
{"offset": {"line": 899, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/symbols.js"],"sourcesContent":["'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n"],"names":["module","exports","isClean","Symbol","my"],"mappings":"AAEAA,OAAOC,OAAO,CAACC,OAAO,GAAGC,OAAO;AAEhCH,OAAOC,OAAO,CAACG,EAAE,GAAGD,OAAO","ignoreList":[0]}},
{"offset": {"line": 905, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/node.js"],"sourcesContent":["'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\nlet { isClean, my } = require('./symbols')\n\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor()\n // An explicit stack instead of recursive calls to survive deeply\n // nested trees. Each entry is [source, its clone, clone's parent].\n let stack = [[obj, cloned, parent]]\n\n while (stack.length > 0) {\n let [source, target, targetParent] = stack.pop()\n for (let i in source) {\n if (!Object.prototype.hasOwnProperty.call(source, i)) {\n /* c8 ignore next 2 */\n continue\n }\n if (i === 'proxyCache') continue\n let value = source[i]\n let type = typeof value\n\n if (i === 'parent' && type === 'object') {\n if (targetParent) target[i] = targetParent\n } else if (i === 'source') {\n target[i] = value\n } else if (Array.isArray(value)) {\n let children = []\n target[i] = children\n for (let j of value) {\n let childClone = new j.constructor()\n children.push(childClone)\n stack.push([j, childClone, target])\n }\n } else {\n if (type === 'object' && value !== null) {\n let valueClone = new value.constructor()\n stack.push([value, valueClone, undefined])\n value = valueClone\n }\n target[i] = value\n }\n }\n }\n\n return cloned\n}\n\nfunction sourceOffset(inputCSS, position) {\n // Not all custom syntaxes support `offset` in `source.start` and `source.end`\n if (position && typeof position.offset !== 'undefined') {\n return position.offset\n }\n\n let column = 1\n let line = 1\n let offset = 0\n\n for (let i = 0; i < inputCSS.length; i++) {\n if (line === position.line && column === position.column) {\n offset = i\n break\n }\n\n if (inputCSS[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return offset\n}\n\nclass Node {\n get proxyOf() {\n return this\n }\n\n constructor(defaults = {}) {\n this.raws = {}\n this[isClean] = false\n this[my] = true\n\n for (let name of Object.keys(defaults)) {\n if (name === '__proto__') continue\n if (name === 'nodes') {\n this.nodes = []\n for (let node of defaults[name]) {\n // Clone only nodes that already belong to another tree, so passing a\n // freshly created (parent-less) node adopts that instance instead of\n // a copy and keeps the caller's reference usable. See #1987.\n if (typeof node.clone === 'function' && node.parent) {\n this.append(node.clone())\n } else {\n this.append(node)\n }\n }\n } else {\n this[name] = defaults[name]\n }\n }\n }\n\n addToError(error) {\n error.postcssNode = this\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s = this.source\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n )\n }\n return error\n }\n\n after(add) {\n this.parent.insertAfter(this, add)\n return this\n }\n\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name]\n }\n return this\n }\n\n before(add) {\n this.parent.insertBefore(this, add)\n return this\n }\n\n cleanRaws(keepBetween) {\n delete this.raws.before\n delete this.raws.after\n if (!keepBetween) delete this.raws.between\n }\n\n clone(overrides = {}) {\n let cloned = cloneNode(this)\n for (let name in overrides) {\n cloned[name] = overrides[name]\n }\n return cloned\n }\n\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertAfter(this, cloned)\n return cloned\n }\n\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertBefore(this, cloned)\n return cloned\n }\n\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts)\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n )\n }\n return new CssSyntaxError(message)\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) Line truncated
{"offset": {"line": 1349, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/comment.js"],"sourcesContent":["'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n constructor(defaults) {\n super(defaults)\n this.type = 'comment'\n }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n"],"names":["Node","Comment","defaults","type","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC,gBAAgBD;IACpBC,YAAYC,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEAC,OAAOC,OAAO,GAAGJ;AACjBA,QAAQK,OAAO,GAAGL","ignoreList":[0]}},
{"offset": {"line": 1362, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/declaration.js"],"sourcesContent":["'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n"],"names":["Node","Declaration","variable","prop","startsWith","defaults","value","String","type","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC,oBAAoBD;IACxB,IAAIE,WAAW;QACb,OAAO,IAAI,CAACC,IAAI,CAACC,UAAU,CAAC,SAAS,IAAI,CAACD,IAAI,CAAC,EAAE,KAAK;IACxD;IAEAF,YAAYI,QAAQ,CAAE;QACpB,IACEA,YACA,OAAOA,SAASC,KAAK,KAAK,eAC1B,OAAOD,SAASC,KAAK,KAAK,UAC1B;YACAD,WAAW;gBAAE,GAAGA,QAAQ;gBAAEC,OAAOC,OAAOF,SAASC,KAAK;YAAE;QAC1D;QACA,KAAK,CAACD;QACN,IAAI,CAACG,IAAI,GAAG;IACd;AACF;AAEAC,OAAOC,OAAO,GAAGT;AACjBA,YAAYU,OAAO,GAAGV","ignoreList":[0]}},
{"offset": {"line": 1384, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/container.js"],"sourcesContent":["'use strict'\n\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Node = require('./node')\nlet { isClean, my } = require('./symbols')\n\nlet AtRule, parse, Root, Rule\n\nfunction cleanSource(nodes) {\n let stack = nodes.slice()\n while (stack.length > 0) {\n let node = stack.pop()\n delete node.source\n if (node.nodes) {\n node.nodes = node.nodes.slice()\n for (let i of node.nodes) stack.push(i)\n }\n }\n return nodes.slice()\n}\n\nfunction markTreeDirty(node) {\n let stack = [node]\n while (stack.length > 0) {\n let next = stack.pop()\n next[isClean] = false\n if (next.proxyOf.nodes) {\n for (let i of next.proxyOf.nodes) stack.push(i)\n }\n }\n}\n\nclass Container extends Node {\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n let stack = [this]\n while (stack.length > 0) {\n let node = stack.pop()\n if (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {\n // Subclass with own logic; let it handle its subtree\n node.cleanRaws(keepBetween)\n continue\n }\n Node.prototype.cleanRaws.call(node, keepBetween)\n if (node.nodes) {\n for (let child of node.nodes) stack.push(child)\n }\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(\n add,\n this.proxyOf.nodes[existIndex],\n type\n Line truncated
{"offset": {"line": 1822, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/at-rule.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'atrule'\n }\n\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.append(...children)\n }\n\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.prepend(...children)\n }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n"],"names":["Container","AtRule","defaults","type","append","children","proxyOf","nodes","prepend","module","exports","default","registerAtRule"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC,eAAeD;IACnBC,YAAYC,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;IACd;IAEAC,OAAO,GAAGC,QAAQ,EAAE;QAClB,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;QACxC,OAAO,KAAK,CAACH,UAAUC;IACzB;IAEAG,QAAQ,GAAGH,QAAQ,EAAE;QACnB,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;QACxC,OAAO,KAAK,CAACC,WAAWH;IAC1B;AACF;AAEAI,OAAOC,OAAO,GAAGT;AACjBA,OAAOU,OAAO,GAAGV;AAEjBD,UAAUY,cAAc,CAACX","ignoreList":[0]}},
{"offset": {"line": 1844, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/document.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n"],"names":["Container","LazyResult","Processor","Document","defaults","type","nodes","toResult","opts","lazy","stringify","registerLazyResult","dependant","registerProcessor","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC,YAAYC;AAEhB,MAAMC,iBAAiBH;IACrBG,YAAYC,QAAQ,CAAE;QACpB,wFAAwF;QACxF,KAAK,CAAC;YAAEC,MAAM;YAAY,GAAGD,QAAQ;QAAC;QAEtC,IAAI,CAAC,IAAI,CAACE,KAAK,EAAE;YACf,IAAI,CAACA,KAAK,GAAG,EAAE;QACjB;IACF;IAEAC,SAASC,OAAO,CAAC,CAAC,EAAE;QAClB,IAAIC,OAAO,IAAIR,WAAW,IAAIC,aAAa,IAAI,EAAEM;QAEjD,OAAOC,KAAKC,SAAS;IACvB;AACF;AAEAP,SAASQ,kBAAkB,GAAGC,CAAAA;IAC5BX,aAAaW;AACf;AAEAT,SAASU,iBAAiB,GAAGD,CAAAA;IAC3BV,YAAYU;AACd;AAEAE,OAAOC,OAAO,GAAGZ;AACjBA,SAASa,OAAO,GAAGb","ignoreList":[0]}},
{"offset": {"line": 1873, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/nanoid/non-secure/index.cjs"],"sourcesContent":["let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n let i = size | 0\n while (i-- > 0) {\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\n\nlet nanoid = (size = 21) => {\n let id = ''\n let i = size | 0\n while (i-- > 0) {\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\n\nmodule.exports = { nanoid, customAlphabet }\n"],"names":["urlAlphabet","customAlphabet","alphabet","defaultSize","size","id","i","Math","random","length","nanoid","module","exports"],"mappings":"AAAA,IAAIA,cACF;AAEF,IAAIC,iBAAiB,CAACC,UAAUC,cAAc,EAAE;IAC9C,OAAO,CAACC,OAAOD,WAAW;QACxB,IAAIE,KAAK;QACT,IAAIC,IAAIF,OAAO;QACf,MAAOE,MAAM,EAAG;YACdD,MAAMH,QAAQ,CAAC,AAACK,KAAKC,MAAM,KAAKN,SAASO,MAAM,GAAI,EAAE;QACvD;QACA,OAAOJ;IACT;AACF;AAEA,IAAIK,SAAS,CAACN,OAAO,EAAE;IACrB,IAAIC,KAAK;IACT,IAAIC,IAAIF,OAAO;IACf,MAAOE,MAAM,EAAG;QACdD,MAAML,WAAW,CAAC,AAACO,KAAKC,MAAM,KAAK,KAAM,EAAE;IAC7C;IACA,OAAOH;AACT;AAEAM,OAAOC,OAAO,GAAG;IAAEF;IAAQT;AAAe","ignoreList":[0]}},
{"offset": {"line": 1899, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/base64.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n"],"names":["intToCharMap","split","exports","encode","number","length","TypeError","decode","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA,eAAe,mEAAmEC,KAAK,CAAC;AAE5F;;CAEC,GACDC,QAAQC,MAAM,GAAG,SAAUC,MAAM;IAC/B,IAAI,KAAKA,UAAUA,SAASJ,aAAaK,MAAM,EAAE;QAC/C,OAAOL,YAAY,CAACI,OAAO;IAC7B;IACA,MAAM,IAAIE,UAAU,+BAA+BF;AACrD;AAEA;;;CAGC,GACDF,QAAQK,MAAM,GAAG,SAAUC,QAAQ;IACjC,IAAIC,OAAO,IAAQ,MAAM;IACzB,IAAIC,OAAO,IAAQ,MAAM;IAEzB,IAAIC,UAAU,IAAK,MAAM;IACzB,IAAIC,UAAU,KAAK,MAAM;IAEzB,IAAIC,OAAO,IAAQ,MAAM;IACzB,IAAIC,OAAO,IAAQ,MAAM;IAEzB,IAAIC,OAAO,IAAQ,MAAM;IACzB,IAAIC,QAAQ,IAAO,MAAM;IAEzB,IAAIC,eAAe;IACnB,IAAIC,eAAe;IAEnB,qCAAqC;IACrC,IAAIT,QAAQD,YAAYA,YAAYE,MAAM;QACxC,OAAQF,WAAWC;IACrB;IAEA,sCAAsC;IACtC,IAAIE,WAAWH,YAAYA,YAAYI,SAAS;QAC9C,OAAQJ,WAAWG,UAAUM;IAC/B;IAEA,sBAAsB;IACtB,IAAIJ,QAAQL,YAAYA,YAAYM,MAAM;QACxC,OAAQN,WAAWK,OAAOK;IAC5B;IAEA,QAAQ;IACR,IAAIV,YAAYO,MAAM;QACpB,OAAO;IACT;IAEA,QAAQ;IACR,IAAIP,YAAYQ,OAAO;QACrB,OAAO;IACT;IAEA,wBAAwB;IACxB,OAAO,CAAC;AACV","ignoreList":[0]}},
{"offset": {"line": 1952, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/base64-vlq.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParLine truncated
{"offset": {"line": 2068, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/util.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\nvar MAX_CACHED_INPUTS = 32;\n\n/**\n * Takes some function `f(input) -> result` and returns a memoized version of\n * `f`.\n *\n * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The\n * memoization is a dumb-simple, linear least-recently-used cache.\n */\nfunction lruMemoize(f) {\n var cache = [];\n\n return function(input) {\n for (var i = 0; i < cache.length; i++) {\n if (cache[i].input === input) {\n var temp = cache[0];\n cache[0] = cache[i];\n cache[i] = temp;\n return cache[0].result;\n }\n }\n\n var result = f(input);\n\n cache.unshift({\n input,\n result,\n });\n\n if (cache.length > MAX_CACHED_INPUTS) {\n cache.pop();\n }\n\n return result;\n };\n}\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nvar normalize = lruMemoize(function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n // Split the path into parts between `/` characters. This is much faster than\n // using `.split(/\\/+/g)`.\n var parts = [];\n var start = 0;\n var i = 0;\n while (true) {\n start = i;\n i = path.indexOf(\"/\", start);\n if (i === -1) {\n parts.push(path.slice(start));\n break;\n } else {\n parts.push(path.slice(start, i));\n while (i < path.length && path[i] === \"/\") {\n i++;\n }\n }\n }\n\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n});\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aLine truncated
{"offset": {"line": 2563, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/array-set.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n"],"names":["util","has","Object","prototype","hasOwnProperty","hasNativeMap","Map","ArraySet","_array","_set","create","fromArray","ArraySet_fromArray","aArray","aAllowDuplicates","set","i","len","length","add","size","ArraySet_size","getOwnPropertyNames","ArraySet_add","aStr","sStr","toSetString","isDuplicate","call","idx","push","ArraySet_has","indexOf","ArraySet_indexOf","get","Error","at","ArraySet_at","aIdx","toArray","ArraySet_toArray","slice","exports"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA;AACJ,IAAIC,MAAMC,OAAOC,SAAS,CAACC,cAAc;AACzC,IAAIC,eAAe,OAAOC,QAAQ;AAElC;;;;;CAKC,GACD,SAASC;IACP,IAAI,CAACC,MAAM,GAAG,EAAE;IAChB,IAAI,CAACC,IAAI,GAAGJ,eAAe,IAAIC,QAAQJ,OAAOQ,MAAM,CAAC;AACvD;AAEA;;CAEC,GACDH,SAASI,SAAS,GAAG,SAASC,mBAAmBC,MAAM,EAAEC,gBAAgB;IACvE,IAAIC,MAAM,IAAIR;IACd,IAAK,IAAIS,IAAI,GAAGC,MAAMJ,OAAOK,MAAM,EAAEF,IAAIC,KAAKD,IAAK;QACjDD,IAAII,GAAG,CAACN,MAAM,CAACG,EAAE,EAAEF;IACrB;IACA,OAAOC;AACT;AAEA;;;;;CAKC,GACDR,SAASJ,SAAS,CAACiB,IAAI,GAAG,SAASC;IACjC,OAAOhB,eAAe,IAAI,CAACI,IAAI,CAACW,IAAI,GAAGlB,OAAOoB,mBAAmB,CAAC,IAAI,CAACb,IAAI,EAAES,MAAM;AACrF;AAEA;;;;CAIC,GACDX,SAASJ,SAAS,CAACgB,GAAG,GAAG,SAASI,aAAaC,IAAI,EAAEV,gBAAgB;IACnE,IAAIW,OAAOpB,eAAemB,OAAOxB,KAAK0B,WAAW,CAACF;IAClD,IAAIG,cAActB,eAAe,IAAI,CAACJ,GAAG,CAACuB,QAAQvB,IAAI2B,IAAI,CAAC,IAAI,CAACnB,IAAI,EAAEgB;IACtE,IAAII,MAAM,IAAI,CAACrB,MAAM,CAACU,MAAM;IAC5B,IAAI,CAACS,eAAeb,kBAAkB;QACpC,IAAI,CAACN,MAAM,CAACsB,IAAI,CAACN;IACnB;IACA,IAAI,CAACG,aAAa;QAChB,IAAItB,cAAc;YAChLine truncated
{"offset": {"line": 2666, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/mapping-list.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n"],"names":["util","generatedPositionAfter","mappingA","mappingB","lineA","generatedLine","lineB","columnA","generatedColumn","columnB","compareByGeneratedPositionsInflated","MappingList","_array","_sorted","_last","prototype","unsortedForEach","MappingList_forEach","aCallback","aThisArg","forEach","add","MappingList_add","aMapping","push","toArray","MappingList_toArray","sort","exports"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA;AAEJ;;;CAGC,GACD,SAASC,uBAAuBC,QAAQ,EAAEC,QAAQ;IAChD,iCAAiC;IACjC,IAAIC,QAAQF,SAASG,aAAa;IAClC,IAAIC,QAAQH,SAASE,aAAa;IAClC,IAAIE,UAAUL,SAASM,eAAe;IACtC,IAAIC,UAAUN,SAASK,eAAe;IACtC,OAAOF,QAAQF,SAASE,SAASF,SAASK,WAAWF,WAC9CP,KAAKU,mCAAmC,CAACR,UAAUC,aAAa;AACzE;AAEA;;;;CAIC,GACD,SAASQ;IACP,IAAI,CAACC,MAAM,GAAG,EAAE;IAChB,IAAI,CAACC,OAAO,GAAG;IACf,oBAAoB;IACpB,IAAI,CAACC,KAAK,GAAG;QAACT,eAAe,CAAC;QAAGG,iBAAiB;IAAC;AACrD;AAEA;;;;;CAKC,GACDG,YAAYI,SAAS,CAACC,eAAe,GACnC,SAASC,oBAAoBC,SAAS,EAAEC,QAAQ;IAC9C,IAAI,CAACP,MAAM,CAACQ,OAAO,CAACF,WAAWC;AACjC;AAEF;;;;CAIC,GACDR,YAAYI,SAAS,CAACM,GAAG,GAAG,SAASC,gBAAgBC,QAAQ;IAC3D,IAAItB,uBAAuB,IAAI,CAACa,KAAK,EAAES,WAAW;QAChD,IAAI,CAACT,KAAK,GAAGS;QACb,IAAI,CAACX,MAAM,CAACY,IAAI,CAACD;IACnB,OAAO;QACL,IAAI,CAACV,OAAO,GAAG;QACf,IAAI,CAACD,MAAM,CAACY,IAAI,CAACD;IACnB;AACF;AAEA;;;;;;;;CAQC,GACDZ,YAAYI,SAAS,CAACU,OAAO,GAAG,SAASC;IACvC,IAAI,CAAC,IAAI,CAACb,OAAO,EAAE;QACjB,IAAI,CAACD,MAAM,CAACe,IAAI,CAAC3B,KAAKU,mCAAmC;QACzD,IAAI,CAACG,OAAO,GAAG;IACjB;IACA,OAAO,IAAI,CAACD,MAAM;AACpB;AAEAgB,QAAQjB,WAAW,GAAGA","ignoreList":[0]}},
{"offset": {"line": 2735, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/source-map-generator.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n }));\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n if (this._validateMapping(generated, original, source, name) === false) {\n return;\n }\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourcLine truncated
{"offset": {"line": 3100, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/binary-search.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n"],"names":["exports","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","recursiveSearch","aLow","aHigh","aNeedle","aHaystack","aCompare","aBias","mid","Math","floor","cmp","length","search","index"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAEDA,QAAQC,oBAAoB,GAAG;AAC/BD,QAAQE,iBAAiB,GAAG;AAE5B;;;;;;;;;;;;CAYC,GACD,SAASC,gBAAgBC,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK;IACvE,8DAA8D;IAC9D,EAAE;IACF,qDAAqD;IACrD,EAAE;IACFLine truncated
{"offset": {"line": 3199, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/quick-sort.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\nfunction SortTemplate(comparator) {\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot, false) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n return doQuickSort;\n}\n\nfunction cloneSort(comparator) {\n let template = SortTemplate.toString();\n let templateFn = new Function(`return ${template}`)();\n return templateFn(comparator);\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\n\nlet sortCache = new WeakMap();\nexports.quickSort = function (ary, comparator, start = 0) {\n let doQuickSort = sortCache.get(comparator);\n if (doQuickSort === void 0) {\n doQuickSort = cloneSort(comparator);\n sortCache.set(comparator, doQuickSort);\n }\n doQuickSort(ary, comparator, start, ary.length - 1);\n};\n"],"names":["SortTemplate","comparator","swap","ary","x","y","temp","randomIntInRange","low","high","Math","round","random","doQuickSort","p","r","pivotIndex","i","pivot","j","q","cloneSort","template","toString","templateFn","Function","sortCache","WeakMap","exports","quickSort","start","get","set","length"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,oEAAoE;AACpE,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,iDAAiD;AAEjD,SAASA,aAAaC,UAAU;IAEhC;;;;;;;;;CASC,GACD,SAASC,KAAKC,GAAG,EAAEC,CAAC,EAAEC,CAAC;QACrB,IAAIC,OAAOH,GAAG,CAACC,EAAE;QACjBD,GAALine truncated
{"offset": {"line": 3312, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/source-map-consumer.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMLine truncated
{"offset": {"line": 4279, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/lib/source-node.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line isLine truncated
{"offset": {"line": 4637, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/source-map-js/source-map.js"],"sourcesContent":["/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n"],"names":["exports","SourceMapGenerator","SourceMapConsumer","SourceNode"],"mappings":"AAAA;;;;CAIC,GACDA,QAAQC,kBAAkB,GAAG,0JAAsCA,kBAAkB;AACrFD,QAAQE,iBAAiB,GAAG,yJAAqCA,iBAAiB;AAClFF,QAAQG,UAAU,GAAG,iJAA6BA,UAAU","ignoreList":[0]}},
{"offset": {"line": 4648, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/previous-map.js"],"sourcesContent":["'use strict'\n\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, isAbsolute, join, relative, sep } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n if (opts.unsafeMap) this.unsafeMap = true\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.json || this.text)\n }\n return this.consumerCache\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n let uriMatch = text.match(charsetUri) || text.match(uri)\n if (uriMatch) {\n return decodeURIComponent(text.substr(uriMatch[0].length))\n }\n\n let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri)\n if (baseUriMatch) {\n return fromBase64(text.substr(baseUriMatch[0].length))\n }\n\n let encoding = text.slice('data:application/json;'.length)\n encoding = encoding.slice(0, encoding.indexOf(','))\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n loadFile(path, cssFile, trusted) {\n if (!trusted && !this.unsafeMap) {\n if (!/\\.map$/i.test(path)) {\n return undefined\n }\n if (cssFile) {\n let relativePath = relative(dirname(cssFile), path)\n if (\n relativePath === '..' ||\n relativePath.startsWith('..' + sep) ||\n isAbsolute(relativePath)\n ) {\n return undefined\n }\n }\n }\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath, file, true)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n let unknown = this.loadFile(map, file, false)\n if (unknown) {\n try {\n /* c8 ignore next 4 */\n this.json = JSON.parse(unknown.replace(/^\\)]}'[^\\n]*\\n/, ''))\n } catch {\n return undefined\n }\n }\n return unknown\n }\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n withContent() {\n return !!(\n this.conLine truncated
{"offset": {"line": 4783, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/input.js"],"sourcesContent":["'use strict'\n\nlet { nanoid } = require('nanoid/non-secure')\nlet { isAbsolute, resolve } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\nlet terminalHighlight = require('./terminal-highlight')\n\nlet lineToIndexCache = Symbol('lineToIndexCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nfunction getLineToIndex(input) {\n if (input[lineToIndexCache]) return input[lineToIndexCache]\n let lines = input.css.split('\\n')\n let lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n input[lineToIndexCache] = lineToIndex\n return lineToIndex\n}\n\nclass Input {\n get from() {\n return this.file || this.id\n }\n\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n this.document = this.css\n if (opts.document) this.document = opts.document.toString()\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = '<input css ' + nanoid(6) + '>'\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let endColumn, endLine, endOffset, offset, result\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n offset = start.offset\n let pos = this.fromOffset(offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n offset = this.fromLineAndColumn(line, column)\n }\n if (typeof end.offset === 'number') {\n endOffset = end.offset\n let pos = this.fromOffset(endOffset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n endOffset = this.fromLineAndColumn(end.line, end.column)\n }\n } else if (!column) {\n offset = line\n let pos = this.fromOffset(offset)\n line = pos.line\n column = pos.col\n } else {\n offset = this.fromLineAndColumn(line, column)\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = {\n column,\n endColumn,\n endLine,\n endOffset,\n line,\n offset,\n source: this.css\n }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromLineAndColumn(line, column) {\n let lineToIndex = getLineToIndex(this)\n let index = lineToIndex[line - 1]\n return index + column - 1\n }\n\n fromOffset(offset) {\n let lineToIndex = getLineToIndex(this)\n let lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - Line truncated
{"offset": {"line": 5024, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/root.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n normalize(child, sample, type) {\n let keepBefore = new Set()\n for (let node of Array.isArray(child) ? child : [child]) {\n if (\n node &&\n typeof node === 'object' &&\n !node.parent &&\n node.raws &&\n typeof node.raws.before !== 'undefined'\n ) {\n keepBefore.add(node.raws)\n }\n }\n\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n if (!keepBefore.has(node.raws)) {\n node.raws.before = sample.raws.before\n }\n }\n }\n }\n\n return nodes\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n"],"names":["Container","LazyResult","Processor","Root","defaults","type","nodes","normalize","child","sample","keepBefore","Set","node","Array","isArray","parent","raws","before","add","length","first","has","removeChild","ignore","index","toResult","opts","lazy","stringify","registerLazyResult","dependant","registerProcessor","module","exports","default","registerRoot"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC,YAAYC;AAEhB,MAAMC,aAAaH;IACjBG,YAAYC,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAAC,IAAI,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;IAClC;IAEAC,UAAUC,KAAK,EAAEC,MAAM,EAAEJ,IAAI,EAAE;QAC7B,IAAIK,aAAa,IAAIC;QACrB,KAAK,IAAIC,QAAQC,MAAMC,OAAO,CAACN,SAASA,QAAQ;YAACA;SAAM,CAAE;YACvD,IACEI,QACA,OAAOA,SAAS,YAChB,CAACA,KAAKG,MAAM,IACZH,KAAKI,IAAI,IACT,OAAOJ,KAAKI,IAAI,CAACC,MAAM,KAAK,aAC5B;gBACAP,WAAWQ,GAAG,CAACN,KAAKI,IAAI;YAC1B;QACF;QAEA,IAAIV,QAAQ,KAAK,CAACC,UAAUC;QAE5B,IAAIC,QAAQ;YACV,IAAIJ,SAAS,WAAW;gBACtB,IAAI,IAAI,CAACC,KAAK,CAACa,MAAM,GAAG,GAAG;oBACzBV,OAAOO,IAAI,CAACC,MAAM,GAAG,IAAI,CAACX,KAAK,CAAC,EAAE,CAACU,IAAI,CAACC,MAAM;gBAChD,OAAO;oBACL,OAAOR,OAAOO,IAAI,CAACC,MAAM;gBAC3B;YACF,OAAO,IAAI,IAAI,CAACG,KAAK,KAAKX,QAAQ;gBAChC,KAAK,IAAIG,QAAQN,MAAO;oBACtB,IAAI,CAACI,WAAWW,GAAG,CAACT,KAAKI,IAAI,GAAG;wBAC9BJ,KAAKI,IAAI,CAACC,MAAM,GAAGR,OAAOO,IAAI,CAACC,MAAM;oBACvC;gBACF;YACF;QACF;QAEA,OAAOX;IACT;IAEAgB,YAAYd,KAAK,EAAEe,MAAM,EAAE;QACzB,IAAIC,QAAQ,IAAI,CAACA,KAAK,CAAChB;QAEvB,IAAI,CAACe,UAAUC,UAAU,KAAK,IAAI,CAAClB,KAAK,CAACa,MAAM,GAAG,GAAG;YACnD,IAAI,CAACb,KAAK,CAAC,EAAE,CAACU,IAAI,CAACC,MAAM,GAAG,IAAI,CAACX,KAAK,CAACkB,MAAM,CAACR,IAAI,CAACC,MAAM;QAC3D;QAEA,OAAO,KAAK,CAACK,YAAYd;IAC3B;IAEAiB,SAASC,OAAO,CAAC,CAAC,EAAE;QAClB,IAAIC,OAAO,IAAI1B,WAAW,IAAIC,aAAa,IAAI,EAAEwB;QACjD,OAAOC,KAAKC,SAAS;IACvB;AACF;AAEAzB,KAAK0B,kBAAkB,GAAGC,CAAAA;IACxB7B,aAAa6B;AACf;AAEA3B,KAAK4B,iBAAiB,GAAGD,CAAAA;IACvB5B,YAAY4B;AACd;AAEAE,OAAOC,OAAO,GAAG9B;AACjBA,KAAK+B,OAAO,GAAG/B;AAEfH,UAAUmC,YAAY,CAAChC","ignoreList":[0]}},
{"offset": {"line": 5084, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/list.js"],"sourcesContent":["'use strict'\n\nlet list = {\n comma(string) {\n return list.split(string, [','], true)\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n }\n}\n\nmodule.exports = list\nlist.default = list\n"],"names":["list","comma","string","split","space","spaces","separators","last","array","current","func","inQuote","prevQuote","escape","letter","includes","push","trim","module","exports","default"],"mappings":"AAEA,IAAIA,OAAO;IACTC,OAAMC,MAAM;QACV,OAAOF,KAAKG,KAAK,CAACD,QAAQ;YAAC;SAAI,EAAE;IACnC;IAEAE,OAAMF,MAAM;QACV,IAAIG,SAAS;YAAC;YAAK;YAAM;SAAK;QAC9B,OAAOL,KAAKG,KAAK,CAACD,QAAQG;IAC5B;IAEAF,OAAMD,MAAM,EAAEI,UAAU,EAAEC,IAAI;QAC5B,IAAIC,QAAQ,EAAE;QACd,IAAIC,UAAU;QACd,IAAIN,QAAQ;QAEZ,IAAIO,OAAO;QACX,IAAIC,UAAU;QACd,IAAIC,YAAY;QAChB,IAAIC,SAAS;QAEb,KAAK,IAAIC,UAAUZ,OAAQ;YACzB,IAAIW,QAAQ;gBACVA,SAAS;YACX,OAAO,IAAIC,WAAW,MAAM;gBAC1BD,SAAS;YACX,OAAO,IAAIF,SAAS;gBAClB,IAAIG,WAAWF,WAAW;oBACxBD,UAAU;gBACZ;YACF,OAAO,IAAIG,WAAW,OAAOA,WAAW,KAAK;gBAC3CH,UAAU;gBACVC,YAAYE;YACd,OAAO,IAAIA,WAAW,KAAK;gBACzBJ,QAAQ;YACV,OAAO,IAAII,WAAW,KAAK;gBACzB,IAAIJ,OAAO,GAAGA,QAAQ;YACxB,OAAO,IAAIA,SAAS,GAAG;gBACrB,IAAIJ,WAAWS,QAAQ,CAACD,SAASX,QAAQ;YAC3C;YAEA,IAAIA,OAAO;gBACT,IAAIM,YAAY,IAAID,MAAMQ,IAAI,CAACP,QAAQQ,IAAI;gBAC3CR,UAAU;gBACVN,QAAQ;YACV,OAAO;gBACLM,WAAWK;YACb;QACF;QAEA,IAAIP,QAAQE,YAAY,IAAID,MAAMQ,IAAI,CAACP,QAAQQ,IAAI;QACnD,OAAOT;IACT;AACF;AAEAU,OAAOC,OAAO,GAAGnB;AACjBA,KAAKoB,OAAO,GAAGpB","ignoreList":[0]}},
{"offset": {"line": 5143, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/rule.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n"],"names":["Container","list","Rule","selectors","comma","selector","values","match","sep","raw","join","defaults","type","nodes","module","exports","default","registerRule"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AAEJ,MAAMC,aAAaF;IACjB,IAAIG,YAAY;QACd,OAAOF,KAAKG,KAAK,CAAC,IAAI,CAACC,QAAQ;IACjC;IAEA,IAAIF,UAAUG,MAAM,EAAE;QACpB,IAAIC,QAAQ,IAAI,CAACF,QAAQ,GAAG,IAAI,CAACA,QAAQ,CAACE,KAAK,CAAC,UAAU;QAC1D,IAAIC,MAAMD,QAAQA,KAAK,CAAC,EAAE,GAAG,MAAM,IAAI,CAACE,GAAG,CAAC,WAAW;QACvD,IAAI,CAACJ,QAAQ,GAAGC,OAAOI,IAAI,CAACF;IAC9B;IAEAN,YAAYS,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAAC,IAAI,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;IAClC;AACF;AAEAC,OAAOC,OAAO,GAAGb;AACjBA,KAAKc,OAAO,GAAGd;AAEfF,UAAUiB,YAAY,CAACf","ignoreList":[0]}},
{"offset": {"line": 5167, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/fromJSON.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Input = require('./input')\nlet PreviousMap = require('./previous-map')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction hydrateInputs(json, inputs) {\n if (!json.inputs) return inputs\n return json.inputs.map(input => {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n return inputHydrated\n })\n}\n\nfunction constructNode(json, inputs, children) {\n let defaults = { ...json }\n delete defaults.inputs\n delete defaults.nodes\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n\n let node\n if (defaults.type === 'root') {\n node = new Root(defaults)\n } else if (defaults.type === 'decl') {\n node = new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n node = new Rule(defaults)\n } else if (defaults.type === 'comment') {\n node = new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n node = new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n\n // Rehydrated children are attached after construction. Passing them\n // through the container constructor would re-run insertion spacing\n // normalization and overwrite each child's own `raws.before`.\n if (children) {\n node.nodes = children\n for (let child of children) child.parent = node\n }\n\n return node\n}\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n // An explicit stack instead of recursive calls to survive deeply\n // nested trees. Children are rehydrated before their parent node\n // is constructed.\n let result\n let stack = [\n { childIndex: 0, children: [], inputs: hydrateInputs(json, inputs), json }\n ]\n\n while (stack.length > 0) {\n let frame = stack[stack.length - 1]\n let jsonNodes = frame.json.nodes\n\n if (jsonNodes && frame.childIndex < jsonNodes.length) {\n let childJson = jsonNodes[frame.childIndex]\n frame.childIndex += 1\n stack.push({\n childIndex: 0,\n children: [],\n inputs: hydrateInputs(childJson, frame.inputs),\n json: childJson\n })\n continue\n }\n\n stack.pop()\n let node = constructNode(\n frame.json,\n frame.inputs,\n jsonNodes ? frame.children : undefined\n )\n if (stack.length > 0) {\n stack[stack.length - 1].children.push(node)\n } else {\n result = node\n }\n }\n\n return result\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n"],"names":["AtRule","Comment","Declaration","Input","PreviousMap","Root","Rule","hydrateInputs","json","inputs","map","input","inputHydrated","__proto__","prototype","constructNode","children","defaults","nodes","source","inputId","node","type","Error","child","parent","fromJSON","Array","isArray","n","result","stack","childIndex","length","frame","jsonNodes","childJson","push","pop","undefined","module","exports","default"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,SAASC,cAAcC,IAAI,EAAEC,MAAM;IACjC,IAAI,CAACD,KAAKC,MAAM,EAAE,OAAOA;IACzB,OAAOD,KAAKC,MAAM,CAACC,GAAG,CAACC,CAAAA;QACrB,IAAIC,gBAAgB;YAAE,GAAGD,KAAK;YAAEE,WAAWV,MAAMW,SAAS;QAAC;QAC3D,IAAIF,cAAcF,GAAG,EAAE;YACrBE,cAAcF,GAAG,GAAG;gBAClB,GAAGE,cAAcF,GAAG;gBACpBG,WAAWT,YAAYU,SAAS;YAClC;QACF;QACA,OAAOF;IACT;AACF;AAEA,SAASG,cAAcP,IAAI,EAAEC,MAAM,EAAEO,QAAQ;IAC3C,IAAIC,WAAW;QAAE,GAAGT,IAAI;IAAC;IACzB,OAAOS,SAASR,MAAM;IACtB,OAAOQ,SAASC,KAAK;IACrB,IAAID,SAASE,MAAM,EAAE;QACnB,IAAI,EAAEC,OAAO,EAAE,GAAGD,QAAQ,GAAGF,SAASE,MAAM;QAC5CF,SAASE,MAAM,GAAGA;QAClB,IAAIC,WAAW,MAAM;YACnBH,SAASE,MAAM,CAACR,KAAK,GAAGF,MAAM,CAACW,QAAQ;QACzC;IACF;IAEA,IAAIC;IACJ,IAAIJ,SAASK,IAAI,KAAK,QAAQ;QAC5BD,OAAO,IAAIhB,KAAKY;IAClB,OAAO,IAAIA,SAASK,IAAI,KAAK,QAAQ;QACnCD,OAAO,IAAInB,YAAYe;IACzB,OAAO,IAAIA,SAASK,IAAI,KAAK,QAAQ;QACnCD,OAAO,IAAIf,KAAKW;IAClB,OAAO,IAAIA,SAASK,IAAI,KAAK,WAAW;QACtCD,OAAO,IAAIpB,QAAQgB;IACrB,OAAO,IAAIA,SAASK,IAAI,KAAK,UAAU;QACrCD,OAAO,IAAIrB,OAAOiB;IACpB,OAAO;QACL,MAAM,IAAIM,MAAM,wBAAwBf,KAAKc,IAAI;IACnD;IAEA,oEAAoE;IACpE,mEAAmE;IACnE,8DAA8D;IAC9D,IAAIN,UAAU;QACZK,KAAKH,KAAK,GAAGF;QACb,KAAK,IAAIQ,SAASR,SAAUQ,MAAMC,MAAM,GAAGJ;IAC7C;IAEA,OAAOA;AACT;AAEA,SAASK,SAASlB,IAAI,EAAEC,MAAM;IAC5B,IAAIkB,MAAMC,OAAO,CAACpB,OAAO,OAAOA,KAAKE,GAAG,CAACmB,CAAAA,IAAKH,SAASG;IAEvD,iEAAiE;IACjE,iEAAiE;IACjE,kBAAkB;IAClB,IAAIC;IACJ,IAAIC,QAAQ;QACV;YAAEC,YAAY;YAAGhB,UAAU,EAAE;YAAEPLine truncated
{"offset": {"line": 5270, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/map-generator.js"],"sourcesContent":["'use strict'\n\nlet { dirname, relative, resolve, sep } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n constructor(stringify, root, opts, cssString) {\n this.stringify = stringify\n this.mapOpts = opts.map || {}\n this.root = root\n this.opts = opts\n this.css = cssString\n this.originalCSS = cssString\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n this.memoizedFileURLs = new Map()\n this.memoizedPaths = new Map()\n this.memoizedURLs = new Map()\n }\n\n addAnnotation() {\n let content\n\n if (this.isInline()) {\n content =\n 'data:application/json;base64,' + this.toBase64(this.map.toString())\n } else if (typeof this.mapOpts.annotation === 'string') {\n content = this.mapOpts.annotation\n } else if (typeof this.mapOpts.annotation === 'function') {\n content = this.mapOpts.annotation(this.opts.to, this.root)\n } else {\n content = this.outputFile() + '.map'\n }\n let eol = '\\n'\n if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n }\n\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file))\n let root = prev.root || dirname(prev.file)\n let map\n\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text)\n if (map.sourcesContent) {\n map.sourcesContent = null\n }\n } else {\n map = prev.consumer()\n }\n\n this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n }\n }\n\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return\n\n if (this.root) {\n let node\n for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n node = this.root.nodes[i]\n if (node.type !== 'comment') continue\n if (node.text.startsWith('# sourceMappingURL=')) {\n this.root.removeChild(i)\n }\n }\n } else if (this.css) {\n let startIndex\n while ((startIndex = this.css.lastIndexOf('/*#')) !== -1) {\n let endIndex = this.css.indexOf('*/', startIndex + 3)\n if (endIndex === -1) break\n while (startIndex > 0 && this.css[startIndex - 1] === '\\n') {\n startIndex--\n }\n this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2)\n }\n }\n }\n\n generate() {\n this.clearAnnotation()\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap()\n } else {\n let result = ''\n this.stringify(this.root, i => {\n result += i\n })\n return [result]\n }\n }\n\n generateMap() {\n if (this.root) {\n this.generateString()\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer()\n prev.file = this.outputFile()\n this.map = SourceMapGenerator.fromSourceMap(prev, {\n ignoreInvalidMapping: true\n })\n } else {\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : '<no source>'\n })\n }\n\n if (this.isSourcesContent()) this.setSourcesContent()\n if (this.root && this.previous().length > 0) this.applyPrevMaps()\n if (this.isAnnotation()) this.addAnnotation()\n\n if (this.isInline()) {\n return [this.css]\n } else {\n return [this.css, this.map]\n }\n }\n\n generateString() {\n this.css = ''\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n\n let line = 1\n let column = 1\n\n let noSource = '<no source>'\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: ''\n }\n\n let last, lines\n this.stringify(this.root, (str, node, type) => {\n this.css += str\n\n if (node && type !== 'end') {\n mapping.generated.line = line\n mapping.generated.column = column - 1\n if (node.source && node.source.start) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.start.line\n mapping.original.column = node.source.start.column - 1Line truncated
{"offset": {"line": 5609, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/parser.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet tokenizer = require('./tokenize')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n}\n\nfunction findLastWithPosition(tokens) {\n for (let i = tokens.length - 1; i >= 0; i--) {\n let token = tokens[i]\n let pos = token[3] || token[2]\n if (pos) return pos\n }\n}\n\nfunction tokensToString(tokens, from, to) {\n let result = ''\n for (let i = from; i < to; i++) result += tokens[i][1]\n return result\n}\n\nclass Parser {\n constructor(input) {\n this.input = input\n\n this.root = new Root()\n this.current = this.root\n this.spaces = ''\n this.semicolon = false\n\n this.createTokenizer()\n this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n }\n\n atrule(token) {\n let node = new AtRule()\n node.name = token[1].slice(1)\n if (node.name === '') {\n this.unnamedAtrule(node, token)\n }\n this.init(node, token[2])\n\n let type\n let prev\n let shift\n let last = false\n let open = false\n let params = []\n let brackets = []\n\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n type = token[0]\n\n if (type === '(' || type === '[') {\n brackets.push(type === '(' ? ')' : ']')\n } else if (type === '{' && brackets.length > 0) {\n brackets.push('}')\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n }\n\n if (brackets.length === 0) {\n if (type === ';') {\n node.source.end = this.getPosition(token[2])\n node.source.end.offset++\n this.semicolon = true\n break\n } else if (type === '{') {\n open = true\n break\n } else if (type === '}') {\n if (params.length > 0) {\n shift = params.length - 1\n prev = params[shift]\n while (prev && prev[0] === 'space') {\n prev = params[--shift]\n }\n if (prev) {\n node.source.end = this.getPosition(prev[3] || prev[2])\n node.source.end.offset++\n }\n }\n this.end(token)\n break\n } else {\n params.push(token)\n }\n } else {\n params.push(token)\n }\n\n if (this.tokenizer.endOfFile()) {\n last = true\n break\n }\n }\n\n node.raws.between = this.spacesAndCommentsFromEnd(params)\n if (params.length) {\n node.raws.afterName = this.spacesAndCommentsFromStart(params)\n this.raw(node, 'params', params)\n if (last) {\n token = params[params.length - 1]\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n this.spaces = node.raws.between\n node.raws.between = ''\n }\n } else {\n node.raws.afterName = ''\n node.params = ''\n }\n\n if (open) {\n node.nodes = []\n this.current = node\n }\n }\n\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens)\n if (colon === false) return\n\n let founded = 0\n let token\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j]\n if (token[0] !== 'space') {\n founded += 1\n if (founded === 2) break\n }\n }\n // If the token is a word, e.g. `!important`, `red` or any other valid\n // property's value. Then we need to return the colon after that word\n // token. [3] is the \"end\" colon of that word. And because we need it\n // after that one we do +1 to get the next one.\n throw this.input.error(\n 'Missed semicolon',\n token[0] === 'word' ? token[3] + 1 : token[2]\n )\n }\n\n colon(tokens) {\n let brackets = 0\n let prev, token, type\n for (let [i, element] of tokens.entries()) {\n token = element\n type = token[0]\n\n if (type === '(') {\n brackets += 1\n }\n if (type === ')') {\n brackets -= 1\n }\n if (brackets === 0 && type === ':') {\n if (!prev) {\n this.doubleColon(token)\n } else if (prev[0] === 'word' && prev[1] === 'progid') {\n continue\n } else {\n return i\n }\n }\n\n prev = token\n }\n return false\n }\n\n comment(token) {\n let node = new Comment()\n this.init(node, token[2])\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n\n let text = token[1].slice(2, -2)\n if (!text.trim()) {\n node.text = ''\n node.raws.left = text\n node.raws.right = ''\n } else Line truncated
{"offset": {"line": 6160, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/parse.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet Input = require('./input')\nlet Parser = require('./parser')\n\nfunction parse(css, opts) {\n let input = new Input(css, opts)\n let parser = new Parser(input)\n try {\n parser.parse()\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (e.name === 'CssSyntaxError' && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse SCSS with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-scss parser'\n } else if (/\\.sass/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Sass with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-sass parser'\n } else if (/\\.less$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Less with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-less parser'\n }\n }\n }\n throw e\n }\n\n return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n"],"names":["Container","Input","Parser","parse","css","opts","input","parser","e","root","module","exports","default","registerParse"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AAEJ,SAASC,MAAMC,GAAG,EAAEC,IAAI;IACtB,IAAIC,QAAQ,IAAIL,MAAMG,KAAKC;IAC3B,IAAIE,SAAS,IAAIL,OAAOI;IACxB,IAAI;QACFC,OAAOJ,KAAK;IACd,EAAE,OAAOK,GAAG;QACV;;QAoBA,MAAMA;IACR;IAEA,OAAOD,OAAOE,IAAI;AACpB;AAEAC,OAAOC,OAAO,GAAGR;AACjBA,MAAMS,OAAO,GAAGT;AAEhBH,UAAUa,aAAa,CAACV","ignoreList":[0]}},
{"offset": {"line": 6182, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/warning.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet { my } = require('./symbols')\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n if (!opts.node[my]) {\n // The node comes from another PostCSS copy in node_modules, so it does\n // not have this copy’s methods. Container#normalize() rebuilds such\n // nodes on insert, but a node passed straight to Result#warn() never\n // goes through it.\n Container.rebuild(opts.node)\n }\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n"],"names":["Container","my","Warning","text","opts","type","node","source","rebuild","range","rangeBy","line","start","column","endLine","end","endColumn","opt","toString","error","index","plugin","word","message","module","exports","default"],"mappings":"AAEA,IAAIA;AACJ,IAAI,EAAEC,EAAE,EAAE;AAEV,MAAMC;IACJA,YAAYC,IAAI,EAAEC,OAAO,CAAC,CAAC,CAAE;QAC3B,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAACF,IAAI,GAAGA;QAEZ,IAAIC,KAAKE,IAAI,IAAIF,KAAKE,IAAI,CAACC,MAAM,EAAE;YACjC,IAAI,CAACH,KAAKE,IAAI,CAACL,GAAG,EAAE;gBAClB,uEAAuE;gBACvE,oEAAoE;gBACpE,qEAAqE;gBACrE,mBAAmB;gBACnBD,UAAUQ,OAAO,CAACJ,KAAKE,IAAI;YAC7B;YACA,IAAIG,QAAQL,KAAKE,IAAI,CAACI,OAAO,CAACN;YAC9B,IAAI,CAACO,IAAI,GAAGF,MAAMG,KAAK,CAACD,IAAI;YAC5B,IAAI,CAACE,MAAM,GAAGJ,MAAMG,KAAK,CAACC,MAAM;YAChC,IAAI,CAACC,OAAO,GAAGL,MAAMM,GAAG,CAACJ,IAAI;YAC7B,IAAI,CAACK,SAAS,GAAGP,MAAMM,GAAG,CAACF,MAAM;QACnC;QAEA,IAAK,IAAII,OAAOb,KAAM,IAAI,CAACa,IAAI,GAAGb,IAAI,CAACa,IAAI;IAC7C;IAEAC,WAAW;QACT,IAAI,IAAI,CAACZ,IAAI,EAAE;YACb,OAAO,IAAI,CAACA,IAAI,CAACa,KAAK,CAAC,IAAI,CAAChB,IAAI,EAAE;gBAChCiB,OAAO,IAAI,CAACA,KAAK;gBACjBC,QAAQ,IAAI,CAACA,MAAM;gBACnBC,MAAM,IAAI,CAACA,IAAI;YACjB,GAAGC,OAAO;QACZ;QAEA,IAAI,IAAI,CAACF,MAAM,EAAE;YACf,OAAO,IAAI,CAACA,MAAM,GAAG,OAAO,IAAI,CAAClB,IAAI;QACvC;QAEA,OAAO,IAAI,CAACA,IAAI;IAClB;AACF;AAEAqB,OAAOC,OAAO,GAAGvB;AACjBA,QAAQwB,OAAO,GAAGxB","ignoreList":[0]}},
{"offset": {"line": 6224, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/result.js"],"sourcesContent":["'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n get content() {\n return this.css\n }\n\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = ''\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n"],"names":["Warning","Result","content","css","processor","root","opts","messages","map","undefined","toString","warn","text","plugin","lastPlugin","postcssPlugin","warning","push","warnings","filter","i","type","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC;IACJ,IAAIC,UAAU;QACZ,OAAO,IAAI,CAACC,GAAG;IACjB;IAEAF,YAAYG,SAAS,EAAEC,IAAI,EAAEC,IAAI,CAAE;QACjC,IAAI,CAACF,SAAS,GAAGA;QACjB,IAAI,CAACG,QAAQ,GAAG,EAAE;QAClB,IAAI,CAACF,IAAI,GAAGA;QACZ,IAAI,CAACC,IAAI,GAAGA;QACZ,IAAI,CAACH,GAAG,GAAG;QACX,IAAI,CAACK,GAAG,GAAGC;IACb;IAEAC,WAAW;QACT,OAAO,IAAI,CAACP,GAAG;IACjB;IAEAQ,KAAKC,IAAI,EAAEN,OAAO,CAAC,CAAC,EAAE;QACpB,IAAI,CAACA,KAAKO,MAAM,EAAE;YAChB,IAAI,IAAI,CAACC,UAAU,IAAI,IAAI,CAACA,UAAU,CAACC,aAAa,EAAE;gBACpDT,KAAKO,MAAM,GAAG,IAAI,CAACC,UAAU,CAACC,aAAa;YAC7C;QACF;QAEA,IAAIC,UAAU,IAAIhB,QAAQY,MAAMN;QAChC,IAAI,CAACC,QAAQ,CAACU,IAAI,CAACD;QAEnB,OAAOA;IACT;IAEAE,WAAW;QACT,OAAO,IAAI,CAACX,QAAQ,CAACY,MAAM,CAACC,CAAAA,IAAKA,EAAEC,IAAI,KAAK;IAC9C;AACF;AAEAC,OAAOC,OAAO,GAAGtB;AACjBA,OAAOuB,OAAO,GAAGvB","ignoreList":[0]}},
{"offset": {"line": 6260, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/warn-once.js"],"sourcesContent":["/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n if (printed[message]) return\n printed[message] = true\n\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message)\n }\n}\n"],"names":["printed","module","exports","warnOnce","message","console","warn"],"mappings":"AAAA,6BAA6B,GAG7B,IAAIA,UAAU,CAAC;AAEfC,OAAOC,OAAO,GAAG,SAASC,SAASC,OAAO;IACxC,IAAIJ,OAAO,CAACI,QAAQ,EAAE;IACtBJ,OAAO,CAACI,QAAQ,GAAG;IAEnB,IAAI,OAAOC,YAAY,eAAeA,QAAQC,IAAI,EAAE;QAClDD,QAAQC,IAAI,CAACF;IACf;AACF","ignoreList":[0]}},
{"offset": {"line": 6272, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/lazy-result.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet Document = require('./document')\nlet MapGenerator = require('./map-generator')\nlet parse = require('./parse')\nlet Result = require('./result')\nlet Root = require('./root')\nlet stringify = require('./stringify')\nlet { isClean, my } = require('./symbols')\nlet warnOnce = require('./warn-once')\n\nconst TYPE_TO_CLASS_NAME = {\n atrule: 'AtRule',\n comment: 'Comment',\n decl: 'Declaration',\n document: 'Document',\n root: 'Root',\n rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n}\n\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node,\n visitorIndex: 0,\n visitors: []\n }\n}\n\nfunction cleanMarks(node) {\n let stack = [node]\n while (stack.length > 0) {\n let next = stack.pop()\n next[isClean] = false\n if (next.nodes) {\n for (let i of next.nodes) stack.push(i)\n }\n }\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n get content() {\n return this.stringify().content\n }\n\n get css() {\n return this.stringify().css\n }\n\n get map() {\n return this.stringify().map\n }\n\n get messages() {\n return this.sync().messages\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n return this.sync().root\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, postcss, result: this.result }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n Line truncated
{"offset": {"line": 6807, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/no-work-result.js"],"sourcesContent":["'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet parse = require('./parse')\nlet Result = require('./result')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\n\nclass NoWorkResult {\n get content() {\n return this.result.css\n }\n\n get css() {\n return this.result.css\n }\n\n get map() {\n return this.result.map\n }\n\n get messages() {\n return []\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n if (this._root) {\n return this._root\n }\n\n let root\n let parser = parse\n\n try {\n root = parser(this._css, this._opts)\n } catch (error) {\n this.error = error\n }\n\n if (this.error) {\n throw this.error\n } else {\n this._root = root\n return root\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'NoWorkResult'\n }\n\n constructor(processor, css, opts) {\n css = css.toString()\n this.stringified = false\n\n this._processor = processor\n this._css = css\n this._opts = opts\n this._map = undefined\n\n let str = stringify\n this.result = new Result(this._processor, undefined, this._opts)\n this.result.css = css\n\n let self = this\n Object.defineProperty(this.result, 'root', {\n get() {\n return self.root\n }\n })\n\n let map = new MapGenerator(str, undefined, this._opts, css)\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate()\n if (generatedCSS) {\n this.result.css = generatedCSS\n }\n if (generatedMap) {\n this.result.map = generatedMap\n }\n } else {\n map.clearAnnotation()\n this.result.css = map.css\n }\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n return Promise.resolve(this.result)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n sync() {\n if (this.error) throw this.error\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this._opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this._css\n }\n\n warnings() {\n return []\n }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n"],"names":["MapGenerator","parse","Result","stringify","warnOnce","NoWorkResult","content","result","css","map","messages","opts","processor","root","_root","parser","_css","_opts","error","Symbol","toStringTag","toString","stringified","_processor","_map","undefined","str","self","Object","defineProperty","get","isMap","generatedCSS","generatedMap","generate","clearAnnotation","async","Promise","reject","resolve","catch","onRejected","finally","onFinally","then","sync","onFulfilled","warnings","module","exports","default"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,MAAMC;IACJ,IAAIC,UAAU;QACZ,OAAO,IAAI,CAACC,MAAM,CAACC,GAAG;IACxB;IAEA,IAAIA,MAAM;QACR,OAAO,IAAI,CAACD,MAAM,CAACC,GAAG;IACxB;IAEA,IAAIC,MAAM;QACR,OAAO,IAAI,CAACF,MAAM,CAACE,GAAG;IACxB;IAEA,IAAIC,WAAW;QACb,OAAO,EAAE;IACX;IAEA,IAAIC,OAAO;QACT,OAAO,IAAI,CAACJ,MAAM,CAACI,IAAI;IACzB;IAEA,IAAIC,YAAY;QACd,OAAO,IAAI,CAACL,MAAM,CAACK,SAAS;IAC9B;IAEA,IAAIC,OAAO;QACT,IAAI,IAAI,CAACC,KAAK,EAAE;YACd,OAAO,IAAI,CAACA,KAAK;QACnB;QAEA,IAAID;QACJ,IAAIE,SAASd;QAEb,IAAI;YACFY,OAAOE,OAAO,IAAI,CAACC,IAAI,EAAE,IAAI,CAACC,KAAK;QACrC,EAAE,OAAOC,OAAO;YACd,IAAI,CAACA,KAAK,GAAGA;QACf;QAEA,IAAI,IAAI,CAACA,KAAK,EAAE;YACd,MAAM,IAAI,CAACA,KAAK;QAClB,OAAO;YACL,IAAI,CAACJ,KAAK,GAAGD;YACb,OAAOA;QACT;IACF;IAEA,IAAI,CAACM,OAAOC,WAAW,CAAC,GAAG;QACzB,OAAO;IACT;IAEAf,YAAYO,SAAS,EAAEJ,GAAG,EAAEG,IAAI,CAAE;QAChCH,MAAMA,IAAIa,QAAQ;QAClB,IAAI,CAACC,WAAW,GAAG;QAEnB,IAAI,CAACC,UAAU,GAAGX;QAClB,IAAI,CAACI,IAAI,GAAGR;QACZ,IAAI,CAACS,KAAK,GAAGN;QACb,IAAI,CAACa,IAAI,GAAGC;QAEZ,IAAIC,MAAMvB;QACV,IAAI,CAACI,MAAM,GAAG,IAAIL,OAAO,IAAI,CAACqB,UAAU,EAAEE,WAAW,IAAI,CAACR,KAAK;QAC/D,IAAI,CAACV,MAAM,CAACC,GAAG,GAAGA;QAElB,IAAImB,OAAO,IAAI;QACfC,OAAOC,cAAc,CAAC,IAAI,CAACtB,MAAM,EAAE,QAAQ;YACzCuB;gBACE,OAAOH,KAAKd,IAAI;YAClB;QACF;QAEA,IAAIJ,MAAM,IAAIT,aAAa0B,KAAKD,WAAW,IAAI,CAACR,KAAK,EAAET;QACvD,IAAIC,IAAIsB,KAAK,IAAI;YACf,IAAI,CAACC,cAAcC,aAAa,GAAGxB,IAAIyB,QAAQ;YAC/C,IAAIF,cAAc;gBAChB,IAAI,CAACzB,MAAM,CAACC,GAAG,GAAGwB;YACpB;YACA,IAAIC,cAAc;gBAChB,IAAI,CAAC1B,MAAM,CAACE,GAAG,GALine truncated
{"offset": {"line": 6914, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/processor.js"],"sourcesContent":["'use strict'\n\nlet Document = require('./document')\nlet LazyResult = require('./lazy-result')\nlet NoWorkResult = require('./no-work-result')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.5.21'\n this.plugins = this.normalize(plugins)\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n\n process(css, opts = {}) {\n if (\n !this.plugins.length &&\n !opts.parser &&\n !opts.stringifier &&\n !opts.syntax\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n"],"names":["Document","LazyResult","NoWorkResult","Root","Processor","plugins","version","normalize","normalized","i","postcss","Array","isArray","concat","postcssPlugin","push","parse","stringify","Error","process","css","opts","length","parser","stringifier","syntax","use","plugin","module","exports","default","registerProcessor"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,MAAMC;IACJA,YAAYC,UAAU,EAAE,CAAE;QACxB,IAAI,CAACC,OAAO,GAAG;QACf,IAAI,CAACD,OAAO,GAAG,IAAI,CAACE,SAAS,CAACF;IAChC;IAEAE,UAAUF,OAAO,EAAE;QACjB,IAAIG,aAAa,EAAE;QACnB,KAAK,IAAIC,KAAKJ,QAAS;YACrB,IAAII,EAAEC,OAAO,KAAK,MAAM;gBACtBD,IAAIA;YACN,OAAO,IAAIA,EAAEC,OAAO,EAAE;gBACpBD,IAAIA,EAAEC,OAAO;YACf;YAEA,IAAI,OAAOD,MAAM,YAAYE,MAAMC,OAAO,CAACH,EAAEJ,OAAO,GAAG;gBACrDG,aAAaA,WAAWK,MAAM,CAACJ,EAAEJ,OAAO;YAC1C,OAAO,IAAI,OAAOI,MAAM,YAAYA,EAAEK,aAAa,EAAE;gBACnDN,WAAWO,IAAI,CAACN;YAClB,OAAO,IAAI,OAAOA,MAAM,YAAY;gBAClCD,WAAWO,IAAI,CAACN;YAClB,OAAO,IAAI,OAAOA,MAAM,YAAY,CAACA,EAAEO,KAAK,IAAIP,EAAEQ,SAAS,GAAG;gBAC5D;;YAOF,OAAO;gBACL,MAAM,IAAIC,MAAMT,IAAI;YACtB;QACF;QACA,OAAOD;IACT;IAEAW,QAAQC,GAAG,EAAEC,OAAO,CAAC,CAAC,EAAE;QACtB,IACE,CAAC,IAAI,CAAChB,OAAO,CAACiB,MAAM,IACpB,CAACD,KAAKE,MAAM,IACZ,CAACF,KAAKG,WAAW,IACjB,CAACH,KAAKI,MAAM,EACZ;YACA,OAAO,IAAIvB,aAAa,IAAI,EAAEkB,KAAKC;QACrC,OAAO;YACL,OAAO,IAAIpB,WAAW,IAAI,EAAEmB,KAAKC;QACnC;IACF;IAEAK,IAAIC,MAAM,EAAE;QACV,IAAI,CAACtB,OAAO,GAAG,IAAI,CAACA,OAAO,CAACQ,MAAM,CAAC,IAAI,CAACN,SAAS,CAAC;YAACoB;SAAO;QAC1D,OAAO,IAAI;IACb;AACF;AAEAC,OAAOC,OAAO,GAAGzB;AACjBA,UAAU0B,OAAO,GAAG1B;AAEpBD,KAAK4B,iBAAiB,CAAC3B;AACvBJ,SAAS+B,iBAAiB,CAAC3B","ignoreList":[0]}},
{"offset": {"line": 6968, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/postcss.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Container = require('./container')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet Document = require('./document')\nlet fromJSON = require('./fromJSON')\nlet Input = require('./input')\nlet LazyResult = require('./lazy-result')\nlet list = require('./list')\nlet Node = require('./node')\nlet parse = require('./parse')\nlet Processor = require('./processor')\nlet Result = require('./result.js')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet stringify = require('./stringify')\nlet Warning = require('./warning')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n"],"names":["AtRule","Comment","Container","CssSyntaxError","Declaration","Document","fromJSON","Input","LazyResult","list","Node","parse","Processor","Result","Root","Rule","stringify","Warning","postcss","plugins","length","Array","isArray","plugin","name","initializer","warningPrinted","creator","args","console","warn","process","env","LANG","startsWith","transformer","postcssPlugin","postcssVersion","version","cache","Object","defineProperty","get","css","processOpts","pluginOpts","comment","defaults","atRule","decl","rule","root","document","registerPostcss","module","exports","default"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,SAASC,QAAQ,GAAGC,OAAO;IACzB,IAAIA,QAAQC,MAAM,KAAK,KAAKC,MAAMC,OAAO,CAACH,OAAO,CAAC,EAAE,GAAG;QACrDA,UAAUA,OAAO,CAAC,EAAE;IACtB;IACA,OAAO,IAAIP,UAAUO;AACvB;AAEAD,QAAQK,MAAM,GAAG,SAASA,OAAOC,IAAI,EAAEC,WAAW;IAChD,IAAIC,iBAAiB;IACrB,SAASC,QAAQ,GAAGC,IAAI;QACtB,sCAAsC;QACtC,IAAIC,WAAWA,QAAQC,IAAI,IAAI,CAACJ,gBAAgB;YAC9CA,iBAAiB;YACjB,sCAAsC;YACtCG,QAAQC,IAAI,CACVN,OACE,wDACA;YAEJ,IAAIO,QAAQC,GAAG,CAACC,IAAI,IAAIF,QAAQC,GAAG,CAACC,IAAI,CAACC,UAAU,CAAC,OAAO;gBACzD,oBAAoB,GACpB,sCAAsC;gBACtCL,QAAQC,IAAI,CACVN,OACE,qCACA;YAEN;QACF;QACA,IAAIW,cAAcV,eAAeG;QACjCO,YAAYC,aAAa,GAAGZ;QAC5BW,YAAYE,cAAc,GAAG,IAAIzB,YAAY0B,OAAO;QACpD,OAAOH;IACT;IAEA,IAAII;IACJC,OAAOC,cAAc,CAACd,SAAS,WAAW;QACxCe;YACE,IAAI,CAACH,OAAOA,QAAQZ;YACpB,OAAOY;QACT;IACF;IAEAZ,QAAQI,OAAO,GAAG,SAAUY,GAAG,EAAEC,WAAW,EAAEC,UAAU;QACtD,OAAO3B,QAAQ;YAACS,QAAQkB;SAAY,EAAEd,OAAO,CAACY,KAAKC;IACrD;IAEA,OAAOjB;AACT;AAEAT,QAAQF,SAAS,GAAGA;AACpBE,QAAQP,KAAK,GAAGA;AAChBO,QAAQZ,QAAQ,GAAGA;AACnBY,QAAQT,IAAI,GAAGA;AAEfS,QAAQ4B,OAAO,GAAGC,CLine truncated
{"offset": {"line": 7054, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/[email protected]/node_modules/postcss/lib/postcss.mjs"],"sourcesContent":["import postcss from './postcss.js'\n\nexport default postcss\n\nexport const stringify = postcss.stringify\nexport const fromJSON = postcss.fromJSON\nexport const plugin = postcss.plugin\nexport const parse = postcss.parse\nexport const list = postcss.list\n\nexport const document = postcss.document\nexport const comment = postcss.comment\nexport const atRule = postcss.atRule\nexport const rule = postcss.rule\nexport const decl = postcss.decl\nexport const root = postcss.root\n\nexport const CssSyntaxError = postcss.CssSyntaxError\nexport const Declaration = postcss.Declaration\nexport const Container = postcss.Container\nexport const Processor = postcss.Processor\nexport const Document = postcss.Document\nexport const Comment = postcss.Comment\nexport const Warning = postcss.Warning\nexport const AtRule = postcss.AtRule\nexport const Result = postcss.Result\nexport const Input = postcss.Input\nexport const Rule = postcss.Rule\nexport const Root = postcss.Root\nexport const Node = postcss.Node\n"],"names":["stringify","fromJSON","plugin","parse","list","document","comment","atRule","rule","decl","root","CssSyntaxError","Declaration","Container","Processor","Document","Comment","Warning","AtRule","Result","Input","Rule","Root","Node"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;uCAEe,sMAAO;AAEf,MAAMA,YAAY,sMAAO,CAACA,SAAS;AACnC,MAAMC,WAAW,sMAAO,CAACA,QAAQ;AACjC,MAAMC,SAAS,sMAAO,CAACA,MAAM;AAC7B,MAAMC,QAAQ,sMAAO,CAACA,KAAK;AAC3B,MAAMC,OAAO,sMAAO,CAACA,IAAI;AAEzB,MAAMC,WAAW,sMAAO,CAACA,QAAQ;AACjC,MAAMC,UAAU,sMAAO,CAACA,OAAO;AAC/B,MAAMC,SAAS,sMAAO,CAACA,MAAM;AAC7B,MAAMC,OAAO,sMAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,sMAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,sMAAO,CAACA,IAAI;AAEzB,MAAMC,iBAAiB,sMAAO,CAACA,cAAc;AAC7C,MAAMC,cAAc,sMAAO,CAACA,WAAW;AACvC,MAAMC,YAAY,sMAAO,CAACA,SAAS;AACnC,MAAMC,YAAY,sMAAO,CAACA,SAAS;AACnC,MAAMC,WAAW,sMAAO,CAACA,QAAQ;AACjC,MAAMC,UAAU,sMAAO,CAACA,OAAO;AAC/B,MAAMC,UAAU,sMAAO,CAACA,OAAO;AAC/B,MAAMC,SAAS,sMAAO,CAACA,MAAM;AAC7B,MAAMC,SAAS,sMAAO,CAACA,MAAM;AAC7B,MAAMC,QAAQ,sMAAO,CAACA,KAAK;AAC3B,MAAMC,OAAO,sMAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,sMAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,sMAAO,CAACA,IAAI","ignoreList":[0]}}]
}
-1
View File
@@ -1 +0,0 @@
{"type": "commonjs"}
-1
View File
@@ -1 +0,0 @@
{"previewModeId":"9d3cdf6ac236161a86749c4bf39c3b96","previewModeSigningKey":"61361b2c54874ae756a6d5a022fb4155d75084adfce892918df9a6b3c533a896","previewModeEncryptionKey":"73208b7c131910e75d344ff7ea98d3d28de71f2613b7d063c6f31550f0d939af","expireAt":1786035096997}
-1
View File
@@ -1 +0,0 @@
{"encryption.key":"2jI+IYNtUDV/7mrRhb7odaXpvSnAoHqbaeBjBIZ+uKQ=","encryption.expire_at":1786035096993}
@@ -1,6 +0,0 @@
{
"buildStage": "static-generation",
"buildOptions": {
"useBuildWorker": "true"
}
}
-1
View File
@@ -1 +0,0 @@
{"name":"Next.js","version":"16.2.11"}
-1
View File
@@ -1 +0,0 @@
{"type": "commonjs"}
View File
Whitespace-only changes.
-145
View File
@@ -1,145 +0,0 @@
// Type definitions for Next.js cacheLife configs
declare module 'next/cache' {
export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache'
export {
updateTag,
revalidateTag,
revalidatePath,
refresh,
} from 'next/dist/server/web/spec-extension/revalidate'
export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store'
/**
* Cache this `"use cache"` for a timespan defined by the `"default"` profile.
* ```
* stale: 180 seconds (3 minutes)
* revalidate: 900 seconds (15 minutes)
* expire: never
* ```
*
* This cache may be stale on clients for 3 minutes before checking with the server.
* If the server receives a new request after 15 minutes, start revalidating new values in the background.
* It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
*/
export function cacheLife(profile: "default"): void
/**
* Cache this `"use cache"` for a timespan defined by the `"seconds"` profile.
* ```
* stale: 30 seconds
* revalidate: 1 seconds
* expire: 60 seconds (1 minute)
* ```
*
* This cache may be stale on clients for 30 seconds before checking with the server.
* If the server receives a new request after 1 seconds, start revalidating new values in the background.
* If this entry has no traffic for 1 minute it will expire. The next request will recompute it.
*/
export function cacheLife(profile: "seconds"): void
/**
* Cache this `"use cache"` for a timespan defined by the `"minutes"` profile.
* ```
* stale: 300 seconds (5 minutes)
* revalidate: 60 seconds (1 minute)
* expire: 3600 seconds (1 hour)
* ```
*
* This cache may be stale on clients for 5 minutes before checking with the server.
* If the server receives a new request after 1 minute, start revalidating new values in the background.
* If this entry has no traffic for 1 hour it will expire. The next request will recompute it.
*/
export function cacheLife(profile: "minutes"): void
/**
* Cache this `"use cache"` for a timespan defined by the `"hours"` profile.
* ```
* stale: 300 seconds (5 minutes)
* revalidate: 3600 seconds (1 hour)
* expire: 86400 seconds (1 day)
* ```
*
* This cache may be stale on clients for 5 minutes before checking with the server.
* If the server receives a new request after 1 hour, start revalidating new values in the background.
* If this entry has no traffic for 1 day it will expire. The next request will recompute it.
*/
export function cacheLife(profile: "hours"): void
/**
* Cache this `"use cache"` for a timespan defined by the `"days"` profile.
* ```
* stale: 300 seconds (5 minutes)
* revalidate: 86400 seconds (1 day)
* expire: 604800 seconds (1 week)
* ```
*
* This cache may be stale on clients for 5 minutes before checking with the server.
* If the server receives a new request after 1 day, start revalidating new values in the background.
* If this entry has no traffic for 1 week it will expire. The next request will recompute it.
*/
export function cacheLife(profile: "days"): void
/**
* Cache this `"use cache"` for a timespan defined by the `"weeks"` profile.
* ```
* stale: 300 seconds (5 minutes)
* revalidate: 604800 seconds (1 week)
* expire: 2592000 seconds (1 month)
* ```
*
* This cache may be stale on clients for 5 minutes before checking with the server.
* If the server receives a new request after 1 week, start revalidating new values in the background.
* If this entry has no traffic for 1 month it will expire. The next request will recompute it.
*/
export function cacheLife(profile: "weeks"): void
/**
* Cache this `"use cache"` for a timespan defined by the `"max"` profile.
* ```
* stale: 300 seconds (5 minutes)
* revalidate: 2592000 seconds (1 month)
* expire: 31536000 seconds (365 days)
* ```
*
* This cache may be stale on clients for 5 minutes before checking with the server.
* If the server receives a new request after 1 month, start revalidating new values in the background.
* If this entry has no traffic for 365 days it will expire. The next request will recompute it.
*/
export function cacheLife(profile: "max"): void
/**
* Cache this `"use cache"` using a custom timespan.
* ```
* stale: ... // seconds
* revalidate: ... // seconds
* expire: ... // seconds
* ```
*
* This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
*
* If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
*/
export function cacheLife(profile: {
/**
* This cache may be stale on clients for ... seconds before checking with the server.
*/
stale?: number,
/**
* If the server receives a new request after ... seconds, start revalidating new values in the background.
*/
revalidate?: number,
/**
* If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
*/
expire?: number
}): void
import { cacheTag } from 'next/dist/server/use-cache/cache-tag'
export { cacheTag }
export const unstable_cacheTag: typeof cacheTag
export const unstable_cacheLife: typeof cacheLife
}
-345
View File
@@ -1,345 +0,0 @@
// This file is generated automatically by Next.js
// Do not edit this file manually
type AppRoutes = "/" | "/admin" | "/admin/achievements" | "/admin/ads" | "/admin/ads/[id]" | "/admin/ads/new" | "/admin/alerts" | "/admin/analytics" | "/admin/analytics/activity" | "/admin/analytics/economy" | "/admin/applications" | "/admin/articles" | "/admin/articles/[id]" | "/admin/articles/new" | "/admin/badges" | "/admin/banners" | "/admin/bans" | "/admin/calendar" | "/admin/calendar/[id]" | "/admin/catalog" | "/admin/catalog/[id]" | "/admin/catalog/builder-club" | "/admin/catalog/builder-club/[id]" | "/admin/commandocentrum" | "/admin/devops" | "/admin/devops/errors" | "/admin/email-templates" | "/admin/emulator" | "/admin/events" | "/admin/events/[id]" | "/admin/events/create" | "/admin/events/types" | "/admin/favicon" | "/admin/guilds" | "/admin/guilds/[id]" | "/admin/help-questions" | "/admin/help-questions/[id]" | "/admin/help-questions/new" | "/admin/help-tickets" | "/admin/help-tickets/[id]" | "/admin/housekeeping" | "/admin/import" | "/admin/import/audit" | "/admin/import/badges" | "/admin/import/clone" | "/admin/import/clothing" | "/admin/import/effects" | "/admin/import/furni" | "/admin/import/furni/upload" | "/admin/import/pets" | "/admin/import/repair-icons" | "/admin/import/sync" | "/admin/ip" | "/admin/logs" | "/admin/logs/audit" | "/admin/logs/chat" | "/admin/logs/commands" | "/admin/logs/trades" | "/admin/maintenance" | "/admin/marketplace" | "/admin/media" | "/admin/moderation" | "/admin/moderation/actions" | "/admin/moderation/cfh" | "/admin/moderation/cfh/[id]" | "/admin/moderation/team" | "/admin/navigation" | "/admin/online" | "/admin/permissions" | "/admin/permissions/[id]" | "/admin/photos" | "/admin/polls" | "/admin/polls/[id]" | "/admin/polls/create" | "/admin/prefixes" | "/admin/radio" | "/admin/radio/api-keys" | "/admin/radio/autodj" | "/admin/radio/banners" | "/admin/radio/embed" | "/admin/radio/history" | "/admin/radio/moderation" | "/admin/radio/monitoring" | "/admin/radio/points" | "/admin/radio/ranks" | "/admin/radio/settings" | "/admin/rare-values" | "/admin/rooms" | "/admin/rooms/[id]" | "/admin/rooms/[id]/furni" | "/admin/rooms/edit/[id]" | "/admin/rooms/show/[id]" | "/admin/settings" | "/admin/shop" | "/admin/shop/[id]" | "/admin/shop/new" | "/admin/sounds" | "/admin/subscriptions" | "/admin/tags" | "/admin/teams" | "/admin/theme" | "/admin/tickets" | "/admin/tickets/[id]" | "/admin/tickets/templates" | "/admin/transactions" | "/admin/translations" | "/admin/translations/client" | "/admin/translations/cms" | "/admin/translations/emulator" | "/admin/users" | "/admin/users/[id]" | "/admin/users/[id]/edit" | "/admin/users/edit/[id]" | "/admin/users/multi-accounts" | "/admin/users/show/[id]" | "/admin/vouchers" | "/admin/vpn" | "/admin/wordfilter" | "/admin/writeable-boxes" | "/apply/staff" | "/apply/team" | "/badges" | "/banned" | "/client" | "/community" | "/developers" | "/draw-badge" | "/events" | "/events/[slugOrId]" | "/forgot" | "/friends" | "/guilds" | "/guilds/[id]" | "/guilds/[id]/forum" | "/guilds/[id]/forum/[threadId]" | "/guilds/[id]/forum/new" | "/help" | "/help/[category]" | "/help/tickets" | "/help/tickets/[id]" | "/leaderboard" | "/login" | "/logo" | "/maintenance" | "/marketplace" | "/me" | "/messages" | "/mod" | "/mod/actions" | "/mod/bans" | "/mod/cfh" | "/mod/cfh/[id]" | "/mod/team" | "/mod/tickets" | "/mod/tickets/[id]" | "/news" | "/news/[slug]" | "/photos" | "/polls" | "/polls/[id]" | "/radio" | "/radio/apply" | "/radio/contests" | "/radio/contests/[id]" | "/radio/giveaways" | "/radio/giveaways/[id]" | "/radio/leaderboard" | "/radio/requests" | "/radio/schedule" | "/radio/shouts" | "/rankings" | "/rares" | "/rares/[category]" | "/redeem" | "/register" | "/reset" | "/room/[id]" | "/settings" | "/settings/2fa" | "/settings/connections" | "/settings/sessions" | "/shop" | "/shop/topup" | "/staff" | "/u/[username]" | "/verify"
type AppRouteHandlerRoutes = "/api/admin/analytics/export" | "/api/admin/catalog/icons" | "/api/admin/catalog/images" | "/api/admin/catalog/items" | "/api/admin/catalog/suggest" | "/api/admin/catalog/tree" | "/api/admin/devops/health" | "/api/admin/furni/search" | "/api/admin/import/audit" | "/api/admin/import/badges" | "/api/admin/import/badges/edit" | "/api/admin/import/clone" | "/api/admin/import/clone/batch" | "/api/admin/import/clone/icon" | "/api/admin/import/clone/sync-all" | "/api/admin/import/clothing" | "/api/admin/import/clothing/batch" | "/api/admin/import/clothing/sets" | "/api/admin/import/clothing/sets/batch" | "/api/admin/import/effects" | "/api/admin/import/effects/batch" | "/api/admin/import/furni" | "/api/admin/import/furni/batch" | "/api/admin/import/furni/batch-regen" | "/api/admin/import/furni/nitro-editor" | "/api/admin/import/furni/repair-icons" | "/api/admin/import/furni/resync" | "/api/admin/import/furni/upload" | "/api/admin/import/pets" | "/api/admin/import/pets/batch" | "/api/admin/import/pets/icon" | "/api/admin/permissions/assignments" | "/api/admin/permissions/roles" | "/api/admin/prefixes" | "/api/admin/prefixes/blacklist" | "/api/admin/prefixes/settings" | "/api/admin/users/actions" | "/api/articles" | "/api/articles/[slug]" | "/api/articles/[slug]/comment" | "/api/auth/[...nextauth]" | "/api/badges/leaderboard" | "/api/guilds" | "/api/guilds/[id]" | "/api/health" | "/api/home" | "/api/imaging/avatar" | "/api/imaging/badge" | "/api/leaderboard" | "/api/me" | "/api/me/tokens" | "/api/media" | "/api/media/[...path]" | "/api/nitro-assets/bundled/furniture/[...path]" | "/api/online" | "/api/online/count" | "/api/paypal/capture" | "/api/paypal/create" | "/api/photos" | "/api/radio/auto-play" | "/api/radio/config" | "/api/radio/current-dj" | "/api/radio/embed-config" | "/api/radio/listeners" | "/api/radio/now-playing" | "/api/radio/points" | "/api/radio/points/leaderboard" | "/api/radio/shouts" | "/api/radio/stream" | "/api/settings" | "/api/shop" | "/api/shop/categories" | "/api/staff" | "/api/teams" | "/api/tickets" | "/api/tickets/[id]" | "/api/tickets/[id]/reply" | "/api/tokens" | "/api/users/[username]" | "/api/values" | "/api/values/[id]" | "/api/values/categories" | "/imaging"
type PageRoutes = never
type LayoutRoutes = "/" | "/admin" | "/admin/radio" | "/admin/translations" | "/mod" | "/radio"
type RedirectRoutes = never
type RewriteRoutes = never
type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes
interface ParamMap {
"/": {}
"/admin": {}
"/admin/achievements": {}
"/admin/ads": {}
"/admin/ads/[id]": { "id": string; }
"/admin/ads/new": {}
"/admin/alerts": {}
"/admin/analytics": {}
"/admin/analytics/activity": {}
"/admin/analytics/economy": {}
"/admin/applications": {}
"/admin/articles": {}
"/admin/articles/[id]": { "id": string; }
"/admin/articles/new": {}
"/admin/badges": {}
"/admin/banners": {}
"/admin/bans": {}
"/admin/calendar": {}
"/admin/calendar/[id]": { "id": string; }
"/admin/catalog": {}
"/admin/catalog/[id]": { "id": string; }
"/admin/catalog/builder-club": {}
"/admin/catalog/builder-club/[id]": { "id": string; }
"/admin/commandocentrum": {}
"/admin/devops": {}
"/admin/devops/errors": {}
"/admin/email-templates": {}
"/admin/emulator": {}
"/admin/events": {}
"/admin/events/[id]": { "id": string; }
"/admin/events/create": {}
"/admin/events/types": {}
"/admin/favicon": {}
"/admin/guilds": {}
"/admin/guilds/[id]": { "id": string; }
"/admin/help-questions": {}
"/admin/help-questions/[id]": { "id": string; }
"/admin/help-questions/new": {}
"/admin/help-tickets": {}
"/admin/help-tickets/[id]": { "id": string; }
"/admin/housekeeping": {}
"/admin/import": {}
"/admin/import/audit": {}
"/admin/import/badges": {}
"/admin/import/clone": {}
"/admin/import/clothing": {}
"/admin/import/effects": {}
"/admin/import/furni": {}
"/admin/import/furni/upload": {}
"/admin/import/pets": {}
"/admin/import/repair-icons": {}
"/admin/import/sync": {}
"/admin/ip": {}
"/admin/logs": {}
"/admin/logs/audit": {}
"/admin/logs/chat": {}
"/admin/logs/commands": {}
"/admin/logs/trades": {}
"/admin/maintenance": {}
"/admin/marketplace": {}
"/admin/media": {}
"/admin/moderation": {}
"/admin/moderation/actions": {}
"/admin/moderation/cfh": {}
"/admin/moderation/cfh/[id]": { "id": string; }
"/admin/moderation/team": {}
"/admin/navigation": {}
"/admin/online": {}
"/admin/permissions": {}
"/admin/permissions/[id]": { "id": string; }
"/admin/photos": {}
"/admin/polls": {}
"/admin/polls/[id]": { "id": string; }
"/admin/polls/create": {}
"/admin/prefixes": {}
"/admin/radio": {}
"/admin/radio/api-keys": {}
"/admin/radio/autodj": {}
"/admin/radio/banners": {}
"/admin/radio/embed": {}
"/admin/radio/history": {}
"/admin/radio/moderation": {}
"/admin/radio/monitoring": {}
"/admin/radio/points": {}
"/admin/radio/ranks": {}
"/admin/radio/settings": {}
"/admin/rare-values": {}
"/admin/rooms": {}
"/admin/rooms/[id]": { "id": string; }
"/admin/rooms/[id]/furni": { "id": string; }
"/admin/rooms/edit/[id]": { "id": string; }
"/admin/rooms/show/[id]": { "id": string; }
"/admin/settings": {}
"/admin/shop": {}
"/admin/shop/[id]": { "id": string; }
"/admin/shop/new": {}
"/admin/sounds": {}
"/admin/subscriptions": {}
"/admin/tags": {}
"/admin/teams": {}
"/admin/theme": {}
"/admin/tickets": {}
"/admin/tickets/[id]": { "id": string; }
"/admin/tickets/templates": {}
"/admin/transactions": {}
"/admin/translations": {}
"/admin/translations/client": {}
"/admin/translations/cms": {}
"/admin/translations/emulator": {}
"/admin/users": {}
"/admin/users/[id]": { "id": string; }
"/admin/users/[id]/edit": { "id": string; }
"/admin/users/edit/[id]": { "id": string; }
"/admin/users/multi-accounts": {}
"/admin/users/show/[id]": { "id": string; }
"/admin/vouchers": {}
"/admin/vpn": {}
"/admin/wordfilter": {}
"/admin/writeable-boxes": {}
"/api/admin/analytics/export": {}
"/api/admin/catalog/icons": {}
"/api/admin/catalog/images": {}
"/api/admin/catalog/items": {}
"/api/admin/catalog/suggest": {}
"/api/admin/catalog/tree": {}
"/api/admin/devops/health": {}
"/api/admin/furni/search": {}
"/api/admin/import/audit": {}
"/api/admin/import/badges": {}
"/api/admin/import/badges/edit": {}
"/api/admin/import/clone": {}
"/api/admin/import/clone/batch": {}
"/api/admin/import/clone/icon": {}
"/api/admin/import/clone/sync-all": {}
"/api/admin/import/clothing": {}
"/api/admin/import/clothing/batch": {}
"/api/admin/import/clothing/sets": {}
"/api/admin/import/clothing/sets/batch": {}
"/api/admin/import/effects": {}
"/api/admin/import/effects/batch": {}
"/api/admin/import/furni": {}
"/api/admin/import/furni/batch": {}
"/api/admin/import/furni/batch-regen": {}
"/api/admin/import/furni/nitro-editor": {}
"/api/admin/import/furni/repair-icons": {}
"/api/admin/import/furni/resync": {}
"/api/admin/import/furni/upload": {}
"/api/admin/import/pets": {}
"/api/admin/import/pets/batch": {}
"/api/admin/import/pets/icon": {}
"/api/admin/permissions/assignments": {}
"/api/admin/permissions/roles": {}
"/api/admin/prefixes": {}
"/api/admin/prefixes/blacklist": {}
"/api/admin/prefixes/settings": {}
"/api/admin/users/actions": {}
"/api/articles": {}
"/api/articles/[slug]": { "slug": string; }
"/api/articles/[slug]/comment": { "slug": string; }
"/api/auth/[...nextauth]": { "nextauth": string[]; }
"/api/badges/leaderboard": {}
"/api/guilds": {}
"/api/guilds/[id]": { "id": string; }
"/api/health": {}
"/api/home": {}
"/api/imaging/avatar": {}
"/api/imaging/badge": {}
"/api/leaderboard": {}
"/api/me": {}
"/api/me/tokens": {}
"/api/media": {}
"/api/media/[...path]": { "path": string[]; }
"/api/nitro-assets/bundled/furniture/[...path]": { "path": string[]; }
"/api/online": {}
"/api/online/count": {}
"/api/paypal/capture": {}
"/api/paypal/create": {}
"/api/photos": {}
"/api/radio/auto-play": {}
"/api/radio/config": {}
"/api/radio/current-dj": {}
"/api/radio/embed-config": {}
"/api/radio/listeners": {}
"/api/radio/now-playing": {}
"/api/radio/points": {}
"/api/radio/points/leaderboard": {}
"/api/radio/shouts": {}
"/api/radio/stream": {}
"/api/settings": {}
"/api/shop": {}
"/api/shop/categories": {}
"/api/staff": {}
"/api/teams": {}
"/api/tickets": {}
"/api/tickets/[id]": { "id": string; }
"/api/tickets/[id]/reply": { "id": string; }
"/api/tokens": {}
"/api/users/[username]": { "username": string; }
"/api/values": {}
"/api/values/[id]": { "id": string; }
"/api/values/categories": {}
"/apply/staff": {}
"/apply/team": {}
"/badges": {}
"/banned": {}
"/client": {}
"/community": {}
"/developers": {}
"/draw-badge": {}
"/events": {}
"/events/[slugOrId]": { "slugOrId": string; }
"/forgot": {}
"/friends": {}
"/guilds": {}
"/guilds/[id]": { "id": string; }
"/guilds/[id]/forum": { "id": string; }
"/guilds/[id]/forum/[threadId]": { "id": string; "threadId": string; }
"/guilds/[id]/forum/new": { "id": string; }
"/help": {}
"/help/[category]": { "category": string; }
"/help/tickets": {}
"/help/tickets/[id]": { "id": string; }
"/imaging": {}
"/leaderboard": {}
"/login": {}
"/logo": {}
"/maintenance": {}
"/marketplace": {}
"/me": {}
"/messages": {}
"/mod": {}
"/mod/actions": {}
"/mod/bans": {}
"/mod/cfh": {}
"/mod/cfh/[id]": { "id": string; }
"/mod/team": {}
"/mod/tickets": {}
"/mod/tickets/[id]": { "id": string; }
"/news": {}
"/news/[slug]": { "slug": string; }
"/photos": {}
"/polls": {}
"/polls/[id]": { "id": string; }
"/radio": {}
"/radio/apply": {}
"/radio/contests": {}
"/radio/contests/[id]": { "id": string; }
"/radio/giveaways": {}
"/radio/giveaways/[id]": { "id": string; }
"/radio/leaderboard": {}
"/radio/requests": {}
"/radio/schedule": {}
"/radio/shouts": {}
"/rankings": {}
"/rares": {}
"/rares/[category]": { "category": string; }
"/redeem": {}
"/register": {}
"/reset": {}
"/room/[id]": { "id": string; }
"/settings": {}
"/settings/2fa": {}
"/settings/connections": {}
"/settings/sessions": {}
"/shop": {}
"/shop/topup": {}
"/staff": {}
"/u/[username]": { "username": string; }
"/verify": {}
}
export type ParamsOf<Route extends Routes> = ParamMap[Route]
interface LayoutSlotMap {
"/": never
"/admin": never
"/admin/radio": never
"/admin/translations": never
"/mod": never
"/radio": never
}
export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap, AppRouteHandlerRoutes }
declare global {
/**
* Props for Next.js App Router page components
* @example
* ```tsx
* export default function Page(props: PageProps<'/blog/[slug]'>) {
* const { slug } = await props.params
* return <div>Blog post: {slug}</div>
* }
* ```
*/
interface PageProps<AppRoute extends AppRoutes> {
params: Promise<ParamMap[AppRoute]>
searchParams: Promise<Record<string, string | string[] | undefined>>
}
/**
* Props for Next.js App Router layout components
* @example
* ```tsx
* export default function Layout(props: LayoutProps<'/dashboard'>) {
* return <div>{props.children}</div>
* }
* ```
*/
type LayoutProps<LayoutRoute extends LayoutRoutes> = {
params: Promise<ParamMap[LayoutRoute]>
children: React.ReactNode
} & {
[K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
}
/**
* Context for Next.js App Router route handlers
* @example
* ```tsx
* export async function GET(request: NextRequest, context: RouteContext<'/api/users/[id]'>) {
* const { id } = await context.params
* return Response.json({ id })
* }
* ```
*/
interface RouteContext<AppRouteHandlerRoute extends AppRouteHandlerRoutes> {
params: Promise<ParamMap[AppRouteHandlerRoute]>
}
}
File diff suppressed because it is too large. Load diff
+10 -2
View File
@@ -33,17 +33,25 @@ describe("hashPassword (default driver: bcrypt)", () => {
});
describe("hashPassword (PASSWORD_HASH=argon2id)", () => {
it("hashes with the AtomCMS params (m=65536,t=4,p=1) and round-trips", async () => {
it("hashes with the AtomCMS params and round-trips", async () => {
const prev = process.env.PASSWORD_HASH;
const prevMem = process.env.ARGON2_MEMORY_SIZE;
const prevIters = process.env.ARGON2_ITERATIONS;
process.env.PASSWORD_HASH = "argon2id";
process.env.ARGON2_MEMORY_SIZE = "1024";
process.env.ARGON2_ITERATIONS = "1";
try {
const h = await hashPassword("s3cret!");
expect(h).toMatch(/^\$argon2id\$v=19\$m=65536,t=4,p=1\$/);
expect(h).toMatch(/^\$argon2id\$v=19\$m=1024,t=1,p=1\$/);
expect(await verifyPassword("s3cret!", h)).toBe(true);
expect(await verifyPassword("wrong", h)).toBe(false);
} finally {
if (prev === undefined) delete process.env.PASSWORD_HASH;
else process.env.PASSWORD_HASH = prev;
if (prevMem === undefined) delete process.env.ARGON2_MEMORY_SIZE;
else process.env.ARGON2_MEMORY_SIZE = prevMem;
if (prevIters === undefined) delete process.env.ARGON2_ITERATIONS;
else process.env.ARGON2_ITERATIONS = prevIters;
}
});
});
+3 -3
View File
@@ -6,9 +6,9 @@ import { argon2id, argon2Verify, md5 } from "hash-wasm";
// threads=1; bcrypt rounds=12 as the legacy fallback. The game emulator
// validates the SAME users.password hash, so these must match.
const ARGON2_PARAMS = {
parallelism: 1,
iterations: 4,
memorySize: 65536, // KiB
parallelism: Number(process.env.ARGON2_PARALLELISM) || 1,
iterations: Number(process.env.ARGON2_ITERATIONS) || 4,
memorySize: Number(process.env.ARGON2_MEMORY_SIZE) || 65536, // KiB
hashLength: 32,
} as const;
const BCRYPT_ROUNDS = 12;