storybook 9.0.0-beta.3 → 9.0.0-beta.5

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 (58) hide show
  1. package/assets/server/base-preview-head.html +2 -1
  2. package/dist/babel/index.cjs +15060 -14974
  3. package/dist/babel/index.d.ts +37 -18
  4. package/dist/babel/index.js +15097 -15011
  5. package/dist/bin/index.cjs +44 -44
  6. package/dist/bin/index.js +44 -44
  7. package/dist/builder-manager/index.cjs +104 -99
  8. package/dist/builder-manager/index.js +103 -98
  9. package/dist/cli/bin/index.cjs +1 -1
  10. package/dist/cli/bin/index.js +1 -1
  11. package/dist/cli/index.cjs +19438 -19340
  12. package/dist/cli/index.js +19449 -19351
  13. package/dist/common/index.cjs +4997 -4925
  14. package/dist/common/index.js +5088 -5012
  15. package/dist/components/index.cjs +4581 -4419
  16. package/dist/components/index.d.ts +12 -12
  17. package/dist/components/index.js +3847 -3681
  18. package/dist/core-server/index.cjs +6358 -6274
  19. package/dist/core-server/index.js +6406 -6318
  20. package/dist/core-server/presets/common-manager.js +3863 -3468
  21. package/dist/core-server/presets/common-preset.cjs +2302 -2236
  22. package/dist/core-server/presets/common-preset.js +2389 -2319
  23. package/dist/docs-tools/index.cjs +484 -464
  24. package/dist/docs-tools/index.js +502 -482
  25. package/dist/highlight/index.cjs +19 -18
  26. package/dist/highlight/index.d.ts +4 -5
  27. package/dist/highlight/index.js +3 -2
  28. package/dist/highlight/preview.cjs +314 -310
  29. package/dist/highlight/preview.js +296 -292
  30. package/dist/instrumenter/index.cjs +561 -559
  31. package/dist/instrumenter/index.js +1551 -1498
  32. package/dist/manager/globals-module-info.cjs +1 -0
  33. package/dist/manager/globals-module-info.js +1 -0
  34. package/dist/manager/globals-runtime.js +19639 -19374
  35. package/dist/manager/runtime.js +4372 -4133
  36. package/dist/manager-api/index.cjs +2375 -2319
  37. package/dist/manager-api/index.js +1722 -1666
  38. package/dist/node-logger/index.cjs +25 -25
  39. package/dist/node-logger/index.js +25 -25
  40. package/dist/preview/runtime.js +12779 -12704
  41. package/dist/preview-api/index.cjs +1113 -1094
  42. package/dist/preview-api/index.js +1161 -1142
  43. package/dist/router/index.cjs +1366 -1347
  44. package/dist/router/index.js +594 -575
  45. package/dist/server-errors.cjs +6 -6
  46. package/dist/server-errors.js +6 -6
  47. package/dist/telemetry/index.cjs +696 -691
  48. package/dist/telemetry/index.js +764 -759
  49. package/dist/test/index.cjs +69 -70
  50. package/dist/test/index.d.ts +1216 -74
  51. package/dist/test/index.js +128 -130
  52. package/dist/test/preview.cjs +16 -16
  53. package/dist/test/preview.js +15 -15
  54. package/dist/theming/create.cjs +16 -17
  55. package/dist/theming/create.js +346 -228
  56. package/dist/theming/index.cjs +16 -17
  57. package/dist/theming/index.js +948 -839
  58. package/package.json +4 -12
@@ -4,27 +4,27 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
4
4
  const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
5
5
  const __dirname = ESM_COMPAT_dirname(__filename);
6
6
  const require = ESM_COMPAT_Module.createRequire(import.meta.url);
7
- var co = Object.create;
7
+ var uo = Object.create;
8
8
  var ke = Object.defineProperty;
9
- var uo = Object.getOwnPropertyDescriptor;
10
- var fo = Object.getOwnPropertyNames;
11
- var lo = Object.getPrototypeOf, po = Object.prototype.hasOwnProperty;
12
- var o = (e, t) => ke(e, "name", { value: t, configurable: !0 }), S = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
9
+ var fo = Object.getOwnPropertyDescriptor;
10
+ var lo = Object.getOwnPropertyNames;
11
+ var po = Object.getPrototypeOf, mo = Object.prototype.hasOwnProperty;
12
+ var o = (e, t) => ke(e, "name", { value: t, configurable: !0 }), w = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
13
13
  "u" ? new Proxy(e, {
14
14
  get: (t, r) => (typeof require < "u" ? require : t)[r]
15
15
  }) : e)(function(e) {
16
16
  if (typeof require < "u") return require.apply(this, arguments);
17
17
  throw Error('Dynamic require of "' + e + '" is not supported');
18
18
  });
19
- var mo = (e, t) => () => (e && (t = e(e = 0)), t);
19
+ var yo = (e, t) => () => (e && (t = e(e = 0)), t);
20
20
  var x = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
