@turbo/workspaces 0.0.1 → 0.0.2

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 (3) hide show
  1. package/dist/cli.js +80 -1036
  2. package/dist/index.js +80 -839
  3. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,840 +1,81 @@
1
- "use strict";
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 __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
-
23
- // src/index.ts
24
- var src_exports = {};
25
- __export(src_exports, {
26
- MANAGERS: () => managers_default,
27
- convertMonorepo: () => convertMonorepo,
28
- getWorkspaceDetails: () => getWorkspaceDetails,
29
- install: () => install_default
30
- });
31
- module.exports = __toCommonJS(src_exports);
32
- var import_turbo_utils = require("turbo-utils");
33
-
34
- // src/errors.ts
35
- var ConvertError = class extends Error {
36
- constructor(message) {
37
- super(message);
38
- this.name = "ConvertError";
39
- Error.captureStackTrace(this, ConvertError);
40
- }
41
- };
42
-
43
- // src/managers/pnpm.ts
44
- var import_fs_extra3 = __toESM(require("fs-extra"));
45
- var import_path3 = __toESM(require("path"));
46
- var import_execa = __toESM(require("execa"));
47
-
48
- // src/updateDependencies.ts
49
- var import_fs_extra2 = __toESM(require("fs-extra"));
50
- var import_chalk = __toESM(require("chalk"));
51
- var import_path2 = __toESM(require("path"));
52
-
53
- // src/utils.ts
54
- var import_fs_extra = __toESM(require("fs-extra"));
55
- var import_path = __toESM(require("path"));
56
- var import_fast_glob = __toESM(require("fast-glob"));
57
- var import_js_yaml = __toESM(require("js-yaml"));
58
- var PACKAGE_MANAGER_REGEX = /^(?!_)(.+)@(.+)$/;
59
- function getPackageJson({
60
- workspaceRoot
61
- }) {
62
- const packageJsonPath = import_path.default.join(workspaceRoot, "package.json");
63
- try {
64
- return import_fs_extra.default.readJsonSync(packageJsonPath, "utf8");
65
- } catch (err) {
66
- if (err && typeof err === "object" && "code" in err) {
67
- if (err.code === "ENOENT") {
68
- throw new ConvertError(`no "package.json" found at ${workspaceRoot}`);
69
- }
70
- if (err.code === "EJSONPARSE") {
71
- throw new ConvertError(`failed to parse "package.json" at ${workspaceRoot}`);
72
- }
73
- }
74
- throw new Error(`unexpected error reading "package.json" at ${workspaceRoot}`);
75
- }
76
- }
77
- function getWorkspacePackageManager({
78
- workspaceRoot
79
- }) {
80
- const { packageManager } = getPackageJson({ workspaceRoot });
81
- if (packageManager) {
82
- try {
83
- const match = packageManager.match(PACKAGE_MANAGER_REGEX);
84
- if (match) {
85
- const [_, manager] = match;
86
- return manager;
87
- }
88
- } catch (err) {
89
- }
90
- }
91
- return void 0;
92
- }
93
- function getWorkspaceName({
94
- workspaceRoot
95
- }) {
96
- const packageJson = getPackageJson({ workspaceRoot });
97
- if (packageJson.name) {
98
- return packageJson.name;
99
- }
100
- const workspaceDirectory = import_path.default.basename(workspaceRoot);
101
- return workspaceDirectory;
102
- }
103
- function getPnpmWorkspaces({
104
- workspaceRoot
105
- }) {
106
- const workspaceFile = import_path.default.join(workspaceRoot, "pnpm-workspace.yaml");
107
- if (import_fs_extra.default.existsSync(workspaceFile)) {
108
- try {
109
- const workspaceConfig = import_js_yaml.default.load(import_fs_extra.default.readFileSync(workspaceFile, "utf8"));
110
- if (workspaceConfig instanceof Object && "packages" in workspaceConfig && Array.isArray(workspaceConfig.packages)) {
111
- return workspaceConfig.packages;
112
- }
113
- } catch (err) {
114
- throw new ConvertError(`failed to parse ${workspaceFile}`);
115
- }
116
- }
117
- return [];
118
- }
119
- function expandPaths({
120
- root,
121
- lockFile,
122
- workspaceConfig
123
- }) {
124
- const fromRoot = (p) => import_path.default.join(root, p);
125
- const paths = {
126
- root,
127
- lockfile: fromRoot(lockFile),
128
- packageJson: fromRoot("package.json"),
129
- nodeModules: fromRoot("node_modules")
130
- };
131
- if (workspaceConfig) {
132
- paths.workspaceConfig = fromRoot(workspaceConfig);
133
- }
134
- return paths;
135
- }
136
- function expandWorkspaces({
137
- workspaceRoot,
138
- workspaceGlobs
139
- }) {
140
- if (!workspaceGlobs) {
141
- return [];
142
- }
143
- return workspaceGlobs.flatMap((workspaceGlob) => {
144
- const workspacePackageJsonGlob = `${workspaceGlob}/package.json`;
145
- return import_fast_glob.default.sync(workspacePackageJsonGlob, {
146
- onlyFiles: true,
147
- absolute: true,
148
- cwd: workspaceRoot
149
- });
150
- }).map((workspacePackageJson) => {
151
- const workspaceRoot2 = import_path.default.dirname(workspacePackageJson);
152
- const name = getWorkspaceName({ workspaceRoot: workspaceRoot2 });
153
- return {
154
- name,
155
- paths: {
156
- root: workspaceRoot2,
157
- packageJson: workspacePackageJson,
158
- nodeModules: import_path.default.join(workspaceRoot2, "node_modules")
159
- }
160
- };
161
- });
162
- }
163
- function directoryInfo({ directory }) {
164
- const dir = import_path.default.resolve(process.cwd(), directory);
165
- return { exists: import_fs_extra.default.existsSync(dir), absolute: dir };
166
- }
167
-
168
- // src/updateDependencies.ts
169
- function updateDependencyList({
170
- dependencyList,
171
- project,
172
- to
173
- }) {
174
- const updated = [];
175
- project.workspaceData.workspaces.forEach((workspace) => {
176
- const { name } = workspace;
177
- if (dependencyList[name]) {
178
- const workspaceVersion = dependencyList[name];
179
- const version = workspaceVersion.startsWith("workspace:") ? workspaceVersion.slice("workspace:".length) : workspaceVersion;
180
- dependencyList[name] = to.name === "pnpm" ? `workspace:${version}` : version;
181
- updated.push(name);
182
- }
183
- });
184
- return { dependencyList, updated };
185
- }
186
- function updateDependencies({
187
- project,
188
- workspace,
189
- to,
190
- logger,
191
- options
192
- }) {
193
- if (["yarn", "npm"].includes(to.name) && ["yarn", "npm"].includes(project.packageManager)) {
194
- return;
195
- }
196
- const workspacePackageJson = getPackageJson({
197
- workspaceRoot: workspace.paths.root
198
- });
199
- const stats = {
200
- dependencies: [],
201
- devDependencies: [],
202
- peerDependencies: [],
203
- optionalDependencies: []
204
- };
205
- const allDependencyKeys = [
206
- "dependencies",
207
- "devDependencies",
208
- "peerDependencies",
209
- "optionalDependencies"
210
- ];
211
- allDependencyKeys.forEach((depKey) => {
212
- const depList = workspacePackageJson[depKey];
213
- if (depList) {
214
- const { updated, dependencyList } = updateDependencyList({
215
- dependencyList: depList,
216
- project,
217
- to
218
- });
219
- workspacePackageJson[depKey] = dependencyList;
220
- stats[depKey] = updated;
221
- }
222
- });
223
- const toLog = (key) => {
224
- const total = stats[key].length;
225
- if (total > 0) {
226
- return `${import_chalk.default.green(total.toString())} ${key}`;
227
- }
228
- return void 0;
229
- };
230
- const allChanges = allDependencyKeys.map(toLog).filter(Boolean);
231
- const workspaceLocation = `./${import_path2.default.relative(project.paths.root, workspace.paths.packageJson)}`;
232
- if (allChanges.length >= 1) {
233
- let logLine = "updating";
234
- allChanges.forEach((stat, idx) => {
235
- if (allChanges.length === 1) {
236
- logLine += ` ${stat} in ${workspaceLocation}`;
237
- } else {
238
- if (idx === allChanges.length - 1) {
239
- logLine += `and ${stat} in ${workspaceLocation}`;
240
- } else {
241
- logLine += ` ${stat}, `;
242
- }
243
- }
244
- });
245
- logger.workspaceStep(logLine);
246
- } else {
247
- logger.workspaceStep(`no workspace dependencies found in ${workspaceLocation}`);
248
- }
249
- if (!(options == null ? void 0 : options.dry)) {
250
- import_fs_extra2.default.writeJSONSync(workspace.paths.packageJson, workspacePackageJson, {
251
- spaces: 2
252
- });
253
- }
254
- }
255
-
256
- // src/managers/pnpm.ts
257
- async function detect(args) {
258
- const lockFile = import_path3.default.join(args.workspaceRoot, "pnpm-lock.yaml");
259
- const workspaceFile = import_path3.default.join(args.workspaceRoot, "pnpm-workspace.yaml");
260
- const packageManager = getWorkspacePackageManager({
261
- workspaceRoot: args.workspaceRoot
262
- });
263
- return import_fs_extra3.default.existsSync(lockFile) || import_fs_extra3.default.existsSync(workspaceFile) || packageManager === "pnpm";
264
- }
265
- async function read(args) {
266
- const isPnpm = await detect(args);
267
- if (!isPnpm) {
268
- throw new ConvertError("Not a pnpm project");
269
- }
270
- return {
271
- name: getWorkspaceName(args),
272
- packageManager: "pnpm",
273
- paths: expandPaths({
274
- root: args.workspaceRoot,
275
- lockFile: "pnpm-lock.yaml",
276
- workspaceConfig: "pnpm-workspace.yaml"
277
- }),
278
- workspaceData: {
279
- globs: getPnpmWorkspaces(args),
280
- workspaces: expandWorkspaces({
281
- workspaceGlobs: getPnpmWorkspaces(args),
282
- ...args
283
- })
284
- }
285
- };
286
- }
287
- async function create(args) {
288
- const { project, to, logger, options } = args;
289
- const hasWorkspaces = project.workspaceData.globs.length > 0;
290
- logger.mainStep(`Creating ${project.packageManager}${hasWorkspaces ? "workspaces" : ""}`);
291
- const packageJson = getPackageJson({ workspaceRoot: project.paths.root });
292
- logger.rootHeader();
293
- packageJson.packageManager = `${to.name}@${to.version}`;
294
- logger.rootStep(`adding "packageManager" field to ${project.name} root "package.json"`);
295
- if (!(options == null ? void 0 : options.dry)) {
296
- import_fs_extra3.default.writeJSONSync(project.paths.packageJson, packageJson, { spaces: 2 });
297
- if (hasWorkspaces) {
298
- logger.rootStep(`adding "pnpm-workspace.yaml"`);
299
- import_fs_extra3.default.writeFileSync(import_path3.default.join(project.paths.root, "pnpm-workspace.yaml"), `packages:
300
- ${project.workspaceData.globs.map((w) => ` - "${w}"`).join("\n")}`);
301
- }
302
- }
303
- if (hasWorkspaces) {
304
- updateDependencies({
305
- workspace: { name: "root", paths: project.paths },
306
- project,
307
- to,
308
- logger,
309
- options
310
- });
311
- logger.workspaceHeader();
312
- project.workspaceData.workspaces.forEach((workspace) => updateDependencies({ workspace, project, to, logger, options }));
313
- }
314
- }
315
- async function remove(args) {
316
- const { project, logger, options } = args;
317
- const hasWorkspaces = project.workspaceData.globs.length > 0;
318
- logger.mainStep(`Removing ${project.packageManager}${hasWorkspaces ? "workspaces" : ""}`);
319
- const packageJson = getPackageJson({ workspaceRoot: project.paths.root });
320
- if (project.paths.workspaceConfig && hasWorkspaces) {
321
- logger.subStep(`removing "pnpm-workspace.yaml"`);
322
- if (!(options == null ? void 0 : options.dry)) {
323
- import_fs_extra3.default.rmSync(project.paths.workspaceConfig, { force: true });
324
- }
325
- }
326
- logger.subStep(`removing "packageManager" field in ${project.name} root "package.json"`);
327
- delete packageJson.packageManager;
328
- if (!(options == null ? void 0 : options.dry)) {
329
- import_fs_extra3.default.writeJSONSync(project.paths.packageJson, packageJson, { spaces: 2 });
330
- const allModulesDirs = [
331
- project.paths.nodeModules,
332
- ...project.workspaceData.workspaces.map((w) => w.paths.nodeModules)
333
- ];
334
- try {
335
- logger.subStep(`removing "node_modules"`);
336
- await Promise.all(allModulesDirs.map((dir) => import_fs_extra3.default.rm(dir, { recursive: true, force: true })));
337
- } catch (err) {
338
- throw new ConvertError("Failed to remove node_modules");
339
- }
340
- }
341
- }
342
- async function clean(args) {
343
- const { project, logger, options } = args;
344
- logger.subStep(`removing ${import_path3.default.relative(project.paths.root, project.paths.lockfile)}`);
345
- if (!(options == null ? void 0 : options.dry)) {
346
- import_fs_extra3.default.rmSync(project.paths.lockfile, { force: true });
347
- }
348
- }
349
- async function convertLock(args) {
350
- const { project, logger, options } = args;
351
- if (project.packageManager !== "pnpm") {
352
- logger.subStep(`converting ${import_path3.default.relative(project.paths.root, project.paths.lockfile)} to pnpm-lock.yaml`);
353
- if (!(options == null ? void 0 : options.dry) && import_fs_extra3.default.existsSync(project.paths.lockfile)) {
354
- try {
355
- await (0, import_execa.default)("pnpm", ["import"], {
356
- stdio: "ignore",
357
- cwd: project.paths.root
358
- });
359
- } finally {
360
- import_fs_extra3.default.rmSync(project.paths.lockfile, { force: true });
361
- }
362
- }
363
- }
364
- }
365
- var pnpm = {
366
- detect,
367
- read,
368
- create,
369
- remove,
370
- clean,
371
- convertLock
372
- };
373
- var pnpm_default = pnpm;
374
-
375
- // src/managers/npm.ts
376
- var import_fs_extra4 = __toESM(require("fs-extra"));
377
- var import_path4 = __toESM(require("path"));
378
- async function detect2(args) {
379
- const lockFile = import_path4.default.join(args.workspaceRoot, "package-lock.json");
380
- const packageManager = getWorkspacePackageManager({
381
- workspaceRoot: args.workspaceRoot
382
- });
383
- return import_fs_extra4.default.existsSync(lockFile) || packageManager === "npm";
384
- }
385
- async function read2(args) {
386
- const isNpm = await detect2(args);
387
- if (!isNpm) {
388
- throw new ConvertError("Not an npm project");
389
- }
390
- const packageJson = getPackageJson(args);
391
- return {
392
- name: getWorkspaceName(args),
393
- packageManager: "npm",
394
- paths: expandPaths({
395
- root: args.workspaceRoot,
396
- lockFile: "package-lock.json"
397
- }),
398
- workspaceData: {
399
- globs: packageJson.workspaces || [],
400
- workspaces: expandWorkspaces({
401
- workspaceGlobs: packageJson.workspaces,
402
- ...args
403
- })
404
- }
405
- };
406
- }
407
- async function create2(args) {
408
- const { project, options, to, logger } = args;
409
- const hasWorkspaces = project.workspaceData.globs.length > 0;
410
- logger.mainStep(`Creating ${project.packageManager}${hasWorkspaces ? "workspaces" : ""}`);
411
- const packageJson = getPackageJson({ workspaceRoot: project.paths.root });
412
- logger.rootHeader();
413
- logger.rootStep(`adding "packageManager" field to ${project.name} root "package.json"`);
414
- packageJson.packageManager = `${to.name}@${to.version}`;
415
- if (hasWorkspaces) {
416
- logger.rootStep(`adding "workspaces" field to ${project.name} root "package.json"`);
417
- packageJson.workspaces = project.workspaceData.globs;
418
- updateDependencies({
419
- workspace: { name: "root", paths: project.paths },
420
- project,
421
- to,
422
- logger,
423
- options
424
- });
425
- logger.workspaceHeader();
426
- project.workspaceData.workspaces.forEach((workspace) => updateDependencies({ workspace, project, to, logger, options }));
427
- }
428
- if (!(options == null ? void 0 : options.dry)) {
429
- import_fs_extra4.default.writeJSONSync(project.paths.packageJson, packageJson, { spaces: 2 });
430
- }
431
- }
432
- async function remove2(args) {
433
- const { project, logger, options } = args;
434
- const hasWorkspaces = project.workspaceData.globs.length > 0;
435
- logger.mainStep(`Creating ${project.packageManager}${hasWorkspaces ? "workspaces" : ""}`);
436
- const packageJson = getPackageJson({ workspaceRoot: project.paths.root });
437
- if (hasWorkspaces) {
438
- logger.subStep(`removing "workspaces" field in ${project.name} root "package.json"`);
439
- delete packageJson.workspaces;
440
- }
441
- logger.subStep(`removing "packageManager" field in ${project.name} root "package.json"`);
442
- delete packageJson.packageManager;
443
- if (!(options == null ? void 0 : options.dry)) {
444
- import_fs_extra4.default.writeJSONSync(project.paths.packageJson, packageJson, { spaces: 2 });
445
- const allModulesDirs = [
446
- project.paths.nodeModules,
447
- ...project.workspaceData.workspaces.map((w) => w.paths.nodeModules)
448
- ];
449
- try {
450
- logger.subStep(`removing "node_modules"`);
451
- await Promise.all(allModulesDirs.map((dir) => import_fs_extra4.default.rm(dir, { recursive: true, force: true })));
452
- } catch (err) {
453
- throw new ConvertError("Failed to remove node_modules");
454
- }
455
- }
456
- }
457
- async function clean2(args) {
458
- const { project, logger, options } = args;
459
- logger.subStep(`removing ${import_path4.default.relative(project.paths.root, project.paths.lockfile)}`);
460
- if (!(options == null ? void 0 : options.dry)) {
461
- import_fs_extra4.default.rmSync(project.paths.lockfile, { force: true });
462
- }
463
- }
464
- async function convertLock2(args) {
465
- const { project, options } = args;
466
- if (project.packageManager !== "npm") {
467
- if (!(options == null ? void 0 : options.dry)) {
468
- import_fs_extra4.default.rmSync(project.paths.lockfile, { force: true });
469
- }
470
- }
471
- }
472
- var npm = {
473
- detect: detect2,
474
- read: read2,
475
- create: create2,
476
- remove: remove2,
477
- clean: clean2,
478
- convertLock: convertLock2
479
- };
480
- var npm_default = npm;
481
-
482
- // src/managers/yarn.ts
483
- var import_fs_extra5 = __toESM(require("fs-extra"));
484
- var import_path5 = __toESM(require("path"));
485
- async function detect3(args) {
486
- const lockFile = import_path5.default.join(args.workspaceRoot, "yarn.lock");
487
- const packageManager = getWorkspacePackageManager({
488
- workspaceRoot: args.workspaceRoot
489
- });
490
- return import_fs_extra5.default.existsSync(lockFile) || packageManager === "yarn";
491
- }
492
- async function read3(args) {
493
- const isYarn = await detect3(args);
494
- if (!isYarn) {
495
- throw new ConvertError("Not a yarn project");
496
- }
497
- const packageJson = getPackageJson(args);
498
- return {
499
- name: getWorkspaceName(args),
500
- packageManager: "yarn",
501
- paths: expandPaths({
502
- root: args.workspaceRoot,
503
- lockFile: "yarn.lock"
504
- }),
505
- workspaceData: {
506
- globs: packageJson.workspaces || [],
507
- workspaces: expandWorkspaces({
508
- workspaceGlobs: packageJson.workspaces,
509
- ...args
510
- })
511
- }
512
- };
513
- }
514
- async function create3(args) {
515
- const { project, to, logger, options } = args;
516
- const hasWorkspaces = project.workspaceData.globs.length > 0;
517
- logger.mainStep(`Creating ${project.packageManager}${hasWorkspaces ? "workspaces" : ""}`);
518
- const packageJson = getPackageJson({ workspaceRoot: project.paths.root });
519
- logger.rootHeader();
520
- logger.rootStep(`adding "packageManager" field to ${import_path5.default.relative(project.paths.root, project.paths.packageJson)}`);
521
- packageJson.packageManager = `${to.name}@${to.version}`;
522
- if (hasWorkspaces) {
523
- logger.rootStep(`adding "workspaces" field to ${import_path5.default.relative(project.paths.root, project.paths.packageJson)}`);
524
- packageJson.workspaces = project.workspaceData.globs;
525
- updateDependencies({
526
- workspace: { name: "root", paths: project.paths },
527
- project,
528
- to,
529
- logger,
530
- options
531
- });
532
- logger.workspaceHeader();
533
- project.workspaceData.workspaces.forEach((workspace) => updateDependencies({ workspace, project, to, logger, options }));
534
- }
535
- if (!(options == null ? void 0 : options.dry)) {
536
- import_fs_extra5.default.writeJSONSync(project.paths.packageJson, packageJson, { spaces: 2 });
537
- }
538
- }
539
- async function remove3(args) {
540
- const { project, logger, options } = args;
541
- const hasWorkspaces = project.workspaceData.globs.length > 0;
542
- logger.mainStep(`Removing ${project.packageManager}${hasWorkspaces ? "workspaces" : ""}`);
543
- const packageJson = getPackageJson({ workspaceRoot: project.paths.root });
544
- if (hasWorkspaces) {
545
- logger.subStep(`removing "workspaces" field in ${project.name} root "package.json"`);
546
- delete packageJson.workspaces;
547
- }
548
- logger.subStep(`removing "packageManager" field in ${project.name} root "package.json"`);
549
- delete packageJson.packageManager;
550
- if (!(options == null ? void 0 : options.dry)) {
551
- import_fs_extra5.default.writeJSONSync(project.paths.packageJson, packageJson, { spaces: 2 });
552
- const allModulesDirs = [
553
- project.paths.nodeModules,
554
- ...project.workspaceData.workspaces.map((w) => w.paths.nodeModules)
555
- ];
556
- try {
557
- logger.subStep(`removing "node_modules"`);
558
- await Promise.all(allModulesDirs.map((dir) => import_fs_extra5.default.rm(dir, { recursive: true, force: true })));
559
- } catch (err) {
560
- throw new ConvertError("Failed to remove node_modules");
561
- }
562
- }
563
- }
564
- async function clean3(args) {
565
- const { project, logger, options } = args;
566
- logger.subStep(`removing ${import_path5.default.relative(project.paths.root, project.paths.lockfile)}`);
567
- if (!(options == null ? void 0 : options.dry)) {
568
- import_fs_extra5.default.rmSync(project.paths.lockfile, { force: true });
569
- }
570
- }
571
- async function convertLock3(args) {
572
- const { project, options } = args;
573
- if (project.packageManager !== "yarn") {
574
- if (!(options == null ? void 0 : options.dry)) {
575
- import_fs_extra5.default.rmSync(project.paths.lockfile, { force: true });
576
- }
577
- }
578
- }
579
- var yarn = {
580
- detect: detect3,
581
- read: read3,
582
- create: create3,
583
- remove: remove3,
584
- clean: clean3,
585
- convertLock: convertLock3
586
- };
587
- var yarn_default = yarn;
588
-
589
- // src/managers/index.ts
590
- var MANAGERS = {
591
- pnpm: pnpm_default,
592
- yarn: yarn_default,
593
- npm: npm_default
594
- };
595
- var managers_default = MANAGERS;
596
-
597
- // src/getWorkspaceDetails.ts
598
- async function getWorkspaceDetails({
599
- root
600
- }) {
601
- const { exists, absolute: workspaceRoot } = directoryInfo({
602
- directory: root
603
- });
604
- if (!exists) {
605
- throw new ConvertError(`Could not find directory at ${workspaceRoot}. Ensure the directory exists.`);
606
- }
607
- for (const { detect: detect4, read: read4 } of Object.values(managers_default)) {
608
- if (await detect4({ workspaceRoot })) {
609
- return read4({ workspaceRoot });
610
- }
611
- }
612
- throw new ConvertError("Could not determine workspace manager. Add `packageManager` to `package.json` or ensure a lockfile is present.");
613
- }
614
-
615
- // src/convert.ts
616
- var import_chalk2 = __toESM(require("chalk"));
617
-
618
- // src/install.ts
619
- var import_execa2 = __toESM(require("execa"));
620
- var import_ora = __toESM(require("ora"));
621
- var import_semver = require("semver");
622
- var PACKAGE_MANAGERS = {
623
- npm: [
624
- {
625
- name: "npm",
626
- template: "npm",
627
- command: "npm",
628
- installArgs: ["install"],
629
- version: "latest",
630
- executable: "npx",
631
- semver: "*"
632
- }
633
- ],
634
- pnpm: [
635
- {
636
- name: "pnpm6",
637
- template: "pnpm",
638
- command: "pnpm",
639
- installArgs: ["install"],
640
- version: "latest-6",
641
- executable: "pnpx",
642
- semver: "6.x"
643
- },
644
- {
645
- name: "pnpm",
646
- template: "pnpm",
647
- command: "pnpm",
648
- installArgs: ["install"],
649
- version: "latest",
650
- executable: "pnpm dlx",
651
- semver: ">=7"
652
- }
653
- ],
654
- yarn: [
655
- {
656
- name: "yarn",
657
- template: "yarn",
658
- command: "yarn",
659
- installArgs: ["install"],
660
- version: "1.x",
661
- executable: "npx",
662
- semver: "<2"
663
- },
664
- {
665
- name: "berry",
666
- template: "berry",
667
- command: "yarn",
668
- installArgs: ["install", "--no-immutable"],
669
- version: "stable",
670
- executable: "yarn dlx",
671
- semver: ">=2"
672
- }
673
- ]
674
- };
675
- async function install(args) {
676
- const { to, logger, options } = args;
677
- let packageManager = PACKAGE_MANAGERS[to.name].find((manager) => (0, import_semver.satisfies)(to.version, manager.semver));
678
- if (!packageManager) {
679
- throw new ConvertError("Unsupported package manager version.");
680
- }
681
- logger.subStep(`running "${packageManager.command} ${packageManager.installArgs}"`);
682
- if (!(options == null ? void 0 : options.dry)) {
683
- let spinner;
684
- if (options == null ? void 0 : options.interactive) {
685
- spinner = (0, import_ora.default)({
686
- text: "Installing dependencies...",
687
- spinner: {
688
- frames: logger.installerFrames()
689
- }
690
- }).start();
691
- }
692
- try {
693
- await (0, import_execa2.default)(packageManager.command, packageManager.installArgs, {
694
- cwd: args.project.paths.root
695
- });
696
- logger.subStep(`dependencies installed`);
697
- } catch (err) {
698
- logger.subStepFailure(`failed to install dependencies`);
699
- throw err;
700
- } finally {
701
- if (spinner) {
702
- spinner.stop();
703
- }
704
- }
705
- }
706
- }
707
- var install_default = install;
708
-
709
- // src/convert.ts
710
- async function convert({
711
- project,
712
- to,
713
- logger,
714
- options
715
- }) {
716
- logger.header(`Converting project from ${project.packageManager} to ${to.name}.`);
717
- if (project.packageManager == to.name) {
718
- throw new ConvertError("You are already using this package manager");
719
- }
720
- await managers_default[project.packageManager].remove({
721
- project,
722
- to,
723
- logger,
724
- options
725
- });
726
- await managers_default[to.name].create({ project, to, logger, options });
727
- logger.mainStep("Installing dependencies");
728
- if (!(options == null ? void 0 : options.skipInstall)) {
729
- await managers_default[to.name].convertLock({ project, logger, options });
730
- await install_default({ project, to, logger, options });
731
- } else {
732
- logger.subStep(import_chalk2.default.yellow("Skipping install"));
733
- }
734
- logger.mainStep(`Cleaning up ${project.packageManager} workspaces`);
735
- await managers_default[project.packageManager].clean({ project, logger });
736
- }
737
- var convert_default = convert;
738
-
739
- // src/logger.ts
740
- var import_chalk3 = __toESM(require("chalk"));
741
- var import_gradient_string = __toESM(require("gradient-string"));
742
- var INDENTATION = 2;
743
- var Logger = class {
744
- constructor({
745
- interactive,
746
- dry
747
- } = {}) {
748
- this.interactive = interactive != null ? interactive : true;
749
- this.dry = dry != null ? dry : false;
750
- this.step = 1;
751
- }
752
- logger(...args) {
753
- if (this.interactive) {
754
- console.log(...args);
755
- }
756
- }
757
- indented(level, ...args) {
758
- this.logger(" ".repeat(INDENTATION * level), ...args);
759
- }
760
- header(title) {
761
- this.blankLine();
762
- this.logger(import_chalk3.default.bold(title));
763
- }
764
- installerFrames() {
765
- const prefix = `${" ".repeat(INDENTATION)} - ${this.dry ? import_chalk3.default.yellow("SKIPPED | ") : import_chalk3.default.green("OK | ")}`;
766
- return [`${prefix} `, `${prefix}> `, `${prefix}>> `, `${prefix}>>>`];
767
- }
768
- gradient(text) {
769
- const turboGradient = (0, import_gradient_string.default)("#0099F7", "#F11712");
770
- return turboGradient(text.toString());
771
- }
772
- hero() {
773
- this.logger(import_chalk3.default.bold(this.gradient(`
1
+ "use strict";var Cn=Object.create;var se=Object.defineProperty;var Sn=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var Fn=Object.getPrototypeOf,wn=Object.prototype.hasOwnProperty;var _n=(t,e)=>{for(var r in e)se(t,r,{get:e[r],enumerable:!0})},ze=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of bn(e))!wn.call(t,n)&&n!==r&&se(t,n,{get:()=>e[n],enumerable:!(i=Sn(e,n))||i.enumerable});return t};var pt=(t,e,r)=>(r=t!=null?Cn(Fn(t)):{},ze(e||!t||!t.__esModule?se(r,"default",{value:t,enumerable:!0}):r,t)),kn=t=>ze(se({},"__esModule",{value:!0}),t);var tc={};_n(tc,{MANAGERS:()=>Rt,convertMonorepo:()=>zs,getWorkspaceDetails:()=>ve,install:()=>Ce});module.exports=kn(tc);var xn=Object.create,tr=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,On=Object.getOwnPropertyNames,Rn=Object.getPrototypeOf,Pn=Object.prototype.hasOwnProperty,U=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),Tn=(t,e)=>()=>(t&&(e=t(t=0)),e),R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),In=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of On(e))!Pn.call(t,n)&&n!==r&&tr(t,n,{get:()=>e[n],enumerable:!(i=Bn(e,n))||i.enumerable});return t},Pt=(t,e,r)=>(r=t!=null?xn(Rn(t)):{},In(e||!t||!t.__esModule?tr(r,"default",{value:t,enumerable:!0}):r,t)),B=Tn(()=>{});B();var Nn=R((t,e)=>{B();function r(i){return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),jn=R((t,e)=>{B();var r=Nn().default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var n={},s=Object.prototype,a=s.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},u=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",p=o.toStringTag||"@@toStringTag";function l(w,b,M){return Object.defineProperty(w,b,{value:M,enumerable:!0,configurable:!0,writable:!0}),w[b]}try{l({},"")}catch{l=function(w,b,M){return w[b]=M}}function f(w,b,M,T){var $=b&&b.prototype instanceof D?b:D,j=Object.create($.prototype),K=new k(T||[]);return j._invoke=function(J,Z,N){var nt="suspendedStart";return function(ot,at){if(nt==="executing")throw new Error("Generator is already running");if(nt==="completed"){if(ot==="throw")throw at;return I()}for(N.method=ot,N.arg=at;;){var O=N.delegate;if(O){var L=_(O,N);if(L){if(L===m)continue;return L}}if(N.method==="next")N.sent=N._sent=N.arg;else if(N.method==="throw"){if(nt==="suspendedStart")throw nt="completed",N.arg;N.dispatchException(N.arg)}else N.method==="return"&&N.abrupt("return",N.arg);nt="executing";var G=h(J,Z,N);if(G.type==="normal"){if(nt=N.done?"completed":"suspendedYield",G.arg===m)continue;return{value:G.arg,done:N.done}}G.type==="throw"&&(nt="completed",N.method="throw",N.arg=G.arg)}}}(w,M,K),j}function h(w,b,M){try{return{type:"normal",arg:w.call(b,M)}}catch(T){return{type:"throw",arg:T}}}n.wrap=f;var m={};function D(){}function E(){}function A(){}var d={};l(d,u,function(){return this});var y=Object.getPrototypeOf,S=y&&y(y(P([])));S&&S!==s&&a.call(S,u)&&(d=S);var g=A.prototype=D.prototype=Object.create(d);function v(w){["next","throw","return"].forEach(function(b){l(w,b,function(M){return this._invoke(b,M)})})}function C(w,b){function M($,j,K,J){var Z=h(w[$],w,j);if(Z.type!=="throw"){var N=Z.arg,nt=N.value;return nt&&r(nt)=="object"&&a.call(nt,"__await")?b.resolve(nt.__await).then(function(ot){M("next",ot,K,J)},function(ot){M("throw",ot,K,J)}):b.resolve(nt).then(function(ot){N.value=ot,K(N)},function(ot){return M("throw",ot,K,J)})}J(Z.arg)}var T;this._invoke=function($,j){function K(){return new b(function(J,Z){M($,j,J,Z)})}return T=T?T.then(K,K):K()}}function _(w,b){var M=w.iterator[b.method];if(M===void 0){if(b.delegate=null,b.method==="throw"){if(w.iterator.return&&(b.method="return",b.arg=void 0,_(w,b),b.method==="throw"))return m;b.method="throw",b.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var T=h(M,w.iterator,b.arg);if(T.type==="throw")return b.method="throw",b.arg=T.arg,b.delegate=null,m;var $=T.arg;return $?$.done?(b[w.resultName]=$.value,b.next=w.nextLoc,b.method!=="return"&&(b.method="next",b.arg=void 0),b.delegate=null,m):$:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,m)}function F(w){var b={tryLoc:w[0]};1 in w&&(b.catchLoc=w[1]),2 in w&&(b.finallyLoc=w[2],b.afterLoc=w[3]),this.tryEntries.push(b)}function x(w){var b=w.completion||{};b.type="normal",delete b.arg,w.completion=b}function k(w){this.tryEntries=[{tryLoc:"root"}],w.forEach(F,this),this.reset(!0)}function P(w){if(w){var b=w[u];if(b)return b.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var M=-1,T=function $(){for(;++M<w.length;)if(a.call(w,M))return $.value=w[M],$.done=!1,$;return $.value=void 0,$.done=!0,$};return T.next=T}}return{next:I}}function I(){return{value:void 0,done:!0}}return E.prototype=A,l(g,"constructor",A),l(A,"constructor",E),E.displayName=l(A,p,"GeneratorFunction"),n.isGeneratorFunction=function(w){var b=typeof w=="function"&&w.constructor;return!!b&&(b===E||(b.displayName||b.name)==="GeneratorFunction")},n.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,A):(w.__proto__=A,l(w,p,"GeneratorFunction")),w.prototype=Object.create(g),w},n.awrap=function(w){return{__await:w}},v(C.prototype),l(C.prototype,c,function(){return this}),n.AsyncIterator=C,n.async=function(w,b,M,T,$){$===void 0&&($=Promise);var j=new C(f(w,b,M,T),$);return n.isGeneratorFunction(b)?j:j.next().then(function(K){return K.done?K.value:j.next()})},v(g),l(g,p,"Generator"),l(g,u,function(){return this}),l(g,"toString",function(){return"[object Generator]"}),n.keys=function(w){var b=[];for(var M in w)b.push(M);return b.reverse(),function T(){for(;b.length;){var $=b.pop();if($ in w)return T.value=$,T.done=!1,T}return T.done=!0,T}},n.values=P,k.prototype={constructor:k,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!w)for(var b in this)b.charAt(0)==="t"&&a.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=void 0)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var b=this;function M(Z,N){return j.type="throw",j.arg=w,b.next=Z,N&&(b.method="next",b.arg=void 0),!!N}for(var T=this.tryEntries.length-1;T>=0;--T){var $=this.tryEntries[T],j=$.completion;if($.tryLoc==="root")return M("end");if($.tryLoc<=this.prev){var K=a.call($,"catchLoc"),J=a.call($,"finallyLoc");if(K&&J){if(this.prev<$.catchLoc)return M($.catchLoc,!0);if(this.prev<$.finallyLoc)return M($.finallyLoc)}else if(K){if(this.prev<$.catchLoc)return M($.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return M($.finallyLoc)}}}},abrupt:function(w,b){for(var M=this.tryEntries.length-1;M>=0;--M){var T=this.tryEntries[M];if(T.tryLoc<=this.prev&&a.call(T,"finallyLoc")&&this.prev<T.finallyLoc){var $=T;break}}$&&(w==="break"||w==="continue")&&$.tryLoc<=b&&b<=$.finallyLoc&&($=null);var j=$?$.completion:{};return j.type=w,j.arg=b,$?(this.method="next",this.next=$.finallyLoc,m):this.complete(j)},complete:function(w,b){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&b&&(this.next=b),m},finish:function(w){for(var b=this.tryEntries.length-1;b>=0;--b){var M=this.tryEntries[b];if(M.finallyLoc===w)return this.complete(M.completion,M.afterLoc),x(M),m}},catch:function(w){for(var b=this.tryEntries.length-1;b>=0;--b){var M=this.tryEntries[b];if(M.tryLoc===w){var T=M.completion;if(T.type==="throw"){var $=T.arg;x(M)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(w,b,M){return this.delegate={iterator:P(w),resultName:b,nextLoc:M},this.method==="next"&&(this.arg=void 0),m}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),Mn=R((t,e)=>{B();var r=jn()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),$n=R((t,e)=>{"use strict";B();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),Hn=R((t,e)=>{"use strict";B();var r=$n(),i=n=>{if(!((Number.isInteger(n)||n===1/0)&&n>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let s=[],a=0,o=()=>{a--,s.length>0&&s.shift()()},u=(l,f,...h)=>{a++;let m=r(l,...h);f(m),m.then(o,o)},c=(l,f,...h)=>{a<n?u(l,f,...h):s.push(u.bind(null,l,f,...h))},p=(l,...f)=>new Promise(h=>c(l,h,...f));return Object.defineProperties(p,{activeCount:{get:()=>a},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),p};e.exports=i,e.exports.default=i}),Gn=R((t,e)=>{"use strict";B();var r=Hn(),i=class extends Error{constructor(o){super(),this.value=o}},n=async(o,u)=>u(await o),s=async o=>{let u=await Promise.all(o);if(u[1]===!0)throw new i(u[0]);return!1},a=async(o,u,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let p=r(c.concurrency),l=[...o].map(h=>[h,p(n,h,u)]),f=r(c.preserveOrder?1:1/0);try{await Promise.all(l.map(h=>f(s,h)))}catch(h){if(h instanceof i)return h.value;throw h}};e.exports=a,e.exports.default=a}),Un=R((t,e)=>{"use strict";B();var r=U("path"),i=U("fs"),{promisify:n}=U("util"),s=Gn(),a=n(i.stat),o=n(i.lstat),u={directory:"isDirectory",file:"isFile"};function c({type:l}){if(!(l in u))throw new Error(`Invalid type specified: ${l}`)}var p=(l,f)=>l===void 0||f[u[l]]();e.exports=async(l,f)=>{f={cwd:process.cwd(),type:"file",allowSymlinks:!0,...f},c(f);let h=f.allowSymlinks?a:o;return s(l,async m=>{try{let D=await h(r.resolve(f.cwd,m));return p(f.type,D)}catch{return!1}},f)},e.exports.sync=(l,f)=>{f={cwd:process.cwd(),allowSymlinks:!0,type:"file",...f},c(f);let h=f.allowSymlinks?i.statSync:i.lstatSync;for(let m of l)try{let D=h(r.resolve(f.cwd,m));if(p(f.type,D))return m}catch{}}}),Wn=R((t,e)=>{"use strict";B();var r=U("fs"),{promisify:i}=U("util"),n=i(r.access);e.exports=async s=>{try{return await n(s),!0}catch{return!1}},e.exports.sync=s=>{try{return r.accessSync(s),!0}catch{return!1}}}),Kn=R((t,e)=>{"use strict";B();var r=U("path"),i=Un(),n=Wn(),s=Symbol("findUp.stop");e.exports=async(a,o={})=>{let u=r.resolve(o.cwd||""),{root:c}=r.parse(u),p=[].concat(a),l=async f=>{if(typeof a!="function")return i(p,f);let h=await a(f.cwd);return typeof h=="string"?i([h],f):h};for(;;){let f=await l({...o,cwd:u});if(f===s)return;if(f)return r.resolve(u,f);if(u===c)return;u=r.dirname(u)}},e.exports.sync=(a,o={})=>{let u=r.resolve(o.cwd||""),{root:c}=r.parse(u),p=[].concat(a),l=f=>{if(typeof a!="function")return i.sync(p,f);let h=a(f.cwd);return typeof h=="string"?i.sync([h],f):h};for(;;){let f=l({...o,cwd:u});if(f===s)return;if(f)return r.resolve(u,f);if(u===c)return;u=r.dirname(u)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),bt=R(t=>{"use strict";B(),t.fromCallback=function(e){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")e.apply(this,arguments);else return new Promise((r,i)=>{arguments[arguments.length]=(n,s)=>{if(n)return i(n);r(s)},arguments.length++,e.apply(this,arguments)})},"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty(function(){let r=arguments[arguments.length-1];if(typeof r!="function")return e.apply(this,arguments);e.apply(this,arguments).then(i=>r(null,i),r)},"name",{value:e.name})}}),qn=R((t,e)=>{B();var r=U("constants"),i=process.cwd,n=null,s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return n||(n=i.call(process)),n};try{process.cwd()}catch{}typeof process.chdir=="function"&&(a=process.chdir,process.chdir=function(u){n=null,a.call(process,u)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,a));var a;e.exports=o;function o(u){r.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&c(u),u.lutimes||p(u),u.chown=h(u.chown),u.fchown=h(u.fchown),u.lchown=h(u.lchown),u.chmod=l(u.chmod),u.fchmod=l(u.fchmod),u.lchmod=l(u.lchmod),u.chownSync=m(u.chownSync),u.fchownSync=m(u.fchownSync),u.lchownSync=m(u.lchownSync),u.chmodSync=f(u.chmodSync),u.fchmodSync=f(u.fchmodSync),u.lchmodSync=f(u.lchmodSync),u.stat=D(u.stat),u.fstat=D(u.fstat),u.lstat=D(u.lstat),u.statSync=E(u.statSync),u.fstatSync=E(u.fstatSync),u.lstatSync=E(u.lstatSync),u.chmod&&!u.lchmod&&(u.lchmod=function(d,y,S){S&&process.nextTick(S)},u.lchmodSync=function(){}),u.chown&&!u.lchown&&(u.lchown=function(d,y,S,g){g&&process.nextTick(g)},u.lchownSync=function(){}),s==="win32"&&(u.rename=typeof u.rename!="function"?u.rename:function(d){function y(S,g,v){var C=Date.now(),_=0;d(S,g,function F(x){if(x&&(x.code==="EACCES"||x.code==="EPERM")&&Date.now()-C<6e4){setTimeout(function(){u.stat(g,function(k,P){k&&k.code==="ENOENT"?d(S,g,F):v(x)})},_),_<100&&(_+=10);return}v&&v(x)})}return Object.setPrototypeOf&&Object.setPrototypeOf(y,d),y}(u.rename)),u.read=typeof u.read!="function"?u.read:function(d){function y(S,g,v,C,_,F){var x;if(F&&typeof F=="function"){var k=0;x=function(P,I,w){if(P&&P.code==="EAGAIN"&&k<10)return k++,d.call(u,S,g,v,C,_,x);F.apply(this,arguments)}}return d.call(u,S,g,v,C,_,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(y,d),y}(u.read),u.readSync=typeof u.readSync!="function"?u.readSync:function(d){return function(y,S,g,v,C){for(var _=0;;)try{return d.call(u,y,S,g,v,C)}catch(F){if(F.code==="EAGAIN"&&_<10){_++;continue}throw F}}}(u.readSync);function c(d){d.lchmod=function(y,S,g){d.open(y,r.O_WRONLY|r.O_SYMLINK,S,function(v,C){if(v){g&&g(v);return}d.fchmod(C,S,function(_){d.close(C,function(F){g&&g(_||F)})})})},d.lchmodSync=function(y,S){var g=d.openSync(y,r.O_WRONLY|r.O_SYMLINK,S),v=!0,C;try{C=d.fchmodSync(g,S),v=!1}finally{if(v)try{d.closeSync(g)}catch{}else d.closeSync(g)}return C}}function p(d){r.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(y,S,g,v){d.open(y,r.O_SYMLINK,function(C,_){if(C){v&&v(C);return}d.futimes(_,S,g,function(F){d.close(_,function(x){v&&v(F||x)})})})},d.lutimesSync=function(y,S,g){var v=d.openSync(y,r.O_SYMLINK),C,_=!0;try{C=d.futimesSync(v,S,g),_=!1}finally{if(_)try{d.closeSync(v)}catch{}else d.closeSync(v)}return C}):d.futimes&&(d.lutimes=function(y,S,g,v){v&&process.nextTick(v)},d.lutimesSync=function(){})}function l(d){return d&&function(y,S,g){return d.call(u,y,S,function(v){A(v)&&(v=null),g&&g.apply(this,arguments)})}}function f(d){return d&&function(y,S){try{return d.call(u,y,S)}catch(g){if(!A(g))throw g}}}function h(d){return d&&function(y,S,g,v){return d.call(u,y,S,g,function(C){A(C)&&(C=null),v&&v.apply(this,arguments)})}}function m(d){return d&&function(y,S,g){try{return d.call(u,y,S,g)}catch(v){if(!A(v))throw v}}}function D(d){return d&&function(y,S,g){typeof S=="function"&&(g=S,S=null);function v(C,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),g&&g.apply(this,arguments)}return S?d.call(u,y,S,v):d.call(u,y,v)}}function E(d){return d&&function(y,S){var g=S?d.call(u,y,S):d.call(u,y);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function A(d){if(!d||d.code==="ENOSYS")return!0;var y=!process.getuid||process.getuid()!==0;return!!(y&&(d.code==="EINVAL"||d.code==="EPERM"))}}}),Vn=R((t,e)=>{B();var r=U("stream").Stream;e.exports=i;function i(n){return{ReadStream:s,WriteStream:a};function s(o,u){if(!(this instanceof s))return new s(o,u);r.call(this);var c=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,u=u||{};for(var p=Object.keys(u),l=0,f=p.length;l<f;l++){var h=p[l];this[h]=u[h]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){c._read()});return}n.open(this.path,this.flags,this.mode,function(m,D){if(m){c.emit("error",m),c.readable=!1;return}c.fd=D,c.emit("open",D),c._read()})}function a(o,u){if(!(this instanceof a))return new a(o,u);r.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,u=u||{};for(var c=Object.keys(u),p=0,l=c.length;p<l;p++){var f=c[p];this[f]=u[f]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}),Jn=R((t,e)=>{"use strict";B(),e.exports=i;var r=Object.getPrototypeOf||function(n){return n.__proto__};function i(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var s={__proto__:r(n)};else var s=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(n,a))}),s}}),ht=R((t,e)=>{B();var r=U("fs"),i=qn(),n=Vn(),s=Jn(),a=U("util"),o,u;typeof Symbol=="function"&&typeof Symbol.for=="function"?(o=Symbol.for("graceful-fs.queue"),u=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",u="___graceful-fs.previous");function c(){}function p(d,y){Object.defineProperty(d,o,{get:function(){return y}})}var l=c;a.debuglog?l=a.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(l=function(){var d=a.format.apply(a,arguments);d="GFS4: "+d.split(/\n/).join(`
2
+ GFS4: `),console.error(d)}),r[o]||(f=global[o]||[],p(r,f),r.close=function(d){function y(S,g){return d.call(r,S,function(v){v||E(),typeof g=="function"&&g.apply(this,arguments)})}return Object.defineProperty(y,u,{value:d}),y}(r.close),r.closeSync=function(d){function y(S){d.apply(r,arguments),E()}return Object.defineProperty(y,u,{value:d}),y}(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){l(r[o]),U("assert").equal(r[o].length,0)}));var f;global[o]||p(global,r[o]),e.exports=h(s(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(e.exports=h(r),r.__patched=!0);function h(d){i(d),d.gracefulify=h,d.createReadStream=N,d.createWriteStream=nt;var y=d.readFile;d.readFile=S;function S(O,L,G){return typeof L=="function"&&(G=L,L=null),q(O,L,G);function q(it,et,Q,X){return y(it,et,function(rt){rt&&(rt.code==="EMFILE"||rt.code==="ENFILE")?m([q,[it,et,Q],rt,X||Date.now(),Date.now()]):typeof Q=="function"&&Q.apply(this,arguments)})}}var g=d.writeFile;d.writeFile=v;function v(O,L,G,q){return typeof G=="function"&&(q=G,G=null),it(O,L,G,q);function it(et,Q,X,rt,st){return g(et,Q,X,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?m([it,[et,Q,X,rt],z,st||Date.now(),Date.now()]):typeof rt=="function"&&rt.apply(this,arguments)})}}var C=d.appendFile;C&&(d.appendFile=_);function _(O,L,G,q){return typeof G=="function"&&(q=G,G=null),it(O,L,G,q);function it(et,Q,X,rt,st){return C(et,Q,X,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?m([it,[et,Q,X,rt],z,st||Date.now(),Date.now()]):typeof rt=="function"&&rt.apply(this,arguments)})}}var F=d.copyFile;F&&(d.copyFile=x);function x(O,L,G,q){return typeof G=="function"&&(q=G,G=0),it(O,L,G,q);function it(et,Q,X,rt,st){return F(et,Q,X,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?m([it,[et,Q,X,rt],z,st||Date.now(),Date.now()]):typeof rt=="function"&&rt.apply(this,arguments)})}}var k=d.readdir;d.readdir=I;var P=/^v[0-5]\./;function I(O,L,G){typeof L=="function"&&(G=L,L=null);var q=P.test(process.version)?function(et,Q,X,rt){return k(et,it(et,Q,X,rt))}:function(et,Q,X,rt){return k(et,Q,it(et,Q,X,rt))};return q(O,L,G);function it(et,Q,X,rt){return function(st,z){st&&(st.code==="EMFILE"||st.code==="ENFILE")?m([q,[et,Q,X],st,rt||Date.now(),Date.now()]):(z&&z.sort&&z.sort(),typeof X=="function"&&X.call(this,st,z))}}}if(process.version.substr(0,4)==="v0.8"){var w=n(d);j=w.ReadStream,J=w.WriteStream}var b=d.ReadStream;b&&(j.prototype=Object.create(b.prototype),j.prototype.open=K);var M=d.WriteStream;M&&(J.prototype=Object.create(M.prototype),J.prototype.open=Z),Object.defineProperty(d,"ReadStream",{get:function(){return j},set:function(O){j=O},enumerable:!0,configurable:!0}),Object.defineProperty(d,"WriteStream",{get:function(){return J},set:function(O){J=O},enumerable:!0,configurable:!0});var T=j;Object.defineProperty(d,"FileReadStream",{get:function(){return T},set:function(O){T=O},enumerable:!0,configurable:!0});var $=J;Object.defineProperty(d,"FileWriteStream",{get:function(){return $},set:function(O){$=O},enumerable:!0,configurable:!0});function j(O,L){return this instanceof j?(b.apply(this,arguments),this):j.apply(Object.create(j.prototype),arguments)}function K(){var O=this;at(O.path,O.flags,O.mode,function(L,G){L?(O.autoClose&&O.destroy(),O.emit("error",L)):(O.fd=G,O.emit("open",G),O.read())})}function J(O,L){return this instanceof J?(M.apply(this,arguments),this):J.apply(Object.create(J.prototype),arguments)}function Z(){var O=this;at(O.path,O.flags,O.mode,function(L,G){L?(O.destroy(),O.emit("error",L)):(O.fd=G,O.emit("open",G))})}function N(O,L){return new d.ReadStream(O,L)}function nt(O,L){return new d.WriteStream(O,L)}var ot=d.open;d.open=at;function at(O,L,G,q){return typeof G=="function"&&(q=G,G=null),it(O,L,G,q);function it(et,Q,X,rt,st){return ot(et,Q,X,function(z,Y){z&&(z.code==="EMFILE"||z.code==="ENFILE")?m([it,[et,Q,X,rt],z,st||Date.now(),Date.now()]):typeof rt=="function"&&rt.apply(this,arguments)})}}return d}function m(d){l("ENQUEUE",d[0].name,d[1]),r[o].push(d),A()}var D;function E(){for(var d=Date.now(),y=0;y<r[o].length;++y)r[o][y].length>2&&(r[o][y][3]=d,r[o][y][4]=d);A()}function A(){if(clearTimeout(D),D=void 0,r[o].length!==0){var d=r[o].shift(),y=d[0],S=d[1],g=d[2],v=d[3],C=d[4];if(v===void 0)l("RETRY",y.name,S),y.apply(null,S);else if(Date.now()-v>=6e4){l("TIMEOUT",y.name,S);var _=S.pop();typeof _=="function"&&_.call(null,g)}else{var F=Date.now()-C,x=Math.max(C-v,1),k=Math.min(x*1.2,100);F>=k?(l("RETRY",y.name,S),y.apply(null,S.concat([v]))):r[o].push(d)}D===void 0&&(D=setTimeout(A,0))}}}),er=R(t=>{"use strict";B();var e=bt().fromCallback,r=ht(),i=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof r[n]=="function");Object.keys(r).forEach(n=>{n!=="promises"&&(t[n]=r[n])}),i.forEach(n=>{t[n]=e(r[n])}),t.exists=function(n,s){return typeof s=="function"?r.exists(n,s):new Promise(a=>r.exists(n,a))},t.read=function(n,s,a,o,u,c){return typeof c=="function"?r.read(n,s,a,o,u,c):new Promise((p,l)=>{r.read(n,s,a,o,u,(f,h,m)=>{if(f)return l(f);p({bytesRead:h,buffer:m})})})},t.write=function(n,s,...a){return typeof a[a.length-1]=="function"?r.write(n,s,...a):new Promise((o,u)=>{r.write(n,s,...a,(c,p,l)=>{if(c)return u(c);o({bytesWritten:p,buffer:l})})})},typeof r.realpath.native=="function"&&(t.realpath.native=e(r.realpath.native))}),rr=R((t,e)=>{"use strict";B();var r=U("path");function i(a){return a=r.normalize(r.resolve(a)).split(r.sep),a.length>0?a[0]:null}var n=/[<>:"|?*]/;function s(a){let o=i(a);return a=a.replace(o,""),n.test(a)}e.exports={getRootPath:i,invalidWin32Path:s}}),Yn=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=rr().invalidWin32Path,s=parseInt("0777",8);function a(o,u,c,p){if(typeof u=="function"?(c=u,u={}):(!u||typeof u!="object")&&(u={mode:u}),process.platform==="win32"&&n(o)){let h=new Error(o+" contains invalid WIN32 path characters.");return h.code="EINVAL",c(h)}let l=u.mode,f=u.fs||r;l===void 0&&(l=s&~process.umask()),p||(p=null),c=c||function(){},o=i.resolve(o),f.mkdir(o,l,h=>{if(!h)return p=p||o,c(null,p);switch(h.code){case"ENOENT":if(i.dirname(o)===o)return c(h);a(i.dirname(o),u,(m,D)=>{m?c(m,D):a(o,u,c,D)});break;default:f.stat(o,(m,D)=>{m||!D.isDirectory()?c(h,p):c(null,p)});break}})}e.exports=a}),Qn=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=rr().invalidWin32Path,s=parseInt("0777",8);function a(o,u,c){(!u||typeof u!="object")&&(u={mode:u});let p=u.mode,l=u.fs||r;if(process.platform==="win32"&&n(o)){let f=new Error(o+" contains invalid WIN32 path characters.");throw f.code="EINVAL",f}p===void 0&&(p=s&~process.umask()),c||(c=null),o=i.resolve(o);try{l.mkdirSync(o,p),c=c||o}catch(f){if(f.code==="ENOENT"){if(i.dirname(o)===o)throw f;c=a(i.dirname(o),u,c),a(o,u,c)}else{let h;try{h=l.statSync(o)}catch{throw f}if(!h.isDirectory())throw f}}return c}e.exports=a}),wt=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=r(Yn()),n=Qn();e.exports={mkdirs:i,mkdirsSync:n,mkdirp:i,mkdirpSync:n,ensureDir:i,ensureDirSync:n}}),nr=R((t,e)=>{"use strict";B();var r=ht(),i=U("os"),n=U("path");function s(){let p=n.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));p=n.join(i.tmpdir(),p);let l=new Date(1435410243862);r.writeFileSync(p,"https://github.com/jprichardson/node-fs-extra/pull/141");let f=r.openSync(p,"r+");return r.futimesSync(f,l,l),r.closeSync(f),r.statSync(p).mtime>1435410243e3}function a(p){let l=n.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));l=n.join(i.tmpdir(),l);let f=new Date(1435410243862);r.writeFile(l,"https://github.com/jprichardson/node-fs-extra/pull/141",h=>{if(h)return p(h);r.open(l,"r+",(m,D)=>{if(m)return p(m);r.futimes(D,f,f,E=>{if(E)return p(E);r.close(D,A=>{if(A)return p(A);r.stat(l,(d,y)=>{if(d)return p(d);p(null,y.mtime>1435410243e3)})})})})})}function o(p){if(typeof p=="number")return Math.floor(p/1e3)*1e3;if(p instanceof Date)return new Date(Math.floor(p.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function u(p,l,f,h){r.open(p,"r+",(m,D)=>{if(m)return h(m);r.futimes(D,l,f,E=>{r.close(D,A=>{h&&h(E||A)})})})}function c(p,l,f){let h=r.openSync(p,"r+");return r.futimesSync(h,l,f),r.closeSync(h)}e.exports={hasMillisRes:a,hasMillisResSync:s,timeRemoveMillis:o,utimesMillis:u,utimesMillisSync:c}}),pe=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=10,s=5,a=0,o=process.versions.node.split("."),u=Number.parseInt(o[0],10),c=Number.parseInt(o[1],10),p=Number.parseInt(o[2],10);function l(){return u>n||u===n&&(c>s||c===s&&p>=a)}function f(S,g,v){l()?r.stat(S,{bigint:!0},(C,_)=>{if(C)return v(C);r.stat(g,{bigint:!0},(F,x)=>F?F.code==="ENOENT"?v(null,{srcStat:_,destStat:null}):v(F):v(null,{srcStat:_,destStat:x}))}):r.stat(S,(C,_)=>{if(C)return v(C);r.stat(g,(F,x)=>F?F.code==="ENOENT"?v(null,{srcStat:_,destStat:null}):v(F):v(null,{srcStat:_,destStat:x}))})}function h(S,g){let v,C;l()?v=r.statSync(S,{bigint:!0}):v=r.statSync(S);try{l()?C=r.statSync(g,{bigint:!0}):C=r.statSync(g)}catch(_){if(_.code==="ENOENT")return{srcStat:v,destStat:null};throw _}return{srcStat:v,destStat:C}}function m(S,g,v,C){f(S,g,(_,F)=>{if(_)return C(_);let{srcStat:x,destStat:k}=F;return k&&k.ino&&k.dev&&k.ino===x.ino&&k.dev===x.dev?C(new Error("Source and destination must not be the same.")):x.isDirectory()&&d(S,g)?C(new Error(y(S,g,v))):C(null,{srcStat:x,destStat:k})})}function D(S,g,v){let{srcStat:C,destStat:_}=h(S,g);if(_&&_.ino&&_.dev&&_.ino===C.ino&&_.dev===C.dev)throw new Error("Source and destination must not be the same.");if(C.isDirectory()&&d(S,g))throw new Error(y(S,g,v));return{srcStat:C,destStat:_}}function E(S,g,v,C,_){let F=i.resolve(i.dirname(S)),x=i.resolve(i.dirname(v));if(x===F||x===i.parse(x).root)return _();l()?r.stat(x,{bigint:!0},(k,P)=>k?k.code==="ENOENT"?_():_(k):P.ino&&P.dev&&P.ino===g.ino&&P.dev===g.dev?_(new Error(y(S,v,C))):E(S,g,x,C,_)):r.stat(x,(k,P)=>k?k.code==="ENOENT"?_():_(k):P.ino&&P.dev&&P.ino===g.ino&&P.dev===g.dev?_(new Error(y(S,v,C))):E(S,g,x,C,_))}function A(S,g,v,C){let _=i.resolve(i.dirname(S)),F=i.resolve(i.dirname(v));if(F===_||F===i.parse(F).root)return;let x;try{l()?x=r.statSync(F,{bigint:!0}):x=r.statSync(F)}catch(k){if(k.code==="ENOENT")return;throw k}if(x.ino&&x.dev&&x.ino===g.ino&&x.dev===g.dev)throw new Error(y(S,v,C));return A(S,g,F,C)}function d(S,g){let v=i.resolve(S).split(i.sep).filter(_=>_),C=i.resolve(g).split(i.sep).filter(_=>_);return v.reduce((_,F,x)=>_&&C[x]===F,!0)}function y(S,g,v){return`Cannot ${v} '${S}' to a subdirectory of itself, '${g}'.`}e.exports={checkPaths:m,checkPathsSync:D,checkParentPaths:E,checkParentPathsSync:A,isSrcSubdir:d}}),Xn=R((t,e)=>{"use strict";B(),e.exports=function(r){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(r)}catch{return new Buffer(r)}return new Buffer(r)}}),Zn=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=wt().mkdirsSync,s=nr().utimesMillisSync,a=pe();function o(g,v,C){typeof C=="function"&&(C={filter:C}),C=C||{},C.clobber="clobber"in C?!!C.clobber:!0,C.overwrite="overwrite"in C?!!C.overwrite:C.clobber,C.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
3
+
4
+ see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:_,destStat:F}=a.checkPathsSync(g,v,"copy");return a.checkParentPathsSync(g,_,v,"copy"),u(F,g,v,C)}function u(g,v,C,_){if(_.filter&&!_.filter(v,C))return;let F=i.dirname(C);return r.existsSync(F)||n(F),c(g,v,C,_)}function c(g,v,C,_){if(!(_.filter&&!_.filter(v,C)))return p(g,v,C,_)}function p(g,v,C,_){let F=(_.dereference?r.statSync:r.lstatSync)(v);if(F.isDirectory())return D(F,g,v,C,_);if(F.isFile()||F.isCharacterDevice()||F.isBlockDevice())return l(F,g,v,C,_);if(F.isSymbolicLink())return y(g,v,C,_)}function l(g,v,C,_,F){return v?f(g,C,_,F):h(g,C,_,F)}function f(g,v,C,_){if(_.overwrite)return r.unlinkSync(C),h(g,v,C,_);if(_.errorOnExist)throw new Error(`'${C}' already exists`)}function h(g,v,C,_){return typeof r.copyFileSync=="function"?(r.copyFileSync(v,C),r.chmodSync(C,g.mode),_.preserveTimestamps?s(C,g.atime,g.mtime):void 0):m(g,v,C,_)}function m(g,v,C,_){let F=Xn()(65536),x=r.openSync(v,"r"),k=r.openSync(C,"w",g.mode),P=0;for(;P<g.size;){let I=r.readSync(x,F,0,65536,P);r.writeSync(k,F,0,I),P+=I}_.preserveTimestamps&&r.futimesSync(k,g.atime,g.mtime),r.closeSync(x),r.closeSync(k)}function D(g,v,C,_,F){if(!v)return E(g,C,_,F);if(v&&!v.isDirectory())throw new Error(`Cannot overwrite non-directory '${_}' with directory '${C}'.`);return A(C,_,F)}function E(g,v,C,_){return r.mkdirSync(C),A(v,C,_),r.chmodSync(C,g.mode)}function A(g,v,C){r.readdirSync(g).forEach(_=>d(_,g,v,C))}function d(g,v,C,_){let F=i.join(v,g),x=i.join(C,g),{destStat:k}=a.checkPathsSync(F,x,"copy");return c(k,F,x,_)}function y(g,v,C,_){let F=r.readlinkSync(v);if(_.dereference&&(F=i.resolve(process.cwd(),F)),g){let x;try{x=r.readlinkSync(C)}catch(k){if(k.code==="EINVAL"||k.code==="UNKNOWN")return r.symlinkSync(F,C);throw k}if(_.dereference&&(x=i.resolve(process.cwd(),x)),a.isSrcSubdir(F,x))throw new Error(`Cannot copy '${F}' to a subdirectory of itself, '${x}'.`);if(r.statSync(C).isDirectory()&&a.isSrcSubdir(x,F))throw new Error(`Cannot overwrite '${x}' with '${F}'.`);return S(F,C)}else return r.symlinkSync(F,C)}function S(g,v){return r.unlinkSync(v),r.symlinkSync(g,v)}e.exports=o}),ir=R((t,e)=>{"use strict";B(),e.exports={copySync:Zn()}}),Bt=R((t,e)=>{"use strict";B();var r=bt().fromPromise,i=er();function n(s){return i.access(s).then(()=>!0).catch(()=>!1)}e.exports={pathExists:r(n),pathExistsSync:i.existsSync}}),zn=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=wt().mkdirs,s=Bt().pathExists,a=nr().utimesMillis,o=pe();function u(F,x,k,P){typeof k=="function"&&!P?(P=k,k={}):typeof k=="function"&&(k={filter:k}),P=P||function(){},k=k||{},k.clobber="clobber"in k?!!k.clobber:!0,k.overwrite="overwrite"in k?!!k.overwrite:k.clobber,k.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
5
+
6
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),o.checkPaths(F,x,"copy",(I,w)=>{if(I)return P(I);let{srcStat:b,destStat:M}=w;o.checkParentPaths(F,b,x,"copy",T=>T?P(T):k.filter?p(c,M,F,x,k,P):c(M,F,x,k,P))})}function c(F,x,k,P,I){let w=i.dirname(k);s(w,(b,M)=>{if(b)return I(b);if(M)return l(F,x,k,P,I);n(w,T=>T?I(T):l(F,x,k,P,I))})}function p(F,x,k,P,I,w){Promise.resolve(I.filter(k,P)).then(b=>b?F(x,k,P,I,w):w(),b=>w(b))}function l(F,x,k,P,I){return P.filter?p(f,F,x,k,P,I):f(F,x,k,P,I)}function f(F,x,k,P,I){(P.dereference?r.stat:r.lstat)(x,(w,b)=>{if(w)return I(w);if(b.isDirectory())return d(b,F,x,k,P,I);if(b.isFile()||b.isCharacterDevice()||b.isBlockDevice())return h(b,F,x,k,P,I);if(b.isSymbolicLink())return C(F,x,k,P,I)})}function h(F,x,k,P,I,w){return x?m(F,k,P,I,w):D(F,k,P,I,w)}function m(F,x,k,P,I){if(P.overwrite)r.unlink(k,w=>w?I(w):D(F,x,k,P,I));else return P.errorOnExist?I(new Error(`'${k}' already exists`)):I()}function D(F,x,k,P,I){return typeof r.copyFile=="function"?r.copyFile(x,k,w=>w?I(w):A(F,k,P,I)):E(F,x,k,P,I)}function E(F,x,k,P,I){let w=r.createReadStream(x);w.on("error",b=>I(b)).once("open",()=>{let b=r.createWriteStream(k,{mode:F.mode});b.on("error",M=>I(M)).on("open",()=>w.pipe(b)).once("close",()=>A(F,k,P,I))})}function A(F,x,k,P){r.chmod(x,F.mode,I=>I?P(I):k.preserveTimestamps?a(x,F.atime,F.mtime,P):P())}function d(F,x,k,P,I,w){return x?x&&!x.isDirectory()?w(new Error(`Cannot overwrite non-directory '${P}' with directory '${k}'.`)):S(k,P,I,w):y(F,k,P,I,w)}function y(F,x,k,P,I){r.mkdir(k,w=>{if(w)return I(w);S(x,k,P,b=>b?I(b):r.chmod(k,F.mode,I))})}function S(F,x,k,P){r.readdir(F,(I,w)=>I?P(I):g(w,F,x,k,P))}function g(F,x,k,P,I){let w=F.pop();return w?v(F,w,x,k,P,I):I()}function v(F,x,k,P,I,w){let b=i.join(k,x),M=i.join(P,x);o.checkPaths(b,M,"copy",(T,$)=>{if(T)return w(T);let{destStat:j}=$;l(j,b,M,I,K=>K?w(K):g(F,k,P,I,w))})}function C(F,x,k,P,I){r.readlink(x,(w,b)=>{if(w)return I(w);if(P.dereference&&(b=i.resolve(process.cwd(),b)),F)r.readlink(k,(M,T)=>M?M.code==="EINVAL"||M.code==="UNKNOWN"?r.symlink(b,k,I):I(M):(P.dereference&&(T=i.resolve(process.cwd(),T)),o.isSrcSubdir(b,T)?I(new Error(`Cannot copy '${b}' to a subdirectory of itself, '${T}'.`)):F.isDirectory()&&o.isSrcSubdir(T,b)?I(new Error(`Cannot overwrite '${T}' with '${b}'.`)):_(b,k,I)));else return r.symlink(b,k,I)})}function _(F,x,k){r.unlink(x,P=>P?k(P):r.symlink(F,x,k))}e.exports=u}),or=R((t,e)=>{"use strict";B();var r=bt().fromCallback;e.exports={copy:r(zn())}}),ti=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=U("assert"),s=process.platform==="win32";function a(E){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(A=>{E[A]=E[A]||r[A],A=A+"Sync",E[A]=E[A]||r[A]}),E.maxBusyTries=E.maxBusyTries||3}function o(E,A,d){let y=0;typeof A=="function"&&(d=A,A={}),n(E,"rimraf: missing path"),n.strictEqual(typeof E,"string","rimraf: path should be a string"),n.strictEqual(typeof d,"function","rimraf: callback function required"),n(A,"rimraf: invalid options argument provided"),n.strictEqual(typeof A,"object","rimraf: options should be object"),a(A),u(E,A,function S(g){if(g){if((g.code==="EBUSY"||g.code==="ENOTEMPTY"||g.code==="EPERM")&&y<A.maxBusyTries){y++;let v=y*100;return setTimeout(()=>u(E,A,S),v)}g.code==="ENOENT"&&(g=null)}d(g)})}function u(E,A,d){n(E),n(A),n(typeof d=="function"),A.lstat(E,(y,S)=>{if(y&&y.code==="ENOENT")return d(null);if(y&&y.code==="EPERM"&&s)return c(E,A,y,d);if(S&&S.isDirectory())return l(E,A,y,d);A.unlink(E,g=>{if(g){if(g.code==="ENOENT")return d(null);if(g.code==="EPERM")return s?c(E,A,g,d):l(E,A,g,d);if(g.code==="EISDIR")return l(E,A,g,d)}return d(g)})})}function c(E,A,d,y){n(E),n(A),n(typeof y=="function"),d&&n(d instanceof Error),A.chmod(E,438,S=>{S?y(S.code==="ENOENT"?null:d):A.stat(E,(g,v)=>{g?y(g.code==="ENOENT"?null:d):v.isDirectory()?l(E,A,d,y):A.unlink(E,y)})})}function p(E,A,d){let y;n(E),n(A),d&&n(d instanceof Error);try{A.chmodSync(E,438)}catch(S){if(S.code==="ENOENT")return;throw d}try{y=A.statSync(E)}catch(S){if(S.code==="ENOENT")return;throw d}y.isDirectory()?m(E,A,d):A.unlinkSync(E)}function l(E,A,d,y){n(E),n(A),d&&n(d instanceof Error),n(typeof y=="function"),A.rmdir(E,S=>{S&&(S.code==="ENOTEMPTY"||S.code==="EEXIST"||S.code==="EPERM")?f(E,A,y):S&&S.code==="ENOTDIR"?y(d):y(S)})}function f(E,A,d){n(E),n(A),n(typeof d=="function"),A.readdir(E,(y,S)=>{if(y)return d(y);let g=S.length,v;if(g===0)return A.rmdir(E,d);S.forEach(C=>{o(i.join(E,C),A,_=>{if(!v){if(_)return d(v=_);--g===0&&A.rmdir(E,d)}})})})}function h(E,A){let d;A=A||{},a(A),n(E,"rimraf: missing path"),n.strictEqual(typeof E,"string","rimraf: path should be a string"),n(A,"rimraf: missing options"),n.strictEqual(typeof A,"object","rimraf: options should be object");try{d=A.lstatSync(E)}catch(y){if(y.code==="ENOENT")return;y.code==="EPERM"&&s&&p(E,A,y)}try{d&&d.isDirectory()?m(E,A,null):A.unlinkSync(E)}catch(y){if(y.code==="ENOENT")return;if(y.code==="EPERM")return s?p(E,A,y):m(E,A,y);if(y.code!=="EISDIR")throw y;m(E,A,y)}}function m(E,A,d){n(E),n(A),d&&n(d instanceof Error);try{A.rmdirSync(E)}catch(y){if(y.code==="ENOTDIR")throw d;if(y.code==="ENOTEMPTY"||y.code==="EEXIST"||y.code==="EPERM")D(E,A);else if(y.code!=="ENOENT")throw y}}function D(E,A){if(n(E),n(A),A.readdirSync(E).forEach(d=>h(i.join(E,d),A)),s){let d=Date.now();do try{return A.rmdirSync(E,A)}catch{}while(Date.now()-d<500)}else return A.rmdirSync(E,A)}e.exports=o,o.sync=h}),fe=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=ti();e.exports={remove:r(i),removeSync:i.sync}}),ei=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=ht(),n=U("path"),s=wt(),a=fe(),o=r(function(c,p){p=p||function(){},i.readdir(c,(l,f)=>{if(l)return s.mkdirs(c,p);f=f.map(m=>n.join(c,m)),h();function h(){let m=f.pop();if(!m)return p();a.remove(m,D=>{if(D)return p(D);h()})}})});function u(c){let p;try{p=i.readdirSync(c)}catch{return s.mkdirsSync(c)}p.forEach(l=>{l=n.join(c,l),a.removeSync(l)})}e.exports={emptyDirSync:u,emptydirSync:u,emptyDir:o,emptydir:o}}),ri=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=U("path"),n=ht(),s=wt(),a=Bt().pathExists;function o(c,p){function l(){n.writeFile(c,"",f=>{if(f)return p(f);p()})}n.stat(c,(f,h)=>{if(!f&&h.isFile())return p();let m=i.dirname(c);a(m,(D,E)=>{if(D)return p(D);if(E)return l();s.mkdirs(m,A=>{if(A)return p(A);l()})})})}function u(c){let p;try{p=n.statSync(c)}catch{}if(p&&p.isFile())return;let l=i.dirname(c);n.existsSync(l)||s.mkdirsSync(l),n.writeFileSync(c,"")}e.exports={createFile:r(o),createFileSync:u}}),ni=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=U("path"),n=ht(),s=wt(),a=Bt().pathExists;function o(c,p,l){function f(h,m){n.link(h,m,D=>{if(D)return l(D);l(null)})}a(p,(h,m)=>{if(h)return l(h);if(m)return l(null);n.lstat(c,D=>{if(D)return D.message=D.message.replace("lstat","ensureLink"),l(D);let E=i.dirname(p);a(E,(A,d)=>{if(A)return l(A);if(d)return f(c,p);s.mkdirs(E,y=>{if(y)return l(y);f(c,p)})})})})}function u(c,p){if(n.existsSync(p))return;try{n.lstatSync(c)}catch(f){throw f.message=f.message.replace("lstat","ensureLink"),f}let l=i.dirname(p);return n.existsSync(l)||s.mkdirsSync(l),n.linkSync(c,p)}e.exports={createLink:r(o),createLinkSync:u}}),ii=R((t,e)=>{"use strict";B();var r=U("path"),i=ht(),n=Bt().pathExists;function s(o,u,c){if(r.isAbsolute(o))return i.lstat(o,p=>p?(p.message=p.message.replace("lstat","ensureSymlink"),c(p)):c(null,{toCwd:o,toDst:o}));{let p=r.dirname(u),l=r.join(p,o);return n(l,(f,h)=>f?c(f):h?c(null,{toCwd:l,toDst:o}):i.lstat(o,m=>m?(m.message=m.message.replace("lstat","ensureSymlink"),c(m)):c(null,{toCwd:o,toDst:r.relative(p,o)})))}}function a(o,u){let c;if(r.isAbsolute(o)){if(c=i.existsSync(o),!c)throw new Error("absolute srcpath does not exist");return{toCwd:o,toDst:o}}else{let p=r.dirname(u),l=r.join(p,o);if(c=i.existsSync(l),c)return{toCwd:l,toDst:o};if(c=i.existsSync(o),!c)throw new Error("relative srcpath does not exist");return{toCwd:o,toDst:r.relative(p,o)}}}e.exports={symlinkPaths:s,symlinkPathsSync:a}}),oi=R((t,e)=>{"use strict";B();var r=ht();function i(s,a,o){if(o=typeof a=="function"?a:o,a=typeof a=="function"?!1:a,a)return o(null,a);r.lstat(s,(u,c)=>{if(u)return o(null,"file");a=c&&c.isDirectory()?"dir":"file",o(null,a)})}function n(s,a){let o;if(a)return a;try{o=r.lstatSync(s)}catch{return"file"}return o&&o.isDirectory()?"dir":"file"}e.exports={symlinkType:i,symlinkTypeSync:n}}),ui=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=U("path"),n=ht(),s=wt(),a=s.mkdirs,o=s.mkdirsSync,u=ii(),c=u.symlinkPaths,p=u.symlinkPathsSync,l=oi(),f=l.symlinkType,h=l.symlinkTypeSync,m=Bt().pathExists;function D(A,d,y,S){S=typeof y=="function"?y:S,y=typeof y=="function"?!1:y,m(d,(g,v)=>{if(g)return S(g);if(v)return S(null);c(A,d,(C,_)=>{if(C)return S(C);A=_.toDst,f(_.toCwd,y,(F,x)=>{if(F)return S(F);let k=i.dirname(d);m(k,(P,I)=>{if(P)return S(P);if(I)return n.symlink(A,d,x,S);a(k,w=>{if(w)return S(w);n.symlink(A,d,x,S)})})})})})}function E(A,d,y){if(n.existsSync(d))return;let S=p(A,d);A=S.toDst,y=h(S.toCwd,y);let g=i.dirname(d);return n.existsSync(g)||o(g),n.symlinkSync(A,d,y)}e.exports={createSymlink:r(D),createSymlinkSync:E}}),ai=R((t,e)=>{"use strict";B();var r=ri(),i=ni(),n=ui();e.exports={createFile:r.createFile,createFileSync:r.createFileSync,ensureFile:r.createFile,ensureFileSync:r.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:n.createSymlink,createSymlinkSync:n.createSymlinkSync,ensureSymlink:n.createSymlink,ensureSymlinkSync:n.createSymlinkSync}}),si=R((t,e)=>{B();var r;try{r=ht()}catch{r=U("fs")}function i(p,l,f){f==null&&(f=l,l={}),typeof l=="string"&&(l={encoding:l}),l=l||{};var h=l.fs||r,m=!0;"throws"in l&&(m=l.throws),h.readFile(p,l,function(D,E){if(D)return f(D);E=u(E);var A;try{A=JSON.parse(E,l?l.reviver:null)}catch(d){return m?(d.message=p+": "+d.message,f(d)):f(null,null)}f(null,A)})}function n(p,l){l=l||{},typeof l=="string"&&(l={encoding:l});var f=l.fs||r,h=!0;"throws"in l&&(h=l.throws);try{var m=f.readFileSync(p,l);return m=u(m),JSON.parse(m,l.reviver)}catch(D){if(h)throw D.message=p+": "+D.message,D;return null}}function s(p,l){var f,h=`
7
+ `;typeof l=="object"&&l!==null&&(l.spaces&&(f=l.spaces),l.EOL&&(h=l.EOL));var m=JSON.stringify(p,l?l.replacer:null,f);return m.replace(/\n/g,h)+h}function a(p,l,f,h){h==null&&(h=f,f={}),f=f||{};var m=f.fs||r,D="";try{D=s(l,f)}catch(E){h&&h(E,null);return}m.writeFile(p,D,f,h)}function o(p,l,f){f=f||{};var h=f.fs||r,m=s(l,f);return h.writeFileSync(p,m,f)}function u(p){return Buffer.isBuffer(p)&&(p=p.toString("utf8")),p=p.replace(/^\uFEFF/,""),p}var c={readFile:i,readFileSync:n,writeFile:a,writeFileSync:o};e.exports=c}),ke=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=si();e.exports={readJson:r(i.readFile),readJsonSync:i.readFileSync,writeJson:r(i.writeFile),writeJsonSync:i.writeFileSync}}),ci=R((t,e)=>{"use strict";B();var r=U("path"),i=wt(),n=Bt().pathExists,s=ke();function a(o,u,c,p){typeof c=="function"&&(p=c,c={});let l=r.dirname(o);n(l,(f,h)=>{if(f)return p(f);if(h)return s.writeJson(o,u,c,p);i.mkdirs(l,m=>{if(m)return p(m);s.writeJson(o,u,c,p)})})}e.exports=a}),li=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=wt(),s=ke();function a(o,u,c){let p=i.dirname(o);r.existsSync(p)||n.mkdirsSync(p),s.writeJsonSync(o,u,c)}e.exports=a}),pi=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=ke();i.outputJson=r(ci()),i.outputJsonSync=li(),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i}),fi=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=ir().copySync,s=fe().removeSync,a=wt().mkdirpSync,o=pe();function u(f,h,m){m=m||{};let D=m.overwrite||m.clobber||!1,{srcStat:E}=o.checkPathsSync(f,h,"move");return o.checkParentPathsSync(f,E,h,"move"),a(i.dirname(h)),c(f,h,D)}function c(f,h,m){if(m)return s(h),p(f,h,m);if(r.existsSync(h))throw new Error("dest already exists.");return p(f,h,m)}function p(f,h,m){try{r.renameSync(f,h)}catch(D){if(D.code!=="EXDEV")throw D;return l(f,h,m)}}function l(f,h,m){return n(f,h,{overwrite:m,errorOnExist:!0}),s(f)}e.exports=u}),di=R((t,e)=>{"use strict";B(),e.exports={moveSync:fi()}}),hi=R((t,e)=>{"use strict";B();var r=ht(),i=U("path"),n=or().copy,s=fe().remove,a=wt().mkdirp,o=Bt().pathExists,u=pe();function c(h,m,D,E){typeof D=="function"&&(E=D,D={});let A=D.overwrite||D.clobber||!1;u.checkPaths(h,m,"move",(d,y)=>{if(d)return E(d);let{srcStat:S}=y;u.checkParentPaths(h,S,m,"move",g=>{if(g)return E(g);a(i.dirname(m),v=>v?E(v):p(h,m,A,E))})})}function p(h,m,D,E){if(D)return s(m,A=>A?E(A):l(h,m,D,E));o(m,(A,d)=>A?E(A):d?E(new Error("dest already exists.")):l(h,m,D,E))}function l(h,m,D,E){r.rename(h,m,A=>A?A.code!=="EXDEV"?E(A):f(h,m,D,E):E())}function f(h,m,D,E){n(h,m,{overwrite:D,errorOnExist:!0},A=>A?E(A):s(h,E))}e.exports=c}),mi=R((t,e)=>{"use strict";B();var r=bt().fromCallback;e.exports={move:r(hi())}}),gi=R((t,e)=>{"use strict";B();var r=bt().fromCallback,i=ht(),n=U("path"),s=wt(),a=Bt().pathExists;function o(c,p,l,f){typeof l=="function"&&(f=l,l="utf8");let h=n.dirname(c);a(h,(m,D)=>{if(m)return f(m);if(D)return i.writeFile(c,p,l,f);s.mkdirs(h,E=>{if(E)return f(E);i.writeFile(c,p,l,f)})})}function u(c,...p){let l=n.dirname(c);if(i.existsSync(l))return i.writeFileSync(c,...p);s.mkdirsSync(l),i.writeFileSync(c,...p)}e.exports={outputFile:r(o),outputFileSync:u}}),yi=R((t,e)=>{"use strict";B(),e.exports=Object.assign({},er(),ir(),or(),ei(),ai(),pi(),wt(),di(),mi(),gi(),Bt(),fe());var r=U("fs");Object.getOwnPropertyDescriptor(r,"promises")&&Object.defineProperty(e.exports,"promises",{get(){return r.promises}})});B();B();var ac=Pt(Mn());B();B();function Di(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}B();B();function we(t){return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we(t)}B();function Ei(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ai(t,e){if(e&&(we(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ei(t)}B();function le(t){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(t)}B();B();function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zt(t,e)}function vi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e)}B();B();function Ci(t){return Function.toString.call(t).indexOf("[native code]")!==-1}B();B();function Si(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ce(t,e,r){return Si()?ce=Reflect.construct.bind():ce=function(i,n,s){var a=[null];a.push.apply(a,n);var o=Function.bind.apply(i,a),u=new o;return s&&zt(u,s.prototype),u},ce.apply(null,arguments)}function _e(t){var e=typeof Map=="function"?new Map:void 0;return _e=function(r){if(r===null||!Ci(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return ce(r,arguments,le(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zt(i,r)},_e(t)}var sc=Pt(Kn()),cc=Pt(yi()),lc=function(t){vi(e,t);function e(r){var i;return Di(this,e),i=Ai(this,le(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(_e(Error));B();var Fi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.splitWhen=t.flatten=void 0;function e(i){return i.reduce((n,s)=>[].concat(n,s),[])}t.flatten=e;function r(i,n){let s=[[]],a=0;for(let o of i)n(o)?(a++,s[a]=[]):s[a].push(o);return s}t.splitWhen=r}),wi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.isEnoentCodeError=void 0;function e(r){return r.code==="ENOENT"}t.isEnoentCodeError=e}),_i=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.createDirentFromStats=void 0;var e=class{constructor(i,n){this.name=i,this.isBlockDevice=n.isBlockDevice.bind(n),this.isCharacterDevice=n.isCharacterDevice.bind(n),this.isDirectory=n.isDirectory.bind(n),this.isFIFO=n.isFIFO.bind(n),this.isFile=n.isFile.bind(n),this.isSocket=n.isSocket.bind(n),this.isSymbolicLink=n.isSymbolicLink.bind(n)}};function r(i,n){return new e(i,n)}t.createDirentFromStats=r}),ki=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.removeLeadingDotSegment=t.escape=t.makeAbsolute=t.unixify=void 0;var e=U("path"),r=2,i=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function n(u){return u.replace(/\\/g,"/")}t.unixify=n;function s(u,c){return e.resolve(u,c)}t.makeAbsolute=s;function a(u){return u.replace(i,"\\$2")}t.escape=a;function o(u){if(u.charAt(0)==="."){let c=u.charAt(1);if(c==="/"||c==="\\")return u.slice(r)}return u}t.removeLeadingDotSegment=o}),xi=R((t,e)=>{B(),e.exports=function(r){if(typeof r!="string"||r==="")return!1;for(var i;i=/(\\).|([@?!+*]\(.*\))/g.exec(r);){if(i[2])return!0;r=r.slice(i.index+i[0].length)}return!1}}),Bi=R((t,e)=>{B();var r=xi(),i={"{":"}","(":")","[":"]"},n=function(a){if(a[0]==="!")return!0;for(var o=0,u=-2,c=-2,p=-2,l=-2,f=-2;o<a.length;){if(a[o]==="*"||a[o+1]==="?"&&/[\].+)]/.test(a[o])||c!==-1&&a[o]==="["&&a[o+1]!=="]"&&(c<o&&(c=a.indexOf("]",o)),c>o&&(f===-1||f>c||(f=a.indexOf("\\",o),f===-1||f>c)))||p!==-1&&a[o]==="{"&&a[o+1]!=="}"&&(p=a.indexOf("}",o),p>o&&(f=a.indexOf("\\",o),f===-1||f>p))||l!==-1&&a[o]==="("&&a[o+1]==="?"&&/[:!=]/.test(a[o+2])&&a[o+3]!==")"&&(l=a.indexOf(")",o),l>o&&(f=a.indexOf("\\",o),f===-1||f>l))||u!==-1&&a[o]==="("&&a[o+1]!=="|"&&(u<o&&(u=a.indexOf("|",o)),u!==-1&&a[u+1]!==")"&&(l=a.indexOf(")",u),l>u&&(f=a.indexOf("\\",u),f===-1||f>l))))return!0;if(a[o]==="\\"){var h=a[o+1];o+=2;var m=i[h];if(m){var D=a.indexOf(m,o);D!==-1&&(o=D+1)}if(a[o]==="!")return!0}else o++}return!1},s=function(a){if(a[0]==="!")return!0;for(var o=0;o<a.length;){if(/[*?{}()[\]]/.test(a[o]))return!0;if(a[o]==="\\"){var u=a[o+1];o+=2;var c=i[u];if(c){var p=a.indexOf(c,o);p!==-1&&(o=p+1)}if(a[o]==="!")return!0}else o++}return!1};e.exports=function(a,o){if(typeof a!="string"||a==="")return!1;if(r(a))return!0;var u=n;return o&&o.strict===!1&&(u=s),u(a)}}),Oi=R((t,e)=>{"use strict";B();var r=Bi(),i=U("path").posix.dirname,n=U("os").platform()==="win32",s="/",a=/\\/g,o=/[\{\[].*[\}\]]$/,u=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\!\*\?\|\[\]\(\)\{\}])/g;e.exports=function(p,l){var f=Object.assign({flipBackslashes:!0},l);f.flipBackslashes&&n&&p.indexOf(s)<0&&(p=p.replace(a,s)),o.test(p)&&(p+=s),p+="a";do p=i(p);while(r(p)||u.test(p));return p.replace(c,"$1")}}),Ne=R(t=>{"use strict";B(),t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(i=>i.type===r),t.exceedsLimit=(e,r,i=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(i)>=n,t.escapeNode=(e,r=0,i)=>{let n=e.nodes[r];!n||(i&&n.type===i||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,i)=>(i.type==="text"&&r.push(i.value),i.type==="range"&&(i.type="text"),r),[]),t.flatten=(...e)=>{let r=[],i=n=>{for(let s=0;s<n.length;s++){let a=n[s];Array.isArray(a)?i(a,r):a!==void 0&&r.push(a)}return r};return i(e),r}}),je=R((t,e)=>{"use strict";B();var r=Ne();e.exports=(i,n={})=>{let s=(a,o={})=>{let u=n.escapeInvalid&&r.isInvalidBrace(o),c=a.invalid===!0&&n.escapeInvalid===!0,p="";if(a.value)return(u||c)&&r.isOpenOrClose(a)?"\\"+a.value:a.value;if(a.value)return a.value;if(a.nodes)for(let l of a.nodes)p+=s(l);return p};return s(i)}}),Ri=R((t,e)=>{"use strict";B(),e.exports=function(r){return typeof r=="number"?r-r===0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}}),Pi=R((t,e)=>{"use strict";B();var r=Ri(),i=(d,y,S)=>{if(r(d)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(y===void 0||d===y)return String(d);if(r(y)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let g={relaxZeros:!0,...S};typeof g.strictZeros=="boolean"&&(g.relaxZeros=g.strictZeros===!1);let v=String(g.relaxZeros),C=String(g.shorthand),_=String(g.capture),F=String(g.wrap),x=d+":"+y+"="+v+C+_+F;if(i.cache.hasOwnProperty(x))return i.cache[x].result;let k=Math.min(d,y),P=Math.max(d,y);if(Math.abs(k-P)===1){let T=d+"|"+y;return g.capture?`(${T})`:g.wrap===!1?T:`(?:${T})`}let I=E(d)||E(y),w={min:d,max:y,a:k,b:P},b=[],M=[];if(I&&(w.isPadded=I,w.maxLen=String(w.max).length),k<0){let T=P<0?Math.abs(P):1;M=o(T,Math.abs(k),w,g),k=w.a=0}return P>=0&&(b=o(k,P,w,g)),w.negatives=M,w.positives=b,w.result=n(M,b,g),g.capture===!0?w.result=`(${w.result})`:g.wrap!==!1&&b.length+M.length>1&&(w.result=`(?:${w.result})`),i.cache[x]=w,w.result};function n(d,y,S){let g=u(d,y,"-",!1,S)||[],v=u(y,d,"",!1,S)||[],C=u(d,y,"-?",!0,S)||[];return g.concat(C).concat(v).join("|")}function s(d,y){let S=1,g=1,v=f(d,S),C=new Set([y]);for(;d<=v&&v<=y;)C.add(v),S+=1,v=f(d,S);for(v=h(y+1,g)-1;d<v&&v<=y;)C.add(v),g+=1,v=h(y+1,g)-1;return C=[...C],C.sort(p),C}function a(d,y,S){if(d===y)return{pattern:d,count:[],digits:0};let g=c(d,y),v=g.length,C="",_=0;for(let F=0;F<v;F++){let[x,k]=g[F];x===k?C+=x:x!=="0"||k!=="9"?C+=D(x,k,S):_++}return _&&(C+=S.shorthand===!0?"\\d":"[0-9]"),{pattern:C,count:[_],digits:v}}function o(d,y,S,g){let v=s(d,y),C=[],_=d,F;for(let x=0;x<v.length;x++){let k=v[x],P=a(String(_),String(k),g),I="";if(!S.isPadded&&F&&F.pattern===P.pattern){F.count.length>1&&F.count.pop(),F.count.push(P.count[0]),F.string=F.pattern+m(F.count),_=k+1;continue}S.isPadded&&(I=A(k,S,g)),P.string=I+P.pattern+m(P.count),C.push(P),_=k+1,F=P}return C}function u(d,y,S,g,v){let C=[];for(let _ of d){let{string:F}=_;!g&&!l(y,"string",F)&&C.push(S+F),g&&l(y,"string",F)&&C.push(S+F)}return C}function c(d,y){let S=[];for(let g=0;g<d.length;g++)S.push([d[g],y[g]]);return S}function p(d,y){return d>y?1:y>d?-1:0}function l(d,y,S){return d.some(g=>g[y]===S)}function f(d,y){return Number(String(d).slice(0,-y)+"9".repeat(y))}function h(d,y){return d-d%Math.pow(10,y)}function m(d){let[y=0,S=""]=d;return S||y>1?`{${y+(S?","+S:"")}}`:""}function D(d,y,S){return`[${d}${y-d===1?"":"-"}${y}]`}function E(d){return/^-?(0+)\d/.test(d)}function A(d,y,S){if(!y.isPadded)return d;let g=Math.abs(y.maxLen-String(d).length),v=S.relaxZeros!==!1;switch(g){case 0:return"";case 1:return v?"0?":"0";case 2:return v?"0{0,2}":"00";default:return v?`0{0,${g}}`:`0{${g}}`}}i.cache={},i.clearCache=()=>i.cache={},e.exports=i}),vr=R((t,e)=>{"use strict";B();var r=U("util"),i=Pi(),n=g=>g!==null&&typeof g=="object"&&!Array.isArray(g),s=g=>v=>g===!0?Number(v):String(v),a=g=>typeof g=="number"||typeof g=="string"&&g!=="",o=g=>Number.isInteger(+g),u=g=>{let v=`${g}`,C=-1;if(v[0]==="-"&&(v=v.slice(1)),v==="0")return!1;for(;v[++C]==="0";);return C>0},c=(g,v,C)=>typeof g=="string"||typeof v=="string"?!0:C.stringify===!0,p=(g,v,C)=>{if(v>0){let _=g[0]==="-"?"-":"";_&&(g=g.slice(1)),g=_+g.padStart(_?v-1:v,"0")}return C===!1?String(g):g},l=(g,v)=>{let C=g[0]==="-"?"-":"";for(C&&(g=g.slice(1),v--);g.length<v;)g="0"+g;return C?"-"+g:g},f=(g,v)=>{g.negatives.sort((k,P)=>k<P?-1:k>P?1:0),g.positives.sort((k,P)=>k<P?-1:k>P?1:0);let C=v.capture?"":"?:",_="",F="",x;return g.positives.length&&(_=g.positives.join("|")),g.negatives.length&&(F=`-(${C}${g.negatives.join("|")})`),_&&F?x=`${_}|${F}`:x=_||F,v.wrap?`(${C}${x})`:x},h=(g,v,C,_)=>{if(C)return i(g,v,{wrap:!1,..._});let F=String.fromCharCode(g);if(g===v)return F;let x=String.fromCharCode(v);return`[${F}-${x}]`},m=(g,v,C)=>{if(Array.isArray(g)){let _=C.wrap===!0,F=C.capture?"":"?:";return _?`(${F}${g.join("|")})`:g.join("|")}return i(g,v,C)},D=(...g)=>new RangeError("Invalid range arguments: "+r.inspect(...g)),E=(g,v,C)=>{if(C.strictRanges===!0)throw D([g,v]);return[]},A=(g,v)=>{if(v.strictRanges===!0)throw new TypeError(`Expected step "${g}" to be a number`);return[]},d=(g,v,C=1,_={})=>{let F=Number(g),x=Number(v);if(!Number.isInteger(F)||!Number.isInteger(x)){if(_.strictRanges===!0)throw D([g,v]);return[]}F===0&&(F=0),x===0&&(x=0);let k=F>x,P=String(g),I=String(v),w=String(C);C=Math.max(Math.abs(C),1);let b=u(P)||u(I)||u(w),M=b?Math.max(P.length,I.length,w.length):0,T=b===!1&&c(g,v,_)===!1,$=_.transform||s(T);if(_.toRegex&&C===1)return h(l(g,M),l(v,M),!0,_);let j={negatives:[],positives:[]},K=N=>j[N<0?"negatives":"positives"].push(Math.abs(N)),J=[],Z=0;for(;k?F>=x:F<=x;)_.toRegex===!0&&C>1?K(F):J.push(p($(F,Z),M,T)),F=k?F-C:F+C,Z++;return _.toRegex===!0?C>1?f(j,_):m(J,null,{wrap:!1,..._}):J},y=(g,v,C=1,_={})=>{if(!o(g)&&g.length>1||!o(v)&&v.length>1)return E(g,v,_);let F=_.transform||(T=>String.fromCharCode(T)),x=`${g}`.charCodeAt(0),k=`${v}`.charCodeAt(0),P=x>k,I=Math.min(x,k),w=Math.max(x,k);if(_.toRegex&&C===1)return h(I,w,!1,_);let b=[],M=0;for(;P?x>=k:x<=k;)b.push(F(x,M)),x=P?x-C:x+C,M++;return _.toRegex===!0?m(b,null,{wrap:!1,options:_}):b},S=(g,v,C,_={})=>{if(v==null&&a(g))return[g];if(!a(g)||!a(v))return E(g,v,_);if(typeof C=="function")return S(g,v,1,{transform:C});if(n(C))return S(g,v,0,C);let F={..._};return F.capture===!0&&(F.wrap=!0),C=C||F.step||1,o(C)?o(g)&&o(v)?d(g,v,C,F):y(g,v,Math.max(Math.abs(C),1),F):C!=null&&!n(C)?A(C,F):S(g,v,1,C)};e.exports=S}),Ti=R((t,e)=>{"use strict";B();var r=vr(),i=Ne(),n=(s,a={})=>{let o=(u,c={})=>{let p=i.isInvalidBrace(c),l=u.invalid===!0&&a.escapeInvalid===!0,f=p===!0||l===!0,h=a.escapeInvalid===!0?"\\":"",m="";if(u.isOpen===!0||u.isClose===!0)return h+u.value;if(u.type==="open")return f?h+u.value:"(";if(u.type==="close")return f?h+u.value:")";if(u.type==="comma")return u.prev.type==="comma"?"":f?u.value:"|";if(u.value)return u.value;if(u.nodes&&u.ranges>0){let D=i.reduce(u.nodes),E=r(...D,{...a,wrap:!1,toRegex:!0});if(E.length!==0)return D.length>1&&E.length>1?`(${E})`:E}if(u.nodes)for(let D of u.nodes)m+=o(D,u);return m};return o(s)};e.exports=n}),Ii=R((t,e)=>{"use strict";B();var r=vr(),i=je(),n=Ne(),s=(o="",u="",c=!1)=>{let p=[];if(o=[].concat(o),u=[].concat(u),!u.length)return o;if(!o.length)return c?n.flatten(u).map(l=>`{${l}}`):u;for(let l of o)if(Array.isArray(l))for(let f of l)p.push(s(f,u,c));else for(let f of u)c===!0&&typeof f=="string"&&(f=`{${f}}`),p.push(Array.isArray(f)?s(l,f,c):l+f);return n.flatten(p)},a=(o,u={})=>{let c=u.rangeLimit===void 0?1e3:u.rangeLimit,p=(l,f={})=>{l.queue=[];let h=f,m=f.queue;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,m=h.queue;if(l.invalid||l.dollar){m.push(s(m.pop(),i(l,u)));return}if(l.type==="brace"&&l.invalid!==!0&&l.nodes.length===2){m.push(s(m.pop(),["{}"]));return}if(l.nodes&&l.ranges>0){let d=n.reduce(l.nodes);if(n.exceedsLimit(...d,u.step,c))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let y=r(...d,u);y.length===0&&(y=i(l,u)),m.push(s(m.pop(),y)),l.nodes=[];return}let D=n.encloseBrace(l),E=l.queue,A=l;for(;A.type!=="brace"&&A.type!=="root"&&A.parent;)A=A.parent,E=A.queue;for(let d=0;d<l.nodes.length;d++){let y=l.nodes[d];if(y.type==="comma"&&l.type==="brace"){d===1&&E.push(""),E.push("");continue}if(y.type==="close"){m.push(s(m.pop(),E,D));continue}if(y.value&&y.type!=="open"){E.push(s(E.pop(),y.value));continue}y.nodes&&p(y,l)}return E};return n.flatten(p(o))};e.exports=a}),Li=R((t,e)=>{"use strict";B(),e.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
8
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}}),Ni=R((t,e)=>{"use strict";B();var r=je(),{MAX_LENGTH:i,CHAR_BACKSLASH:n,CHAR_BACKTICK:s,CHAR_COMMA:a,CHAR_DOT:o,CHAR_LEFT_PARENTHESES:u,CHAR_RIGHT_PARENTHESES:c,CHAR_LEFT_CURLY_BRACE:p,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:h,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:D,CHAR_NO_BREAK_SPACE:E,CHAR_ZERO_WIDTH_NOBREAK_SPACE:A}=Li(),d=(y,S={})=>{if(typeof y!="string")throw new TypeError("Expected a string");let g=S||{},v=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i;if(y.length>v)throw new SyntaxError(`Input length (${y.length}), exceeds max characters (${v})`);let C={type:"root",input:y,nodes:[]},_=[C],F=C,x=C,k=0,P=y.length,I=0,w=0,b,M={},T=()=>y[I++],$=j=>{if(j.type==="text"&&x.type==="dot"&&(x.type="text"),x&&x.type==="text"&&j.type==="text"){x.value+=j.value;return}return F.nodes.push(j),j.parent=F,j.prev=x,x=j,j};for($({type:"bos"});I<P;)if(F=_[_.length-1],b=T(),!(b===A||b===E)){if(b===n){$({type:"text",value:(S.keepEscaping?b:"")+T()});continue}if(b===h){$({type:"text",value:"\\"+b});continue}if(b===f){k++;let j=!0,K;for(;I<P&&(K=T());){if(b+=K,K===f){k++;continue}if(K===n){b+=T();continue}if(K===h&&(k--,k===0))break}$({type:"text",value:b});continue}if(b===u){F=$({type:"paren",nodes:[]}),_.push(F),$({type:"text",value:b});continue}if(b===c){if(F.type!=="paren"){$({type:"text",value:b});continue}F=_.pop(),$({type:"text",value:b}),F=_[_.length-1];continue}if(b===m||b===D||b===s){let j=b,K;for(S.keepQuotes!==!0&&(b="");I<P&&(K=T());){if(K===n){b+=K+T();continue}if(K===j){S.keepQuotes===!0&&(b+=K);break}b+=K}$({type:"text",value:b});continue}if(b===p){w++;let j=x.value&&x.value.slice(-1)==="$"||F.dollar===!0;F=$({type:"brace",open:!0,close:!1,dollar:j,depth:w,commas:0,ranges:0,nodes:[]}),_.push(F),$({type:"open",value:b});continue}if(b===l){if(F.type!=="brace"){$({type:"text",value:b});continue}let j="close";F=_.pop(),F.close=!0,$({type:j,value:b}),w--,F=_[_.length-1];continue}if(b===a&&w>0){if(F.ranges>0){F.ranges=0;let j=F.nodes.shift();F.nodes=[j,{type:"text",value:r(F)}]}$({type:"comma",value:b}),F.commas++;continue}if(b===o&&w>0&&F.commas===0){let j=F.nodes;if(w===0||j.length===0){$({type:"text",value:b});continue}if(x.type==="dot"){if(F.range=[],x.value+=b,x.type="range",F.nodes.length!==3&&F.nodes.length!==5){F.invalid=!0,F.ranges=0,x.type="text";continue}F.ranges++,F.args=[];continue}if(x.type==="range"){j.pop();let K=j[j.length-1];K.value+=x.value+b,x=K,F.ranges--;continue}$({type:"dot",value:b});continue}$({type:"text",value:b})}do if(F=_.pop(),F.type!=="root"){F.nodes.forEach(J=>{J.nodes||(J.type==="open"&&(J.isOpen=!0),J.type==="close"&&(J.isClose=!0),J.nodes||(J.type="text"),J.invalid=!0)});let j=_[_.length-1],K=j.nodes.indexOf(F);j.nodes.splice(K,1,...F.nodes)}while(_.length>0);return $({type:"eos"}),C};e.exports=d}),ji=R((t,e)=>{"use strict";B();var r=je(),i=Ti(),n=Ii(),s=Ni(),a=(o,u={})=>{let c=[];if(Array.isArray(o))for(let p of o){let l=a.create(p,u);Array.isArray(l)?c.push(...l):c.push(l)}else c=[].concat(a.create(o,u));return u&&u.expand===!0&&u.nodupes===!0&&(c=[...new Set(c)]),c};a.parse=(o,u={})=>s(o,u),a.stringify=(o,u={})=>r(typeof o=="string"?a.parse(o,u):o,u),a.compile=(o,u={})=>(typeof o=="string"&&(o=a.parse(o,u)),i(o,u)),a.expand=(o,u={})=>{typeof o=="string"&&(o=a.parse(o,u));let c=n(o,u);return u.noempty===!0&&(c=c.filter(Boolean)),u.nodupes===!0&&(c=[...new Set(c)]),c},a.create=(o,u={})=>o===""||o.length<3?[o]:u.expand!==!0?a.compile(o,u):a.expand(o,u),e.exports=a}),De=R((t,e)=>{"use strict";B();var r=U("path"),i="\\\\/",n=`[^${i}]`,s="\\.",a="\\+",o="\\?",u="\\/",c="(?=.)",p="[^/]",l=`(?:${u}|$)`,f=`(?:^|${u})`,h=`${s}{1,2}${l}`,m=`(?!${s})`,D=`(?!${f}${h})`,E=`(?!${s}{0,1}${l})`,A=`(?!${h})`,d=`[^.${u}]`,y=`${p}*?`,S={DOT_LITERAL:s,PLUS_LITERAL:a,QMARK_LITERAL:o,SLASH_LITERAL:u,ONE_CHAR:c,QMARK:p,END_ANCHOR:l,DOTS_SLASH:h,NO_DOT:m,NO_DOTS:D,NO_DOT_SLASH:E,NO_DOTS_SLASH:A,QMARK_NO_DOT:d,STAR:y,START_ANCHOR:f},g={...S,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${s}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${s})`,NO_DOTS:`(?!(?:^|[${i}])${s}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${s}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${s}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`},v={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:v,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:r.sep,extglobChars(C){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${C.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(C){return C===!0?g:S}}}),Ee=R(t=>{"use strict";B();var e=U("path"),r=process.platform==="win32",{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=De();t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>s.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(a,"\\$1"),t.toPosixSlashes=o=>o.replace(i,"/"),t.removeBackslashes=o=>o.replace(n,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{let o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:r===!0||e.sep==="\\",t.escapeLast=(o,u,c)=>{let p=o.lastIndexOf(u,c);return p===-1?o:o[p-1]==="\\"?t.escapeLast(o,u,p-1):`${o.slice(0,p)}\\${o.slice(p)}`},t.removePrefix=(o,u={})=>{let c=o;return c.startsWith("./")&&(c=c.slice(2),u.prefix="./"),c},t.wrapOutput=(o,u={},c={})=>{let p=c.contains?"":"^",l=c.contains?"":"$",f=`${p}(?:${o})${l}`;return u.negated===!0&&(f=`(?:^(?!${f}).*$)`),f}}),Mi=R((t,e)=>{"use strict";B();var r=Ee(),{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:a,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:h,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:D,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:A}=De(),d=g=>g===c||g===s,y=g=>{g.isPrefix!==!0&&(g.depth=g.isGlobstar?1/0:1)},S=(g,v)=>{let C=v||{},_=g.length-1,F=C.parts===!0||C.scanToEnd===!0,x=[],k=[],P=[],I=g,w=-1,b=0,M=0,T=!1,$=!1,j=!1,K=!1,J=!1,Z=!1,N=!1,nt=!1,ot=!1,at=!1,O=0,L,G,q={value:"",depth:0,isGlob:!1},it=()=>w>=_,et=()=>I.charCodeAt(w+1),Q=()=>(L=G,I.charCodeAt(++w));for(;w<_;){G=Q();let Y;if(G===s){N=q.backslashes=!0,G=Q(),G===p&&(Z=!0);continue}if(Z===!0||G===p){for(O++;it()!==!0&&(G=Q());){if(G===s){N=q.backslashes=!0,Q();continue}if(G===p){O++;continue}if(Z!==!0&&G===o&&(G=Q())===o){if(T=q.isBrace=!0,j=q.isGlob=!0,at=!0,F===!0)continue;break}if(Z!==!0&&G===a){if(T=q.isBrace=!0,j=q.isGlob=!0,at=!0,F===!0)continue;break}if(G===D&&(O--,O===0)){Z=!1,T=q.isBrace=!0,at=!0;break}}if(F===!0)continue;break}if(G===c){if(x.push(w),k.push(q),q={value:"",depth:0,isGlob:!1},at===!0)continue;if(L===o&&w===b+1){b+=2;continue}M=w+1;continue}if(C.noext!==!0&&(G===h||G===n||G===i||G===m||G===u)&&et()===l){if(j=q.isGlob=!0,K=q.isExtglob=!0,at=!0,G===u&&w===b&&(ot=!0),F===!0){for(;it()!==!0&&(G=Q());){if(G===s){N=q.backslashes=!0,G=Q();continue}if(G===E){j=q.isGlob=!0,at=!0;break}}continue}break}if(G===i){if(L===i&&(J=q.isGlobstar=!0),j=q.isGlob=!0,at=!0,F===!0)continue;break}if(G===m){if(j=q.isGlob=!0,at=!0,F===!0)continue;break}if(G===f){for(;it()!==!0&&(Y=Q());){if(Y===s){N=q.backslashes=!0,Q();continue}if(Y===A){$=q.isBracket=!0,j=q.isGlob=!0,at=!0;break}}if(F===!0)continue;break}if(C.nonegate!==!0&&G===u&&w===b){nt=q.negated=!0,b++;continue}if(C.noparen!==!0&&G===l){if(j=q.isGlob=!0,F===!0){for(;it()!==!0&&(G=Q());){if(G===l){N=q.backslashes=!0,G=Q();continue}if(G===E){at=!0;break}}continue}break}if(j===!0){if(at=!0,F===!0)continue;break}}C.noext===!0&&(K=!1,j=!1);let X=I,rt="",st="";b>0&&(rt=I.slice(0,b),I=I.slice(b),M-=b),X&&j===!0&&M>0?(X=I.slice(0,M),st=I.slice(M)):j===!0?(X="",st=I):X=I,X&&X!==""&&X!=="/"&&X!==I&&d(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),C.unescape===!0&&(st&&(st=r.removeBackslashes(st)),X&&N===!0&&(X=r.removeBackslashes(X)));let z={prefix:rt,input:g,start:b,base:X,glob:st,isBrace:T,isBracket:$,isGlob:j,isExtglob:K,isGlobstar:J,negated:nt,negatedExtglob:ot};if(C.tokens===!0&&(z.maxDepth=0,d(G)||k.push(q),z.tokens=k),C.parts===!0||C.tokens===!0){let Y;for(let gt=0;gt<x.length;gt++){let be=Y?Y+1:b,W=x[gt],ut=g.slice(be,W);C.tokens&&(gt===0&&b!==0?(k[gt].isPrefix=!0,k[gt].value=rt):k[gt].value=ut,y(k[gt]),z.maxDepth+=k[gt].depth),(gt!==0||ut!=="")&&P.push(ut),Y=W}if(Y&&Y+1<g.length){let gt=g.slice(Y+1);P.push(gt),C.tokens&&(k[k.length-1].value=gt,y(k[k.length-1]),z.maxDepth+=k[k.length-1].depth)}z.slashes=x,z.parts=P}return z};e.exports=S}),$i=R((t,e)=>{"use strict";B();var r=De(),i=Ee(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:u}=r,c=(f,h)=>{if(typeof h.expandRange=="function")return h.expandRange(...f,h);f.sort();let m=`[${f.join("-")}]`;try{new RegExp(m)}catch{return f.map(D=>i.escapeRegex(D)).join("..")}return m},p=(f,h)=>`Missing ${f}: "${h}" - use "\\\\${h}" to match literal characters`,l=(f,h)=>{if(typeof f!="string")throw new TypeError("Expected a string");f=u[f]||f;let m={...h},D=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,E=f.length;if(E>D)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${D}`);let A={type:"bos",value:"",output:m.prepend||""},d=[A],y=m.capture?"":"?:",S=i.isWindows(h),g=r.globChars(S),v=r.extglobChars(g),{DOT_LITERAL:C,PLUS_LITERAL:_,SLASH_LITERAL:F,ONE_CHAR:x,DOTS_SLASH:k,NO_DOT:P,NO_DOT_SLASH:I,NO_DOTS_SLASH:w,QMARK:b,QMARK_NO_DOT:M,STAR:T,START_ANCHOR:$}=g,j=W=>`(${y}(?:(?!${$}${W.dot?k:C}).)*?)`,K=m.dot?"":P,J=m.dot?b:M,Z=m.bash===!0?j(m):T;m.capture&&(Z=`(${Z})`),typeof m.noext=="boolean"&&(m.noextglob=m.noext);let N={input:f,index:-1,start:0,dot:m.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:d};f=i.removePrefix(f,N),E=f.length;let nt=[],ot=[],at=[],O=A,L,G=()=>N.index===E-1,q=N.peek=(W=1)=>f[N.index+W],it=N.advance=()=>f[++N.index]||"",et=()=>f.slice(N.index+1),Q=(W="",ut=0)=>{N.consumed+=W,N.index+=ut},X=W=>{N.output+=W.output!=null?W.output:W.value,Q(W.value)},rt=()=>{let W=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)it(),N.start++,W++;return W%2===0?!1:(N.negated=!0,N.start++,!0)},st=W=>{N[W]++,at.push(W)},z=W=>{N[W]--,at.pop()},Y=W=>{if(O.type==="globstar"){let ut=N.braces>0&&(W.type==="comma"||W.type==="brace"),H=W.extglob===!0||nt.length&&(W.type==="pipe"||W.type==="paren");W.type!=="slash"&&W.type!=="paren"&&!ut&&!H&&(N.output=N.output.slice(0,-O.output.length),O.type="star",O.value="*",O.output=Z,N.output+=O.output)}if(nt.length&&W.type!=="paren"&&(nt[nt.length-1].inner+=W.value),(W.value||W.output)&&X(W),O&&O.type==="text"&&W.type==="text"){O.value+=W.value,O.output=(O.output||"")+W.value;return}W.prev=O,d.push(W),O=W},gt=(W,ut)=>{let H={...v[ut],conditions:1,inner:""};H.prev=O,H.parens=N.parens,H.output=N.output;let tt=(m.capture?"(":"")+H.open;st("parens"),Y({type:W,value:ut,output:N.output?"":x}),Y({type:"paren",extglob:!0,value:it(),output:tt}),nt.push(H)},be=W=>{let ut=W.close+(m.capture?")":""),H;if(W.type==="negate"){let tt=Z;if(W.inner&&W.inner.length>1&&W.inner.includes("/")&&(tt=j(m)),(tt!==Z||G()||/^\)+$/.test(et()))&&(ut=W.close=`)$))${tt}`),W.inner.includes("*")&&(H=et())&&/^\.[^\\/.]+$/.test(H)){let lt=l(H,{...h,fastpaths:!1}).output;ut=W.close=`)${lt})${tt})`}W.prev.type==="bos"&&(N.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:L,output:ut}),z("parens")};if(m.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(f)){let W=!1,ut=f.replace(o,(H,tt,lt,At,dt,Fe)=>At==="\\"?(W=!0,H):At==="?"?tt?tt+At+(dt?b.repeat(dt.length):""):Fe===0?J+(dt?b.repeat(dt.length):""):b.repeat(lt.length):At==="."?C.repeat(lt.length):At==="*"?tt?tt+At+(dt?Z:""):Z:tt?H:`\\${H}`);return W===!0&&(m.unescape===!0?ut=ut.replace(/\\/g,""):ut=ut.replace(/\\+/g,H=>H.length%2===0?"\\\\":H?"\\":"")),ut===f&&m.contains===!0?(N.output=f,N):(N.output=i.wrapOutput(ut,N,h),N)}for(;!G();){if(L=it(),L==="\0")continue;if(L==="\\"){let H=q();if(H==="/"&&m.bash!==!0||H==="."||H===";")continue;if(!H){L+="\\",Y({type:"text",value:L});continue}let tt=/^\\+/.exec(et()),lt=0;if(tt&&tt[0].length>2&&(lt=tt[0].length,N.index+=lt,lt%2!==0&&(L+="\\")),m.unescape===!0?L=it():L+=it(),N.brackets===0){Y({type:"text",value:L});continue}}if(N.brackets>0&&(L!=="]"||O.value==="["||O.value==="[^")){if(m.posix!==!1&&L===":"){let H=O.value.slice(1);if(H.includes("[")&&(O.posix=!0,H.includes(":"))){let tt=O.value.lastIndexOf("["),lt=O.value.slice(0,tt),At=O.value.slice(tt+2),dt=s[At];if(dt){O.value=lt+dt,N.backtrack=!0,it(),!A.output&&d.indexOf(O)===1&&(A.output=x);continue}}}(L==="["&&q()!==":"||L==="-"&&q()==="]")&&(L=`\\${L}`),L==="]"&&(O.value==="["||O.value==="[^")&&(L=`\\${L}`),m.posix===!0&&L==="!"&&O.value==="["&&(L="^"),O.value+=L,X({value:L});continue}if(N.quotes===1&&L!=='"'){L=i.escapeRegex(L),O.value+=L,X({value:L});continue}if(L==='"'){N.quotes=N.quotes===1?0:1,m.keepQuotes===!0&&Y({type:"text",value:L});continue}if(L==="("){st("parens"),Y({type:"paren",value:L});continue}if(L===")"){if(N.parens===0&&m.strictBrackets===!0)throw new SyntaxError(p("opening","("));let H=nt[nt.length-1];if(H&&N.parens===H.parens+1){be(nt.pop());continue}Y({type:"paren",value:L,output:N.parens?")":"\\)"}),z("parens");continue}if(L==="["){if(m.nobracket===!0||!et().includes("]")){if(m.nobracket!==!0&&m.strictBrackets===!0)throw new SyntaxError(p("closing","]"));L=`\\${L}`}else st("brackets");Y({type:"bracket",value:L});continue}if(L==="]"){if(m.nobracket===!0||O&&O.type==="bracket"&&O.value.length===1){Y({type:"text",value:L,output:`\\${L}`});continue}if(N.brackets===0){if(m.strictBrackets===!0)throw new SyntaxError(p("opening","["));Y({type:"text",value:L,output:`\\${L}`});continue}z("brackets");let H=O.value.slice(1);if(O.posix!==!0&&H[0]==="^"&&!H.includes("/")&&(L=`/${L}`),O.value+=L,X({value:L}),m.literalBrackets===!1||i.hasRegexChars(H))continue;let tt=i.escapeRegex(O.value);if(N.output=N.output.slice(0,-O.value.length),m.literalBrackets===!0){N.output+=tt,O.value=tt;continue}O.value=`(${y}${tt}|${O.value})`,N.output+=O.value;continue}if(L==="{"&&m.nobrace!==!0){st("braces");let H={type:"brace",value:L,output:"(",outputIndex:N.output.length,tokensIndex:N.tokens.length};ot.push(H),Y(H);continue}if(L==="}"){let H=ot[ot.length-1];if(m.nobrace===!0||!H){Y({type:"text",value:L,output:L});continue}let tt=")";if(H.dots===!0){let lt=d.slice(),At=[];for(let dt=lt.length-1;dt>=0&&(d.pop(),lt[dt].type!=="brace");dt--)lt[dt].type!=="dots"&&At.unshift(lt[dt].value);tt=c(At,m),N.backtrack=!0}if(H.comma!==!0&&H.dots!==!0){let lt=N.output.slice(0,H.outputIndex),At=N.tokens.slice(H.tokensIndex);H.value=H.output="\\{",L=tt="\\}",N.output=lt;for(let dt of At)N.output+=dt.output||dt.value}Y({type:"brace",value:L,output:tt}),z("braces"),ot.pop();continue}if(L==="|"){nt.length>0&&nt[nt.length-1].conditions++,Y({type:"text",value:L});continue}if(L===","){let H=L,tt=ot[ot.length-1];tt&&at[at.length-1]==="braces"&&(tt.comma=!0,H="|"),Y({type:"comma",value:L,output:H});continue}if(L==="/"){if(O.type==="dot"&&N.index===N.start+1){N.start=N.index+1,N.consumed="",N.output="",d.pop(),O=A;continue}Y({type:"slash",value:L,output:F});continue}if(L==="."){if(N.braces>0&&O.type==="dot"){O.value==="."&&(O.output=C);let H=ot[ot.length-1];O.type="dots",O.output+=L,O.value+=L,H.dots=!0;continue}if(N.braces+N.parens===0&&O.type!=="bos"&&O.type!=="slash"){Y({type:"text",value:L,output:C});continue}Y({type:"dot",value:L,output:C});continue}if(L==="?"){if(!(O&&O.value==="(")&&m.noextglob!==!0&&q()==="("&&q(2)!=="?"){gt("qmark",L);continue}if(O&&O.type==="paren"){let H=q(),tt=L;if(H==="<"&&!i.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(O.value==="("&&!/[!=<:]/.test(H)||H==="<"&&!/<([!=]|\w+>)/.test(et()))&&(tt=`\\${L}`),Y({type:"text",value:L,output:tt});continue}if(m.dot!==!0&&(O.type==="slash"||O.type==="bos")){Y({type:"qmark",value:L,output:M});continue}Y({type:"qmark",value:L,output:b});continue}if(L==="!"){if(m.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){gt("negate",L);continue}if(m.nonegate!==!0&&N.index===0){rt();continue}}if(L==="+"){if(m.noextglob!==!0&&q()==="("&&q(2)!=="?"){gt("plus",L);continue}if(O&&O.value==="("||m.regex===!1){Y({type:"plus",value:L,output:_});continue}if(O&&(O.type==="bracket"||O.type==="paren"||O.type==="brace")||N.parens>0){Y({type:"plus",value:L});continue}Y({type:"plus",value:_});continue}if(L==="@"){if(m.noextglob!==!0&&q()==="("&&q(2)!=="?"){Y({type:"at",extglob:!0,value:L,output:""});continue}Y({type:"text",value:L});continue}if(L!=="*"){(L==="$"||L==="^")&&(L=`\\${L}`);let H=a.exec(et());H&&(L+=H[0],N.index+=H[0].length),Y({type:"text",value:L});continue}if(O&&(O.type==="globstar"||O.star===!0)){O.type="star",O.star=!0,O.value+=L,O.output=Z,N.backtrack=!0,N.globstar=!0,Q(L);continue}let W=et();if(m.noextglob!==!0&&/^\([^?]/.test(W)){gt("star",L);continue}if(O.type==="star"){if(m.noglobstar===!0){Q(L);continue}let H=O.prev,tt=H.prev,lt=H.type==="slash"||H.type==="bos",At=tt&&(tt.type==="star"||tt.type==="globstar");if(m.bash===!0&&(!lt||W[0]&&W[0]!=="/")){Y({type:"star",value:L,output:""});continue}let dt=N.braces>0&&(H.type==="comma"||H.type==="brace"),Fe=nt.length&&(H.type==="pipe"||H.type==="paren");if(!lt&&H.type!=="paren"&&!dt&&!Fe){Y({type:"star",value:L,output:""});continue}for(;W.slice(0,3)==="/**";){let ae=f[N.index+4];if(ae&&ae!=="/")break;W=W.slice(3),Q("/**",3)}if(H.type==="bos"&&G()){O.type="globstar",O.value+=L,O.output=j(m),N.output=O.output,N.globstar=!0,Q(L);continue}if(H.type==="slash"&&H.prev.type!=="bos"&&!At&&G()){N.output=N.output.slice(0,-(H.output+O.output).length),H.output=`(?:${H.output}`,O.type="globstar",O.output=j(m)+(m.strictSlashes?")":"|$)"),O.value+=L,N.globstar=!0,N.output+=H.output+O.output,Q(L);continue}if(H.type==="slash"&&H.prev.type!=="bos"&&W[0]==="/"){let ae=W[1]!==void 0?"|$":"";N.output=N.output.slice(0,-(H.output+O.output).length),H.output=`(?:${H.output}`,O.type="globstar",O.output=`${j(m)}${F}|${F}${ae})`,O.value+=L,N.output+=H.output+O.output,N.globstar=!0,Q(L+it()),Y({type:"slash",value:"/",output:""});continue}if(H.type==="bos"&&W[0]==="/"){O.type="globstar",O.value+=L,O.output=`(?:^|${F}|${j(m)}${F})`,N.output=O.output,N.globstar=!0,Q(L+it()),Y({type:"slash",value:"/",output:""});continue}N.output=N.output.slice(0,-O.output.length),O.type="globstar",O.output=j(m),O.value+=L,N.output+=O.output,N.globstar=!0,Q(L);continue}let ut={type:"star",value:L,output:Z};if(m.bash===!0){ut.output=".*?",(O.type==="bos"||O.type==="slash")&&(ut.output=K+ut.output),Y(ut);continue}if(O&&(O.type==="bracket"||O.type==="paren")&&m.regex===!0){ut.output=L,Y(ut);continue}(N.index===N.start||O.type==="slash"||O.type==="dot")&&(O.type==="dot"?(N.output+=I,O.output+=I):m.dot===!0?(N.output+=w,O.output+=w):(N.output+=K,O.output+=K),q()!=="*"&&(N.output+=x,O.output+=x)),Y(ut)}for(;N.brackets>0;){if(m.strictBrackets===!0)throw new SyntaxError(p("closing","]"));N.output=i.escapeLast(N.output,"["),z("brackets")}for(;N.parens>0;){if(m.strictBrackets===!0)throw new SyntaxError(p("closing",")"));N.output=i.escapeLast(N.output,"("),z("parens")}for(;N.braces>0;){if(m.strictBrackets===!0)throw new SyntaxError(p("closing","}"));N.output=i.escapeLast(N.output,"{"),z("braces")}if(m.strictSlashes!==!0&&(O.type==="star"||O.type==="bracket")&&Y({type:"maybe_slash",value:"",output:`${F}?`}),N.backtrack===!0){N.output="";for(let W of N.tokens)N.output+=W.output!=null?W.output:W.value,W.suffix&&(N.output+=W.suffix)}return N};l.fastpaths=(f,h)=>{let m={...h},D=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,E=f.length;if(E>D)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${D}`);f=u[f]||f;let A=i.isWindows(h),{DOT_LITERAL:d,SLASH_LITERAL:y,ONE_CHAR:S,DOTS_SLASH:g,NO_DOT:v,NO_DOTS:C,NO_DOTS_SLASH:_,STAR:F,START_ANCHOR:x}=r.globChars(A),k=m.dot?C:v,P=m.dot?_:v,I=m.capture?"":"?:",w={negated:!1,prefix:""},b=m.bash===!0?".*?":F;m.capture&&(b=`(${b})`);let M=K=>K.noglobstar===!0?b:`(${I}(?:(?!${x}${K.dot?g:d}).)*?)`,T=K=>{switch(K){case"*":return`${k}${S}${b}`;case".*":return`${d}${S}${b}`;case"*.*":return`${k}${b}${d}${S}${b}`;case"*/*":return`${k}${b}${y}${S}${P}${b}`;case"**":return k+M(m);case"**/*":return`(?:${k}${M(m)}${y})?${P}${S}${b}`;case"**/*.*":return`(?:${k}${M(m)}${y})?${P}${b}${d}${S}${b}`;case"**/.*":return`(?:${k}${M(m)}${y})?${d}${S}${b}`;default:{let J=/^(.*?)\.(\w+)$/.exec(K);if(!J)return;let Z=T(J[1]);return Z?Z+d+J[2]:void 0}}},$=i.removePrefix(f,w),j=T($);return j&&m.strictSlashes!==!0&&(j+=`${y}?`),j},e.exports=l}),Hi=R((t,e)=>{"use strict";B();var r=U("path"),i=Mi(),n=$i(),s=Ee(),a=De(),o=c=>c&&typeof c=="object"&&!Array.isArray(c),u=(c,p,l=!1)=>{if(Array.isArray(c)){let y=c.map(S=>u(S,p,l));return S=>{for(let g of y){let v=g(S);if(v)return v}return!1}}let f=o(c)&&c.tokens&&c.input;if(c===""||typeof c!="string"&&!f)throw new TypeError("Expected pattern to be a non-empty string");let h=p||{},m=s.isWindows(p),D=f?u.compileRe(c,p):u.makeRe(c,p,!1,!0),E=D.state;delete D.state;let A=()=>!1;if(h.ignore){let y={...p,ignore:null,onMatch:null,onResult:null};A=u(h.ignore,y,l)}let d=(y,S=!1)=>{let{isMatch:g,match:v,output:C}=u.test(y,D,p,{glob:c,posix:m}),_={glob:c,state:E,regex:D,posix:m,input:y,output:C,match:v,isMatch:g};return typeof h.onResult=="function"&&h.onResult(_),g===!1?(_.isMatch=!1,S?_:!1):A(y)?(typeof h.onIgnore=="function"&&h.onIgnore(_),_.isMatch=!1,S?_:!1):(typeof h.onMatch=="function"&&h.onMatch(_),S?_:!0)};return l&&(d.state=E),d};u.test=(c,p,l,{glob:f,posix:h}={})=>{if(typeof c!="string")throw new TypeError("Expected input to be a string");if(c==="")return{isMatch:!1,output:""};let m=l||{},D=m.format||(h?s.toPosixSlashes:null),E=c===f,A=E&&D?D(c):c;return E===!1&&(A=D?D(c):c,E=A===f),(E===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?E=u.matchBase(c,p,l,h):E=p.exec(A)),{isMatch:Boolean(E),match:E,output:A}},u.matchBase=(c,p,l,f=s.isWindows(l))=>(p instanceof RegExp?p:u.makeRe(p,l)).test(r.basename(c)),u.isMatch=(c,p,l)=>u(p,l)(c),u.parse=(c,p)=>Array.isArray(c)?c.map(l=>u.parse(l,p)):n(c,{...p,fastpaths:!1}),u.scan=(c,p)=>i(c,p),u.compileRe=(c,p,l=!1,f=!1)=>{if(l===!0)return c.output;let h=p||{},m=h.contains?"":"^",D=h.contains?"":"$",E=`${m}(?:${c.output})${D}`;c&&c.negated===!0&&(E=`^(?!${E}).*$`);let A=u.toRegex(E,p);return f===!0&&(A.state=c),A},u.makeRe=(c,p={},l=!1,f=!1)=>{if(!c||typeof c!="string")throw new TypeError("Expected a non-empty string");let h={negated:!1,fastpaths:!0};return p.fastpaths!==!1&&(c[0]==="."||c[0]==="*")&&(h.output=n.fastpaths(c,p)),h.output||(h=n(c,p)),u.compileRe(h,p,l,f)},u.toRegex=(c,p)=>{try{let l=p||{};return new RegExp(c,l.flags||(l.nocase?"i":""))}catch(l){if(p&&p.debug===!0)throw l;return/$^/}},u.constants=a,e.exports=u}),Gi=R((t,e)=>{"use strict";B(),e.exports=Hi()}),Ui=R((t,e)=>{"use strict";B();var r=U("util"),i=ji(),n=Gi(),s=Ee(),a=u=>u===""||u==="./",o=(u,c,p)=>{c=[].concat(c),u=[].concat(u);let l=new Set,f=new Set,h=new Set,m=0,D=A=>{h.add(A.output),p&&p.onResult&&p.onResult(A)};for(let A=0;A<c.length;A++){let d=n(String(c[A]),{...p,onResult:D},!0),y=d.state.negated||d.state.negatedExtglob;y&&m++;for(let S of u){let g=d(S,!0);!(y?!g.isMatch:g.isMatch)||(y?l.add(g.output):(l.delete(g.output),f.add(g.output)))}}let E=(m===c.length?[...h]:[...f]).filter(A=>!l.has(A));if(p&&E.length===0){if(p.failglob===!0)throw new Error(`No matches found for "${c.join(", ")}"`);if(p.nonull===!0||p.nullglob===!0)return p.unescape?c.map(A=>A.replace(/\\/g,"")):c}return E};o.match=o,o.matcher=(u,c)=>n(u,c),o.isMatch=(u,c,p)=>n(c,p)(u),o.any=o.isMatch,o.not=(u,c,p={})=>{c=[].concat(c).map(String);let l=new Set,f=[],h=D=>{p.onResult&&p.onResult(D),f.push(D.output)},m=new Set(o(u,c,{...p,onResult:h}));for(let D of f)m.has(D)||l.add(D);return[...l]},o.contains=(u,c,p)=>{if(typeof u!="string")throw new TypeError(`Expected a string: "${r.inspect(u)}"`);if(Array.isArray(c))return c.some(l=>o.contains(u,l,p));if(typeof c=="string"){if(a(u)||a(c))return!1;if(u.includes(c)||u.startsWith("./")&&u.slice(2).includes(c))return!0}return o.isMatch(u,c,{...p,contains:!0})},o.matchKeys=(u,c,p)=>{if(!s.isObject(u))throw new TypeError("Expected the first argument to be an object");let l=o(Object.keys(u),c,p),f={};for(let h of l)f[h]=u[h];return f},o.some=(u,c,p)=>{let l=[].concat(u);for(let f of[].concat(c)){let h=n(String(f),p);if(l.some(m=>h(m)))return!0}return!1},o.every=(u,c,p)=>{let l=[].concat(u);for(let f of[].concat(c)){let h=n(String(f),p);if(!l.every(m=>h(m)))return!1}return!0},o.all=(u,c,p)=>{if(typeof u!="string")throw new TypeError(`Expected a string: "${r.inspect(u)}"`);return[].concat(c).every(l=>n(l,p)(u))},o.capture=(u,c,p)=>{let l=s.isWindows(p),f=n.makeRe(String(u),{...p,capture:!0}).exec(l?s.toPosixSlashes(c):c);if(f)return f.slice(1).map(h=>h===void 0?"":h)},o.makeRe=(...u)=>n.makeRe(...u),o.scan=(...u)=>n.scan(...u),o.parse=(u,c)=>{let p=[];for(let l of[].concat(u||[]))for(let f of i(String(l),c))p.push(n.parse(f,c));return p},o.braces=(u,c)=>{if(typeof u!="string")throw new TypeError("Expected a string");return c&&c.nobrace===!0||!/\{.*\}/.test(u)?[u]:i(u,c)},o.braceExpand=(u,c)=>{if(typeof u!="string")throw new TypeError("Expected a string");return o.braces(u,{...c,expand:!0})},e.exports=o}),Wi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.matchAny=t.convertPatternsToRe=t.makeRe=t.getPatternParts=t.expandBraceExpansion=t.expandPatternsWithBraceExpansion=t.isAffectDepthOfReadingPattern=t.endsWithSlashGlobStar=t.hasGlobStar=t.getBaseDirectory=t.isPatternRelatedToParentDirectory=t.getPatternsOutsideCurrentDirectory=t.getPatternsInsideCurrentDirectory=t.getPositivePatterns=t.getNegativePatterns=t.isPositivePattern=t.isNegativePattern=t.convertToNegativePattern=t.convertToPositivePattern=t.isDynamicPattern=t.isStaticPattern=void 0;var e=U("path"),r=Oi(),i=Ui(),n="**",s="\\",a=/[*?]|^!/,o=/\[[^[]*]/,u=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,c=/[!*+?@]\([^(]*\)/,p=/,|\.\./;function l(T,$={}){return!f(T,$)}t.isStaticPattern=l;function f(T,$={}){return T===""?!1:!!($.caseSensitiveMatch===!1||T.includes(s)||a.test(T)||o.test(T)||u.test(T)||$.extglob!==!1&&c.test(T)||$.braceExpansion!==!1&&h(T))}t.isDynamicPattern=f;function h(T){let $=T.indexOf("{");if($===-1)return!1;let j=T.indexOf("}",$+1);if(j===-1)return!1;let K=T.slice($,j);return p.test(K)}function m(T){return E(T)?T.slice(1):T}t.convertToPositivePattern=m;function D(T){return"!"+T}t.convertToNegativePattern=D;function E(T){return T.startsWith("!")&&T[1]!=="("}t.isNegativePattern=E;function A(T){return!E(T)}t.isPositivePattern=A;function d(T){return T.filter(E)}t.getNegativePatterns=d;function y(T){return T.filter(A)}t.getPositivePatterns=y;function S(T){return T.filter($=>!v($))}t.getPatternsInsideCurrentDirectory=S;function g(T){return T.filter(v)}t.getPatternsOutsideCurrentDirectory=g;function v(T){return T.startsWith("..")||T.startsWith("./..")}t.isPatternRelatedToParentDirectory=v;function C(T){return r(T,{flipBackslashes:!1})}t.getBaseDirectory=C;function _(T){return T.includes(n)}t.hasGlobStar=_;function F(T){return T.endsWith("/"+n)}t.endsWithSlashGlobStar=F;function x(T){let $=e.basename(T);return F(T)||l($)}t.isAffectDepthOfReadingPattern=x;function k(T){return T.reduce(($,j)=>$.concat(P(j)),[])}t.expandPatternsWithBraceExpansion=k;function P(T){return i.braces(T,{expand:!0,nodupes:!0})}t.expandBraceExpansion=P;function I(T,$){let{parts:j}=i.scan(T,Object.assign(Object.assign({},$),{parts:!0}));return j.length===0&&(j=[T]),j[0].startsWith("/")&&(j[0]=j[0].slice(1),j.unshift("")),j}t.getPatternParts=I;function w(T,$){return i.makeRe(T,$)}t.makeRe=w;function b(T,$){return T.map(j=>w(j,$))}t.convertPatternsToRe=b;function M(T,$){return $.some(j=>j.test(T))}t.matchAny=M}),Ki=R((t,e)=>{"use strict";B();var r=U("stream"),i=r.PassThrough,n=Array.prototype.slice;e.exports=s;function s(){let o=[],u=n.call(arguments),c=!1,p=u[u.length-1];p&&!Array.isArray(p)&&p.pipe==null?u.pop():p={};let l=p.end!==!1,f=p.pipeError===!0;p.objectMode==null&&(p.objectMode=!0),p.highWaterMark==null&&(p.highWaterMark=64*1024);let h=i(p);function m(){for(let A=0,d=arguments.length;A<d;A++)o.push(a(arguments[A],p));return D(),this}function D(){if(c)return;c=!0;let A=o.shift();if(!A){process.nextTick(E);return}Array.isArray(A)||(A=[A]);let d=A.length+1;function y(){--d>0||(c=!1,D())}function S(g){function v(){g.removeListener("merge2UnpipeEnd",v),g.removeListener("end",v),f&&g.removeListener("error",C),y()}function C(_){h.emit("error",_)}if(g._readableState.endEmitted)return y();g.on("merge2UnpipeEnd",v),g.on("end",v),f&&g.on("error",C),g.pipe(h,{end:!1}),g.resume()}for(let g=0;g<A.length;g++)S(A[g]);y()}function E(){c=!1,h.emit("queueDrain"),l&&h.end()}return h.setMaxListeners(0),h.add=m,h.on("unpipe",function(A){A.emit("merge2UnpipeEnd")}),u.length&&m.apply(null,u),h}function a(o,u){if(Array.isArray(o))for(let c=0,p=o.length;c<p;c++)o[c]=a(o[c],u);else{if(!o._readableState&&o.pipe&&(o=o.pipe(i(u))),!o._readableState||!o.pause||!o.pipe)throw new Error("Only readable stream can be merged.");o.pause()}return o}}),qi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var e=Ki();function r(n){let s=e(n);return n.forEach(a=>{a.once("error",o=>s.emit("error",o))}),s.once("close",()=>i(n)),s.once("end",()=>i(n)),s}t.merge=r;function i(n){n.forEach(s=>s.emit("close"))}}),Vi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=t.isString=void 0;function e(i){return typeof i=="string"}t.isString=e;function r(i){return i===""}t.isEmpty=r}),Lt=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.string=t.stream=t.pattern=t.path=t.fs=t.errno=t.array=void 0;var e=Fi();t.array=e;var r=wi();t.errno=r;var i=_i();t.fs=i;var n=ki();t.path=n;var s=Wi();t.pattern=s;var a=qi();t.stream=a;var o=Vi();t.string=o}),Ji=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.convertPatternGroupToTask=t.convertPatternGroupsToTasks=t.groupPatternsByBaseDirectory=t.getNegativePatternsAsPositive=t.getPositivePatterns=t.convertPatternsToTasks=t.generate=void 0;var e=Lt();function r(c,p){let l=n(c),f=s(c,p.ignore),h=l.filter(A=>e.pattern.isStaticPattern(A,p)),m=l.filter(A=>e.pattern.isDynamicPattern(A,p)),D=i(h,f,!1),E=i(m,f,!0);return D.concat(E)}t.generate=r;function i(c,p,l){let f=[],h=e.pattern.getPatternsOutsideCurrentDirectory(c),m=e.pattern.getPatternsInsideCurrentDirectory(c),D=a(h),E=a(m);return f.push(...o(D,p,l)),"."in E?f.push(u(".",m,p,l)):f.push(...o(E,p,l)),f}t.convertPatternsToTasks=i;function n(c){return e.pattern.getPositivePatterns(c)}t.getPositivePatterns=n;function s(c,p){return e.pattern.getNegativePatterns(c).concat(p).map(e.pattern.convertToPositivePattern)}t.getNegativePatternsAsPositive=s;function a(c){let p={};return c.reduce((l,f)=>{let h=e.pattern.getBaseDirectory(f);return h in l?l[h].push(f):l[h]=[f],l},p)}t.groupPatternsByBaseDirectory=a;function o(c,p,l){return Object.keys(c).map(f=>u(f,c[f],p,l))}t.convertPatternGroupsToTasks=o;function u(c,p,l,f){return{dynamic:f,positive:p,negative:l,base:c,patterns:[].concat(p,l.map(e.pattern.convertToNegativePattern))}}t.convertPatternGroupToTask=u}),Yi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.removeDuplicateSlashes=t.transform=void 0;var e=/(?!^)\/{2,}/g;function r(n){return n.map(s=>i(s))}t.transform=r;function i(n){return n.replace(e,"/")}t.removeDuplicateSlashes=i}),Qi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.read=void 0;function e(n,s,a){s.fs.lstat(n,(o,u)=>{if(o!==null){r(a,o);return}if(!u.isSymbolicLink()||!s.followSymbolicLink){i(a,u);return}s.fs.stat(n,(c,p)=>{if(c!==null){if(s.throwErrorOnBrokenSymbolicLink){r(a,c);return}i(a,u);return}s.markSymbolicLink&&(p.isSymbolicLink=()=>!0),i(a,p)})})}t.read=e;function r(n,s){n(s)}function i(n,s){n(null,s)}}),Xi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.read=void 0;function e(r,i){let n=i.fs.lstatSync(r);if(!n.isSymbolicLink()||!i.followSymbolicLink)return n;try{let s=i.fs.statSync(r);return i.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!i.throwErrorOnBrokenSymbolicLink)return n;throw s}}t.read=e}),Zi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;var e=U("fs");t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync};function r(i){return i===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),i)}t.createFileSystemAdapter=r}),zi=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Zi(),r=class{constructor(i={}){this._options=i,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(i,n){return i!=null?i:n}};t.default=r}),Vt=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.statSync=t.stat=t.Settings=void 0;var e=Qi(),r=Xi(),i=zi();t.Settings=i.default;function n(o,u,c){if(typeof u=="function"){e.read(o,a(),u);return}e.read(o,a(u),c)}t.stat=n;function s(o,u){let c=a(u);return r.read(o,c)}t.statSync=s;function a(o={}){return o instanceof i.default?o:new i.default(o)}}),to=R((t,e)=>{B();var r;e.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):i=>(r||(r=Promise.resolve())).then(i).catch(n=>setTimeout(()=>{throw n},0))}),eo=R((t,e)=>{B(),e.exports=i;var r=to();function i(n,s){let a,o,u,c=!0;Array.isArray(n)?(a=[],o=n.length):(u=Object.keys(n),a={},o=u.length);function p(f){function h(){s&&s(f,a),s=null}c?r(h):h()}function l(f,h,m){a[f]=m,(--o===0||h)&&p(h)}o?u?u.forEach(function(f){n[f](function(h,m){l(f,h,m)})}):n.forEach(function(f,h){f(function(m,D){l(h,m,D)})}):p(null),c=!1}}),Cr=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var e=process.versions.node.split(".");if(e[0]===void 0||e[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var r=Number.parseInt(e[0],10),i=Number.parseInt(e[1],10),n=10,s=10,a=r>n,o=r===n&&i>=s;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||o}),ro=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.createDirentFromStats=void 0;var e=class{constructor(i,n){this.name=i,this.isBlockDevice=n.isBlockDevice.bind(n),this.isCharacterDevice=n.isCharacterDevice.bind(n),this.isDirectory=n.isDirectory.bind(n),this.isFIFO=n.isFIFO.bind(n),this.isFile=n.isFile.bind(n),this.isSocket=n.isSocket.bind(n),this.isSymbolicLink=n.isSymbolicLink.bind(n)}};function r(i,n){return new e(i,n)}t.createDirentFromStats=r}),Sr=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.fs=void 0;var e=ro();t.fs=e}),br=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.joinPathSegments=void 0;function e(r,i,n){return r.endsWith(n)?r+i:r+n+i}t.joinPathSegments=e}),no=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=t.readdirWithFileTypes=t.read=void 0;var e=Vt(),r=eo(),i=Cr(),n=Sr(),s=br();function a(f,h,m){if(!h.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){o(f,h,m);return}c(f,h,m)}t.read=a;function o(f,h,m){h.fs.readdir(f,{withFileTypes:!0},(D,E)=>{if(D!==null){p(m,D);return}let A=E.map(y=>({dirent:y,name:y.name,path:s.joinPathSegments(f,y.name,h.pathSegmentSeparator)}));if(!h.followSymbolicLinks){l(m,A);return}let d=A.map(y=>u(y,h));r(d,(y,S)=>{if(y!==null){p(m,y);return}l(m,S)})})}t.readdirWithFileTypes=o;function u(f,h){return m=>{if(!f.dirent.isSymbolicLink()){m(null,f);return}h.fs.stat(f.path,(D,E)=>{if(D!==null){if(h.throwErrorOnBrokenSymbolicLink){m(D);return}m(null,f);return}f.dirent=n.fs.createDirentFromStats(f.name,E),m(null,f)})}}function c(f,h,m){h.fs.readdir(f,(D,E)=>{if(D!==null){p(m,D);return}let A=E.map(d=>{let y=s.joinPathSegments(f,d,h.pathSegmentSeparator);return S=>{e.stat(y,h.fsStatSettings,(g,v)=>{if(g!==null){S(g);return}let C={name:d,path:y,dirent:n.fs.createDirentFromStats(d,v)};h.stats&&(C.stats=v),S(null,C)})}});r(A,(d,y)=>{if(d!==null){p(m,d);return}l(m,y)})})}t.readdir=c;function p(f,h){f(h)}function l(f,h){f(null,h)}}),io=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=t.readdirWithFileTypes=t.read=void 0;var e=Vt(),r=Cr(),i=Sr(),n=br();function s(u,c){return!c.stats&&r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?a(u,c):o(u,c)}t.read=s;function a(u,c){return c.fs.readdirSync(u,{withFileTypes:!0}).map(p=>{let l={dirent:p,name:p.name,path:n.joinPathSegments(u,p.name,c.pathSegmentSeparator)};if(l.dirent.isSymbolicLink()&&c.followSymbolicLinks)try{let f=c.fs.statSync(l.path);l.dirent=i.fs.createDirentFromStats(l.name,f)}catch(f){if(c.throwErrorOnBrokenSymbolicLink)throw f}return l})}t.readdirWithFileTypes=a;function o(u,c){return c.fs.readdirSync(u).map(p=>{let l=n.joinPathSegments(u,p,c.pathSegmentSeparator),f=e.statSync(l,c.fsStatSettings),h={name:p,path:l,dirent:i.fs.createDirentFromStats(p,f)};return c.stats&&(h.stats=f),h})}t.readdir=o}),oo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;var e=U("fs");t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};function r(i){return i===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),i)}t.createFileSystemAdapter=r}),uo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("path"),r=Vt(),i=oo(),n=class{constructor(s={}){this._options=s,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=i.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new r.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(s,a){return s!=null?s:a}};t.default=n}),Me=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=t.scandirSync=t.scandir=void 0;var e=no(),r=io(),i=uo();t.Settings=i.default;function n(o,u,c){if(typeof u=="function"){e.read(o,a(),u);return}e.read(o,a(u),c)}t.scandir=n;function s(o,u){let c=a(u);return r.read(o,c)}t.scandirSync=s;function a(o={}){return o instanceof i.default?o:new i.default(o)}}),ao=R((t,e)=>{"use strict";B();function r(i){var n=new i,s=n;function a(){var u=n;return u.next?n=u.next:(n=new i,s=n),u.next=null,u}function o(u){s.next=u,s=u}return{get:a,release:o}}e.exports=r}),so=R((t,e)=>{"use strict";B();var r=ao();function i(o,u,c){if(typeof o=="function"&&(c=u,u=o,o=null),c<1)throw new Error("fastqueue concurrency must be greater than 1");var p=r(s),l=null,f=null,h=0,m=null,D={push:v,drain:n,saturated:n,pause:A,paused:!1,concurrency:c,running:E,resume:S,idle:g,length:d,getQueue:y,unshift:C,empty:n,kill:F,killAndDrain:x,error:k};return D;function E(){return h}function A(){D.paused=!0}function d(){for(var P=l,I=0;P;)P=P.next,I++;return I}function y(){for(var P=l,I=[];P;)I.push(P.value),P=P.next;return I}function S(){if(D.paused){D.paused=!1;for(var P=0;P<D.concurrency;P++)h++,_()}}function g(){return h===0&&D.length()===0}function v(P,I){var w=p.get();w.context=o,w.release=_,w.value=P,w.callback=I||n,w.errorHandler=m,h===D.concurrency||D.paused?f?(f.next=w,f=w):(l=w,f=w,D.saturated()):(h++,u.call(o,w.value,w.worked))}function C(P,I){var w=p.get();w.context=o,w.release=_,w.value=P,w.callback=I||n,h===D.concurrency||D.paused?l?(w.next=l,l=w):(l=w,f=w,D.saturated()):(h++,u.call(o,w.value,w.worked))}function _(P){P&&p.release(P);var I=l;I?D.paused?h--:(f===l&&(f=null),l=I.next,I.next=null,u.call(o,I.value,I.worked),f===null&&D.empty()):--h===0&&D.drain()}function F(){l=null,f=null,D.drain=n}function x(){l=null,f=null,D.drain(),D.drain=n}function k(P){m=P}}function n(){}function s(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var o=this;this.worked=function(u,c){var p=o.callback,l=o.errorHandler,f=o.value;o.value=null,o.callback=n,o.errorHandler&&l(u,f),p.call(o.context,u,c),o.release(o)}}function a(o,u,c){typeof o=="function"&&(c=u,u=o,o=null);function p(A,d){u.call(this,A).then(function(y){d(null,y)},d)}var l=i(o,p,c),f=l.push,h=l.unshift;return l.push=m,l.unshift=D,l.drained=E,l;function m(A){var d=new Promise(function(y,S){f(A,function(g,v){if(g){S(g);return}y(v)})});return d.catch(n),d}function D(A){var d=new Promise(function(y,S){h(A,function(g,v){if(g){S(g);return}y(v)})});return d.catch(n),d}function E(){var A=l.drain,d=new Promise(function(y){l.drain=function(){A(),y()}});return d}}e.exports=i,e.exports.promise=a}),$e=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.joinPathSegments=t.replacePathSegmentSeparator=t.isAppliedFilter=t.isFatalError=void 0;function e(s,a){return s.errorFilter===null?!0:!s.errorFilter(a)}t.isFatalError=e;function r(s,a){return s===null||s(a)}t.isAppliedFilter=r;function i(s,a){return s.split(/[/\\]/).join(a)}t.replacePathSegmentSeparator=i;function n(s,a,o){return s===""?a:s.endsWith(o)?s+a:s+o+a}t.joinPathSegments=n}),Fr=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=$e(),r=class{constructor(i,n){this._root=i,this._settings=n,this._root=e.replacePathSegmentSeparator(i,n.pathSegmentSeparator)}};t.default=r}),wr=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("events"),r=Me(),i=so(),n=$e(),s=Fr(),a=class extends s.default{constructor(o,u){super(o,u),this._settings=u,this._scandir=r.scandir,this._emitter=new e.EventEmitter,this._queue=i(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(o){this._emitter.on("entry",o)}onError(o){this._emitter.once("error",o)}onEnd(o){this._emitter.once("end",o)}_pushToQueue(o,u){let c={directory:o,base:u};this._queue.push(c,p=>{p!==null&&this._handleError(p)})}_worker(o,u){this._scandir(o.directory,this._settings.fsScandirSettings,(c,p)=>{if(c!==null){u(c,void 0);return}for(let l of p)this._handleEntry(l,o.base);u(null,void 0)})}_handleError(o){this._isDestroyed||!n.isFatalError(this._settings,o)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",o))}_handleEntry(o,u){if(this._isDestroyed||this._isFatalError)return;let c=o.path;u!==void 0&&(o.path=n.joinPathSegments(u,o.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,o)&&this._emitEntry(o),o.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,o)&&this._pushToQueue(c,u===void 0?void 0:o.path)}_emitEntry(o){this._emitter.emit("entry",o)}};t.default=a}),co=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=wr(),r=class{constructor(s,a){this._root=s,this._settings=a,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(s){this._reader.onError(a=>{i(s,a)}),this._reader.onEntry(a=>{this._storage.push(a)}),this._reader.onEnd(()=>{n(s,this._storage)}),this._reader.read()}};t.default=r;function i(s,a){s(a)}function n(s,a){s(null,a)}}),lo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("stream"),r=wr(),i=class{constructor(n,s){this._root=n,this._settings=s,this._reader=new r.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(n=>{this._stream.emit("error",n)}),this._reader.onEntry(n=>{this._stream.push(n)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};t.default=i}),po=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=$e(),i=Fr(),n=class extends i.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(s,a){this._queue.add({directory:s,base:a})}_handleQueue(){for(let s of this._queue.values())this._handleDirectory(s.directory,s.base)}_handleDirectory(s,a){try{let o=this._scandir(s,this._settings.fsScandirSettings);for(let u of o)this._handleEntry(u,a)}catch(o){this._handleError(o)}}_handleError(s){if(r.isFatalError(this._settings,s))throw s}_handleEntry(s,a){let o=s.path;a!==void 0&&(s.path=r.joinPathSegments(a,s.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,s)&&this._pushToStorage(s),s.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,s)&&this._pushToQueue(o,a===void 0?void 0:s.path)}_pushToStorage(s){this._storage.push(s)}};t.default=n}),fo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=po(),r=class{constructor(i,n){this._root=i,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}};t.default=r}),ho=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("path"),r=Me(),i=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new r.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(n,s){return n!=null?n:s}};t.default=i}),He=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=t.walkStream=t.walkSync=t.walk=void 0;var e=co(),r=lo(),i=fo(),n=ho();t.Settings=n.default;function s(c,p,l){if(typeof p=="function"){new e.default(c,u()).read(p);return}new e.default(c,u(p)).read(l)}t.walk=s;function a(c,p){let l=u(p);return new i.default(c,l).read()}t.walkSync=a;function o(c,p){let l=u(p);return new r.default(c,l).read()}t.walkStream=o;function u(c={}){return c instanceof n.default?c:new n.default(c)}}),Ge=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("path"),r=Vt(),i=Lt(),n=class{constructor(s){this._settings=s,this._fsStatSettings=new r.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(s){return e.resolve(this._settings.cwd,s)}_makeEntry(s,a){let o={name:a,path:a,dirent:i.fs.createDirentFromStats(a,s)};return this._settings.stats&&(o.stats=s),o}_isFatalError(s){return!i.errno.isEnoentCodeError(s)&&!this._settings.suppressErrors}};t.default=n}),_r=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("stream"),r=Vt(),i=He(),n=Ge(),s=class extends n.default{constructor(){super(...arguments),this._walkStream=i.walkStream,this._stat=r.stat}dynamic(a,o){return this._walkStream(a,o)}static(a,o){let u=a.map(this._getFullEntryPath,this),c=new e.PassThrough({objectMode:!0});c._write=(p,l,f)=>this._getEntry(u[p],a[p],o).then(h=>{h!==null&&o.entryFilter(h)&&c.push(h),p===u.length-1&&c.end(),f()}).catch(f);for(let p=0;p<u.length;p++)c.write(p);return c}_getEntry(a,o,u){return this._getStat(a).then(c=>this._makeEntry(c,o)).catch(c=>{if(u.errorFilter(c))return null;throw c})}_getStat(a){return new Promise((o,u)=>{this._stat(a,this._fsStatSettings,(c,p)=>c===null?o(p):u(c))})}};t.default=s}),mo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=He(),r=Ge(),i=_r(),n=class extends r.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new i.default(this._settings)}dynamic(s,a){return new Promise((o,u)=>{this._walkAsync(s,a,(c,p)=>{c===null?o(p):u(c)})})}async static(s,a){let o=[],u=this._readerStream.static(s,a);return new Promise((c,p)=>{u.once("error",p),u.on("data",l=>o.push(l)),u.once("end",()=>c(o))})}};t.default=n}),go=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=class{constructor(i,n,s){this._patterns=i,this._settings=n,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){let i=e.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let n of i){let s=this._getPatternSegments(n),a=this._splitSegmentsIntoSections(s);this._storage.push({complete:a.length<=1,pattern:n,segments:s,sections:a})}}_getPatternSegments(i){return e.pattern.getPatternParts(i,this._micromatchOptions).map(n=>e.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:e.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(i){return e.array.splitWhen(i,n=>n.dynamic&&e.pattern.hasGlobStar(n.pattern))}};t.default=r}),yo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=go(),r=class extends e.default{match(i){let n=i.split("/"),s=n.length,a=this._storage.filter(o=>!o.complete||o.segments.length>s);for(let o of a){let u=o.sections[0];if(!o.complete&&s>u.length||n.every((c,p)=>{let l=o.segments[p];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};t.default=r}),Do=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=yo(),i=class{constructor(n,s){this._settings=n,this._micromatchOptions=s}getFilter(n,s,a){let o=this._getMatcher(s),u=this._getNegativePatternsRe(a);return c=>this._filter(n,c,o,u)}_getMatcher(n){return new r.default(n,this._settings,this._micromatchOptions)}_getNegativePatternsRe(n){let s=n.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(s,this._micromatchOptions)}_filter(n,s,a,o){if(this._isSkippedByDeep(n,s.path)||this._isSkippedSymbolicLink(s))return!1;let u=e.path.removeLeadingDotSegment(s.path);return this._isSkippedByPositivePatterns(u,a)?!1:this._isSkippedByNegativePatterns(u,o)}_isSkippedByDeep(n,s){return this._settings.deep===1/0?!1:this._getEntryLevel(n,s)>=this._settings.deep}_getEntryLevel(n,s){let a=s.split("/").length;if(n==="")return a;let o=n.split("/").length;return a-o}_isSkippedSymbolicLink(n){return!this._settings.followSymbolicLinks&&n.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(n,s){return!this._settings.baseNameMatch&&!s.match(n)}_isSkippedByNegativePatterns(n,s){return!e.pattern.matchAny(n,s)}};t.default=i}),Eo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=class{constructor(i,n){this._settings=i,this._micromatchOptions=n,this.index=new Map}getFilter(i,n){let s=e.pattern.convertPatternsToRe(i,this._micromatchOptions),a=e.pattern.convertPatternsToRe(n,this._micromatchOptions);return o=>this._filter(o,s,a)}_filter(i,n,s){if(this._settings.unique&&this._isDuplicateEntry(i)||this._onlyFileFilter(i)||this._onlyDirectoryFilter(i)||this._isSkippedByAbsoluteNegativePatterns(i.path,s))return!1;let a=this._settings.baseNameMatch?i.name:i.path,o=i.dirent.isDirectory(),u=this._isMatchToPatterns(a,n,o)&&!this._isMatchToPatterns(i.path,s,o);return this._settings.unique&&u&&this._createIndexRecord(i),u}_isDuplicateEntry(i){return this.index.has(i.path)}_createIndexRecord(i){this.index.set(i.path,void 0)}_onlyFileFilter(i){return this._settings.onlyFiles&&!i.dirent.isFile()}_onlyDirectoryFilter(i){return this._settings.onlyDirectories&&!i.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(i,n){if(!this._settings.absolute)return!1;let s=e.path.makeAbsolute(this._settings.cwd,i);return e.pattern.matchAny(s,n)}_isMatchToPatterns(i,n,s){let a=e.path.removeLeadingDotSegment(i),o=e.pattern.matchAny(a,n);return!o&&s?e.pattern.matchAny(a+"/",n):o}};t.default=r}),Ao=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=class{constructor(i){this._settings=i}getFilter(){return i=>this._isNonFatalError(i)}_isNonFatalError(i){return e.errno.isEnoentCodeError(i)||this._settings.suppressErrors}};t.default=r}),vo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=class{constructor(i){this._settings=i}getTransformer(){return i=>this._transform(i)}_transform(i){let n=i.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&i.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},i),{path:n}):n}};t.default=r}),Ue=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("path"),r=Do(),i=Eo(),n=Ao(),s=vo(),a=class{constructor(o){this._settings=o,this.errorFilter=new n.default(this._settings),this.entryFilter=new i.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new r.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(o){return e.resolve(this._settings.cwd,o.base)}_getReaderOptions(o){let u=o.base==="."?"":o.base;return{basePath:u,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(u,o.positive,o.negative),entryFilter:this.entryFilter.getFilter(o.positive,o.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};t.default=a}),Co=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=mo(),r=Ue(),i=class extends r.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(n){let s=this._getRootDirectory(n),a=this._getReaderOptions(n);return(await this.api(s,n,a)).map(o=>a.transform(o))}api(n,s,a){return s.dynamic?this._reader.dynamic(n,a):this._reader.static(s.patterns,a)}};t.default=i}),So=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=U("stream"),r=_r(),i=Ue(),n=class extends i.default{constructor(){super(...arguments),this._reader=new r.default(this._settings)}read(s){let a=this._getRootDirectory(s),o=this._getReaderOptions(s),u=this.api(a,s,o),c=new e.Readable({objectMode:!0,read:()=>{}});return u.once("error",p=>c.emit("error",p)).on("data",p=>c.emit("data",o.transform(p))).once("end",()=>c.emit("end")),c.once("close",()=>u.destroy()),c}api(s,a,o){return a.dynamic?this._reader.dynamic(s,o):this._reader.static(a.patterns,o)}};t.default=n}),bo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=Vt(),r=He(),i=Ge(),n=class extends i.default{constructor(){super(...arguments),this._walkSync=r.walkSync,this._statSync=e.statSync}dynamic(s,a){return this._walkSync(s,a)}static(s,a){let o=[];for(let u of s){let c=this._getFullEntryPath(u),p=this._getEntry(c,u,a);p===null||!a.entryFilter(p)||o.push(p)}return o}_getEntry(s,a,o){try{let u=this._getStat(s);return this._makeEntry(u,a)}catch(u){if(o.errorFilter(u))return null;throw u}}_getStat(s){return this._statSync(s,this._fsStatSettings)}};t.default=n}),Fo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0});var e=bo(),r=Ue(),i=class extends r.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(n){let s=this._getRootDirectory(n),a=this._getReaderOptions(n);return this.api(s,n,a).map(a.transform)}api(n,s,a){return s.dynamic?this._reader.dynamic(n,a):this._reader.static(s.patterns,a)}};t.default=i}),wo=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var e=U("fs"),r=U("os"),i=Math.max(r.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};var n=class{constructor(s={}){this._options=s,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(s,a){return s===void 0?a:s}_getFileSystemMethods(s={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),s)}};t.default=n}),_o=R((t,e)=>{"use strict";B();var r=Ji(),i=Yi(),n=Co(),s=So(),a=Fo(),o=wo(),u=Lt();async function c(f,h){l(f);let m=p(f,n.default,h),D=await Promise.all(m);return u.array.flatten(D)}(function(f){function h(d,y){l(d);let S=p(d,a.default,y);return u.array.flatten(S)}f.sync=h;function m(d,y){l(d);let S=p(d,s.default,y);return u.stream.merge(S)}f.stream=m;function D(d,y){l(d);let S=i.transform([].concat(d)),g=new o.default(y);return r.generate(S,g)}f.generateTasks=D;function E(d,y){l(d);let S=new o.default(y);return u.pattern.isDynamicPattern(d,S)}f.isDynamicPattern=E;function A(d){return l(d),u.path.escape(d)}f.escapePath=A})(c||(c={}));function p(f,h,m){let D=i.transform([].concat(f)),E=new o.default(m),A=r.generate(D,E),d=new h(E);return A.map(d.read,d)}function l(f){if(![].concat(f).every(h=>u.string.isString(h)&&!u.string.isEmpty(h)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}e.exports=c});B();B();function kr(t){return typeof t>"u"||t===null}function ko(t){return typeof t=="object"&&t!==null}function xo(t){return Array.isArray(t)?t:kr(t)?[]:[t]}function Bo(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function Oo(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function Ro(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Po=kr,To=ko,Io=xo,Lo=Oo,No=Ro,jo=Bo,mt={isNothing:Po,isObject:To,toArray:Io,repeat:Lo,isNegativeZero:No,extend:jo};function xr(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
9
+
10
+ `+t.mark.snippet),i+" "+r):i}function ee(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=xr(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ee.prototype=Object.create(Error.prototype);ee.prototype.constructor=ee;ee.prototype.toString=function(t){return this.name+": "+xr(this,t)};var Ct=ee;function xe(t,e,r,i,n){var s="",a="",o=Math.floor(n/2)-1;return i-e>o&&(s=" ... ",e=i-o+s.length),r-i>o&&(a=" ...",r=i+o-a.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+s.length}}function Be(t,e){return mt.repeat(" ",e-t.length)+t}function Mo(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,a=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var o="",u,c,p=Math.min(t.line+e.linesAfter,n.length).toString().length,l=e.maxLength-(e.indent+p+3);for(u=1;u<=e.linesBefore&&!(a-u<0);u++)c=xe(t.buffer,i[a-u],n[a-u],t.position-(i[a]-i[a-u]),l),o=mt.repeat(" ",e.indent)+Be((t.line-u+1).toString(),p)+" | "+c.str+`
11
+ `+o;for(c=xe(t.buffer,i[a],n[a],t.position,l),o+=mt.repeat(" ",e.indent)+Be((t.line+1).toString(),p)+" | "+c.str+`
12
+ `,o+=mt.repeat("-",e.indent+p+3+c.pos)+`^
13
+ `,u=1;u<=e.linesAfter&&!(a+u>=n.length);u++)c=xe(t.buffer,i[a+u],n[a+u],t.position-(i[a]-i[a+u]),l),o+=mt.repeat(" ",e.indent)+Be((t.line+u+1).toString(),p)+" | "+c.str+`
14
+ `;return o.replace(/\n$/,"")}var $o=Mo,Ho=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Go=["scalar","sequence","mapping"];function Uo(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function Wo(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(Ho.indexOf(r)===-1)throw new Ct('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Uo(e.styleAliases||null),Go.indexOf(this.kind)===-1)throw new Ct('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Dt=Wo;function ur(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}function Ko(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Re(t){return this.extend(t)}Re.prototype.extend=function(t){var e=[],r=[];if(t instanceof Dt)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Ct("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.forEach(function(n){if(!(n instanceof Dt))throw new Ct("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Ct("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new Ct("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(n){if(!(n instanceof Dt))throw new Ct("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Re.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=ur(i,"implicit"),i.compiledExplicit=ur(i,"explicit"),i.compiledTypeMap=Ko(i.compiledImplicit,i.compiledExplicit),i};var qo=Re,Vo=new Dt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Jo=new Dt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Yo=new Dt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Qo=new qo({explicit:[Vo,Jo,Yo]});function Xo(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Zo(){return null}function zo(t){return t===null}var tu=new Dt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Xo,construct:Zo,predicate:zo,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function eu(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function ru(t){return t==="true"||t==="True"||t==="TRUE"}function nu(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var iu=new Dt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eu,construct:ru,predicate:nu,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function ou(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function uu(t){return 48<=t&&t<=55}function au(t){return 48<=t&&t<=57}function su(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!ou(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!uu(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!au(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function cu(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function lu(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!mt.isNegativeZero(t)}var pu=new Dt("tag:yaml.org,2002:int",{kind:"scalar",resolve:su,construct:cu,predicate:lu,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),fu=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function du(t){return!(t===null||!fu.test(t)||t[t.length-1]==="_")}function hu(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var mu=/^[-+]?[0-9]+e/;function gu(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(mt.isNegativeZero(t))return"-0.0";return r=t.toString(10),mu.test(r)?r.replace("e",".e"):r}function yu(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||mt.isNegativeZero(t))}var Du=new Dt("tag:yaml.org,2002:float",{kind:"scalar",resolve:du,construct:hu,predicate:yu,represent:gu,defaultStyle:"lowercase"}),Eu=Qo.extend({implicit:[tu,iu,pu,Du]}),Au=Eu,Br=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Or=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vu(t){return t===null?!1:Br.exec(t)!==null||Or.exec(t)!==null}function Cu(t){var e,r,i,n,s,a,o,u=0,c=null,p,l,f;if(e=Br.exec(t),e===null&&(e=Or.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(p=+e[10],l=+(e[11]||0),c=(p*60+l)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,s,a,o,u)),c&&f.setTime(f.getTime()-c),f}function Su(t){return t.toISOString()}var bu=new Dt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vu,construct:Cu,instanceOf:Date,represent:Su});function Fu(t){return t==="<<"||t===null}var wu=new Dt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Fu}),We=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
15
+ \r`;function _u(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=We;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function ku(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=We,a=0,o=[];for(e=0;e<n;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):r===18?(o.push(a>>10&255),o.push(a>>2&255)):r===12&&o.push(a>>4&255),new Uint8Array(o)}function xu(t){var e="",r=0,i,n,s=t.length,a=We;for(i=0;i<s;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):n===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):n===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function Bu(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Ou=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_u,construct:ku,predicate:Bu,represent:xu}),Ru=Object.prototype.hasOwnProperty,Pu=Object.prototype.toString;function Tu(t){if(t===null)return!0;var e=[],r,i,n,s,a,o=t;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],a=!1,Pu.call(n)!=="[object Object]")return!1;for(s in n)if(Ru.call(n,s))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function Iu(t){return t!==null?t:[]}var Lu=new Dt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Tu,construct:Iu}),Nu=Object.prototype.toString;function ju(t){if(t===null)return!0;var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],Nu.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function Mu(t){if(t===null)return[];var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}var $u=new Dt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ju,construct:Mu}),Hu=Object.prototype.hasOwnProperty;function Gu(t){if(t===null)return!0;var e,r=t;for(e in r)if(Hu.call(r,e)&&r[e]!==null)return!1;return!0}function Uu(t){return t!==null?t:{}}var Wu=new Dt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Gu,construct:Uu}),Rr=Au.extend({implicit:[bu,wu],explicit:[Ou,Lu,$u,Wu]}),It=Object.prototype.hasOwnProperty,de=1,Pr=2,Tr=3,he=4,Oe=1,Ku=2,ar=3,qu=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Vu=/[\x85\u2028\u2029]/,Ju=/[,\[\]\{\}]/,Ir=/^(?:!|!!|![a-z\-]+!)$/i,Lr=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function sr(t){return Object.prototype.toString.call(t)}function kt(t){return t===10||t===13}function Mt(t){return t===9||t===32}function St(t){return t===9||t===32||t===10||t===13}function Wt(t){return t===44||t===91||t===93||t===123||t===125}function Yu(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Qu(t){return t===120?2:t===117?4:t===85?8:0}function Xu(t){return 48<=t&&t<=57?t-48:-1}function cr(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
16
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function Zu(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Nr=new Array(256),jr=new Array(256);for(jt=0;jt<256;jt++)Nr[jt]=cr(jt)?1:0,jr[jt]=cr(jt);var jt;function zu(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Rr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Mr(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=$o(r),new Ct(e,r)}function V(t,e){throw Mr(t,e)}function me(t,e){t.onWarning&&t.onWarning.call(null,Mr(t,e))}var lr={YAML:function(t,e,r){var i,n,s;t.version!==null&&V(t,"duplication of %YAML directive"),r.length!==1&&V(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&V(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),s=parseInt(i[2],10),n!==1&&V(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&me(t,"unsupported YAML version of the document")},TAG:function(t,e,r){var i,n;r.length!==2&&V(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],Ir.test(i)||V(t,"ill-formed tag handle (first argument) of the TAG directive"),It.call(t.tagMap,i)&&V(t,'there is a previously declared suffix for "'+i+'" tag handle'),Lr.test(n)||V(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{V(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n}};function Tt(t,e,r,i){var n,s,a,o;if(e<r){if(o=t.input.slice(e,r),i)for(n=0,s=o.length;n<s;n+=1)a=o.charCodeAt(n),a===9||32<=a&&a<=1114111||V(t,"expected valid JSON character");else qu.test(o)&&V(t,"the stream contains non-printable characters");t.result+=o}}function pr(t,e,r,i){var n,s,a,o;for(mt.isObject(r)||V(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;a<o;a+=1)s=n[a],It.call(e,s)||(e[s]=r[s],i[s]=!0)}function Kt(t,e,r,i,n,s,a,o,u){var c,p;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,p=n.length;c<p;c+=1)Array.isArray(n[c])&&V(t,"nested arrays are not supported inside keys"),typeof n=="object"&&sr(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&sr(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,p=s.length;c<p;c+=1)pr(t,e,s[c],r);else pr(t,e,s,r);else!t.json&&!It.call(r,n)&&It.call(e,n)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=u||t.position,V(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function Ke(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):V(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function ft(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Mt(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(kt(n))for(Ke(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&me(t,"deficient indentation"),i}function Ae(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||St(r)))}function qe(t,e){e===1?t.result+=" ":e>1&&(t.result+=mt.repeat(`
17
+ `,e-1))}function ta(t,e,r){var i,n,s,a,o,u,c,p,l=t.kind,f=t.result,h;if(h=t.input.charCodeAt(t.position),St(h)||Wt(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=t.input.charCodeAt(t.position+1),St(n)||r&&Wt(n)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;h!==0;){if(h===58){if(n=t.input.charCodeAt(t.position+1),St(n)||r&&Wt(n))break}else if(h===35){if(i=t.input.charCodeAt(t.position-1),St(i))break}else{if(t.position===t.lineStart&&Ae(t)||r&&Wt(h))break;if(kt(h))if(u=t.line,c=t.lineStart,p=t.lineIndent,ft(t,!1,-1),t.lineIndent>=e){o=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=u,t.lineStart=c,t.lineIndent=p;break}}o&&(Tt(t,s,a,!1),qe(t,t.line-u),s=a=t.position,o=!1),Mt(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Tt(t,s,a,!1),t.result?!0:(t.kind=l,t.result=f,!1)}function ea(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Tt(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else kt(r)?(Tt(t,i,n,!0),qe(t,ft(t,!1,e)),i=n=t.position):t.position===t.lineStart&&Ae(t)?V(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);V(t,"unexpected end of the stream within a single quoted scalar")}function ra(t,e){var r,i,n,s,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Tt(t,r,t.position,!0),t.position++,!0;if(o===92){if(Tt(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),kt(o))ft(t,!1,e);else if(o<256&&Nr[o])t.result+=jr[o],t.position++;else if((a=Qu(o))>0){for(n=a,s=0;n>0;n--)o=t.input.charCodeAt(++t.position),(a=Yu(o))>=0?s=(s<<4)+a:V(t,"expected hexadecimal character");t.result+=Zu(s),t.position++}else V(t,"unknown escape sequence");r=i=t.position}else kt(o)?(Tt(t,r,i,!0),qe(t,ft(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Ae(t)?V(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}V(t,"unexpected end of the stream within a double quoted scalar")}function na(t,e){var r=!0,i,n,s,a=t.tag,o,u=t.anchor,c,p,l,f,h,m=Object.create(null),D,E,A,d;if(d=t.input.charCodeAt(t.position),d===91)p=93,h=!1,o=[];else if(d===123)p=125,h=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),d=t.input.charCodeAt(++t.position);d!==0;){if(ft(t,!0,e),d=t.input.charCodeAt(t.position),d===p)return t.position++,t.tag=a,t.anchor=u,t.kind=h?"mapping":"sequence",t.result=o,!0;r?d===44&&V(t,"expected the node content, but found ','"):V(t,"missed comma between flow collection entries"),E=D=A=null,l=f=!1,d===63&&(c=t.input.charCodeAt(t.position+1),St(c)&&(l=f=!0,t.position++,ft(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,qt(t,e,de,!1,!0),E=t.tag,D=t.result,ft(t,!0,e),d=t.input.charCodeAt(t.position),(f||t.line===i)&&d===58&&(l=!0,d=t.input.charCodeAt(++t.position),ft(t,!0,e),qt(t,e,de,!1,!0),A=t.result),h?Kt(t,o,m,E,D,A,i,n,s):l?o.push(Kt(t,null,m,E,D,A,i,n,s)):o.push(D),ft(t,!0,e),d=t.input.charCodeAt(t.position),d===44?(r=!0,d=t.input.charCodeAt(++t.position)):r=!1}V(t,"unexpected end of the stream within a flow collection")}function ia(t,e){var r,i,n=Oe,s=!1,a=!1,o=e,u=0,c=!1,p,l;if(l=t.input.charCodeAt(t.position),l===124)i=!1;else if(l===62)i=!0;else return!1;for(t.kind="scalar",t.result="";l!==0;)if(l=t.input.charCodeAt(++t.position),l===43||l===45)Oe===n?n=l===43?ar:Ku:V(t,"repeat of a chomping mode identifier");else if((p=Xu(l))>=0)p===0?V(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?V(t,"repeat of an indentation width identifier"):(o=e+p-1,a=!0);else break;if(Mt(l)){do l=t.input.charCodeAt(++t.position);while(Mt(l));if(l===35)do l=t.input.charCodeAt(++t.position);while(!kt(l)&&l!==0)}for(;l!==0;){for(Ke(t),t.lineIndent=0,l=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&l===32;)t.lineIndent++,l=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),kt(l)){u++;continue}if(t.lineIndent<o){n===ar?t.result+=mt.repeat(`
18
+ `,s?1+u:u):n===Oe&&s&&(t.result+=`
19
+ `);break}for(i?Mt(l)?(c=!0,t.result+=mt.repeat(`
20
+ `,s?1+u:u)):c?(c=!1,t.result+=mt.repeat(`
21
+ `,u+1)):u===0?s&&(t.result+=" "):t.result+=mt.repeat(`
22
+ `,u):t.result+=mt.repeat(`
23
+ `,s?1+u:u),s=!0,a=!0,u=0,r=t.position;!kt(l)&&l!==0;)l=t.input.charCodeAt(++t.position);Tt(t,r,t.position,!1)}return!0}function fr(t,e){var r,i=t.tag,n=t.anchor,s=[],a,o=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,V(t,"tab characters must not be used in indentation")),!(u!==45||(a=t.input.charCodeAt(t.position+1),!St(a))));){if(o=!0,t.position++,ft(t,!0,-1)&&t.lineIndent<=e){s.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,qt(t,e,Tr,!1,!0),s.push(t.result),ft(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)V(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function oa(t,e,r){var i,n,s,a,o,u,c=t.tag,p=t.anchor,l={},f=Object.create(null),h=null,m=null,D=null,E=!1,A=!1,d;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),d=t.input.charCodeAt(t.position);d!==0;){if(!E&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,V(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(d===63||d===58)&&St(i))d===63?(E&&(Kt(t,l,f,h,m,null,a,o,u),h=m=D=null),A=!0,E=!0,n=!0):E?(E=!1,n=!0):V(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,d=i;else{if(a=t.line,o=t.lineStart,u=t.position,!qt(t,r,Pr,!1,!0))break;if(t.line===s){for(d=t.input.charCodeAt(t.position);Mt(d);)d=t.input.charCodeAt(++t.position);if(d===58)d=t.input.charCodeAt(++t.position),St(d)||V(t,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(Kt(t,l,f,h,m,null,a,o,u),h=m=D=null),A=!0,E=!1,n=!1,h=t.tag,m=t.result;else if(A)V(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=p,!0}else if(A)V(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=p,!0}if((t.line===s||t.lineIndent>e)&&(E&&(a=t.line,o=t.lineStart,u=t.position),qt(t,e,he,!0,n)&&(E?m=t.result:D=t.result),E||(Kt(t,l,f,h,m,D,a,o,u),h=m=D=null),ft(t,!0,-1),d=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&d!==0)V(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return E&&Kt(t,l,f,h,m,null,a,o,u),A&&(t.tag=c,t.anchor=p,t.kind="mapping",t.result=l),A}function ua(t){var e,r=!1,i=!1,n,s,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&V(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(s=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):V(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!St(a);)a===33&&(i?V(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Ir.test(n)||V(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),Ju.test(s)&&V(t,"tag suffix cannot contain flow indicator characters")}s&&!Lr.test(s)&&V(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{V(t,"tag name is malformed: "+s)}return r?t.tag=s:It.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:V(t,'undeclared tag handle "'+n+'"'),!0}function aa(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&V(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!St(r)&&!Wt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&V(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function sa(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!St(i)&&!Wt(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&V(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),It.call(t.anchorMap,r)||V(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],ft(t,!0,-1),!0}function qt(t,e,r,i,n){var s,a,o,u=1,c=!1,p=!1,l,f,h,m,D,E;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=he===r||Tr===r,i&&ft(t,!0,-1)&&(c=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;ua(t)||aa(t);)ft(t,!0,-1)?(c=!0,o=s,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):o=!1;if(o&&(o=c||n),(u===1||he===r)&&(de===r||Pr===r?D=e:D=e+1,E=t.position-t.lineStart,u===1?o&&(fr(t,E)||oa(t,E,D))||na(t,D)?p=!0:(a&&ia(t,D)||ea(t,D)||ra(t,D)?p=!0:sa(t)?(p=!0,(t.tag!==null||t.anchor!==null)&&V(t,"alias node should not have any properties")):ta(t,D,de===r)&&(p=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(p=o&&fr(t,E))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&V(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,f=t.implicitTypes.length;l<f;l+=1)if(m=t.implicitTypes[l],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(It.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,h=t.typeMap.multi[t.kind||"fallback"],l=0,f=h.length;l<f;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){m=h[l];break}m||V(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&V(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):V(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||p}function ca(t){var e=t.position,r,i,n,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(ft(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!St(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&V(t,"directive name must not be less than one character in length");a!==0;){for(;Mt(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!kt(a));break}if(kt(a))break;for(r=t.position;a!==0&&!St(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&Ke(t),It.call(lr,i)?lr[i](t,i,n):me(t,'unknown document directive "'+i+'"')}if(ft(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,ft(t,!0,-1)):s&&V(t,"directives end mark is expected"),qt(t,t.lineIndent-1,he,!1,!0),ft(t,!0,-1),t.checkLineBreaks&&Vu.test(t.input.slice(e,t.position))&&me(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Ae(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ft(t,!0,-1));return}if(t.position<t.length-1)V(t,"end of the stream or a document separator is expected");else return}function $r(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
24
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new zu(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,V(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ca(r);return r.documents}function la(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=$r(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function pa(t,e){var r=$r(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ct("expected a single document in the stream, but found more")}}var fa=la,da=pa,Hr={loadAll:fa,load:da},Gr=Object.prototype.toString,Ur=Object.prototype.hasOwnProperty,Ve=65279,ha=9,re=10,ma=13,ga=32,ya=33,Da=34,Pe=35,Ea=37,Aa=38,va=39,Ca=42,Wr=44,Sa=45,ge=58,ba=61,Fa=62,wa=63,_a=64,Kr=91,qr=93,ka=96,Vr=123,xa=124,Jr=125,Et={};Et[0]="\\0";Et[7]="\\a";Et[8]="\\b";Et[9]="\\t";Et[10]="\\n";Et[11]="\\v";Et[12]="\\f";Et[13]="\\r";Et[27]="\\e";Et[34]='\\"';Et[92]="\\\\";Et[133]="\\N";Et[160]="\\_";Et[8232]="\\L";Et[8233]="\\P";var Ba=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Oa=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ra(t,e){var r,i,n,s,a,o,u;if(e===null)return{};for(r={},i=Object.keys(e),n=0,s=i.length;n<s;n+=1)a=i[n],o=String(e[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),u=t.compiledTypeMap.fallback[a],u&&Ur.call(u.styleAliases,o)&&(o=u.styleAliases[o]),r[a]=o;return r}function Pa(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new Ct("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+mt.repeat("0",i-e.length)+e}var Ta=1,ne=2;function Ia(t){this.schema=t.schema||Rr,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=mt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Ra(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?ne:Ta,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function dr(t,e){for(var r=mt.repeat(" ",e),i=0,n=-1,s="",a,o=t.length;i<o;)n=t.indexOf(`
25
+ `,i),n===-1?(a=t.slice(i),i=o):(a=t.slice(i,n+1),i=n+1),a.length&&a!==`
26
+ `&&(s+=r),s+=a;return s}function Te(t,e){return`
27
+ `+mt.repeat(" ",t.indent*e)}function La(t,e){var r,i,n;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(n=t.implicitTypes[r],n.resolve(e))return!0;return!1}function ye(t){return t===ga||t===ha}function ie(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Ve||65536<=t&&t<=1114111}function hr(t){return ie(t)&&t!==Ve&&t!==ma&&t!==re}function mr(t,e,r){var i=hr(t),n=i&&!ye(t);return(r?i:i&&t!==Wr&&t!==Kr&&t!==qr&&t!==Vr&&t!==Jr)&&t!==Pe&&!(e===ge&&!n)||hr(e)&&!ye(e)&&t===Pe||e===ge&&n}function Na(t){return ie(t)&&t!==Ve&&!ye(t)&&t!==Sa&&t!==wa&&t!==ge&&t!==Wr&&t!==Kr&&t!==qr&&t!==Vr&&t!==Jr&&t!==Pe&&t!==Aa&&t!==Ca&&t!==ya&&t!==xa&&t!==ba&&t!==Fa&&t!==va&&t!==Da&&t!==Ea&&t!==_a&&t!==ka}function ja(t){return!ye(t)&&t!==ge}function te(t,e){var r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Yr(t){var e=/^\n* /;return e.test(t)}var Qr=1,Ie=2,Xr=3,Zr=4,Ut=5;function Ma(t,e,r,i,n,s,a,o){var u,c=0,p=null,l=!1,f=!1,h=i!==-1,m=-1,D=Na(te(t,0))&&ja(te(t,t.length-1));if(e||a)for(u=0;u<t.length;c>=65536?u+=2:u++){if(c=te(t,u),!ie(c))return Ut;D=D&&mr(c,p,o),p=c}else{for(u=0;u<t.length;c>=65536?u+=2:u++){if(c=te(t,u),c===re)l=!0,h&&(f=f||u-m-1>i&&t[m+1]!==" ",m=u);else if(!ie(c))return Ut;D=D&&mr(c,p,o),p=c}f=f||h&&u-m-1>i&&t[m+1]!==" "}return!l&&!f?D&&!a&&!n(t)?Qr:s===ne?Ut:Ie:r>9&&Yr(t)?Ut:a?s===ne?Ut:Ie:f?Zr:Xr}function $a(t,e,r,i,n){t.dump=function(){if(e.length===0)return t.quotingType===ne?'""':"''";if(!t.noCompatMode&&(Ba.indexOf(e)!==-1||Oa.test(e)))return t.quotingType===ne?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),a=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),o=i||t.flowLevel>-1&&r>=t.flowLevel;function u(c){return La(t,c)}switch(Ma(e,o,t.indent,a,u,t.quotingType,t.forceQuotes&&!i,n)){case Qr:return e;case Ie:return"'"+e.replace(/'/g,"''")+"'";case Xr:return"|"+gr(e,t.indent)+yr(dr(e,s));case Zr:return">"+gr(e,t.indent)+yr(dr(Ha(e,a),s));case Ut:return'"'+Ga(e)+'"';default:throw new Ct("impossible error: invalid scalar style")}}()}function gr(t,e){var r=Yr(t)?String(e):"",i=t[t.length-1]===`
28
+ `,n=i&&(t[t.length-2]===`
29
+ `||t===`
30
+ `),s=n?"+":i?"":"-";return r+s+`
31
+ `}function yr(t){return t[t.length-1]===`
32
+ `?t.slice(0,-1):t}function Ha(t,e){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=t.indexOf(`
33
+ `);return c=c!==-1?c:t.length,r.lastIndex=c,Dr(t.slice(0,c),e)}(),n=t[0]===`
34
+ `||t[0]===" ",s,a;a=r.exec(t);){var o=a[1],u=a[2];s=u[0]===" ",i+=o+(!n&&!s&&u!==""?`
35
+ `:"")+Dr(u,e),n=s}return i}function Dr(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,s,a=0,o=0,u="";i=r.exec(t);)o=i.index,o-n>e&&(s=a>n?a:o,u+=`
36
+ `+t.slice(n,s),n=s+1),a=o;return u+=`
37
+ `,t.length-n>e&&a>n?u+=t.slice(n,a)+`
38
+ `+t.slice(a+1):u+=t.slice(n),u.slice(1)}function Ga(t){for(var e="",r=0,i,n=0;n<t.length;r>=65536?n+=2:n++)r=te(t,n),i=Et[r],!i&&ie(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||Pa(r);return e}function Ua(t,e,r){var i="",n=t.tag,s,a,o;for(s=0,a=r.length;s<a;s+=1)o=r[s],t.replacer&&(o=t.replacer.call(r,String(s),o)),(Ot(t,e,o,!1,!1)||typeof o>"u"&&Ot(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}function Er(t,e,r,i){var n="",s=t.tag,a,o,u;for(a=0,o=r.length;a<o;a+=1)u=r[a],t.replacer&&(u=t.replacer.call(r,String(a),u)),(Ot(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ot(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Te(t,e)),t.dump&&re===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=s,t.dump=n||"[]"}function Wa(t,e,r){var i="",n=t.tag,s=Object.keys(r),a,o,u,c,p;for(a=0,o=s.length;a<o;a+=1)p="",i!==""&&(p+=", "),t.condenseFlow&&(p+='"'),u=s[a],c=r[u],t.replacer&&(c=t.replacer.call(r,u,c)),Ot(t,e,u,!1,!1)&&(t.dump.length>1024&&(p+="? "),p+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ot(t,e,c,!1,!1)&&(p+=t.dump,i+=p));t.tag=n,t.dump="{"+i+"}"}function Ka(t,e,r,i){var n="",s=t.tag,a=Object.keys(r),o,u,c,p,l,f;if(t.sortKeys===!0)a.sort();else if(typeof t.sortKeys=="function")a.sort(t.sortKeys);else if(t.sortKeys)throw new Ct("sortKeys must be a boolean or a function");for(o=0,u=a.length;o<u;o+=1)f="",(!i||n!=="")&&(f+=Te(t,e)),c=a[o],p=r[c],t.replacer&&(p=t.replacer.call(r,c,p)),Ot(t,e+1,c,!0,!0,!0)&&(l=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,l&&(t.dump&&re===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,l&&(f+=Te(t,e)),Ot(t,e+1,p,!0,l)&&(t.dump&&re===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,n+=f));t.tag=s,t.dump=n||"{}"}function Ar(t,e,r){var i,n,s,a,o,u;for(n=r?t.explicitTypes:t.implicitTypes,s=0,a=n.length;s<a;s+=1)if(o=n[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof e=="object"&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(r?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(u=t.styleMap[o.tag]||o.defaultStyle,Gr.call(o.represent)==="[object Function]")i=o.represent(e,u);else if(Ur.call(o.represent,u))i=o.represent[u](e,u);else throw new Ct("!<"+o.tag+'> tag resolver accepts not "'+u+'" style');t.dump=i}return!0}return!1}function Ot(t,e,r,i,n,s,a){t.tag=null,t.dump=r,Ar(t,r,!1)||Ar(t,r,!0);var o=Gr.call(t.dump),u=i,c;i&&(i=t.flowLevel<0||t.flowLevel>e);var p=o==="[object Object]"||o==="[object Array]",l,f;if(p&&(l=t.duplicates.indexOf(r),f=l!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(n=!1),f&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(p&&f&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(t.dump).length!==0?(Ka(t,e,t.dump,n),f&&(t.dump="&ref_"+l+t.dump)):(Wa(t,e,t.dump),f&&(t.dump="&ref_"+l+" "+t.dump));else if(o==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!a&&e>0?Er(t,e-1,t.dump,n):Er(t,e,t.dump,n),f&&(t.dump="&ref_"+l+t.dump)):(Ua(t,e,t.dump),f&&(t.dump="&ref_"+l+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&$a(t,t.dump,e,s,u);else{if(o==="[object Undefined]"||t.skipInvalid)return!1;throw new Ct("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}function qa(t,e){var r=[],i=[],n,s;for(Le(t,r,i),n=0,s=i.length;n<s;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(s)}function Le(t,e,r){var i,n,s;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,s=t.length;n<s;n+=1)Le(t[n],e,r);else for(i=Object.keys(t),n=0,s=i.length;n<s;n+=1)Le(t[i[n]],e,r)}function Va(t,e){e=e||{};var r=new Ia(e);r.noRefs||qa(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ot(r,0,i,!0,!0)?r.dump+`
39
+ `:""}var Ja=Va,Ya={dump:Ja};function Je(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var gc=Hr.load,yc=Hr.loadAll,Dc=Ya.dump;var Ec=Je("safeLoad","load"),Ac=Je("safeLoadAll","loadAll"),vc=Je("safeDump","dump");var Cc=Pt(_o());var en=pt(require("os"),1),Qa=R((t,e)=>{B(),e.exports=s,s.sync=a;var r=U("fs");function i(o,u){var c=u.pathExt!==void 0?u.pathExt:process.env.PATHEXT;if(!c||(c=c.split(";"),c.indexOf("")!==-1))return!0;for(var p=0;p<c.length;p++){var l=c[p].toLowerCase();if(l&&o.substr(-l.length).toLowerCase()===l)return!0}return!1}function n(o,u,c){return!o.isSymbolicLink()&&!o.isFile()?!1:i(u,c)}function s(o,u,c){r.stat(o,function(p,l){c(p,p?!1:n(l,o,u))})}function a(o,u){return n(r.statSync(o),o,u)}}),Xa=R((t,e)=>{B(),e.exports=i,i.sync=n;var r=U("fs");function i(o,u,c){r.stat(o,function(p,l){c(p,p?!1:s(l,u))})}function n(o,u){return s(r.statSync(o),u)}function s(o,u){return o.isFile()&&a(o,u)}function a(o,u){var c=o.mode,p=o.uid,l=o.gid,f=u.uid!==void 0?u.uid:process.getuid&&process.getuid(),h=u.gid!==void 0?u.gid:process.getgid&&process.getgid(),m=parseInt("100",8),D=parseInt("010",8),E=parseInt("001",8),A=m|D,d=c&E||c&D&&l===h||c&m&&p===f||c&A&&f===0;return d}}),Za=R((t,e)=>{B();var r=U("fs"),i;process.platform==="win32"||global.TESTING_WINDOWS?i=Qa():i=Xa(),e.exports=n,n.sync=s;function n(a,o,u){if(typeof o=="function"&&(u=o,o={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(c,p){n(a,o||{},function(l,f){l?p(l):c(f)})})}i(a,o||{},function(c,p){c&&(c.code==="EACCES"||o&&o.ignoreErrors)&&(c=null,p=!1),u(c,p)})}function s(a,o){try{return i.sync(a,o||{})}catch(u){if(o&&o.ignoreErrors||u.code==="EACCES")return!1;throw u}}}),za=R((t,e)=>{B();var r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",i=U("path"),n=r?";":":",s=Za(),a=p=>Object.assign(new Error(`not found: ${p}`),{code:"ENOENT"}),o=(p,l)=>{let f=l.colon||n,h=p.match(/\//)||r&&p.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(l.path||process.env.PATH||"").split(f)],m=r?l.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",D=r?m.split(f):[""];return r&&p.indexOf(".")!==-1&&D[0]!==""&&D.unshift(""),{pathEnv:h,pathExt:D,pathExtExe:m}},u=(p,l,f)=>{typeof l=="function"&&(f=l,l={}),l||(l={});let{pathEnv:h,pathExt:m,pathExtExe:D}=o(p,l),E=[],A=y=>new Promise((S,g)=>{if(y===h.length)return l.all&&E.length?S(E):g(a(p));let v=h[y],C=/^".*"$/.test(v)?v.slice(1,-1):v,_=i.join(C,p),F=!C&&/^\.[\\\/]/.test(p)?p.slice(0,2)+_:_;S(d(F,y,0))}),d=(y,S,g)=>new Promise((v,C)=>{if(g===m.length)return v(A(S+1));let _=m[g];s(y+_,{pathExt:D},(F,x)=>{if(!F&&x)if(l.all)E.push(y+_);else return v(y+_);return v(d(y,S,g+1))})});return f?A(0).then(y=>f(null,y),f):A(0)},c=(p,l)=>{l=l||{};let{pathEnv:f,pathExt:h,pathExtExe:m}=o(p,l),D=[];for(let E=0;E<f.length;E++){let A=f[E],d=/^".*"$/.test(A)?A.slice(1,-1):A,y=i.join(d,p),S=!d&&/^\.[\\\/]/.test(p)?p.slice(0,2)+y:y;for(let g=0;g<h.length;g++){let v=S+h[g];try{if(s.sync(v,{pathExt:m}))if(l.all)D.push(v);else return v}catch{}}}if(l.all&&D.length)return D;if(l.nothrow)return null;throw a(p)};e.exports=u,u.sync=c}),zr=R((t,e)=>{"use strict";B();var r=(i={})=>{let n=i.env||process.env;return(i.platform||process.platform)!=="win32"?"PATH":Object.keys(n).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};e.exports=r,e.exports.default=r}),ts=R((t,e)=>{"use strict";B();var r=U("path"),i=za(),n=zr();function s(o,u){let c=o.options.env||process.env,p=process.cwd(),l=o.options.cwd!=null,f=l&&process.chdir!==void 0&&!process.chdir.disabled;if(f)try{process.chdir(o.options.cwd)}catch{}let h;try{h=i.sync(o.command,{path:c[n({env:c})],pathExt:u?r.delimiter:void 0})}catch{}finally{f&&process.chdir(p)}return h&&(h=r.resolve(l?o.options.cwd:"",h)),h}function a(o){return s(o)||s(o,!0)}e.exports=a}),es=R((t,e)=>{"use strict";B();var r=/([()\][%!^"`<>&|;, *?])/g;function i(s){return s=s.replace(r,"^$1"),s}function n(s,a){return s=`${s}`,s=s.replace(/(\\*)"/g,'$1$1\\"'),s=s.replace(/(\\*)$/,"$1$1"),s=`"${s}"`,s=s.replace(r,"^$1"),a&&(s=s.replace(r,"^$1")),s}e.exports.command=i,e.exports.argument=n}),rs=R((t,e)=>{"use strict";B(),e.exports=/^#!(.*)/}),ns=R((t,e)=>{"use strict";B();var r=rs();e.exports=(i="")=>{let n=i.match(r);if(!n)return null;let[s,a]=n[0].replace(/#! ?/,"").split(" "),o=s.split("/").pop();return o==="env"?a:a?`${o} ${a}`:o}}),is=R((t,e)=>{"use strict";B();var r=U("fs"),i=ns();function n(s){let a=Buffer.alloc(150),o;try{o=r.openSync(s,"r"),r.readSync(o,a,0,150,0),r.closeSync(o)}catch{}return i(a.toString())}e.exports=n}),os=R((t,e)=>{"use strict";B();var r=U("path"),i=ts(),n=es(),s=is(),a=process.platform==="win32",o=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function c(f){f.file=i(f);let h=f.file&&s(f.file);return h?(f.args.unshift(f.file),f.command=h,i(f)):f.file}function p(f){if(!a)return f;let h=c(f),m=!o.test(h);if(f.options.forceShell||m){let D=u.test(h);f.command=r.normalize(f.command),f.command=n.command(f.command),f.args=f.args.map(A=>n.argument(A,D));let E=[f.command].concat(f.args).join(" ");f.args=["/d","/s","/c",`"${E}"`],f.command=process.env.comspec||"cmd.exe",f.options.windowsVerbatimArguments=!0}return f}function l(f,h,m){h&&!Array.isArray(h)&&(m=h,h=null),h=h?h.slice(0):[],m=Object.assign({},m);let D={command:f,args:h,options:m,file:void 0,original:{command:f,args:h}};return m.shell?D:p(D)}e.exports=l}),us=R((t,e)=>{"use strict";B();var r=process.platform==="win32";function i(o,u){return Object.assign(new Error(`${u} ${o.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${u} ${o.command}`,path:o.command,spawnargs:o.args})}function n(o,u){if(!r)return;let c=o.emit;o.emit=function(p,l){if(p==="exit"){let f=s(l,u,"spawn");if(f)return c.call(o,"error",f)}return c.apply(o,arguments)}}function s(o,u){return r&&o===1&&!u.file?i(u.original,"spawn"):null}function a(o,u){return r&&o===1&&!u.file?i(u.original,"spawnSync"):null}e.exports={hookChildProcess:n,verifyENOENT:s,verifyENOENTSync:a,notFoundError:i}}),as=R((t,e)=>{"use strict";B();var r=U("child_process"),i=os(),n=us();function s(o,u,c){let p=i(o,u,c),l=r.spawn(p.command,p.args,p.options);return n.hookChildProcess(l,p),l}function a(o,u,c){let p=i(o,u,c),l=r.spawnSync(p.command,p.args,p.options);return l.error=l.error||n.verifyENOENTSync(l.status,p),l}e.exports=s,e.exports.spawn=s,e.exports.sync=a,e.exports._parse=i,e.exports._enoent=n}),ss=R((t,e)=>{"use strict";B(),e.exports=r=>{let i=typeof r=="string"?`
40
+ `:`
41
+ `.charCodeAt(),n=typeof r=="string"?"\r":"\r".charCodeAt();return r[r.length-1]===i&&(r=r.slice(0,r.length-1)),r[r.length-1]===n&&(r=r.slice(0,r.length-1)),r}}),cs=R((t,e)=>{"use strict";B();var r=U("path"),i=zr(),n=s=>{s={cwd:process.cwd(),path:process.env[i()],execPath:process.execPath,...s};let a,o=r.resolve(s.cwd),u=[];for(;a!==o;)u.push(r.join(o,"node_modules/.bin")),a=o,o=r.resolve(o,"..");let c=r.resolve(s.cwd,s.execPath,"..");return u.push(c),u.concat(s.path).join(r.delimiter)};e.exports=n,e.exports.default=n,e.exports.env=s=>{s={env:process.env,...s};let a={...s.env},o=i({env:a});return s.path=a[o],a[o]=e.exports(s),a}}),ls=R((t,e)=>{"use strict";B();var r=(i,n)=>{for(let s of Reflect.ownKeys(n))Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(n,s));return i};e.exports=r,e.exports.default=r}),ps=R((t,e)=>{"use strict";B();var r=ls(),i=new WeakMap,n=(s,a={})=>{if(typeof s!="function")throw new TypeError("Expected a function");let o,u=0,c=s.displayName||s.name||"<anonymous>",p=function(...l){if(i.set(p,++u),u===1)o=s.apply(this,l),s=null;else if(a.throw===!0)throw new Error(`Function \`${c}\` can only be called once`);return o};return r(p,s),i.set(p,u),p};e.exports=n,e.exports.default=n,e.exports.callCount=s=>{if(!i.has(s))throw new Error(`The given function \`${s.name}\` is not wrapped by the \`onetime\` package`);return i.get(s)}}),fs=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNALS=void 0;var e=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];t.SIGNALS=e}),tn=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.SIGRTMAX=t.getRealtimeSignals=void 0;var e=function(){let s=n-i+1;return Array.from({length:s},r)};t.getRealtimeSignals=e;var r=function(s,a){return{name:`SIGRT${a+1}`,number:i+a,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},i=34,n=64;t.SIGRTMAX=n}),ds=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.getSignals=void 0;var e=U("os"),r=fs(),i=tn(),n=function(){let a=(0,i.getRealtimeSignals)();return[...r.SIGNALS,...a].map(s)};t.getSignals=n;var s=function({name:a,number:o,description:u,action:c,forced:p=!1,standard:l}){let{signals:{[a]:f}}=e.constants,h=f!==void 0;return{name:a,number:h?f:o,description:u,supported:h,action:c,forced:p,standard:l}}}),hs=R(t=>{"use strict";B(),Object.defineProperty(t,"__esModule",{value:!0}),t.signalsByNumber=t.signalsByName=void 0;var e=U("os"),r=ds(),i=tn(),n=function(){return(0,r.getSignals)().reduce(s,{})},s=function(l,{name:f,number:h,description:m,supported:D,action:E,forced:A,standard:d}){return{...l,[f]:{name:f,number:h,description:m,supported:D,action:E,forced:A,standard:d}}},a=n();t.signalsByName=a;var o=function(){let l=(0,r.getSignals)(),f=i.SIGRTMAX+1,h=Array.from({length:f},(m,D)=>u(D,l));return Object.assign({},...h)},u=function(l,f){let h=c(l,f);if(h===void 0)return{};let{name:m,description:D,supported:E,action:A,forced:d,standard:y}=h;return{[l]:{name:m,number:l,description:D,supported:E,action:A,forced:d,standard:y}}},c=function(l,f){let h=f.find(({name:m})=>e.constants.signals[m]===l);return h!==void 0?h:f.find(m=>m.number===l)},p=o();t.signalsByNumber=p}),ms=R((t,e)=>{"use strict";B();var{signalsByName:r}=hs(),i=({timedOut:s,timeout:a,errorCode:o,signal:u,signalDescription:c,exitCode:p,isCanceled:l})=>s?`timed out after ${a} milliseconds`:l?"was canceled":o!==void 0?`failed with ${o}`:u!==void 0?`was killed with ${u} (${c})`:p!==void 0?`failed with exit code ${p}`:"failed",n=({stdout:s,stderr:a,all:o,error:u,signal:c,exitCode:p,command:l,escapedCommand:f,timedOut:h,isCanceled:m,killed:D,parsed:{options:{timeout:E}}})=>{p=p===null?void 0:p,c=c===null?void 0:c;let A=c===void 0?void 0:r[c].description,d=u&&u.code,y=`Command ${i({timedOut:h,timeout:E,errorCode:d,signal:c,signalDescription:A,exitCode:p,isCanceled:m})}: ${l}`,S=Object.prototype.toString.call(u)==="[object Error]",g=S?`${y}
42
+ ${u.message}`:y,v=[g,a,s].filter(Boolean).join(`
43
+ `);return S?(u.originalMessage=u.message,u.message=v):u=new Error(v),u.shortMessage=g,u.command=l,u.escapedCommand=f,u.exitCode=p,u.signal=c,u.signalDescription=A,u.stdout=s,u.stderr=a,o!==void 0&&(u.all=o),"bufferedData"in u&&delete u.bufferedData,u.failed=!0,u.timedOut=Boolean(h),u.isCanceled=m,u.killed=D&&!h,u};e.exports=n}),gs=R((t,e)=>{"use strict";B();var r=["stdin","stdout","stderr"],i=s=>r.some(a=>s[a]!==void 0),n=s=>{if(!s)return;let{stdio:a}=s;if(a===void 0)return r.map(u=>s[u]);if(i(s))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${r.map(u=>`\`${u}\``).join(", ")}`);if(typeof a=="string")return a;if(!Array.isArray(a))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof a}\``);let o=Math.max(a.length,r.length);return Array.from({length:o},(u,c)=>a[c])};e.exports=n,e.exports.node=s=>{let a=n(s);return a==="ipc"?"ipc":a===void 0||typeof a=="string"?[a,a,a,"ipc"]:a.includes("ipc")?a:[...a,"ipc"]}}),ys=R((t,e)=>{B(),e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}),Ds=R((t,e)=>{B();var r=global.process,i=function(d){return d&&typeof d=="object"&&typeof d.removeListener=="function"&&typeof d.emit=="function"&&typeof d.reallyExit=="function"&&typeof d.listeners=="function"&&typeof d.kill=="function"&&typeof d.pid=="number"&&typeof d.on=="function"};i(r)?(n=U("assert"),s=ys(),a=/^win/i.test(r.platform),o=U("events"),typeof o!="function"&&(o=o.EventEmitter),r.__signal_exit_emitter__?u=r.__signal_exit_emitter__:(u=r.__signal_exit_emitter__=new o,u.count=0,u.emitted={}),u.infinite||(u.setMaxListeners(1/0),u.infinite=!0),e.exports=function(d,y){if(!i(global.process))return function(){};n.equal(typeof d,"function","a callback must be provided for exit handler"),f===!1&&h();var S="exit";y&&y.alwaysLast&&(S="afterexit");var g=function(){u.removeListener(S,d),u.listeners("exit").length===0&&u.listeners("afterexit").length===0&&c()};return u.on(S,d),g},c=function(){!f||!i(global.process)||(f=!1,s.forEach(function(d){try{r.removeListener(d,l[d])}catch{}}),r.emit=E,r.reallyExit=m,u.count-=1)},e.exports.unload=c,p=function(d,y,S){u.emitted[d]||(u.emitted[d]=!0,u.emit(d,y,S))},l={},s.forEach(function(d){l[d]=function(){if(i(global.process)){var y=r.listeners(d);y.length===u.count&&(c(),p("exit",null,d),p("afterexit",null,d),a&&d==="SIGHUP"&&(d="SIGINT"),r.kill(r.pid,d))}}}),e.exports.signals=function(){return s},f=!1,h=function(){f||!i(global.process)||(f=!0,u.count+=1,s=s.filter(function(d){try{return r.on(d,l[d]),!0}catch{return!1}}),r.emit=A,r.reallyExit=D)},e.exports.load=h,m=r.reallyExit,D=function(d){!i(global.process)||(r.exitCode=d||0,p("exit",r.exitCode,null),p("afterexit",r.exitCode,null),m.call(r,r.exitCode))},E=r.emit,A=function(d,y){if(d==="exit"&&i(global.process)){y!==void 0&&(r.exitCode=y);var S=E.apply(this,arguments);return p("exit",r.exitCode,null),p("afterexit",r.exitCode,null),S}else return E.apply(this,arguments)}):e.exports=function(){return function(){}};var n,s,a,o,u,c,p,l,f,h,m,D,E,A}),Es=R((t,e)=>{"use strict";B();var r=U("os"),i=Ds(),n=1e3*5,s=(D,E="SIGTERM",A={})=>{let d=D(E);return a(D,E,A,d),d},a=(D,E,A,d)=>{if(!o(E,A,d))return;let y=c(A),S=setTimeout(()=>{D("SIGKILL")},y);S.unref&&S.unref()},o=(D,{forceKillAfterTimeout:E},A)=>u(D)&&E!==!1&&A,u=D=>D===r.constants.signals.SIGTERM||typeof D=="string"&&D.toUpperCase()==="SIGTERM",c=({forceKillAfterTimeout:D=!0})=>{if(D===!0)return n;if(!Number.isFinite(D)||D<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${D}\` (${typeof D})`);return D},p=(D,E)=>{D.kill()&&(E.isCanceled=!0)},l=(D,E,A)=>{D.kill(E),A(Object.assign(new Error("Timed out"),{timedOut:!0,signal:E}))},f=(D,{timeout:E,killSignal:A="SIGTERM"},d)=>{if(E===0||E===void 0)return d;let y,S=new Promise((v,C)=>{y=setTimeout(()=>{l(D,A,C)},E)}),g=d.finally(()=>{clearTimeout(y)});return Promise.race([S,g])},h=({timeout:D})=>{if(D!==void 0&&(!Number.isFinite(D)||D<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${D}\` (${typeof D})`)},m=async(D,{cleanup:E,detached:A},d)=>{if(!E||A)return d;let y=i(()=>{D.kill()});return d.finally(()=>{y()})};e.exports={spawnedKill:s,spawnedCancel:p,setupTimeout:f,validateTimeout:h,setExitHandler:m}}),As=R((t,e)=>{"use strict";B();var r=i=>i!==null&&typeof i=="object"&&typeof i.pipe=="function";r.writable=i=>r(i)&&i.writable!==!1&&typeof i._write=="function"&&typeof i._writableState=="object",r.readable=i=>r(i)&&i.readable!==!1&&typeof i._read=="function"&&typeof i._readableState=="object",r.duplex=i=>r.writable(i)&&r.readable(i),r.transform=i=>r.duplex(i)&&typeof i._transform=="function",e.exports=r}),vs=R((t,e)=>{"use strict";B();var{PassThrough:r}=U("stream");e.exports=i=>{i={...i};let{array:n}=i,{encoding:s}=i,a=s==="buffer",o=!1;n?o=!(s||a):s=s||"utf8",a&&(s=null);let u=new r({objectMode:o});s&&u.setEncoding(s);let c=0,p=[];return u.on("data",l=>{p.push(l),o?c=p.length:c+=l.length}),u.getBufferedValue=()=>n?p:a?Buffer.concat(p,c):p.join(""),u.getBufferedLength=()=>c,u}}),Cs=R((t,e)=>{"use strict";B();var{constants:r}=U("buffer"),i=U("stream"),{promisify:n}=U("util"),s=vs(),a=n(i.pipeline),o=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function u(c,p){if(!c)throw new Error("Expected a stream");p={maxBuffer:1/0,...p};let{maxBuffer:l}=p,f=s(p);return await new Promise((h,m)=>{let D=E=>{E&&f.getBufferedLength()<=r.MAX_LENGTH&&(E.bufferedData=f.getBufferedValue()),m(E)};(async()=>{try{await a(c,f),h()}catch(E){D(E)}})(),f.on("data",()=>{f.getBufferedLength()>l&&D(new o)})}),f.getBufferedValue()}e.exports=u,e.exports.buffer=(c,p)=>u(c,{...p,encoding:"buffer"}),e.exports.array=(c,p)=>u(c,{...p,array:!0}),e.exports.MaxBufferError=o}),Ss=R((t,e)=>{"use strict";B();var{PassThrough:r}=U("stream");e.exports=function(){var i=[],n=new r({objectMode:!0});return n.setMaxListeners(0),n.add=s,n.isEmpty=a,n.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(s),n;function s(u){return Array.isArray(u)?(u.forEach(s),this):(i.push(u),u.once("end",o.bind(null,u)),u.once("error",n.emit.bind(n,"error")),u.pipe(n,{end:!1}),this)}function a(){return i.length==0}function o(u){i=i.filter(function(c){return c!==u}),!i.length&&n.readable&&n.end()}}}),bs=R((t,e)=>{"use strict";B();var r=As(),i=Cs(),n=Ss(),s=(l,f)=>{f===void 0||l.stdin===void 0||(r(f)?f.pipe(l.stdin):l.stdin.end(f))},a=(l,{all:f})=>{if(!f||!l.stdout&&!l.stderr)return;let h=n();return l.stdout&&h.add(l.stdout),l.stderr&&h.add(l.stderr),h},o=async(l,f)=>{if(l){l.destroy();try{return await f}catch(h){return h.bufferedData}}},u=(l,{encoding:f,buffer:h,maxBuffer:m})=>{if(!(!l||!h))return f?i(l,{encoding:f,maxBuffer:m}):i.buffer(l,{maxBuffer:m})},c=async({stdout:l,stderr:f,all:h},{encoding:m,buffer:D,maxBuffer:E},A)=>{let d=u(l,{encoding:m,buffer:D,maxBuffer:E}),y=u(f,{encoding:m,buffer:D,maxBuffer:E}),S=u(h,{encoding:m,buffer:D,maxBuffer:E*2});try{return await Promise.all([A,d,y,S])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},o(l,d),o(f,y),o(h,S)])}},p=({input:l})=>{if(r(l))throw new TypeError("The `input` option cannot be a stream in sync mode")};e.exports={handleInput:s,makeAllStream:a,getSpawnedResult:c,validateInputSync:p}}),Fs=R((t,e)=>{"use strict";B();var r=(async()=>{})().constructor.prototype,i=["then","catch","finally"].map(a=>[a,Reflect.getOwnPropertyDescriptor(r,a)]),n=(a,o)=>{for(let[u,c]of i){let p=typeof o=="function"?(...l)=>Reflect.apply(c.value,o(),l):c.value.bind(o);Reflect.defineProperty(a,u,{...c,value:p})}return a},s=a=>new Promise((o,u)=>{a.on("exit",(c,p)=>{o({exitCode:c,signal:p})}),a.on("error",c=>{u(c)}),a.stdin&&a.stdin.on("error",c=>{u(c)})});e.exports={mergePromise:n,getSpawnedPromise:s}}),ws=R((t,e)=>{"use strict";B();var r=(p,l=[])=>Array.isArray(l)?[p,...l]:[p],i=/^[\w.-]+$/,n=/"/g,s=p=>typeof p!="string"||i.test(p)?p:`"${p.replace(n,'\\"')}"`,a=(p,l)=>r(p,l).join(" "),o=(p,l)=>r(p,l).map(f=>s(f)).join(" "),u=/ +/g,c=p=>{let l=[];for(let f of p.trim().split(u)){let h=l[l.length-1];h&&h.endsWith("\\")?l[l.length-1]=`${h.slice(0,-1)} ${f}`:l.push(f)}return l};e.exports={joinCommand:a,getEscapedCommand:o,parseCommand:c}}),_s=R((t,e)=>{"use strict";B();var r=U("path"),i=U("child_process"),n=as(),s=ss(),a=cs(),o=ps(),u=ms(),c=gs(),{spawnedKill:p,spawnedCancel:l,setupTimeout:f,validateTimeout:h,setExitHandler:m}=Es(),{handleInput:D,getSpawnedResult:E,makeAllStream:A,validateInputSync:d}=bs(),{mergePromise:y,getSpawnedPromise:S}=Fs(),{joinCommand:g,parseCommand:v,getEscapedCommand:C}=ws(),_=1e3*1e3*100,F=({env:I,extendEnv:w,preferLocal:b,localDir:M,execPath:T})=>{let $=w?{...process.env,...I}:I;return b?a.env({env:$,cwd:M,execPath:T}):$},x=(I,w,b={})=>{let M=n._parse(I,w,b);return I=M.command,w=M.args,b=M.options,b={maxBuffer:_,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:b.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...b},b.env=F(b),b.stdio=c(b),process.platform==="win32"&&r.basename(I,".exe")==="cmd"&&w.unshift("/q"),{file:I,args:w,options:b,parsed:M}},k=(I,w,b)=>typeof w!="string"&&!Buffer.isBuffer(w)?b===void 0?void 0:"":I.stripFinalNewline?s(w):w,P=(I,w,b)=>{let M=x(I,w,b),T=g(I,w),$=C(I,w);h(M.options);let j;try{j=i.spawn(M.file,M.args,M.options)}catch(ot){let at=new i.ChildProcess,O=Promise.reject(u({error:ot,stdout:"",stderr:"",all:"",command:T,escapedCommand:$,parsed:M,timedOut:!1,isCanceled:!1,killed:!1}));return y(at,O)}let K=S(j),J=f(j,M.options,K),Z=m(j,M.options,J),N={isCanceled:!1};j.kill=p.bind(null,j.kill.bind(j)),j.cancel=l.bind(null,j,N);let nt=o(async()=>{let[{error:ot,exitCode:at,signal:O,timedOut:L},G,q,it]=await E(j,M.options,Z),et=k(M.options,G),Q=k(M.options,q),X=k(M.options,it);if(ot||at!==0||O!==null){let rt=u({error:ot,exitCode:at,signal:O,stdout:et,stderr:Q,all:X,command:T,escapedCommand:$,parsed:M,timedOut:L,isCanceled:N.isCanceled,killed:j.killed});if(!M.options.reject)return rt;throw rt}return{command:T,escapedCommand:$,exitCode:0,stdout:et,stderr:Q,all:X,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return D(j,M.options.input),j.all=A(j,M.options),y(j,nt)};e.exports=P,e.exports.sync=(I,w,b)=>{let M=x(I,w,b),T=g(I,w),$=C(I,w);d(M.options);let j;try{j=i.spawnSync(M.file,M.args,M.options)}catch(Z){throw u({error:Z,stdout:"",stderr:"",all:"",command:T,escapedCommand:$,parsed:M,timedOut:!1,isCanceled:!1,killed:!1})}let K=k(M.options,j.stdout,j.error),J=k(M.options,j.stderr,j.error);if(j.error||j.status!==0||j.signal!==null){let Z=u({stdout:K,stderr:J,error:j.error,signal:j.signal,exitCode:j.status,command:T,escapedCommand:$,parsed:M,timedOut:j.error&&j.error.code==="ETIMEDOUT",isCanceled:!1,killed:j.signal!==null});if(!M.options.reject)return Z;throw Z}return{command:T,escapedCommand:$,exitCode:0,stdout:K,stderr:J,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},e.exports.command=(I,w)=>{let[b,...M]=v(I);return P(b,M,w)},e.exports.commandSync=(I,w)=>{let[b,...M]=v(I);return P.sync(b,M,w)},e.exports.node=(I,w,b={})=>{w&&!Array.isArray(w)&&typeof w=="object"&&(b=w,w=[]);let M=c.node(b),T=process.execArgv.filter(K=>!K.startsWith("--inspect")),{nodePath:$=process.execPath,nodeOptions:j=T}=b;return P($,[...j,I,...Array.isArray(w)?w:[]],{...b,stdin:void 0,stdout:void 0,stderr:void 0,stdio:M,shell:!1})}});B();var ks=Pt(_s());async function Ye(t){let e={cwd:en.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"}};try{let r=await(0,ks.default)(t,["--version"],e);return{available:!0,version:r.stdout.trim()}}catch{return{available:!1}}}async function Qe(){let[t,e,r]=await Promise.all([Ye("yarnpkg"),Ye("npm"),Ye("pnpm")]);return{yarn:t,pnpm:e,npm:r}}B();var ct=class extends Error{constructor(e){super(e),this.name="ConvertError",Error.captureStackTrace(this,ct)}};var _t=pt(require("fs-extra")),Xt=pt(require("path")),cn=pt(require("execa"));var un=pt(require("fs-extra")),an=pt(require("chalk")),sn=pt(require("path"));var oe=pt(require("fs-extra")),Nt=pt(require("path")),rn=pt(require("fast-glob")),nn=pt(require("js-yaml"));var xs=/^(?!_)(.+)@(.+)$/;function vt({workspaceRoot:t}){let e=Nt.default.join(t,"package.json");try{return oe.default.readJsonSync(e,"utf8")}catch(r){if(r&&typeof r=="object"&&"code"in r){if(r.code==="ENOENT")throw new ct(`no "package.json" found at ${t}`);if(r.code==="EJSONPARSE")throw new ct(`failed to parse "package.json" at ${t}`)}throw new Error(`unexpected error reading "package.json" at ${t}`)}}function Jt({workspaceRoot:t}){let{packageManager:e}=vt({workspaceRoot:t});if(e)try{let r=e.match(xs);if(r){let[i,n]=r;return n}}catch{}}function $t({workspaceRoot:t}){let e=vt({workspaceRoot:t});return e.name?e.name:Nt.default.basename(t)}function Xe({workspaceRoot:t}){let e=Nt.default.join(t,"pnpm-workspace.yaml");if(oe.default.existsSync(e))try{let r=nn.default.load(oe.default.readFileSync(e,"utf8"));if(r instanceof Object&&"packages"in r&&Array.isArray(r.packages))return r.packages}catch{throw new ct(`failed to parse ${e}`)}return[]}function Yt({root:t,lockFile:e,workspaceConfig:r}){let i=s=>Nt.default.join(t,s),n={root:t,lockfile:i(e),packageJson:i("package.json"),nodeModules:i("node_modules")};return r&&(n.workspaceConfig=i(r)),n}function Qt({workspaceRoot:t,workspaceGlobs:e}){return e?e.flatMap(r=>{let i=`${r}/package.json`;return rn.default.sync(i,{onlyFiles:!0,absolute:!0,cwd:t})}).map(r=>{let i=Nt.default.dirname(r);return{name:$t({workspaceRoot:i}),paths:{root:i,packageJson:r,nodeModules:Nt.default.join(i,"node_modules")}}}):[]}function on({directory:t}){let e=Nt.default.resolve(process.cwd(),t);return{exists:oe.default.existsSync(e),absolute:e}}function Bs({dependencyList:t,project:e,to:r}){let i=[];return e.workspaceData.workspaces.forEach(n=>{let{name:s}=n;if(t[s]){let a=t[s],o=a.startsWith("workspace:")?a.slice(10):a;t[s]=r.name==="pnpm"?`workspace:${o}`:o,i.push(s)}}),{dependencyList:t,updated:i}}function xt({project:t,workspace:e,to:r,logger:i,options:n}){if(["yarn","npm"].includes(r.name)&&["yarn","npm"].includes(t.packageManager))return;let s=vt({workspaceRoot:e.paths.root}),a={dependencies:[],devDependencies:[],peerDependencies:[],optionalDependencies:[]},o=["dependencies","devDependencies","peerDependencies","optionalDependencies"];o.forEach(l=>{let f=s[l];if(f){let{updated:h,dependencyList:m}=Bs({dependencyList:f,project:t,to:r});s[l]=m,a[l]=h}});let u=l=>{let f=a[l].length;if(f>0)return`${an.default.green(f.toString())} ${l}`},c=o.map(u).filter(Boolean),p=`./${sn.default.relative(t.paths.root,e.paths.packageJson)}`;if(c.length>=1){let l="updating";c.forEach((f,h)=>{c.length===1?l+=` ${f} in ${p}`:h===c.length-1?l+=`and ${f} in ${p}`:l+=` ${f}, `}),i.workspaceStep(l)}else i.workspaceStep(`no workspace dependencies found in ${p}`);n!=null&&n.dry||un.default.writeJSONSync(e.paths.packageJson,s,{spaces:2})}async function ln(t){let e=Xt.default.join(t.workspaceRoot,"pnpm-lock.yaml"),r=Xt.default.join(t.workspaceRoot,"pnpm-workspace.yaml"),i=Jt({workspaceRoot:t.workspaceRoot});return _t.default.existsSync(e)||_t.default.existsSync(r)||i==="pnpm"}async function Os(t){if(!await ln(t))throw new ct("Not a pnpm project");return{name:$t(t),packageManager:"pnpm",paths:Yt({root:t.workspaceRoot,lockFile:"pnpm-lock.yaml",workspaceConfig:"pnpm-workspace.yaml"}),workspaceData:{globs:Xe(t),workspaces:Qt({workspaceGlobs:Xe(t),...t})}}}async function Rs(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(`Creating ${e.packageManager}${s?"workspaces":""}`);let a=vt({workspaceRoot:e.paths.root});i.rootHeader(),a.packageManager=`${r.name}@${r.version}`,i.rootStep(`adding "packageManager" field to ${e.name} root "package.json"`),n!=null&&n.dry||(_t.default.writeJSONSync(e.paths.packageJson,a,{spaces:2}),s&&(i.rootStep('adding "pnpm-workspace.yaml"'),_t.default.writeFileSync(Xt.default.join(e.paths.root,"pnpm-workspace.yaml"),`packages:
44
+ ${e.workspaceData.globs.map(o=>` - "${o}"`).join(`
45
+ `)}`))),s&&(xt({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(o=>xt({workspace:o,project:e,to:r,logger:i,options:n})))}async function Ps(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(`Removing ${e.packageManager}${n?"workspaces":""}`);let s=vt({workspaceRoot:e.paths.root});if(e.paths.workspaceConfig&&n&&(r.subStep('removing "pnpm-workspace.yaml"'),i!=null&&i.dry||_t.default.rmSync(e.paths.workspaceConfig,{force:!0})),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){_t.default.writeJSONSync(e.paths.packageJson,s,{spaces:2});let a=[e.paths.nodeModules,...e.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(a.map(o=>_t.default.rm(o,{recursive:!0,force:!0})))}catch{throw new ct("Failed to remove node_modules")}}}async function Ts(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Xt.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||_t.default.rmSync(e.paths.lockfile,{force:!0})}async function Is(t){let{project:e,logger:r,options:i}=t;if(e.packageManager!=="pnpm"&&(r.subStep(`converting ${Xt.default.relative(e.paths.root,e.paths.lockfile)} to pnpm-lock.yaml`),!(i!=null&&i.dry)&&_t.default.existsSync(e.paths.lockfile)))try{await(0,cn.default)("pnpm",["import"],{stdio:"ignore",cwd:e.paths.root})}finally{_t.default.rmSync(e.paths.lockfile,{force:!0})}}var Ls={detect:ln,read:Os,create:Rs,remove:Ps,clean:Ts,convertLock:Is},pn=Ls;var Ht=pt(require("fs-extra")),Ze=pt(require("path"));async function fn(t){let e=Ze.default.join(t.workspaceRoot,"package-lock.json"),r=Jt({workspaceRoot:t.workspaceRoot});return Ht.default.existsSync(e)||r==="npm"}async function Ns(t){if(!await fn(t))throw new ct("Not an npm project");let r=vt(t);return{name:$t(t),packageManager:"npm",paths:Yt({root:t.workspaceRoot,lockFile:"package-lock.json"}),workspaceData:{globs:r.workspaces||[],workspaces:Qt({workspaceGlobs:r.workspaces,...t})}}}async function js(t){let{project:e,options:r,to:i,logger:n}=t,s=e.workspaceData.globs.length>0;n.mainStep(`Creating ${e.packageManager}${s?"workspaces":""}`);let a=vt({workspaceRoot:e.paths.root});n.rootHeader(),n.rootStep(`adding "packageManager" field to ${e.name} root "package.json"`),a.packageManager=`${i.name}@${i.version}`,s&&(n.rootStep(`adding "workspaces" field to ${e.name} root "package.json"`),a.workspaces=e.workspaceData.globs,xt({workspace:{name:"root",paths:e.paths},project:e,to:i,logger:n,options:r}),n.workspaceHeader(),e.workspaceData.workspaces.forEach(o=>xt({workspace:o,project:e,to:i,logger:n,options:r}))),r!=null&&r.dry||Ht.default.writeJSONSync(e.paths.packageJson,a,{spaces:2})}async function Ms(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(`Creating ${e.packageManager}${n?"workspaces":""}`);let s=vt({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){Ht.default.writeJSONSync(e.paths.packageJson,s,{spaces:2});let a=[e.paths.nodeModules,...e.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(a.map(o=>Ht.default.rm(o,{recursive:!0,force:!0})))}catch{throw new ct("Failed to remove node_modules")}}}async function $s(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Ze.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||Ht.default.rmSync(e.paths.lockfile,{force:!0})}async function Hs(t){let{project:e,options:r}=t;e.packageManager!=="npm"&&(r!=null&&r.dry||Ht.default.rmSync(e.paths.lockfile,{force:!0}))}var Gs={detect:fn,read:Ns,create:js,remove:Ms,clean:$s,convertLock:Hs},dn=Gs;var Gt=pt(require("fs-extra")),ue=pt(require("path"));async function hn(t){let e=ue.default.join(t.workspaceRoot,"yarn.lock"),r=Jt({workspaceRoot:t.workspaceRoot});return Gt.default.existsSync(e)||r==="yarn"}async function Us(t){if(!await hn(t))throw new ct("Not a yarn project");let r=vt(t);return{name:$t(t),packageManager:"yarn",paths:Yt({root:t.workspaceRoot,lockFile:"yarn.lock"}),workspaceData:{globs:r.workspaces||[],workspaces:Qt({workspaceGlobs:r.workspaces,...t})}}}async function Ws(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(`Creating ${e.packageManager}${s?"workspaces":""}`);let a=vt({workspaceRoot:e.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${ue.default.relative(e.paths.root,e.paths.packageJson)}`),a.packageManager=`${r.name}@${r.version}`,s&&(i.rootStep(`adding "workspaces" field to ${ue.default.relative(e.paths.root,e.paths.packageJson)}`),a.workspaces=e.workspaceData.globs,xt({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(o=>xt({workspace:o,project:e,to:r,logger:i,options:n}))),n!=null&&n.dry||Gt.default.writeJSONSync(e.paths.packageJson,a,{spaces:2})}async function Ks(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(`Removing ${e.packageManager}${n?"workspaces":""}`);let s=vt({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){Gt.default.writeJSONSync(e.paths.packageJson,s,{spaces:2});let a=[e.paths.nodeModules,...e.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(a.map(o=>Gt.default.rm(o,{recursive:!0,force:!0})))}catch{throw new ct("Failed to remove node_modules")}}}async function qs(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${ue.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||Gt.default.rmSync(e.paths.lockfile,{force:!0})}async function Vs(t){let{project:e,options:r}=t;e.packageManager!=="yarn"&&(r!=null&&r.dry||Gt.default.rmSync(e.paths.lockfile,{force:!0}))}var Js={detect:hn,read:Us,create:Ws,remove:Ks,clean:qs,convertLock:Vs},mn=Js;var Ys={pnpm:pn,yarn:mn,npm:dn},Rt=Ys;async function ve({root:t}){let{exists:e,absolute:r}=on({directory:t});if(!e)throw new ct(`Could not find directory at ${r}. Ensure the directory exists.`);for(let{detect:i,read:n}of Object.values(Rt))if(await i({workspaceRoot:r}))return n({workspaceRoot:r});throw new ct("Could not determine workspace manager. Add `packageManager` to `package.json` or ensure a lockfile is present.")}var En=pt(require("chalk"));var gn=pt(require("execa")),yn=pt(require("ora")),Dn=require("semver");var Qs={npm:[{name:"npm",template:"npm",command:"npm",installArgs:["install"],version:"latest",executable:"npx",semver:"*"}],pnpm:[{name:"pnpm6",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest-6",executable:"pnpx",semver:"6.x"},{name:"pnpm",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest",executable:"pnpm dlx",semver:">=7"}],yarn:[{name:"yarn",template:"yarn",command:"yarn",installArgs:["install"],version:"1.x",executable:"npx",semver:"<2"},{name:"berry",template:"berry",command:"yarn",installArgs:["install","--no-immutable"],version:"stable",executable:"yarn dlx",semver:">=2"}]};async function Xs(t){let{to:e,logger:r,options:i}=t,n=Qs[e.name].find(s=>(0,Dn.satisfies)(e.version,s.semver));if(!n)throw new ct("Unsupported package manager version.");if(r.subStep(`running "${n.command} ${n.installArgs}"`),!(i!=null&&i.dry)){let s;i!=null&&i.interactive&&(s=(0,yn.default)({text:"Installing dependencies...",spinner:{frames:r.installerFrames()}}).start());try{await(0,gn.default)(n.command,n.installArgs,{cwd:t.project.paths.root}),r.subStep("dependencies installed")}catch(a){throw r.subStepFailure("failed to install dependencies"),a}finally{s&&s.stop()}}}var Ce=Xs;async function Zs({project:t,to:e,logger:r,options:i}){if(r.header(`Converting project from ${t.packageManager} to ${e.name}.`),t.packageManager==e.name)throw new ct("You are already using this package manager");await Rt[t.packageManager].remove({project:t,to:e,logger:r,options:i}),await Rt[e.name].create({project:t,to:e,logger:r,options:i}),r.mainStep("Installing dependencies"),i!=null&&i.skipInstall?r.subStep(En.default.yellow("Skipping install")):(await Rt[e.name].convertLock({project:t,logger:r,options:i}),await Ce({project:t,to:e,logger:r,options:i})),r.mainStep(`Cleaning up ${t.packageManager} workspaces`),await Rt[t.packageManager].clean({project:t,logger:r})}var An=Zs;var Ft=pt(require("chalk")),vn=pt(require("gradient-string")),Zt=2,Se=class{constructor({interactive:e,dry:r}={}){this.interactive=e!=null?e:!0,this.dry=r!=null?r:!1,this.step=1}logger(...e){this.interactive&&console.log(...e)}indented(e,...r){this.logger(" ".repeat(Zt*e),...r)}header(e){this.blankLine(),this.logger(Ft.default.bold(e))}installerFrames(){let e=`${" ".repeat(Zt)} - ${this.dry?Ft.default.yellow("SKIPPED | "):Ft.default.green("OK | ")}`;return[`${e} `,`${e}> `,`${e}>> `,`${e}>>>`]}gradient(e){return(0,vn.default)("#0099F7","#F11712")(e.toString())}hero(){this.logger(Ft.default.bold(this.gradient(`
774
46
  >>> TURBOREPO
775
- `)));
776
- }
777
- info(...args) {
778
- this.logger(...args);
779
- }
780
- mainStep(title) {
781
- this.blankLine();
782
- this.logger(`${this.step}. ${import_chalk3.default.underline(title)}`);
783
- this.step += 1;
784
- }
785
- subStep(...args) {
786
- this.logger(" ".repeat(INDENTATION), `-`, this.dry ? import_chalk3.default.yellow("SKIPPED |") : import_chalk3.default.green("OK |"), ...args);
787
- }
788
- subStepFailure(...args) {
789
- this.logger(" ".repeat(INDENTATION), `-`, import_chalk3.default.red("ERROR |"), ...args);
790
- }
791
- rootHeader() {
792
- this.blankLine();
793
- this.indented(2, "Root:");
794
- }
795
- rootStep(...args) {
796
- this.logger(" ".repeat(INDENTATION * 3), `-`, this.dry ? import_chalk3.default.yellow("SKIPPED |") : import_chalk3.default.green("OK |"), ...args);
797
- }
798
- workspaceHeader() {
799
- this.blankLine();
800
- this.indented(2, "Workspaces:");
801
- }
802
- workspaceStep(...args) {
803
- this.logger(" ".repeat(INDENTATION * 3), `-`, this.dry ? import_chalk3.default.yellow("SKIPPED |") : import_chalk3.default.green("OK |"), ...args);
804
- }
805
- blankLine() {
806
- this.logger();
807
- }
808
- error(...args) {
809
- console.error(...args);
810
- }
811
- };
812
-
813
- // src/index.ts
814
- async function convertMonorepo({
815
- root,
816
- to,
817
- options
818
- }) {
819
- const logger = new Logger({ ...options, interactive: false });
820
- const [project, availablePackageManagers] = await Promise.all([
821
- getWorkspaceDetails({ root }),
822
- (0, import_turbo_utils.getAvailablePackageManagers)()
823
- ]);
824
- await convert_default({
825
- project,
826
- to: {
827
- name: to,
828
- version: availablePackageManagers[to].version
829
- },
830
- logger,
831
- options
832
- });
833
- }
834
- // Annotate the CommonJS export names for ESM import in node:
835
- 0 && (module.exports = {
836
- MANAGERS,
837
- convertMonorepo,
838
- getWorkspaceDetails,
839
- install
840
- });
47
+ `)))}info(...e){this.logger(...e)}mainStep(e){this.blankLine(),this.logger(`${this.step}. ${Ft.default.underline(e)}`),this.step+=1}subStep(...e){this.logger(" ".repeat(Zt),"-",this.dry?Ft.default.yellow("SKIPPED |"):Ft.default.green("OK |"),...e)}subStepFailure(...e){this.logger(" ".repeat(Zt),"-",Ft.default.red("ERROR |"),...e)}rootHeader(){this.blankLine(),this.indented(2,"Root:")}rootStep(...e){this.logger(" ".repeat(Zt*3),"-",this.dry?Ft.default.yellow("SKIPPED |"):Ft.default.green("OK |"),...e)}workspaceHeader(){this.blankLine(),this.indented(2,"Workspaces:")}workspaceStep(...e){this.logger(" ".repeat(Zt*3),"-",this.dry?Ft.default.yellow("SKIPPED |"):Ft.default.green("OK |"),...e)}blankLine(){this.logger()}error(...e){console.error(...e)}};async function zs({root:t,to:e,options:r}){let i=new Se({...r,interactive:!1}),[n,s]=await Promise.all([ve({root:t}),Qe()]);await An({project:n,to:{name:e,version:s[e].version},logger:i,options:r})}0&&(module.exports={MANAGERS,convertMonorepo,getWorkspaceDetails,install});
48
+ /*!
49
+ * fill-range <https://github.com/jonschlinkert/fill-range>
50
+ *
51
+ * Copyright (c) 2014-present, Jon Schlinkert.
52
+ * Licensed under the MIT License.
53
+ */
54
+ /*!
55
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
56
+ *
57
+ * Copyright (c) 2014-2016, Jon Schlinkert.
58
+ * Licensed under the MIT License.
59
+ */
60
+ /*!
61
+ * is-glob <https://github.com/jonschlinkert/is-glob>
62
+ *
63
+ * Copyright (c) 2014-2017, Jon Schlinkert.
64
+ * Released under the MIT License.
65
+ */
66
+ /*!
67
+ * is-number <https://github.com/jonschlinkert/is-number>
68
+ *
69
+ * Copyright (c) 2014-present, Jon Schlinkert.
70
+ * Released under the MIT License.
71
+ */
72
+ /*!
73
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
74
+ *
75
+ * Copyright (c) 2015-present, Jon Schlinkert.
76
+ * Released under the MIT License.
77
+ */
78
+ /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
79
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
80
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
81
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */