@manifest-network/manifest-agent-core 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/close-lease.d.ts.map +1 -1
- package/dist/close-lease.js +15 -3
- package/dist/close-lease.js.map +1 -1
- package/dist/deploy-app.d.ts +2 -2
- package/dist/deploy-app.d.ts.map +1 -1
- package/dist/deploy-app.js +84 -37
- package/dist/deploy-app.js.map +1 -1
- package/dist/deploy-app.test-d.d.ts +1 -0
- package/dist/deploy-app.test-d.js +11 -0
- package/dist/deploy-app.test-d.js.map +1 -0
- package/dist/guarded-fetch.d.ts +2 -0
- package/dist/guarded-fetch.js +2 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/internals/cancellation.d.ts +57 -0
- package/dist/internals/cancellation.d.ts.map +1 -0
- package/dist/internals/cancellation.js +79 -0
- package/dist/internals/cancellation.js.map +1 -0
- package/dist/internals/inspect-image.js +1 -1
- package/dist/internals/inspect-image.js.map +1 -1
- package/dist/internals/render-intent-recap.d.ts +13 -11
- package/dist/internals/render-intent-recap.d.ts.map +1 -1
- package/dist/internals/render-intent-recap.js +5 -4
- package/dist/internals/render-intent-recap.js.map +1 -1
- package/dist/internals/spec-normalize.d.ts +34 -28
- package/dist/internals/spec-normalize.d.ts.map +1 -1
- package/dist/internals/spec-normalize.js +28 -22
- package/dist/internals/spec-normalize.js.map +1 -1
- package/dist/manage-domain.d.ts.map +1 -1
- package/dist/manage-domain.js +34 -8
- package/dist/manage-domain.js.map +1 -1
- package/dist/node_modules/@vitest/pretty-format/dist/index.js +888 -0
- package/dist/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
- package/dist/node_modules/@vitest/runner/dist/chunk-artifact.js +1500 -0
- package/dist/node_modules/@vitest/runner/dist/chunk-artifact.js.map +1 -0
- package/dist/node_modules/@vitest/runner/dist/index.js +1 -0
- package/dist/node_modules/@vitest/runner/dist/utils.js +1 -0
- package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +82 -0
- package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/display.js +558 -0
- package/dist/node_modules/@vitest/utils/dist/display.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/helpers.js +68 -0
- package/dist/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/source-map.js +95 -0
- package/dist/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/timers.js +20 -0
- package/dist/node_modules/@vitest/utils/dist/timers.js.map +1 -0
- package/dist/node_modules/tinyrainbow/dist/index.js +86 -0
- package/dist/node_modules/tinyrainbow/dist/index.js.map +1 -0
- package/dist/node_modules/vite/dist/node/module-runner.js +22 -0
- package/dist/node_modules/vite/dist/node/module-runner.js.map +1 -0
- package/dist/node_modules/vitest/dist/index.js +6 -0
- package/dist/troubleshoot.d.ts.map +1 -1
- package/dist/troubleshoot.js +11 -1
- package/dist/troubleshoot.js.map +1 -1
- package/dist/types.d.ts +30 -51
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -7
- package/dist/internals/build-fred-input.d.ts +0 -46
- package/dist/internals/build-fred-input.d.ts.map +0 -1
- package/dist/internals/build-fred-input.js +0 -160
- package/dist/internals/build-fred-input.js.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region ../../node_modules/@vitest/utils/dist/helpers.js
|
|
2
|
+
function assertTypes(value, name, types) {
|
|
3
|
+
const receivedType = typeof value;
|
|
4
|
+
if (!types.includes(receivedType)) throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
|
|
5
|
+
}
|
|
6
|
+
function filterOutComments(s) {
|
|
7
|
+
const result = [];
|
|
8
|
+
let commentState = "none";
|
|
9
|
+
for (let i = 0; i < s.length; ++i) if (commentState === "singleline") {
|
|
10
|
+
if (s[i] === "\n") commentState = "none";
|
|
11
|
+
} else if (commentState === "multiline") {
|
|
12
|
+
if (s[i - 1] === "*" && s[i] === "/") commentState = "none";
|
|
13
|
+
} else if (commentState === "none") if (s[i] === "/" && s[i + 1] === "/") commentState = "singleline";
|
|
14
|
+
else if (s[i] === "/" && s[i + 1] === "*") {
|
|
15
|
+
commentState = "multiline";
|
|
16
|
+
i += 2;
|
|
17
|
+
} else result.push(s[i]);
|
|
18
|
+
return result.join("");
|
|
19
|
+
}
|
|
20
|
+
function toArray(array) {
|
|
21
|
+
if (array === null || array === void 0) array = [];
|
|
22
|
+
if (Array.isArray(array)) return array;
|
|
23
|
+
return [array];
|
|
24
|
+
}
|
|
25
|
+
function isObject(item) {
|
|
26
|
+
return item != null && typeof item === "object" && !Array.isArray(item);
|
|
27
|
+
}
|
|
28
|
+
function objectAttr(source, path, defaultValue = void 0) {
|
|
29
|
+
const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
30
|
+
let result = source;
|
|
31
|
+
for (const p of paths) {
|
|
32
|
+
result = new Object(result)[p];
|
|
33
|
+
if (result === void 0) return defaultValue;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function createDefer() {
|
|
38
|
+
let resolve = null;
|
|
39
|
+
let reject = null;
|
|
40
|
+
const p = new Promise((_resolve, _reject) => {
|
|
41
|
+
resolve = _resolve;
|
|
42
|
+
reject = _reject;
|
|
43
|
+
});
|
|
44
|
+
p.resolve = resolve;
|
|
45
|
+
p.reject = reject;
|
|
46
|
+
return p;
|
|
47
|
+
}
|
|
48
|
+
function isNegativeNaN(val) {
|
|
49
|
+
if (!Number.isNaN(val)) return false;
|
|
50
|
+
const f64 = new Float64Array(1);
|
|
51
|
+
f64[0] = val;
|
|
52
|
+
return new Uint32Array(f64.buffer)[1] >>> 31 === 1;
|
|
53
|
+
}
|
|
54
|
+
function ordinal(i) {
|
|
55
|
+
const j = i % 10;
|
|
56
|
+
const k = i % 100;
|
|
57
|
+
if (j === 1 && k !== 11) return `${i}st`;
|
|
58
|
+
if (j === 2 && k !== 12) return `${i}nd`;
|
|
59
|
+
if (j === 3 && k !== 13) return `${i}rd`;
|
|
60
|
+
return `${i}th`;
|
|
61
|
+
}
|
|
62
|
+
function unique(array) {
|
|
63
|
+
return Array.from(new Set(array));
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { assertTypes, createDefer, filterOutComments, isNegativeNaN, isObject, objectAttr, ordinal, toArray, unique };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../../../../../../../node_modules/@vitest/utils/dist/helpers.js"],"sourcesContent":["import { VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER } from './constants.js';\n\n// port from nanoid\n// https://github.com/ai/nanoid\nconst urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\nfunction nanoid(size = 21) {\n\tlet id = \"\";\n\tlet i = size;\n\twhile (i--) {\n\t\tid += urlAlphabet[Math.random() * 64 | 0];\n\t}\n\treturn id;\n}\n\nconst RealDate = Date;\nfunction random(seed) {\n\tconst x = Math.sin(seed++) * 1e4;\n\treturn x - Math.floor(x);\n}\nfunction shuffle(array, seed = RealDate.now()) {\n\tlet length = array.length;\n\twhile (length) {\n\t\tconst index = Math.floor(random(seed) * length--);\n\t\tconst previous = array[length];\n\t\tarray[length] = array[index];\n\t\tarray[index] = previous;\n\t\t++seed;\n\t}\n\treturn array;\n}\n\n/**\n* Get original stacktrace without source map support the most performant way.\n* - Create only 1 stack frame.\n* - Rewrite prepareStackTrace to bypass \"support-stack-trace\" (usually takes ~250ms).\n*/\nfunction createSimpleStackTrace(options) {\n\tconst { message = \"$$stack trace error\", stackTraceLimit = 1 } = options || {};\n\tconst limit = Error.stackTraceLimit;\n\tconst prepareStackTrace = Error.prepareStackTrace;\n\tError.stackTraceLimit = stackTraceLimit;\n\tError.prepareStackTrace = (e) => e.stack;\n\tconst err = new Error(message);\n\tconst stackTrace = err.stack || \"\";\n\tError.prepareStackTrace = prepareStackTrace;\n\tError.stackTraceLimit = limit;\n\treturn stackTrace;\n}\nfunction notNullish(v) {\n\treturn v != null;\n}\nfunction assertTypes(value, name, types) {\n\tconst receivedType = typeof value;\n\tconst pass = types.includes(receivedType);\n\tif (!pass) {\n\t\tthrow new TypeError(`${name} value must be ${types.join(\" or \")}, received \"${receivedType}\"`);\n\t}\n}\nfunction isPrimitive(value) {\n\treturn value === null || typeof value !== \"function\" && typeof value !== \"object\";\n}\nfunction slash(path) {\n\treturn path.replace(/\\\\/g, \"/\");\n}\nconst postfixRE = /[?#].*$/;\nfunction cleanUrl(url) {\n\treturn url.replace(postfixRE, \"\");\n}\nfunction splitFileAndPostfix(path) {\n\tconst file = cleanUrl(path);\n\treturn {\n\t\tfile,\n\t\tpostfix: path.slice(file.length)\n\t};\n}\nconst externalRE = /^(?:[a-z]+:)?\\/\\//;\nconst isExternalUrl = (url) => externalRE.test(url);\n/**\n* Prepend `/@id/` and replace null byte so the id is URL-safe.\n* This is prepended to resolved ids that are not valid browser\n* import specifiers by the importAnalysis plugin.\n*/\nfunction wrapId(id) {\n\treturn id.startsWith(VALID_ID_PREFIX) ? id : VALID_ID_PREFIX + id.replace(\"\\0\", NULL_BYTE_PLACEHOLDER);\n}\n/**\n* Undo {@link wrapId}'s `/@id/` and null byte replacements.\n*/\nfunction unwrapId(id) {\n\treturn id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, \"\\0\") : id;\n}\nfunction withTrailingSlash(path) {\n\tif (path.at(-1) !== \"/\") {\n\t\treturn `${path}/`;\n\t}\n\treturn path;\n}\nfunction filterOutComments(s) {\n\tconst result = [];\n\tlet commentState = \"none\";\n\tfor (let i = 0; i < s.length; ++i) {\n\t\tif (commentState === \"singleline\") {\n\t\t\tif (s[i] === \"\\n\") {\n\t\t\t\tcommentState = \"none\";\n\t\t\t}\n\t\t} else if (commentState === \"multiline\") {\n\t\t\tif (s[i - 1] === \"*\" && s[i] === \"/\") {\n\t\t\t\tcommentState = \"none\";\n\t\t\t}\n\t\t} else if (commentState === \"none\") {\n\t\t\tif (s[i] === \"/\" && s[i + 1] === \"/\") {\n\t\t\t\tcommentState = \"singleline\";\n\t\t\t} else if (s[i] === \"/\" && s[i + 1] === \"*\") {\n\t\t\t\tcommentState = \"multiline\";\n\t\t\t\ti += 2;\n\t\t\t} else {\n\t\t\t\tresult.push(s[i]);\n\t\t\t}\n\t\t}\n\t}\n\treturn result.join(\"\");\n}\nconst bareImportRE = /^(?![a-z]:)[\\w@](?!.*:\\/\\/)/i;\nfunction isBareImport(id) {\n\treturn bareImportRE.test(id);\n}\nfunction toArray(array) {\n\tif (array === null || array === undefined) {\n\t\tarray = [];\n\t}\n\tif (Array.isArray(array)) {\n\t\treturn array;\n\t}\n\treturn [array];\n}\nfunction isObject(item) {\n\treturn item != null && typeof item === \"object\" && !Array.isArray(item);\n}\nfunction isFinalObj(obj) {\n\treturn obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;\n}\nfunction getType(value) {\n\treturn Object.prototype.toString.apply(value).slice(8, -1);\n}\nfunction collectOwnProperties(obj, collector) {\n\tconst collect = typeof collector === \"function\" ? collector : (key) => collector.add(key);\n\tObject.getOwnPropertyNames(obj).forEach(collect);\n\tObject.getOwnPropertySymbols(obj).forEach(collect);\n}\nfunction getOwnProperties(obj) {\n\tconst ownProps = new Set();\n\tif (isFinalObj(obj)) {\n\t\treturn [];\n\t}\n\tcollectOwnProperties(obj, ownProps);\n\treturn Array.from(ownProps);\n}\nconst defaultCloneOptions = { forceWritable: false };\nfunction deepClone(val, options = defaultCloneOptions) {\n\tconst seen = new WeakMap();\n\treturn clone(val, seen, options);\n}\nfunction clone(val, seen, options = defaultCloneOptions) {\n\tlet k, out;\n\tif (seen.has(val)) {\n\t\treturn seen.get(val);\n\t}\n\tif (Array.isArray(val)) {\n\t\tout = Array.from({ length: k = val.length });\n\t\tseen.set(val, out);\n\t\twhile (k--) {\n\t\t\tout[k] = clone(val[k], seen, options);\n\t\t}\n\t\treturn out;\n\t}\n\tif (Object.prototype.toString.call(val) === \"[object Object]\") {\n\t\tout = Object.create(Object.getPrototypeOf(val));\n\t\tseen.set(val, out);\n\t\t// we don't need properties from prototype\n\t\tconst props = getOwnProperties(val);\n\t\tfor (const k of props) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(val, k);\n\t\t\tif (!descriptor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst cloned = clone(val[k], seen, options);\n\t\t\tif (options.forceWritable) {\n\t\t\t\tObject.defineProperty(out, k, {\n\t\t\t\t\tenumerable: descriptor.enumerable,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: cloned\n\t\t\t\t});\n\t\t\t} else if (\"get\" in descriptor) {\n\t\t\t\tObject.defineProperty(out, k, {\n\t\t\t\t\t...descriptor,\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn cloned;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tObject.defineProperty(out, k, {\n\t\t\t\t\t...descriptor,\n\t\t\t\t\tvalue: cloned\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\treturn val;\n}\nfunction noop() {}\nfunction objectAttr(source, path, defaultValue = undefined) {\n\t// a[3].b -> a.3.b\n\tconst paths = path.replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\");\n\tlet result = source;\n\tfor (const p of paths) {\n\t\tresult = new Object(result)[p];\n\t\tif (result === undefined) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\treturn result;\n}\nfunction createDefer() {\n\tlet resolve = null;\n\tlet reject = null;\n\tconst p = new Promise((_resolve, _reject) => {\n\t\tresolve = _resolve;\n\t\treject = _reject;\n\t});\n\tp.resolve = resolve;\n\tp.reject = reject;\n\treturn p;\n}\n/**\n* If code starts with a function call, will return its last index, respecting arguments.\n* This will return 25 - last ending character of toMatch \")\"\n* Also works with callbacks\n* ```\n* toMatch({ test: '123' });\n* toBeAliased('123')\n* ```\n*/\nfunction getCallLastIndex(code) {\n\tlet charIndex = -1;\n\tlet inString = null;\n\tlet startedBracers = 0;\n\tlet endedBracers = 0;\n\tlet beforeChar = null;\n\twhile (charIndex <= code.length) {\n\t\tbeforeChar = code[charIndex];\n\t\tcharIndex++;\n\t\tconst char = code[charIndex];\n\t\tconst isCharString = char === \"\\\"\" || char === \"'\" || char === \"`\";\n\t\tif (isCharString && beforeChar !== \"\\\\\") {\n\t\t\tif (inString === char) {\n\t\t\t\tinString = null;\n\t\t\t} else if (!inString) {\n\t\t\t\tinString = char;\n\t\t\t}\n\t\t}\n\t\tif (!inString) {\n\t\t\tif (char === \"(\") {\n\t\t\t\tstartedBracers++;\n\t\t\t}\n\t\t\tif (char === \")\") {\n\t\t\t\tendedBracers++;\n\t\t\t}\n\t\t}\n\t\tif (startedBracers && endedBracers && startedBracers === endedBracers) {\n\t\t\treturn charIndex;\n\t\t}\n\t}\n\treturn null;\n}\nfunction isNegativeNaN(val) {\n\tif (!Number.isNaN(val)) {\n\t\treturn false;\n\t}\n\tconst f64 = new Float64Array(1);\n\tf64[0] = val;\n\tconst u32 = new Uint32Array(f64.buffer);\n\tconst isNegative = u32[1] >>> 31 === 1;\n\treturn isNegative;\n}\nfunction toString(v) {\n\treturn Object.prototype.toString.call(v);\n}\nfunction isPlainObject(val) {\n\treturn toString(val) === \"[object Object]\" && (!val.constructor || val.constructor.name === \"Object\");\n}\nfunction isMergeableObject(item) {\n\treturn isPlainObject(item) && !Array.isArray(item);\n}\nfunction ordinal(i) {\n\tconst j = i % 10;\n\tconst k = i % 100;\n\tif (j === 1 && k !== 11) {\n\t\treturn `${i}st`;\n\t}\n\tif (j === 2 && k !== 12) {\n\t\treturn `${i}nd`;\n\t}\n\tif (j === 3 && k !== 13) {\n\t\treturn `${i}rd`;\n\t}\n\treturn `${i}th`;\n}\n/**\n* Deep merge :P\n*\n* Will merge objects only if they are plain\n*\n* Do not merge types - it is very expensive and usually it's better to case a type here\n*/\nfunction deepMerge(target, ...sources) {\n\tif (!sources.length) {\n\t\treturn target;\n\t}\n\tconst source = sources.shift();\n\tif (source === undefined) {\n\t\treturn target;\n\t}\n\tif (isMergeableObject(target) && isMergeableObject(source)) {\n\t\tObject.keys(source).forEach((key) => {\n\t\t\tconst _source = source;\n\t\t\tif (isMergeableObject(_source[key])) {\n\t\t\t\tif (!target[key]) {\n\t\t\t\t\ttarget[key] = {};\n\t\t\t\t}\n\t\t\t\tdeepMerge(target[key], _source[key]);\n\t\t\t} else {\n\t\t\t\ttarget[key] = _source[key];\n\t\t\t}\n\t\t});\n\t}\n\treturn deepMerge(target, ...sources);\n}\nfunction unique(array) {\n\treturn Array.from(new Set(array));\n}\n\nexport { assertTypes, cleanUrl, clone, createDefer, createSimpleStackTrace, deepClone, deepMerge, filterOutComments, getCallLastIndex, getOwnProperties, getType, isBareImport, isExternalUrl, isNegativeNaN, isObject, isPrimitive, nanoid, noop, notNullish, objectAttr, ordinal, shuffle, slash, splitFileAndPostfix, toArray, unique, unwrapId, withTrailingSlash, wrapId };\n"],"x_google_ignoreList":[0],"mappings":";AAmDA,SAAS,YAAY,OAAO,MAAM,OAAO;CACxC,MAAM,eAAe,OAAO;CAE5B,IAAI,CADS,MAAM,SAAS,YACpB,GACP,MAAM,IAAI,UAAU,GAAG,KAAK,iBAAiB,MAAM,KAAK,MAAM,EAAE,cAAc,aAAa,EAAE;AAE/F;AAwCA,SAAS,kBAAkB,GAAG;CAC7B,MAAM,SAAS,CAAC;CAChB,IAAI,eAAe;CACnB,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,GAC/B,IAAI,iBAAiB;MAChB,EAAE,OAAO,MACZ,eAAe;CAAA,OAEV,IAAI,iBAAiB;MACvB,EAAE,IAAI,OAAO,OAAO,EAAE,OAAO,KAChC,eAAe;CAAA,OAEV,IAAI,iBAAiB,QAC3B,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,OAAO,KAChC,eAAe;MACT,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,OAAO,KAAK;EAC5C,eAAe;EACf,KAAK;CACN,OACC,OAAO,KAAK,EAAE,EAAE;CAInB,OAAO,OAAO,KAAK,EAAE;AACtB;AAKA,SAAS,QAAQ,OAAO;CACvB,IAAI,UAAU,QAAQ,UAAU,KAAA,GAC/B,QAAQ,CAAC;CAEV,IAAI,MAAM,QAAQ,KAAK,GACtB,OAAO;CAER,OAAO,CAAC,KAAK;AACd;AACA,SAAS,SAAS,MAAM;CACvB,OAAO,QAAQ,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI;AACvE;AA2EA,SAAS,WAAW,QAAQ,MAAM,eAAe,KAAA,GAAW;CAE3D,MAAM,QAAQ,KAAK,QAAQ,cAAc,KAAK,EAAE,MAAM,GAAG;CACzD,IAAI,SAAS;CACb,KAAK,MAAM,KAAK,OAAO;EACtB,SAAS,IAAI,OAAO,MAAM,EAAE;EAC5B,IAAI,WAAW,KAAA,GACd,OAAO;CAET;CACA,OAAO;AACR;AACA,SAAS,cAAc;CACtB,IAAI,UAAU;CACd,IAAI,SAAS;CACb,MAAM,IAAI,IAAI,SAAS,UAAU,YAAY;EAC5C,UAAU;EACV,SAAS;CACV,CAAC;CACD,EAAE,UAAU;CACZ,EAAE,SAAS;CACX,OAAO;AACR;AA0CA,SAAS,cAAc,KAAK;CAC3B,IAAI,CAAC,OAAO,MAAM,GAAG,GACpB,OAAO;CAER,MAAM,MAAM,IAAI,aAAa,CAAC;CAC9B,IAAI,KAAK;CAGT,OADmB,IADH,YAAY,IAAI,MACX,EAAE,OAAO,OAAO;AAEtC;AAUA,SAAS,QAAQ,GAAG;CACnB,MAAM,IAAI,IAAI;CACd,MAAM,IAAI,IAAI;CACd,IAAI,MAAM,KAAK,MAAM,IACpB,OAAO,GAAG,EAAE;CAEb,IAAI,MAAM,KAAK,MAAM,IACpB,OAAO,GAAG,EAAE;CAEb,IAAI,MAAM,KAAK,MAAM,IACpB,OAAO,GAAG,EAAE;CAEb,OAAO,GAAG,EAAE;AACb;AA+BA,SAAS,OAAO,OAAO;CACtB,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC;AACjC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { resolve } from "./chunk-pathe.M-eThtNZ.js";
|
|
2
|
+
",".charCodeAt(0);
|
|
3
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4
|
+
var intToChar = new Uint8Array(64);
|
|
5
|
+
var charToInt = new Uint8Array(128);
|
|
6
|
+
for (let i = 0; i < chars.length; i++) {
|
|
7
|
+
const c = chars.charCodeAt(i);
|
|
8
|
+
intToChar[i] = c;
|
|
9
|
+
charToInt[c] = i;
|
|
10
|
+
}
|
|
11
|
+
const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
|
|
12
|
+
const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
|
|
13
|
+
const NOW_LENGTH = Date.now().toString().length;
|
|
14
|
+
const REGEXP_VITEST = new RegExp(`vitest=\\d{${NOW_LENGTH}}`);
|
|
15
|
+
function extractLocation(urlLike) {
|
|
16
|
+
if (!urlLike.includes(":")) return [urlLike];
|
|
17
|
+
const parts = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(urlLike.replace(/^\(|\)$/g, ""));
|
|
18
|
+
if (!parts) return [urlLike];
|
|
19
|
+
let url = parts[1];
|
|
20
|
+
if (url.startsWith("async ")) url = url.slice(6);
|
|
21
|
+
if (url.startsWith("http:") || url.startsWith("https:")) {
|
|
22
|
+
const urlObj = new URL(url);
|
|
23
|
+
urlObj.searchParams.delete("import");
|
|
24
|
+
urlObj.searchParams.delete("browserv");
|
|
25
|
+
url = urlObj.pathname + urlObj.hash + urlObj.search;
|
|
26
|
+
}
|
|
27
|
+
if (url.startsWith("/@fs/")) {
|
|
28
|
+
const isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
|
|
29
|
+
url = url.slice(isWindows ? 5 : 4);
|
|
30
|
+
}
|
|
31
|
+
if (url.includes("vitest=")) url = url.replace(REGEXP_VITEST, "").replace(/[?&]$/, "");
|
|
32
|
+
return [
|
|
33
|
+
url,
|
|
34
|
+
parts[2] || void 0,
|
|
35
|
+
parts[3] || void 0
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
function parseSingleFFOrSafariStack(raw) {
|
|
39
|
+
let line = raw.trim();
|
|
40
|
+
if (SAFARI_NATIVE_CODE_REGEXP.test(line)) return null;
|
|
41
|
+
if (line.includes(" > eval")) line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
|
|
42
|
+
if (!line.includes("@")) return null;
|
|
43
|
+
let atIndex = -1;
|
|
44
|
+
let locationPart = "";
|
|
45
|
+
let functionName;
|
|
46
|
+
for (let i = 0; i < line.length; i++) if (line[i] === "@") {
|
|
47
|
+
const candidateLocation = line.slice(i + 1);
|
|
48
|
+
if (candidateLocation.includes(":") && candidateLocation.length >= 3) {
|
|
49
|
+
atIndex = i;
|
|
50
|
+
locationPart = candidateLocation;
|
|
51
|
+
functionName = i > 0 ? line.slice(0, i) : void 0;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (atIndex === -1 || !locationPart.includes(":") || locationPart.length < 3) return null;
|
|
56
|
+
const [url, lineNumber, columnNumber] = extractLocation(locationPart);
|
|
57
|
+
if (!url || !lineNumber || !columnNumber) return null;
|
|
58
|
+
return {
|
|
59
|
+
file: url,
|
|
60
|
+
method: functionName || "",
|
|
61
|
+
line: Number.parseInt(lineNumber),
|
|
62
|
+
column: Number.parseInt(columnNumber)
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function parseSingleStack(raw) {
|
|
66
|
+
const line = raw.trim();
|
|
67
|
+
if (!CHROME_IE_STACK_REGEXP.test(line)) return parseSingleFFOrSafariStack(line);
|
|
68
|
+
return parseSingleV8Stack(line);
|
|
69
|
+
}
|
|
70
|
+
function parseSingleV8Stack(raw) {
|
|
71
|
+
let line = raw.trim();
|
|
72
|
+
if (!CHROME_IE_STACK_REGEXP.test(line)) return null;
|
|
73
|
+
if (line.includes("(eval ")) line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
|
|
74
|
+
let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
|
|
75
|
+
const location = sanitizedLine.match(/ (\(.+\)$)/);
|
|
76
|
+
sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
|
|
77
|
+
const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);
|
|
78
|
+
let method = location && sanitizedLine || "";
|
|
79
|
+
let file = url && ["eval", "<anonymous>"].includes(url) ? void 0 : url;
|
|
80
|
+
if (!file || !lineNumber || !columnNumber) return null;
|
|
81
|
+
if (method.startsWith("async ")) method = method.slice(6);
|
|
82
|
+
if (file.startsWith("file://")) file = file.slice(7);
|
|
83
|
+
file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
|
|
84
|
+
if (method) method = method.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g, "$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
|
|
85
|
+
return {
|
|
86
|
+
method,
|
|
87
|
+
file,
|
|
88
|
+
line: Number.parseInt(lineNumber),
|
|
89
|
+
column: Number.parseInt(columnNumber)
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { parseSingleStack };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=source-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-map.js","names":[],"sources":["../../../../../../../node_modules/@vitest/utils/dist/source-map.js"],"sourcesContent":["import { isPrimitive, notNullish } from './helpers.js';\nimport { r as resolve } from './chunk-pathe.M-eThtNZ.js';\nimport './constants.js';\n\n// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\n\n// src/trace-mapping.ts\n\n// src/sourcemap-segment.ts\nvar COLUMN = 0;\nvar SOURCES_INDEX = 1;\nvar SOURCE_LINE = 2;\nvar SOURCE_COLUMN = 3;\nvar NAMES_INDEX = 4;\n\n// src/binary-search.ts\nvar found = false;\nfunction binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + (high - low >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\nfunction lowerBound(haystack, needle, index) {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n const { lastKey, lastNeedle, lastIndex } = state;\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n if (needle >= lastNeedle) {\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n return state.lastIndex = binarySearch(haystack, needle, low, high);\n}\n\n// src/trace-mapping.ts\nvar LINE_GTR_ZERO = \"`line` must be greater than 0 (lines start at line 1)\";\nvar COL_GTR_EQ_ZERO = \"`column` must be greater than or equal to 0 (columns start at column 0)\";\nvar LEAST_UPPER_BOUND = -1;\nvar GREATEST_LOWER_BOUND = 1;\nfunction cast(map) {\n return map;\n}\nfunction decodedMappings(map) {\n var _a;\n return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));\n}\nfunction originalPositionFor(map, needle) {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n const decoded = decodedMappings(map);\n if (line >= decoded.length) return OMapping(null, null, null, null);\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND\n );\n if (index === -1) return OMapping(null, null, null, null);\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null\n );\n}\nfunction OMapping(source, line, column, name) {\n return { source, line, column, name };\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (found) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\n\nconst CHROME_IE_STACK_REGEXP = /^\\s*at .*(?:\\S:\\d+|\\(native\\))/m;\nconst SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\\[native code\\])?$/;\nconst stackIgnorePatterns = [\n\t\"node:internal\",\n\t/\\/packages\\/\\w+\\/dist\\//,\n\t/\\/@vitest\\/\\w+\\/dist\\//,\n\t\"/vitest/dist/\",\n\t\"/vitest/src/\",\n\t\"/node_modules/chai/\",\n\t\"/node_modules/tinyspy/\",\n\t\"/vite/dist/node/module-runner\",\n\t\"/rolldown-vite/dist/node/module-runner\",\n\t\"/deps/chunk-\",\n\t\"/deps/@vitest\",\n\t\"/deps/loupe\",\n\t\"/deps/chai\",\n\t\"/browser-playwright/dist/locators.js\",\n\t\"/browser-webdriverio/dist/locators.js\",\n\t\"/browser-preview/dist/locators.js\",\n\t/node:\\w+/,\n\t/__vitest_test__/,\n\t/__vitest_browser__/,\n\t\"/@id/__x00__vitest/browser\",\n\t/\\/deps\\/vitest_/\n];\nconst NOW_LENGTH = Date.now().toString().length;\nconst REGEXP_VITEST = new RegExp(`vitest=\\\\d{${NOW_LENGTH}}`);\nfunction extractLocation(urlLike) {\n\t// Fail-fast but return locations like \"(native)\"\n\tif (!urlLike.includes(\":\")) {\n\t\treturn [urlLike];\n\t}\n\tconst regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n\tconst parts = regExp.exec(urlLike.replace(/^\\(|\\)$/g, \"\"));\n\tif (!parts) {\n\t\treturn [urlLike];\n\t}\n\tlet url = parts[1];\n\tif (url.startsWith(\"async \")) {\n\t\turl = url.slice(6);\n\t}\n\tif (url.startsWith(\"http:\") || url.startsWith(\"https:\")) {\n\t\tconst urlObj = new URL(url);\n\t\turlObj.searchParams.delete(\"import\");\n\t\turlObj.searchParams.delete(\"browserv\");\n\t\turl = urlObj.pathname + urlObj.hash + urlObj.search;\n\t}\n\tif (url.startsWith(\"/@fs/\")) {\n\t\tconst isWindows = /^\\/@fs\\/[a-zA-Z]:\\//.test(url);\n\t\turl = url.slice(isWindows ? 5 : 4);\n\t}\n\tif (url.includes(\"vitest=\")) {\n\t\turl = url.replace(REGEXP_VITEST, \"\").replace(/[?&]$/, \"\");\n\t}\n\treturn [\n\t\turl,\n\t\tparts[2] || undefined,\n\t\tparts[3] || undefined\n\t];\n}\nfunction parseSingleFFOrSafariStack(raw) {\n\tlet line = raw.trim();\n\tif (SAFARI_NATIVE_CODE_REGEXP.test(line)) {\n\t\treturn null;\n\t}\n\tif (line.includes(\" > eval\")) {\n\t\tline = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, \":$1\");\n\t}\n\t// Early return for lines that don't look like Firefox/Safari stack traces\n\t// Firefox/Safari stack traces must contain '@' and should have location info after it\n\tif (!line.includes(\"@\")) {\n\t\treturn null;\n\t}\n\t// Find the correct @ that separates function name from location\n\t// For cases like '@https://@fs/path' or 'functionName@https://@fs/path'\n\t// we need to find the first @ that precedes a valid location (containing :)\n\tlet atIndex = -1;\n\tlet locationPart = \"\";\n\tlet functionName;\n\t// Try each @ from left to right to find the one that gives us a valid location\n\tfor (let i = 0; i < line.length; i++) {\n\t\tif (line[i] === \"@\") {\n\t\t\tconst candidateLocation = line.slice(i + 1);\n\t\t\t// Minimum length 3 for valid location: 1 for filename + 1 for colon + 1 for line number (e.g., \"a:1\")\n\t\t\tif (candidateLocation.includes(\":\") && candidateLocation.length >= 3) {\n\t\t\t\tatIndex = i;\n\t\t\t\tlocationPart = candidateLocation;\n\t\t\t\tfunctionName = i > 0 ? line.slice(0, i) : undefined;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// Validate we found a valid location with minimum length (filename:line format)\n\tif (atIndex === -1 || !locationPart.includes(\":\") || locationPart.length < 3) {\n\t\treturn null;\n\t}\n\tconst [url, lineNumber, columnNumber] = extractLocation(locationPart);\n\tif (!url || !lineNumber || !columnNumber) {\n\t\treturn null;\n\t}\n\treturn {\n\t\tfile: url,\n\t\tmethod: functionName || \"\",\n\t\tline: Number.parseInt(lineNumber),\n\t\tcolumn: Number.parseInt(columnNumber)\n\t};\n}\nfunction parseSingleStack(raw) {\n\tconst line = raw.trim();\n\tif (!CHROME_IE_STACK_REGEXP.test(line)) {\n\t\treturn parseSingleFFOrSafariStack(line);\n\t}\n\treturn parseSingleV8Stack(line);\n}\n// Based on https://github.com/stacktracejs/error-stack-parser\n// Credit to stacktracejs\nfunction parseSingleV8Stack(raw) {\n\tlet line = raw.trim();\n\tif (!CHROME_IE_STACK_REGEXP.test(line)) {\n\t\treturn null;\n\t}\n\tif (line.includes(\"(eval \")) {\n\t\tline = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^()]*)|(,.*$)/g, \"\");\n\t}\n\tlet sanitizedLine = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").replace(/^.*?\\s+/, \"\");\n\t// capture and preserve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n\t// case it has spaces in it, as the string is split on \\s+ later on\n\tconst location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\t// remove the parenthesized location from the line, if it was matched\n\tsanitizedLine = location ? sanitizedLine.replace(location[0], \"\") : sanitizedLine;\n\t// if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n\t// because this line doesn't have function name\n\tconst [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);\n\tlet method = location && sanitizedLine || \"\";\n\tlet file = url && [\"eval\", \"<anonymous>\"].includes(url) ? undefined : url;\n\tif (!file || !lineNumber || !columnNumber) {\n\t\treturn null;\n\t}\n\tif (method.startsWith(\"async \")) {\n\t\tmethod = method.slice(6);\n\t}\n\tif (file.startsWith(\"file://\")) {\n\t\tfile = file.slice(7);\n\t}\n\t// normalize Windows path (\\ -> /)\n\tfile = file.startsWith(\"node:\") || file.startsWith(\"internal:\") ? file : resolve(file);\n\tif (method) {\n\t\tmethod = method.replace(/\\(0\\s?,\\s?__vite_ssr_import_\\d+__.(\\w+)\\)/g, \"$1\").replace(/__(vite_ssr_import|vi_import)_\\d+__\\./g, \"\").replace(/(Object\\.)?__vite_ssr_export_default__\\s?/g, \"\");\n\t}\n\treturn {\n\t\tmethod,\n\t\tfile,\n\t\tline: Number.parseInt(lineNumber),\n\t\tcolumn: Number.parseInt(columnNumber)\n\t};\n}\nfunction createStackString(stacks) {\n\treturn stacks.map((stack) => {\n\t\tconst line = `${stack.file}:${stack.line}:${stack.column}`;\n\t\tif (stack.method) {\n\t\t\treturn ` at ${stack.method}(${line})`;\n\t\t}\n\t\treturn ` at ${line}`;\n\t}).join(\"\\n\");\n}\nfunction parseStacktrace(stack, options = {}) {\n\tconst { ignoreStackEntries = stackIgnorePatterns } = options;\n\tlet stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);\n\t// remove vi.defineHelper's internal stacks\n\tconst helperIndex = stacks.findLastIndex((s) => s.method.includes(\"__VITEST_HELPER__\"));\n\tif (helperIndex >= 0) {\n\t\tstacks = stacks.slice(helperIndex + 1);\n\t}\n\treturn stacks.map((stack) => {\n\t\tif (options.getUrlId) {\n\t\t\tstack.file = options.getUrlId(stack.file);\n\t\t}\n\t\tconst map = options.getSourceMap?.(stack.file);\n\t\tif (!map || typeof map !== \"object\" || !map.version) {\n\t\t\treturn shouldFilter(ignoreStackEntries, stack.file) ? null : stack;\n\t\t}\n\t\tconst traceMap = new DecodedMap(map, stack.file);\n\t\tconst position = getOriginalPosition(traceMap, stack);\n\t\tif (!position) {\n\t\t\treturn stack;\n\t\t}\n\t\tconst { line, column, source, name } = position;\n\t\tlet file = source || stack.file;\n\t\tif (file.match(/\\/\\w:\\//)) {\n\t\t\tfile = file.slice(1);\n\t\t}\n\t\tif (shouldFilter(ignoreStackEntries, file)) {\n\t\t\treturn null;\n\t\t}\n\t\tif (line != null && column != null) {\n\t\t\treturn {\n\t\t\t\tline,\n\t\t\t\tcolumn,\n\t\t\t\tfile,\n\t\t\t\tmethod: name || stack.method\n\t\t\t};\n\t\t}\n\t\treturn stack;\n\t}).filter((s) => s != null);\n}\nfunction shouldFilter(ignoreStackEntries, file) {\n\treturn ignoreStackEntries.some((p) => file.match(p));\n}\nfunction parseFFOrSafariStackTrace(stack) {\n\treturn stack.split(\"\\n\").map((line) => parseSingleFFOrSafariStack(line)).filter(notNullish);\n}\nfunction parseV8Stacktrace(stack) {\n\treturn stack.split(\"\\n\").map((line) => parseSingleV8Stack(line)).filter(notNullish);\n}\nfunction parseErrorStacktrace(e, options = {}) {\n\tif (!e || isPrimitive(e)) {\n\t\treturn [];\n\t}\n\tif (\"stacks\" in e && e.stacks) {\n\t\treturn e.stacks;\n\t}\n\tconst stackStr = e.stack || \"\";\n\t// if \"stack\" property was overwritten at runtime to be something else,\n\t// ignore the value because we don't know how to process it\n\tlet stackFrames = typeof stackStr === \"string\" ? parseStacktrace(stackStr, options) : [];\n\tif (!stackFrames.length) {\n\t\tconst e_ = e;\n\t\tif (e_.fileName != null && e_.lineNumber != null && e_.columnNumber != null) {\n\t\t\tstackFrames = parseStacktrace(`${e_.fileName}:${e_.lineNumber}:${e_.columnNumber}`, options);\n\t\t}\n\t\tif (e_.sourceURL != null && e_.line != null && e_._column != null) {\n\t\t\tstackFrames = parseStacktrace(`${e_.sourceURL}:${e_.line}:${e_.column}`, options);\n\t\t}\n\t}\n\tif (options.frameFilter) {\n\t\tstackFrames = stackFrames.filter((f) => options.frameFilter(e, f) !== false);\n\t}\n\te.stacks = stackFrames;\n\treturn stackFrames;\n}\nclass DecodedMap {\n\t_encoded;\n\t_decoded;\n\t_decodedMemo;\n\turl;\n\tversion;\n\tnames = [];\n\tresolvedSources;\n\tconstructor(map, from) {\n\t\tthis.map = map;\n\t\tconst { mappings, names, sources } = map;\n\t\tthis.version = map.version;\n\t\tthis.names = names || [];\n\t\tthis._encoded = mappings || \"\";\n\t\tthis._decodedMemo = memoizedState();\n\t\tthis.url = from;\n\t\tthis.resolvedSources = (sources || []).map((s) => resolve(from, \"..\", s || \"\"));\n\t}\n}\nfunction memoizedState() {\n\treturn {\n\t\tlastKey: -1,\n\t\tlastNeedle: -1,\n\t\tlastIndex: -1\n\t};\n}\nfunction getOriginalPosition(map, needle) {\n\tconst result = originalPositionFor(map, needle);\n\tif (result.column == null) {\n\t\treturn null;\n\t}\n\treturn result;\n}\n\nexport { DecodedMap, createStackString, stackIgnorePatterns as defaultStackIgnorePatterns, getOriginalPosition, parseErrorStacktrace, parseSingleFFOrSafariStack, parseSingleStack, parseSingleV8Stack, parseStacktrace };\n"],"x_google_ignoreList":[0],"mappings":";AAKY,IAAI,WAAW,CAAC;AAC5B,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,CAAC;CAC5B,UAAU,KAAK;CACf,UAAU,KAAK;AACjB;AAwMA,MAAM,yBAAyB;AAC/B,MAAM,4BAA4B;AAwBlC,MAAM,aAAa,KAAK,IAAI,EAAE,SAAS,EAAE;AACzC,MAAM,gBAAgB,IAAI,OAAO,cAAc,WAAW,EAAE;AAC5D,SAAS,gBAAgB,SAAS;CAEjC,IAAI,CAAC,QAAQ,SAAS,GAAG,GACxB,OAAO,CAAC,OAAO;CAGhB,MAAM,QAAQ,+BAAO,KAAK,QAAQ,QAAQ,YAAY,EAAE,CAAC;CACzD,IAAI,CAAC,OACJ,OAAO,CAAC,OAAO;CAEhB,IAAI,MAAM,MAAM;CAChB,IAAI,IAAI,WAAW,QAAQ,GAC1B,MAAM,IAAI,MAAM,CAAC;CAElB,IAAI,IAAI,WAAW,OAAO,KAAK,IAAI,WAAW,QAAQ,GAAG;EACxD,MAAM,SAAS,IAAI,IAAI,GAAG;EAC1B,OAAO,aAAa,OAAO,QAAQ;EACnC,OAAO,aAAa,OAAO,UAAU;EACrC,MAAM,OAAO,WAAW,OAAO,OAAO,OAAO;CAC9C;CACA,IAAI,IAAI,WAAW,OAAO,GAAG;EAC5B,MAAM,YAAY,sBAAsB,KAAK,GAAG;EAChD,MAAM,IAAI,MAAM,YAAY,IAAI,CAAC;CAClC;CACA,IAAI,IAAI,SAAS,SAAS,GACzB,MAAM,IAAI,QAAQ,eAAe,EAAE,EAAE,QAAQ,SAAS,EAAE;CAEzD,OAAO;EACN;EACA,MAAM,MAAM,KAAA;EACZ,MAAM,MAAM,KAAA;CACb;AACD;AACA,SAAS,2BAA2B,KAAK;CACxC,IAAI,OAAO,IAAI,KAAK;CACpB,IAAI,0BAA0B,KAAK,IAAI,GACtC,OAAO;CAER,IAAI,KAAK,SAAS,SAAS,GAC1B,OAAO,KAAK,QAAQ,oDAAoD,KAAK;CAI9E,IAAI,CAAC,KAAK,SAAS,GAAG,GACrB,OAAO;CAKR,IAAI,UAAU;CACd,IAAI,eAAe;CACnB,IAAI;CAEJ,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAChC,IAAI,KAAK,OAAO,KAAK;EACpB,MAAM,oBAAoB,KAAK,MAAM,IAAI,CAAC;EAE1C,IAAI,kBAAkB,SAAS,GAAG,KAAK,kBAAkB,UAAU,GAAG;GACrE,UAAU;GACV,eAAe;GACf,eAAe,IAAI,IAAI,KAAK,MAAM,GAAG,CAAC,IAAI,KAAA;GAC1C;EACD;CACD;CAGD,IAAI,YAAY,MAAM,CAAC,aAAa,SAAS,GAAG,KAAK,aAAa,SAAS,GAC1E,OAAO;CAER,MAAM,CAAC,KAAK,YAAY,gBAAgB,gBAAgB,YAAY;CACpE,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,cAC3B,OAAO;CAER,OAAO;EACN,MAAM;EACN,QAAQ,gBAAgB;EACxB,MAAM,OAAO,SAAS,UAAU;EAChC,QAAQ,OAAO,SAAS,YAAY;CACrC;AACD;AACA,SAAS,iBAAiB,KAAK;CAC9B,MAAM,OAAO,IAAI,KAAK;CACtB,IAAI,CAAC,uBAAuB,KAAK,IAAI,GACpC,OAAO,2BAA2B,IAAI;CAEvC,OAAO,mBAAmB,IAAI;AAC/B;AAGA,SAAS,mBAAmB,KAAK;CAChC,IAAI,OAAO,IAAI,KAAK;CACpB,IAAI,CAAC,uBAAuB,KAAK,IAAI,GACpC,OAAO;CAER,IAAI,KAAK,SAAS,QAAQ,GACzB,OAAO,KAAK,QAAQ,cAAc,MAAM,EAAE,QAAQ,8BAA8B,EAAE;CAEnF,IAAI,gBAAgB,KAAK,QAAQ,QAAQ,EAAE,EAAE,QAAQ,gBAAgB,GAAG,EAAE,QAAQ,WAAW,EAAE;CAG/F,MAAM,WAAW,cAAc,MAAM,YAAY;CAEjD,gBAAgB,WAAW,cAAc,QAAQ,SAAS,IAAI,EAAE,IAAI;CAGpE,MAAM,CAAC,KAAK,YAAY,gBAAgB,gBAAgB,WAAW,SAAS,KAAK,aAAa;CAC9F,IAAI,SAAS,YAAY,iBAAiB;CAC1C,IAAI,OAAO,OAAO,CAAC,QAAQ,aAAa,EAAE,SAAS,GAAG,IAAI,KAAA,IAAY;CACtE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,cAC5B,OAAO;CAER,IAAI,OAAO,WAAW,QAAQ,GAC7B,SAAS,OAAO,MAAM,CAAC;CAExB,IAAI,KAAK,WAAW,SAAS,GAC5B,OAAO,KAAK,MAAM,CAAC;CAGpB,OAAO,KAAK,WAAW,OAAO,KAAK,KAAK,WAAW,WAAW,IAAI,OAAO,QAAQ,IAAI;CACrF,IAAI,QACH,SAAS,OAAO,QAAQ,8CAA8C,IAAI,EAAE,QAAQ,0CAA0C,EAAE,EAAE,QAAQ,8CAA8C,EAAE;CAE3L,OAAO;EACN;EACA;EACA,MAAM,OAAO,SAAS,UAAU;EAChC,QAAQ,OAAO,SAAS,YAAY;CACrC;AACD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region ../../node_modules/@vitest/utils/dist/timers.js
|
|
2
|
+
const SAFE_TIMERS_SYMBOL = Symbol("vitest:SAFE_TIMERS");
|
|
3
|
+
function getSafeTimers() {
|
|
4
|
+
const { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
|
|
5
|
+
const { nextTick: safeNextTick } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis.process || {};
|
|
6
|
+
return {
|
|
7
|
+
nextTick: safeNextTick,
|
|
8
|
+
setTimeout: safeSetTimeout,
|
|
9
|
+
setInterval: safeSetInterval,
|
|
10
|
+
clearInterval: safeClearInterval,
|
|
11
|
+
clearTimeout: safeClearTimeout,
|
|
12
|
+
setImmediate: safeSetImmediate,
|
|
13
|
+
clearImmediate: safeClearImmediate,
|
|
14
|
+
queueMicrotask: safeQueueMicrotask
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getSafeTimers };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=timers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timers.js","names":[],"sources":["../../../../../../../node_modules/@vitest/utils/dist/timers.js"],"sourcesContent":["const SAFE_TIMERS_SYMBOL = Symbol(\"vitest:SAFE_TIMERS\");\nfunction getSafeTimers() {\n\tconst { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;\n\tconst { nextTick: safeNextTick } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis.process || {};\n\treturn {\n\t\tnextTick: safeNextTick,\n\t\tsetTimeout: safeSetTimeout,\n\t\tsetInterval: safeSetInterval,\n\t\tclearInterval: safeClearInterval,\n\t\tclearTimeout: safeClearTimeout,\n\t\tsetImmediate: safeSetImmediate,\n\t\tclearImmediate: safeClearImmediate,\n\t\tqueueMicrotask: safeQueueMicrotask\n\t};\n}\nfunction setSafeTimers() {\n\tconst { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis;\n\tconst { nextTick: safeNextTick } = globalThis.process || {};\n\tconst timers = {\n\t\tnextTick: safeNextTick,\n\t\tsetTimeout: safeSetTimeout,\n\t\tsetInterval: safeSetInterval,\n\t\tclearInterval: safeClearInterval,\n\t\tclearTimeout: safeClearTimeout,\n\t\tsetImmediate: safeSetImmediate,\n\t\tclearImmediate: safeClearImmediate,\n\t\tqueueMicrotask: safeQueueMicrotask\n\t};\n\tglobalThis[SAFE_TIMERS_SYMBOL] = timers;\n}\n/**\n* Returns a promise that resolves after the specified duration.\n*\n* @param timeout - Delay in milliseconds\n* @param scheduler - Timer function to use, defaults to `setTimeout`. Useful for mocked timers.\n*\n* @example\n* await delay(100)\n*\n* @example\n* // With mocked timers\n* const { setTimeout } = getSafeTimers()\n* await delay(100, setTimeout)\n*/\nfunction delay(timeout, scheduler = setTimeout) {\n\treturn new Promise((resolve) => scheduler(resolve, timeout));\n}\n\nexport { delay, getSafeTimers, setSafeTimers };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAM,qBAAqB,OAAO,oBAAoB;AACtD,SAAS,gBAAgB;CACxB,MAAM,EAAE,YAAY,gBAAgB,aAAa,iBAAiB,eAAe,mBAAmB,cAAc,kBAAkB,cAAc,kBAAkB,gBAAgB,oBAAoB,gBAAgB,uBAAuB,WAAW,uBAAuB;CACjR,MAAM,EAAE,UAAU,iBAAiB,WAAW,uBAAuB,WAAW,WAAW,CAAC;CAC5F,OAAO;EACN,UAAU;EACV,YAAY;EACZ,aAAa;EACb,eAAe;EACf,cAAc;EACd,cAAc;EACd,gBAAgB;EAChB,gBAAgB;CACjB;AACD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//#region ../../node_modules/tinyrainbow/dist/index.js
|
|
2
|
+
var b = {
|
|
3
|
+
reset: [0, 0],
|
|
4
|
+
bold: [
|
|
5
|
+
1,
|
|
6
|
+
22,
|
|
7
|
+
"\x1B[22m\x1B[1m"
|
|
8
|
+
],
|
|
9
|
+
dim: [
|
|
10
|
+
2,
|
|
11
|
+
22,
|
|
12
|
+
"\x1B[22m\x1B[2m"
|
|
13
|
+
],
|
|
14
|
+
italic: [3, 23],
|
|
15
|
+
underline: [4, 24],
|
|
16
|
+
inverse: [7, 27],
|
|
17
|
+
hidden: [8, 28],
|
|
18
|
+
strikethrough: [9, 29],
|
|
19
|
+
black: [30, 39],
|
|
20
|
+
red: [31, 39],
|
|
21
|
+
green: [32, 39],
|
|
22
|
+
yellow: [33, 39],
|
|
23
|
+
blue: [34, 39],
|
|
24
|
+
magenta: [35, 39],
|
|
25
|
+
cyan: [36, 39],
|
|
26
|
+
white: [37, 39],
|
|
27
|
+
gray: [90, 39],
|
|
28
|
+
bgBlack: [40, 49],
|
|
29
|
+
bgRed: [41, 49],
|
|
30
|
+
bgGreen: [42, 49],
|
|
31
|
+
bgYellow: [43, 49],
|
|
32
|
+
bgBlue: [44, 49],
|
|
33
|
+
bgMagenta: [45, 49],
|
|
34
|
+
bgCyan: [46, 49],
|
|
35
|
+
bgWhite: [47, 49],
|
|
36
|
+
blackBright: [90, 39],
|
|
37
|
+
redBright: [91, 39],
|
|
38
|
+
greenBright: [92, 39],
|
|
39
|
+
yellowBright: [93, 39],
|
|
40
|
+
blueBright: [94, 39],
|
|
41
|
+
magentaBright: [95, 39],
|
|
42
|
+
cyanBright: [96, 39],
|
|
43
|
+
whiteBright: [97, 39],
|
|
44
|
+
bgBlackBright: [100, 49],
|
|
45
|
+
bgRedBright: [101, 49],
|
|
46
|
+
bgGreenBright: [102, 49],
|
|
47
|
+
bgYellowBright: [103, 49],
|
|
48
|
+
bgBlueBright: [104, 49],
|
|
49
|
+
bgMagentaBright: [105, 49],
|
|
50
|
+
bgCyanBright: [106, 49],
|
|
51
|
+
bgWhiteBright: [107, 49]
|
|
52
|
+
};
|
|
53
|
+
function i(e) {
|
|
54
|
+
return String(e);
|
|
55
|
+
}
|
|
56
|
+
i.open = "";
|
|
57
|
+
i.close = "";
|
|
58
|
+
function B() {
|
|
59
|
+
let e = typeof process != "undefined" ? process : void 0, r = (e == null ? void 0 : e.env) || {}, a = r.FORCE_TTY !== "false", l = (e == null ? void 0 : e.argv) || [];
|
|
60
|
+
return !("NO_COLOR" in r || l.includes("--no-color")) && ("FORCE_COLOR" in r || l.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || a && r.TERM !== "dumb" || "CI" in r) || typeof window != "undefined" && !!window.chrome;
|
|
61
|
+
}
|
|
62
|
+
function C({ force: e } = {}) {
|
|
63
|
+
let r = e || B(), a = (t, o, u, n) => {
|
|
64
|
+
let g = "", s = 0;
|
|
65
|
+
do
|
|
66
|
+
g += t.substring(s, n) + u, s = n + o.length, n = t.indexOf(o, s);
|
|
67
|
+
while (~n);
|
|
68
|
+
return g + t.substring(s);
|
|
69
|
+
}, l = (t, o, u = t) => {
|
|
70
|
+
let n = (g) => {
|
|
71
|
+
let s = String(g), h = s.indexOf(o, t.length);
|
|
72
|
+
return ~h ? t + a(s, o, u, h) + o : t + s + o;
|
|
73
|
+
};
|
|
74
|
+
return n.open = t, n.close = o, n;
|
|
75
|
+
}, c = { isColorSupported: r }, f = (t) => `\x1B[${t}m`;
|
|
76
|
+
for (let t in b) {
|
|
77
|
+
let o = b[t];
|
|
78
|
+
c[t] = r ? l(f(o[0]), f(o[1]), o[2]) : i;
|
|
79
|
+
}
|
|
80
|
+
return c;
|
|
81
|
+
}
|
|
82
|
+
var y = C();
|
|
83
|
+
//#endregion
|
|
84
|
+
export { y };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../node_modules/tinyrainbow/dist/index.js"],"sourcesContent":["// src/index.ts\nvar b = {\n reset: [0, 0],\n bold: [1, 22, \"\\x1B[22m\\x1B[1m\"],\n dim: [2, 22, \"\\x1B[22m\\x1B[2m\"],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n blackBright: [90, 39],\n redBright: [91, 39],\n greenBright: [92, 39],\n yellowBright: [93, 39],\n blueBright: [94, 39],\n magentaBright: [95, 39],\n cyanBright: [96, 39],\n whiteBright: [97, 39],\n bgBlackBright: [100, 49],\n bgRedBright: [101, 49],\n bgGreenBright: [102, 49],\n bgYellowBright: [103, 49],\n bgBlueBright: [104, 49],\n bgMagentaBright: [105, 49],\n bgCyanBright: [106, 49],\n bgWhiteBright: [107, 49]\n};\nfunction i(e) {\n return String(e);\n}\ni.open = \"\";\ni.close = \"\";\nfunction p() {\n let e = {\n isColorSupported: !1,\n reset: i\n };\n for (let r in b)\n e[r] = i;\n return e;\n}\nfunction B() {\n let e = typeof process != \"undefined\" ? process : void 0, r = (e == null ? void 0 : e.env) || {}, a = r.FORCE_TTY !== \"false\", l = (e == null ? void 0 : e.argv) || [];\n return !(\"NO_COLOR\" in r || l.includes(\"--no-color\")) && (\"FORCE_COLOR\" in r || l.includes(\"--color\") || (e == null ? void 0 : e.platform) === \"win32\" || a && r.TERM !== \"dumb\" || \"CI\" in r) || typeof window != \"undefined\" && !!window.chrome;\n}\nfunction C({ force: e } = {}) {\n let r = e || B(), a = (t, o, u, n) => {\n let g = \"\", s = 0;\n do\n g += t.substring(s, n) + u, s = n + o.length, n = t.indexOf(o, s);\n while (~n);\n return g + t.substring(s);\n }, l = (t, o, u = t) => {\n let n = (g) => {\n let s = String(g), h = s.indexOf(o, t.length);\n return ~h ? t + a(s, o, u, h) + o : t + s + o;\n };\n return n.open = t, n.close = o, n;\n }, c = {\n isColorSupported: r\n }, f = (t) => `\\x1B[${t}m`;\n for (let t in b) {\n let o = b[t];\n c[t] = r ? l(\n f(o[0]),\n f(o[1]),\n o[2]\n ) : i;\n }\n return c;\n}\nvar d = C();\nfunction m() {\n Object.assign(d, p());\n}\nfunction w() {\n Object.assign(d, C({ force: !0 }));\n}\nvar y = d;\nexport {\n C as createColors,\n y as default,\n m as disableDefaultColors,\n w as enabledDefaultColors,\n p as getDefaultColors,\n B as isSupported\n};\n"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region ../../node_modules/vite/dist/node/module-runner.js
|
|
2
|
+
let SOURCEMAPPING_URL = "sourceMa";
|
|
3
|
+
SOURCEMAPPING_URL += "ppingURL";
|
|
4
|
+
typeof process < "u" && process.platform;
|
|
5
|
+
(async function() {}).constructor;
|
|
6
|
+
new TextDecoder();
|
|
7
|
+
typeof Buffer == "function" && Buffer.from;
|
|
8
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
|
|
9
|
+
for (let i = 0; i < chars.length; i++) {
|
|
10
|
+
let c = chars.charCodeAt(i);
|
|
11
|
+
intToChar[i] = c, charToInt[c] = i;
|
|
12
|
+
}
|
|
13
|
+
RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);
|
|
14
|
+
Error.prepareStackTrace;
|
|
15
|
+
const customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/";
|
|
16
|
+
`${JSON.stringify(customizationHookNamespace)}${JSON.stringify(customizationHookNamespace)}`;
|
|
17
|
+
new Proxy({}, { get(_, p) {
|
|
18
|
+
throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`);
|
|
19
|
+
} });
|
|
20
|
+
//#endregion
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=module-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-runner.js","names":[],"sources":["../../../../../../../node_modules/vite/dist/node/module-runner.js"],"sourcesContent":["let SOURCEMAPPING_URL = \"sourceMa\";\nSOURCEMAPPING_URL += \"ppingURL\";\n//#endregion\n//#region src/shared/utils.ts\nconst isWindows = typeof process < \"u\" && process.platform === \"win32\";\n/**\n* Undo {@link wrapId}'s `/@id/` and null byte replacements.\n*/\nfunction unwrapId(id) {\n\treturn id.startsWith(\"/@id/\") ? id.slice(5).replace(\"__x00__\", \"\\0\") : id;\n}\nconst windowsSlashRE = /\\\\/g;\nfunction slash(p) {\n\treturn p.replace(windowsSlashRE, \"/\");\n}\nconst postfixRE = /[?#].*$/;\nfunction cleanUrl(url) {\n\treturn url.replace(postfixRE, \"\");\n}\nfunction isPrimitive(value) {\n\treturn !value || typeof value != \"object\" && typeof value != \"function\";\n}\nconst AsyncFunction = async function() {}.constructor;\nlet asyncFunctionDeclarationPaddingLineCount;\nfunction getAsyncFunctionDeclarationPaddingLineCount() {\n\tif (asyncFunctionDeclarationPaddingLineCount === void 0) {\n\t\tlet body = \"/*code*/\", source = new AsyncFunction(\"a\", \"b\", body).toString();\n\t\tasyncFunctionDeclarationPaddingLineCount = source.slice(0, source.indexOf(body)).split(\"\\n\").length - 1;\n\t}\n\treturn asyncFunctionDeclarationPaddingLineCount;\n}\nfunction promiseWithResolvers() {\n\tlet resolve, reject;\n\treturn {\n\t\tpromise: new Promise((_resolve, _reject) => {\n\t\t\tresolve = _resolve, reject = _reject;\n\t\t}),\n\t\tresolve,\n\t\treject\n\t};\n}\n//#endregion\n//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n\treturn input && input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nfunction cwd() {\n\treturn typeof process < \"u\" && typeof process.cwd == \"function\" ? process.cwd().replace(/\\\\/g, \"/\") : \"/\";\n}\nconst resolve = function(...arguments_) {\n\targuments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n\tlet resolvedPath = \"\", resolvedAbsolute = !1;\n\tfor (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n\t\tlet path = index >= 0 ? arguments_[index] : cwd();\n\t\t!path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));\n\t}\n\treturn resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tlet lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tlastSlashIndex === -1 ? (res = \"\", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\")), lastSlash = index, dots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\", lastSegmentLength = 0, lastSlash = index, dots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tallowAboveRoot && (res += res.length > 0 ? \"/..\" : \"..\", lastSegmentLength = 2);\n\t\t\t} else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;\n\t\t\tlastSlash = index, dots = 0;\n\t\t} else char === \".\" && dots !== -1 ? ++dots : dots = -1;\n\t}\n\treturn res;\n}\nconst isAbsolute = function(p) {\n\treturn _IS_ABSOLUTE_RE.test(p);\n}, dirname = function(p) {\n\tlet segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n\treturn segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += \"/\"), segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n}, textDecoder = new TextDecoder(), decodeBase64 = typeof Buffer == \"function\" && typeof Buffer.from == \"function\" ? (base64) => Buffer.from(base64, \"base64\").toString(\"utf-8\") : (base64) => textDecoder.decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0))), percentRegEx = /%/g, backslashRegEx = /\\\\/g, newlineRegEx = /\\n/g, carriageReturnRegEx = /\\r/g, tabRegEx = /\\t/g, questionRegex = /\\?/g, hashRegex = /#/g;\nfunction encodePathChars(filepath) {\n\treturn filepath.includes(\"%\") && (filepath = filepath.replace(percentRegEx, \"%25\")), !isWindows && filepath.includes(\"\\\\\") && (filepath = filepath.replace(backslashRegEx, \"%5C\")), filepath.includes(\"\\n\") && (filepath = filepath.replace(newlineRegEx, \"%0A\")), filepath.includes(\"\\r\") && (filepath = filepath.replace(carriageReturnRegEx, \"%0D\")), filepath.includes(\"\t\") && (filepath = filepath.replace(tabRegEx, \"%09\")), filepath;\n}\nconst posixDirname = dirname, posixResolve = resolve;\nfunction posixPathToFileHref(posixPath) {\n\tlet resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);\n\treturn (filePathLast === 47 || isWindows && filePathLast === 92) && resolved[resolved.length - 1] !== \"/\" && (resolved += \"/\"), resolved = encodePathChars(resolved), resolved.includes(\"?\") && (resolved = resolved.replace(questionRegex, \"%3F\")), resolved.includes(\"#\") && (resolved = resolved.replace(hashRegex, \"%23\")), new URL(`file://${resolved}`).href;\n}\nfunction toWindowsPath(path) {\n\treturn path.replace(/\\//g, \"\\\\\");\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs\nvar comma = 44, chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n\tlet c = chars.charCodeAt(i);\n\tintToChar[i] = c, charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n\tlet value = 0, shift = 0, integer = 0;\n\tdo\n\t\tinteger = charToInt[reader.next()], value |= (integer & 31) << shift, shift += 5;\n\twhile (integer & 32);\n\tlet shouldNegate = value & 1;\n\treturn value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;\n}\nfunction hasMoreVlq(reader, max) {\n\treturn reader.pos >= max ? !1 : reader.peek() !== comma;\n}\nvar StringReader = class {\n\tconstructor(buffer) {\n\t\tthis.pos = 0, this.buffer = buffer;\n\t}\n\tnext() {\n\t\treturn this.buffer.charCodeAt(this.pos++);\n\t}\n\tpeek() {\n\t\treturn this.buffer.charCodeAt(this.pos);\n\t}\n\tindexOf(char) {\n\t\tlet { buffer, pos } = this, idx = buffer.indexOf(char, pos);\n\t\treturn idx === -1 ? buffer.length : idx;\n\t}\n};\nfunction decode(mappings) {\n\tlet { length } = mappings, reader = new StringReader(mappings), decoded = [], genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;\n\tdo {\n\t\tlet semi = reader.indexOf(\";\"), line = [], sorted = !0, lastCol = 0;\n\t\tfor (genColumn = 0; reader.pos < semi;) {\n\t\t\tlet seg;\n\t\t\tgenColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [\n\t\t\t\tgenColumn,\n\t\t\t\tsourcesIndex,\n\t\t\t\tsourceLine,\n\t\t\t\tsourceColumn,\n\t\t\t\tnamesIndex\n\t\t\t]) : seg = [\n\t\t\t\tgenColumn,\n\t\t\t\tsourcesIndex,\n\t\t\t\tsourceLine,\n\t\t\t\tsourceColumn\n\t\t\t]) : seg = [genColumn], line.push(seg), reader.pos++;\n\t\t}\n\t\tsorted || sort(line), decoded.push(line), reader.pos = semi + 1;\n\t} while (reader.pos <= length);\n\treturn decoded;\n}\nfunction sort(line) {\n\tline.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n\treturn a[0] - b[0];\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs\nvar COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, found = !1;\nfunction binarySearch(haystack, needle, low, high) {\n\tfor (; low <= high;) {\n\t\tlet mid = low + (high - low >> 1), cmp = haystack[mid][COLUMN] - needle;\n\t\tif (cmp === 0) return found = !0, mid;\n\t\tcmp < 0 ? low = mid + 1 : high = mid - 1;\n\t}\n\treturn found = !1, low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n\tfor (let i = index + 1; i < haystack.length && haystack[i][COLUMN] === needle; index = i++);\n\treturn index;\n}\nfunction lowerBound(haystack, needle, index) {\n\tfor (let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--);\n\treturn index;\n}\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n\tlet { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;\n\tif (key === lastKey) {\n\t\tif (needle === lastNeedle) return found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle, lastIndex;\n\t\tneedle >= lastNeedle ? low = lastIndex === -1 ? 0 : lastIndex : high = lastIndex;\n\t}\n\treturn state.lastKey = key, state.lastNeedle = needle, state.lastIndex = binarySearch(haystack, needle, low, high);\n}\nvar LINE_GTR_ZERO = \"`line` must be greater than 0 (lines start at line 1)\", COL_GTR_EQ_ZERO = \"`column` must be greater than or equal to 0 (columns start at column 0)\";\nfunction cast(map) {\n\treturn map;\n}\nfunction decodedMappings(map) {\n\tvar _a;\n\treturn (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));\n}\nfunction originalPositionFor(map, needle) {\n\tlet { line, column, bias } = needle;\n\tif (line--, line < 0) throw Error(LINE_GTR_ZERO);\n\tif (column < 0) throw Error(COL_GTR_EQ_ZERO);\n\tlet decoded = decodedMappings(map);\n\tif (line >= decoded.length) return OMapping(null, null, null, null);\n\tlet segments = decoded[line], index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || 1);\n\tif (index === -1) return OMapping(null, null, null, null);\n\tlet segment = segments[index];\n\tif (segment.length === 1) return OMapping(null, null, null, null);\n\tlet { names, resolvedSources } = map;\n\treturn OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);\n}\nfunction OMapping(source, line, column, name) {\n\treturn {\n\t\tsource,\n\t\tline,\n\t\tcolumn,\n\t\tname\n\t};\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n\tlet index = memoizedBinarySearch(segments, column, memo, line);\n\treturn found ? index = (bias === -1 ? upperBound : lowerBound)(segments, column, index) : bias === -1 && index++, index === -1 || index === segments.length ? -1 : index;\n}\n//#endregion\n//#region src/module-runner/sourcemap/decoder.ts\nvar DecodedMap = class {\n\tmap;\n\t_encoded;\n\t_decoded;\n\t_decodedMemo;\n\turl;\n\tfile;\n\tversion;\n\tnames = [];\n\tresolvedSources;\n\tconstructor(map, from) {\n\t\tthis.map = map;\n\t\tlet { mappings, names, sources } = map;\n\t\tthis.version = map.version, this.names = names || [], this._encoded = mappings || \"\", this._decodedMemo = memoizedState(), this.url = from, this.file = from;\n\t\tlet originDir = posixDirname(from);\n\t\tthis.resolvedSources = (sources || []).map((s) => posixResolve(originDir, s || \"\"));\n\t}\n};\nfunction memoizedState() {\n\treturn {\n\t\tlastKey: -1,\n\t\tlastNeedle: -1,\n\t\tlastIndex: -1\n\t};\n}\nfunction getOriginalPosition(map, needle) {\n\tlet result = originalPositionFor(map, needle);\n\treturn result.column == null ? null : result;\n}\n//#endregion\n//#region src/module-runner/evaluatedModules.ts\nconst MODULE_RUNNER_SOURCEMAPPING_REGEXP = RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);\nvar EvaluatedModuleNode = class {\n\tid;\n\turl;\n\timporters = /* @__PURE__ */ new Set();\n\timports = /* @__PURE__ */ new Set();\n\tevaluated = !1;\n\tmeta;\n\tpromise;\n\texports;\n\tfile;\n\tmap;\n\tconstructor(id, url) {\n\t\tthis.id = id, this.url = url, this.file = cleanUrl(id);\n\t}\n}, EvaluatedModules = class {\n\tidToModuleMap = /* @__PURE__ */ new Map();\n\tfileToModulesMap = /* @__PURE__ */ new Map();\n\turlToIdModuleMap = /* @__PURE__ */ new Map();\n\t/**\n\t* Returns the module node by the resolved module ID. Usually, module ID is\n\t* the file system path with query and/or hash. It can also be a virtual module.\n\t*\n\t* Module runner graph will have 1 to 1 mapping with the server module graph.\n\t* @param id Resolved module ID\n\t*/\n\tgetModuleById(id) {\n\t\treturn this.idToModuleMap.get(id);\n\t}\n\t/**\n\t* Returns all modules related to the file system path. Different modules\n\t* might have different query parameters or hash, so it's possible to have\n\t* multiple modules for the same file.\n\t* @param file The file system path of the module\n\t*/\n\tgetModulesByFile(file) {\n\t\treturn this.fileToModulesMap.get(file);\n\t}\n\t/**\n\t* Returns the module node by the URL that was used in the import statement.\n\t* Unlike module graph on the server, the URL is not resolved and is used as is.\n\t* @param url Server URL that was used in the import statement\n\t*/\n\tgetModuleByUrl(url) {\n\t\treturn this.urlToIdModuleMap.get(unwrapId(url));\n\t}\n\t/**\n\t* Ensure that module is in the graph. If the module is already in the graph,\n\t* it will return the existing module node. Otherwise, it will create a new\n\t* module node and add it to the graph.\n\t* @param id Resolved module ID\n\t* @param url URL that was used in the import statement\n\t*/\n\tensureModule(id, url) {\n\t\tif (id = normalizeModuleId(id), this.idToModuleMap.has(id)) {\n\t\t\tlet moduleNode = this.idToModuleMap.get(id);\n\t\t\treturn this.urlToIdModuleMap.set(url, moduleNode), moduleNode;\n\t\t}\n\t\tlet moduleNode = new EvaluatedModuleNode(id, url);\n\t\tthis.idToModuleMap.set(id, moduleNode), this.urlToIdModuleMap.set(url, moduleNode);\n\t\tlet fileModules = this.fileToModulesMap.get(moduleNode.file) || /* @__PURE__ */ new Set();\n\t\treturn fileModules.add(moduleNode), this.fileToModulesMap.set(moduleNode.file, fileModules), moduleNode;\n\t}\n\tinvalidateModule(node) {\n\t\tnode.evaluated = !1, node.meta = void 0, node.map = void 0, node.promise = void 0, node.exports = void 0, node.imports.clear();\n\t}\n\t/**\n\t* Extracts the inlined source map from the module code and returns the decoded\n\t* source map. If the source map is not inlined, it will return null.\n\t* @param id Resolved module ID\n\t*/\n\tgetModuleSourceMapById(id) {\n\t\tlet mod = this.getModuleById(id);\n\t\tif (!mod) return null;\n\t\tif (mod.map) return mod.map;\n\t\tif (!mod.meta || !(\"code\" in mod.meta)) return null;\n\t\tlet pattern = `//# ${SOURCEMAPPING_URL}=data:application/json;base64,`, lastIndex = mod.meta.code.lastIndexOf(pattern);\n\t\tif (lastIndex === -1) return null;\n\t\tlet mapString = MODULE_RUNNER_SOURCEMAPPING_REGEXP.exec(mod.meta.code.slice(lastIndex))?.[1];\n\t\treturn mapString ? (mod.map = new DecodedMap(JSON.parse(decodeBase64(mapString)), mod.file), mod.map) : null;\n\t}\n\tclear() {\n\t\tthis.idToModuleMap.clear(), this.fileToModulesMap.clear(), this.urlToIdModuleMap.clear();\n\t}\n};\nconst prefixedBuiltins = new Set([\n\t\"node:sea\",\n\t\"node:sqlite\",\n\t\"node:test\",\n\t\"node:test/reporters\"\n]);\nfunction normalizeModuleId(file) {\n\treturn prefixedBuiltins.has(file) ? file : slash(file).replace(/^\\/@fs\\//, isWindows ? \"\" : \"/\").replace(/^node:/, \"\").replace(/^\\/+/, \"/\").replace(/^file:\\/+/, isWindows ? \"\" : \"/\");\n}\n//#endregion\n//#region src/shared/hmr.ts\nvar HMRContext = class {\n\thmrClient;\n\townerPath;\n\tnewListeners;\n\tconstructor(hmrClient, ownerPath) {\n\t\tthis.hmrClient = hmrClient, this.ownerPath = ownerPath, hmrClient.dataMap.has(ownerPath) || hmrClient.dataMap.set(ownerPath, {});\n\t\tlet mod = hmrClient.hotModulesMap.get(ownerPath);\n\t\tmod && (mod.callbacks = []);\n\t\tlet staleListeners = hmrClient.ctxToListenersMap.get(ownerPath);\n\t\tif (staleListeners) for (let [event, staleFns] of staleListeners) {\n\t\t\tlet listeners = hmrClient.customListenersMap.get(event);\n\t\t\tlisteners && hmrClient.customListenersMap.set(event, listeners.filter((l) => !staleFns.includes(l)));\n\t\t}\n\t\tthis.newListeners = /* @__PURE__ */ new Map(), hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners);\n\t}\n\tget data() {\n\t\treturn this.hmrClient.dataMap.get(this.ownerPath);\n\t}\n\taccept(deps, callback) {\n\t\tif (typeof deps == \"function\" || !deps) this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod));\n\t\telse if (typeof deps == \"string\") this.acceptDeps([deps], ([mod]) => callback?.(mod));\n\t\telse if (Array.isArray(deps)) this.acceptDeps(deps, callback);\n\t\telse throw Error(\"invalid hot.accept() usage.\");\n\t}\n\tacceptExports(_, callback) {\n\t\tthis.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod));\n\t}\n\tdispose(cb) {\n\t\tthis.hmrClient.disposeMap.set(this.ownerPath, cb);\n\t}\n\tprune(cb) {\n\t\tthis.hmrClient.pruneMap.set(this.ownerPath, cb);\n\t}\n\tdecline() {}\n\tinvalidate(message) {\n\t\tlet firstInvalidatedBy = this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath;\n\t\tthis.hmrClient.notifyListeners(\"vite:invalidate\", {\n\t\t\tpath: this.ownerPath,\n\t\t\tmessage,\n\t\t\tfirstInvalidatedBy\n\t\t}), this.send(\"vite:invalidate\", {\n\t\t\tpath: this.ownerPath,\n\t\t\tmessage,\n\t\t\tfirstInvalidatedBy\n\t\t}), this.hmrClient.logger.debug(`invalidate ${this.ownerPath}${message ? `: ${message}` : \"\"}`);\n\t}\n\ton(event, cb) {\n\t\tlet addToMap = (map) => {\n\t\t\tlet existing = map.get(event) || [];\n\t\t\texisting.push(cb), map.set(event, existing);\n\t\t};\n\t\taddToMap(this.hmrClient.customListenersMap), addToMap(this.newListeners);\n\t}\n\toff(event, cb) {\n\t\tlet removeFromMap = (map) => {\n\t\t\tlet existing = map.get(event);\n\t\t\tif (existing === void 0) return;\n\t\t\tlet pruned = existing.filter((l) => l !== cb);\n\t\t\tif (pruned.length === 0) {\n\t\t\t\tmap.delete(event);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmap.set(event, pruned);\n\t\t};\n\t\tremoveFromMap(this.hmrClient.customListenersMap), removeFromMap(this.newListeners);\n\t}\n\tsend(event, data) {\n\t\tthis.hmrClient.send({\n\t\t\ttype: \"custom\",\n\t\t\tevent,\n\t\t\tdata\n\t\t});\n\t}\n\tacceptDeps(deps, callback = () => {}) {\n\t\tlet mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || {\n\t\t\tid: this.ownerPath,\n\t\t\tcallbacks: []\n\t\t};\n\t\tmod.callbacks.push({\n\t\t\tdeps,\n\t\t\tfn: callback\n\t\t}), this.hmrClient.hotModulesMap.set(this.ownerPath, mod);\n\t}\n}, HMRClient = class {\n\tlogger;\n\ttransport;\n\timportUpdatedModule;\n\thotModulesMap = /* @__PURE__ */ new Map();\n\tdisposeMap = /* @__PURE__ */ new Map();\n\tpruneMap = /* @__PURE__ */ new Map();\n\tdataMap = /* @__PURE__ */ new Map();\n\tcustomListenersMap = /* @__PURE__ */ new Map();\n\tctxToListenersMap = /* @__PURE__ */ new Map();\n\tcurrentFirstInvalidatedBy;\n\tconstructor(logger, transport, importUpdatedModule) {\n\t\tthis.logger = logger, this.transport = transport, this.importUpdatedModule = importUpdatedModule;\n\t}\n\tasync notifyListeners(event, data) {\n\t\tlet cbs = this.customListenersMap.get(event);\n\t\tcbs && await Promise.allSettled(cbs.map((cb) => cb(data)));\n\t}\n\tsend(payload) {\n\t\tthis.transport.send(payload).catch((err) => {\n\t\t\tthis.logger.error(err);\n\t\t});\n\t}\n\tclear() {\n\t\tthis.hotModulesMap.clear(), this.disposeMap.clear(), this.pruneMap.clear(), this.dataMap.clear(), this.customListenersMap.clear(), this.ctxToListenersMap.clear();\n\t}\n\tasync prunePaths(paths) {\n\t\tawait Promise.all(paths.map((path) => {\n\t\t\tlet disposer = this.disposeMap.get(path);\n\t\t\tif (disposer) return disposer(this.dataMap.get(path));\n\t\t})), await Promise.all(paths.map((path) => {\n\t\t\tlet fn = this.pruneMap.get(path);\n\t\t\tif (fn) return fn(this.dataMap.get(path));\n\t\t}));\n\t}\n\twarnFailedUpdate(err, path) {\n\t\t(!(err instanceof Error) || !err.message.includes(\"fetch\")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);\n\t}\n\tupdateQueue = [];\n\tpendingUpdateQueue = !1;\n\t/**\n\t* buffer multiple hot updates triggered by the same src change\n\t* so that they are invoked in the same order they were sent.\n\t* (otherwise the order may be inconsistent because of the http request round trip)\n\t*/\n\tasync queueUpdate(payload) {\n\t\tif (this.updateQueue.push(this.fetchUpdate(payload)), !this.pendingUpdateQueue) {\n\t\t\tthis.pendingUpdateQueue = !0, await Promise.resolve(), this.pendingUpdateQueue = !1;\n\t\t\tlet loading = [...this.updateQueue];\n\t\t\tthis.updateQueue = [], (await Promise.all(loading)).forEach((fn) => fn && fn());\n\t\t}\n\t}\n\tasync fetchUpdate(update) {\n\t\tlet { path, acceptedPath, firstInvalidatedBy } = update, mod = this.hotModulesMap.get(path);\n\t\tif (!mod) return;\n\t\tlet fetchedModule, isSelfUpdate = path === acceptedPath, qualifiedCallbacks = mod.callbacks.filter(({ deps }) => deps.includes(acceptedPath));\n\t\tif (isSelfUpdate || qualifiedCallbacks.length > 0) {\n\t\t\tlet disposer = this.disposeMap.get(acceptedPath);\n\t\t\tdisposer && await disposer(this.dataMap.get(acceptedPath));\n\t\t\ttry {\n\t\t\t\tfetchedModule = await this.importUpdatedModule(update);\n\t\t\t} catch (e) {\n\t\t\t\tthis.warnFailedUpdate(e, acceptedPath);\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\ttry {\n\t\t\t\tthis.currentFirstInvalidatedBy = firstInvalidatedBy;\n\t\t\t\tfor (let { deps, fn } of qualifiedCallbacks) fn(deps.map((dep) => dep === acceptedPath ? fetchedModule : void 0));\n\t\t\t\tlet loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`;\n\t\t\t\tthis.logger.debug(`hot updated: ${loggedPath}`);\n\t\t\t} finally {\n\t\t\t\tthis.currentFirstInvalidatedBy = void 0;\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\n//#region src/shared/ssrTransform.ts\n/**\n* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.\n* Top-level imports and dynamic imports work slightly differently in Node.js.\n* This function normalizes the differences so it matches prod behaviour.\n*/\nfunction analyzeImportedModDifference(mod, rawId, moduleType, metadata) {\n\tif (!metadata?.isDynamicImport && metadata?.importedNames?.length) {\n\t\tlet missingBindings = metadata.importedNames.filter((s) => !(s in mod));\n\t\tif (missingBindings.length) {\n\t\t\tlet lastBinding = missingBindings[missingBindings.length - 1];\n\t\t\tthrow SyntaxError(moduleType === \"module\" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\\\n[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.\nCommonJS modules can always be imported via the default export, for example using:\n\nimport pkg from '${rawId}';\nconst {${missingBindings.join(\", \")}} = pkg;\n`);\n\t\t}\n\t}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/nanoid@5.1.11/node_modules/nanoid/non-secure/index.js\nlet nanoid = (size = 21) => {\n\tlet id = \"\", i = size | 0;\n\tfor (; i--;) id += \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\"[Math.random() * 64 | 0];\n\treturn id;\n};\n//#endregion\n//#region src/shared/moduleRunnerTransport.ts\nfunction reviveInvokeError(e) {\n\tlet error = Error(e.message || \"Unknown invoke error\");\n\treturn Object.assign(error, e, { runnerError: /* @__PURE__ */ Error(\"RunnerError\") }), error;\n}\nconst createInvokeableTransport = (transport) => {\n\tif (transport.invoke) return {\n\t\t...transport,\n\t\tasync invoke(name, data) {\n\t\t\tlet result = await transport.invoke({\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:invoke\",\n\t\t\t\tdata: {\n\t\t\t\t\tid: \"send\",\n\t\t\t\t\tname,\n\t\t\t\t\tdata\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (\"error\" in result) throw reviveInvokeError(result.error);\n\t\t\treturn result.result;\n\t\t}\n\t};\n\tif (!transport.send || !transport.connect) throw Error(\"transport must implement send and connect when invoke is not implemented\");\n\tlet rpcPromises = /* @__PURE__ */ new Map();\n\treturn {\n\t\t...transport,\n\t\tconnect({ onMessage, onDisconnection }) {\n\t\t\treturn transport.connect({\n\t\t\t\tonMessage(payload) {\n\t\t\t\t\tif (payload.type === \"custom\" && payload.event === \"vite:invoke\") {\n\t\t\t\t\t\tlet data = payload.data;\n\t\t\t\t\t\tif (data.id.startsWith(\"response:\")) {\n\t\t\t\t\t\t\tlet invokeId = data.id.slice(9), promise = rpcPromises.get(invokeId);\n\t\t\t\t\t\t\tif (!promise) return;\n\t\t\t\t\t\t\tpromise.timeoutId && clearTimeout(promise.timeoutId), rpcPromises.delete(invokeId);\n\t\t\t\t\t\t\tlet { error, result } = data.data;\n\t\t\t\t\t\t\terror ? promise.reject(error) : promise.resolve(result);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tonMessage(payload);\n\t\t\t\t},\n\t\t\t\tonDisconnection\n\t\t\t});\n\t\t},\n\t\tdisconnect() {\n\t\t\treturn rpcPromises.forEach((promise) => {\n\t\t\t\tpromise.reject(/* @__PURE__ */ Error(`transport was disconnected, cannot call ${JSON.stringify(promise.name)}`));\n\t\t\t}), rpcPromises.clear(), transport.disconnect?.();\n\t\t},\n\t\tsend(data) {\n\t\t\treturn transport.send(data);\n\t\t},\n\t\tasync invoke(name, data) {\n\t\t\tlet promiseId = nanoid(), wrappedData = {\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:invoke\",\n\t\t\t\tdata: {\n\t\t\t\t\tname,\n\t\t\t\t\tid: `send:${promiseId}`,\n\t\t\t\t\tdata\n\t\t\t\t}\n\t\t\t}, sendPromise = transport.send(wrappedData), { promise, resolve, reject } = promiseWithResolvers(), timeout = transport.timeout ?? 6e4, timeoutId;\n\t\t\ttimeout > 0 && (timeoutId = setTimeout(() => {\n\t\t\t\trpcPromises.delete(promiseId), reject(/* @__PURE__ */ Error(`transport invoke timed out after ${timeout}ms (data: ${JSON.stringify(wrappedData)})`));\n\t\t\t}, timeout), timeoutId?.unref?.()), rpcPromises.set(promiseId, {\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t\tname,\n\t\t\t\ttimeoutId\n\t\t\t}), sendPromise && sendPromise.catch((err) => {\n\t\t\t\tclearTimeout(timeoutId), rpcPromises.delete(promiseId), reject(err);\n\t\t\t});\n\t\t\ttry {\n\t\t\t\treturn await promise;\n\t\t\t} catch (err) {\n\t\t\t\tthrow reviveInvokeError(err);\n\t\t\t}\n\t\t}\n\t};\n}, normalizeModuleRunnerTransport = (transport) => {\n\tlet invokeableTransport = createInvokeableTransport(transport), isConnected = !invokeableTransport.connect, connectingPromise;\n\treturn {\n\t\t...transport,\n\t\t...invokeableTransport.connect ? { async connect(onMessage) {\n\t\t\tif (isConnected) return;\n\t\t\tif (connectingPromise) {\n\t\t\t\tawait connectingPromise;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet maybePromise = invokeableTransport.connect({\n\t\t\t\tonMessage: onMessage ?? (() => {}),\n\t\t\t\tonDisconnection() {\n\t\t\t\t\tisConnected = !1;\n\t\t\t\t}\n\t\t\t});\n\t\t\tmaybePromise && (connectingPromise = maybePromise, await connectingPromise, connectingPromise = void 0), isConnected = !0;\n\t\t} } : {},\n\t\t...invokeableTransport.disconnect ? { async disconnect() {\n\t\t\tisConnected && (connectingPromise && await connectingPromise, isConnected = !1, await invokeableTransport.disconnect());\n\t\t} } : {},\n\t\tasync send(data) {\n\t\t\tif (invokeableTransport.send) {\n\t\t\t\tif (!isConnected) if (connectingPromise) await connectingPromise;\n\t\t\t\telse throw new SendBeforeConnectError(\"send was called before connect\");\n\t\t\t\tawait invokeableTransport.send(data);\n\t\t\t}\n\t\t},\n\t\tasync invoke(name, data) {\n\t\t\tif (!isConnected) if (connectingPromise) await connectingPromise;\n\t\t\telse throw new SendBeforeConnectError(\"invoke was called before connect\");\n\t\t\treturn invokeableTransport.invoke(name, data);\n\t\t}\n\t};\n};\nvar SendBeforeConnectError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message), this.name = \"SendBeforeConnectError\";\n\t}\n};\nconst createWebSocketModuleRunnerTransport = (options) => {\n\tlet pingInterval = options.pingInterval ?? 3e4, ws, pingIntervalId;\n\treturn {\n\t\tasync connect({ onMessage, onDisconnection }) {\n\t\t\tlet socket = options.createConnection();\n\t\t\tsocket.addEventListener(\"message\", ({ data }) => {\n\t\t\t\tonMessage(JSON.parse(data));\n\t\t\t});\n\t\t\tlet isOpened = socket.readyState === socket.OPEN;\n\t\t\tisOpened || await new Promise((resolve, reject) => {\n\t\t\t\tsocket.addEventListener(\"open\", () => {\n\t\t\t\t\tisOpened = !0, resolve();\n\t\t\t\t}, { once: !0 }), socket.addEventListener(\"close\", () => {\n\t\t\t\t\tif (!isOpened) {\n\t\t\t\t\t\treject(/* @__PURE__ */ Error(\"WebSocket closed without opened.\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonMessage({\n\t\t\t\t\t\ttype: \"custom\",\n\t\t\t\t\t\tevent: \"vite:ws:disconnect\",\n\t\t\t\t\t\tdata: { webSocket: socket }\n\t\t\t\t\t}), onDisconnection();\n\t\t\t\t});\n\t\t\t}), onMessage({\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:ws:connect\",\n\t\t\t\tdata: { webSocket: socket }\n\t\t\t}), ws = socket, pingIntervalId = setInterval(() => {\n\t\t\t\tsocket.readyState === socket.OPEN && socket.send(JSON.stringify({ type: \"ping\" }));\n\t\t\t}, pingInterval);\n\t\t},\n\t\tdisconnect() {\n\t\t\tclearInterval(pingIntervalId), ws?.close();\n\t\t},\n\t\tsend(data) {\n\t\t\tws.send(JSON.stringify(data));\n\t\t}\n\t};\n};\n//#endregion\n//#region src/shared/builtin.ts\nfunction createIsBuiltin(builtins) {\n\tlet plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin == \"string\")), regexBuiltins = builtins.filter((builtin) => typeof builtin != \"string\");\n\treturn (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));\n}\n//#endregion\n//#region src/module-runner/constants.ts\nconst ssrModuleExportsKey = \"__vite_ssr_exports__\", ssrImportKey = \"__vite_ssr_import__\", ssrDynamicImportKey = \"__vite_ssr_dynamic_import__\", ssrExportAllKey = \"__vite_ssr_exportAll__\", ssrExportNameKey = \"__vite_ssr_exportName__\", ssrImportMetaKey = \"__vite_ssr_import_meta__\", noop = () => {}, silentConsole = {\n\tdebug: noop,\n\terror: noop\n}, hmrLogger = {\n\tdebug: (...msg) => console.log(\"[vite]\", ...msg),\n\terror: (error) => console.log(\"[vite]\", error)\n};\n//#endregion\n//#region src/shared/hmrHandler.ts\nfunction createHMRHandler(handler) {\n\tlet queue = new Queue();\n\treturn (payload) => queue.enqueue(() => handler(payload));\n}\nvar Queue = class {\n\tqueue = [];\n\tpending = !1;\n\tenqueue(promise) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.queue.push({\n\t\t\t\tpromise,\n\t\t\t\tresolve,\n\t\t\t\treject\n\t\t\t}), this.dequeue();\n\t\t});\n\t}\n\tdequeue() {\n\t\tif (this.pending) return !1;\n\t\tlet item = this.queue.shift();\n\t\treturn item ? (this.pending = !0, item.promise().then(item.resolve).catch(item.reject).finally(() => {\n\t\t\tthis.pending = !1, this.dequeue();\n\t\t}), !0) : !1;\n\t}\n};\n//#endregion\n//#region src/module-runner/hmrHandler.ts\nfunction createHMRHandlerForRunner(runner) {\n\treturn createHMRHandler(async (payload) => {\n\t\tlet hmrClient = runner.hmrClient;\n\t\tif (!(!hmrClient || runner.isClosed())) switch (payload.type) {\n\t\t\tcase \"connected\":\n\t\t\t\thmrClient.logger.debug(\"connected.\");\n\t\t\t\tbreak;\n\t\t\tcase \"update\":\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:beforeUpdate\", payload), await Promise.all(payload.updates.map(async (update) => {\n\t\t\t\t\tif (update.type === \"js-update\") return update.acceptedPath = unwrapId(update.acceptedPath), update.path = unwrapId(update.path), hmrClient.queueUpdate(update);\n\t\t\t\t\thmrClient.logger.error(\"css hmr is not supported in runner mode.\");\n\t\t\t\t})), await hmrClient.notifyListeners(\"vite:afterUpdate\", payload);\n\t\t\t\tbreak;\n\t\t\tcase \"custom\":\n\t\t\t\tawait hmrClient.notifyListeners(payload.event, payload.data);\n\t\t\t\tbreak;\n\t\t\tcase \"full-reload\": {\n\t\t\t\tlet { triggeredBy } = payload, clearEntrypointUrls = triggeredBy ? getModulesEntrypoints(runner, getModulesByFile(runner, slash(triggeredBy))) : findAllEntrypoints(runner);\n\t\t\t\tif (!clearEntrypointUrls.size) break;\n\t\t\t\thmrClient.logger.debug(\"program reload\"), await hmrClient.notifyListeners(\"vite:beforeFullReload\", payload), runner.evaluatedModules.clear();\n\t\t\t\tfor (let url of clearEntrypointUrls) {\n\t\t\t\t\tif (runner.isClosed()) break;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait runner.import(url);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (runner.isClosed()) break;\n\t\t\t\t\t\terr.code !== \"ERR_OUTDATED_OPTIMIZED_DEP\" && hmrClient.logger.error(`An error happened during full reload\\n${err.message}\\n${err.stack}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"prune\":\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:beforePrune\", payload), await hmrClient.prunePaths(payload.paths);\n\t\t\t\tbreak;\n\t\t\tcase \"error\": {\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:error\", payload);\n\t\t\t\tlet err = payload.err;\n\t\t\t\thmrClient.logger.error(`Internal Server Error\\n${err.message}\\n${err.stack}`);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ping\": break;\n\t\t\tdefault: return payload;\n\t\t}\n\t});\n}\nfunction getModulesByFile(runner, file) {\n\tlet nodes = runner.evaluatedModules.getModulesByFile(file);\n\treturn nodes ? [...nodes].map((node) => node.id) : [];\n}\nfunction getModulesEntrypoints(runner, modules, visited = /* @__PURE__ */ new Set(), entrypoints = /* @__PURE__ */ new Set()) {\n\tfor (let moduleId of modules) {\n\t\tif (visited.has(moduleId)) continue;\n\t\tvisited.add(moduleId);\n\t\tlet module = runner.evaluatedModules.getModuleById(moduleId);\n\t\tif (module) {\n\t\t\tif (!module.importers.size) {\n\t\t\t\tentrypoints.add(module.url);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);\n\t\t}\n\t}\n\treturn entrypoints;\n}\nfunction findAllEntrypoints(runner, entrypoints = /* @__PURE__ */ new Set()) {\n\tfor (let mod of runner.evaluatedModules.idToModuleMap.values()) mod.importers.size || entrypoints.add(mod.url);\n\treturn entrypoints;\n}\n//#endregion\n//#region src/module-runner/sourcemap/interceptor.ts\nconst sourceMapCache = {}, fileContentsCache = {}, evaluatedModulesCache = /* @__PURE__ */ new Set(), retrieveFileHandlers = /* @__PURE__ */ new Set(), retrieveSourceMapHandlers = /* @__PURE__ */ new Set(), createExecHandlers = (handlers) => ((...args) => {\n\tfor (let handler of handlers) {\n\t\tlet result = handler(...args);\n\t\tif (result) return result;\n\t}\n\treturn null;\n}), retrieveFileFromHandlers = createExecHandlers(retrieveFileHandlers), retrieveSourceMapFromHandlers = createExecHandlers(retrieveSourceMapHandlers);\nlet overridden = !1;\nconst originalPrepare = Error.prepareStackTrace;\nfunction resetInterceptor(runner, options) {\n\tevaluatedModulesCache.delete(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.delete(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.delete(options.retrieveSourceMap), evaluatedModulesCache.size === 0 && (Error.prepareStackTrace = originalPrepare, overridden = !1);\n}\nfunction interceptStackTrace(runner, options = {}) {\n\treturn overridden ||= (Error.prepareStackTrace = prepareStackTrace, !0), evaluatedModulesCache.add(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.add(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.add(options.retrieveSourceMap), () => resetInterceptor(runner, options);\n}\nfunction supportRelativeURL(file, url) {\n\tif (!file) return url;\n\tlet dir = posixDirname(slash(file)), match = /^\\w+:\\/\\/[^/]*/.exec(dir), protocol = match ? match[0] : \"\", startPath = dir.slice(protocol.length);\n\treturn protocol && /^\\/\\w:/.test(startPath) ? (protocol += \"/\", protocol + slash(posixResolve(startPath, url))) : protocol + posixResolve(startPath, url);\n}\nfunction getRunnerSourceMap(position) {\n\tfor (let moduleGraph of evaluatedModulesCache) {\n\t\tlet sourceMap = moduleGraph.getModuleSourceMapById(position.source);\n\t\tif (sourceMap) return {\n\t\t\turl: position.source,\n\t\t\tmap: sourceMap,\n\t\t\tvite: !0\n\t\t};\n\t}\n\treturn null;\n}\nfunction retrieveFile(path) {\n\tif (path in fileContentsCache) return fileContentsCache[path];\n\tlet content = retrieveFileFromHandlers(path);\n\treturn typeof content == \"string\" ? (fileContentsCache[path] = content, content) : null;\n}\nfunction retrieveSourceMapURL(source) {\n\tlet fileData = retrieveFile(source);\n\tif (!fileData) return null;\n\tlet re = /\\/\\/[@#]\\s*sourceMappingURL=([^\\s'\"]+)\\s*$|\\/\\*[@#]\\s*sourceMappingURL=[^\\s*'\"]+\\s*\\*\\/\\s*$/gm, lastMatch, match;\n\tfor (; match = re.exec(fileData);) lastMatch = match;\n\treturn lastMatch ? lastMatch[1] : null;\n}\nconst reSourceMap = /^data:application\\/json[^,]+base64,/;\nfunction retrieveSourceMap(source) {\n\tlet urlAndMap = retrieveSourceMapFromHandlers(source);\n\tif (urlAndMap) return urlAndMap;\n\tlet sourceMappingURL = retrieveSourceMapURL(source);\n\tif (!sourceMappingURL) return null;\n\tlet sourceMapData;\n\tif (reSourceMap.test(sourceMappingURL)) {\n\t\tlet rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(\",\") + 1);\n\t\tsourceMapData = Buffer.from(rawData, \"base64\").toString(), sourceMappingURL = source;\n\t} else sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL);\n\treturn sourceMapData ? {\n\t\turl: sourceMappingURL,\n\t\tmap: sourceMapData\n\t} : null;\n}\nfunction mapSourcePosition(position) {\n\tif (!position.source) return position;\n\tlet sourceMap = getRunnerSourceMap(position);\n\tif (sourceMap ||= sourceMapCache[position.source], !sourceMap) {\n\t\tlet urlAndMap = retrieveSourceMap(position.source);\n\t\tif (urlAndMap && urlAndMap.map) {\n\t\t\tlet url = urlAndMap.url;\n\t\t\tsourceMap = sourceMapCache[position.source] = {\n\t\t\t\turl,\n\t\t\t\tmap: new DecodedMap(typeof urlAndMap.map == \"string\" ? JSON.parse(urlAndMap.map) : urlAndMap.map, url)\n\t\t\t};\n\t\t\tlet contents = sourceMap.map?.map.sourcesContent;\n\t\t\tsourceMap.map && contents && sourceMap.map.resolvedSources.forEach((source, i) => {\n\t\t\t\tlet content = contents[i];\n\t\t\t\tif (content && source && url) {\n\t\t\t\t\tlet contentUrl = supportRelativeURL(url, source);\n\t\t\t\t\tfileContentsCache[contentUrl] = content;\n\t\t\t\t}\n\t\t\t});\n\t\t} else sourceMap = sourceMapCache[position.source] = {\n\t\t\turl: null,\n\t\t\tmap: null\n\t\t};\n\t}\n\tif (sourceMap.map && sourceMap.url) {\n\t\tlet originalPosition = getOriginalPosition(sourceMap.map, position);\n\t\tif (originalPosition && originalPosition.source != null) return originalPosition.source = supportRelativeURL(sourceMap.url, originalPosition.source), sourceMap.vite && (originalPosition._vite = !0), originalPosition;\n\t}\n\treturn position;\n}\nfunction mapEvalOrigin(origin) {\n\tlet match = /^eval at ([^(]+) \\((.+):(\\d+):(\\d+)\\)$/.exec(origin);\n\tif (match) {\n\t\tlet position = mapSourcePosition({\n\t\t\tname: null,\n\t\t\tsource: match[2],\n\t\t\tline: +match[3],\n\t\t\tcolumn: match[4] - 1\n\t\t});\n\t\treturn `eval at ${match[1]} (${position.source}:${position.line}:${position.column + 1})`;\n\t}\n\treturn match = /^eval at ([^(]+) \\((.+)\\)$/.exec(origin), match ? `eval at ${match[1]} (${mapEvalOrigin(match[2])})` : origin;\n}\nfunction CallSiteToString() {\n\tlet fileName, fileLocation = \"\";\n\tif (this.isNative()) fileLocation = \"native\";\n\telse {\n\t\tfileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += \", \"), fileName ? fileLocation += fileName : fileLocation += \"<anonymous>\";\n\t\tlet lineNumber = this.getLineNumber();\n\t\tif (lineNumber != null) {\n\t\t\tfileLocation += `:${lineNumber}`;\n\t\t\tlet columnNumber = this.getColumnNumber();\n\t\t\tcolumnNumber && (fileLocation += `:${columnNumber}`);\n\t\t}\n\t}\n\tlet line = \"\", functionName = this.getFunctionName(), addSuffix = !0, isConstructor = this.isConstructor();\n\tif (this.isToplevel() || isConstructor) isConstructor ? line += `new ${functionName || \"<anonymous>\"}` : functionName ? line += functionName : (line += fileLocation, addSuffix = !1);\n\telse {\n\t\tlet typeName = this.getTypeName();\n\t\ttypeName === \"[object Object]\" && (typeName = \"null\");\n\t\tlet methodName = this.getMethodName();\n\t\tfunctionName ? (typeName && functionName.indexOf(typeName) !== 0 && (line += `${typeName}.`), line += functionName, methodName && functionName.indexOf(`.${methodName}`) !== functionName.length - methodName.length - 1 && (line += ` [as ${methodName}]`)) : line += `${typeName}.${methodName || \"<anonymous>\"}`;\n\t}\n\treturn addSuffix && (line += ` (${fileLocation})`), line;\n}\nfunction cloneCallSite(frame) {\n\tlet object = {};\n\treturn Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach((name) => {\n\t\tlet key = name;\n\t\tobject[key] = /^(?:is|get)/.test(name) ? function() {\n\t\t\treturn frame[key].call(frame);\n\t\t} : frame[key];\n\t}), object.toString = CallSiteToString, object;\n}\nfunction wrapCallSite(frame, state) {\n\tif (state === void 0 && (state = {\n\t\tnextPosition: null,\n\t\tcurPosition: null\n\t}), frame.isNative()) return state.curPosition = null, frame;\n\tlet source = frame.getFileName() || frame.getScriptNameOrSourceURL();\n\tif (source) {\n\t\tlet position = mapSourcePosition({\n\t\t\tname: null,\n\t\t\tsource,\n\t\t\tline: frame.getLineNumber() ?? 0,\n\t\t\tcolumn: (frame.getColumnNumber() ?? 1) - 1\n\t\t});\n\t\tstate.curPosition = position, frame = cloneCallSite(frame);\n\t\tlet originalFunctionName = frame.getFunctionName;\n\t\treturn frame.getFunctionName = function() {\n\t\t\tlet name = state.nextPosition == null ? originalFunctionName() : state.nextPosition.name || originalFunctionName();\n\t\t\treturn name === \"eval\" && \"_vite\" in position ? null : name;\n\t\t}, frame.getFileName = function() {\n\t\t\treturn position.source ?? null;\n\t\t}, frame.getLineNumber = function() {\n\t\t\treturn position.line;\n\t\t}, frame.getColumnNumber = function() {\n\t\t\treturn position.column + 1;\n\t\t}, frame.getScriptNameOrSourceURL = function() {\n\t\t\treturn position.source;\n\t\t}, frame;\n\t}\n\tlet origin = frame.isEval() && frame.getEvalOrigin();\n\treturn origin ? (origin = mapEvalOrigin(origin), frame = cloneCallSite(frame), frame.getEvalOrigin = function() {\n\t\treturn origin || void 0;\n\t}, frame) : frame;\n}\nfunction prepareStackTrace(error, stack) {\n\tlet errorString = `${error.name || \"Error\"}: ${error.message || \"\"}`, state = {\n\t\tnextPosition: null,\n\t\tcurPosition: null\n\t}, processedStack = [];\n\tfor (let i = stack.length - 1; i >= 0; i--) processedStack.push(`\\n at ${wrapCallSite(stack[i], state)}`), state.nextPosition = state.curPosition;\n\treturn state.curPosition = state.nextPosition = null, errorString + processedStack.reverse().join(\"\");\n}\n//#endregion\n//#region src/module-runner/sourcemap/index.ts\nfunction enableSourceMapSupport(runner) {\n\tif (runner.options.sourcemapInterceptor === \"node\") {\n\t\tif (typeof process > \"u\") throw TypeError(\"Cannot use \\\"sourcemapInterceptor: 'node'\\\" because global \\\"process\\\" variable is not available.\");\n\t\tif (typeof process.setSourceMapsEnabled != \"function\") throw TypeError(\"Cannot use \\\"sourcemapInterceptor: 'node'\\\" because \\\"process.setSourceMapsEnabled\\\" function is not available. Please use Node >= 16.6.0.\");\n\t\tlet isEnabledAlready = process.sourceMapsEnabled ?? !1;\n\t\treturn process.setSourceMapsEnabled(!0), () => !isEnabledAlready && process.setSourceMapsEnabled(!1);\n\t}\n\treturn interceptStackTrace(runner, typeof runner.options.sourcemapInterceptor == \"object\" ? runner.options.sourcemapInterceptor : void 0);\n}\n//#endregion\n//#region src/module-runner/esmEvaluator.ts\nvar ESModulesEvaluator = class {\n\tstartOffset = getAsyncFunctionDeclarationPaddingLineCount();\n\tasync runInlinedModule(context, code) {\n\t\tawait new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, \"\\\"use strict\\\";\" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);\n\t}\n\trunExternalModule(filepath) {\n\t\treturn import(filepath);\n\t}\n};\n//#endregion\n//#region src/module-runner/importMetaResolver.ts\nconst customizationHookNamespace = \"vite-module-runner:import-meta-resolve/v1/\", customizationHooksModule = `\n\nexport async function resolve(specifier, context, nextResolve) {\n if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) {\n const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length)\n const [parsedSpecifier, parsedImporter] = JSON.parse(data)\n specifier = parsedSpecifier\n context.parentURL = parsedImporter\n }\n return nextResolve(specifier, context)\n}\n\n`;\nfunction customizationHookResolve(specifier, context, nextResolve) {\n\tif (specifier.startsWith(customizationHookNamespace)) {\n\t\tlet data = specifier.slice(42), [parsedSpecifier, parsedImporter] = JSON.parse(data);\n\t\tspecifier = parsedSpecifier, context.parentURL = parsedImporter;\n\t}\n\treturn nextResolve(specifier, context);\n}\nlet isHookRegistered = !1;\nfunction createImportMetaResolver() {\n\tif (isHookRegistered) return importMetaResolveWithCustomHook;\n\tlet module;\n\ttry {\n\t\tmodule = typeof process < \"u\" ? process.getBuiltinModule(\"node:module\").Module : void 0;\n\t} catch {\n\t\treturn;\n\t}\n\tif (module) {\n\t\tif (module.registerHooks) return module.registerHooks({ resolve: customizationHookResolve }), isHookRegistered = !0, importMetaResolveWithCustomHook;\n\t\tif (module.register) {\n\t\t\ttry {\n\t\t\t\tlet hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`;\n\t\t\t\tmodule.register(hookModuleContent);\n\t\t\t} catch (e) {\n\t\t\t\tif (\"code\" in e && e.code === \"ERR_NETWORK_IMPORT_DISALLOWED\") return;\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\treturn isHookRegistered = !0, importMetaResolveWithCustomHook;\n\t\t}\n\t}\n}\nfunction importMetaResolveWithCustomHook(specifier, importer) {\n\treturn import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);\n}\n//#endregion\n//#region src/module-runner/createImportMeta.ts\nconst envProxy = new Proxy({}, { get(_, p) {\n\tthrow Error(`[module runner] Dynamic access of \"import.meta.env\" is not supported. Please, use \"import.meta.env.${String(p)}\" instead.`);\n} });\nfunction createDefaultImportMeta(modulePath) {\n\tlet href = posixPathToFileHref(modulePath), filename = modulePath, dirname = posixDirname(modulePath);\n\treturn {\n\t\tfilename: isWindows ? toWindowsPath(filename) : filename,\n\t\tdirname: isWindows ? toWindowsPath(dirname) : dirname,\n\t\turl: href,\n\t\tenv: envProxy,\n\t\tresolve(_id, _parent) {\n\t\t\tthrow Error(\"[module runner] \\\"import.meta.resolve\\\" is not supported.\");\n\t\t},\n\t\tglob() {\n\t\t\tthrow Error(\"[module runner] \\\"import.meta.glob\\\" is statically replaced during file transformation. Make sure to reference it by the full name.\");\n\t\t}\n\t};\n}\n/**\n* Create import.meta object for Node.js.\n*/\nfunction createNodeImportMeta(modulePath) {\n\tlet defaultMeta = createDefaultImportMeta(modulePath), href = defaultMeta.url, importMetaResolver = createImportMetaResolver();\n\treturn {\n\t\t...defaultMeta,\n\t\tmain: !1,\n\t\tresolve(id, parent) {\n\t\t\treturn (importMetaResolver ?? defaultMeta.resolve)(id, parent ?? href);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/module-runner/runner.ts\nvar ModuleRunner = class {\n\toptions;\n\tevaluator;\n\tdebug;\n\tevaluatedModules;\n\thmrClient;\n\ttransport;\n\tresetSourceMapSupport;\n\tconcurrentModuleNodePromises = /* @__PURE__ */ new Map();\n\tisBuiltin;\n\tbuiltinsPromise;\n\tclosed = !1;\n\tconstructor(options, evaluator = new ESModulesEvaluator(), debug) {\n\t\tif (this.options = options, this.evaluator = evaluator, this.debug = debug, this.evaluatedModules = options.evaluatedModules ?? new EvaluatedModules(), this.transport = normalizeModuleRunnerTransport(options.transport), options.hmr !== !1) {\n\t\t\tlet optionsHmr = options.hmr ?? !0, resolvedHmrLogger = optionsHmr === !0 || optionsHmr.logger === void 0 ? hmrLogger : optionsHmr.logger === !1 ? silentConsole : optionsHmr.logger;\n\t\t\tif (this.hmrClient = new HMRClient(resolvedHmrLogger, this.transport, ({ acceptedPath }) => this.import(acceptedPath)), !this.transport.connect) throw Error(\"HMR is not supported by this runner transport, but `hmr` option was set to true\");\n\t\t\tthis.transport.connect(createHMRHandlerForRunner(this));\n\t\t} else this.transport.connect?.();\n\t\toptions.sourcemapInterceptor !== !1 && (this.resetSourceMapSupport = enableSourceMapSupport(this));\n\t}\n\t/**\n\t* URL to execute. Accepts file path, server path or id relative to the root.\n\t*/\n\tasync import(url) {\n\t\tlet fetchedModule = await this.cachedModule(url);\n\t\treturn await this.cachedRequest(url, fetchedModule);\n\t}\n\t/**\n\t* Clear all caches including HMR listeners.\n\t*/\n\tclearCache() {\n\t\tthis.evaluatedModules.clear(), this.hmrClient?.clear();\n\t}\n\t/**\n\t* Clears all caches, removes all HMR listeners, and resets source map support.\n\t* This method doesn't stop the HMR connection.\n\t*/\n\tasync close() {\n\t\tthis.resetSourceMapSupport?.(), this.clearCache(), this.hmrClient = void 0, this.closed = !0, await this.transport.disconnect?.();\n\t}\n\t/**\n\t* Returns `true` if the runtime has been closed by calling `close()` method.\n\t*/\n\tisClosed() {\n\t\treturn this.closed;\n\t}\n\tprocessImport(exports, fetchResult, metadata) {\n\t\tif (!(\"externalize\" in fetchResult)) return exports;\n\t\tlet { url, type } = fetchResult;\n\t\treturn type !== \"module\" && type !== \"commonjs\" || analyzeImportedModDifference(exports, url, type, metadata), exports;\n\t}\n\tisCircularRequest(mod, callstack, visited = /* @__PURE__ */ new Set()) {\n\t\tif (visited.has(mod.id)) return !1;\n\t\tvisited.add(mod.id);\n\t\tfor (let importedModuleId of mod.imports) {\n\t\t\tif (callstack.includes(importedModuleId)) return !0;\n\t\t\tlet importedModule = this.evaluatedModules.getModuleById(importedModuleId);\n\t\t\tif (importedModule?.promise && !importedModule.evaluated && this.isCircularRequest(importedModule, callstack, visited)) return !0;\n\t\t}\n\t\treturn !1;\n\t}\n\tasync cachedRequest(url, mod, callstack = [], metadata) {\n\t\tlet meta = mod.meta, moduleId = meta.id, importee = callstack[callstack.length - 1];\n\t\tif (importee && mod.importers.add(importee), mod.evaluated && mod.promise) return this.processImport(await mod.promise, meta, metadata);\n\t\tif (mod.promise) return mod.exports && (callstack.includes(moduleId) || this.isCircularRequest(mod, callstack)) ? this.processImport(mod.exports, meta, metadata) : this.processImport(await mod.promise, meta, metadata);\n\t\tlet debugTimer;\n\t\tthis.debug && (debugTimer = setTimeout(() => {\n\t\t\tthis.debug(`[module runner] module ${moduleId} takes over 2s to load.\\n${`stack:\\n${[...callstack, moduleId].reverse().map((p) => ` - ${p}`).join(\"\\n\")}`}`);\n\t\t}, 2e3));\n\t\ttry {\n\t\t\tlet promise = this.directRequest(url, mod, callstack);\n\t\t\treturn mod.promise = promise, mod.evaluated = !1, this.processImport(await promise, meta, metadata);\n\t\t} finally {\n\t\t\tmod.evaluated = !0, debugTimer && clearTimeout(debugTimer);\n\t\t}\n\t}\n\tasync cachedModule(url, importer) {\n\t\tlet cached = this.concurrentModuleNodePromises.get(url);\n\t\tif (cached) this.debug?.(\"[module runner] using cached module info for\", url);\n\t\telse {\n\t\t\tlet cachedModule = this.evaluatedModules.getModuleByUrl(url);\n\t\t\tcached = this.getModuleInformation(url, importer, cachedModule).finally(() => {\n\t\t\t\tthis.concurrentModuleNodePromises.delete(url);\n\t\t\t}), this.concurrentModuleNodePromises.set(url, cached);\n\t\t}\n\t\treturn cached;\n\t}\n\tensureBuiltins() {\n\t\tif (!this.isBuiltin) return this.builtinsPromise ??= (async () => {\n\t\t\ttry {\n\t\t\t\tthis.debug?.(\"[module runner] fetching builtins from server\");\n\t\t\t\tlet builtins = (await this.transport.invoke(\"getBuiltins\", [])).map((builtin) => typeof builtin == \"object\" && builtin && \"type\" in builtin ? builtin.type === \"string\" ? builtin.value : new RegExp(builtin.source, builtin.flags) : builtin);\n\t\t\t\tthis.isBuiltin = createIsBuiltin(builtins), this.debug?.(\"[module runner] builtins loaded:\", builtins);\n\t\t\t} finally {\n\t\t\t\tthis.builtinsPromise = void 0;\n\t\t\t}\n\t\t})(), this.builtinsPromise;\n\t}\n\tasync getModuleInformation(url, importer, cachedModule) {\n\t\tif (this.closed) throw Error(\"Vite module runner has been closed.\");\n\t\tawait this.ensureBuiltins(), this.debug?.(\"[module runner] fetching\", url);\n\t\tlet isCached = !!(typeof cachedModule == \"object\" && cachedModule.meta), fetchedModule = url.startsWith(\"data:\") || this.isBuiltin?.(url) ? {\n\t\t\texternalize: url,\n\t\t\ttype: \"builtin\"\n\t\t} : await this.transport.invoke(\"fetchModule\", [\n\t\t\turl,\n\t\t\timporter,\n\t\t\t{\n\t\t\t\tcached: isCached,\n\t\t\t\tstartOffset: this.evaluator.startOffset\n\t\t\t}\n\t\t]);\n\t\tif (\"cache\" in fetchedModule) {\n\t\t\tif (!cachedModule || !cachedModule.meta) throw Error(`Module \"${url}\" was mistakenly invalidated during fetch phase.`);\n\t\t\treturn cachedModule;\n\t\t}\n\t\tlet moduleId = \"externalize\" in fetchedModule ? fetchedModule.externalize : fetchedModule.id, moduleUrl = \"url\" in fetchedModule ? fetchedModule.url : url, module = this.evaluatedModules.ensureModule(moduleId, moduleUrl);\n\t\treturn \"invalidate\" in fetchedModule && fetchedModule.invalidate && this.evaluatedModules.invalidateModule(module), fetchedModule.url = moduleUrl, fetchedModule.id = moduleId, module.meta = fetchedModule, module;\n\t}\n\tasync directRequest(url, mod, _callstack) {\n\t\tlet fetchResult = mod.meta, moduleId = fetchResult.id, callstack = [..._callstack, moduleId], request = async (dep, metadata) => {\n\t\t\tlet importer = \"file\" in fetchResult && fetchResult.file || moduleId, depMod = await this.cachedModule(dep, importer);\n\t\t\treturn depMod.importers.add(moduleId), mod.imports.add(depMod.id), this.cachedRequest(dep, depMod, callstack, metadata);\n\t\t}, dynamicRequest = async (dep) => (dep = String(dep), dep[0] === \".\" && (dep = posixResolve(posixDirname(url), dep)), request(dep, { isDynamicImport: !0 }));\n\t\tif (\"externalize\" in fetchResult) {\n\t\t\tlet { externalize } = fetchResult;\n\t\t\tthis.debug?.(\"[module runner] externalizing\", externalize);\n\t\t\tlet exports = await this.evaluator.runExternalModule(externalize);\n\t\t\treturn mod.exports = exports, exports;\n\t\t}\n\t\tlet { code, file } = fetchResult;\n\t\tif (code == null) {\n\t\t\tlet importer = callstack[callstack.length - 2];\n\t\t\tthrow Error(`[module runner] Failed to load \"${url}\"${importer ? ` imported from ${importer}` : \"\"}`);\n\t\t}\n\t\tlet createImportMeta = this.options.createImportMeta ?? createDefaultImportMeta, modulePath = cleanUrl(file || moduleId), href = posixPathToFileHref(modulePath), meta = await createImportMeta(modulePath), exports = Object.create(null);\n\t\tObject.defineProperty(exports, Symbol.toStringTag, {\n\t\t\tvalue: \"Module\",\n\t\t\tenumerable: !1,\n\t\t\tconfigurable: !1\n\t\t}), mod.exports = exports;\n\t\tlet hotContext;\n\t\tthis.hmrClient && Object.defineProperty(meta, \"hot\", {\n\t\t\tenumerable: !0,\n\t\t\tget: () => {\n\t\t\t\tif (!this.hmrClient) throw Error(\"[module runner] HMR client was closed.\");\n\t\t\t\treturn this.debug?.(\"[module runner] creating hmr context for\", mod.url), hotContext ||= new HMRContext(this.hmrClient, mod.url), hotContext;\n\t\t\t},\n\t\t\tset: (value) => {\n\t\t\t\thotContext = value;\n\t\t\t}\n\t\t});\n\t\tlet context = {\n\t\t\t[ssrImportKey]: request,\n\t\t\t[ssrDynamicImportKey]: dynamicRequest,\n\t\t\t[ssrModuleExportsKey]: exports,\n\t\t\t[ssrExportAllKey]: (obj) => exportAll(exports, obj),\n\t\t\t[ssrExportNameKey]: (name, getter) => Object.defineProperty(exports, name, {\n\t\t\t\tenumerable: !0,\n\t\t\t\tconfigurable: !0,\n\t\t\t\tget: getter\n\t\t\t}),\n\t\t\t[ssrImportMetaKey]: meta\n\t\t};\n\t\treturn this.debug?.(\"[module runner] executing\", href), await this.evaluator.runInlinedModule(context, code, mod), exports;\n\t}\n};\nfunction exportAll(exports, sourceModule) {\n\tif (exports !== sourceModule && !(isPrimitive(sourceModule) || Array.isArray(sourceModule) || sourceModule instanceof Promise)) {\n\t\tfor (let key in sourceModule) if (key !== \"default\" && key !== \"__esModule\" && !(key in exports)) try {\n\t\t\tObject.defineProperty(exports, key, {\n\t\t\t\tenumerable: !0,\n\t\t\t\tconfigurable: !0,\n\t\t\t\tget: () => sourceModule[key]\n\t\t\t});\n\t\t} catch {}\n\t}\n}\n//#endregion\nexport { ESModulesEvaluator, EvaluatedModules, ModuleRunner, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAI,oBAAoB;AACxB,qBAAqB;AAGH,OAAO,UAAU,OAAO,QAAQ;CAkB5B,iBAAiB,CAAC,GAAE;AAoEzB,IAAI,YAAY;AAAkB,OAAO,UAAU,cAAqB,OAAO;AAchG,IAAgB,QAAQ,oEAAoE,YAAY,IAAI,WAAW,EAAE,GAAG,YAAY,IAAI,WAAW,GAAG;AAC1J,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACtC,IAAI,IAAI,MAAM,WAAW,CAAC;CAC1B,UAAU,KAAK,GAAG,UAAU,KAAK;AAClC;AAqJ2C,OAAO,OAAO,kBAAkB,mCAAmC;AAsjBtF,MAAM;AA8L9B,MAAM,6BAA6B;AAAyE,GAG/E,KAAK,UAAU,0BAA0B,EAHsC,EAIzE,KAAK,UAAU,0BAA0B,EAJgC;AAgD3F,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,GAAG;CAC1C,MAAM,MAAM,sGAAsG,OAAO,CAAC,EAAE,WAAW;AACxI,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../../@vitest/runner/dist/chunk-artifact.js";
|
|
2
|
+
import "../../@vitest/runner/dist/index.js";
|
|
3
|
+
import "../../@vitest/runner/dist/utils.js";
|
|
4
|
+
import "../../vite/dist/node/module-runner.js";
|
|
5
|
+
import { expectTypeOf } from "expect-type";
|
|
6
|
+
export { expectTypeOf };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"troubleshoot.d.ts","names":[],"sources":["../src/troubleshoot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"troubleshoot.d.ts","names":[],"sources":["../src/troubleshoot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAiEsB,sBAAA,CACpB,IAAA,EAAM,gBAAA,EACN,SAAA,EAAW,qBAAA,EACX,IAAA,EAAM,mBAAA,GACL,OAAA,CAAQ,kBAAA"}
|
package/dist/troubleshoot.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { makeCancellationScope } from "./internals/cancellation.js";
|
|
1
2
|
import { decode, isTerminal } from "./internals/lease-state.js";
|
|
2
3
|
import { normalizeItem } from "./internals/lease-items.js";
|
|
3
4
|
import { ManifestMCPError, ManifestMCPErrorCode } from "@manifest-network/manifest-mcp-core";
|
|
@@ -48,10 +49,19 @@ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
|
|
|
48
49
|
*/
|
|
49
50
|
async function troubleshootDeployment(args, callbacks, opts) {
|
|
50
51
|
validateArgs(args);
|
|
52
|
+
const cx = makeCancellationScope({
|
|
53
|
+
opts,
|
|
54
|
+
onProgress: callbacks.onProgress,
|
|
55
|
+
opLabel: "Troubleshoot",
|
|
56
|
+
broadcasts: false
|
|
57
|
+
});
|
|
58
|
+
cx.throwIfCancelled();
|
|
51
59
|
let leasePayload;
|
|
52
60
|
try {
|
|
53
|
-
|
|
61
|
+
const queryClient = await opts.clientManager.getQueryClient();
|
|
62
|
+
leasePayload = (await cx.race(queryClient.liftedinit.billing.v1.lease({ leaseUuid: args.leaseUuid }))).lease;
|
|
54
63
|
} catch (err) {
|
|
64
|
+
if (err instanceof ManifestMCPError && err.code === ManifestMCPErrorCode.OPERATION_CANCELLED) throw err;
|
|
55
65
|
const reason = `Failed to query lease ${args.leaseUuid}: ${err instanceof Error ? err.message : String(err)}`;
|
|
56
66
|
if (callbacks.onFailure) await callbacks.onFailure({ reason });
|
|
57
67
|
if (err instanceof ManifestMCPError) throw err;
|