unplugin-vue-components 29.2.0 → 31.0.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.
Files changed (70) hide show
  1. package/README.md +4 -36
  2. package/dist/esbuild.d.mts +7 -0
  3. package/dist/esbuild.mjs +9 -0
  4. package/dist/{index.d.cts → index.d.mts} +4 -2
  5. package/dist/index.mjs +4 -0
  6. package/dist/nuxt.d.mts +7 -0
  7. package/dist/{nuxt.js → nuxt.mjs} +4 -4
  8. package/dist/{resolvers.d.ts → resolvers.d.mts} +189 -218
  9. package/dist/{resolvers.js → resolvers.mjs} +28 -83
  10. package/dist/rolldown.d.mts +7 -0
  11. package/dist/rolldown.mjs +9 -0
  12. package/dist/rollup.d.mts +7 -0
  13. package/dist/rollup.mjs +9 -0
  14. package/dist/rspack.d.mts +6 -0
  15. package/dist/rspack.mjs +9 -0
  16. package/dist/{src-bfjkatac.js → src-pYuu2TZ_.mjs} +53 -141
  17. package/dist/types-CWfK8m_y.d.mts +217 -0
  18. package/dist/types.d.mts +2 -0
  19. package/dist/types.mjs +1 -0
  20. package/dist/utils-DuuqqWXg.mjs +234 -0
  21. package/dist/vite.d.mts +9 -0
  22. package/dist/vite.mjs +9 -0
  23. package/dist/webpack.d.mts +7 -0
  24. package/dist/webpack.mjs +9 -0
  25. package/package.json +40 -78
  26. package/dist/esbuild.cjs +0 -9
  27. package/dist/esbuild.d.cts +0 -6
  28. package/dist/esbuild.d.ts +0 -7
  29. package/dist/esbuild.js +0 -9
  30. package/dist/index.cjs +0 -9
  31. package/dist/index.d.ts +0 -13
  32. package/dist/index.js +0 -5
  33. package/dist/nuxt.cjs +0 -14
  34. package/dist/nuxt.d.cts +0 -6
  35. package/dist/nuxt.d.ts +0 -7
  36. package/dist/resolvers.cjs +0 -2074
  37. package/dist/resolvers.d.cts +0 -574
  38. package/dist/rolldown.cjs +0 -9
  39. package/dist/rolldown.d.cts +0 -6
  40. package/dist/rolldown.d.ts +0 -7
  41. package/dist/rolldown.js +0 -9
  42. package/dist/rollup.cjs +0 -9
  43. package/dist/rollup.d.cts +0 -6
  44. package/dist/rollup.d.ts +0 -7
  45. package/dist/rollup.js +0 -9
  46. package/dist/rspack.cjs +0 -9
  47. package/dist/rspack.d.cts +0 -5
  48. package/dist/rspack.d.ts +0 -6
  49. package/dist/rspack.js +0 -9
  50. package/dist/src-BTwFq3T3.cjs +0 -188
  51. package/dist/src-D2-JfLYq.js +0 -187
  52. package/dist/src-DAvVDVLg.cjs +0 -769
  53. package/dist/types-CBTc19th.cjs +0 -0
  54. package/dist/types-DSJ5r-ta.d.cts +0 -225
  55. package/dist/types-rC3290ja.d.ts +0 -225
  56. package/dist/types.cjs +0 -1
  57. package/dist/types.d.cts +0 -2
  58. package/dist/types.d.ts +0 -2
  59. package/dist/types.js +0 -3
  60. package/dist/utils-8UQ22cuO.cjs +0 -1689
  61. package/dist/utils-BoXu-4gQ.js +0 -1523
  62. package/dist/vite.cjs +0 -9
  63. package/dist/vite.d.cts +0 -8
  64. package/dist/vite.d.ts +0 -9
  65. package/dist/vite.js +0 -9
  66. package/dist/webpack.cjs +0 -9
  67. package/dist/webpack.d.cts +0 -6
  68. package/dist/webpack.d.ts +0 -7
  69. package/dist/webpack.js +0 -9
  70. /package/dist/{types-DQoXDiso.js → types--fVOUYBq.mjs} +0 -0
