@storybook/addon-vitest 10.1.0-alpha.10 → 10.1.0-alpha.11

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.
@@ -0,0 +1,339 @@
1
+ import CJS_COMPAT_NODE_URL_zfiyucf8tb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_zfiyucf8tb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_zfiyucf8tb from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_zfiyucf8tb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_zfiyucf8tb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_zfiyucf8tb.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ __commonJS
14
+ } from "./chunk-FCFZB5YS.js";
15
+
16
+ // ../../node_modules/semver/internal/constants.js
17
+ var require_constants = __commonJS({
18
+ "../../node_modules/semver/internal/constants.js"(exports, module) {
19
+ "use strict";
20
+ var SEMVER_SPEC_VERSION = "2.0.0", MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
21
+ 9007199254740991, MAX_SAFE_COMPONENT_LENGTH = 16, MAX_SAFE_BUILD_LENGTH = 250, RELEASE_TYPES = [
22
+ "major",
23
+ "premajor",
24
+ "minor",
25
+ "preminor",
26
+ "patch",
27
+ "prepatch",
28
+ "prerelease"
29
+ ];
30
+ module.exports = {
31
+ MAX_LENGTH: 256,
32
+ MAX_SAFE_COMPONENT_LENGTH,
33
+ MAX_SAFE_BUILD_LENGTH,
34
+ MAX_SAFE_INTEGER,
35
+ RELEASE_TYPES,
36
+ SEMVER_SPEC_VERSION,
37
+ FLAG_INCLUDE_PRERELEASE: 1,
38
+ FLAG_LOOSE: 2
39
+ };
40
+ }
41
+ });
42
+
43
+ // ../../node_modules/semver/internal/debug.js
44
+ var require_debug = __commonJS({
45
+ "../../node_modules/semver/internal/debug.js"(exports, module) {
46
+ "use strict";
47
+ var debug = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
48
+ };
49
+ module.exports = debug;
50
+ }
51
+ });
52
+
53
+ // ../../node_modules/semver/internal/re.js
54
+ var require_re = __commonJS({
55
+ "../../node_modules/semver/internal/re.js"(exports, module) {
56
+ "use strict";
57
+ var {
58
+ MAX_SAFE_COMPONENT_LENGTH,
59
+ MAX_SAFE_BUILD_LENGTH,
60
+ MAX_LENGTH
61
+ } = require_constants(), debug = require_debug();
62
+ exports = module.exports = {};
63
+ var re = exports.re = [], safeRe = exports.safeRe = [], src = exports.src = [], safeSrc = exports.safeSrc = [], t = exports.t = {}, R = 0, LETTERDASHNUMBER = "[a-zA-Z0-9-]", safeRegexReplacements = [
64
+ ["\\s", 1],
65
+ ["\\d", MAX_LENGTH],
66
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
67
+ ], makeSafeRegex = (value) => {
68
+ for (let [token, max] of safeRegexReplacements)
69
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
70
+ return value;
71
+ }, createToken = (name, value, isGlobal) => {
72
+ let safe = makeSafeRegex(value), index = R++;
73
+ debug(name, index, value), t[name] = index, src[index] = value, safeSrc[index] = safe, re[index] = new RegExp(value, isGlobal ? "g" : void 0), safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
74
+ };
75
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
76
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
77
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
78
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
79
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
80
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
81
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
82
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
83
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
84
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
85
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
86
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
87
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
88
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
89
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
90
+ createToken("GTLT", "((?:<|>)?=?)");
91
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
92
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
93
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
94
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
95
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
96
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
97
+ createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
98
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
99
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
100
+ createToken("COERCERTL", src[t.COERCE], !0);
101
+ createToken("COERCERTLFULL", src[t.COERCEFULL], !0);
102
+ createToken("LONETILDE", "(?:~>?)");
103
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, !0);
104
+ exports.tildeTrimReplace = "$1~";
105
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
106
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
107
+ createToken("LONECARET", "(?:\\^)");
108
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, !0);
109
+ exports.caretTrimReplace = "$1^";
110
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
111
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
112
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
113
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
114
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, !0);
115
+ exports.comparatorTrimReplace = "$1$2$3";
116
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
117
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
118
+ createToken("STAR", "(<|>)?=?\\s*\\*");
119
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
120
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
121
+ }
122
+ });
123
+
124
+ // ../../node_modules/semver/internal/identifiers.js
125
+ var require_identifiers = __commonJS({
126
+ "../../node_modules/semver/internal/identifiers.js"(exports, module) {
127
+ "use strict";
128
+ var numeric = /^[0-9]+$/, compareIdentifiers = (a, b) => {
129
+ if (typeof a == "number" && typeof b == "number")
130
+ return a === b ? 0 : a < b ? -1 : 1;
131
+ let anum = numeric.test(a), bnum = numeric.test(b);
132
+ return anum && bnum && (a = +a, b = +b), a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
133
+ }, rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
134
+ module.exports = {
135
+ compareIdentifiers,
136
+ rcompareIdentifiers
137
+ };
138
+ }
139
+ });
140
+
141
+ // ../../node_modules/semver/internal/parse-options.js
142
+ var require_parse_options = __commonJS({
143
+ "../../node_modules/semver/internal/parse-options.js"(exports, module) {
144
+ "use strict";
145
+ var looseOption = Object.freeze({ loose: !0 }), emptyOpts = Object.freeze({}), parseOptions = (options) => options ? typeof options != "object" ? looseOption : options : emptyOpts;
146
+ module.exports = parseOptions;
147
+ }
148
+ });
149
+
150
+ // ../../node_modules/semver/classes/semver.js
151
+ var require_semver = __commonJS({
152
+ "../../node_modules/semver/classes/semver.js"(exports, module) {
153
+ "use strict";
154
+ var debug = require_debug(), { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(), { safeRe: re, t } = require_re(), parseOptions = require_parse_options(), { compareIdentifiers } = require_identifiers(), SemVer = class _SemVer {
155
+ constructor(version, options) {
156
+ if (options = parseOptions(options), version instanceof _SemVer) {
157
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease)
158
+ return version;
159
+ version = version.version;
160
+ } else if (typeof version != "string")
161
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
162
+ if (version.length > MAX_LENGTH)
163
+ throw new TypeError(
164
+ `version is longer than ${MAX_LENGTH} characters`
165
+ );
166
+ debug("SemVer", version, options), this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease;
167
+ let m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
168
+ if (!m)
169
+ throw new TypeError(`Invalid Version: ${version}`);
170
+ if (this.raw = version, this.major = +m[1], this.minor = +m[2], this.patch = +m[3], this.major > MAX_SAFE_INTEGER || this.major < 0)
171
+ throw new TypeError("Invalid major version");
172
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
173
+ throw new TypeError("Invalid minor version");
174
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
175
+ throw new TypeError("Invalid patch version");
176
+ m[4] ? this.prerelease = m[4].split(".").map((id) => {
177
+ if (/^[0-9]+$/.test(id)) {
178
+ let num = +id;
179
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
180
+ return num;
181
+ }
182
+ return id;
183
+ }) : this.prerelease = [], this.build = m[5] ? m[5].split(".") : [], this.format();
184
+ }
185
+ format() {
186
+ return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
187
+ }
188
+ toString() {
189
+ return this.version;
190
+ }
191
+ compare(other) {
192
+ if (debug("SemVer.compare", this.version, this.options, other), !(other instanceof _SemVer)) {
193
+ if (typeof other == "string" && other === this.version)
194
+ return 0;
195
+ other = new _SemVer(other, this.options);
196
+ }
197
+ return other.version === this.version ? 0 : this.compareMain(other) || this.comparePre(other);
198
+ }
199
+ compareMain(other) {
200
+ return other instanceof _SemVer || (other = new _SemVer(other, this.options)), this.major < other.major ? -1 : this.major > other.major ? 1 : this.minor < other.minor ? -1 : this.minor > other.minor ? 1 : this.patch < other.patch ? -1 : this.patch > other.patch ? 1 : 0;
201
+ }
202
+ comparePre(other) {
203
+ if (other instanceof _SemVer || (other = new _SemVer(other, this.options)), this.prerelease.length && !other.prerelease.length)
204
+ return -1;
205
+ if (!this.prerelease.length && other.prerelease.length)
206
+ return 1;
207
+ if (!this.prerelease.length && !other.prerelease.length)
208
+ return 0;
209
+ let i = 0;
210
+ do {
211
+ let a = this.prerelease[i], b = other.prerelease[i];
212
+ if (debug("prerelease compare", i, a, b), a === void 0 && b === void 0)
213
+ return 0;
214
+ if (b === void 0)
215
+ return 1;
216
+ if (a === void 0)
217
+ return -1;
218
+ if (a === b)
219
+ continue;
220
+ return compareIdentifiers(a, b);
221
+ } while (++i);
222
+ }
223
+ compareBuild(other) {
224
+ other instanceof _SemVer || (other = new _SemVer(other, this.options));
225
+ let i = 0;
226
+ do {
227
+ let a = this.build[i], b = other.build[i];
228
+ if (debug("build compare", i, a, b), a === void 0 && b === void 0)
229
+ return 0;
230
+ if (b === void 0)
231
+ return 1;
232
+ if (a === void 0)
233
+ return -1;
234
+ if (a === b)
235
+ continue;
236
+ return compareIdentifiers(a, b);
237
+ } while (++i);
238
+ }
239
+ // preminor will bump the version up to the next minor release, and immediately
240
+ // down to pre-release. premajor and prepatch work the same way.
241
+ inc(release, identifier, identifierBase) {
242
+ if (release.startsWith("pre")) {
243
+ if (!identifier && identifierBase === !1)
244
+ throw new Error("invalid increment argument: identifier is empty");
245
+ if (identifier) {
246
+ let match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
247
+ if (!match || match[1] !== identifier)
248
+ throw new Error(`invalid identifier: ${identifier}`);
249
+ }
250
+ }
251
+ switch (release) {
252
+ case "premajor":
253
+ this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", identifier, identifierBase);
254
+ break;
255
+ case "preminor":
256
+ this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", identifier, identifierBase);
257
+ break;
258
+ case "prepatch":
259
+ this.prerelease.length = 0, this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase);
260
+ break;
261
+ // If the input is a non-prerelease version, this acts the same as
262
+ // prepatch.
263
+ case "prerelease":
264
+ this.prerelease.length === 0 && this.inc("patch", identifier, identifierBase), this.inc("pre", identifier, identifierBase);
265
+ break;
266
+ case "release":
267
+ if (this.prerelease.length === 0)
268
+ throw new Error(`version ${this.raw} is not a prerelease`);
269
+ this.prerelease.length = 0;
270
+ break;
271
+ case "major":
272
+ (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
273
+ break;
274
+ case "minor":
275
+ (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
276
+ break;
277
+ case "patch":
278
+ this.prerelease.length === 0 && this.patch++, this.prerelease = [];
279
+ break;
280
+ // This probably shouldn't be used publicly.
281
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
282
+ case "pre": {
283
+ let base = Number(identifierBase) ? 1 : 0;
284
+ if (this.prerelease.length === 0)
285
+ this.prerelease = [base];
286
+ else {
287
+ let i = this.prerelease.length;
288
+ for (; --i >= 0; )
289
+ typeof this.prerelease[i] == "number" && (this.prerelease[i]++, i = -2);
290
+ if (i === -1) {
291
+ if (identifier === this.prerelease.join(".") && identifierBase === !1)
292
+ throw new Error("invalid increment argument: identifier already exists");
293
+ this.prerelease.push(base);
294
+ }
295
+ }
296
+ if (identifier) {
297
+ let prerelease = [identifier, base];
298
+ identifierBase === !1 && (prerelease = [identifier]), compareIdentifiers(this.prerelease[0], identifier) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = prerelease) : this.prerelease = prerelease;
299
+ }
300
+ break;
301
+ }
302
+ default:
303
+ throw new Error(`invalid increment argument: ${release}`);
304
+ }
305
+ return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
306
+ }
307
+ };
308
+ module.exports = SemVer;
309
+ }
310
+ });
311
+
312
+ // ../../node_modules/semver/functions/compare.js
313
+ var require_compare = __commonJS({
314
+ "../../node_modules/semver/functions/compare.js"(exports, module) {
315
+ "use strict";
316
+ var SemVer = require_semver(), compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
317
+ module.exports = compare;
318
+ }
319
+ });
320
+
321
+ // ../../node_modules/semver/functions/gte.js
322
+ var require_gte = __commonJS({
323
+ "../../node_modules/semver/functions/gte.js"(exports, module) {
324
+ "use strict";
325
+ var compare = require_compare(), gte = (a, b, loose) => compare(a, b, loose) >= 0;
326
+ module.exports = gte;
327
+ }
328
+ });
329
+
330
+ export {
331
+ require_constants,
332
+ require_debug,
333
+ require_re,
334
+ require_parse_options,
335
+ require_identifiers,
336
+ require_semver,
337
+ require_compare,
338
+ require_gte
339
+ };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_w4lts2u9au from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_w4lts2u9au from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_w4lts2u9au from "node:module";
1
+ import CJS_COMPAT_NODE_URL_zfiyucf8tb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_zfiyucf8tb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_zfiyucf8tb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_w4lts2u9au.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_w4lts2u9au.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_w4lts2u9au.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_zfiyucf8tb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_zfiyucf8tb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_zfiyucf8tb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,24 +13,20 @@ var __create = Object.create;
13
13
  var __defProp = Object.defineProperty;