21
- var yo = (e, t, r, n) => {
21
+ var ho = (e, t, r, n) => {
22
22
  if (t && typeof t == "object" || typeof t == "function")
23
- for (let i of fo(t))
24
- !po.call(e, i) && i !== r && ke(e, i, { get: () => t[i], enumerable: !(n = uo(t, i)) || n.enumerable });
23
+ for (let s of lo(t))
24
+ !mo.call(e, s) && s !== r && ke(e, s, { get: () => t[s], enumerable: !(n = fo(t, s)) || n.enumerable });
25
25
  return e;
26
26
  };
27
- var A = (e, t, r) => (r = e != null ? co(lo(e)) : {}, yo(
27
+ var A = (e, t, r) => (r = e != null ? uo(po(e)) : {}, ho(
28
28
  // If the importer is in node compatibility mode or this is not an ESM
29
29
  // file that has been converted to a CommonJS file using a Babel-
30
30
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -34,19 +34,19 @@ var A = (e, t, r) => (r = e != null ? co(lo(e)) : {}, yo(
34
34
  ));
35
35
 
36
36
  // ../node_modules/picocolors/picocolors.js
37
- var vt = x((Na, Ee) => {
38
- var q = process || {}, Et = q.argv || [], V = q.env || {}, ho = !(V.NO_COLOR || Et.includes("--no-color")) && (!!V.FORCE_COLOR || Et.includes(
39
- "--color") || q.platform === "win32" || (q.stdout || {}).isTTY && V.TERM !== "dumb" || !!V.CI), go = /* @__PURE__ */ o((e, t, r = e) => (n) => {
40
- let i = "" + n, s = i.indexOf(t, e.length);
41
- return ~s ? e + bo(i, t, r, s) + t : e + i + t;
42
- }, "formatter"), bo = /* @__PURE__ */ o((e, t, r, n) => {
43
- let i = "", s = 0;
37
+ var vt = x((_a, Ee) => {
38
+ var q = process || {}, Et = q.argv || [], V = q.env || {}, go = !(V.NO_COLOR || Et.includes("--no-color")) && (!!V.FORCE_COLOR || Et.includes(
39
+ "--color") || q.platform === "win32" || (q.stdout || {}).isTTY && V.TERM !== "dumb" || !!V.CI), bo = /* @__PURE__ */ o((e, t, r = e) => (n) => {
40
+ let s = "" + n, i = s.indexOf(t, e.length);
41
+ return ~i ? e + xo(s, t, r, i) + t : e + s + t;
42
+ }, "formatter"), xo = /* @__PURE__ */ o((e, t, r, n) => {
43
+ let s = "", i = 0;
44
44
  do
45
- i += e.substring(s, n) + r, s = n + t.length, n = e.indexOf(t, s);
45
+ s += e.substring(i, n) + r, i = n + t.length, n = e.indexOf(t, i);
46
46
  while (~n);
47
- return i + e.substring(s);
48
- }, "replaceClose"), Pt = /* @__PURE__ */ o((e = ho) => {
49
- let t = e ? go : () => String;
47
+ return s + e.substring(i);
48
+ }, "replaceClose"), Pt = /* @__PURE__ */ o((e = go) => {
49
+ let t = e ? bo : () => String;
50
50
  return {
51
51
  isColorSupported: e,
52
52
  reset: t("\x1B[0m", "\x1B[0m"),
@@ -101,7 +101,7 @@ var Nt = x((K) => {
101
101
  "use strict";
102
102
  Object.defineProperty(K, "__esModule", { value: !0 });
103
103
  K.walkUp = void 0;
104
- var Rt = S("path"), xo = /* @__PURE__ */ o(function* (e) {
104
+ var Rt = w("path"), So = /* @__PURE__ */ o(function* (e) {
105
105
  for (e = (0, Rt.resolve)(e); e; ) {
106
106
  yield e;
107
107
  let t = (0, Rt.dirname)(e);
@@ -110,92 +110,92 @@ var Nt = x((K) => {
110
110
  e = t;
111
111
  }
112
112
  }, "walkUp");
113
- K.walkUp = xo;
113
+ K.walkUp = So;
114
114
  });
115
115
 
116
116
  // ../node_modules/isexe/windows.js
117
- var Wt = x((uc, $t) => {
117
+ var Wt = x((lc, $t) => {
118
118
  $t.exports = Ut;
119
- Ut.sync = Oo;
120
- var Bt = S("fs");
121
- function Ao(e, t) {
119
+ Ut.sync = jo;
120
+ var Bt = w("fs");
121
+ function Oo(e, t) {
122
122
  var r = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
123
123
  if (!r || (r = r.split(";"), r.indexOf("") !== -1))
124
124
  return !0;
125
125
  for (var n = 0; n < r.length; n++) {
126
- var i = r[n].toLowerCase();
127
- if (i && e.substr(-i.length).toLowerCase() === i)
126
+ var s = r[n].toLowerCase();
127
+ if (s && e.substr(-s.length).toLowerCase() === s)
128
128
  return !0;
129
129
  }
130
130
  return !1;
131
131
  }
132
- o(Ao, "checkPathExt");
132
+ o(Oo, "checkPathExt");
133
133
  function Gt(e, t, r) {
134
- return !e.isSymbolicLink() && !e.isFile() ? !1 : Ao(t, r);
134
+ return !e.isSymbolicLink() && !e.isFile() ? !1 : Oo(t, r);
135
135
  }
136
136
  o(Gt, "checkStat");
137
137
  function Ut(e, t, r) {
138
- Bt.stat(e, function(n, i) {
139
- r(n, n ? !1 : Gt(i, e, t));
138
+ Bt.stat(e, function(n, s) {
139
+ r(n, n ? !1 : Gt(s, e, t));
140
140
  });
141
141
  }
142
142
  o(Ut, "isexe");
143
- function Oo(e, t) {
143
+ function jo(e, t) {
144
144
  return Gt(Bt.statSync(e), e, t);
145
145
  }
146
- o(Oo, "sync");
146
+ o(jo, "sync");
147
147
  });
148
148
 
149
149
  // ../node_modules/isexe/mode.js
150
- var zt = x((lc, qt) => {
150
+ var zt = x((mc, qt) => {
151
151
  qt.exports = Jt;
152
- Jt.sync = jo;
153
- var Ht = S("fs");
152
+ Jt.sync = Ro;
153
+ var Ht = w("fs");
154
154
  function Jt(e, t, r) {
155
- Ht.stat(e, function(n, i) {
156
- r(n, n ? !1 : Vt(i, t));
155
+ Ht.stat(e, function(n, s) {
156
+ r(n, n ? !1 : Vt(s, t));
157
157
  });
158
158
  }
159
159
  o(Jt, "isexe");
160
- function jo(e, t) {
160
+ function Ro(e, t) {
161
161
  return Vt(Ht.statSync(e), t);
162
162
  }
163
- o(jo, "sync");
163
+ o(Ro, "sync");
164
164
  function Vt(e, t) {
165
- return e.isFile() && Ro(e, t);
165
+ return e.isFile() && No(e, t);
166
166
  }
167
167
  o(Vt, "checkStat");
168
- function Ro(e, t) {
169
- var r = e.mode, n = e.uid, i = e.gid, s = t.uid !== void 0 ? t.uid : process.getuid && process.getuid(), a = t.gid !== void 0 ? t.gid : process.
170
- getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), f = parseInt("001", 8), l = c | u, d = r & f || r & u && i ===
171
- a || r & c && n === s || r & l && s === 0;
168
+ function No(e, t) {
169
+ var r = e.mode, n = e.uid, s = e.gid, i = t.uid !== void 0 ? t.uid : process.getuid && process.getuid(), a = t.gid !== void 0 ? t.gid : process.
170
+ getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), f = parseInt("001", 8), l = c | u, d = r & f || r & u && s ===
171
+ a || r & c && n === i || r & l && i === 0;
172
172
  return d;
173
173
  }
174
- o(Ro, "checkMode");
174
+ o(No, "checkMode");
175
175
  });
176
176
 
177
177
  // ../node_modules/isexe/index.js
178
- var Kt = x((dc, Yt) => {
179
- var mc = S("fs"), X;
178
+ var Kt = x((hc, Yt) => {
179
+ var yc = w("fs"), X;
180
180
  process.platform === "win32" || global.TESTING_WINDOWS ? X = Wt() : X = zt();
181
181
  Yt.exports = Ae;
182
- Ae.sync = No;
182
+ Ae.sync = Do;
183
183
  function Ae(e, t, r) {
184
184
  if (typeof t == "function" && (r = t, t = {}), !r) {
185
185
  if (typeof Promise != "function")
186
186
  throw new TypeError("callback not provided");
187
- return new Promise(function(n, i) {
188
- Ae(e, t || {}, function(s, a) {
189
- s ? i(s) : n(a);
187
+ return new Promise(function(n, s) {
188
+ Ae(e, t || {}, function(i, a) {
189
+ i ? s(i) : n(a);
190
190
  });
191
191
  });
192
192
  }
193
- X(e, t || {}, function(n, i) {
194
- n && (n.code === "EACCES" || t && t.ignoreErrors) && (n = null, i = !1), r(n, i);
193
+ X(e, t || {}, function(n, s) {
194
+ n && (n.code === "EACCES" || t && t.ignoreErrors) && (n = null, s = !1), r(n, s);
195
195
  });
196
196
  }
197
197
  o(Ae, "isexe");
198
- function No(e, t) {
198
+ function Do(e, t) {
199
199
  try {
200
200
  return X.sync(e, t || {});
201
201
  } catch (r) {
@@ -204,37 +204,37 @@ var Kt = x((dc, Yt) => {
204
204
  throw r;
205
205
  }
206
206
  }
207
- o(No, "sync");
207
+ o(Do, "sync");
208
208
  });
209
209
 
210
- // ../node_modules/cross-spawn/node_modules/which/which.js
211
- var nr = x((hc, rr) => {
212
- var j = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Xt = S("path"), Do = j ? ";" : "\
210
+ // ../node_modules/which/which.js
211
+ var nr = x((bc, rr) => {
212
+ var j = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Xt = w("path"), _o = j ? ";" : "\
213
213
  :", Qt = Kt(), Zt = /* @__PURE__ */ o((e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" }), "getNotFoundError"), er = /* @__PURE__ */ o(
214
214
  (e, t) => {
215
- let r = t.colon || Do, n = e.match(/\//) || j && e.match(/\\/) ? [""] : [
215
+ let r = t.colon || _o, n = e.match(/\//) || j && e.match(/\\/) ? [""] : [
216
216
  // windows always checks the cwd first
217
217
  ...j ? [process.cwd()] : [],
218
218
  ...(t.path || process.env.PATH || /* istanbul ignore next: very unusual */
219
219
  "").split(r)
220
- ], i = j ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = j ? i.split(r) : [""];
221
- return j && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
220
+ ], s = j ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", i = j ? s.split(r) : [""];
221
+ return j && e.indexOf(".") !== -1 && i[0] !== "" && i.unshift(""), {
222
222
  pathEnv: n,
223
- pathExt: s,
224
- pathExtExe: i
223
+ pathExt: i,
224
+ pathExtExe: s
225
225
  };
226
226
  }, "getPathInfo"), tr = /* @__PURE__ */ o((e, t, r) => {
227
227
  typeof t == "function" && (r = t, t = {}), t || (t = {});
228
- let { pathEnv: n, pathExt: i, pathExtExe: s } = er(e, t), a = [], c = /* @__PURE__ */ o((f) => new Promise((l, d) => {
228
+ let { pathEnv: n, pathExt: s, pathExtExe: i } = er(e, t), a = [], c = /* @__PURE__ */ o((f) => new Promise((l, d) => {
229
229
  if (f === n.length)
230
230
  return t.all && a.length ? l(a) : d(Zt(e));
231
231
  let h = n[f], y = /^".*"$/.test(h) ? h.slice(1, -1) : h, g = Xt.join(y, e), m = !y && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + g : g;
232
232
  l(u(m, f, 0));
233
233
  }), "step"), u = /* @__PURE__ */ o((f, l, d) => new Promise((h, y) => {
234
- if (d === i.length)
234
+ if (d === s.length)
235
235
  return h(c(l + 1));
236
- let g = i[d];
237
- Qt(f + g, { pathExt: s }, (m, b) => {
236
+ let g = s[d];
237
+ Qt(f + g, { pathExt: i }, (m, b) => {
238
238
  if (!m && b)
239
239
  if (t.all)
240
240
  a.push(f + g);
@@ -244,35 +244,35 @@ var nr = x((hc, rr) => {
244
244
  });
245
245
  }), "subStep");
246
246
  return r ? c(0).then((f) => r(null, f), r) : c(0);
247
- }, "which"), _o = /* @__PURE__ */ o((e, t) => {
247
+ }, "which"), Mo = /* @__PURE__ */ o((e, t) => {
248
248
  t = t || {};
249
- let { pathEnv: r, pathExt: n, pathExtExe: i } = er(e, t), s = [];
249
+ let { pathEnv: r, pathExt: n, pathExtExe: s } = er(e, t), i = [];
250
250
  for (let a = 0; a < r.length; a++) {
251
251
  let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c, f = Xt.join(u, e), l = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + f : f;
252
252
  for (let d = 0; d < n.length; d++) {
253
253
  let h = l + n[d];
254
254
  try {
255
- if (Qt.sync(h, { pathExt: i }))
255
+ if (Qt.sync(h, { pathExt: s }))
256
256
  if (t.all)
257
- s.push(h);
257
+ i.push(h);
258
258
  else
259
259
  return h;
260
260
  } catch {
261
261
  }
262
262
  }
263
263
  }
264
- if (t.all && s.length)
265
- return s;
264
+ if (t.all && i.length)
265
+ return i;
266
266
  if (t.nothrow)
267
267
  return null;
268
268
  throw Zt(e);
269
269
  }, "whichSync");
270
270
  rr.exports = tr;
271
- tr.sync = _o;
271
+ tr.sync = Mo;
272
272
  });
273
273
 
274
274
  // ../node_modules/path-key/index.js
275
- var ir = x((bc, Oe) => {
275
+ var sr = x((Sc, Oe) => {
276
276
  "use strict";
277
277
  var or = /* @__PURE__ */ o((e = {}) => {
278
278
  let t = e.env || process.env;
@@ -283,113 +283,113 @@ var ir = x((bc, Oe) => {
283
283
  });
284
284
 
285
285
  // ../node_modules/cross-spawn/lib/util/resolveCommand.js
286
- var ur = x((wc, cr) => {
286
+ var ur = x((kc, cr) => {
287
287
  "use strict";
288
- var sr = S("path"), Mo = nr(), Lo = ir();
288
+ var ir = w("path"), Lo = nr(), Fo = sr();
289
289
  function ar(e, t) {
290
- let r = e.options.env || process.env, n = process.cwd(), i = e.options.cwd != null, s = i && process.chdir !== void 0 && !process.chdir.
290
+ let r = e.options.env || process.env, n = process.cwd(), s = e.options.cwd != null, i = s && process.chdir !== void 0 && !process.chdir.
291
291
  disabled;
292
- if (s)
292
+ if (i)
293
293
  try {
294
294
  process.chdir(e.options.cwd);
295
295
  } catch {
296
296
  }
297
297
  let a;
298
298
  try {
299
- a = Mo.sync(e.command, {
300
- path: r[Lo({ env: r })],
301
- pathExt: t ? sr.delimiter : void 0
299
+ a = Lo.sync(e.command, {
300
+ path: r[Fo({ env: r })],
301
+ pathExt: t ? ir.delimiter : void 0
302
302
  });
303
303
  } catch {
304
304
  } finally {
305
- s && process.chdir(n);
305
+ i && process.chdir(n);
306
306
  }
307
- return a && (a = sr.resolve(i ? e.options.cwd : "", a)), a;
307
+ return a && (a = ir.resolve(s ? e.options.cwd : "", a)), a;
308
308
  }
309
309
  o(ar, "resolveCommandAttempt");
310
- function Fo(e) {
310
+ function Bo(e) {
311
311
  return ar(e) || ar(e, !0);
312
312
  }
313
- o(Fo, "resolveCommand");
314
- cr.exports = Fo;
313
+ o(Bo, "resolveCommand");
314
+ cr.exports = Bo;
315
315
  });
316
316
 
317
317
  // ../node_modules/cross-spawn/lib/util/escape.js
318
- var fr = x((kc, Re) => {
318
+ var fr = x((Pc, Re) => {
319
319
  "use strict";
320
320
  var je = /([()\][%!^"`<>&|;, *?])/g;
321
- function Bo(e) {
321
+ function Go(e) {
322
322
  return e = e.replace(je, "^$1"), e;
323
323
  }
324
- o(Bo, "escapeCommand");
325
- function Go(e, t) {
326
- return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(je, "^$1"), t && (e =
327
- e.replace(je, "^$1")), e;
324
+ o(Go, "escapeCommand");
325
+ function Uo(e, t) {
326
+ return e = `${e}`, e = e.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), e = e.replace(/(?=(\\+?)?)\1$/, "$1$1"), e = `"${e}"`, e = e.replace(je,
327
+ "^$1"), t && (e = e.replace(je, "^$1")), e;
328
328
  }
329
- o(Go, "escapeArgument");
330
- Re.exports.command = Bo;
331
- Re.exports.argument = Go;
329
+ o(Uo, "escapeArgument");
330
+ Re.exports.command = Go;
331
+ Re.exports.argument = Uo;
332
332
  });
333
333
 
334
334
  // ../node_modules/shebang-regex/index.js
335
- var pr = x((Pc, lr) => {
335
+ var pr = x((Tc, lr) => {
336
336
  "use strict";
337
337
  lr.exports = /^#!(.*)/;
338
338
  });
339
339
 
340
340
  // ../node_modules/shebang-command/index.js
341
- var dr = x((vc, mr) => {
341
+ var dr = x((Cc, mr) => {
342
342
  "use strict";
343
- var Uo = pr();
343
+ var $o = pr();
344
344
  mr.exports = (e = "") => {
345
- let t = e.match(Uo);
345
+ let t = e.match($o);
346
346
  if (!t)
347
347
  return null;
348
- let [r, n] = t[0].replace(/#! ?/, "").split(" "), i = r.split("/").pop();
349
- return i === "env" ? n : n ? `${i} ${n}` : i;
348
+ let [r, n] = t[0].replace(/#! ?/, "").split(" "), s = r.split("/").pop();
349
+ return s === "env" ? n : n ? `${s} ${n}` : s;
350
350
  };
351
351
  });
352
352
 
353
353
  // ../node_modules/cross-spawn/lib/util/readShebang.js
354
- var hr = x((Tc, yr) => {
354
+ var hr = x((Ic, yr) => {
355
355
  "use strict";
356
- var Ne = S("fs"), $o = dr();
357
- function Wo(e) {
356
+ var Ne = w("fs"), Wo = dr();
357
+ function Ho(e) {
358
358
  let r = Buffer.alloc(150), n;
359
359
  try {
360
360
  n = Ne.openSync(e, "r"), Ne.readSync(n, r, 0, 150, 0), Ne.closeSync(n);
361
361
  } catch {
362
362
  }
363
- return $o(r.toString());
363
+ return Wo(r.toString());
364
364
  }
365
- o(Wo, "readShebang");
366
- yr.exports = Wo;
365
+ o(Ho, "readShebang");
366
+ yr.exports = Ho;
367
367
  });
368
368
 
369
369
  // ../node_modules/cross-spawn/lib/parse.js
370
- var wr = x((Ic, xr) => {
370
+ var Sr = x((Oc, xr) => {
371
371
  "use strict";
372
- var Ho = S("path"), gr = ur(), br = fr(), Jo = hr(), Vo = process.platform === "win32", qo = /\.(?:com|exe)$/i, zo = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
373
- function Yo(e) {
372
+ var Jo = w("path"), gr = ur(), br = fr(), Vo = hr(), qo = process.platform === "win32", zo = /\.(?:com|exe)$/i, Yo = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
373
+ function Ko(e) {
374
374
  e.file = gr(e);
375
- let t = e.file && Jo(e.file);
375
+ let t = e.file && Vo(e.file);
376
376
  return t ? (e.args.unshift(e.file), e.command = t, gr(e)) : e.file;
377
377
  }
378
- o(Yo, "detectShebang");
379
- function Ko(e) {
380
- if (!Vo)
378
+ o(Ko, "detectShebang");
379
+ function Xo(e) {
380
+ if (!qo)
381
381
  return e;
382
- let t = Yo(e), r = !qo.test(t);
382
+ let t = Ko(e), r = !zo.test(t);
383
383
  if (e.options.forceShell || r) {
384
- let n = zo.test(t);
385
- e.command = Ho.normalize(e.command), e.command = br.command(e.command), e.args = e.args.map((s) => br.argument(s, n));
386
- let i = [e.command].concat(e.args).join(" ");
387
- e.args = ["/d", "/s", "/c", `"${i}"`], e.command = process.env.comspec || "cmd.exe", e.options.windowsVerbatimArguments = !0;
384
+ let n = Yo.test(t);
385
+ e.command = Jo.normalize(e.command), e.command = br.command(e.command), e.args = e.args.map((i) => br.argument(i, n));
386
+ let s = [e.command].concat(e.args).join(" ");
387
+ e.args = ["/d", "/s", "/c", `"${s}"`], e.command = process.env.comspec || "cmd.exe", e.options.windowsVerbatimArguments = !0;
388
388
  }
389
389
  return e;
390
390
  }
391
- o(Ko, "parseNonShell");
392
- function Xo(e, t, r) {
391
+ o(Xo, "parseNonShell");
392
+ function Qo(e, t, r) {
393
393
  t && !Array.isArray(t) && (r = t, t = null), t = t ? t.slice(0) : [], r = Object.assign({}, r);
394
394
  let n = {
395
395
  command: e,
@@ -401,14 +401,14 @@ var wr = x((Ic, xr) => {
401
401
  args: t
402
402
  }
403
403
  };
404
- return r.shell ? n : Ko(n);
404
+ return r.shell ? n : Xo(n);
405
405
  }
406
- o(Xo, "parse");
407
- xr.exports = Xo;
406
+ o(Qo, "parse");
407
+ xr.exports = Qo;
408
408
  });
409
409
 
410
410
  // ../node_modules/cross-spawn/lib/enoent.js
411
- var Er = x((Oc, kr) => {
411
+ var Er = x((Rc, kr) => {
412
412
  "use strict";
413
413
  var De = process.platform === "win32";
414
414
  function _e(e, t) {
@@ -421,79 +421,79 @@ var Er = x((Oc, kr) => {
421
421
  });
422
422
  }
423
423
  o(_e, "notFoundError");
424
- function Qo(e, t) {
424
+ function Zo(e, t) {
425
425
  if (!De)
426
426
  return;
427
427
  let r = e.emit;
428
- e.emit = function(n, i) {
428
+ e.emit = function(n, s) {
429
429
  if (n === "exit") {
430
- let s = Sr(i, t, "spawn");
431
- if (s)
432
- return r.call(e, "error", s);
430
+ let i = wr(s, t);
431
+ if (i)
432
+ return r.call(e, "error", i);
433
433
  }
434
434
  return r.apply(e, arguments);
435
435
  };
436
436
  }
437
- o(Qo, "hookChildProcess");
438
- function Sr(e, t) {
437
+ o(Zo, "hookChildProcess");
438
+ function wr(e, t) {
439
439
  return De && e === 1 && !t.file ? _e(t.original, "spawn") : null;
440
440
  }
441
- o(Sr, "verifyENOENT");
442
- function Zo(e, t) {
441
+ o(wr, "verifyENOENT");
442
+ function es(e, t) {
443
443
  return De && e === 1 && !t.file ? _e(t.original, "spawnSync") : null;
444
444
  }
445
- o(Zo, "verifyENOENTSync");
445
+ o(es, "verifyENOENTSync");
446
446
  kr.exports = {
447
- hookChildProcess: Qo,
448
- verifyENOENT: Sr,
449
- verifyENOENTSync: Zo,
447
+ hookChildProcess: Zo,
448
+ verifyENOENT: wr,
449
+ verifyENOENTSync: es,
450
450
  notFoundError: _e
451
451
  };
452
452
  });
453
453
 
454
454
  // ../node_modules/cross-spawn/index.js
455
- var Tr = x((Rc, R) => {
455
+ var Tr = x((Dc, R) => {
456
456
  "use strict";
457
- var Pr = S("child_process"), Me = wr(), Le = Er();
457
+ var Pr = w("child_process"), Me = Sr(), Le = Er();
458
458
  function vr(e, t, r) {
459
- let n = Me(e, t, r), i = Pr.spawn(n.command, n.args, n.options);
460
- return Le.hookChildProcess(i, n), i;
459
+ let n = Me(e, t, r), s = Pr.spawn(n.command, n.args, n.options);
460
+ return Le.hookChildProcess(s, n), s;
461
461
  }
462
462
  o(vr, "spawn");
463
- function ei(e, t, r) {
464
- let n = Me(e, t, r), i = Pr.spawnSync(n.command, n.args, n.options);
465
- return i.error = i.error || Le.verifyENOENTSync(i.status, n), i;
463
+ function ts(e, t, r) {
464
+ let n = Me(e, t, r), s = Pr.spawnSync(n.command, n.args, n.options);
465
+ return s.error = s.error || Le.verifyENOENTSync(s.status, n), s;
466
466
  }
467
- o(ei, "spawnSync");
467
+ o(ts, "spawnSync");
468
468
  R.exports = vr;
469
469
  R.exports.spawn = vr;
470
- R.exports.sync = ei;
470
+ R.exports.sync = ts;
471
471
  R.exports._parse = Me;
472
472
  R.exports._enoent = Le;
473
473
  });
474
474
 
475
475
  // ../node_modules/merge-stream/index.js
476
- var Qr = x((of, Xr) => {
476
+ var Zr = x((af, Qr) => {
477
477
  "use strict";
478
- var { PassThrough: Xi } = S("stream");
479
- Xr.exports = function() {
480
- var e = [], t = new Xi({ objectMode: !0 });
481
- return t.setMaxListeners(0), t.add = r, t.isEmpty = n, t.on("unpipe", i), Array.prototype.slice.call(arguments).forEach(r), t;
482
- function r(s) {
483
- return Array.isArray(s) ? (s.forEach(r), this) : (e.push(s), s.once("end", i.bind(null, s)), s.once("error", t.emit.bind(t, "error")),
484
- s.pipe(t, { end: !1 }), this);
478
+ var { PassThrough: Zs } = w("stream");
479
+ Qr.exports = function() {
480
+ var e = [], t = new Zs({ objectMode: !0 });
481
+ return t.setMaxListeners(0), t.add = r, t.isEmpty = n, t.on("unpipe", s), Array.prototype.slice.call(arguments).forEach(r), t;
482
+ function r(i) {
483
+ return Array.isArray(i) ? (i.forEach(r), this) : (e.push(i), i.once("end", s.bind(null, i)), i.once("error", t.emit.bind(t, "error")),
484
+ i.pipe(t, { end: !1 }), this);
485
485
  }
486
486
  o(r, "add");
487
487
  function n() {
488
488
  return e.length == 0;
489
489
  }
490
490
  o(n, "isEmpty");
491
- function i(s) {
491
+ function s(i) {
492
492
  e = e.filter(function(a) {
493
- return a !== s;
493
+ return a !== i;
494
494
  }), !e.length && t.readable && t.end();
495
495
  }
496
- o(i, "remove");
496
+ o(s, "remove");
497
497
  };
498
498
  });
499
499
 
@@ -501,39 +501,39 @@ var Qr = x((of, Xr) => {
501
501
  function ut(e) {
502
502
  return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
503
503
  }
504
- var xn = mo(() => {
504
+ var Sn = yo(() => {
505
505
  o(ut, "slash");
506
506
  });
507
507
 
508
508
  // ../node_modules/common-path-prefix/index.js
509
- var Tn = x((tl, vn) => {
509
+ var Cn = x((nl, Tn) => {
510
510
  "use strict";
511
- var { sep: Cs } = S("path"), Is = /* @__PURE__ */ o((e) => {
511
+ var { sep: Ai } = w("path"), Oi = /* @__PURE__ */ o((e) => {
512
512
  for (let t of e) {
513
513
  let r = /(\/|\\)/.exec(t);
514
514
  if (r !== null) return r[0];
515
515
  }
516
- return Cs;
516
+ return Ai;
517
517
  }, "determineSeparator");
518
- vn.exports = /* @__PURE__ */ o(function(t, r = Is(t)) {
519
- let [n = "", ...i] = t;
520
- if (n === "" || i.length === 0) return "";
521
- let s = n.split(r), a = s.length;
522
- for (let u of i) {
518
+ Tn.exports = /* @__PURE__ */ o(function(t, r = Oi(t)) {
519
+ let [n = "", ...s] = t;
520
+ if (n === "" || s.length === 0) return "";
521
+ let i = n.split(r), a = i.length;
522
+ for (let u of s) {
523
523
  let f = u.split(r);
524
524
  for (let l = 0; l < a; l++)
525
- f[l] !== s[l] && (a = l);
525
+ f[l] !== i[l] && (a = l);
526
526
  if (a === 0) return "";
527
527
  }
528
- let c = s.slice(0, a).join(r);
528
+ let c = i.slice(0, a).join(r);
529
529
  return c.endsWith(r) ? c : c + r;
530
530
  }, "commonPathPrefix");
531
531
  });
532
532
 
533
533
  // ../node_modules/fetch-retry/index.js
534
- var Kn = x((Om, Yn) => {
534
+ var Xn = x((Rm, Kn) => {
535
535
  "use strict";
536
- Yn.exports = function(e, t) {
536
+ Kn.exports = function(e, t) {
537
537
  if (t = t || {}, typeof e != "function")
538
538
  throw new E("fetch must be a function");
539
539
  if (typeof t != "object")
@@ -549,27 +549,27 @@ var Kn = x((Om, Yn) => {
549
549
  retryDelay: 1e3,
550
550
  retryOn: []
551
551
  };
552
- return t = Object.assign(r, t), /* @__PURE__ */ o(function(i, s) {
552
+ return t = Object.assign(r, t), /* @__PURE__ */ o(function(s, i) {
553
553
  var a = t.retries, c = t.retryDelay, u = t.retryOn;
554
- if (s && s.retries !== void 0)
555
- if (xe(s.retries))
556
- a = s.retries;
554
+ if (i && i.retries !== void 0)
555
+ if (xe(i.retries))
556
+ a = i.retries;
557
557
  else
558
558
  throw new E("retries must be a positive integer");
559
- if (s && s.retryDelay !== void 0)
560
- if (xe(s.retryDelay) || typeof s.retryDelay == "function")
561
- c = s.retryDelay;
559
+ if (i && i.retryDelay !== void 0)
560
+ if (xe(i.retryDelay) || typeof i.retryDelay == "function")
561
+ c = i.retryDelay;
562
562
  else
563
563
  throw new E("retryDelay must be a positive integer or a function returning a positive integer");
564
- if (s && s.retryOn)
565
- if (Array.isArray(s.retryOn) || typeof s.retryOn == "function")
566
- u = s.retryOn;
564
+ if (i && i.retryOn)
565
+ if (Array.isArray(i.retryOn) || typeof i.retryOn == "function")
566
+ u = i.retryOn;
567
567
  else
568
568
  throw new E("retryOn property expects an array or function");
569
569
  return new Promise(function(f, l) {
570
570
  var d = /* @__PURE__ */ o(function(y) {
571
- var g = typeof Request < "u" && i instanceof Request ? i.clone() : i;
572
- e(g, s).then(function(m) {
571
+ var g = typeof Request < "u" && s instanceof Request ? s.clone() : s;
572
+ e(g, i).then(function(m) {
573
573
  if (Array.isArray(u) && u.indexOf(m.status) === -1)
574
574
  f(m);
575
575
  else if (typeof u == "function")
@@ -617,7 +617,7 @@ var Kn = x((Om, Yn) => {
617
617
  });
618
618
 
619
619
  // src/telemetry/index.ts
620
- import { logger as ao } from "storybook/internal/node-logger";
620
+ import { logger as co } from "storybook/internal/node-logger";
621
621
 
622
622
  // src/telemetry/notify.ts
623
623
  var z = A(vt(), 1);
@@ -647,9 +647,9 @@ function D(e, t = jt.sep) {
647
647
  return e;
648
648
  let r = process.cwd().split(t);
649
649
  for (; r.length > 1; ) {
650
- let n = r.join(t), i = new RegExp(At(n), "gi");
651
- e = e.replace(i, "$SNIP");
652
- let s = r.join(t + t), a = new RegExp(At(s), "gi");
650
+ let n = r.join(t), s = new RegExp(At(n), "gi");
651
+ e = e.replace(s, "$SNIP");
652
+ let i = r.join(t + t), a = new RegExp(At(i), "gi");
653
653
  e = e.replace(a, "$SNIP"), r.pop();
654
654
  }
655
655
  return e;
@@ -673,33 +673,33 @@ function Y(e, t = jt.sep) {
673
673
  o(Y, "sanitizeError");
674
674
 
675
675
  // src/telemetry/storybook-metadata.ts
676
- import { dirname as oa } from "node:path";
676
+ import { dirname as ia } from "node:path";
677
677
  import {
678
- getProjectRoot as ia,
679
- getStorybookConfiguration as sa,
680
- getStorybookInfo as aa,
681
- loadMainConfig as ca,
682
- versions as ua
678
+ getProjectRoot as aa,
679
+ getStorybookConfiguration as ca,
680
+ getStorybookInfo as ua,
681
+ loadMainConfig as fa,
682
+ versions as la
683
683
  } from "storybook/internal/common";
684
- import { readConfig as fa } from "storybook/internal/csf-tools";
684
+ import { readConfig as pa } from "storybook/internal/csf-tools";
685
685
 
686
686
  // ../node_modules/fd-package-json/dist/esm/main.js
687
687
  var Dt = A(Nt(), 1);
688
688
  import { resolve as wo } from "node:path";
689
- import { stat as So, readFile as ko } from "node:fs/promises";
690
- import { statSync as Va, readFileSync as qa } from "node:fs";
691
- async function Eo(e) {
689
+ import { stat as ko, readFile as Eo } from "node:fs/promises";
690
+ import { statSync as za, readFileSync as Ya } from "node:fs";
691
+ async function Po(e) {
692
692
  try {
693
- return (await So(e)).isFile();
693
+ return (await ko(e)).isFile();
694
694
  } catch {
695
695
  return !1;
696
696
  }
697
697
  }
698
- o(Eo, "fileExists");
698
+ o(Po, "fileExists");
699
699
  async function Pe(e) {
700
700
  for (let t of (0, Dt.walkUp)(e)) {
701
701
  let r = wo(t, "package.json");
702
- if (await Eo(r))
702
+ if (await Po(r))
703
703
  return r;
704
704
  }
705
705
  return null;
@@ -710,7 +710,7 @@ async function _t(e) {
710
710
  if (!t)
711
711
  return null;
712
712
  try {
713
- let r = await ko(t, { encoding: "utf8" });
713
+ let r = await Eo(t, { encoding: "utf8" });
714
714
  return JSON.parse(r);
715
715
  } catch {
716
716
  return null;
@@ -732,6 +732,7 @@ var Mt = [
732
732
  "bun.lockb": "bun",
733
733
  "deno.lock": "deno",
734
734
  "pnpm-lock.yaml": "pnpm",
735
+ "pnpm-workspace.yaml": "pnpm",
735
736
  "yarn.lock": "yarn",
736
737
  "package-lock.json": "npm",
737
738
  "npm-shrinkwrap.json": "npm"
@@ -754,7 +755,7 @@ var Mt = [
754
755
  // ../node_modules/package-manager-detector/dist/detect.mjs
755
756
  import Ft from "node:fs/promises";
756
757
  import P from "node:path";
757
- import Po from "node:process";
758
+ import vo from "node:process";
758
759
  async function Ce(e, t) {
759
760
  try {
760
761
  let r = await Ft.stat(e);
@@ -764,32 +765,32 @@ async function Ce(e, t) {
764
765
  }
765
766
  }
766
767
  o(Ce, "pathExists");
767
- function* vo(e = Po.cwd()) {
768
+ function* To(e = vo.cwd()) {
768
769
  let t = P.resolve(e), { root: r } = P.parse(t);
769
770
  for (; t && t !== r; )
770
771
  yield t, t = P.dirname(t);
771
772
  }
772
- o(vo, "lookup");
773
+ o(To, "lookup");
773
774
  async function Lt(e, t) {
774
- return !e || !Ce(e, "file") ? null : await Co(e, t);
775
+ return !e || !Ce(e, "file") ? null : await Io(e, t);
775
776
  }
776
777
  o(Lt, "parsePackageJson");
777
778
  async function Ie(e = {}) {
778
779
  let { cwd: t, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = e;
779
- for (let i of vo(t))
780
- for (let s of r)
781
- switch (s) {
780
+ for (let s of To(t))
781
+ for (let i of r)
782
+ switch (i) {
782
783
  case "lockfile": {
783
784
  for (let a of Object.keys(ve))
784
- if (await Ce(P.join(i, a), "file")) {
785
- let c = ve[a], u = await Lt(P.join(i, "package.json"), n);
785
+ if (await Ce(P.join(s, a), "file")) {
786
+ let c = ve[a], u = await Lt(P.join(s, "package.json"), n);
786
787
  return u || { name: c, agent: c };
787
788
  }
788
789
  break;
789
790
  }
790
791
  case "packageManager-field":
791
792
  case "devEngines-field": {
792
- let a = await Lt(P.join(i, "package.json"), n);
793
+ let a = await Lt(P.join(s, "package.json"), n);
793
794
  if (a)
794
795
  return a;
795
796
  break;
@@ -797,8 +798,8 @@ async function Ie(e = {}) {
797
798
  case "install-metadata": {
798
799
  for (let a of Object.keys(Te)) {
799
800
  let c = a.endsWith("/") ? "dir" : "file";
800
- if (await Ce(P.join(i, a), c)) {
801
- let u = Te[a], f = u === "yarn" ? Io(a) ? "yarn" : "yarn@berry" : u;
801
+ if (await Ce(P.join(s, a), c)) {
802
+ let u = Te[a], f = u === "yarn" ? Ao(a) ? "yarn" : "yarn@berry" : u;
802
803
  return { name: u, agent: f };
803
804
  }
804
805
  }
@@ -808,7 +809,7 @@ async function Ie(e = {}) {
808
809
  return null;
809
810
  }
810
811
  o(Ie, "detect");
811
- function To(e) {
812
+ function Co(e) {
812
813
  let t = /* @__PURE__ */ o((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
813
814
  if (typeof e.packageManager == "string") {
814
815
  let [r, n] = e.packageManager.replace(/^\^/, "").split("@");
@@ -820,25 +821,25 @@ function To(e) {
820
821
  ver: t(e.devEngines.packageManager.version)
821
822
  };
822
823
  }
823
- o(To, "getNameAndVer");
824
- async function Co(e, t) {
824
+ o(Co, "getNameAndVer");
825
+ async function Io(e, t) {
825
826
  try {
826
- let r = JSON.parse(await Ft.readFile(e, "utf8")), n, i = To(r);
827
- if (i) {
828
- let s = i.name, a = i.ver, c = a;
829
- return s === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: s, agent: n, version: c }) : s === "pnpm" &&
830
- a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: s, agent: n, version: c }) : Mt.includes(s) ? (n = s, { name: s, agent: n, version: c }) :
827
+ let r = JSON.parse(await Ft.readFile(e, "utf8")), n, s = Co(r);
828
+ if (s) {
829
+ let i = s.name, a = s.ver, c = a;
830
+ return i === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: i, agent: n, version: c }) : i === "pnpm" &&
831
+ a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: i, agent: n, version: c }) : Mt.includes(i) ? (n = i, { name: i, agent: n, version: c }) :
831
832
  t?.(r.packageManager) ?? null;
832
833
  }
833
834
  } catch {
834
835
  }
835
836
  return null;
836
837
  }
837
- o(Co, "handlePackageManager");
838
- function Io(e) {
838
+ o(Io, "handlePackageManager");
839
+ function Ao(e) {
839
840
  return e.endsWith(".yarn_integrity");
840
841
  }
841
- o(Io, "isMetadataYarnClassic");
842
+ o(Ao, "isMetadataYarnClassic");
842
843
 
843
844
  // ../node_modules/package-manager-detector/dist/index.mjs
844
845
  import "node:fs/promises";
@@ -846,15 +847,15 @@ import "node:path";
846
847
  import "node:process";
847
848
 
848
849
  // src/telemetry/get-application-file-count.ts
849
- import { sep as Ws } from "node:path";
850
+ import { sep as Ji } from "node:path";
850
851
 
851
852
  // src/telemetry/exec-command-count-lines.ts
852
- import { createInterface as ws } from "node:readline";
853
+ import { createInterface as ki } from "node:readline";
853
854
 
854
855
  // node_modules/execa/index.js
855
- var dn = A(Tr(), 1);
856
- import { Buffer as ds } from "node:buffer";
857
- import ys from "node:path";
856
+ var yn = A(Tr(), 1);
857
+ import { Buffer as hi } from "node:buffer";
858
+ import gi from "node:path";
858
859
  import ct from "node:child_process";
859
860
  import le from "node:process";
860
861
 
@@ -869,7 +870,7 @@ o(Fe, "stripFinalNewline");
869
870
  // node_modules/npm-run-path/index.js
870
871
  import Z from "node:process";
871
872
  import _ from "node:path";
872
- import ti from "node:url";
873
+ import { fileURLToPath as Cr } from "node:url";
873
874
 
874
875
  // node_modules/path-key/index.js
875
876
  function Q(e = {}) {
@@ -882,93 +883,97 @@ function Q(e = {}) {
882
883
  o(Q, "pathKey");
883
884
 
884
885
  // node_modules/npm-run-path/index.js
885
- function ri(e = {}) {
886
- let {
887
- cwd: t = Z.cwd(),
888
- path: r = Z.env[Q()],
889
- execPath: n = Z.execPath
890
- } = e, i, s = t instanceof URL ? ti.fileURLToPath(t) : t, a = _.resolve(s), c = [];
891
- for (; i !== a; )
892
- c.push(_.join(a, "node_modules/.bin")), i = a, a = _.resolve(a, "..");
893
- return c.push(_.resolve(s, n, "..")), [...c, r].join(_.delimiter);
894
- }
895
- o(ri, "npmRunPath");
896
- function Cr({ env: e = Z.env, ...t } = {}) {
886
+ var rs = /* @__PURE__ */ o(({
887
+ cwd: e = Z.cwd(),
888
+ path: t = Z.env[Q()],
889
+ preferLocal: r = !0,
890
+ execPath: n = Z.execPath,
891
+ addExecPath: s = !0
892
+ } = {}) => {
893
+ let i = e instanceof URL ? Cr(e) : e, a = _.resolve(i), c = [];
894
+ return r && ns(c, a), s && os(c, n, a), [...c, t].join(_.delimiter);
895
+ }, "npmRunPath"), ns = /* @__PURE__ */ o((e, t) => {
896
+ let r;
897
+ for (; r !== t; )
898
+ e.push(_.join(t, "node_modules/.bin")), r = t, t = _.resolve(t, "..");
899
+ }, "applyPreferLocal"), os = /* @__PURE__ */ o((e, t, r) => {
900
+ let n = t instanceof URL ? Cr(t) : t;
901
+ e.push(_.resolve(r, n, ".."));
902
+ }, "applyExecPath"), Ir = /* @__PURE__ */ o(({ env: e = Z.env, ...t } = {}) => {
897
903
  e = { ...e };
898
904
  let r = Q({ env: e });
899
- return t.path = e[r], e[r] = ri(t), e;
900
- }
901
- o(Cr, "npmRunPathEnv");
905
+ return t.path = e[r], e[r] = rs(t), e;
906
+ }, "npmRunPathEnv");
902
907
 
903
908
  // node_modules/mimic-fn/index.js
904
- var ni = /* @__PURE__ */ o((e, t, r, n) => {
909
+ var ss = /* @__PURE__ */ o((e, t, r, n) => {
905
910
  if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
906
911
  return;
907
- let i = Object.getOwnPropertyDescriptor(e, r), s = Object.getOwnPropertyDescriptor(t, r);
908
- !oi(i, s) && n || Object.defineProperty(e, r, s);
909
- }, "copyProperty"), oi = /* @__PURE__ */ o(function(e, t) {
912
+ let s = Object.getOwnPropertyDescriptor(e, r), i = Object.getOwnPropertyDescriptor(t, r);
913
+ !is(s, i) && n || Object.defineProperty(e, r, i);
914
+ }, "copyProperty"), is = /* @__PURE__ */ o(function(e, t) {
910
915
  return e === void 0 || e.configurable || e.writable === t.writable && e.enumerable === t.enumerable && e.configurable === t.configurable &&
911
916
  (e.writable || e.value === t.value);
912
- }, "canCopyProperty"), ii = /* @__PURE__ */ o((e, t) => {
917
+ }, "canCopyProperty"), as = /* @__PURE__ */ o((e, t) => {
913
918
  let r = Object.getPrototypeOf(t);
914
919
  r !== Object.getPrototypeOf(e) && Object.setPrototypeOf(e, r);
915
- }, "changePrototype"), si = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
916
- ${t}`, "wrappedToString"), ai = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), ci = Object.getOwnPropertyDescriptor(Function.
917
- prototype.toString, "name"), ui = /* @__PURE__ */ o((e, t, r) => {
918
- let n = r === "" ? "" : `with ${r.trim()}() `, i = si.bind(null, n, t.toString());
919
- Object.defineProperty(i, "name", ci), Object.defineProperty(e, "toString", { ...ai, value: i });
920
+ }, "changePrototype"), cs = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
921
+ ${t}`, "wrappedToString"), us = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), fs = Object.getOwnPropertyDescriptor(Function.
922
+ prototype.toString, "name"), ls = /* @__PURE__ */ o((e, t, r) => {
923
+ let n = r === "" ? "" : `with ${r.trim()}() `, s = cs.bind(null, n, t.toString());
924
+ Object.defineProperty(s, "name", fs), Object.defineProperty(e, "toString", { ...us, value: s });
920
925
  }, "changeToString");
921
926
  function Be(e, t, { ignoreNonConfigurable: r = !1 } = {}) {
922
927
  let { name: n } = e;
923
- for (let i of Reflect.ownKeys(t))
924
- ni(e, t, i, r);
925
- return ii(e, t), ui(e, t, n), e;
928
+ for (let s of Reflect.ownKeys(t))
929
+ ss(e, t, s, r);
930
+ return as(e, t), ls(e, t, n), e;
926
931
  }
927
932
  o(Be, "mimicFunction");
928
933
 
929
934
  // node_modules/onetime/index.js
930
- var ee = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ o((e, t = {}) => {
935
+ var ee = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ o((e, t = {}) => {
931
936
  if (typeof e != "function")
932
937
  throw new TypeError("Expected a function");
933
- let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
934
- if (ee.set(s, ++n), n === 1)
938
+ let r, n = 0, s = e.displayName || e.name || "<anonymous>", i = /* @__PURE__ */ o(function(...a) {
939
+ if (ee.set(i, ++n), n === 1)
935
940
  r = e.apply(this, a), e = null;
936
941
  else if (t.throw === !0)
937
- throw new Error(`Function \`${i}\` can only be called once`);
942
+ throw new Error(`Function \`${s}\` can only be called once`);
938
943
  return r;
939
944
  }, "onetime");
940
- return Be(s, e), ee.set(s, n), s;
945
+ return Be(i, e), ee.set(i, n), i;
941
946
  }, "onetime");
942
- Ir.callCount = (e) => {
947
+ Ar.callCount = (e) => {
943
948
  if (!ee.has(e))
944
949
  throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
945
950
  return ee.get(e);
946
951
  };
947
- var Ar = Ir;
952
+ var Or = Ar;
948
953
 
949
954
  // node_modules/execa/lib/error.js
950
- import xi from "node:process";
955
+ import ws from "node:process";
951
956
 
952
957
  // node_modules/human-signals/build/src/main.js
953
- import { constants as mi } from "node:os";
958
+ import { constants as ys } from "node:os";
954
959
 
955
960
  // node_modules/human-signals/build/src/realtime.js
956
- var Or = /* @__PURE__ */ o(() => {
957
- let e = Ge - jr + 1;
958
- return Array.from({ length: e }, fi);
959
- }, "getRealtimeSignals"), fi = /* @__PURE__ */ o((e, t) => ({
961
+ var jr = /* @__PURE__ */ o(() => {
962
+ let e = Ge - Rr + 1;
963
+ return Array.from({ length: e }, ps);
964
+ }, "getRealtimeSignals"), ps = /* @__PURE__ */ o((e, t) => ({
960
965
  name: `SIGRT${t + 1}`,
961
- number: jr + t,
966
+ number: Rr + t,
962
967
  action: "terminate",
963
968
  description: "Application-specific signal (realtime)",
964
969
  standard: "posix"
965
- }), "getRealtimeSignal"), jr = 34, Ge = 64;
970
+ }), "getRealtimeSignal"), Rr = 34, Ge = 64;
966
971
 
967
972
  // node_modules/human-signals/build/src/signals.js
968
- import { constants as li } from "node:os";
973
+ import { constants as ms } from "node:os";
969
974
 
970
975
  // node_modules/human-signals/build/src/core.js
971
- var Rr = [
976
+ var Nr = [
972
977
  {
973
978
  name: "SIGHUP",
974
979
  number: 1,
@@ -1242,108 +1247,108 @@ var Rr = [
1242
1247
 
1243
1248
  // node_modules/human-signals/build/src/signals.js
1244
1249
  var Ue = /* @__PURE__ */ o(() => {
1245
- let e = Or();
1246
- return [...Rr, ...e].map(pi);
1247
- }, "getSignals"), pi = /* @__PURE__ */ o(({
1250
+ let e = jr();
1251
+ return [...Nr, ...e].map(ds);
1252
+ }, "getSignals"), ds = /* @__PURE__ */ o(({
1248
1253
  name: e,
1249
1254
  number: t,
1250
1255
  description: r,
1251
1256
  action: n,
1252
- forced: i = !1,
1253
- standard: s
1257
+ forced: s = !1,
1258
+ standard: i
1254
1259
  }) => {
1255
1260
  let {
1256
1261
  signals: { [e]: a }
1257
- } = li, c = a !== void 0;
1258
- return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
1262
+ } = ms, c = a !== void 0;
1263
+ return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: s, standard: i };
1259
1264
  }, "normalizeSignal");
1260
1265
 
1261
1266
  // node_modules/human-signals/build/src/main.js
1262
- var di = /* @__PURE__ */ o(() => {
1267
+ var hs = /* @__PURE__ */ o(() => {
1263
1268
  let e = Ue();
1264
- return Object.fromEntries(e.map(yi));
1265
- }, "getSignalsByName"), yi = /* @__PURE__ */ o(({
1269
+ return Object.fromEntries(e.map(gs));
1270
+ }, "getSignalsByName"), gs = /* @__PURE__ */ o(({
1266
1271
  name: e,
1267
1272
  number: t,
1268
1273
  description: r,
1269
1274
  supported: n,
1270
- action: i,
1271
- forced: s,
1275
+ action: s,
1276
+ forced: i,
1272
1277
  standard: a
1273
- }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"), Nr = di(), hi = /* @__PURE__ */ o(
1278
+ }) => [e, { name: e, number: t, description: r, supported: n, action: s, forced: i, standard: a }], "getSignalByName"), Dr = hs(), bs = /* @__PURE__ */ o(
1274
1279
  () => {
1275
1280
  let e = Ue(), t = Ge + 1, r = Array.from(
1276
1281
  { length: t },
1277
- (n, i) => gi(i, e)
1282
+ (n, s) => xs(s, e)
1278
1283
  );
1279
1284
  return Object.assign({}, ...r);
1280
- }, "getSignalsByNumber"), gi = /* @__PURE__ */ o((e, t) => {
1281
- let r = bi(e, t);
1285
+ }, "getSignalsByNumber"), xs = /* @__PURE__ */ o((e, t) => {
1286
+ let r = Ss(e, t);
1282
1287
  if (r === void 0)
1283
1288
  return {};
1284
- let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
1289
+ let { name: n, description: s, supported: i, action: a, forced: c, standard: u } = r;
1285
1290
  return {
1286
1291
  [e]: {
1287
1292
  name: n,
1288
1293
  number: e,
1289
- description: i,
1290
- supported: s,
1294
+ description: s,
1295
+ supported: i,
1291
1296
  action: a,
1292
1297
  forced: c,
1293
1298
  standard: u
1294
1299
  }
1295
1300
  };
1296
- }, "getSignalByNumber"), bi = /* @__PURE__ */ o((e, t) => {
1297
- let r = t.find(({ name: n }) => mi.signals[n] === e);
1301
+ }, "getSignalByNumber"), Ss = /* @__PURE__ */ o((e, t) => {
1302
+ let r = t.find(({ name: n }) => ys.signals[n] === e);
1298
1303
  return r !== void 0 ? r : t.find((n) => n.number === e);
1299
- }, "findSignalByNumber"), su = hi();
1304
+ }, "findSignalByNumber"), cu = bs();
1300
1305
 
1301
1306
  // node_modules/execa/lib/error.js
1302
- var wi = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s, isCanceled: a }) => e ? `\
1303
- timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` :
1304
- s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), M = /* @__PURE__ */ o(({
1307
+ var ks = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: s, exitCode: i, isCanceled: a }) => e ? `\
1308
+ timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${s})` :
1309
+ i !== void 0 ? `failed with exit code ${i}` : "failed", "getErrorPrefix"), M = /* @__PURE__ */ o(({
1305
1310
  stdout: e,
1306
1311
  stderr: t,
1307
1312
  all: r,
1308
1313
  error: n,
1309
- signal: i,
1310
- exitCode: s,
1314
+ signal: s,
1315
+ exitCode: i,
1311
1316
  command: a,
1312
1317
  escapedCommand: c,
1313
1318
  timedOut: u,
1314
1319
  isCanceled: f,
1315
1320
  killed: l,
1316
- parsed: { options: { timeout: d, cwd: h = xi.cwd() } }
1321
+ parsed: { options: { timeout: d, cwd: h = ws.cwd() } }
1317
1322
  }) => {
1318
- s = s === null ? void 0 : s, i = i === null ? void 0 : i;
1319
- let y = i === void 0 ? void 0 : Nr[i].description, g = n && n.code, b = `Command ${wi({ timedOut: u, timeout: d, errorCode: g, signal: i, signalDescription: y,
1320
- exitCode: s, isCanceled: f })}: ${a}`, C = Object.prototype.toString.call(n) === "[object Error]", k = C ? `${b}
1323
+ i = i === null ? void 0 : i, s = s === null ? void 0 : s;
1324
+ let y = s === void 0 ? void 0 : Dr[s].description, g = n && n.code, b = `Command ${ks({ timedOut: u, timeout: d, errorCode: g, signal: s, signalDescription: y,
1325
+ exitCode: i, isCanceled: f })}: ${a}`, C = Object.prototype.toString.call(n) === "[object Error]", k = C ? `${b}
1321
1326
  ${n.message}` : b, I = [k, t, e].filter(Boolean).join(`
1322
1327
  `);
1323
1328
  return C ? (n.originalMessage = n.message, n.message = I) : n = new Error(I), n.shortMessage = k, n.command = a, n.escapedCommand = c, n.exitCode =
1324
- s, n.signal = i, n.signalDescription = y, n.stdout = e, n.stderr = t, n.cwd = h, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
1329
+ i, n.signal = s, n.signalDescription = y, n.stdout = e, n.stderr = t, n.cwd = h, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
1325
1330
  bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = f, n.killed = l && !u, n;
1326
1331
  }, "makeError");
1327
1332
 
1328
1333
  // node_modules/execa/lib/stdio.js
1329
- var te = ["stdin", "stdout", "stderr"], Si = /* @__PURE__ */ o((e) => te.some((t) => e[t] !== void 0), "hasAlias"), Dr = /* @__PURE__ */ o((e) => {
1334
+ var te = ["stdin", "stdout", "stderr"], Es = /* @__PURE__ */ o((e) => te.some((t) => e[t] !== void 0), "hasAlias"), _r = /* @__PURE__ */ o((e) => {
1330
1335
  if (!e)
1331
1336
  return;
1332
1337
  let { stdio: t } = e;
1333
1338
  if (t === void 0)
1334
1339
  return te.map((n) => e[n]);
1335
- if (Si(e))
1340
+ if (Es(e))
1336
1341
  throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${te.map((n) => `\`${n}\``).join(", ")}`);
1337
1342
  if (typeof t == "string")
1338
1343
  return t;
1339
1344
  if (!Array.isArray(t))
1340
1345
  throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
1341
1346
  let r = Math.max(t.length, te.length);
1342
- return Array.from({ length: r }, (n, i) => t[i]);
1347
+ return Array.from({ length: r }, (n, s) => t[s]);
1343
1348
  }, "normalizeStdio");
1344
1349
 
1345
1350
  // node_modules/execa/lib/kill.js
1346
- import Pi from "node:os";
1351
+ import Ts from "node:os";
1347
1352
 
1348
1353
  // node_modules/signal-exit/dist/mjs/signals.js
1349
1354
  var v = [];
@@ -1368,7 +1373,7 @@ process.platform === "linux" && v.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"
1368
1373
  // node_modules/signal-exit/dist/mjs/index.js
1369
1374
  var re = /* @__PURE__ */ o((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.
1370
1375
  reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "f\
1371
- unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis, ki = Object.defineProperty.bind(Object), He = class {
1376
+ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis, Ps = Object.defineProperty.bind(Object), He = class {
1372
1377
  static {
1373
1378
  o(this, "Emitter");
1374
1379
  }
@@ -1385,7 +1390,7 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1385
1390
  constructor() {
1386
1391
  if (We[$e])
1387
1392
  return We[$e];
1388
- ki(We, $e, {
1393
+ Ps(We, $e, {
1389
1394
  value: this,
1390
1395
  writable: !1,
1391
1396
  enumerable: !1,
@@ -1396,23 +1401,23 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1396
1401
  this.listeners[t].push(r);
1397
1402
  }
1398
1403
  removeListener(t, r) {
1399
- let n = this.listeners[t], i = n.indexOf(r);
1400
- i !== -1 && (i === 0 && n.length === 1 ? n.length = 0 : n.splice(i, 1));
1404
+ let n = this.listeners[t], s = n.indexOf(r);
1405
+ s !== -1 && (s === 0 && n.length === 1 ? n.length = 0 : n.splice(s, 1));
1401
1406
  }
1402
1407
  emit(t, r, n) {
1403
1408
  if (this.emitted[t])
1404
1409
  return !1;
1405
1410
  this.emitted[t] = !0;
1406
- let i = !1;
1407
- for (let s of this.listeners[t])
1408
- i = s(r, n) === !0 || i;
1409
- return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
1411
+ let s = !1;
1412
+ for (let i of this.listeners[t])
1413
+ s = i(r, n) === !0 || s;
1414
+ return t === "exit" && (s = this.emit("afterExit", r, n) || s), s;
1410
1415
  }
1411
1416
  }, ne = class {
1412
1417
  static {
1413
1418
  o(this, "SignalExitBase");
1414
1419
  }
1415
- }, Ei = /* @__PURE__ */ o((e) => ({
1420
+ }, vs = /* @__PURE__ */ o((e) => ({
1416
1421
  onExit(t, r) {
1417
1422
  return e.onExit(t, r);
1418
1423
  },
@@ -1441,27 +1446,27 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1441
1446
  // "SIGHUP" throws an `ENOSYS` error on Windows,
1442
1447
  // so use a supported signal instead
1443
1448
  /* c8 ignore start */
1444
- #s = qe.platform === "win32" ? "SIGINT" : "SIGHUP";
1449
+ #i = qe.platform === "win32" ? "SIGINT" : "SIGHUP";
1445
1450
  /* c8 ignore stop */
1446
1451
  #t = new He();
1447
1452
  #e;
1448
1453
  #o;
1449
- #i;
1454
+ #s;
1450
1455
  #n = {};
1451
1456
  #r = !1;
1452
1457
  constructor(t) {
1453
1458
  super(), this.#e = t, this.#n = {};
1454
1459
  for (let r of v)
1455
1460
  this.#n[r] = () => {
1456
- let n = this.#e.listeners(r), { count: i } = this.#t, s = t;
1457
- if (typeof s.__signal_exit_emitter__ == "object" && typeof s.__signal_exit_emitter__.count == "number" && (i += s.__signal_exit_emitter__.
1458
- count), n.length === i) {
1461
+ let n = this.#e.listeners(r), { count: s } = this.#t, i = t;
1462
+ if (typeof i.__signal_exit_emitter__ == "object" && typeof i.__signal_exit_emitter__.count == "number" && (s += i.__signal_exit_emitter__.
1463
+ count), n.length === s) {
1459
1464
  this.unload();
1460
- let a = this.#t.emit("exit", null, r), c = r === "SIGHUP" ? this.#s : r;
1465
+ let a = this.#t.emit("exit", null, r), c = r === "SIGHUP" ? this.#i : r;
1461
1466
  a || t.kill(t.pid, c);
1462
1467
  }
1463
1468
  };
1464
- this.#i = t.reallyExit, this.#o = t.emit;
1469
+ this.#s = t.reallyExit, this.#o = t.emit;
1465
1470
  }
1466
1471
  onExit(t, r) {
1467
1472
  if (!re(this.#e))
@@ -1494,18 +1499,18 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1494
1499
  this.#e.removeListener(t, r);
1495
1500
  } catch {
1496
1501
  }
1497
- }), this.#e.emit = this.#o, this.#e.reallyExit = this.#i, this.#t.count -= 1);
1502
+ }), this.#e.emit = this.#o, this.#e.reallyExit = this.#s, this.#t.count -= 1);
1498
1503
  }
1499
1504
  #a(t) {
1500
- return re(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
1505
+ return re(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#s.call(this.#e, this.#e.exitCode)) :
1501
1506
  0;
1502
1507
  }
1503
1508
  #c(t, ...r) {
1504
1509
  let n = this.#o;
1505
1510
  if (t === "exit" && re(this.#e)) {
1506
1511
  typeof r[0] == "number" && (this.#e.exitCode = r[0]);
1507
- let i = n.call(this.#e, t, ...r);
1508
- return this.#t.emit("exit", this.#e.exitCode, null), i;
1512
+ let s = n.call(this.#e, t, ...r);
1513
+ return this.#t.emit("exit", this.#e.exitCode, null), s;
1509
1514
  } else
1510
1515
  return n.call(this.#e, t, ...r);
1511
1516
  }
@@ -1519,7 +1524,7 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1519
1524
  *
1520
1525
  * Returns a function that may be used to unload signal-exit.
1521
1526
  */
1522
- onExit: _r,
1527
+ onExit: Mr,
1523
1528
  /**
1524
1529
  * Load the listeners. Likely you never need to call this, unless
1525
1530
  * doing a rather deep integration with signal-exit functionality.
@@ -1527,7 +1532,7 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1527
1532
  *
1528
1533
  * @internal
1529
1534
  */
1530
- load: gu,
1535
+ load: xu,
1531
1536
  /**
1532
1537
  * Unload the listeners. Likely you never need to call this, unless
1533
1538
  * doing a rather deep integration with signal-exit functionality.
@@ -1535,59 +1540,59 @@ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis,
1535
1540
  *
1536
1541
  * @internal
1537
1542
  */
1538
- unload: bu
1539
- } = Ei(re(qe) ? new Ve(qe) : new Je());
1543
+ unload: Su
1544
+ } = vs(re(qe) ? new Ve(qe) : new Je());
1540
1545
 
1541
1546
  // node_modules/execa/lib/kill.js
1542
- var vi = 1e3 * 5, Mr = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
1547
+ var Cs = 1e3 * 5, Lr = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
1543
1548
  let n = e(t);
1544
- return Ti(e, t, r, n), n;
1545
- }, "spawnedKill"), Ti = /* @__PURE__ */ o((e, t, r, n) => {
1546
- if (!Ci(t, r, n))
1549
+ return Is(e, t, r, n), n;
1550
+ }, "spawnedKill"), Is = /* @__PURE__ */ o((e, t, r, n) => {
1551
+ if (!As(t, r, n))
1547
1552
  return;
1548
- let i = Ai(r), s = setTimeout(() => {
1553
+ let s = js(r), i = setTimeout(() => {
1549
1554
  e("SIGKILL");
1550
- }, i);
1551
- s.unref && s.unref();
1552
- }, "setKillTimeout"), Ci = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Ii(e) && t !== !1 && r, "shouldForceKill"), Ii = /* @__PURE__ */ o(
1553
- (e) => e === Pi.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), Ai = /* @__PURE__ */ o(({ forceKillAfterTimeout: e = !0 }) => {
1555
+ }, s);
1556
+ i.unref && i.unref();
1557
+ }, "setKillTimeout"), As = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Os(e) && t !== !1 && r, "shouldForceKill"), Os = /* @__PURE__ */ o(
1558
+ (e) => e === Ts.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), js = /* @__PURE__ */ o(({ forceKillAfterTimeout: e = !0 }) => {
1554
1559
  if (e === !0)
1555
- return vi;
1560
+ return Cs;
1556
1561
  if (!Number.isFinite(e) || e < 0)
1557
1562
  throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
1558
1563
  return e;
1559
- }, "getForceKillAfterTimeout"), Lr = /* @__PURE__ */ o((e, t) => {
1564
+ }, "getForceKillAfterTimeout"), Fr = /* @__PURE__ */ o((e, t) => {
1560
1565
  e.kill() && (t.isCanceled = !0);
1561
- }, "spawnedCancel"), Oi = /* @__PURE__ */ o((e, t, r) => {
1566
+ }, "spawnedCancel"), Rs = /* @__PURE__ */ o((e, t, r) => {
1562
1567
  e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
1563
- }, "timeoutKill"), Fr = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
1568
+ }, "timeoutKill"), Br = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
1564
1569
  if (t === 0 || t === void 0)
1565
1570
  return n;
1566
- let i, s = new Promise((c, u) => {
1567
- i = setTimeout(() => {
1568
- Oi(e, r, u);
1571
+ let s, i = new Promise((c, u) => {
1572
+ s = setTimeout(() => {
1573
+ Rs(e, r, u);
1569
1574
  }, t);
1570
1575
  }), a = n.finally(() => {
1571
- clearTimeout(i);
1576
+ clearTimeout(s);
1572
1577
  });
1573
- return Promise.race([s, a]);
1574
- }, "setupTimeout"), Br = /* @__PURE__ */ o(({ timeout: e }) => {
1578
+ return Promise.race([i, a]);
1579
+ }, "setupTimeout"), Gr = /* @__PURE__ */ o(({ timeout: e }) => {
1575
1580
  if (e !== void 0 && (!Number.isFinite(e) || e < 0))
1576
1581
  throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
1577
- }, "validateTimeout"), Gr = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
1582
+ }, "validateTimeout"), Ur = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
1578
1583
  if (!t || r)
1579
1584
  return n;
1580
- let i = _r(() => {
1585
+ let s = Mr(() => {
1581
1586
  e.kill();
1582
1587
  });
1583
1588
  return n.finally(() => {
1584
- i();
1589
+ s();
1585
1590
  });
1586
1591
  }, "setExitHandler");
1587
1592
 
1588
1593
  // node_modules/execa/lib/pipe.js
1589
- import { createWriteStream as ji } from "node:fs";
1590
- import { ChildProcess as Ri } from "node:child_process";
1594
+ import { createWriteStream as Ns } from "node:fs";
1595
+ import { ChildProcess as Ds } from "node:child_process";
1591
1596
 
1592
1597
  // node_modules/is-stream/index.js
1593
1598
  function oe(e) {
@@ -1600,56 +1605,56 @@ function ze(e) {
1600
1605
  o(ze, "isWritableStream");
1601
1606
 
1602
1607
  // node_modules/execa/lib/pipe.js
1603
- var Ni = /* @__PURE__ */ o((e) => e instanceof Ri && typeof e.then == "function", "isExecaChildProcess"), Ye = /* @__PURE__ */ o((e, t, r) => {
1608
+ var _s = /* @__PURE__ */ o((e) => e instanceof Ds && typeof e.then == "function", "isExecaChildProcess"), Ye = /* @__PURE__ */ o((e, t, r) => {
1604
1609
  if (typeof r == "string")
1605
- return e[t].pipe(ji(r)), e;
1610
+ return e[t].pipe(Ns(r)), e;
1606
1611
  if (ze(r))
1607
1612
  return e[t].pipe(r), e;
1608
- if (!Ni(r))
1613
+ if (!_s(r))
1609
1614
  throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
1610
1615
  if (!ze(r.stdin))
1611
1616
  throw new TypeError("The target child process's stdin must be available.");
1612
1617
  return e[t].pipe(r.stdin), r;
1613
- }, "pipeToTarget"), Ur = /* @__PURE__ */ o((e) => {
1618
+ }, "pipeToTarget"), $r = /* @__PURE__ */ o((e) => {
1614
1619
  e.stdout !== null && (e.pipeStdout = Ye.bind(void 0, e, "stdout")), e.stderr !== null && (e.pipeStderr = Ye.bind(void 0, e, "stderr")), e.
1615
1620
  all !== void 0 && (e.pipeAll = Ye.bind(void 0, e, "all"));
1616
1621
  }, "addPipeMethods");
1617
1622
 
1618
1623
  // node_modules/execa/lib/stream.js
1619
- import { createReadStream as Qi, readFileSync as Zi } from "node:fs";
1620
- import { setTimeout as es } from "node:timers/promises";
1624
+ import { createReadStream as ei, readFileSync as ti } from "node:fs";
1625
+ import { setTimeout as ri } from "node:timers/promises";
1621
1626
 
1622
1627
  // node_modules/get-stream/source/contents.js
1623
- var L = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, finalize: c }, {
1628
+ var L = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: s, addChunk: i, getFinalChunk: a, finalize: c }, {
1624
1629
  maxBuffer: u = Number.POSITIVE_INFINITY } = {}) => {
1625
- if (!_i(e))
1630
+ if (!Ls(e))
1626
1631
  throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
1627
1632
  let f = t();
1628
1633
  f.length = 0;
1629
1634
  try {
1630
1635
  for await (let l of e) {
1631
- let d = Mi(l), h = r[d](l, f);
1632
- Hr({ convertedChunk: h, state: f, getSize: n, truncateChunk: i, addChunk: s, maxBuffer: u });
1636
+ let d = Fs(l), h = r[d](l, f);
1637
+ Jr({ convertedChunk: h, state: f, getSize: n, truncateChunk: s, addChunk: i, maxBuffer: u });
1633
1638
  }
1634
- return Di({ state: f, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, maxBuffer: u }), c(f);
1639
+ return Ms({ state: f, convertChunk: r, getSize: n, truncateChunk: s, addChunk: i, getFinalChunk: a, maxBuffer: u }), c(f);
1635
1640
  } catch (l) {
1636
1641
  throw l.bufferedData = c(f), l;
1637
1642
  }
1638
- }, "getStreamContents"), Di = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: i, maxBuffer: s }) => {
1639
- let a = i(e);
1640
- a !== void 0 && Hr({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: s });
1641
- }, "appendFinalChunk"), Hr = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: i, maxBuffer: s }) => {
1643
+ }, "getStreamContents"), Ms = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: s, maxBuffer: i }) => {
1644
+ let a = s(e);
1645
+ a !== void 0 && Jr({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: i });
1646
+ }, "appendFinalChunk"), Jr = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: s, maxBuffer: i }) => {
1642
1647
  let a = r(e), c = t.length + a;
1643
- if (c <= s) {
1644
- $r(e, t, i, c);
1648
+ if (c <= i) {
1649
+ Wr(e, t, s, c);
1645
1650
  return;
1646
1651
  }
1647
- let u = n(e, s - t.length);
1648
- throw u !== void 0 && $r(u, t, i, s), new ie();
1649
- }, "appendChunk"), $r = /* @__PURE__ */ o((e, t, r, n) => {
1652
+ let u = n(e, i - t.length);
1653
+ throw u !== void 0 && Wr(u, t, s, i), new se();
1654
+ }, "appendChunk"), Wr = /* @__PURE__ */ o((e, t, r, n) => {
1650
1655
  t.contents = r(e, t, n), t.length = n;
1651
- }, "addNewChunk"), _i = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
1652
- cIterable"), Mi = /* @__PURE__ */ o((e) => {
1656
+ }, "addNewChunk"), Ls = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
1657
+ cIterable"), Fs = /* @__PURE__ */ o((e) => {
1653
1658
  let t = typeof e;
1654
1659
  if (t === "string")
1655
1660
  return "string";
@@ -1657,10 +1662,10 @@ cIterable"), Mi = /* @__PURE__ */ o((e) => {
1657
1662
  return "others";
1658
1663
  if (globalThis.Buffer?.isBuffer(e))
1659
1664
  return "buffer";
1660
- let r = Wr.call(e);
1665
+ let r = Hr.call(e);
1661
1666
  return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(e.byteLength) && Number.isInteger(
1662
- e.byteOffset) && Wr.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
1663
- }, "getChunkType"), { toString: Wr } = Object.prototype, ie = class extends Error {
1667
+ e.byteOffset) && Hr.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
1668
+ }, "getChunkType"), { toString: Hr } = Object.prototype, se = class extends Error {
1664
1669
  static {
1665
1670
  o(this, "MaxBufferError");
1666
1671
  }
@@ -1672,48 +1677,48 @@ cIterable"), Mi = /* @__PURE__ */ o((e) => {
1672
1677
 
1673
1678
  // node_modules/get-stream/source/utils.js
1674
1679
  var Ke = /* @__PURE__ */ o((e) => e, "identity"), Xe = /* @__PURE__ */ o(() => {
1675
- }, "noop"), Qe = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), se = /* @__PURE__ */ o((e) => {
1680
+ }, "noop"), Qe = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), ie = /* @__PURE__ */ o((e) => {
1676
1681
  throw new Error(`Streams in object mode are not supported: ${String(e)}`);
1677
1682
  }, "throwObjectStream"), ae = /* @__PURE__ */ o((e) => e.length, "getLengthProp");
1678
1683
 
1679
1684
  // node_modules/get-stream/source/array-buffer.js
1680
1685
  async function Ze(e, t) {
1681
- return L(e, Ji, t);
1686
+ return L(e, qs, t);
1682
1687
  }
1683
1688
  o(Ze, "getStreamAsArrayBuffer");
1684
- var Li = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Fi = /* @__PURE__ */ o((e) => Bi.encode(e), "useTex\
1685
- tEncoder"), Bi = new TextEncoder(), Jr = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), Vr = /* @__PURE__ */ o((e) => new Uint8Array(
1686
- e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), Gi = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
1687
- Ui = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
1688
- let i = Yr() ? Wi(t, n) : $i(t, n);
1689
- return new Uint8Array(i).set(e, r), i;
1690
- }, "addArrayBufferChunk"), $i = /* @__PURE__ */ o((e, t) => {
1689
+ var Bs = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Gs = /* @__PURE__ */ o((e) => Us.encode(e), "useTex\
1690
+ tEncoder"), Us = new TextEncoder(), Vr = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), qr = /* @__PURE__ */ o((e) => new Uint8Array(
1691
+ e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), $s = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
1692
+ Ws = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
1693
+ let s = Kr() ? Js(t, n) : Hs(t, n);
1694
+ return new Uint8Array(s).set(e, r), s;
1695
+ }, "addArrayBufferChunk"), Hs = /* @__PURE__ */ o((e, t) => {
1691
1696
  if (t <= e.byteLength)
1692
1697
  return e;
1693
- let r = new ArrayBuffer(zr(t));
1698
+ let r = new ArrayBuffer(Yr(t));
1694
1699
  return new Uint8Array(r).set(new Uint8Array(e), 0), r;
1695
- }, "resizeArrayBufferSlow"), Wi = /* @__PURE__ */ o((e, t) => {
1700
+ }, "resizeArrayBufferSlow"), Js = /* @__PURE__ */ o((e, t) => {
1696
1701
  if (t <= e.maxByteLength)
1697
1702
  return e.resize(t), e;
1698
- let r = new ArrayBuffer(t, { maxByteLength: zr(t) });
1703
+ let r = new ArrayBuffer(t, { maxByteLength: Yr(t) });
1699
1704
  return new Uint8Array(r).set(new Uint8Array(e), 0), r;
1700
- }, "resizeArrayBuffer"), zr = /* @__PURE__ */ o((e) => qr ** Math.ceil(Math.log(e) / Math.log(qr)), "getNewContentsLength"), qr = 2, Hi = /* @__PURE__ */ o(
1701
- ({ contents: e, length: t }) => Yr() ? e : e.slice(0, t), "finalizeArrayBuffer"), Yr = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
1702
- "hasArrayBufferResize"), Ji = {
1703
- init: Li,
1705
+ }, "resizeArrayBuffer"), Yr = /* @__PURE__ */ o((e) => zr ** Math.ceil(Math.log(e) / Math.log(zr)), "getNewContentsLength"), zr = 2, Vs = /* @__PURE__ */ o(
1706
+ ({ contents: e, length: t }) => Kr() ? e : e.slice(0, t), "finalizeArrayBuffer"), Kr = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
1707
+ "hasArrayBufferResize"), qs = {
1708
+ init: Bs,
1704
1709
  convertChunk: {
1705
- string: Fi,
1706
- buffer: Jr,
1707
- arrayBuffer: Jr,
1708
- dataView: Vr,
1709
- typedArray: Vr,
1710
- others: se
1710
+ string: Gs,
1711
+ buffer: Vr,
1712
+ arrayBuffer: Vr,
1713
+ dataView: qr,
1714
+ typedArray: qr,
1715
+ others: ie
1711
1716
  },
1712
1717
  getSize: ae,
1713
- truncateChunk: Gi,
1714
- addChunk: Ui,
1718
+ truncateChunk: $s,
1719
+ addChunk: Ws,
1715
1720
  getFinalChunk: Xe,
1716
- finalize: Hi
1721
+ finalize: Vs
1717
1722
  };
1718
1723
 
1719
1724
  // node_modules/get-stream/source/buffer.js
@@ -1721,64 +1726,64 @@ async function ce(e, t) {
1721
1726
  if (!("Buffer" in globalThis))
1722
1727
  throw new Error("getStreamAsBuffer() is only supported in Node.js");
1723
1728
  try {
1724
- return Kr(await Ze(e, t));
1729
+ return Xr(await Ze(e, t));
1725
1730
  } catch (r) {
1726
- throw r.bufferedData !== void 0 && (r.bufferedData = Kr(r.bufferedData)), r;
1731
+ throw r.bufferedData !== void 0 && (r.bufferedData = Xr(r.bufferedData)), r;
1727
1732
  }
1728
1733
  }
1729
1734
  o(ce, "getStreamAsBuffer");
1730
- var Kr = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
1735
+ var Xr = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
1731
1736
 
1732
1737
  // node_modules/get-stream/source/string.js
1733
1738
  async function et(e, t) {
1734
- return L(e, Ki, t);
1739
+ return L(e, Qs, t);
1735
1740
  }
1736
1741
  o(et, "getStreamAsString");
1737
- var Vi = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), ue = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
1738
- decode(e, { stream: !0 }), "useTextDecoder"), qi = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), zi = /* @__PURE__ */ o(
1739
- (e, t) => e.slice(0, t), "truncateStringChunk"), Yi = /* @__PURE__ */ o(({ textDecoder: e }) => {
1742
+ var zs = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), ue = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
1743
+ decode(e, { stream: !0 }), "useTextDecoder"), Ys = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), Ks = /* @__PURE__ */ o(
1744
+ (e, t) => e.slice(0, t), "truncateStringChunk"), Xs = /* @__PURE__ */ o(({ textDecoder: e }) => {
1740
1745
  let t = e.decode();
1741
1746
  return t === "" ? void 0 : t;
1742
- }, "getFinalStringChunk"), Ki = {
1743
- init: Vi,
1747
+ }, "getFinalStringChunk"), Qs = {
1748
+ init: zs,
1744
1749
  convertChunk: {
1745
1750
  string: Ke,
1746
1751
  buffer: ue,
1747
1752
  arrayBuffer: ue,
1748
1753
  dataView: ue,
1749
1754
  typedArray: ue,
1750
- others: se
1755
+ others: ie
1751
1756
  },
1752
1757
  getSize: ae,
1753
- truncateChunk: zi,
1754
- addChunk: qi,
1755
- getFinalChunk: Yi,
1758
+ truncateChunk: Ks,
1759
+ addChunk: Ys,
1760
+ getFinalChunk: Xs,
1756
1761
  finalize: Qe
1757
1762
  };
1758
1763
 
1759
1764
  // node_modules/execa/lib/stream.js
1760
- var Zr = A(Qr(), 1);
1761
- var en = /* @__PURE__ */ o((e) => {
1765
+ var en = A(Zr(), 1);
1766
+ var tn = /* @__PURE__ */ o((e) => {
1762
1767
  if (e !== void 0)
1763
1768
  throw new TypeError("The `input` and `inputFile` options cannot be both set.");
1764
- }, "validateInputOptions"), ts = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (en(e), Zi(t)), "getInputSync"),
1765
- tn = /* @__PURE__ */ o((e) => {
1766
- let t = ts(e);
1769
+ }, "validateInputOptions"), ni = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (tn(e), ti(t)), "getInputSync"),
1770
+ rn = /* @__PURE__ */ o((e) => {
1771
+ let t = ni(e);
1767
1772
  if (oe(t))
1768
1773
  throw new TypeError("The `input` option cannot be a stream in sync mode");
1769
1774
  return t;
1770
- }, "handleInputSync"), rs = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (en(e), Qi(t)), "getInput"), rn = /* @__PURE__ */ o(
1775
+ }, "handleInputSync"), oi = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (tn(e), ei(t)), "getInput"), nn = /* @__PURE__ */ o(
1771
1776
  (e, t) => {
1772
- let r = rs(t);
1777
+ let r = oi(t);
1773
1778
  r !== void 0 && (oe(r) ? r.pipe(e.stdin) : e.stdin.end(r));
1774
- }, "handleInput"), nn = /* @__PURE__ */ o((e, { all: t }) => {
1779
+ }, "handleInput"), on = /* @__PURE__ */ o((e, { all: t }) => {
1775
1780
  if (!t || !e.stdout && !e.stderr)
1776
1781
  return;
1777
- let r = (0, Zr.default)();
1782
+ let r = (0, en.default)();
1778
1783
  return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
1779
1784
  }, "makeAllStream"), tt = /* @__PURE__ */ o(async (e, t) => {
1780
1785
  if (!(!e || t === void 0)) {
1781
- await es(0), e.destroy();
1786
+ await ri(0), e.destroy();
1782
1787
  try {
1783
1788
  return await t;
1784
1789
  } catch (r) {
@@ -1787,11 +1792,11 @@ tn = /* @__PURE__ */ o((e) => {
1787
1792
  }
1788
1793
  }, "getBufferedData"), rt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
1789
1794
  if (!(!e || !r))
1790
- return t === "utf8" || t === "utf-8" ? et(e, { maxBuffer: n }) : t === null || t === "buffer" ? ce(e, { maxBuffer: n }) : ns(e, n, t);
1791
- }, "getStreamPromise"), ns = /* @__PURE__ */ o(async (e, t, r) => (await ce(e, { maxBuffer: t })).toString(r), "applyEncoding"), on = /* @__PURE__ */ o(
1792
- async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
1793
- let c = rt(e, { encoding: n, buffer: i, maxBuffer: s }), u = rt(t, { encoding: n, buffer: i, maxBuffer: s }), f = rt(r, { encoding: n, buffer: i,
1794
- maxBuffer: s * 2 });
1795
+ return t === "utf8" || t === "utf-8" ? et(e, { maxBuffer: n }) : t === null || t === "buffer" ? ce(e, { maxBuffer: n }) : si(e, n, t);
1796
+ }, "getStreamPromise"), si = /* @__PURE__ */ o(async (e, t, r) => (await ce(e, { maxBuffer: t })).toString(r), "applyEncoding"), sn = /* @__PURE__ */ o(
1797
+ async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: s, maxBuffer: i }, a) => {
1798
+ let c = rt(e, { encoding: n, buffer: s, maxBuffer: i }), u = rt(t, { encoding: n, buffer: s, maxBuffer: i }), f = rt(r, { encoding: n, buffer: s,
1799
+ maxBuffer: i * 2 });
1795
1800
  try {
1796
1801
  return await Promise.all([a, c, u, f]);
1797
1802
  } catch (l) {
@@ -1805,18 +1810,18 @@ async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s
1805
1810
  }, "getSpawnedResult");
1806
1811
 
1807
1812
  // node_modules/execa/lib/promise.js
1808
- var os = (async () => {
1809
- })().constructor.prototype, is = ["then", "catch", "finally"].map((e) => [
1813
+ var ii = (async () => {
1814
+ })().constructor.prototype, ai = ["then", "catch", "finally"].map((e) => [
1810
1815
  e,
1811
- Reflect.getOwnPropertyDescriptor(os, e)
1816
+ Reflect.getOwnPropertyDescriptor(ii, e)
1812
1817
  ]), nt = /* @__PURE__ */ o((e, t) => {
1813
- for (let [r, n] of is) {
1814
- let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
1815
- Reflect.defineProperty(e, r, { ...n, value: i });
1818
+ for (let [r, n] of ai) {
1819
+ let s = typeof t == "function" ? (...i) => Reflect.apply(n.value, t(), i) : n.value.bind(t);
1820
+ Reflect.defineProperty(e, r, { ...n, value: s });
1816
1821
  }
1817
- }, "mergePromise"), sn = /* @__PURE__ */ o((e) => new Promise((t, r) => {
1818
- e.on("exit", (n, i) => {
1819
- t({ exitCode: n, signal: i });
1822
+ }, "mergePromise"), an = /* @__PURE__ */ o((e) => new Promise((t, r) => {
1823
+ e.on("exit", (n, s) => {
1824
+ t({ exitCode: n, signal: s });
1820
1825
  }), e.on("error", (n) => {
1821
1826
  r(n);
1822
1827
  }), e.stdin && e.stdin.on("error", (n) => {
@@ -1825,76 +1830,76 @@ var os = (async () => {
1825
1830
  }), "getSpawnedPromise");
1826
1831
 
1827
1832
  // node_modules/execa/lib/command.js
1828
- import { Buffer as ss } from "node:buffer";
1829
- import { ChildProcess as as } from "node:child_process";
1830
- var un = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), cs = /^[\w.-]+$/, us = /* @__PURE__ */ o((e) => typeof e !=
1831
- "string" || cs.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), ot = /* @__PURE__ */ o((e, t) => un(e, t).join(" "), "joinComman\
1832
- d"), it = /* @__PURE__ */ o((e, t) => un(e, t).map((r) => us(r)).join(" "), "getEscapedCommand"), fn = / +/g, ln = /* @__PURE__ */ o((e) => {
1833
+ import { Buffer as ci } from "node:buffer";
1834
+ import { ChildProcess as ui } from "node:child_process";
1835
+ var fn = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), fi = /^[\w.-]+$/, li = /* @__PURE__ */ o((e) => typeof e !=
1836
+ "string" || fi.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), ot = /* @__PURE__ */ o((e, t) => fn(e, t).join(" "), "joinComman\
1837
+ d"), st = /* @__PURE__ */ o((e, t) => fn(e, t).map((r) => li(r)).join(" "), "getEscapedCommand"), ln = / +/g, pn = /* @__PURE__ */ o((e) => {
1833
1838
  let t = [];
1834
- for (let r of e.trim().split(fn)) {
1839
+ for (let r of e.trim().split(ln)) {
1835
1840
  let n = t.at(-1);
1836
1841
  n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
1837
1842
  }
1838
1843
  return t;
1839
- }, "parseCommand"), an = /* @__PURE__ */ o((e) => {
1844
+ }, "parseCommand"), cn = /* @__PURE__ */ o((e) => {
1840
1845
  let t = typeof e;
1841
1846
  if (t === "string")
1842
1847
  return e;
1843
1848
  if (t === "number")
1844
1849
  return String(e);
1845
- if (t === "object" && e !== null && !(e instanceof as) && "stdout" in e) {
1850
+ if (t === "object" && e !== null && !(e instanceof ui) && "stdout" in e) {
1846
1851
  let r = typeof e.stdout;
1847
1852
  if (r === "string")
1848
1853
  return e.stdout;
1849
- if (ss.isBuffer(e.stdout))
1854
+ if (ci.isBuffer(e.stdout))
1850
1855
  return e.stdout.toString();
1851
1856
  throw new TypeError(`Unexpected "${r}" stdout in template expression`);
1852
1857
  }
1853
1858
  throw new TypeError(`Unexpected "${t}" in template expression`);
1854
- }, "parseExpression"), cn = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
1859
+ }, "parseExpression"), un = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
1855
1860
  ...e.slice(0, -1),
1856
1861
  `${e.at(-1)}${t[0]}`,
1857
1862
  ...t.slice(1)
1858
- ], "concatTokens"), fs = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: i }) => {
1859
- let s = i ?? e.raw[n], a = s.split(fn).filter(Boolean), c = cn(
1863
+ ], "concatTokens"), pi = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: s }) => {
1864
+ let i = s ?? e.raw[n], a = i.split(ln).filter(Boolean), c = un(
1860
1865
  r,
1861
1866
  a,
1862
- s.startsWith(" ")
1867
+ i.startsWith(" ")
1863
1868
  );
1864
1869
  if (n === t.length)
1865
1870
  return c;
1866
- let u = t[n], f = Array.isArray(u) ? u.map((l) => an(l)) : [an(u)];
1867
- return cn(
1871
+ let u = t[n], f = Array.isArray(u) ? u.map((l) => cn(l)) : [cn(u)];
1872
+ return un(
1868
1873
  c,
1869
1874
  f,
1870
- s.endsWith(" ")
1875
+ i.endsWith(" ")
1871
1876
  );
1872
- }, "parseTemplate"), st = /* @__PURE__ */ o((e, t) => {
1877
+ }, "parseTemplate"), it = /* @__PURE__ */ o((e, t) => {
1873
1878
  let r = [];
1874
- for (let [n, i] of e.entries())
1875
- r = fs({ templates: e, expressions: t, tokens: r, index: n, template: i });
1879
+ for (let [n, s] of e.entries())
1880
+ r = pi({ templates: e, expressions: t, tokens: r, index: n, template: s });
1876
1881
  return r;
1877
1882
  }, "parseTemplates");
1878
1883
 
1879
1884
  // node_modules/execa/lib/verbose.js
1880
- import { debuglog as ls } from "node:util";
1881
- import ps from "node:process";
1882
- var pn = ls("execa").enabled, fe = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), ms = /* @__PURE__ */ o(() => {
1885
+ import { debuglog as mi } from "node:util";
1886
+ import di from "node:process";
1887
+ var mn = mi("execa").enabled, fe = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), yi = /* @__PURE__ */ o(() => {
1883
1888
  let e = /* @__PURE__ */ new Date();
1884
1889
  return `${fe(e.getHours(), 2)}:${fe(e.getMinutes(), 2)}:${fe(e.getSeconds(), 2)}.${fe(e.getMilliseconds(), 3)}`;
1885
1890
  }, "getTimestamp"), at = /* @__PURE__ */ o((e, { verbose: t }) => {
1886
- t && ps.stderr.write(`[${ms()}] ${e}
1891
+ t && di.stderr.write(`[${yi()}] ${e}
1887
1892
  `);
1888
1893
  }, "logCommand");
1889
1894
 
1890
1895
  // node_modules/execa/index.js
1891
- var hs = 1e3 * 1e3 * 100, gs = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
1892
- let s = t ? { ...le.env, ...e } : e;
1893
- return r ? Cr({ env: s, cwd: n, execPath: i }) : s;
1894
- }, "getEnv"), yn = /* @__PURE__ */ o((e, t, r = {}) => {
1895
- let n = dn.default._parse(e, t, r);
1896
+ var bi = 1e3 * 1e3 * 100, xi = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: s }) => {
1897
+ let i = t ? { ...le.env, ...e } : e;
1898
+ return r ? Ir({ env: i, cwd: n, execPath: s }) : i;
1899
+ }, "getEnv"), hn = /* @__PURE__ */ o((e, t, r = {}) => {
1900
+ let n = yn.default._parse(e, t, r);
1896
1901
  return e = n.command, t = n.args, r = n.options, r = {
1897
- maxBuffer: hs,
1902
+ maxBuffer: bi,
1898
1903
  buffer: !0,
1899
1904
  stripFinalNewline: !0,
1900
1905
  extendEnv: !0,
@@ -1906,15 +1911,15 @@ var hs = 1e3 * 1e3 * 100, gs = /* @__PURE__ */ o(({ env: e, extendEnv: t, prefer
1906
1911
  cleanup: !0,
1907
1912
  all: !1,
1908
1913
  windowsHide: !0,
1909
- verbose: pn,
1914
+ verbose: mn,
1910
1915
  ...r
1911
- }, r.env = gs(r), r.stdio = Dr(r), le.platform === "win32" && ys.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r,
1916
+ }, r.env = xi(r), r.stdio = _r(r), le.platform === "win32" && gi.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r,
1912
1917
  parsed: n };
1913
- }, "handleArguments"), F = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !ds.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
1918
+ }, "handleArguments"), F = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !hi.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
1914
1919
  Fe(t) : t, "handleOutput");
1915
- function hn(e, t, r) {
1916
- let n = yn(e, t, r), i = ot(e, t), s = it(e, t);
1917
- at(s, n.options), Br(n.options);
1920
+ function gn(e, t, r) {
1921
+ let n = hn(e, t, r), s = ot(e, t), i = st(e, t);
1922
+ at(i, n.options), Gr(n.options);
1918
1923
  let a;
1919
1924
  try {
1920
1925
  a = ct.spawn(n.file, n.args, n.options);
@@ -1924,8 +1929,8 @@ function hn(e, t, r) {
1924
1929
  stdout: "",
1925
1930
  stderr: "",
1926
1931
  all: "",
1927
- command: i,
1928
- escapedCommand: s,
1932
+ command: s,
1933
+ escapedCommand: i,
1929
1934
  parsed: n,
1930
1935
  timedOut: !1,
1931
1936
  isCanceled: !1,
@@ -1933,33 +1938,33 @@ function hn(e, t, r) {
1933
1938
  }));
1934
1939
  return nt(g, m), g;
1935
1940
  }
1936
- let c = sn(a), u = Fr(a, n.options, c), f = Gr(a, n.options, u), l = { isCanceled: !1 };
1937
- a.kill = Mr.bind(null, a.kill.bind(a)), a.cancel = Lr.bind(null, a, l);
1938
- let h = Ar(/* @__PURE__ */ o(async () => {
1939
- let [{ error: y, exitCode: g, signal: m, timedOut: b }, C, k, I] = await on(a, n.options, f), W = F(n.options, C), H = F(n.options, k), p = F(
1941
+ let c = an(a), u = Br(a, n.options, c), f = Ur(a, n.options, u), l = { isCanceled: !1 };
1942
+ a.kill = Lr.bind(null, a.kill.bind(a)), a.cancel = Fr.bind(null, a, l);
1943
+ let h = Or(/* @__PURE__ */ o(async () => {
1944
+ let [{ error: y, exitCode: g, signal: m, timedOut: b }, C, k, I] = await sn(a, n.options, f), W = F(n.options, C), H = F(n.options, k), p = F(
1940
1945
  n.options, I);
1941
1946
  if (y || g !== 0 || m !== null) {
1942
- let w = M({
1947
+ let S = M({
1943
1948
  error: y,
1944
1949
  exitCode: g,
1945
1950
  signal: m,
1946
1951
  stdout: W,
1947
1952
  stderr: H,
1948
1953
  all: p,
1949
- command: i,
1950
- escapedCommand: s,
1954
+ command: s,
1955
+ escapedCommand: i,
1951
1956
  parsed: n,
1952
1957
  timedOut: b,
1953
1958
  isCanceled: l.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
1954
1959
  killed: a.killed
1955
1960
  });
1956
1961
  if (!n.options.reject)
1957
- return w;
1958
- throw w;
1962
+ return S;
1963
+ throw S;
1959
1964
  }
1960
1965
  return {
1961
- command: i,
1962
- escapedCommand: s,
1966
+ command: s,
1967
+ escapedCommand: i,
1963
1968
  exitCode: 0,
1964
1969
  stdout: W,
1965
1970
  stderr: H,
@@ -1970,13 +1975,13 @@ function hn(e, t, r) {
1970
1975
  killed: !1
1971
1976
  };
1972
1977
  }, "handlePromise"));
1973
- return rn(a, n.options), a.all = nn(a, n.options), Ur(a), nt(a, h), a;
1978
+ return nn(a, n.options), a.all = on(a, n.options), $r(a), nt(a, h), a;
1974
1979
  }
1975
- o(hn, "execa");
1976
- function bs(e, t, r) {
1977
- let n = yn(e, t, r), i = ot(e, t), s = it(e, t);
1978
- at(s, n.options);
1979
- let a = tn(n.options), c;
1980
+ o(gn, "execa");
1981
+ function Si(e, t, r) {
1982
+ let n = hn(e, t, r), s = ot(e, t), i = st(e, t);
1983
+ at(i, n.options);
1984
+ let a = rn(n.options), c;
1980
1985
  try {
1981
1986
  c = ct.spawnSync(n.file, n.args, { ...n.options, input: a });
1982
1987
  } catch (l) {
@@ -1985,8 +1990,8 @@ function bs(e, t, r) {
1985
1990
  stdout: "",
1986
1991
  stderr: "",
1987
1992
  all: "",
1988
- command: i,
1989
- escapedCommand: s,
1993
+ command: s,
1994
+ escapedCommand: i,
1990
1995
  parsed: n,
1991
1996
  timedOut: !1,
1992
1997
  isCanceled: !1,
@@ -2001,8 +2006,8 @@ function bs(e, t, r) {
2001
2006
  error: c.error,
2002
2007
  signal: c.signal,
2003
2008
  exitCode: c.status,
2004
- command: i,
2005
- escapedCommand: s,
2009
+ command: s,
2010
+ escapedCommand: i,
2006
2011
  parsed: n,
2007
2012
  timedOut: c.error && c.error.code === "ETIMEDOUT",
2008
2013
  isCanceled: !1,
@@ -2013,8 +2018,8 @@ function bs(e, t, r) {
2013
2018
  throw l;
2014
2019
  }
2015
2020
  return {
2016
- command: i,
2017
- escapedCommand: s,
2021
+ command: s,
2022
+ escapedCommand: i,
2018
2023
  exitCode: 0,
2019
2024
  stdout: u,
2020
2025
  stderr: f,
@@ -2024,59 +2029,59 @@ function bs(e, t, r) {
2024
2029
  killed: !1
2025
2030
  };
2026
2031
  }
2027
- o(bs, "execaSync");
2028
- var xs = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
2029
- "normalizeScriptStdin"), mn = /* @__PURE__ */ o((e = {}) => ({
2032
+ o(Si, "execaSync");
2033
+ var wi = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
2034
+ "normalizeScriptStdin"), dn = /* @__PURE__ */ o((e = {}) => ({
2030
2035
  preferLocal: !0,
2031
- ...xs(e),
2036
+ ...wi(e),
2032
2037
  ...e
2033
2038
  }), "normalizeScriptOptions");
2034
- function gn(e) {
2039
+ function bn(e) {
2035
2040
  function t(r, ...n) {
2036
2041
  if (!Array.isArray(r))
2037
- return gn({ ...e, ...r });
2038
- let [i, ...s] = st(r, n);
2039
- return hn(i, s, mn(e));
2042
+ return bn({ ...e, ...r });
2043
+ let [s, ...i] = it(r, n);
2044
+ return gn(s, i, dn(e));
2040
2045
  }
2041
2046
  return o(t, "$"), t.sync = (r, ...n) => {
2042
2047
  if (!Array.isArray(r))
2043
2048
  throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
2044
- let [i, ...s] = st(r, n);
2045
- return bs(i, s, mn(e));
2049
+ let [s, ...i] = it(r, n);
2050
+ return Si(s, i, dn(e));
2046
2051
  }, t;
2047
2052
  }
2048
- o(gn, "create$");
2049
- var Bf = gn();
2050
- function bn(e, t) {
2051
- let [r, ...n] = ln(e);
2052
- return hn(r, n, t);
2053
+ o(bn, "create$");
2054
+ var Uf = bn();
2055
+ function xn(e, t) {
2056
+ let [r, ...n] = pn(e);
2057
+ return gn(r, n, t);
2053
2058
  }
2054
- o(bn, "execaCommand");
2059
+ o(xn, "execaCommand");
2055
2060
 
2056
2061
  // src/telemetry/exec-command-count-lines.ts
2057
2062
  async function pe(e, t) {
2058
- let r = bn(e, { shell: !0, buffer: !1, ...t });
2063
+ let r = xn(e, { shell: !0, buffer: !1, ...t });
2059
2064
  if (!r.stdout)
2060
2065
  throw new Error("Unexpected missing stdout");
2061
- let n = 0, i = ws(r.stdout);
2062
- return i.on("line", () => {
2066
+ let n = 0, s = ki(r.stdout);
2067
+ return s.on("line", () => {
2063
2068
  n += 1;
2064
- }), await r, i.close(), n;
2069
+ }), await r, s.close(), n;
2065
2070
  }
2066
2071
  o(pe, "execCommandCountLines");
2067
2072
 
2068
2073
  // src/common/utils/file-cache.ts
2069
- import { createHash as wn, randomBytes as Ss } from "node:crypto";
2070
- import { mkdirSync as ft, readFileSync as ks, readdirSync as Es, rmSync as Sn, writeFileSync as Ps } from "node:fs";
2071
- import { readFile as kn, readdir as En, rm as Pn, writeFile as vs } from "node:fs/promises";
2072
- import { tmpdir as Ts } from "node:os";
2074
+ import { createHash as wn, randomBytes as Ei } from "node:crypto";
2075
+ import { mkdirSync as ft, readFileSync as Pi, readdirSync as vi, rmSync as kn, writeFileSync as Ti } from "node:fs";
2076
+ import { readFile as En, readdir as Pn, rm as vn, writeFile as Ci } from "node:fs/promises";
2077
+ import { tmpdir as Ii } from "node:os";
2073
2078
  import { join as B } from "node:path";
2074
2079
  var me = class {
2075
2080
  static {
2076
2081
  o(this, "FileSystemCache");
2077
2082
  }
2078
2083
  constructor(t = {}) {
2079
- this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || B(Ts(), Ss(15).toString(
2084
+ this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || B(Ii(), Ei(15).toString(
2080
2085
  "base64").replace(/\//g, "-")), this.ttl = t.ttl || 0, wn(this.hash_alg), ft(this.cache_dir, { recursive: !0 });
2081
2086
  }
2082
2087
  generateHash(t) {
@@ -2090,12 +2095,12 @@ var me = class {
2090
2095
  return this.isExpired(n, Date.now()) ? r : n.content;
2091
2096
  }
2092
2097
  parseSetData(t, r, n = {}) {
2093
- let i = n.ttl ?? this.ttl;
2094
- return JSON.stringify({ key: t, content: r, ...i && { ttl: Date.now() + i * 1e3 } });
2098
+ let s = n.ttl ?? this.ttl;
2099
+ return JSON.stringify({ key: t, content: r, ...s && { ttl: Date.now() + s * 1e3 } });
2095
2100
  }
2096
2101
  async get(t, r) {
2097
2102
  try {
2098
- let n = await kn(this.generateHash(t), "utf8");
2103
+ let n = await En(this.generateHash(t), "utf8");
2099
2104
  return this.parseCacheData(n, r);
2100
2105
  } catch {
2101
2106
  return r;
@@ -2103,22 +2108,22 @@ var me = class {
2103
2108
  }
2104
2109
  getSync(t, r) {
2105
2110
  try {
2106
- let n = ks(this.generateHash(t), "utf8");
2111
+ let n = Pi(this.generateHash(t), "utf8");
2107
2112
  return this.parseCacheData(n, r);
2108
2113
  } catch {
2109
2114
  return r;
2110
2115
  }
2111
2116
  }
2112
2117
  async set(t, r, n = {}) {
2113
- let i = typeof n == "number" ? { ttl: n } : n;
2114
- ft(this.cache_dir, { recursive: !0 }), await vs(this.generateHash(t), this.parseSetData(t, r, i), {
2115
- encoding: i.encoding || "utf8"
2118
+ let s = typeof n == "number" ? { ttl: n } : n;
2119
+ ft(this.cache_dir, { recursive: !0 }), await Ci(this.generateHash(t), this.parseSetData(t, r, s), {
2120
+ encoding: s.encoding || "utf8"
2116
2121
  });
2117
2122
  }
2118
2123
  setSync(t, r, n = {}) {
2119
- let i = typeof n == "number" ? { ttl: n } : n;
2120
- ft(this.cache_dir, { recursive: !0 }), Ps(this.generateHash(t), this.parseSetData(t, r, i), {
2121
- encoding: i.encoding || "utf8"
2124
+ let s = typeof n == "number" ? { ttl: n } : n;
2125
+ ft(this.cache_dir, { recursive: !0 }), Ti(this.generateHash(t), this.parseSetData(t, r, s), {
2126
+ encoding: s.encoding || "utf8"
2122
2127
  });
2123
2128
  }
2124
2129
  async setMany(t, r) {
@@ -2128,25 +2133,25 @@ var me = class {
2128
2133
  t.forEach((n) => this.setSync(n.key, n.content ?? n.value, r));
2129
2134
  }
2130
2135
  async remove(t) {
2131
- await Pn(this.generateHash(t), { force: !0 });
2136
+ await vn(this.generateHash(t), { force: !0 });
2132
2137
  }
2133
2138
  removeSync(t) {
2134
- Sn(this.generateHash(t), { force: !0 });
2139
+ kn(this.generateHash(t), { force: !0 });
2135
2140
  }
2136
2141
  async clear() {
2137
- let t = await En(this.cache_dir);
2142
+ let t = await Pn(this.cache_dir);
2138
2143
  await Promise.all(
2139
- t.filter((r) => r.startsWith(this.prefix)).map((r) => Pn(B(this.cache_dir, r), { force: !0 }))
2144
+ t.filter((r) => r.startsWith(this.prefix)).map((r) => vn(B(this.cache_dir, r), { force: !0 }))
2140
2145
  );
2141
2146
  }
2142
2147
  clearSync() {
2143
- Es(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => Sn(B(this.cache_dir, t), { force: !0 }));
2148
+ vi(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => kn(B(this.cache_dir, t), { force: !0 }));
2144
2149
  }
2145
2150
  async getAll() {
2146
- let t = Date.now(), r = await En(this.cache_dir);
2151
+ let t = Date.now(), r = await Pn(this.cache_dir);
2147
2152
  return (await Promise.all(
2148
- r.filter((i) => i.startsWith(this.prefix)).map((i) => kn(B(this.cache_dir, i), "utf8"))
2149
- )).map((i) => JSON.parse(i)).filter((i) => i.content && !this.isExpired(i, t));
2153
+ r.filter((s) => s.startsWith(this.prefix)).map((s) => En(B(this.cache_dir, s), "utf8"))
2154
+ )).map((s) => JSON.parse(s)).filter((s) => s.content && !this.isExpired(s, t));
2150
2155
  }
2151
2156
  async load() {
2152
2157
  return {
@@ -2164,64 +2169,64 @@ function lt(e) {
2164
2169
  o(lt, "createFileSystemCache");
2165
2170
 
2166
2171
  // src/common/utils/resolve-path-in-sb-cache.ts
2167
- import { join as Dn } from "node:path";
2172
+ import { join as _n } from "node:path";
2168
2173
 
2169
2174
  // node_modules/find-cache-dir/index.js
2170
- var Nn = A(Tn(), 1);
2171
- import Gs from "node:process";
2175
+ var Dn = A(Cn(), 1);
2176
+ import $i from "node:process";
2172
2177
  import G from "node:path";
2173
2178
  import ye from "node:fs";
2174
2179
 
2175
2180
  // ../node_modules/pkg-dir/index.js
2176
- import Bs from "node:path";
2181
+ import Ui from "node:path";
2177
2182
 
2178
2183
  // ../node_modules/pkg-dir/node_modules/find-up/index.js
2179
2184
  import de from "node:path";
2180
- import { fileURLToPath as _s } from "node:url";
2185
+ import { fileURLToPath as Li } from "node:url";
2181
2186
 
2182
2187
  // ../node_modules/locate-path/index.js
2183
- import As from "node:process";
2184
- import Os from "node:path";
2185
- import Cn, { promises as ml } from "node:fs";
2186
- import { fileURLToPath as js } from "node:url";
2187
- var In = {
2188
+ import ji from "node:process";
2189
+ import Ri from "node:path";
2190
+ import In, { promises as yl } from "node:fs";
2191
+ import { fileURLToPath as Ni } from "node:url";
2192
+ var An = {
2188
2193
  directory: "isDirectory",
2189
2194
  file: "isFile"
2190
2195
  };
2191
- function Rs(e) {
2192
- if (!Object.hasOwnProperty.call(In, e))
2196
+ function Di(e) {
2197
+ if (!Object.hasOwnProperty.call(An, e))
2193
2198
  throw new Error(`Invalid type specified: ${e}`);
2194
2199
  }
2195
- o(Rs, "checkType");
2196
- var Ns = /* @__PURE__ */ o((e, t) => t[In[e]](), "matchType"), Ds = /* @__PURE__ */ o((e) => e instanceof URL ? js(e) : e, "toPath");
2200
+ o(Di, "checkType");
2201
+ var _i = /* @__PURE__ */ o((e, t) => t[An[e]](), "matchType"), Mi = /* @__PURE__ */ o((e) => e instanceof URL ? Ni(e) : e, "toPath");
2197
2202
  function pt(e, {
2198
- cwd: t = As.cwd(),
2203
+ cwd: t = ji.cwd(),
2199
2204
  type: r = "file",
2200
2205
  allowSymlinks: n = !0
2201
2206
  } = {}) {
2202
- Rs(r), t = Ds(t);
2203
- let i = n ? Cn.statSync : Cn.lstatSync;
2204
- for (let s of e)
2207
+ Di(r), t = Mi(t);
2208
+ let s = n ? In.statSync : In.lstatSync;
2209
+ for (let i of e)
2205
2210
  try {
2206
- let a = i(Os.resolve(t, s), {
2211
+ let a = s(Ri.resolve(t, i), {
2207
2212
  throwIfNoEntry: !1
2208
2213
  });
2209
2214
  if (!a)
2210
2215
  continue;
2211
- if (Ns(r, a))
2212
- return s;
2216
+ if (_i(r, a))
2217
+ return i;
2213
2218
  } catch {
2214
2219
  }
2215
2220
  }
2216
2221
  o(pt, "locatePathSync");
2217
2222
 
2218
2223
  // ../node_modules/pkg-dir/node_modules/path-exists/index.js
2219
- import xl, { promises as wl } from "node:fs";
2224
+ import wl, { promises as kl } from "node:fs";
2220
2225
 
2221
2226
  // ../node_modules/pkg-dir/node_modules/find-up/index.js
2222
- var Ms = /* @__PURE__ */ o((e) => e instanceof URL ? _s(e) : e, "toPath"), Ls = Symbol("findUpStop");
2223
- function Fs(e, t = {}) {
2224
- let r = de.resolve(Ms(t.cwd) || ""), { root: n } = de.parse(r), i = t.stopAt || n, s = t.limit || Number.POSITIVE_INFINITY, a = [e].flat(),
2227
+ var Fi = /* @__PURE__ */ o((e) => e instanceof URL ? Li(e) : e, "toPath"), Bi = Symbol("findUpStop");
2228
+ function Gi(e, t = {}) {
2229
+ let r = de.resolve(Fi(t.cwd) || ""), { root: n } = de.parse(r), s = t.stopAt || n, i = t.limit || Number.POSITIVE_INFINITY, a = [e].flat(),
2225
2230
  c = /* @__PURE__ */ o((f) => {
2226
2231
  if (typeof e != "function")
2227
2232
  return pt(a, f);
@@ -2230,82 +2235,82 @@ function Fs(e, t = {}) {
2230
2235
  }, "runMatcher"), u = [];
2231
2236
  for (; ; ) {
2232
2237
  let f = c({ ...t, cwd: r });
2233
- if (f === Ls || (f && u.push(de.resolve(r, f)), r === i || u.length >= s))
2238
+ if (f === Bi || (f && u.push(de.resolve(r, f)), r === s || u.length >= i))
2234
2239
  break;
2235
2240
  r = de.dirname(r);
2236
2241
  }
2237
2242
  return u;
2238
2243
  }
2239
- o(Fs, "findUpMultipleSync");
2240
- function An(e, t = {}) {
2241
- return Fs(e, { ...t, limit: 1 })[0];
2244
+ o(Gi, "findUpMultipleSync");
2245
+ function On(e, t = {}) {
2246
+ return Gi(e, { ...t, limit: 1 })[0];
2242
2247
  }
2243
- o(An, "findUpSync");
2248
+ o(On, "findUpSync");
2244
2249
 
2245
2250
  // ../node_modules/pkg-dir/index.js
2246
- function On({ cwd: e } = {}) {
2247
- let t = An("package.json", { cwd: e });
2248
- return t && Bs.dirname(t);
2251
+ function jn({ cwd: e } = {}) {
2252
+ let t = On("package.json", { cwd: e });
2253
+ return t && Ui.dirname(t);
2249
2254
  }
2250
- o(On, "packageDirectorySync");
2255
+ o(jn, "packageDirectorySync");
2251
2256
 
2252
2257
  // node_modules/find-cache-dir/index.js
2253
- var { env: mt, cwd: Us } = Gs, jn = /* @__PURE__ */ o((e) => {
2258
+ var { env: mt, cwd: Wi } = $i, Rn = /* @__PURE__ */ o((e) => {
2254
2259
  try {
2255
2260
  return ye.accessSync(e, ye.constants.W_OK), !0;
2256
2261
  } catch {
2257
2262
  return !1;
2258
2263
  }
2259
2264
  }, "isWritable");
2260
- function Rn(e, t) {
2265
+ function Nn(e, t) {
2261
2266
  return t.create && ye.mkdirSync(e, { recursive: !0 }), e;
2262
2267
  }
2263
- o(Rn, "useDirectory");
2264
- function $s(e) {
2268
+ o(Nn, "useDirectory");
2269
+ function Hi(e) {
2265
2270
  let t = G.join(e, "node_modules");
2266
- if (!(!jn(t) && (ye.existsSync(t) || !jn(G.join(e)))))
2271
+ if (!(!Rn(t) && (ye.existsSync(t) || !Rn(G.join(e)))))
2267
2272
  return t;
2268
2273
  }
2269
- o($s, "getNodeModuleDirectory");
2274
+ o(Hi, "getNodeModuleDirectory");
2270
2275
  function dt(e = {}) {
2271
2276
  if (mt.CACHE_DIR && !["true", "false", "1", "0"].includes(mt.CACHE_DIR))
2272
- return Rn(G.join(mt.CACHE_DIR, e.name), e);
2273
- let { cwd: t = Us(), files: r } = e;
2277
+ return Nn(G.join(mt.CACHE_DIR, e.name), e);
2278
+ let { cwd: t = Wi(), files: r } = e;
2274
2279
  if (r) {
2275
2280
  if (!Array.isArray(r))
2276
2281
  throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
2277
- t = (0, Nn.default)(r.map((i) => G.resolve(t, i)));
2282
+ t = (0, Dn.default)(r.map((s) => G.resolve(t, s)));
2278
2283
  }
2279
- if (t = On({ cwd: t }), !(!t || !$s(t)))
2280
- return Rn(G.join(t, "node_modules", ".cache", e.name), e);
2284
+ if (t = jn({ cwd: t }), !(!t || !Hi(t)))
2285
+ return Nn(G.join(t, "node_modules", ".cache", e.name), e);
2281
2286
  }
2282
2287
  o(dt, "findCacheDirectory");
2283
2288
 
2284
2289
  // src/common/utils/resolve-path-in-sb-cache.ts
2285
- function _n(e, t = "default") {
2290
+ function Mn(e, t = "default") {
2286
2291
  let r = dt({ name: "storybook" });
2287
- return r ||= Dn(process.cwd(), "node_modules", ".cache", "storybook"), Dn(r, t, e);
2292
+ return r ||= _n(process.cwd(), "node_modules", ".cache", "storybook"), _n(r, t, e);
2288
2293
  }
2289
- o(_n, "resolvePathInStorybookCache");
2294
+ o(Mn, "resolvePathInStorybookCache");
2290
2295
 
2291
2296
  // src/telemetry/run-telemetry-operation.ts
2292
- var Mn = lt({
2293
- basePath: _n("telemetry"),
2297
+ var Ln = lt({
2298
+ basePath: Mn("telemetry"),
2294
2299
  ns: "storybook",
2295
2300
  ttl: 24 * 60 * 60 * 1e3
2296
2301
  // 24h
2297
2302
  }), he = /* @__PURE__ */ o(async (e, t) => {
2298
- let r = await Mn.get(e);
2299
- return r === void 0 && (r = await t(), r !== void 0 && await Mn.set(e, r)), r;
2303
+ let r = await Ln.get(e);
2304
+ return r === void 0 && (r = await t(), r !== void 0 && await Ln.set(e, r)), r;
2300
2305
  }, "runTelemetryOperation");
2301
2306
 
2302
2307
  // src/telemetry/get-application-file-count.ts
2303
- var Hs = ["page", "screen"], Js = ["js", "jsx", "ts", "tsx"], Vs = /* @__PURE__ */ o(async (e) => {
2304
- let r = Hs.flatMap((n) => [
2308
+ var Vi = ["page", "screen"], qi = ["js", "jsx", "ts", "tsx"], zi = /* @__PURE__ */ o(async (e) => {
2309
+ let r = Vi.flatMap((n) => [
2305
2310
  n,
2306
2311
  [n[0].toUpperCase(), ...n.slice(1)].join("")
2307
2312
  ]).flatMap(
2308
- (n) => Js.map((i) => `"${e}${Ws}*${n}*.${i}"`)
2313
+ (n) => qi.map((s) => `"${e}${Ji}*${n}*.${s}"`)
2309
2314
  );
2310
2315
  try {
2311
2316
  let n = `git ls-files -- ${r.join(" ")}`;
@@ -2313,25 +2318,25 @@ var Hs = ["page", "screen"], Js = ["js", "jsx", "ts", "tsx"], Vs = /* @__PURE__
2313
2318
  } catch {
2314
2319
  return;
2315
2320
  }
2316
- }, "getApplicationFilesCountUncached"), Ln = /* @__PURE__ */ o(async (e) => he(
2321
+ }, "getApplicationFilesCountUncached"), Fn = /* @__PURE__ */ o(async (e) => he(
2317
2322
  "applicationFiles",
2318
- async () => Vs(e)
2323
+ async () => zi(e)
2319
2324
  ), "getApplicationFileCount");
2320
2325
 
2321
2326
  // src/telemetry/get-chromatic-version.ts
2322
- function Fn(e) {
2327
+ function Bn(e) {
2323
2328
  let t = e.dependencies?.chromatic || e.devDependencies?.chromatic || e.peerDependencies?.chromatic;
2324
2329
  return t || (e.scripts && Object.values(e.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
2325
2330
  }
2326
- o(Fn, "getChromaticVersionSpecifier");
2331
+ o(Bn, "getChromaticVersionSpecifier");
2327
2332
 
2328
2333
  // src/telemetry/get-framework-info.ts
2329
- import { normalize as Ys } from "node:path";
2330
- import { frameworkPackages as Ks } from "storybook/internal/common";
2334
+ import { normalize as Xi } from "node:path";
2335
+ import { frameworkPackages as Qi } from "storybook/internal/common";
2331
2336
 
2332
2337
  // src/telemetry/package-json.ts
2333
- import { readFile as qs } from "node:fs/promises";
2334
- import { join as zs } from "node:path";
2338
+ import { readFile as Yi } from "node:fs/promises";
2339
+ import { join as Ki } from "node:path";
2335
2340
  var yt = /* @__PURE__ */ o(async (e) => {
2336
2341
  let t = Object.keys(e);
2337
2342
  return Promise.all(t.map(ge));
@@ -2346,14 +2351,14 @@ var yt = /* @__PURE__ */ o(async (e) => {
2346
2351
  return { name: e, version: null };
2347
2352
  }
2348
2353
  }, "getActualPackageVersion"), ht = /* @__PURE__ */ o(async (e) => {
2349
- let t = S.resolve(zs(e, "package.json"), {
2354
+ let t = w.resolve(Ki(e, "package.json"), {
2350
2355
  paths: [process.cwd()]
2351
2356
  });
2352
- return JSON.parse(await qs(t, { encoding: "utf8" }));
2357
+ return JSON.parse(await Yi(t, { encoding: "utf8" }));
2353
2358
  }, "getActualPackageJson");
2354
2359
 
2355
2360
  // src/telemetry/get-framework-info.ts
2356
- var Xs = [
2361
+ var Zi = [
2357
2362
  "html",
2358
2363
  "react",
2359
2364
  "svelte",
@@ -2364,23 +2369,23 @@ var Xs = [
2364
2369
  "web-components",
2365
2370
  "angular",
2366
2371
  "ember"
2367
- ], Qs = ["builder-webpack5", "builder-vite"];
2368
- function Bn(e, t) {
2369
- let { name: r = "", version: n, dependencies: i, devDependencies: s, peerDependencies: a } = e, c = {
2372
+ ], ea = ["builder-webpack5", "builder-vite"];
2373
+ function Gn(e, t) {
2374
+ let { name: r = "", version: n, dependencies: s, devDependencies: i, peerDependencies: a } = e, c = {
2370
2375
  // We include the framework itself because it may be a renderer too (e.g. angular)
2371
2376
  [r]: n,
2372
- ...i,
2373
2377
  ...s,
2378
+ ...i,
2374
2379
  ...a
2375
2380
  };
2376
2381
  return t.map((u) => `@storybook/${u}`).find((u) => c[u]);
2377
2382
  }
2378
- o(Bn, "findMatchingPackage");
2379
- var Zs = /* @__PURE__ */ o((e) => {
2380
- let t = Ys(e).replace(new RegExp(/\\/, "g"), "/");
2381
- return Object.keys(Ks).find((n) => t.endsWith(n)) || D(e).replace(/.*node_modules[\\/]/, "");
2383
+ o(Gn, "findMatchingPackage");
2384
+ var ta = /* @__PURE__ */ o((e) => {
2385
+ let t = Xi(e).replace(new RegExp(/\\/, "g"), "/");
2386
+ return Object.keys(Qi).find((n) => t.endsWith(n)) || D(e).replace(/.*node_modules[\\/]/, "");
2382
2387
  }, "getFrameworkPackageName");
2383
- async function Gn(e) {
2388
+ async function Un(e) {
2384
2389
  if (!e?.framework)
2385
2390
  return {};
2386
2391
  let t = typeof e.framework == "string" ? e.framework : e.framework?.name;
@@ -2389,20 +2394,20 @@ async function Gn(e) {
2389
2394
  let r = await ht(t);
2390
2395
  if (!r)
2391
2396
  return {};
2392
- let n = Bn(r, Qs), i = Bn(r, Xs), s = Zs(t), a = typeof e.framework == "object" ? e.framework.options : {};
2397
+ let n = Gn(r, ea), s = Gn(r, Zi), i = ta(t), a = typeof e.framework == "object" ? e.framework.options : {};
2393
2398
  return {
2394
2399
  framework: {
2395
- name: s,
2400
+ name: i,
2396
2401
  options: a
2397
2402
  },
2398
2403
  builder: n,
2399
- renderer: i
2404
+ renderer: s
2400
2405
  };
2401
2406
  }
2402
- o(Gn, "getFrameworkInfo");
2407
+ o(Un, "getFrameworkInfo");
2403
2408
 
2404
2409
  // src/telemetry/get-has-router-package.ts
2405
- var ea = /* @__PURE__ */ new Set([
2410
+ var ra = /* @__PURE__ */ new Set([
2406
2411
  "react-router",
2407
2412
  "react-router-dom",
2408
2413
  "remix",
@@ -2425,56 +2430,56 @@ var ea = /* @__PURE__ */ new Set([
2425
2430
  "nuxt",
2426
2431
  "@sveltejs/kit"
2427
2432
  ]);
2428
- function Un(e) {
2433
+ function $n(e) {
2429
2434
  return Object.keys(e?.dependencies ?? {}).some(
2430
- (t) => ea.has(t)
2435
+ (t) => ra.has(t)
2431
2436
  );
2432
2437
  }
2433
- o(Un, "getHasRouterPackage");
2438
+ o($n, "getHasRouterPackage");
2434
2439
 
2435
2440
  // src/telemetry/get-monorepo-type.ts
2436
- import { existsSync as $n, readFileSync as ta } from "node:fs";
2441
+ import { existsSync as Wn, readFileSync as na } from "node:fs";
2437
2442
  import { join as gt } from "node:path";
2438
- import { getProjectRoot as ra } from "storybook/internal/common";
2439
- var Wn = {
2443
+ import { getProjectRoot as oa } from "storybook/internal/common";
2444
+ var Hn = {
2440
2445
  Nx: "nx.json",
2441
2446
  Turborepo: "turbo.json",
2442
2447
  Lerna: "lerna.json",
2443
2448
  Rush: "rush.json",
2444
2449
  Lage: "lage.config.json"
2445
- }, Hn = /* @__PURE__ */ o(() => {
2446
- let e = ra();
2450
+ }, Jn = /* @__PURE__ */ o(() => {
2451
+ let e = oa();
2447
2452
  if (!e)
2448
2453
  return;
2449
- let r = Object.keys(Wn).find((i) => {
2450
- let s = gt(e, Wn[i]);
2451
- return $n(s);
2454
+ let r = Object.keys(Hn).find((s) => {
2455
+ let i = gt(e, Hn[s]);
2456
+ return Wn(i);
2452
2457
  });
2453
2458
  if (r)
2454
2459
  return r;
2455
- if (!$n(gt(e, "package.json")))
2460
+ if (!Wn(gt(e, "package.json")))
2456
2461
  return;
2457
2462
  if (JSON.parse(
2458
- ta(gt(e, "package.json"), { encoding: "utf8" })
2463
+ na(gt(e, "package.json"), { encoding: "utf8" })
2459
2464
  )?.workspaces)
2460
2465
  return "Workspaces";
2461
2466
  }, "getMonorepoType");
2462
2467
 
2463
2468
  // src/telemetry/get-portable-stories-usage.ts
2464
- var na = /* @__PURE__ */ o(async (e) => {
2469
+ var sa = /* @__PURE__ */ o(async (e) => {
2465
2470
  try {
2466
2471
  let t = "git grep -l composeStor" + (e ? ` -- ${e}` : "");
2467
2472
  return await pe(t);
2468
2473
  } catch (t) {
2469
2474
  return t.exitCode === 1 ? 0 : void 0;
2470
2475
  }
2471
- }, "getPortableStoriesFileCountUncached"), Jn = /* @__PURE__ */ o(async (e) => he(
2476
+ }, "getPortableStoriesFileCountUncached"), Vn = /* @__PURE__ */ o(async (e) => he(
2472
2477
  "portableStories",
2473
- async () => na(e)
2478
+ async () => sa(e)
2474
2479
  ), "getPortableStoriesFileCount");
2475
2480
 
2476
2481
  // src/telemetry/storybook-metadata.ts
2477
- var Vn = {
2482
+ var qn = {
2478
2483
  next: "Next",
2479
2484
  "react-scripts": "CRA",
2480
2485
  gatsby: "Gatsby",
@@ -2482,8 +2487,8 @@ var Vn = {
2482
2487
  "@nrwl/storybook": "nx",
2483
2488
  "@vue/cli-service": "vue-cli",
2484
2489
  "@sveltejs/kit": "sveltekit"
2485
- }, qn = /* @__PURE__ */ o((e) => D(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
2486
- "").replace(/\/preset$/, ""), "sanitizeAddonName"), la = /* @__PURE__ */ o(async ({
2490
+ }, zn = /* @__PURE__ */ o((e) => D(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
2491
+ "").replace(/\/preset$/, ""), "sanitizeAddonName"), ma = /* @__PURE__ */ o(async ({
2487
2492
  packageJsonPath: e,
2488
2493
  packageJson: t,
2489
2494
  mainConfig: r
@@ -2495,16 +2500,16 @@ var Vn = {
2495
2500
  hasStaticDirs: !1,
2496
2501
  hasStorybookEslint: !1,
2497
2502
  refCount: 0
2498
- }, i = {
2503
+ }, s = {
2499
2504
  ...t?.dependencies,
2500
2505
  ...t?.devDependencies,
2501
2506
  ...t?.peerDependencies
2502
- }, s = Object.keys(i).find((p) => !!Vn[p]);
2503
- if (s) {
2504
- let { version: p } = await ge(s);
2507
+ }, i = Object.keys(s).find((p) => !!qn[p]);
2508
+ if (i) {
2509
+ let { version: p } = await ge(i);
2505
2510
  n.metaFramework = {
2506
- name: Vn[s],
2507
- packageName: s,
2511
+ name: qn[i],
2512
+ packageName: i,
2508
2513
  version: p
2509
2514
  };
2510
2515
  }
@@ -2526,18 +2531,18 @@ var Vn = {
2526
2531
  "msw",
2527
2532
  "miragejs",
2528
2533
  "sinon"
2529
- ], c = Object.keys(i).filter(
2530
- (p) => a.find((w) => p.includes(w))
2534
+ ], c = Object.keys(s).filter(
2535
+ (p) => a.find((S) => p.includes(S))
2531
2536
  );
2532
2537
  n.testPackages = Object.fromEntries(
2533
2538
  await Promise.all(
2534
2539
  c.map(async (p) => [p, (await ge(p))?.version])
2535
2540
  )
2536
- ), n.hasRouterPackage = Un(t);
2537
- let u = Hn();
2541
+ ), n.hasRouterPackage = $n(t);
2542
+ let u = Jn();
2538
2543
  u && (n.monorepo = u);
2539
2544
  try {
2540
- let p = await Ie({ cwd: ia() });
2545
+ let p = await Ie({ cwd: aa() });
2541
2546
  p && (n.packageManager = {
2542
2547
  type: p.name,
2543
2548
  version: p.version,
@@ -2545,50 +2550,50 @@ var Vn = {
2545
2550
  });
2546
2551
  } catch {
2547
2552
  }
2548
- let f = i.typescript ? "typescript" : "javascript";
2553
+ let f = s.typescript ? "typescript" : "javascript";
2549
2554
  if (!r)
2550
2555
  return {
2551
2556
  ...n,
2552
- storybookVersionSpecifier: ua.storybook,
2557
+ storybookVersionSpecifier: la.storybook,
2553
2558
  language: f
2554
2559
  };
2555
2560
  n.hasCustomBabel = !!r.babel, n.hasCustomWebpack = !!r.webpackFinal, n.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (n.
2556
2561
  typescriptOptions = r.typescript);
2557
- let l = await Gn(r);
2562
+ let l = await Un(r);
2558
2563
  typeof r.refs == "object" && (n.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (n.features = r.features);
2559
2564
  let d = {};
2560
2565
  r.addons && r.addons.forEach((p) => {
2561
- let w, J;
2562
- typeof p == "string" ? w = qn(p) : (p.name.includes("addon-essentials") && (J = p.options), w = qn(p.name)), d[w] = {
2566
+ let S, J;
2567
+ typeof p == "string" ? S = zn(p) : (p.name.includes("addon-essentials") && (J = p.options), S = zn(p.name)), d[S] = {
2563
2568
  options: J,
2564
2569
  version: void 0
2565
2570
  };
2566
2571
  });
2567
- let h = Fn(t);
2572
+ let h = Bn(t);
2568
2573
  h && (d.chromatic = {
2569
2574
  version: void 0,
2570
2575
  versionSpecifier: h,
2571
2576
  options: void 0
2572
- }), (await yt(d)).forEach(({ name: p, version: w }) => {
2573
- d[p].version = w;
2577
+ }), (await yt(d)).forEach(({ name: p, version: S }) => {
2578
+ d[p].version = S;
2574
2579
  });
2575
- let g = Object.keys(d), m = Object.keys(i).filter((p) => p.includes("storybook") && !g.includes(p)).reduce((p, w) => ({
2580
+ let g = Object.keys(d), m = Object.keys(s).filter((p) => p.includes("storybook") && !g.includes(p)).reduce((p, S) => ({
2576
2581
  ...p,
2577
- [w]: { version: void 0 }
2582
+ [S]: { version: void 0 }
2578
2583
  }), {});
2579
- (await yt(m)).forEach(({ name: p, version: w }) => {
2580
- m[p].version = w;
2584
+ (await yt(m)).forEach(({ name: p, version: S }) => {
2585
+ m[p].version = S;
2581
2586
  });
2582
- let C = !!i["eslint-plugin-storybook"], k = aa(t);
2587
+ let C = !!s["eslint-plugin-storybook"], k = ua(t);
2583
2588
  try {
2584
2589
  let { previewConfig: p } = k;
2585
2590
  if (p) {
2586
- let w = await fa(p), J = !!(w.getFieldNode(["globals"]) || w.getFieldNode(["globalTypes"]));
2591
+ let S = await pa(p), J = !!(S.getFieldNode(["globals"]) || S.getFieldNode(["globalTypes"]));
2587
2592
  n.preview = { ...n.preview, usesGlobals: J };
2588
2593
  }
2589
2594
  } catch {
2590
2595
  }
2591
- let I = m[k.frameworkPackage]?.version, W = await Jn(), H = await Ln(oa(e));
2596
+ let I = m[k.frameworkPackage]?.version, W = await Vn(), H = await Fn(ia(e));
2592
2597
  return {
2593
2598
  ...n,
2594
2599
  ...l,
@@ -2602,7 +2607,7 @@ var Vn = {
2602
2607
  hasStorybookEslint: C
2603
2608
  };
2604
2609
  }, "computeStorybookMetadata");
2605
- async function pa() {
2610
+ async function da() {
2606
2611
  let e = await Pe(process.cwd());
2607
2612
  return e ? {
2608
2613
  packageJsonPath: e,
@@ -2612,85 +2617,85 @@ async function pa() {
2612
2617
  packageJson: {}
2613
2618
  };
2614
2619
  }
2615
- o(pa, "getPackageJsonDetails");
2616
- var be, zn = /* @__PURE__ */ o(async (e) => {
2620
+ o(da, "getPackageJsonDetails");
2621
+ var be, Yn = /* @__PURE__ */ o(async (e) => {
2617
2622
  if (be)
2618
2623
  return be;
2619
- let { packageJson: t, packageJsonPath: r } = await pa(), n = (e || sa(
2624
+ let { packageJson: t, packageJsonPath: r } = await da(), n = (e || ca(
2620
2625
  String(t?.scripts?.storybook || ""),
2621
2626
  "-c",
2622
2627
  "--config-dir"
2623
- )) ?? ".storybook", i = await ca({ configDir: n }).catch(() => {
2628
+ )) ?? ".storybook", s = await fa({ configDir: n }).catch(() => {
2624
2629
  });
2625
- return be = await la({ mainConfig: i, packageJson: t, packageJsonPath: r }), be;
2630
+ return be = await ma({ mainConfig: s, packageJson: t, packageJsonPath: r }), be;
2626
2631
  }, "getStorybookMetadata");
2627
2632
 
2628
2633
  // src/telemetry/telemetry.ts
2629
- var io = A(Kn(), 1);
2630
- import * as oo from "node:os";
2634
+ var io = A(Xn(), 1);
2635
+ import * as so from "node:os";
2631
2636
 
2632
2637
  // ../node_modules/nanoid/index.js
2633
- import { randomFillSync as Qn } from "crypto";
2638
+ import { randomFillSync as Zn } from "crypto";
2634
2639
 
2635
2640
  // ../node_modules/nanoid/url-alphabet/index.js
2636
- var Xn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2641
+ var Qn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2637
2642
 
2638
2643
  // ../node_modules/nanoid/index.js
2639
- var ma = 128, T, N, da = /* @__PURE__ */ o((e) => {
2640
- !T || T.length < e ? (T = Buffer.allocUnsafe(e * ma), Qn(T), N = 0) : N + e > T.length && (Qn(T), N = 0), N += e;
2644
+ var ya = 128, T, N, ha = /* @__PURE__ */ o((e) => {
2645
+ !T || T.length < e ? (T = Buffer.allocUnsafe(e * ya), Zn(T), N = 0) : N + e > T.length && (Zn(T), N = 0), N += e;
2641
2646
  }, "fillPool");
2642
2647
  var U = /* @__PURE__ */ o((e = 21) => {
2643
- da(e -= 0);
2648
+ ha(e -= 0);
2644
2649
  let t = "";
2645
2650
  for (let r = N - e; r < N; r++)
2646
- t += Xn[T[r] & 63];
2651
+ t += Qn[T[r] & 63];
2647
2652
  return t;
2648
2653
  }, "nanoid");
2649
2654
 
2650
2655
  // src/telemetry/anonymous-id.ts
2651
- xn();
2652
- import { relative as ha } from "node:path";
2653
- import { getProjectRoot as ga } from "storybook/internal/common";
2654
- import { execSync as ba } from "child_process";
2656
+ Sn();
2657
+ import { relative as ba } from "node:path";
2658
+ import { getProjectRoot as xa } from "storybook/internal/common";
2659
+ import { execSync as Sa } from "child_process";
2655
2660
 
2656
2661
  // src/telemetry/one-way-hash.ts
2657
- import { createHash as ya } from "crypto";
2662
+ import { createHash as ga } from "crypto";
2658
2663
  var bt = /* @__PURE__ */ o((e) => {
2659
- let t = ya("sha256");
2664
+ let t = ga("sha256");
2660
2665
  return t.update("storybook-telemetry-salt"), t.update(e), t.digest("hex");
2661
2666
  }, "oneWayHash");
2662
2667
 
2663
2668
  // src/telemetry/anonymous-id.ts
2664
- function xa(e) {
2669
+ function wa(e) {
2665
2670
  let n = e.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
2666
2671
  return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
2667
2672
  }
2668
- o(xa, "normalizeGitUrl");
2669
- function wa(e, t) {
2670
- return `${xa(e)}${ut(t)}`;
2673
+ o(wa, "normalizeGitUrl");
2674
+ function ka(e, t) {
2675
+ return `${wa(e)}${ut(t)}`;
2671
2676
  }
2672
- o(wa, "unhashedProjectId");
2673
- var we, Zn = /* @__PURE__ */ o(() => {
2674
- if (we)
2675
- return we;
2677
+ o(ka, "unhashedProjectId");
2678
+ var Se, eo = /* @__PURE__ */ o(() => {
2679
+ if (Se)
2680
+ return Se;
2676
2681
  try {
2677
- let e = ga(), t = ha(e, process.cwd()), r = ba("git config --local --get remote.origin.url", {
2682
+ let e = xa(), t = ba(e, process.cwd()), r = Sa("git config --local --get remote.origin.url", {
2678
2683
  timeout: 1e3,
2679
2684
  stdio: "pipe"
2680
2685
  });
2681
- we = bt(wa(String(r), t));
2686
+ Se = bt(ka(String(r), t));
2682
2687
  } catch {
2683
2688
  }
2684
- return we;
2689
+ return Se;
2685
2690
  }, "getAnonymousProjectId");
2686
2691
 
2687
2692
  // src/telemetry/event-cache.ts
2688
- import { cache as wt } from "storybook/internal/common";
2689
- var xt = Promise.resolve(), Sa = /* @__PURE__ */ o(async (e, t) => {
2690
- let r = await wt.get("lastEvents") || {};
2691
- r[e] = { body: t, timestamp: Date.now() }, await wt.set("lastEvents", r);
2692
- }, "setHelper"), to = /* @__PURE__ */ o(async (e, t) => (await xt, xt = Sa(e, t), xt), "set");
2693
- var ka = /* @__PURE__ */ o((e) => {
2693
+ import { cache as St } from "storybook/internal/common";
2694
+ var xt = Promise.resolve(), Ea = /* @__PURE__ */ o(async (e, t) => {
2695
+ let r = await St.get("lastEvents") || {};
2696
+ r[e] = { body: t, timestamp: Date.now() }, await St.set("lastEvents", r);
2697
+ }, "setHelper"), ro = /* @__PURE__ */ o(async (e, t) => (await xt, xt = Ea(e, t), xt), "set");
2698
+ var Pa = /* @__PURE__ */ o((e) => {
2694
2699
  let { body: t, timestamp: r } = e;
2695
2700
  return {
2696
2701
  timestamp: r,
@@ -2698,37 +2703,37 @@ var ka = /* @__PURE__ */ o((e) => {
2698
2703
  eventId: t?.eventId,
2699
2704
  sessionId: t?.sessionId
2700
2705
  };
2701
- }, "upgradeFields"), Ea = ["init", "upgrade"], Pa = ["build", "dev", "error"], eo = /* @__PURE__ */ o((e, t) => {
2702
- let r = t.map((n) => e?.[n]).filter(Boolean).sort((n, i) => i.timestamp - n.timestamp);
2706
+ }, "upgradeFields"), va = ["init", "upgrade"], Ta = ["build", "dev", "error"], to = /* @__PURE__ */ o((e, t) => {
2707
+ let r = t.map((n) => e?.[n]).filter(Boolean).sort((n, s) => s.timestamp - n.timestamp);
2703
2708
  return r.length > 0 ? r[0] : void 0;
2704
- }, "lastEvent"), va = /* @__PURE__ */ o(async (e = void 0) => {
2705
- let t = e || await wt.get("lastEvents") || {}, r = eo(t, Ea), n = eo(t, Pa);
2709
+ }, "lastEvent"), Ca = /* @__PURE__ */ o(async (e = void 0) => {
2710
+ let t = e || await St.get("lastEvents") || {}, r = to(t, va), n = to(t, Ta);
2706
2711
  if (r)
2707
- return !n?.timestamp || r.timestamp > n.timestamp ? ka(r) : void 0;
2712
+ return !n?.timestamp || r.timestamp > n.timestamp ? Pa(r) : void 0;
2708
2713
  }, "getPrecedingUpgrade");
2709
2714
 
2710
2715
  // src/telemetry/fetch.ts
2711
- var ro = global.fetch;
2716
+ var no = global.fetch;
2712
2717
 
2713
2718
  // src/telemetry/session-id.ts
2714
- import { cache as no } from "storybook/internal/common";
2715
- var Ta = 1e3 * 60 * 60 * 2, $;
2716
- var St = /* @__PURE__ */ o(async () => {
2719
+ import { cache as oo } from "storybook/internal/common";
2720
+ var Ia = 1e3 * 60 * 60 * 2, $;
2721
+ var wt = /* @__PURE__ */ o(async () => {
2717
2722
  let e = Date.now();
2718
2723
  if (!$) {
2719
- let t = await no.get("session");
2720
- t && t.lastUsed >= e - Ta ? $ = t.id : $ = U();
2724
+ let t = await oo.get("session");
2725
+ t && t.lastUsed >= e - Ia ? $ = t.id : $ = U();
2721
2726
  }
2722
- return await no.set("session", { id: $, lastUsed: e }), $;
2727
+ return await oo.set("session", { id: $, lastUsed: e }), $;
2723
2728
  }, "getSessionId");
2724
2729
 
2725
2730
  // src/telemetry/telemetry.ts
2726
- var Ca = (0, io.default)(ro), Ia = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Se = [], Aa = /* @__PURE__ */ o(
2731
+ var Aa = (0, io.default)(no), Oa = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", we = [], ja = /* @__PURE__ */ o(
2727
2732
  (e, t) => {
2728
2733
  kt[e] = t;
2729
- }, "addToGlobalContext"), Oa = /* @__PURE__ */ o(() => {
2734
+ }, "addToGlobalContext"), Ra = /* @__PURE__ */ o(() => {
2730
2735
  try {
2731
- let e = oo.platform();
2736
+ let e = so.platform();
2732
2737
  return e === "win32" ? "Windows" : e === "darwin" ? "macOS" : e === "linux" ? "Linux" : `Other: ${e}`;
2733
2738
  } catch {
2734
2739
  return "Unknown";
@@ -2736,12 +2741,12 @@ var Ca = (0, io.default)(ro), Ia = process.env.STORYBOOK_TELEMETRY_URL || "https
2736
2741
  }, "getOperatingSystem"), kt = {
2737
2742
  inCI: !!process.env.CI,
2738
2743
  isTTY: process.stdout.isTTY,
2739
- platform: Oa(),
2744
+ platform: Ra(),
2740
2745
  nodeVersion: process.versions.node
2741
- }, ja = /* @__PURE__ */ o(async (e, t, r) => {
2742
- let { eventType: n, payload: i, metadata: s, ...a } = e, c = await St(), u = U(), f = { ...a, eventType: n, eventId: u, sessionId: c, metadata: s,
2743
- payload: i, context: t };
2744
- return Ca(Ia, {
2746
+ }, Na = /* @__PURE__ */ o(async (e, t, r) => {
2747
+ let { eventType: n, payload: s, metadata: i, ...a } = e, c = await wt(), u = U(), f = { ...a, eventType: n, eventId: u, sessionId: c, metadata: i,
2748
+ payload: s, context: t };
2749
+ return Aa(Oa, {
2745
2750
  method: "post",
2746
2751
  body: JSON.stringify(f),
2747
2752
  headers: { "Content-Type": "application/json" },
@@ -2751,51 +2756,51 @@ var Ca = (0, io.default)(ro), Ia = process.env.STORYBOOK_TELEMETRY_URL || "https
2751
2756
  retryDelay")
2752
2757
  });
2753
2758
  }, "prepareRequest");
2754
- async function so(e, t = { retryDelay: 1e3, immediate: !1 }) {
2755
- let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ? kt : {
2759
+ async function ao(e, t = { retryDelay: 1e3, immediate: !1 }) {
2760
+ let { eventType: r, payload: n, metadata: s, ...i } = e, a = t.stripMetadata ? kt : {
2756
2761
  ...kt,
2757
- anonymousId: Zn()
2762
+ anonymousId: eo()
2758
2763
  }, c;
2759
2764
  try {
2760
- c = ja(e, a, t), Se.push(c), t.immediate ? await Promise.all(Se) : await c;
2761
- let u = await St(), f = U(), l = { ...s, eventType: r, eventId: f, sessionId: u, metadata: i, payload: n, context: a };
2762
- await to(r, l);
2765
+ c = Na(e, a, t), we.push(c), t.immediate ? await Promise.all(we) : await c;
2766
+ let u = await wt(), f = U(), l = { ...i, eventType: r, eventId: f, sessionId: u, metadata: s, payload: n, context: a };
2767
+ await ro(r, l);
2763
2768
  } catch {
2764
2769
  } finally {
2765
- Se = Se.filter((u) => u !== c);
2770
+ we = we.filter((u) => u !== c);
2766
2771
  }
2767
2772
  }
2768
- o(so, "sendTelemetry");
2773
+ o(ao, "sendTelemetry");
2769
2774
 
2770
2775
  // src/telemetry/index.ts
2771
- var md = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
2772
- sExampleStoryId"), dd = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
2776
+ var yd = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
2777
+ sExampleStoryId"), hd = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
2773
2778
  e !== "boot" && r.notify !== !1 && await It();
2774
2779
  let n = {
2775
2780
  eventType: e,
2776
2781
  payload: t
2777
2782
  };
2778
2783
  try {
2779
- r?.stripMetadata || (n.metadata = await zn(r?.configDir));
2780
- } catch (i) {
2781
- n.payload.metadataErrorMessage = Y(i).message, r?.enableCrashReports && (n.payload.metadataError = Y(i));
2784
+ r?.stripMetadata || (n.metadata = await Yn(r?.configDir));
2785
+ } catch (s) {
2786
+ n.payload.metadataErrorMessage = Y(s).message, r?.enableCrashReports && (n.payload.metadataError = Y(s));
2782
2787
  } finally {
2783
- let { error: i } = n.payload;
2784
- i && (n.payload.error = Y(i)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (ao.info(`
2785
- [telemetry]`), ao.info(JSON.stringify(n, null, 2))), await so(n, r));
2788
+ let { error: s } = n.payload;
2789
+ s && (n.payload.error = Y(s)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (co.info(`
2790
+ [telemetry]`), co.info(JSON.stringify(n, null, 2))), await ao(n, r));
2786
2791
  }
2787
2792
  }, "telemetry");
2788
2793
  export {
2789
- Aa as addToGlobalContext,
2794
+ ja as addToGlobalContext,
2790
2795
  D as cleanPaths,
2791
- la as computeStorybookMetadata,
2792
- va as getPrecedingUpgrade,
2793
- zn as getStorybookMetadata,
2794
- md as isExampleStoryId,
2795
- Vn as metaFrameworks,
2796
+ ma as computeStorybookMetadata,
2797
+ Ca as getPrecedingUpgrade,
2798
+ Yn as getStorybookMetadata,
2799
+ yd as isExampleStoryId,
2800
+ qn as metaFrameworks,
2796
2801
  bt as oneWayHash,
2797
2802
  Ot as removeAnsiEscapeCodes,
2798
- qn as sanitizeAddonName,
2803
+ zn as sanitizeAddonName,
2799
2804
  Y as sanitizeError,
2800
- dd as telemetry
2805
+ hd as telemetry
2801
2806
  };