@@ -1,1689 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
- key = keys[i];
14
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
- value: mod,
23
- enumerable: true
24
- }) : target, mod));
25
-
26
- //#endregion
27
- let node_process = require("node:process");
28
- node_process = __toESM(node_process);
29
- let node_path = require("node:path");
30
- node_path = __toESM(node_path);
31
- let local_pkg = require("local-pkg");
32
- local_pkg = __toESM(local_pkg);
33
-
34
- //#region node_modules/.pnpm/@antfu+utils@9.3.0/node_modules/@antfu/utils/dist/index.mjs
35
- function toArray(array) {
36
- array = array ?? [];
37
- return Array.isArray(array) ? array : [array];
38
- }
39
- function notNullish(v) {
40
- return v != null;
41
- }
42
- function slash(str) {
43
- return str.replace(/\\/g, "/");
44
- }
45
- const VOID = Symbol("p-void");
46
- /**
47
- * Throttle execution of a function. Especially useful for rate limiting
48
- * execution of handlers on events like resize and scroll.
49
- *
50
- * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
51
- * are most useful.
52
- * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
53
- * as-is, to `callback` when the throttled-function is executed.
54
- * @param {object} [options] - An object to configure options.
55
- * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
56
- * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
57
- * one final time after the last throttled-function call. (After the throttled-function has not been called for
58
- * `delay` milliseconds, the internal counter is reset).
59
- * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
60
- * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
61
- * callback will never executed if both noLeading = true and noTrailing = true.
62
- * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
63
- * false (at end), schedule `callback` to execute after `delay` ms.
64
- *
65
- * @returns {Function} A new, throttled, function.
66
- */
67
- function throttle$1(delay, callback, options) {
68
- var _ref = options || {}, _ref$noTrailing = _ref.noTrailing, noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, _ref$noLeading = _ref.noLeading, noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, _ref$debounceMode = _ref.debounceMode, debounceMode = _ref$debounceMode === void 0 ? void 0 : _ref$debounceMode;
69
- var timeoutID;
70
- var cancelled = false;
71
- var lastExec = 0;
72
- function clearExistingTimeout() {
73
- if (timeoutID) clearTimeout(timeoutID);
74
- }
75
- function cancel(options$1) {
76
- var _ref2$upcomingOnly = (options$1 || {}).upcomingOnly, upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
77
- clearExistingTimeout();
78
- cancelled = !upcomingOnly;
79
- }
80
- function wrapper() {
81
- for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) arguments_[_key] = arguments[_key];
82
- var self = this;
83
- var elapsed = Date.now() - lastExec;
84
- if (cancelled) return;
85
- function exec() {
86
- lastExec = Date.now();
87
- callback.apply(self, arguments_);
88
- }
89
- function clear() {
90
- timeoutID = void 0;
91
- }
92
- if (!noLeading && debounceMode && !timeoutID) exec();
93
- clearExistingTimeout();
94
- if (debounceMode === void 0 && elapsed > delay) if (noLeading) {
95
- lastExec = Date.now();
96
- if (!noTrailing) timeoutID = setTimeout(debounceMode ? clear : exec, delay);
97
- } else exec();
98
- else if (noTrailing !== true) timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === void 0 ? delay - elapsed : delay);
99
- }
100
- wrapper.cancel = cancel;
101
- return wrapper;
102
- }
103
- function throttle(...args) {
104
- return throttle$1(...args);
105
- }
106
-
107
- //#endregion
108
- //#region src/core/constants.ts
109
- const DISABLE_COMMENT = "/* unplugin-vue-components disabled */";
110
- const DIRECTIVE_IMPORT_PREFIX = "v";
111
-
112
- //#endregion
113
- //#region node_modules/.pnpm/@isaacs+balanced-match@4.0.1/node_modules/@isaacs/balanced-match/dist/esm/index.js
114
- const balanced = (a, b, str) => {
115
- const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
116
- const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
117
- const r = ma !== null && mb != null && range(ma, mb, str);
118
- return r && {
119
- start: r[0],
120
- end: r[1],
121
- pre: str.slice(0, r[0]),
122
- body: str.slice(r[0] + ma.length, r[1]),
123
- post: str.slice(r[1] + mb.length)
124
- };
125
- };
126
- const maybeMatch = (reg, str) => {
127
- const m = str.match(reg);
128
- return m ? m[0] : null;
129
- };
130
- const range = (a, b, str) => {
131
- let begs, beg, left, right = void 0, result;
132
- let ai = str.indexOf(a);
133
- let bi = str.indexOf(b, ai + 1);
134
- let i = ai;
135
- if (ai >= 0 && bi > 0) {
136
- if (a === b) return [ai, bi];
137
- begs = [];
138
- left = str.length;
139
- while (i >= 0 && !result) {
140
- if (i === ai) {
141
- begs.push(i);
142
- ai = str.indexOf(a, i + 1);
143
- } else if (begs.length === 1) {
144
- const r = begs.pop();
145
- if (r !== void 0) result = [r, bi];
146
- } else {
147
- beg = begs.pop();
148
- if (beg !== void 0 && beg < left) {
149
- left = beg;
150
- right = bi;
151
- }
152
- bi = str.indexOf(b, i + 1);
153
- }
154
- i = ai < bi && ai >= 0 ? ai : bi;
155
- }
156
- if (begs.length && right !== void 0) result = [left, right];
157
- }
158
- return result;
159
- };
160
-
161
- //#endregion
162
- //#region node_modules/.pnpm/@isaacs+brace-expansion@5.0.0/node_modules/@isaacs/brace-expansion/dist/esm/index.js
163
- const escSlash = "\0SLASH" + Math.random() + "\0";
164
- const escOpen = "\0OPEN" + Math.random() + "\0";
165
- const escClose = "\0CLOSE" + Math.random() + "\0";
166
- const escComma = "\0COMMA" + Math.random() + "\0";
167
- const escPeriod = "\0PERIOD" + Math.random() + "\0";
168
- const escSlashPattern = new RegExp(escSlash, "g");
169
- const escOpenPattern = new RegExp(escOpen, "g");
170
- const escClosePattern = new RegExp(escClose, "g");
171
- const escCommaPattern = new RegExp(escComma, "g");
172
- const escPeriodPattern = new RegExp(escPeriod, "g");
173
- const slashPattern = /\\\\/g;
174
- const openPattern = /\\{/g;
175
- const closePattern = /\\}/g;
176
- const commaPattern = /\\,/g;
177
- const periodPattern = /\\./g;
178
- function numeric(str) {
179
- return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
180
- }
181
- function escapeBraces(str) {
182
- return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
183
- }
184
- function unescapeBraces(str) {
185
- return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
186
- }
187
- /**
188
- * Basically just str.split(","), but handling cases
189
- * where we have nested braced sections, which should be
190
- * treated as individual members, like {a,{b,c},d}
191
- */
192
- function parseCommaParts(str) {
193
- if (!str) return [""];
194
- const parts = [];
195
- const m = balanced("{", "}", str);
196
- if (!m) return str.split(",");
197
- const { pre, body, post } = m;
198
- const p = pre.split(",");
199
- p[p.length - 1] += "{" + body + "}";
200
- const postParts = parseCommaParts(post);
201
- if (post.length) {
202
- p[p.length - 1] += postParts.shift();
203
- p.push.apply(p, postParts);
204
- }
205
- parts.push.apply(parts, p);
206
- return parts;
207
- }
208
- function expand(str) {
209
- if (!str) return [];
210
- if (str.slice(0, 2) === "{}") str = "\\{\\}" + str.slice(2);
211
- return expand_(escapeBraces(str), true).map(unescapeBraces);
212
- }
213
- function embrace(str) {
214
- return "{" + str + "}";
215
- }
216
- function isPadded(el) {
217
- return /^-?0\d/.test(el);
218
- }
219
- function lte(i, y) {
220
- return i <= y;
221
- }
222
- function gte(i, y) {
223
- return i >= y;
224
- }
225
- function expand_(str, isTop) {
226
- /** @type {string[]} */
227
- const expansions = [];
228
- const m = balanced("{", "}", str);
229
- if (!m) return [str];
230
- const pre = m.pre;
231
- const post = m.post.length ? expand_(m.post, false) : [""];
232
- if (/\$$/.test(m.pre)) for (let k = 0; k < post.length; k++) {
233
- const expansion = pre + "{" + m.body + "}" + post[k];
234
- expansions.push(expansion);
235
- }
236
- else {
237
- const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
238
- const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
239
- const isSequence = isNumericSequence || isAlphaSequence;
240
- const isOptions = m.body.indexOf(",") >= 0;
241
- if (!isSequence && !isOptions) {
242
- if (m.post.match(/,(?!,).*\}/)) {
243
- str = m.pre + "{" + m.body + escClose + m.post;
244
- return expand_(str);
245
- }
246
- return [str];
247
- }
248
- let n;
249
- if (isSequence) n = m.body.split(/\.\./);
250
- else {
251
- n = parseCommaParts(m.body);
252
- if (n.length === 1 && n[0] !== void 0) {
253
- n = expand_(n[0], false).map(embrace);
254
- /* c8 ignore start */
255
- if (n.length === 1) return post.map((p) => m.pre + n[0] + p);
256
- }
257
- }
258
- let N;
259
- if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
260
- const x = numeric(n[0]);
261
- const y = numeric(n[1]);
262
- const width = Math.max(n[0].length, n[1].length);
263
- let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
264
- let test = lte;
265
- if (y < x) {
266
- incr *= -1;
267
- test = gte;
268
- }
269
- const pad = n.some(isPadded);
270
- N = [];
271
- for (let i = x; test(i, y); i += incr) {
272
- let c;
273
- if (isAlphaSequence) {
274
- c = String.fromCharCode(i);
275
- if (c === "\\") c = "";
276
- } else {
277
- c = String(i);
278
- if (pad) {
279
- const need = width - c.length;
280
- if (need > 0) {
281
- const z = new Array(need + 1).join("0");
282
- if (i < 0) c = "-" + z + c.slice(1);
283
- else c = z + c;
284
- }
285
- }
286
- }
287
- N.push(c);
288
- }
289
- } else {
290
- N = [];
291
- for (let j = 0; j < n.length; j++) N.push.apply(N, expand_(n[j], false));
292
- }
293
- for (let j = 0; j < N.length; j++) for (let k = 0; k < post.length; k++) {
294
- const expansion = pre + N[j] + post[k];
295
- if (!isTop || isSequence || expansion) expansions.push(expansion);
296
- }
297
- }
298
- return expansions;
299
- }
300
-
301
- //#endregion
302
- //#region node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/assert-valid-pattern.js
303
- const MAX_PATTERN_LENGTH = 1024 * 64;
304
- const assertValidPattern = (pattern) => {
305
- if (typeof pattern !== "string") throw new TypeError("invalid pattern");
306
- if (pattern.length > MAX_PATTERN_LENGTH) throw new TypeError("pattern is too long");
307
- };
308
-
309
- //#endregion
310
- //#region node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/brace-expressions.js
311
- const posixClasses = {
312
- "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
313
- "[:alpha:]": ["\\p{L}\\p{Nl}", true],
314
- "[:ascii:]": ["\\x00-\\x7f", false],
315
- "[:blank:]": ["\\p{Zs}\\t", true],
316
- "[:cntrl:]": ["\\p{Cc}", true],
317
- "[:digit:]": ["\\p{Nd}", true],
318
- "[:graph:]": [
319
- "\\p{Z}\\p{C}",
320
- true,
321
- true
322
- ],
323
- "[:lower:]": ["\\p{Ll}", true],
324
- "[:print:]": ["\\p{C}", true],
325
- "[:punct:]": ["\\p{P}", true],
326
- "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
327
- "[:upper:]": ["\\p{Lu}", true],
328
- "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
329
- "[:xdigit:]": ["A-Fa-f0-9", false]
330
- };
331
- const braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
332
- const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
333
- const rangesToString = (ranges) => ranges.join("");
334
- const parseClass = (glob, position) => {
335
- const pos = position;
336
- /* c8 ignore start */
337
- if (glob.charAt(pos) !== "[") throw new Error("not in a brace expression");
338
- /* c8 ignore stop */
339
- const ranges = [];
340
- const negs = [];
341
- let i = pos + 1;
342
- let sawStart = false;
343
- let uflag = false;
344
- let escaping = false;
345
- let negate = false;
346
- let endPos = pos;
347
- let rangeStart = "";
348
- WHILE: while (i < glob.length) {
349
- const c = glob.charAt(i);
350
- if ((c === "!" || c === "^") && i === pos + 1) {
351
- negate = true;
352
- i++;
353
- continue;
354
- }
355
- if (c === "]" && sawStart && !escaping) {
356
- endPos = i + 1;
357
- break;
358
- }
359
- sawStart = true;
360
- if (c === "\\") {
361
- if (!escaping) {
362
- escaping = true;
363
- i++;
364
- continue;
365
- }
366
- }
367
- if (c === "[" && !escaping) {
368
- for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) if (glob.startsWith(cls, i)) {
369
- if (rangeStart) return [
370
- "$.",
371
- false,
372
- glob.length - pos,
373
- true
374
- ];
375
- i += cls.length;
376
- if (neg) negs.push(unip);
377
- else ranges.push(unip);
378
- uflag = uflag || u;
379
- continue WHILE;
380
- }
381
- }
382
- escaping = false;
383
- if (rangeStart) {
384
- if (c > rangeStart) ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
385
- else if (c === rangeStart) ranges.push(braceEscape(c));
386
- rangeStart = "";
387
- i++;
388
- continue;
389
- }
390
- if (glob.startsWith("-]", i + 1)) {
391
- ranges.push(braceEscape(c + "-"));
392
- i += 2;
393
- continue;
394
- }
395
- if (glob.startsWith("-", i + 1)) {
396
- rangeStart = c;
397
- i += 2;
398
- continue;
399
- }
400
- ranges.push(braceEscape(c));
401
- i++;
402
- }
403
- if (endPos < i) return [
404
- "",
405
- false,
406
- 0,
407
- false
408
- ];
409
- if (!ranges.length && !negs.length) return [
410
- "$.",
411
- false,
412
- glob.length - pos,
413
- true
414
- ];
415
- if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) return [
416
- regexpEscape(ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]),
417
- false,
418
- endPos - pos,
419
- false
420
- ];
421
- const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
422
- const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
423
- return [
424
- ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs,
425
- uflag,
426
- endPos - pos,
427
- true
428
- ];
429
- };
430
-
431
- //#endregion
432
- //#region node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/unescape.js
433
- /**
434
- * Un-escape a string that has been escaped with {@link escape}.
435
- *
436
- * If the {@link windowsPathsNoEscape} option is used, then square-brace
437
- * escapes are removed, but not backslash escapes. For example, it will turn
438
- * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
439
- * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
440
- *
441
- * When `windowsPathsNoEscape` is not set, then both brace escapes and
442
- * backslash escapes are removed.
443
- *
444
- * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
445
- * or unescaped.
446
- */
447
- const unescape = (s, { windowsPathsNoEscape = false } = {}) => {
448
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
449
- };
450
-
451
- //#endregion
452
- //#region node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/ast.js
453
- const types = new Set([
454
- "!",
455
- "?",
456
- "+",
457
- "*",
458
- "@"
459
- ]);
460
- const isExtglobType = (c) => types.has(c);
461
- const startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
462
- const startNoDot = "(?!\\.)";
463
- const addPatternStart = new Set(["[", "."]);
464
- const justDots = new Set(["..", "."]);
465
- const reSpecials = /* @__PURE__ */ new Set("().*{}+?[]^$\\!");
466
- const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
467
- const qmark = "[^/]";
468
- const star$1 = qmark + "*?";
469
- const starNoEmpty = qmark + "+?";
470
- var AST = class AST {
471
- type;
472
- #root;
473
- #hasMagic;
474
- #uflag = false;
475
- #parts = [];
476
- #parent;
477
- #parentIndex;
478
- #negs;
479
- #filledNegs = false;
480
- #options;
481
- #toString;
482
- #emptyExt = false;
483
- constructor(type, parent, options = {}) {
484
- this.type = type;
485
- if (type) this.#hasMagic = true;
486
- this.#parent = parent;
487
- this.#root = this.#parent ? this.#parent.#root : this;
488
- this.#options = this.#root === this ? options : this.#root.#options;
489
- this.#negs = this.#root === this ? [] : this.#root.#negs;
490
- if (type === "!" && !this.#root.#filledNegs) this.#negs.push(this);
491
- this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
492
- }
493
- get hasMagic() {
494
- /* c8 ignore start */
495
- if (this.#hasMagic !== void 0) return this.#hasMagic;
496
- /* c8 ignore stop */
497
- for (const p of this.#parts) {
498
- if (typeof p === "string") continue;
499
- if (p.type || p.hasMagic) return this.#hasMagic = true;
500
- }
501
- return this.#hasMagic;
502
- }
503
- toString() {
504
- if (this.#toString !== void 0) return this.#toString;
505
- if (!this.type) return this.#toString = this.#parts.map((p) => String(p)).join("");
506
- else return this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")";
507
- }
508
- #fillNegs() {
509
- /* c8 ignore start */
510
- if (this !== this.#root) throw new Error("should only call on root");
511
- if (this.#filledNegs) return this;
512
- /* c8 ignore stop */
513
- this.toString();
514
- this.#filledNegs = true;
515
- let n;
516
- while (n = this.#negs.pop()) {
517
- if (n.type !== "!") continue;
518
- let p = n;
519
- let pp = p.#parent;
520
- while (pp) {
521
- for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) for (const part of n.#parts) {
522
- /* c8 ignore start */
523
- if (typeof part === "string") throw new Error("string part in extglob AST??");
524
- /* c8 ignore stop */
525
- part.copyIn(pp.#parts[i]);
526
- }
527
- p = pp;
528
- pp = p.#parent;
529
- }
530
- }
531
- return this;
532
- }
533
- push(...parts) {
534
- for (const p of parts) {
535
- if (p === "") continue;
536
- /* c8 ignore start */
537
- if (typeof p !== "string" && !(p instanceof AST && p.#parent === this)) throw new Error("invalid part: " + p);
538
- /* c8 ignore stop */
539
- this.#parts.push(p);
540
- }
541
- }
542
- toJSON() {
543
- var _this$parent;
544
- const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
545
- if (this.isStart() && !this.type) ret.unshift([]);
546
- if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && ((_this$parent = this.#parent) === null || _this$parent === void 0 ? void 0 : _this$parent.type) === "!")) ret.push({});
547
- return ret;
548
- }
549
- isStart() {
550
- var _this$parent2;
551
- if (this.#root === this) return true;
552
- if (!((_this$parent2 = this.#parent) === null || _this$parent2 === void 0 ? void 0 : _this$parent2.isStart())) return false;
553
- if (this.#parentIndex === 0) return true;
554
- const p = this.#parent;
555
- for (let i = 0; i < this.#parentIndex; i++) {
556
- const pp = p.#parts[i];
557
- if (!(pp instanceof AST && pp.type === "!")) return false;
558
- }
559
- return true;
560
- }
561
- isEnd() {
562
- var _this$parent3, _this$parent4, _this$parent5;
563
- if (this.#root === this) return true;
564
- if (((_this$parent3 = this.#parent) === null || _this$parent3 === void 0 ? void 0 : _this$parent3.type) === "!") return true;
565
- if (!((_this$parent4 = this.#parent) === null || _this$parent4 === void 0 ? void 0 : _this$parent4.isEnd())) return false;
566
- if (!this.type) return (_this$parent5 = this.#parent) === null || _this$parent5 === void 0 ? void 0 : _this$parent5.isEnd();
567
- /* c8 ignore start */
568
- const pl = this.#parent ? this.#parent.#parts.length : 0;
569
- /* c8 ignore stop */
570
- return this.#parentIndex === pl - 1;
571
- }
572
- copyIn(part) {
573
- if (typeof part === "string") this.push(part);
574
- else this.push(part.clone(this));
575
- }
576
- clone(parent) {
577
- const c = new AST(this.type, parent);
578
- for (const p of this.#parts) c.copyIn(p);
579
- return c;
580
- }
581
- static #parseAST(str, ast, pos, opt) {
582
- let escaping = false;
583
- let inBrace = false;
584
- let braceStart = -1;
585
- let braceNeg = false;
586
- if (ast.type === null) {
587
- let i$1 = pos;
588
- let acc$1 = "";
589
- while (i$1 < str.length) {
590
- const c = str.charAt(i$1++);
591
- if (escaping || c === "\\") {
592
- escaping = !escaping;
593
- acc$1 += c;
594
- continue;
595
- }
596
- if (inBrace) {
597
- if (i$1 === braceStart + 1) {
598
- if (c === "^" || c === "!") braceNeg = true;
599
- } else if (c === "]" && !(i$1 === braceStart + 2 && braceNeg)) inBrace = false;
600
- acc$1 += c;
601
- continue;
602
- } else if (c === "[") {
603
- inBrace = true;
604
- braceStart = i$1;
605
- braceNeg = false;
606
- acc$1 += c;
607
- continue;
608
- }
609
- if (!opt.noext && isExtglobType(c) && str.charAt(i$1) === "(") {
610
- ast.push(acc$1);
611
- acc$1 = "";
612
- const ext$1 = new AST(c, ast);
613
- i$1 = AST.#parseAST(str, ext$1, i$1, opt);
614
- ast.push(ext$1);
615
- continue;
616
- }
617
- acc$1 += c;
618
- }
619
- ast.push(acc$1);
620
- return i$1;
621
- }
622
- let i = pos + 1;
623
- let part = new AST(null, ast);
624
- const parts = [];
625
- let acc = "";
626
- while (i < str.length) {
627
- const c = str.charAt(i++);
628
- if (escaping || c === "\\") {
629
- escaping = !escaping;
630
- acc += c;
631
- continue;
632
- }
633
- if (inBrace) {
634
- if (i === braceStart + 1) {
635
- if (c === "^" || c === "!") braceNeg = true;
636
- } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) inBrace = false;
637
- acc += c;
638
- continue;
639
- } else if (c === "[") {
640
- inBrace = true;
641
- braceStart = i;
642
- braceNeg = false;
643
- acc += c;
644
- continue;
645
- }
646
- if (isExtglobType(c) && str.charAt(i) === "(") {
647
- part.push(acc);
648
- acc = "";
649
- const ext$1 = new AST(c, part);
650
- part.push(ext$1);
651
- i = AST.#parseAST(str, ext$1, i, opt);
652
- continue;
653
- }
654
- if (c === "|") {
655
- part.push(acc);
656
- acc = "";
657
- parts.push(part);
658
- part = new AST(null, ast);
659
- continue;
660
- }
661
- if (c === ")") {
662
- if (acc === "" && ast.#parts.length === 0) ast.#emptyExt = true;
663
- part.push(acc);
664
- acc = "";
665
- ast.push(...parts, part);
666
- return i;
667
- }
668
- acc += c;
669
- }
670
- ast.type = null;
671
- ast.#hasMagic = void 0;
672
- ast.#parts = [str.substring(pos - 1)];
673
- return i;
674
- }
675
- static fromGlob(pattern, options = {}) {
676
- const ast = new AST(null, void 0, options);
677
- AST.#parseAST(pattern, ast, 0, options);
678
- return ast;
679
- }
680
- toMMPattern() {
681
- /* c8 ignore start */
682
- if (this !== this.#root) return this.#root.toMMPattern();
683
- /* c8 ignore stop */
684
- const glob = this.toString();
685
- const [re, body, hasMagic, uflag] = this.toRegExpSource();
686
- if (!(hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase())) return body;
687
- const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
688
- return Object.assign(new RegExp(`^${re}$`, flags), {
689
- _src: re,
690
- _glob: glob
691
- });
692
- }
693
- get options() {
694
- return this.#options;
695
- }
696
- toRegExpSource(allowDot) {
697
- const dot = allowDot ?? !!this.#options.dot;
698
- if (this.#root === this) this.#fillNegs();
699
- if (!this.type) {
700
- var _this$parent6;
701
- const noEmpty = this.isStart() && this.isEnd();
702
- const src = this.#parts.map((p) => {
703
- const [re, _, hasMagic, uflag] = typeof p === "string" ? AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
704
- this.#hasMagic = this.#hasMagic || hasMagic;
705
- this.#uflag = this.#uflag || uflag;
706
- return re;
707
- }).join("");
708
- let start$1 = "";
709
- if (this.isStart()) {
710
- if (typeof this.#parts[0] === "string") {
711
- if (!(this.#parts.length === 1 && justDots.has(this.#parts[0]))) {
712
- const aps = addPatternStart;
713
- const needNoTrav = dot && aps.has(src.charAt(0)) || src.startsWith("\\.") && aps.has(src.charAt(2)) || src.startsWith("\\.\\.") && aps.has(src.charAt(4));
714
- const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
715
- start$1 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
716
- }
717
- }
718
- }
719
- let end = "";
720
- if (this.isEnd() && this.#root.#filledNegs && ((_this$parent6 = this.#parent) === null || _this$parent6 === void 0 ? void 0 : _this$parent6.type) === "!") end = "(?:$|\\/)";
721
- return [
722
- start$1 + src + end,
723
- unescape(src),
724
- this.#hasMagic = !!this.#hasMagic,
725
- this.#uflag
726
- ];
727
- }
728
- const repeated = this.type === "*" || this.type === "+";
729
- const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
730
- let body = this.#partsToRegExp(dot);
731
- if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
732
- const s = this.toString();
733
- this.#parts = [s];
734
- this.type = null;
735
- this.#hasMagic = void 0;
736
- return [
737
- s,
738
- unescape(this.toString()),
739
- false,
740
- false
741
- ];
742
- }
743
- let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : this.#partsToRegExp(true);
744
- if (bodyDotAllowed === body) bodyDotAllowed = "";
745
- if (bodyDotAllowed) body = `(?:${body})(?:${bodyDotAllowed})*?`;
746
- let final = "";
747
- if (this.type === "!" && this.#emptyExt) final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
748
- else {
749
- const close = this.type === "!" ? "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star$1 + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
750
- final = start + body + close;
751
- }
752
- return [
753
- final,
754
- unescape(body),
755
- this.#hasMagic = !!this.#hasMagic,
756
- this.#uflag
757
- ];
758
- }
759
- #partsToRegExp(dot) {
760
- return this.#parts.map((p) => {
761
- /* c8 ignore start */
762
- if (typeof p === "string") throw new Error("string type in extglob ast??");
763
- /* c8 ignore stop */
764
- const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
765
- this.#uflag = this.#uflag || uflag;
766
- return re;
767
- }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
768
- }
769
- static #parseGlob(glob, hasMagic, noEmpty = false) {
770
- let escaping = false;
771
- let re = "";
772
- let uflag = false;
773
- for (let i = 0; i < glob.length; i++) {
774
- const c = glob.charAt(i);
775
- if (escaping) {
776
- escaping = false;
777
- re += (reSpecials.has(c) ? "\\" : "") + c;
778
- continue;
779
- }
780
- if (c === "\\") {
781
- if (i === glob.length - 1) re += "\\\\";
782
- else escaping = true;
783
- continue;
784
- }
785
- if (c === "[") {
786
- const [src, needUflag, consumed, magic] = parseClass(glob, i);
787
- if (consumed) {
788
- re += src;
789
- uflag = uflag || needUflag;
790
- i += consumed - 1;
791
- hasMagic = hasMagic || magic;
792
- continue;
793
- }
794
- }
795
- if (c === "*") {
796
- if (noEmpty && glob === "*") re += starNoEmpty;
797
- else re += star$1;
798
- hasMagic = true;
799
- continue;
800
- }
801
- if (c === "?") {
802
- re += qmark;
803
- hasMagic = true;
804
- continue;
805
- }
806
- re += regExpEscape$1(c);
807
- }
808
- return [
809
- re,
810
- unescape(glob),
811
- !!hasMagic,
812
- uflag
813
- ];
814
- }
815
- };
816
-
817
- //#endregion
818
- //#region node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/escape.js
819
- /**
820
- * Escape all magic characters in a glob pattern.
821
- *
822
- * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
823
- * option is used, then characters are escaped by wrapping in `[]`, because
824
- * a magic character wrapped in a character class can only be satisfied by
825
- * that exact character. In this mode, `\` is _not_ escaped, because it is
826
- * not interpreted as a magic character, but instead as a path separator.
827
- */
828
- const escape = (s, { windowsPathsNoEscape = false } = {}) => {
829
- return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
830
- };
831
-
832
- //#endregion
833
- //#region node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/index.js
834
- const minimatch = (p, pattern, options = {}) => {
835
- assertValidPattern(pattern);
836
- if (!options.nocomment && pattern.charAt(0) === "#") return false;
837
- return new Minimatch(pattern, options).match(p);
838
- };
839
- const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
840
- const starDotExtTest = (ext$1) => (f) => !f.startsWith(".") && f.endsWith(ext$1);
841
- const starDotExtTestDot = (ext$1) => (f) => f.endsWith(ext$1);
842
- const starDotExtTestNocase = (ext$1) => {
843
- ext$1 = ext$1.toLowerCase();
844
- return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext$1);
845
- };
846
- const starDotExtTestNocaseDot = (ext$1) => {
847
- ext$1 = ext$1.toLowerCase();
848
- return (f) => f.toLowerCase().endsWith(ext$1);
849
- };
850
- const starDotStarRE = /^\*+\.\*+$/;
851
- const starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
852
- const starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
853
- const dotStarRE = /^\.\*+$/;
854
- const dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
855
- const starRE = /^\*+$/;
856
- const starTest = (f) => f.length !== 0 && !f.startsWith(".");
857
- const starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
858
- const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
859
- const qmarksTestNocase = ([$0, ext$1 = ""]) => {
860
- const noext = qmarksTestNoExt([$0]);
861
- if (!ext$1) return noext;
862
- ext$1 = ext$1.toLowerCase();
863
- return (f) => noext(f) && f.toLowerCase().endsWith(ext$1);
864
- };
865
- const qmarksTestNocaseDot = ([$0, ext$1 = ""]) => {
866
- const noext = qmarksTestNoExtDot([$0]);
867
- if (!ext$1) return noext;
868
- ext$1 = ext$1.toLowerCase();
869
- return (f) => noext(f) && f.toLowerCase().endsWith(ext$1);
870
- };
871
- const qmarksTestDot = ([$0, ext$1 = ""]) => {
872
- const noext = qmarksTestNoExtDot([$0]);
873
- return !ext$1 ? noext : (f) => noext(f) && f.endsWith(ext$1);
874
- };
875
- const qmarksTest = ([$0, ext$1 = ""]) => {
876
- const noext = qmarksTestNoExt([$0]);
877
- return !ext$1 ? noext : (f) => noext(f) && f.endsWith(ext$1);
878
- };
879
- const qmarksTestNoExt = ([$0]) => {
880
- const len = $0.length;
881
- return (f) => f.length === len && !f.startsWith(".");
882
- };
883
- const qmarksTestNoExtDot = ([$0]) => {
884
- const len = $0.length;
885
- return (f) => f.length === len && f !== "." && f !== "..";
886
- };
887
- /* c8 ignore start */
888
- const defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
889
- const path = {
890
- win32: { sep: "\\" },
891
- posix: { sep: "/" }
892
- };
893
- /* c8 ignore stop */
894
- const sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
895
- minimatch.sep = sep;
896
- const GLOBSTAR = Symbol("globstar **");
897
- minimatch.GLOBSTAR = GLOBSTAR;
898
- const star = "[^/]*?";
899
- const twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
900
- const twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
901
- const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
902
- minimatch.filter = filter;
903
- const ext = (a, b = {}) => Object.assign({}, a, b);
904
- const defaults = (def) => {
905
- if (!def || typeof def !== "object" || !Object.keys(def).length) return minimatch;
906
- const orig = minimatch;
907
- const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
908
- return Object.assign(m, {
909
- Minimatch: class Minimatch$1 extends orig.Minimatch {
910
- constructor(pattern, options = {}) {
911
- super(pattern, ext(def, options));
912
- }
913
- static defaults(options) {
914
- return orig.defaults(ext(def, options)).Minimatch;
915
- }
916
- },
917
- AST: class AST$1 extends orig.AST {
918
- /* c8 ignore start */
919
- constructor(type, parent, options = {}) {
920
- super(type, parent, ext(def, options));
921
- }
922
- /* c8 ignore stop */
923
- static fromGlob(pattern, options = {}) {
924
- return orig.AST.fromGlob(pattern, ext(def, options));
925
- }
926
- },
927
- unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
928
- escape: (s, options = {}) => orig.escape(s, ext(def, options)),
929
- filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
930
- defaults: (options) => orig.defaults(ext(def, options)),
931
- makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
932
- braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
933
- match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
934
- sep: orig.sep,
935
- GLOBSTAR
936
- });
937
- };
938
- minimatch.defaults = defaults;
939
- const braceExpand = (pattern, options = {}) => {
940
- assertValidPattern(pattern);
941
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) return [pattern];
942
- return expand(pattern);
943
- };
944
- minimatch.braceExpand = braceExpand;
945
- const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
946
- minimatch.makeRe = makeRe;
947
- const match = (list, pattern, options = {}) => {
948
- const mm = new Minimatch(pattern, options);
949
- list = list.filter((f) => mm.match(f));
950
- if (mm.options.nonull && !list.length) list.push(pattern);
951
- return list;
952
- };
953
- minimatch.match = match;
954
- const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
955
- const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
956
- var Minimatch = class {
957
- options;
958
- set;
959
- pattern;
960
- windowsPathsNoEscape;
961
- nonegate;
962
- negate;
963
- comment;
964
- empty;
965
- preserveMultipleSlashes;
966
- partial;
967
- globSet;
968
- globParts;
969
- nocase;
970
- isWindows;
971
- platform;
972
- windowsNoMagicRoot;
973
- regexp;
974
- constructor(pattern, options = {}) {
975
- assertValidPattern(pattern);
976
- options = options || {};
977
- this.options = options;
978
- this.pattern = pattern;
979
- this.platform = options.platform || defaultPlatform;
980
- this.isWindows = this.platform === "win32";
981
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
982
- if (this.windowsPathsNoEscape) this.pattern = this.pattern.replace(/\\/g, "/");
983
- this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
984
- this.regexp = null;
985
- this.negate = false;
986
- this.nonegate = !!options.nonegate;
987
- this.comment = false;
988
- this.empty = false;
989
- this.partial = !!options.partial;
990
- this.nocase = !!this.options.nocase;
991
- this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
992
- this.globSet = [];
993
- this.globParts = [];
994
- this.set = [];
995
- this.make();
996
- }
997
- hasMagic() {
998
- if (this.options.magicalBraces && this.set.length > 1) return true;
999
- for (const pattern of this.set) for (const part of pattern) if (typeof part !== "string") return true;
1000
- return false;
1001
- }
1002
- debug(..._) {}
1003
- make() {
1004
- const pattern = this.pattern;
1005
- const options = this.options;
1006
- if (!options.nocomment && pattern.charAt(0) === "#") {
1007
- this.comment = true;
1008
- return;
1009
- }
1010
- if (!pattern) {
1011
- this.empty = true;
1012
- return;
1013
- }
1014
- this.parseNegate();
1015
- this.globSet = [...new Set(this.braceExpand())];
1016
- if (options.debug) this.debug = (...args) => console.error(...args);
1017
- this.debug(this.pattern, this.globSet);
1018
- const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
1019
- this.globParts = this.preprocess(rawGlobParts);
1020
- this.debug(this.pattern, this.globParts);
1021
- let set = this.globParts.map((s, _, __) => {
1022
- if (this.isWindows && this.windowsNoMagicRoot) {
1023
- const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
1024
- const isDrive = /^[a-z]:/i.test(s[0]);
1025
- if (isUNC) return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
1026
- else if (isDrive) return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
1027
- }
1028
- return s.map((ss) => this.parse(ss));
1029
- });
1030
- this.debug(this.pattern, set);
1031
- this.set = set.filter((s) => s.indexOf(false) === -1);
1032
- if (this.isWindows) for (let i = 0; i < this.set.length; i++) {
1033
- const p = this.set[i];
1034
- if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) p[2] = "?";
1035
- }
1036
- this.debug(this.pattern, this.set);
1037
- }
1038
- preprocess(globParts) {
1039
- if (this.options.noglobstar) {
1040
- for (let i = 0; i < globParts.length; i++) for (let j = 0; j < globParts[i].length; j++) if (globParts[i][j] === "**") globParts[i][j] = "*";
1041
- }
1042
- const { optimizationLevel = 1 } = this.options;
1043
- if (optimizationLevel >= 2) {
1044
- globParts = this.firstPhasePreProcess(globParts);
1045
- globParts = this.secondPhasePreProcess(globParts);
1046
- } else if (optimizationLevel >= 1) globParts = this.levelOneOptimize(globParts);
1047
- else globParts = this.adjascentGlobstarOptimize(globParts);
1048
- return globParts;
1049
- }
1050
- adjascentGlobstarOptimize(globParts) {
1051
- return globParts.map((parts) => {
1052
- let gs = -1;
1053
- while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1054
- let i = gs;
1055
- while (parts[i + 1] === "**") i++;
1056
- if (i !== gs) parts.splice(gs, i - gs);
1057
- }
1058
- return parts;
1059
- });
1060
- }
1061
- levelOneOptimize(globParts) {
1062
- return globParts.map((parts) => {
1063
- parts = parts.reduce((set, part) => {
1064
- const prev = set[set.length - 1];
1065
- if (part === "**" && prev === "**") return set;
1066
- if (part === "..") {
1067
- if (prev && prev !== ".." && prev !== "." && prev !== "**") {
1068
- set.pop();
1069
- return set;
1070
- }
1071
- }
1072
- set.push(part);
1073
- return set;
1074
- }, []);
1075
- return parts.length === 0 ? [""] : parts;
1076
- });
1077
- }
1078
- levelTwoFileOptimize(parts) {
1079
- if (!Array.isArray(parts)) parts = this.slashSplit(parts);
1080
- let didSomething = false;
1081
- do {
1082
- didSomething = false;
1083
- if (!this.preserveMultipleSlashes) {
1084
- for (let i = 1; i < parts.length - 1; i++) {
1085
- const p = parts[i];
1086
- if (i === 1 && p === "" && parts[0] === "") continue;
1087
- if (p === "." || p === "") {
1088
- didSomething = true;
1089
- parts.splice(i, 1);
1090
- i--;
1091
- }
1092
- }
1093
- if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1094
- didSomething = true;
1095
- parts.pop();
1096
- }
1097
- }
1098
- let dd = 0;
1099
- while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1100
- const p = parts[dd - 1];
1101
- if (p && p !== "." && p !== ".." && p !== "**") {
1102
- didSomething = true;
1103
- parts.splice(dd - 1, 2);
1104
- dd -= 2;
1105
- }
1106
- }
1107
- } while (didSomething);
1108
- return parts.length === 0 ? [""] : parts;
1109
- }
1110
- firstPhasePreProcess(globParts) {
1111
- let didSomething = false;
1112
- do {
1113
- didSomething = false;
1114
- for (let parts of globParts) {
1115
- let gs = -1;
1116
- while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1117
- let gss = gs;
1118
- while (parts[gss + 1] === "**") gss++;
1119
- if (gss > gs) parts.splice(gs + 1, gss - gs);
1120
- let next = parts[gs + 1];
1121
- const p = parts[gs + 2];
1122
- const p2 = parts[gs + 3];
1123
- if (next !== "..") continue;
1124
- if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") continue;
1125
- didSomething = true;
1126
- parts.splice(gs, 1);
1127
- const other = parts.slice(0);
1128
- other[gs] = "**";
1129
- globParts.push(other);
1130
- gs--;
1131
- }
1132
- if (!this.preserveMultipleSlashes) {
1133
- for (let i = 1; i < parts.length - 1; i++) {
1134
- const p = parts[i];
1135
- if (i === 1 && p === "" && parts[0] === "") continue;
1136
- if (p === "." || p === "") {
1137
- didSomething = true;
1138
- parts.splice(i, 1);
1139
- i--;
1140
- }
1141
- }
1142
- if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1143
- didSomething = true;
1144
- parts.pop();
1145
- }
1146
- }
1147
- let dd = 0;
1148
- while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1149
- const p = parts[dd - 1];
1150
- if (p && p !== "." && p !== ".." && p !== "**") {
1151
- didSomething = true;
1152
- const splin = dd === 1 && parts[dd + 1] === "**" ? ["."] : [];
1153
- parts.splice(dd - 1, 2, ...splin);
1154
- if (parts.length === 0) parts.push("");
1155
- dd -= 2;
1156
- }
1157
- }
1158
- }
1159
- } while (didSomething);
1160
- return globParts;
1161
- }
1162
- secondPhasePreProcess(globParts) {
1163
- for (let i = 0; i < globParts.length - 1; i++) for (let j = i + 1; j < globParts.length; j++) {
1164
- const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
1165
- if (matched) {
1166
- globParts[i] = [];
1167
- globParts[j] = matched;
1168
- break;
1169
- }
1170
- }
1171
- return globParts.filter((gs) => gs.length);
1172
- }
1173
- partsMatch(a, b, emptyGSMatch = false) {
1174
- let ai = 0;
1175
- let bi = 0;
1176
- let result = [];
1177
- let which = "";
1178
- while (ai < a.length && bi < b.length) if (a[ai] === b[bi]) {
1179
- result.push(which === "b" ? b[bi] : a[ai]);
1180
- ai++;
1181
- bi++;
1182
- } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
1183
- result.push(a[ai]);
1184
- ai++;
1185
- } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
1186
- result.push(b[bi]);
1187
- bi++;
1188
- } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
1189
- if (which === "b") return false;
1190
- which = "a";
1191
- result.push(a[ai]);
1192
- ai++;
1193
- bi++;
1194
- } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
1195
- if (which === "a") return false;
1196
- which = "b";
1197
- result.push(b[bi]);
1198
- ai++;
1199
- bi++;
1200
- } else return false;
1201
- return a.length === b.length && result;
1202
- }
1203
- parseNegate() {
1204
- if (this.nonegate) return;
1205
- const pattern = this.pattern;
1206
- let negate = false;
1207
- let negateOffset = 0;
1208
- for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
1209
- negate = !negate;
1210
- negateOffset++;
1211
- }
1212
- if (negateOffset) this.pattern = pattern.slice(negateOffset);
1213
- this.negate = negate;
1214
- }
1215
- matchOne(file, pattern, partial = false) {
1216
- const options = this.options;
1217
- if (this.isWindows) {
1218
- const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1219
- const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1220
- const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1221
- const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1222
- const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1223
- const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1224
- if (typeof fdi === "number" && typeof pdi === "number") {
1225
- const [fd, pd] = [file[fdi], pattern[pdi]];
1226
- if (fd.toLowerCase() === pd.toLowerCase()) {
1227
- pattern[pdi] = fd;
1228
- if (pdi > fdi) pattern = pattern.slice(pdi);
1229
- else if (fdi > pdi) file = file.slice(fdi);
1230
- }
1231
- }
1232
- }
1233
- const { optimizationLevel = 1 } = this.options;
1234
- if (optimizationLevel >= 2) file = this.levelTwoFileOptimize(file);
1235
- this.debug("matchOne", this, {
1236
- file,
1237
- pattern
1238
- });
1239
- this.debug("matchOne", file.length, pattern.length);
1240
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1241
- this.debug("matchOne loop");
1242
- var p = pattern[pi];
1243
- var f = file[fi];
1244
- this.debug(pattern, p, f);
1245
- /* c8 ignore start */
1246
- if (p === false) return false;
1247
- /* c8 ignore stop */
1248
- if (p === GLOBSTAR) {
1249
- this.debug("GLOBSTAR", [
1250
- pattern,
1251
- p,
1252
- f
1253
- ]);
1254
- var fr = fi;
1255
- var pr = pi + 1;
1256
- if (pr === pl) {
1257
- this.debug("** at the end");
1258
- for (; fi < fl; fi++) if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
1259
- return true;
1260
- }
1261
- while (fr < fl) {
1262
- var swallowee = file[fr];
1263
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
1264
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
1265
- this.debug("globstar found match!", fr, fl, swallowee);
1266
- return true;
1267
- } else {
1268
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
1269
- this.debug("dot detected!", file, fr, pattern, pr);
1270
- break;
1271
- }
1272
- this.debug("globstar swallow a segment, and continue");
1273
- fr++;
1274
- }
1275
- }
1276
- /* c8 ignore start */
1277
- if (partial) {
1278
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
1279
- if (fr === fl) return true;
1280
- }
1281
- /* c8 ignore stop */
1282
- return false;
1283
- }
1284
- let hit;
1285
- if (typeof p === "string") {
1286
- hit = f === p;
1287
- this.debug("string match", p, f, hit);
1288
- } else {
1289
- hit = p.test(f);
1290
- this.debug("pattern match", p, f, hit);
1291
- }
1292
- if (!hit) return false;
1293
- }
1294
- if (fi === fl && pi === pl) return true;
1295
- else if (fi === fl) return partial;
1296
- else if (pi === pl) return fi === fl - 1 && file[fi] === "";
1297
- else throw new Error("wtf?");
1298
- /* c8 ignore stop */
1299
- }
1300
- braceExpand() {
1301
- return braceExpand(this.pattern, this.options);
1302
- }
1303
- parse(pattern) {
1304
- assertValidPattern(pattern);
1305
- const options = this.options;
1306
- if (pattern === "**") return GLOBSTAR;
1307
- if (pattern === "") return "";
1308
- let m;
1309
- let fastTest = null;
1310
- if (m = pattern.match(starRE)) fastTest = options.dot ? starTestDot : starTest;
1311
- else if (m = pattern.match(starDotExtRE)) fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
1312
- else if (m = pattern.match(qmarksRE)) fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
1313
- else if (m = pattern.match(starDotStarRE)) fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
1314
- else if (m = pattern.match(dotStarRE)) fastTest = dotStarTest;
1315
- const re = AST.fromGlob(pattern, this.options).toMMPattern();
1316
- if (fastTest && typeof re === "object") Reflect.defineProperty(re, "test", { value: fastTest });
1317
- return re;
1318
- }
1319
- makeRe() {
1320
- if (this.regexp || this.regexp === false) return this.regexp;
1321
- const set = this.set;
1322
- if (!set.length) {
1323
- this.regexp = false;
1324
- return this.regexp;
1325
- }
1326
- const options = this.options;
1327
- const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
1328
- const flags = new Set(options.nocase ? ["i"] : []);
1329
- let re = set.map((pattern) => {
1330
- const pp = pattern.map((p) => {
1331
- if (p instanceof RegExp) for (const f of p.flags.split("")) flags.add(f);
1332
- return typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
1333
- });
1334
- pp.forEach((p, i) => {
1335
- const next = pp[i + 1];
1336
- const prev = pp[i - 1];
1337
- if (p !== GLOBSTAR || prev === GLOBSTAR) return;
1338
- if (prev === void 0) if (next !== void 0 && next !== GLOBSTAR) pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
1339
- else pp[i] = twoStar;
1340
- else if (next === void 0) pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
1341
- else if (next !== GLOBSTAR) {
1342
- pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
1343
- pp[i + 1] = GLOBSTAR;
1344
- }
1345
- });
1346
- return pp.filter((p) => p !== GLOBSTAR).join("/");
1347
- }).join("|");
1348
- const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
1349
- re = "^" + open + re + close + "$";
1350
- if (this.negate) re = "^(?!" + re + ").+$";
1351
- try {
1352
- this.regexp = new RegExp(re, [...flags].join(""));
1353
- } catch (ex) {
1354
- this.regexp = false;
1355
- }
1356
- /* c8 ignore stop */
1357
- return this.regexp;
1358
- }
1359
- slashSplit(p) {
1360
- if (this.preserveMultipleSlashes) return p.split("/");
1361
- else if (this.isWindows && /^\/\/[^\/]+/.test(p)) return ["", ...p.split(/\/+/)];
1362
- else return p.split(/\/+/);
1363
- }
1364
- match(f, partial = this.partial) {
1365
- this.debug("match", f, this.pattern);
1366
- if (this.comment) return false;
1367
- if (this.empty) return f === "";
1368
- if (f === "/" && partial) return true;
1369
- const options = this.options;
1370
- if (this.isWindows) f = f.split("\\").join("/");
1371
- const ff = this.slashSplit(f);
1372
- this.debug(this.pattern, "split", ff);
1373
- const set = this.set;
1374
- this.debug(this.pattern, "set", set);
1375
- let filename = ff[ff.length - 1];
1376
- if (!filename) for (let i = ff.length - 2; !filename && i >= 0; i--) filename = ff[i];
1377
- for (let i = 0; i < set.length; i++) {
1378
- const pattern = set[i];
1379
- let file = ff;
1380
- if (options.matchBase && pattern.length === 1) file = [filename];
1381
- if (this.matchOne(file, pattern, partial)) {
1382
- if (options.flipNegate) return true;
1383
- return !this.negate;
1384
- }
1385
- }
1386
- if (options.flipNegate) return false;
1387
- return this.negate;
1388
- }
1389
- static defaults(def) {
1390
- return minimatch.defaults(def).Minimatch;
1391
- }
1392
- };
1393
- /* c8 ignore stop */
1394
- minimatch.AST = AST;
1395
- minimatch.Minimatch = Minimatch;
1396
- minimatch.escape = escape;
1397
- minimatch.unescape = unescape;
1398
-
1399
- //#endregion
1400
- //#region src/core/utils.ts
1401
- const isSSR = Boolean(node_process.default.env.SSR || node_process.default.env.SSG || node_process.default.env.VITE_SSR || node_process.default.env.VITE_SSG);
1402
- function pascalCase(str) {
1403
- return capitalize(camelCase(str));
1404
- }
1405
- function camelCase(str) {
1406
- return str.replace(/-(\w)/g, (_, c) => c ? c.toUpperCase() : "");
1407
- }
1408
- function kebabCase(key) {
1409
- return key.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
1410
- }
1411
- function capitalize(str) {
1412
- return str.charAt(0).toUpperCase() + str.slice(1);
1413
- }
1414
- function parseId(id) {
1415
- const index = id.indexOf("?");
1416
- if (index < 0) return {
1417
- path: id,
1418
- query: {}
1419
- };
1420
- else {
1421
- const query = Object.fromEntries(new URLSearchParams(id.slice(index)));
1422
- return {
1423
- path: id.slice(0, index),
1424
- query
1425
- };
1426
- }
1427
- }
1428
- function isEmpty(value) {
1429
- if (!value || value === null || value === void 0 || Array.isArray(value) && Object.keys(value).length <= 0) return true;
1430
- else return false;
1431
- }
1432
- function matchGlobs(filepath, globs) {
1433
- for (const glob of globs) {
1434
- const isNegated = glob.startsWith("!");
1435
- if (minimatch(slash(filepath), isNegated ? glob.slice(1) : glob)) return !isNegated;
1436
- }
1437
- return false;
1438
- }
1439
- function getTransformedPath(path$1, importPathTransform) {
1440
- if (importPathTransform) {
1441
- const result = importPathTransform(path$1);
1442
- if (result != null) path$1 = result;
1443
- }
1444
- return path$1;
1445
- }
1446
- function stringifyImport(info) {
1447
- if (typeof info === "string") return `import '${info}'`;
1448
- if (!info.as) return `import '${info.from}'`;
1449
- else if (info.name) return `import { ${info.name} as ${info.as} } from '${info.from}'`;
1450
- else return `import ${info.as} from '${info.from}'`;
1451
- }
1452
- function normalizeComponentInfo(info) {
1453
- if ("path" in info) return {
1454
- from: info.path,
1455
- as: info.name,
1456
- name: info.importName,
1457
- sideEffects: info.sideEffects
1458
- };
1459
- return info;
1460
- }
1461
- function stringifyComponentImport({ as: name, from: path$1, name: importName, sideEffects }, ctx) {
1462
- path$1 = getTransformedPath(path$1, ctx.options.importPathTransform);
1463
- const imports = [stringifyImport({
1464
- as: name,
1465
- from: path$1,
1466
- name: importName
1467
- })];
1468
- if (sideEffects) toArray(sideEffects).forEach((i) => imports.push(stringifyImport(i)));
1469
- return imports.join(";");
1470
- }
1471
- function getNameFromFilePath(filePath, options) {
1472
- const { resolvedDirs, directoryAsNamespace, globalNamespaces, collapseSamePrefixes, root } = options;
1473
- const parsedFilePath = (0, node_path.parse)(slash(filePath));
1474
- let strippedPath = "";
1475
- for (const dir of resolvedDirs) if (parsedFilePath.dir.startsWith(dir)) {
1476
- strippedPath = parsedFilePath.dir.slice(dir.length);
1477
- break;
1478
- }
1479
- let folders = strippedPath.slice(1).split("/").filter(Boolean);
1480
- let filename = parsedFilePath.name;
1481
- if (filename === "index" && !directoryAsNamespace) {
1482
- if (isEmpty(folders)) folders = parsedFilePath.dir.slice(root.length + 1).split("/").filter(Boolean);
1483
- filename = `${folders.slice(-1)[0]}`;
1484
- return filename;
1485
- }
1486
- if (directoryAsNamespace) {
1487
- if (globalNamespaces.some((name) => folders.includes(name))) folders = folders.filter((f) => !globalNamespaces.includes(f));
1488
- folders = folders.map((f) => f.replace(/[^a-z0-9\-]/gi, ""));
1489
- if (filename.toLowerCase() === "index") filename = "";
1490
- if (!isEmpty(folders)) {
1491
- let namespaced = [...folders, filename];
1492
- if (collapseSamePrefixes) {
1493
- const collapsed = [];
1494
- for (const fileOrFolderName of namespaced) {
1495
- let cumulativePrefix = "";
1496
- let didCollapse = false;
1497
- const pascalCasedName = pascalCase(fileOrFolderName);
1498
- for (const parentFolder of [...collapsed].reverse()) {
1499
- cumulativePrefix = `${parentFolder}${cumulativePrefix}`;
1500
- if (pascalCasedName.startsWith(cumulativePrefix)) {
1501
- const collapseSamePrefix = pascalCasedName.slice(cumulativePrefix.length);
1502
- collapsed.push(collapseSamePrefix);
1503
- didCollapse = true;
1504
- break;
1505
- }
1506
- }
1507
- if (!didCollapse) collapsed.push(pascalCasedName);
1508
- }
1509
- namespaced = collapsed;
1510
- }
1511
- filename = namespaced.filter(Boolean).join("-");
1512
- }
1513
- return filename;
1514
- }
1515
- return filename;
1516
- }
1517
- function resolveAlias(filepath, alias) {
1518
- const result = filepath;
1519
- if (Array.isArray(alias)) for (const { find, replacement } of alias) result.replace(find, replacement);
1520
- return result;
1521
- }
1522
- async function getPkgVersion(pkgName, defaultVersion) {
1523
- try {
1524
- if ((0, local_pkg.isPackageExists)(pkgName)) {
1525
- const pkg = await (0, local_pkg.getPackageInfo)(pkgName);
1526
- return (pkg === null || pkg === void 0 ? void 0 : pkg.version) ?? defaultVersion;
1527
- } else return defaultVersion;
1528
- } catch (err) {
1529
- console.error(err);
1530
- return defaultVersion;
1531
- }
1532
- }
1533
- function shouldTransform(code) {
1534
- if (code.includes(DISABLE_COMMENT)) return false;
1535
- return true;
1536
- }
1537
- function isExclude(name, exclude) {
1538
- if (!exclude) return false;
1539
- if (typeof exclude === "string") return name === exclude;
1540
- if (exclude instanceof RegExp) return !!name.match(exclude);
1541
- if (Array.isArray(exclude)) {
1542
- for (const item of exclude) if (name === item || name.match(item)) return true;
1543
- }
1544
- return false;
1545
- }
1546
- const ESCAPE_PARENTHESES_REGEX = /[()]/g;
1547
- function escapeSpecialChars(str) {
1548
- return str.replace(ESCAPE_PARENTHESES_REGEX, "\\$&");
1549
- }
1550
-
1551
- //#endregion
1552
- Object.defineProperty(exports, 'DIRECTIVE_IMPORT_PREFIX', {
1553
- enumerable: true,
1554
- get: function () {
1555
- return DIRECTIVE_IMPORT_PREFIX;
1556
- }
1557
- });
1558
- Object.defineProperty(exports, 'DISABLE_COMMENT', {
1559
- enumerable: true,
1560
- get: function () {
1561
- return DISABLE_COMMENT;
1562
- }
1563
- });
1564
- Object.defineProperty(exports, '__commonJS', {
1565
- enumerable: true,
1566
- get: function () {
1567
- return __commonJS;
1568
- }
1569
- });
1570
- Object.defineProperty(exports, '__toESM', {
1571
- enumerable: true,
1572
- get: function () {
1573
- return __toESM;
1574
- }
1575
- });
1576
- Object.defineProperty(exports, 'camelCase', {
1577
- enumerable: true,
1578
- get: function () {
1579
- return camelCase;
1580
- }
1581
- });
1582
- Object.defineProperty(exports, 'escapeSpecialChars', {
1583
- enumerable: true,
1584
- get: function () {
1585
- return escapeSpecialChars;
1586
- }
1587
- });
1588
- Object.defineProperty(exports, 'getNameFromFilePath', {
1589
- enumerable: true,
1590
- get: function () {
1591
- return getNameFromFilePath;
1592
- }
1593
- });
1594
- Object.defineProperty(exports, 'getPkgVersion', {
1595
- enumerable: true,
1596
- get: function () {
1597
- return getPkgVersion;
1598
- }
1599
- });
1600
- Object.defineProperty(exports, 'getTransformedPath', {
1601
- enumerable: true,
1602
- get: function () {
1603
- return getTransformedPath;
1604
- }
1605
- });
1606
- Object.defineProperty(exports, 'isExclude', {
1607
- enumerable: true,
1608
- get: function () {
1609
- return isExclude;
1610
- }
1611
- });
1612
- Object.defineProperty(exports, 'isSSR', {
1613
- enumerable: true,
1614
- get: function () {
1615
- return isSSR;
1616
- }
1617
- });
1618
- Object.defineProperty(exports, 'kebabCase', {
1619
- enumerable: true,
1620
- get: function () {
1621
- return kebabCase;
1622
- }
1623
- });
1624
- Object.defineProperty(exports, 'matchGlobs', {
1625
- enumerable: true,
1626
- get: function () {
1627
- return matchGlobs;
1628
- }
1629
- });
1630
- Object.defineProperty(exports, 'normalizeComponentInfo', {
1631
- enumerable: true,
1632
- get: function () {
1633
- return normalizeComponentInfo;
1634
- }
1635
- });
1636
- Object.defineProperty(exports, 'notNullish', {
1637
- enumerable: true,
1638
- get: function () {
1639
- return notNullish;
1640
- }
1641
- });
1642
- Object.defineProperty(exports, 'parseId', {
1643
- enumerable: true,
1644
- get: function () {
1645
- return parseId;
1646
- }
1647
- });
1648
- Object.defineProperty(exports, 'pascalCase', {
1649
- enumerable: true,
1650
- get: function () {
1651
- return pascalCase;
1652
- }
1653
- });
1654
- Object.defineProperty(exports, 'resolveAlias', {
1655
- enumerable: true,
1656
- get: function () {
1657
- return resolveAlias;
1658
- }
1659
- });
1660
- Object.defineProperty(exports, 'shouldTransform', {
1661
- enumerable: true,
1662
- get: function () {
1663
- return shouldTransform;
1664
- }
1665
- });
1666
- Object.defineProperty(exports, 'slash', {
1667
- enumerable: true,
1668
- get: function () {
1669
- return slash;
1670
- }
1671
- });
1672
- Object.defineProperty(exports, 'stringifyComponentImport', {
1673
- enumerable: true,
1674
- get: function () {
1675
- return stringifyComponentImport;
1676
- }
1677
- });
1678
- Object.defineProperty(exports, 'throttle', {
1679
- enumerable: true,
1680
- get: function () {
1681
- return throttle;
1682
- }
1683
- });
1684
- Object.defineProperty(exports, 'toArray', {
1685
- enumerable: true,
1686
- get: function () {
1687
- return toArray;
1688
- }
1689
- });