14
14
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
15
  var __getOwnPropNames = Object.getOwnPropertyNames;
16
- var __getProtoOf = Object.getPrototypeOf;
17
- var __hasOwnProp = Object.prototype.hasOwnProperty;
18
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
19
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
20
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
16
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
17
+ var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {
18
+ get: (a, b) => (typeof require < "u" ? require : a)[b]
21
19
  }) : x)(function(x) {
22
- if (typeof require !== "undefined") return require.apply(this, arguments);
20
+ if (typeof require < "u") return require.apply(this, arguments);
23
21
  throw Error('Dynamic require of "' + x + '" is not supported');
24
22
  });
25
- var __commonJS = (cb, mod) => function __require2() {
23
+ var __commonJS = (cb, mod) => function() {
26
24
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
27
25
  };
28
26
  var __copyProps = (to, from, except, desc) => {
29
- if (from && typeof from === "object" || typeof from === "function") {
27
+ if (from && typeof from == "object" || typeof from == "function")
30
28
  for (let key of __getOwnPropNames(from))
31
- if (!__hasOwnProp.call(to, key) && key !== except)
32
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
- }
29
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
30
  return to;
35
31
  };
36
32
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
@@ -38,12 +34,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
38
34
  // file that has been converted to a CommonJS file using a Babel-
39
35
  // compatible transform (i.e. "__esModule" has not been set), then set
40
36
  // "default" to the CommonJS "module.exports" for node compatibility.
41
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
37
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
42
38
  mod
43
39
  ));
