storybook 9.0.0-alpha.9 → 9.0.0-beta.1

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