@unocss/language-server 66.6.8 → 66.7.0-beta.1
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/babel.cjs +38 -27
- package/dist/index.d.mts +49 -11
- package/dist/index.mjs +718 -310
- package/dist/jiti-o72O9uTJ.cjs +5458 -0
- package/dist/{loader-DsXvVy9i.mjs → loader-Cc0WuaWv.mjs} +78 -159
- package/dist/{multipart-parser-DiNB_U8f.cjs → multipart-parser-Bpu87U00.cjs} +1 -1
- package/dist/{multipart-parser-KkZpcbcp.mjs → multipart-parser-CsdWXQgI.mjs} +1 -1
- package/dist/{node-Cd2HRubI.mjs → node-4QtI8xnG.mjs} +2 -2
- package/dist/{node-BM09n__k.cjs → node-B8rcTbx-.cjs} +5 -5
- package/dist/{node-3wiZdXIz.cjs → node-DVy0NdU2.cjs} +182 -9
- package/dist/node-loader-CKcohGec.mjs +2177 -0
- package/dist/node-loader-D9n8Xz5R.cjs +2184 -0
- package/dist/{node-D23LglTq.mjs → node-oThp98aD.mjs} +178 -5
- package/dist/{prompt-jldWOuck.cjs → prompt-DFgjooUU.cjs} +6 -4
- package/dist/server.cjs +21226 -31429
- package/package.json +18 -17
- package/dist/chunk-CBBoxR_p.mjs +0 -26
- package/dist/dist-DJp734Em.mjs +0 -173
- package/dist/dist-FL7p7uq2.cjs +0 -190
- package/dist/jiti-du6HSta6.cjs +0 -4474
- package/dist/node-loader-BJV6yUBJ.cjs +0 -7138
- package/dist/node-loader-ZSa5xzQw.mjs +0 -7131
|
@@ -1,117 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm
|
|
2
|
-
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
3
|
-
function normalizeWindowsPath(input = "") {
|
|
4
|
-
if (!input) return input;
|
|
5
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
6
|
-
}
|
|
7
|
-
const _UNC_REGEX = /^[/\\]{2}/;
|
|
8
|
-
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
9
|
-
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
10
|
-
const normalize = function(path) {
|
|
11
|
-
if (path.length === 0) return ".";
|
|
12
|
-
path = normalizeWindowsPath(path);
|
|
13
|
-
const isUNCPath = path.match(_UNC_REGEX);
|
|
14
|
-
const isPathAbsolute = isAbsolute(path);
|
|
15
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
16
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
17
|
-
if (path.length === 0) {
|
|
18
|
-
if (isPathAbsolute) return "/";
|
|
19
|
-
return trailingSeparator ? "./" : ".";
|
|
20
|
-
}
|
|
21
|
-
if (trailingSeparator) path += "/";
|
|
22
|
-
if (_DRIVE_LETTER_RE.test(path)) path += "/";
|
|
23
|
-
if (isUNCPath) {
|
|
24
|
-
if (!isPathAbsolute) return `//./${path}`;
|
|
25
|
-
return `//${path}`;
|
|
26
|
-
}
|
|
27
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
28
|
-
};
|
|
29
|
-
const join = function(...segments) {
|
|
30
|
-
let path = "";
|
|
31
|
-
for (const seg of segments) {
|
|
32
|
-
if (!seg) continue;
|
|
33
|
-
if (path.length > 0) {
|
|
34
|
-
const pathTrailing = path[path.length - 1] === "/";
|
|
35
|
-
const segLeading = seg[0] === "/";
|
|
36
|
-
if (pathTrailing && segLeading) path += seg.slice(1);
|
|
37
|
-
else path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
38
|
-
} else path += seg;
|
|
39
|
-
}
|
|
40
|
-
return normalize(path);
|
|
41
|
-
};
|
|
42
|
-
function cwd() {
|
|
43
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
|
|
44
|
-
return "/";
|
|
45
|
-
}
|
|
46
|
-
const resolve = function(...arguments_) {
|
|
47
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
48
|
-
let resolvedPath = "";
|
|
49
|
-
let resolvedAbsolute = false;
|
|
50
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
51
|
-
const path = index >= 0 ? arguments_[index] : cwd();
|
|
52
|
-
if (!path || path.length === 0) continue;
|
|
53
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
54
|
-
resolvedAbsolute = isAbsolute(path);
|
|
55
|
-
}
|
|
56
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
57
|
-
if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
|
|
58
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
59
|
-
};
|
|
60
|
-
function normalizeString(path, allowAboveRoot) {
|
|
61
|
-
let res = "";
|
|
62
|
-
let lastSegmentLength = 0;
|
|
63
|
-
let lastSlash = -1;
|
|
64
|
-
let dots = 0;
|
|
65
|
-
let char = null;
|
|
66
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
67
|
-
if (index < path.length) char = path[index];
|
|
68
|
-
else if (char === "/") break;
|
|
69
|
-
else char = "/";
|
|
70
|
-
if (char === "/") {
|
|
71
|
-
if (lastSlash === index - 1 || dots === 1);
|
|
72
|
-
else if (dots === 2) {
|
|
73
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
74
|
-
if (res.length > 2) {
|
|
75
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
76
|
-
if (lastSlashIndex === -1) {
|
|
77
|
-
res = "";
|
|
78
|
-
lastSegmentLength = 0;
|
|
79
|
-
} else {
|
|
80
|
-
res = res.slice(0, lastSlashIndex);
|
|
81
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
82
|
-
}
|
|
83
|
-
lastSlash = index;
|
|
84
|
-
dots = 0;
|
|
85
|
-
continue;
|
|
86
|
-
} else if (res.length > 0) {
|
|
87
|
-
res = "";
|
|
88
|
-
lastSegmentLength = 0;
|
|
89
|
-
lastSlash = index;
|
|
90
|
-
dots = 0;
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (allowAboveRoot) {
|
|
95
|
-
res += res.length > 0 ? "/.." : "..";
|
|
96
|
-
lastSegmentLength = 2;
|
|
97
|
-
}
|
|
98
|
-
} else {
|
|
99
|
-
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
100
|
-
else res = path.slice(lastSlash + 1, index);
|
|
101
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
102
|
-
}
|
|
103
|
-
lastSlash = index;
|
|
104
|
-
dots = 0;
|
|
105
|
-
} else if (char === "." && dots !== -1) ++dots;
|
|
106
|
-
else dots = -1;
|
|
107
|
-
}
|
|
108
|
-
return res;
|
|
109
|
-
}
|
|
110
|
-
const isAbsolute = function(p) {
|
|
111
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
112
|
-
};
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.0/node_modules/@iconify/utils/lib/svg/trim.js
|
|
1
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/svg/trim.js
|
|
115
2
|
/**
|
|
116
3
|
* Remove whitespace
|
|
117
4
|
*/
|
|
@@ -119,7 +6,7 @@ function trimSVG(str) {
|
|
|
119
6
|
return str.replace(/(['"])\s*\n\s*([^>\\/\s])/g, "$1 $2").replace(/(["';{}><])\s*\n\s*/g, "$1").replace(/\s*\n\s*/g, " ").replace(/\s+"/g, "\"").replace(/="\s+/g, "=\"").replace(/(\s)+\/>/g, "/>").trim();
|
|
120
7
|
}
|
|
121
8
|
//#endregion
|
|
122
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/svg/size.js
|
|
123
10
|
/**
|
|
124
11
|
* Regular expressions for calculating dimensions
|
|
125
12
|
*/
|
|
@@ -147,7 +34,7 @@ function calculateSize(size, ratio, precision) {
|
|
|
147
34
|
}
|
|
148
35
|
}
|
|
149
36
|
//#endregion
|
|
150
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
37
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/icon/defaults.js
|
|
151
38
|
/** Default values for dimensions */
|
|
152
39
|
const defaultIconDimensions = Object.freeze({
|
|
153
40
|
left: 0,
|
|
@@ -173,7 +60,7 @@ const defaultExtendedIconProps = Object.freeze({
|
|
|
173
60
|
hidden: false
|
|
174
61
|
});
|
|
175
62
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
63
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/customisations/defaults.js
|
|
177
64
|
/**
|
|
178
65
|
* Default icon customisations values
|
|
179
66
|
*/
|
|
@@ -186,7 +73,7 @@ const defaultIconCustomisations = Object.freeze({
|
|
|
186
73
|
...defaultIconTransformations
|
|
187
74
|
});
|
|
188
75
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
76
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/svg/defs.js
|
|
190
77
|
function splitSVGDefs(content, tag = "defs") {
|
|
191
78
|
let defs = "";
|
|
192
79
|
const index = content.indexOf("<" + tag);
|
|
@@ -218,7 +105,7 @@ function wrapSVGContent(body, start, end) {
|
|
|
218
105
|
return mergeDefsAndContent(split.defs, start + split.content + end);
|
|
219
106
|
}
|
|
220
107
|
//#endregion
|
|
221
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
108
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/svg/build.js
|
|
222
109
|
/**
|
|
223
110
|
* Check if value should be unset. Allows multiple keywords
|
|
224
111
|
*/
|
|
@@ -328,24 +215,68 @@ function iconToSVG(icon, customisations) {
|
|
|
328
215
|
};
|
|
329
216
|
}
|
|
330
217
|
//#endregion
|
|
331
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
332
|
-
const svgWidthRegex = /\swidth\s*=\s*["']([
|
|
333
|
-
const svgHeightRegex = /\sheight\s*=\s*["']([
|
|
218
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/loader/utils.js
|
|
219
|
+
const svgWidthRegex = /\swidth\s*=\s*["']([^"']+)["']/;
|
|
220
|
+
const svgHeightRegex = /\sheight\s*=\s*["']([^"']+)["']/;
|
|
221
|
+
const svgViewBoxRegex = /\sviewBox\s*=\s*["']([^"']+)["']/;
|
|
334
222
|
const svgTagRegex = /<svg\s+/;
|
|
223
|
+
const loaderDefaultWidthProp = "__iconify_loader_width";
|
|
224
|
+
const loaderDefaultHeightProp = "__iconify_loader_height";
|
|
225
|
+
function stringifySize(value) {
|
|
226
|
+
return value === void 0 ? value : value.toString();
|
|
227
|
+
}
|
|
228
|
+
function getConfiguredSize(source, scale) {
|
|
229
|
+
if (typeof scale === "number") return scale > 0 ? stringifySize(calculateSize(source ?? "1em", scale)) : void 0;
|
|
230
|
+
return source;
|
|
231
|
+
}
|
|
232
|
+
function getSvgAspectRatio(svgNode, props) {
|
|
233
|
+
const viewBox = props.viewBox ?? svgViewBoxRegex.exec(svgNode)?.[1];
|
|
234
|
+
if (!viewBox) return;
|
|
235
|
+
const values = viewBox.trim().split(/[\s,]+/).map((value) => parseFloat(value));
|
|
236
|
+
if (values.length !== 4 || values.some((value) => !Number.isFinite(value))) return;
|
|
237
|
+
const width = values[2];
|
|
238
|
+
const height = values[3];
|
|
239
|
+
if (width <= 0 || height <= 0) return;
|
|
240
|
+
return width / height;
|
|
241
|
+
}
|
|
335
242
|
function configureSvgSize(svg, props, scale) {
|
|
336
243
|
const svgNode = svg.slice(0, svg.indexOf(">"));
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
244
|
+
const widthOnSvg = svgWidthRegex.test(svgNode);
|
|
245
|
+
const heightOnSvg = svgHeightRegex.test(svgNode);
|
|
246
|
+
const defaultWidth = props["__iconify_loader_width"] ?? svgWidthRegex.exec(svgNode)?.[1];
|
|
247
|
+
const defaultHeight = props["__iconify_loader_height"] ?? svgHeightRegex.exec(svgNode)?.[1];
|
|
248
|
+
const aspectRatio = getSvgAspectRatio(svgNode, props);
|
|
249
|
+
delete props[loaderDefaultWidthProp];
|
|
250
|
+
delete props[loaderDefaultHeightProp];
|
|
251
|
+
const customWidth = props.width;
|
|
252
|
+
const customHeight = props.height;
|
|
253
|
+
const hasCustomWidth = !!customWidth || isUnsetKeyword(customWidth);
|
|
254
|
+
const hasCustomHeight = !!customHeight || isUnsetKeyword(customHeight);
|
|
255
|
+
if (hasCustomWidth || hasCustomHeight) {
|
|
256
|
+
if (!hasCustomWidth) if (isUnsetKeyword(customHeight)) {
|
|
257
|
+
delete props.width;
|
|
258
|
+
delete props.height;
|
|
259
|
+
} else if (aspectRatio) {
|
|
260
|
+
props.width = stringifySize(calculateSize(customHeight, aspectRatio));
|
|
261
|
+
props.height = customHeight;
|
|
262
|
+
} else delete props.width;
|
|
263
|
+
else if (isUnsetKeyword(customWidth)) {
|
|
264
|
+
delete props.width;
|
|
265
|
+
if (!hasCustomHeight || isUnsetKeyword(customHeight)) delete props.height;
|
|
345
266
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
267
|
+
if (!hasCustomHeight) if (isUnsetKeyword(customWidth)) delete props.height;
|
|
268
|
+
else if (aspectRatio) {
|
|
269
|
+
props.height = stringifySize(calculateSize(customWidth, 1 / aspectRatio));
|
|
270
|
+
props.width = customWidth;
|
|
271
|
+
} else delete props.height;
|
|
272
|
+
else if (isUnsetKeyword(customHeight)) delete props.height;
|
|
273
|
+
} else {
|
|
274
|
+
const width = getConfiguredSize(defaultWidth, scale);
|
|
275
|
+
const height = getConfiguredSize(defaultHeight, scale);
|
|
276
|
+
if (width) props.width = width;
|
|
277
|
+
if (height) props.height = height;
|
|
278
|
+
}
|
|
279
|
+
return [widthOnSvg, heightOnSvg];
|
|
349
280
|
}
|
|
350
281
|
async function mergeIconProps(svg, collection, icon, options, propsProvider, afterCustomizations) {
|
|
351
282
|
const { scale, addXmlNs = false } = options ?? {};
|
|
@@ -388,7 +319,7 @@ function getPossibleIconNames(icon) {
|
|
|
388
319
|
];
|
|
389
320
|
}
|
|
390
321
|
//#endregion
|
|
391
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
322
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/loader/custom.js
|
|
392
323
|
/**
|
|
393
324
|
* Get custom icon from inline collection or using loader
|
|
394
325
|
*/
|
|
@@ -417,7 +348,7 @@ async function getCustomIcon(custom, collection, icon, options) {
|
|
|
417
348
|
}
|
|
418
349
|
}
|
|
419
350
|
//#endregion
|
|
420
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
351
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/icon/transformations.js
|
|
421
352
|
/**
|
|
422
353
|
* Merge transformations
|
|
423
354
|
*/
|
|
@@ -430,7 +361,7 @@ function mergeIconTransformations(obj1, obj2) {
|
|
|
430
361
|
return result;
|
|
431
362
|
}
|
|
432
363
|
//#endregion
|
|
433
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
364
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/icon/merge.js
|
|
434
365
|
/**
|
|
435
366
|
* Merge icon and alias
|
|
436
367
|
*
|
|
@@ -445,7 +376,7 @@ function mergeIconData(parent, child) {
|
|
|
445
376
|
return result;
|
|
446
377
|
}
|
|
447
378
|
//#endregion
|
|
448
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
379
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/icon-set/tree.js
|
|
449
380
|
/**
|
|
450
381
|
* Resolve icon set icons
|
|
451
382
|
*
|
|
@@ -469,7 +400,7 @@ function getIconsTree(data, names) {
|
|
|
469
400
|
return resolved;
|
|
470
401
|
}
|
|
471
402
|
//#endregion
|
|
472
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
403
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/icon-set/get-icon.js
|
|
473
404
|
/**
|
|
474
405
|
* Get icon data, using prepared aliases tree
|
|
475
406
|
*/
|
|
@@ -477,8 +408,8 @@ function internalGetIconData(data, name, tree) {
|
|
|
477
408
|
const icons = data.icons;
|
|
478
409
|
const aliases = data.aliases || Object.create(null);
|
|
479
410
|
let currentProps = {};
|
|
480
|
-
function parse(name
|
|
481
|
-
currentProps = mergeIconData(icons[name
|
|
411
|
+
function parse(name) {
|
|
412
|
+
currentProps = mergeIconData(icons[name] || aliases[name], currentProps);
|
|
482
413
|
}
|
|
483
414
|
parse(name);
|
|
484
415
|
tree.forEach(parse);
|
|
@@ -493,7 +424,7 @@ function getIconData(data, name) {
|
|
|
493
424
|
return tree ? internalGetIconData(data, name, tree) : null;
|
|
494
425
|
}
|
|
495
426
|
//#endregion
|
|
496
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
427
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/loader/modern.js
|
|
497
428
|
async function searchForIcon(iconSet, collection, ids, options) {
|
|
498
429
|
let iconData;
|
|
499
430
|
const { customize } = options?.customizations ?? {};
|
|
@@ -506,30 +437,18 @@ async function searchForIcon(iconSet, collection, ids, options) {
|
|
|
506
437
|
defaultCustomizations = customize(defaultCustomizations, iconData, `${collection}:${id}`) ?? defaultCustomizations;
|
|
507
438
|
}
|
|
508
439
|
const { attributes: { width, height, ...restAttributes }, body } = iconToSVG(iconData, defaultCustomizations);
|
|
509
|
-
const scale = options?.scale;
|
|
510
440
|
return await mergeIconProps(`<svg >${body}</svg>`, collection, id, options, () => {
|
|
511
|
-
return {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
let value;
|
|
516
|
-
if (!isUnsetKeyword(propValue)) {
|
|
517
|
-
if (propValue) return;
|
|
518
|
-
if (typeof scale === "number") {
|
|
519
|
-
if (scale) value = calculateSize(defaultValue ?? "1em", scale);
|
|
520
|
-
} else value = defaultValue;
|
|
521
|
-
}
|
|
522
|
-
if (!value) delete props[prop];
|
|
523
|
-
else props[prop] = value;
|
|
441
|
+
return {
|
|
442
|
+
...restAttributes,
|
|
443
|
+
...width ? { [loaderDefaultWidthProp]: width } : {},
|
|
444
|
+
...height ? { [loaderDefaultHeightProp]: height } : {}
|
|
524
445
|
};
|
|
525
|
-
check("width", width);
|
|
526
|
-
check("height", height);
|
|
527
446
|
});
|
|
528
447
|
}
|
|
529
448
|
}
|
|
530
449
|
}
|
|
531
450
|
//#endregion
|
|
532
|
-
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.
|
|
451
|
+
//#region ../../node_modules/.pnpm/@iconify+utils@3.1.3/node_modules/@iconify/utils/lib/loader/loader.js
|
|
533
452
|
const loadIcon = async (collection, icon, options) => {
|
|
534
453
|
const custom = options?.customCollections?.[collection];
|
|
535
454
|
if (custom) if (typeof custom === "function") {
|
|
@@ -554,4 +473,4 @@ const loadIcon = async (collection, icon, options) => {
|
|
|
554
473
|
} else return await getCustomIcon(custom, collection, icon, options);
|
|
555
474
|
};
|
|
556
475
|
//#endregion
|
|
557
|
-
export {
|
|
476
|
+
export { searchForIcon as n, getPossibleIconNames as r, loadIcon as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as qn, r as br } from "./node-
|
|
1
|
+
import { o as qn, r as br } from "./node-4QtI8xnG.mjs";
|
|
2
2
|
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs
|
|
3
3
|
var B = Object.defineProperty;
|
|
4
4
|
var E = (u, a) => B(u, "name", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as __require } from "./index.mjs";
|
|
2
2
|
import { createReadStream, promises, statSync } from "node:fs";
|
|
3
3
|
import { basename } from "node:path";
|
|
4
4
|
import { deprecate, promisify, types } from "node:util";
|
|
@@ -2926,7 +2926,7 @@ const mr = Symbol.toStringTag, wi = n((i) => typeof i == "object" && typeof i.ap
|
|
|
2926
2926
|
for (const [p, h] of l) f.append(p, h);
|
|
2927
2927
|
return f;
|
|
2928
2928
|
}
|
|
2929
|
-
const { toFormData: a } = await import("./multipart-parser-
|
|
2929
|
+
const { toFormData: a } = await import("./multipart-parser-CsdWXQgI.mjs");
|
|
2930
2930
|
return a(this.body, o);
|
|
2931
2931
|
}
|
|
2932
2932
|
async blob() {
|
|
@@ -4,13 +4,13 @@ let node_url = require("node:url");
|
|
|
4
4
|
let node_util = require("node:util");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
|
-
node_stream = require_server.__toESM(node_stream);
|
|
7
|
+
node_stream = require_server.__toESM(node_stream, 1);
|
|
8
8
|
let node_http = require("node:http");
|
|
9
|
-
node_http = require_server.__toESM(node_http);
|
|
9
|
+
node_http = require_server.__toESM(node_http, 1);
|
|
10
10
|
let node_https = require("node:https");
|
|
11
|
-
node_https = require_server.__toESM(node_https);
|
|
11
|
+
node_https = require_server.__toESM(node_https, 1);
|
|
12
12
|
let node_zlib = require("node:zlib");
|
|
13
|
-
node_zlib = require_server.__toESM(node_zlib);
|
|
13
|
+
node_zlib = require_server.__toESM(node_zlib, 1);
|
|
14
14
|
let node_buffer = require("node:buffer");
|
|
15
15
|
let node_net = require("node:net");
|
|
16
16
|
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs
|
|
@@ -2930,7 +2930,7 @@ const mr = Symbol.toStringTag, wi = n((i) => typeof i == "object" && typeof i.ap
|
|
|
2930
2930
|
for (const [p, h] of l) f.append(p, h);
|
|
2931
2931
|
return f;
|
|
2932
2932
|
}
|
|
2933
|
-
const { toFormData: a } = await Promise.resolve().then(() => require("./multipart-parser-
|
|
2933
|
+
const { toFormData: a } = await Promise.resolve().then(() => require("./multipart-parser-Bpu87U00.cjs"));
|
|
2934
2934
|
return a(this.body, o);
|
|
2935
2935
|
}
|
|
2936
2936
|
async blob() {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
const require_server = require("./server.cjs");
|
|
2
|
-
const
|
|
3
|
-
const require_node = require("./node-BM09n__k.cjs");
|
|
2
|
+
const require_node = require("./node-B8rcTbx-.cjs");
|
|
4
3
|
require("node:path");
|
|
5
4
|
require("node:url");
|
|
6
5
|
require("node:util");
|
|
7
6
|
require("node:fs");
|
|
8
7
|
require("node:stream");
|
|
9
8
|
let node_http = require("node:http");
|
|
10
|
-
node_http = require_server.__toESM(node_http);
|
|
9
|
+
node_http = require_server.__toESM(node_http, 1);
|
|
11
10
|
let node_https = require("node:https");
|
|
12
|
-
node_https = require_server.__toESM(node_https);
|
|
11
|
+
node_https = require_server.__toESM(node_https, 1);
|
|
13
12
|
require("node:zlib");
|
|
14
13
|
require("node:buffer");
|
|
15
14
|
require("node:net");
|
|
16
15
|
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs
|
|
17
|
-
const o = !!globalThis.process?.env?.FORCE_NODE_FETCH, r = !o && globalThis.fetch || require_node.Mi;
|
|
16
|
+
const o = !!globalThis.process?.env?.FORCE_NODE_FETCH, r$1 = !o && globalThis.fetch || require_node.Mi;
|
|
18
17
|
!o && globalThis.Blob || require_node.ut;
|
|
19
18
|
!o && globalThis.File || require_node.qn;
|
|
20
19
|
!o && globalThis.FormData || require_node.br;
|
|
@@ -65,6 +64,180 @@ function destr(value, options = {}) {
|
|
|
65
64
|
return value;
|
|
66
65
|
}
|
|
67
66
|
}
|
|
67
|
+
String.fromCharCode;
|
|
68
|
+
const HASH_RE = /#/g;
|
|
69
|
+
const AMPERSAND_RE = /&/g;
|
|
70
|
+
const SLASH_RE = /\//g;
|
|
71
|
+
const EQUAL_RE = /=/g;
|
|
72
|
+
const PLUS_RE = /\+/g;
|
|
73
|
+
const ENC_CARET_RE = /%5e/gi;
|
|
74
|
+
const ENC_BACKTICK_RE = /%60/gi;
|
|
75
|
+
const ENC_PIPE_RE = /%7c/gi;
|
|
76
|
+
const ENC_SPACE_RE = /%20/gi;
|
|
77
|
+
function encode(text) {
|
|
78
|
+
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
|
|
79
|
+
}
|
|
80
|
+
function encodeQueryValue(input) {
|
|
81
|
+
return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F");
|
|
82
|
+
}
|
|
83
|
+
function encodeQueryKey(text) {
|
|
84
|
+
return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
|
|
85
|
+
}
|
|
86
|
+
function decode(text = "") {
|
|
87
|
+
try {
|
|
88
|
+
return decodeURIComponent("" + text);
|
|
89
|
+
} catch {
|
|
90
|
+
return "" + text;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function decodeQueryKey(text) {
|
|
94
|
+
return decode(text.replace(PLUS_RE, " "));
|
|
95
|
+
}
|
|
96
|
+
function decodeQueryValue(text) {
|
|
97
|
+
return decode(text.replace(PLUS_RE, " "));
|
|
98
|
+
}
|
|
99
|
+
function parseQuery(parametersString = "") {
|
|
100
|
+
const object = /* @__PURE__ */ Object.create(null);
|
|
101
|
+
if (parametersString[0] === "?") parametersString = parametersString.slice(1);
|
|
102
|
+
for (const parameter of parametersString.split("&")) {
|
|
103
|
+
const s = parameter.match(/([^=]+)=?(.*)/) || [];
|
|
104
|
+
if (s.length < 2) continue;
|
|
105
|
+
const key = decodeQueryKey(s[1]);
|
|
106
|
+
if (key === "__proto__" || key === "constructor") continue;
|
|
107
|
+
const value = decodeQueryValue(s[2] || "");
|
|
108
|
+
if (object[key] === void 0) object[key] = value;
|
|
109
|
+
else if (Array.isArray(object[key])) object[key].push(value);
|
|
110
|
+
else object[key] = [object[key], value];
|
|
111
|
+
}
|
|
112
|
+
return object;
|
|
113
|
+
}
|
|
114
|
+
function encodeQueryItem(key, value) {
|
|
115
|
+
if (typeof value === "number" || typeof value === "boolean") value = String(value);
|
|
116
|
+
if (!value) return encodeQueryKey(key);
|
|
117
|
+
if (Array.isArray(value)) return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&");
|
|
118
|
+
return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;
|
|
119
|
+
}
|
|
120
|
+
function stringifyQuery(query) {
|
|
121
|
+
return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&");
|
|
122
|
+
}
|
|
123
|
+
const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/;
|
|
124
|
+
const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
|
|
125
|
+
const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
|
|
126
|
+
const TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
|
|
127
|
+
const JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
128
|
+
function hasProtocol(inputString, opts = {}) {
|
|
129
|
+
if (typeof opts === "boolean") opts = { acceptRelative: opts };
|
|
130
|
+
if (opts.strict) return PROTOCOL_STRICT_REGEX.test(inputString);
|
|
131
|
+
return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false);
|
|
132
|
+
}
|
|
133
|
+
function hasTrailingSlash(input = "", respectQueryAndFragment) {
|
|
134
|
+
if (!respectQueryAndFragment) return input.endsWith("/");
|
|
135
|
+
return TRAILING_SLASH_RE.test(input);
|
|
136
|
+
}
|
|
137
|
+
function withoutTrailingSlash(input = "", respectQueryAndFragment) {
|
|
138
|
+
if (!respectQueryAndFragment) return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || "/";
|
|
139
|
+
if (!hasTrailingSlash(input, true)) return input || "/";
|
|
140
|
+
let path = input;
|
|
141
|
+
let fragment = "";
|
|
142
|
+
const fragmentIndex = input.indexOf("#");
|
|
143
|
+
if (fragmentIndex !== -1) {
|
|
144
|
+
path = input.slice(0, fragmentIndex);
|
|
145
|
+
fragment = input.slice(fragmentIndex);
|
|
146
|
+
}
|
|
147
|
+
const [s0, ...s] = path.split("?");
|
|
148
|
+
return ((s0.endsWith("/") ? s0.slice(0, -1) : s0) || "/") + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
149
|
+
}
|
|
150
|
+
function withTrailingSlash(input = "", respectQueryAndFragment) {
|
|
151
|
+
if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
|
|
152
|
+
if (hasTrailingSlash(input, true)) return input || "/";
|
|
153
|
+
let path = input;
|
|
154
|
+
let fragment = "";
|
|
155
|
+
const fragmentIndex = input.indexOf("#");
|
|
156
|
+
if (fragmentIndex !== -1) {
|
|
157
|
+
path = input.slice(0, fragmentIndex);
|
|
158
|
+
fragment = input.slice(fragmentIndex);
|
|
159
|
+
if (!path) return fragment;
|
|
160
|
+
}
|
|
161
|
+
const [s0, ...s] = path.split("?");
|
|
162
|
+
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
163
|
+
}
|
|
164
|
+
function withBase(input, base) {
|
|
165
|
+
if (isEmptyURL(base) || hasProtocol(input)) return input;
|
|
166
|
+
const _base = withoutTrailingSlash(base);
|
|
167
|
+
if (input.startsWith(_base)) {
|
|
168
|
+
const nextChar = input[_base.length];
|
|
169
|
+
if (!nextChar || nextChar === "/" || nextChar === "?") return input;
|
|
170
|
+
}
|
|
171
|
+
return joinURL(_base, input);
|
|
172
|
+
}
|
|
173
|
+
function withQuery(input, query) {
|
|
174
|
+
const parsed = parseURL(input);
|
|
175
|
+
parsed.search = stringifyQuery({
|
|
176
|
+
...parseQuery(parsed.search),
|
|
177
|
+
...query
|
|
178
|
+
});
|
|
179
|
+
return stringifyParsedURL(parsed);
|
|
180
|
+
}
|
|
181
|
+
function isEmptyURL(url) {
|
|
182
|
+
return !url || url === "/";
|
|
183
|
+
}
|
|
184
|
+
function isNonEmptyURL(url) {
|
|
185
|
+
return url && url !== "/";
|
|
186
|
+
}
|
|
187
|
+
function joinURL(base, ...input) {
|
|
188
|
+
let url = base || "";
|
|
189
|
+
for (const segment of input.filter((url2) => isNonEmptyURL(url2))) if (url) {
|
|
190
|
+
const _segment = segment.replace(JOIN_LEADING_SLASH_RE, "");
|
|
191
|
+
url = withTrailingSlash(url) + _segment;
|
|
192
|
+
} else url = segment;
|
|
193
|
+
return url;
|
|
194
|
+
}
|
|
195
|
+
const protocolRelative = Symbol.for("ufo:protocolRelative");
|
|
196
|
+
function parseURL(input = "", defaultProto) {
|
|
197
|
+
const _specialProtoMatch = input.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);
|
|
198
|
+
if (_specialProtoMatch) {
|
|
199
|
+
const [, _proto, _pathname = ""] = _specialProtoMatch;
|
|
200
|
+
return {
|
|
201
|
+
protocol: _proto.toLowerCase(),
|
|
202
|
+
pathname: _pathname,
|
|
203
|
+
href: _proto + _pathname,
|
|
204
|
+
auth: "",
|
|
205
|
+
host: "",
|
|
206
|
+
search: "",
|
|
207
|
+
hash: ""
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (!hasProtocol(input, { acceptRelative: true })) return defaultProto ? parseURL(defaultProto + input) : parsePath(input);
|
|
211
|
+
const [, protocol = "", auth, hostAndPath = ""] = input.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [];
|
|
212
|
+
let [, host = "", path = ""] = hostAndPath.match(/([^#/?]*)(.*)?/) || [];
|
|
213
|
+
if (protocol === "file:") path = path.replace(/\/(?=[A-Za-z]:)/, "");
|
|
214
|
+
const { pathname, search, hash } = parsePath(path);
|
|
215
|
+
return {
|
|
216
|
+
protocol: protocol.toLowerCase(),
|
|
217
|
+
auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "",
|
|
218
|
+
host,
|
|
219
|
+
pathname,
|
|
220
|
+
search,
|
|
221
|
+
hash,
|
|
222
|
+
[protocolRelative]: !protocol
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function parsePath(input = "") {
|
|
226
|
+
const [pathname = "", search = "", hash = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
|
|
227
|
+
return {
|
|
228
|
+
pathname,
|
|
229
|
+
search,
|
|
230
|
+
hash
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function stringifyParsedURL(parsed) {
|
|
234
|
+
const pathname = parsed.pathname || "";
|
|
235
|
+
const search = parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : "";
|
|
236
|
+
const hash = parsed.hash || "";
|
|
237
|
+
const auth = parsed.auth ? parsed.auth + "@" : "";
|
|
238
|
+
const host = parsed.host || "";
|
|
239
|
+
return (parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : "") + auth + host + pathname + search + hash;
|
|
240
|
+
}
|
|
68
241
|
//#endregion
|
|
69
242
|
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs
|
|
70
243
|
var FetchError = class extends Error {
|
|
@@ -209,9 +382,9 @@ function createFetch(globalOptions = {}) {
|
|
|
209
382
|
if (!(context.options.headers instanceof Headers)) context.options.headers = new Headers(context.options.headers || {});
|
|
210
383
|
}
|
|
211
384
|
if (typeof context.request === "string") {
|
|
212
|
-
if (context.options.baseURL) context.request =
|
|
385
|
+
if (context.options.baseURL) context.request = withBase(context.request, context.options.baseURL);
|
|
213
386
|
if (context.options.query) {
|
|
214
|
-
context.request =
|
|
387
|
+
context.request = withQuery(context.request, context.options.query);
|
|
215
388
|
delete context.options.query;
|
|
216
389
|
}
|
|
217
390
|
if ("query" in context.options) delete context.options.query;
|
|
@@ -288,7 +461,7 @@ function createFetch(globalOptions = {}) {
|
|
|
288
461
|
//#endregion
|
|
289
462
|
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs
|
|
290
463
|
function createNodeFetch() {
|
|
291
|
-
if (!JSON.parse(process.env.FETCH_KEEP_ALIVE || "false")) return r;
|
|
464
|
+
if (!JSON.parse(process.env.FETCH_KEEP_ALIVE || "false")) return r$1;
|
|
292
465
|
const agentOptions = { keepAlive: true };
|
|
293
466
|
const httpAgent = new node_http.default.Agent(agentOptions);
|
|
294
467
|
const httpsAgent = new node_https.default.Agent(agentOptions);
|
|
@@ -296,7 +469,7 @@ function createNodeFetch() {
|
|
|
296
469
|
return parsedURL.protocol === "http:" ? httpAgent : httpsAgent;
|
|
297
470
|
} };
|
|
298
471
|
return function nodeFetchWithKeepAlive(input, init) {
|
|
299
|
-
return r(input, {
|
|
472
|
+
return r$1(input, {
|
|
300
473
|
...nodeFetchOptions,
|
|
301
474
|
...init
|
|
302
475
|
});
|