44
40
 
45
41
  export {
46
- __name,
47
42
  __require,
48
43
  __commonJS,
49
44
  __toESM
@@ -0,0 +1,69 @@
1
+ import CJS_COMPAT_NODE_URL_zfiyucf8tb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_zfiyucf8tb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_zfiyucf8tb from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_zfiyucf8tb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_zfiyucf8tb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_zfiyucf8tb.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // src/utils.ts
14
+ function getAddonNames(mainConfig) {
15
+ return (mainConfig.addons || []).map((addon) => {
16
+ let name = "";
17
+ return typeof addon == "string" ? name = addon : typeof addon == "object" && (name = addon.name), name;
18
+ }).filter((item) => item != null);
19
+ }
20
+ function errorToErrorLike(error) {
21
+ return {
22
+ message: error.message,
23
+ name: error.name,
24
+ // avoid duplicating the error message in the stack trace
25
+ stack: error.stack?.replace(error.message, ""),
26
+ cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : void 0
27
+ };
28
+ }
29
+
30
+ // ../../node_modules/empathic/find.mjs
31
+ import { join as join2 } from "node:path";
32
+ import { existsSync, statSync } from "node:fs";
33
+
34
+ // ../../node_modules/empathic/walk.mjs
35
+ import { dirname } from "node:path";
36
+
37
+ // ../../node_modules/empathic/resolve.mjs
38
+ import { isAbsolute, join, resolve } from "node:path";
39
+ function absolute(input, root) {
40
+ return isAbsolute(input) ? input : resolve(root || ".", input);
41
+ }
42
+
43
+ // ../../node_modules/empathic/walk.mjs
44
+ function up(base, options) {
45
+ let { last, cwd } = options || {}, tmp = absolute(base, cwd), root = absolute(last || "/", cwd), prev, arr = [];
46
+ for (; prev !== root && (arr.push(tmp), tmp = dirname(prev = tmp), tmp !== prev); )
47
+ ;
48
+ return arr;
49
+ }
50
+
51
+ // ../../node_modules/empathic/find.mjs
52
+ function up2(name, options) {
53
+ let dir, tmp, start = options && options.cwd || "";
54
+ for (dir of up(start, options))
55
+ if (tmp = join2(dir, name), existsSync(tmp)) return tmp;
56
+ }
57
+ function any(names, options) {
58
+ let dir, start = options && options.cwd || "", j = 0, len = names.length, tmp;
59
+ for (dir of up(start, options))
60
+ for (j = 0; j < len; j++)
61
+ if (tmp = join2(dir, names[j]), existsSync(tmp)) return tmp;
62
+ }
63
+
64
+ export {
65
+ getAddonNames,
66
+ errorToErrorLike,
67
+ up2 as up,
68
+ any
69
+ };
@@ -0,0 +1,138 @@
1
+ import CJS_COMPAT_NODE_URL_zfiyucf8tb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_zfiyucf8tb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_zfiyucf8tb from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_zfiyucf8tb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_zfiyucf8tb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_zfiyucf8tb.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
14
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
15
+ function normalizeWindowsPath(input = "") {
16
+ return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
17
+ }
18
+ var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/, sep = "/", delimiter = ":", normalize = function(path2) {
19
+ if (path2.length === 0)
20
+ return ".";
21
+ path2 = normalizeWindowsPath(path2);
22
+ let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
23
+ return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
24
+ }, join = function(...arguments_) {
25
+ if (arguments_.length === 0)
26
+ return ".";
27
+ let joined;
28
+ for (let argument of arguments_)
29
+ argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
30
+ return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
31
+ };
32
+ function cwd() {
33
+ return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
34
+ }
35
+ var resolve = function(...arguments_) {
36
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
37
+ let resolvedPath = "", resolvedAbsolute = !1;
38
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
39
+ let path2 = index >= 0 ? arguments_[index] : cwd();
40
+ !path2 || path2.length === 0 || (resolvedPath = `${path2}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path2));
41
+ }
42
+ return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
43
+ };
44
+ function normalizeString(path2, allowAboveRoot) {
45
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
46
+ for (let index = 0; index <= path2.length; ++index) {
47
+ if (index < path2.length)
48
+ char = path2[index];
49
+ else {
50
+ if (char === "/")
51
+ break;
52
+ char = "/";
53
+ }
54
+ if (char === "/") {
55
+ if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
56
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
57
+ if (res.length > 2) {
58
+ let lastSlashIndex = res.lastIndexOf("/");
59
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
60
+ continue;
61
+ } else if (res.length > 0) {
62
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
63
+ continue;
64
+ }
65
+ }
66
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
67
+ } else
68
+ res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
69
+ lastSlash = index, dots = 0;
70
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
71
+ }
72
+ return res;
73
+ }
74
+ var isAbsolute = function(p) {
75
+ return _IS_ABSOLUTE_RE.test(p);
76
+ }, toNamespacedPath = function(p) {
77
+ return normalizeWindowsPath(p);
78
+ }, _EXTNAME_RE = /.(\.[^./]+)$/, extname = function(p) {
79
+ let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
80
+ return match && match[1] || "";
81
+ }, relative = function(from, to) {
82
+ let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
83
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
84
+ return _to.join("/");
85
+ let _fromCopy = [..._from];
86
+ for (let segment of _fromCopy) {
87
+ if (_to[0] !== segment)
88
+ break;
89
+ _from.shift(), _to.shift();
90
+ }
91
+ return [..._from.map(() => ".."), ..._to].join("/");
92
+ }, dirname = function(p) {
93
+ let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
94
+ return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
95
+ }, format = function(p) {
96
+ let segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
97
+ return normalizeWindowsPath(
98
+ p.root ? resolve(...segments) : segments.join("/")
99
+ );
100
+ }, basename = function(p, extension) {
101
+ let lastSegment = normalizeWindowsPath(p).split("/").pop();
102
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
103
+ }, parse = function(p) {
104
+ let root = normalizeWindowsPath(p).split("/").shift() || "/", base = basename(p), extension = extname(base);
105
+ return {
106
+ root,
107
+ dir: dirname(p),
108
+ base,
109
+ ext: extension,
110
+ name: base.slice(0, base.length - extension.length)
111
+ };
112
+ }, path = {
113
+ __proto__: null,
114
+ basename,
115
+ delimiter,
116
+ dirname,
117
+ extname,
118
+ format,
119
+ isAbsolute,
120
+ join,
121
+ normalize,
122
+ normalizeString,
123
+ parse,
124
+ relative,
125
+ resolve,
126
+ sep,
127
+ toNamespacedPath
128
+ };
129
+
130
+ export {
131
+ sep,
132
+ normalize,
133
+ join,
134
+ resolve,
135
+ relative,
136
+ dirname,
137
+ path
138
+ };