storybook 9.1.0-alpha.0 → 9.1.0-alpha.10

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 (112) hide show
  1. package/assets/browser/favicon-wrapper.svg +46 -0
  2. package/assets/browser/favicon.svg +1 -1
  3. package/dist/actions/index.cjs +16 -16
  4. package/dist/actions/index.d.ts +1 -38
  5. package/dist/actions/index.js +12 -12
  6. package/dist/bin/index.cjs +62 -69
  7. package/dist/bin/index.js +43 -50
  8. package/dist/builder-manager/index.cjs +379 -378
  9. package/dist/builder-manager/index.d.ts +567 -2
  10. package/dist/builder-manager/index.js +280 -279
  11. package/dist/cli/bin/index.cjs +945 -945
  12. package/dist/cli/bin/index.js +673 -672
  13. package/dist/cli/index.cjs +14965 -14973
  14. package/dist/cli/index.d.ts +713 -15
  15. package/dist/cli/index.js +13488 -13495
  16. package/dist/common/index.cjs +11211 -11103
  17. package/dist/common/index.d.ts +351 -72
  18. package/dist/common/index.js +18491 -18379
  19. package/dist/components/index.cjs +4606 -4425
  20. package/dist/components/index.d.ts +11 -12
  21. package/dist/components/index.js +3020 -2834
  22. package/dist/controls/index.cjs +16 -16
  23. package/dist/controls/index.d.ts +1 -36
  24. package/dist/core-server/index.cjs +6690 -6624
  25. package/dist/core-server/index.d.ts +14 -2
  26. package/dist/core-server/index.js +6088 -6023
  27. package/dist/core-server/presets/common-manager.js +3582 -3475
  28. package/dist/core-server/presets/common-preset.cjs +85015 -5213
  29. package/dist/core-server/presets/common-preset.js +85107 -5291
  30. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.cjs +28728 -0
  31. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +28729 -0
  32. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.cjs +29339 -0
  33. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +29340 -0
  34. package/dist/csf/index.cjs +3019 -104
  35. package/dist/csf/index.d.ts +301 -18
  36. package/dist/csf/index.js +3031 -98
  37. package/dist/csf-tools/index.cjs +489 -488
  38. package/dist/csf-tools/index.js +311 -309
  39. package/dist/highlight/index.cjs +15 -15
  40. package/dist/highlight/index.d.ts +1 -12
  41. package/dist/highlight/index.js +4 -4
  42. package/dist/instrumenter/index.cjs +1308 -1239
  43. package/dist/instrumenter/index.d.ts +25 -3
  44. package/dist/instrumenter/index.js +1345 -1280
  45. package/dist/manager/globals-module-info.cjs +1 -1
  46. package/dist/manager/globals-module-info.js +1 -1
  47. package/dist/manager/globals-runtime.js +42257 -44665
  48. package/dist/manager/runtime.js +3715 -3536
  49. package/dist/manager-api/index.cjs +74 -74
  50. package/dist/manager-api/index.d.ts +4 -1
  51. package/dist/manager-api/index.js +142 -142
  52. package/dist/node-logger/index.cjs +8520 -994
  53. package/dist/node-logger/index.d.ts +395 -2
  54. package/dist/node-logger/index.js +8535 -995
  55. package/dist/preview/runtime.js +13701 -16331
  56. package/dist/preview-api/index.cjs +1434 -1458
  57. package/dist/preview-api/index.d.ts +13 -10
  58. package/dist/preview-api/index.js +950 -976
  59. package/dist/server-errors.cjs +201 -242
  60. package/dist/server-errors.d.ts +1 -12
  61. package/dist/server-errors.js +182 -223
  62. package/dist/telemetry/index.cjs +1919 -1638
  63. package/dist/telemetry/index.d.ts +4 -2
  64. package/dist/telemetry/index.js +1972 -1690
  65. package/dist/test/index.cjs +9184 -9816
  66. package/dist/test/index.d.ts +8 -1
  67. package/dist/test/index.js +8390 -9029
  68. package/dist/types/index.d.ts +19 -17
  69. package/dist/viewport/index.cjs +17 -24
  70. package/dist/viewport/index.d.ts +9 -532
  71. package/dist/viewport/index.js +9 -16
  72. package/package.json +18 -187
  73. package/templates/mocker-runtime.template.js +89 -0
  74. package/dist/actions/preview.cjs +0 -159
  75. package/dist/actions/preview.d.ts +0 -555
  76. package/dist/actions/preview.js +0 -149
  77. package/dist/backgrounds/index.cjs +0 -148
  78. package/dist/backgrounds/index.d.ts +0 -592
  79. package/dist/backgrounds/index.js +0 -130
  80. package/dist/backgrounds/preview.cjs +0 -143
  81. package/dist/backgrounds/preview.d.ts +0 -555
  82. package/dist/backgrounds/preview.js +0 -127
  83. package/dist/component-testing/index.cjs +0 -23
  84. package/dist/component-testing/index.d.ts +0 -3
  85. package/dist/component-testing/index.js +0 -5
  86. package/dist/component-testing/preview.cjs +0 -40
  87. package/dist/component-testing/preview.d.ts +0 -5
  88. package/dist/component-testing/preview.js +0 -25
  89. package/dist/controls/preview.cjs +0 -26
  90. package/dist/controls/preview.d.ts +0 -555
  91. package/dist/controls/preview.js +0 -9
  92. package/dist/highlight/preview.cjs +0 -590
  93. package/dist/highlight/preview.d.ts +0 -555
  94. package/dist/highlight/preview.js +0 -574
  95. package/dist/measure/index.cjs +0 -476
  96. package/dist/measure/index.d.ts +0 -567
  97. package/dist/measure/index.js +0 -464
  98. package/dist/measure/preview.cjs +0 -466
  99. package/dist/measure/preview.d.ts +0 -560
  100. package/dist/measure/preview.js +0 -450
  101. package/dist/outline/index.cjs +0 -528
  102. package/dist/outline/index.d.ts +0 -567
  103. package/dist/outline/index.js +0 -500
  104. package/dist/outline/preview.cjs +0 -518
  105. package/dist/outline/preview.d.ts +0 -560
  106. package/dist/outline/preview.js +0 -486
  107. package/dist/test/preview.cjs +0 -73
  108. package/dist/test/preview.d.ts +0 -555
  109. package/dist/test/preview.js +0 -66
  110. package/dist/viewport/preview.cjs +0 -35
  111. package/dist/viewport/preview.d.ts +0 -569
  112. package/dist/viewport/preview.js +0 -19
@@ -1,9 +1,9 @@
1
- var Zn = Object.create;
2
- var Sr = Object.defineProperty;
3
- var es = Object.getOwnPropertyDescriptor;
4
- var rs = Object.getOwnPropertyNames;
5
- var ts = Object.getPrototypeOf, os = Object.prototype.hasOwnProperty;
6
- var n = (r, e) => Sr(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
1
+ var Hn = Object.create;
2
+ var br = Object.defineProperty;
3
+ var Vn = Object.getOwnPropertyDescriptor;
4
+ var Wn = Object.getOwnPropertyNames;
5
+ var $n = Object.getPrototypeOf, Yn = Object.prototype.hasOwnProperty;
6
+ var n = (r, e) => br(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
7
7
  "u" ? new Proxy(r, {
8
8
  get: (e, t) => (typeof require < "u" ? require : e)[t]
9
9
  }) : r)(function(r) {
@@ -11,26 +11,26 @@ var n = (r, e) => Sr(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE
11
11
  throw Error('Dynamic require of "' + r + '" is not supported');
12
12
  });
13
13
  var I = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
14
- var ns = (r, e, t, o) => {
14
+ var Kn = (r, e, t, o) => {
15
15
  if (e && typeof e == "object" || typeof e == "function")
16
- for (let s of rs(e))
17
- !os.call(r, s) && s !== t && Sr(r, s, { get: () => e[s], enumerable: !(o = es(e, s)) || o.enumerable });
16
+ for (let s of Wn(e))
17
+ !Yn.call(r, s) && s !== t && br(r, s, { get: () => e[s], enumerable: !(o = Vn(e, s)) || o.enumerable });
18
18
  return r;
19
19
  };
20
- var ue = (r, e, t) => (t = r != null ? Zn(ts(r)) : {}, ns(
20
+ var ue = (r, e, t) => (t = r != null ? Hn($n(r)) : {}, Kn(
21
21
  // If the importer is in node compatibility mode or this is not an ESM
22
22
  // file that has been converted to a CommonJS file using a Babel-
23
23
  // compatible transform (i.e. "__esModule" has not been set), then set
24
24
  // "default" to the CommonJS "module.exports" for node compatibility.
25
- e || !r || !r.__esModule ? Sr(t, "default", { value: r, enumerable: !0 }) : t,
25
+ e || !r || !r.__esModule ? br(t, "default", { value: r, enumerable: !0 }) : t,
26
26
  r
27
27
  ));
28
28
 
29
29
  // ../node_modules/memoizerific/memoizerific.js
30
- var _r = I((io, Mr) => {
30
+ var Mr = I((so, jr) => {
31
31
  (function(r) {
32
- if (typeof io == "object" && typeof Mr < "u")
33
- Mr.exports = r();
32
+ if (typeof so == "object" && typeof jr < "u")
33
+ jr.exports = r();
34
34
  else if (typeof define == "function" && define.amd)
35
35
  define([], r);
36
36
  else {
@@ -160,11 +160,11 @@ var _r = I((io, Mr) => {
160
160
  });
161
161
 
162
162
  // ../node_modules/picoquery/lib/string-util.js
163
- var lt = I((at) => {
163
+ var at = I((it) => {
164
164
  "use strict";
165
- Object.defineProperty(at, "__esModule", { value: !0 });
166
- at.encodeString = pa;
167
- var G = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), da = new Int8Array([
165
+ Object.defineProperty(it, "__esModule", { value: !0 });
166
+ it.encodeString = na;
167
+ var G = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), oa = new Int8Array([
168
168
  0,
169
169
  0,
170
170
  0,
@@ -294,7 +294,7 @@ var lt = I((at) => {
294
294
  1,
295
295
  0
296
296
  ]);
297
- function pa(r) {
297
+ function na(r) {
298
298
  let e = r.length;
299
299
  if (e === 0)
300
300
  return "";
@@ -302,7 +302,7 @@ var lt = I((at) => {
302
302
  e: for (; s < e; s++) {
303
303
  let i = r.charCodeAt(s);
304
304
  for (; i < 128; ) {
305
- if (da[i] !== 1 && (o < s && (t += r.slice(o, s)), o = s + 1, t += G[i]), ++s === e)
305
+ if (oa[i] !== 1 && (o < s && (t += r.slice(o, s)), o = s + 1, t += G[i]), ++s === e)
306
306
  break e;
307
307
  i = r.charCodeAt(s);
308
308
  }
@@ -321,88 +321,88 @@ var lt = I((at) => {
321
321
  }
322
322
  return o === 0 ? r : o < e ? t + r.slice(o) : t;
323
323
  }
324
- n(pa, "encodeString");
324
+ n(na, "encodeString");
325
325
  });
326
326
 
327
327
  // ../node_modules/picoquery/lib/shared.js
328
- var sr = I((U) => {
328
+ var nr = I((U) => {
329
329
  "use strict";
330
330
  Object.defineProperty(U, "__esModule", { value: !0 });
331
331
  U.defaultOptions = U.defaultShouldSerializeObject = U.defaultValueSerializer = void 0;
332
- var ct = lt(), ua = /* @__PURE__ */ n((r) => {
332
+ var lt = at(), sa = /* @__PURE__ */ n((r) => {
333
333
  switch (typeof r) {
334
334
  case "string":
335
- return (0, ct.encodeString)(r);
335
+ return (0, lt.encodeString)(r);
336
336
  case "bigint":
337
337
  case "boolean":
338
338
  return "" + r;
339
339
  case "number":
340
340
  if (Number.isFinite(r))
341
- return r < 1e21 ? "" + r : (0, ct.encodeString)("" + r);
341
+ return r < 1e21 ? "" + r : (0, lt.encodeString)("" + r);
342
342
  break;
343
343
  }
344
- return r instanceof Date ? (0, ct.encodeString)(r.toISOString()) : "";
344
+ return r instanceof Date ? (0, lt.encodeString)(r.toISOString()) : "";
345
345
  }, "defaultValueSerializer");
346
- U.defaultValueSerializer = ua;
347
- var fa = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
348
- U.defaultShouldSerializeObject = fa;
349
- var Ko = /* @__PURE__ */ n((r) => r, "identityFunc");
346
+ U.defaultValueSerializer = sa;
347
+ var ia = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
348
+ U.defaultShouldSerializeObject = ia;
349
+ var zo = /* @__PURE__ */ n((r) => r, "identityFunc");
350
350
  U.defaultOptions = {
351
351
  nesting: !0,
352
352
  nestingSyntax: "dot",
353
353
  arrayRepeat: !1,
354
354
  arrayRepeatSyntax: "repeat",
355
355
  delimiter: 38,
356
- valueDeserializer: Ko,
356
+ valueDeserializer: zo,
357
357
  valueSerializer: U.defaultValueSerializer,
358
- keyDeserializer: Ko,
358
+ keyDeserializer: zo,
359
359
  shouldSerializeObject: U.defaultShouldSerializeObject
360
360
  };
361
361
  });
362
362
 
363
363
  // ../node_modules/picoquery/lib/object-util.js
364
- var dt = I((ir) => {
364
+ var ct = I((sr) => {
365
365
  "use strict";
366
- Object.defineProperty(ir, "__esModule", { value: !0 });
367
- ir.getDeepObject = ha;
368
- ir.stringifyObject = Xo;
369
- var ae = sr(), ya = lt();
370
- function ma(r) {
366
+ Object.defineProperty(sr, "__esModule", { value: !0 });
367
+ sr.getDeepObject = ca;
368
+ sr.stringifyObject = Bo;
369
+ var ae = nr(), aa = at();
370
+ function la(r) {
371
371
  return r === "__proto__" || r === "constructor" || r === "prototype";
372
372
  }
373
- n(ma, "isPrototypeKey");
374
- function ha(r, e, t, o, s) {
375
- if (ma(e))
373
+ n(la, "isPrototypeKey");
374
+ function ca(r, e, t, o, s) {
375
+ if (la(e))
376
376
  return r;
377
377
  let i = r[e];
378
378
  return typeof i == "object" && i !== null ? i : !o && (s || typeof t == "number" || typeof t == "string" && t * 0 === 0 && t.indexOf(".") ===
379
379
  -1) ? r[e] = [] : r[e] = {};
380
380
  }
381
- n(ha, "getDeepObject");
382
- var ga = 20, ba = "[]", Sa = "[", Ta = "]", xa = ".";
383
- function Xo(r, e, t = 0, o, s) {
381
+ n(ca, "getDeepObject");
382
+ var da = 20, pa = "[]", ua = "[", fa = "]", ya = ".";
383
+ function Bo(r, e, t = 0, o, s) {
384
384
  let { nestingSyntax: i = ae.defaultOptions.nestingSyntax, arrayRepeat: a = ae.defaultOptions.arrayRepeat, arrayRepeatSyntax: l = ae.defaultOptions.
385
385
  arrayRepeatSyntax, nesting: c = ae.defaultOptions.nesting, delimiter: d = ae.defaultOptions.delimiter, valueSerializer: p = ae.defaultOptions.
386
386
  valueSerializer, shouldSerializeObject: u = ae.defaultOptions.shouldSerializeObject } = e, y = typeof d == "number" ? String.fromCharCode(
387
387
  d) : d, h = s === !0 && a, g = i === "dot" || i === "js" && !s;
388
- if (t > ga)
388
+ if (t > da)
389
389
  return "";
390
390
  let b = "", m = !0, T = !1;
391
391
  for (let x in r) {
392
392
  let f = r[x], S;
393
- o ? (S = o, h ? l === "bracket" && (S += ba) : g ? (S += xa, S += x) : (S += Sa, S += x, S += Ta)) : S = x, m || (b += y), typeof f ==
394
- "object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (b += Xo(f, e, t + 1, S, T))) : (b += (0, ya.encodeString)(S),
393
+ o ? (S = o, h ? l === "bracket" && (S += pa) : g ? (S += ya, S += x) : (S += ua, S += x, S += fa)) : S = x, m || (b += y), typeof f ==
394
+ "object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (b += Bo(f, e, t + 1, S, T))) : (b += (0, aa.encodeString)(S),
395
395
  b += "=", b += p(f, x)), m && (m = !1);
396
396
  }
397
397
  return b;
398
398
  }
399
- n(Xo, "stringifyObject");
399
+ n(Bo, "stringifyObject");
400
400
  });
401
401
 
402
402
  // ../node_modules/fast-decode-uri-component/index.js
403
- var en = I((xf, Zo) => {
403
+ var Vo = I((rf, Ho) => {
404
404
  "use strict";
405
- var Jo = 12, Ra = 0, pt = [
405
+ var Go = 12, ma = 0, dt = [
406
406
  // The first part of the table maps bytes to character to a transition.
407
407
  0,
408
408
  0,
@@ -785,18 +785,18 @@ var en = I((xf, Zo) => {
785
785
  7,
786
786
  7
787
787
  ];
788
- function wa(r) {
788
+ function ha(r) {
789
789
  var e = r.indexOf("%");
790
790
  if (e === -1) return r;
791
- for (var t = r.length, o = "", s = 0, i = 0, a = e, l = Jo; e > -1 && e < t; ) {
792
- var c = Qo(r[e + 1], 4), d = Qo(r[e + 2], 0), p = c | d, u = pt[p];
793
- if (l = pt[256 + l + u], i = i << 6 | p & pt[364 + u], l === Jo)
791
+ for (var t = r.length, o = "", s = 0, i = 0, a = e, l = Go; e > -1 && e < t; ) {
792
+ var c = Uo(r[e + 1], 4), d = Uo(r[e + 2], 0), p = c | d, u = dt[p];
793
+ if (l = dt[256 + l + u], i = i << 6 | p & dt[364 + u], l === Go)
794
794
  o += r.slice(s, a), o += i <= 65535 ? String.fromCharCode(i) : String.fromCharCode(
795
795
  55232 + (i >> 10),
796
796
  56320 + (i & 1023)
797
797
  ), i = 0, s = e + 3, e = a = r.indexOf("%", s);
798
798
  else {
799
- if (l === Ra)
799
+ if (l === ma)
800
800
  return null;
801
801
  if (e += 3, e < t && r.charCodeAt(e) === 37) continue;
802
802
  return null;
@@ -804,8 +804,8 @@ var en = I((xf, Zo) => {
804
804
  }
805
805
  return o + r.slice(s);
806
806
  }
807
- n(wa, "decodeURIComponent");
808
- var Aa = {
807
+ n(ha, "decodeURIComponent");
808
+ var ga = {
809
809
  0: 0,
810
810
  1: 1,
811
811
  2: 2,
@@ -829,95 +829,95 @@ var en = I((xf, Zo) => {
829
829
  f: 15,
830
830
  F: 15
831
831
  };
832
- function Qo(r, e) {
833
- var t = Aa[r];
832
+ function Uo(r, e) {
833
+ var t = ga[r];
834
834
  return t === void 0 ? 255 : t << e;
835
835
  }
836
- n(Qo, "hexCodeToInt");
837
- Zo.exports = wa;
836
+ n(Uo, "hexCodeToInt");
837
+ Ho.exports = ha;
838
838
  });
839
839
 
840
840
  // ../node_modules/picoquery/lib/parse.js
841
- var nn = I(($) => {
841
+ var Ko = I(($) => {
842
842
  "use strict";
843
- var Ea = $ && $.__importDefault || function(r) {
843
+ var ba = $ && $.__importDefault || function(r) {
844
844
  return r && r.__esModule ? r : { default: r };
845
845
  };
846
846
  Object.defineProperty($, "__esModule", { value: !0 });
847
847
  $.numberValueDeserializer = $.numberKeyDeserializer = void 0;
848
- $.parse = Pa;
849
- var ar = dt(), le = sr(), rn = Ea(en()), Ca = /* @__PURE__ */ n((r) => {
848
+ $.parse = xa;
849
+ var ir = ct(), le = nr(), Wo = ba(Vo()), Sa = /* @__PURE__ */ n((r) => {
850
850
  let e = Number(r);
851
851
  return Number.isNaN(e) ? r : e;
852
852
  }, "numberKeyDeserializer");
853
- $.numberKeyDeserializer = Ca;
854
- var va = /* @__PURE__ */ n((r) => {
853
+ $.numberKeyDeserializer = Sa;
854
+ var Ta = /* @__PURE__ */ n((r) => {
855
855
  let e = Number(r);
856
856
  return Number.isNaN(e) ? r : e;
857
857
  }, "numberValueDeserializer");
858
- $.numberValueDeserializer = va;
859
- var tn = /\+/g, on = /* @__PURE__ */ n(function() {
858
+ $.numberValueDeserializer = Ta;
859
+ var $o = /\+/g, Yo = /* @__PURE__ */ n(function() {
860
860
  }, "Empty");
861
- on.prototype = /* @__PURE__ */ Object.create(null);
862
- function lr(r, e, t, o, s) {
861
+ Yo.prototype = /* @__PURE__ */ Object.create(null);
862
+ function ar(r, e, t, o, s) {
863
863
  let i = r.substring(e, t);
864
- return o && (i = i.replace(tn, " ")), s && (i = (0, rn.default)(i) || i), i;
864
+ return o && (i = i.replace($o, " ")), s && (i = (0, Wo.default)(i) || i), i;
865
865
  }
866
- n(lr, "computeKeySlice");
867
- function Pa(r, e) {
866
+ n(ar, "computeKeySlice");
867
+ function xa(r, e) {
868
868
  let { valueDeserializer: t = le.defaultOptions.valueDeserializer, keyDeserializer: o = le.defaultOptions.keyDeserializer, arrayRepeatSyntax: s = le.
869
869
  defaultOptions.arrayRepeatSyntax, nesting: i = le.defaultOptions.nesting, arrayRepeat: a = le.defaultOptions.arrayRepeat, nestingSyntax: l = le.
870
870
  defaultOptions.nestingSyntax, delimiter: c = le.defaultOptions.delimiter } = e ?? {}, d = typeof c == "string" ? c.charCodeAt(0) : c, p = l ===
871
- "js", u = new on();
871
+ "js", u = new Yo();
872
872
  if (typeof r != "string")
873
873
  return u;
874
874
  let y = r.length, h = "", g = -1, b = -1, m = -1, T = u, x, f = "", S = "", R = !1, w = !1, E = !1, D = !1, k = !1, L = !1, pe = !1, q = 0,
875
- v = -1, z = -1, Ct = -1;
875
+ v = -1, B = -1, Et = -1;
876
876
  for (let F = 0; F < y + 1; F++) {
877
877
  if (q = F !== y ? r.charCodeAt(F) : d, q === d) {
878
- if (pe = b > g, pe || (b = F), m !== b - 1 && (S = lr(r, m + 1, v > -1 ? v : b, E, R), f = o(S), x !== void 0 && (T = (0, ar.getDeepObject)(
878
+ if (pe = b > g, pe || (b = F), m !== b - 1 && (S = ar(r, m + 1, v > -1 ? v : b, E, R), f = o(S), x !== void 0 && (T = (0, ir.getDeepObject)(
879
879
  T, x, f, p && k, p && L))), pe || f !== "") {
880
- pe && (h = r.slice(b + 1, F), D && (h = h.replace(tn, " ")), w && (h = (0, rn.default)(h) || h));
880
+ pe && (h = r.slice(b + 1, F), D && (h = h.replace($o, " ")), w && (h = (0, Wo.default)(h) || h));
881
881
  let Ae = t(h, f);
882
882
  if (a) {
883
- let Ge = T[f];
884
- Ge === void 0 ? v > -1 ? T[f] = [Ae] : T[f] = Ae : Ge.pop ? Ge.push(Ae) : T[f] = [Ge, Ae];
883
+ let Be = T[f];
884
+ Be === void 0 ? v > -1 ? T[f] = [Ae] : T[f] = Ae : Be.pop ? Be.push(Ae) : T[f] = [Be, Ae];
885
885
  } else
886
886
  T[f] = Ae;
887
887
  }
888
888
  h = "", g = F, b = F, R = !1, w = !1, E = !1, D = !1, k = !1, L = !1, v = -1, m = F, T = u, x = void 0, f = "";
889
- } else q === 93 ? (a && s === "bracket" && Ct === 91 && (v = z), i && (l === "index" || p) && b <= g && (m !== z && (S = lr(r, m + 1, F,
890
- E, R), f = o(S), x !== void 0 && (T = (0, ar.getDeepObject)(T, x, f, void 0, p)), x = f, E = !1, R = !1), m = F, L = !0, k = !1)) : q ===
891
- 46 ? i && (l === "dot" || p) && b <= g && (m !== z && (S = lr(r, m + 1, F, E, R), f = o(S), x !== void 0 && (T = (0, ar.getDeepObject)(
892
- T, x, f, p)), x = f, E = !1, R = !1), k = !0, L = !1, m = F) : q === 91 ? i && (l === "index" || p) && b <= g && (m !== z && (S = lr(r,
893
- m + 1, F, E, R), f = o(S), p && x !== void 0 && (T = (0, ar.getDeepObject)(T, x, f, p)), x = f, E = !1, R = !1, k = !1, L = !0), m = F) :
889
+ } else q === 93 ? (a && s === "bracket" && Et === 91 && (v = B), i && (l === "index" || p) && b <= g && (m !== B && (S = ar(r, m + 1, F,
890
+ E, R), f = o(S), x !== void 0 && (T = (0, ir.getDeepObject)(T, x, f, void 0, p)), x = f, E = !1, R = !1), m = F, L = !0, k = !1)) : q ===
891
+ 46 ? i && (l === "dot" || p) && b <= g && (m !== B && (S = ar(r, m + 1, F, E, R), f = o(S), x !== void 0 && (T = (0, ir.getDeepObject)(
892
+ T, x, f, p)), x = f, E = !1, R = !1), k = !0, L = !1, m = F) : q === 91 ? i && (l === "index" || p) && b <= g && (m !== B && (S = ar(r,
893
+ m + 1, F, E, R), f = o(S), p && x !== void 0 && (T = (0, ir.getDeepObject)(T, x, f, p)), x = f, E = !1, R = !1, k = !1, L = !0), m = F) :
894
894
  q === 61 ? b <= g ? b = F : w = !0 : q === 43 ? b > g ? D = !0 : E = !0 : q === 37 && (b > g ? w = !0 : R = !0);
895
- z = F, Ct = q;
895
+ B = F, Et = q;
896
896
  }
897
897
  return u;
898
898
  }
899
- n(Pa, "parse");
899
+ n(xa, "parse");
900
900
  });
901
901
 
902
902
  // ../node_modules/picoquery/lib/stringify.js
903
- var sn = I((ut) => {
903
+ var Xo = I((pt) => {
904
904
  "use strict";
905
- Object.defineProperty(ut, "__esModule", { value: !0 });
906
- ut.stringify = Ia;
907
- var Fa = dt();
908
- function Ia(r, e) {
905
+ Object.defineProperty(pt, "__esModule", { value: !0 });
906
+ pt.stringify = wa;
907
+ var Ra = ct();
908
+ function wa(r, e) {
909
909
  if (r === null || typeof r != "object")
910
910
  return "";
911
911
  let t = e ?? {};
912
- return (0, Fa.stringifyObject)(r, t);
912
+ return (0, Ra.stringifyObject)(r, t);
913
913
  }
914
- n(Ia, "stringify");
914
+ n(wa, "stringify");
915
915
  });
916
916
 
917
917
  // ../node_modules/picoquery/lib/main.js
918
- var cr = I((B) => {
918
+ var lr = I((z) => {
919
919
  "use strict";
920
- var Oa = B && B.__createBinding || (Object.create ? function(r, e, t, o) {
920
+ var Aa = z && z.__createBinding || (Object.create ? function(r, e, t, o) {
921
921
  o === void 0 && (o = t);
922
922
  var s = Object.getOwnPropertyDescriptor(e, t);
923
923
  (!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ n(function() {
@@ -925,25 +925,25 @@ var cr = I((B) => {
925
925
  }, "get") }), Object.defineProperty(r, o, s);
926
926
  } : function(r, e, t, o) {
927
927
  o === void 0 && (o = t), r[o] = e[t];
928
- }), Da = B && B.__exportStar || function(r, e) {
929
- for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Oa(e, r, t);
928
+ }), Ea = z && z.__exportStar || function(r, e) {
929
+ for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Aa(e, r, t);
930
930
  };
931
- Object.defineProperty(B, "__esModule", { value: !0 });
932
- B.stringify = B.parse = void 0;
933
- var ka = nn();
934
- Object.defineProperty(B, "parse", { enumerable: !0, get: /* @__PURE__ */ n(function() {
935
- return ka.parse;
931
+ Object.defineProperty(z, "__esModule", { value: !0 });
932
+ z.stringify = z.parse = void 0;
933
+ var Ca = Ko();
934
+ Object.defineProperty(z, "parse", { enumerable: !0, get: /* @__PURE__ */ n(function() {
935
+ return Ca.parse;
936
936
  }, "get") });
937
- var ja = sn();
938
- Object.defineProperty(B, "stringify", { enumerable: !0, get: /* @__PURE__ */ n(function() {
939
- return ja.stringify;
937
+ var va = Xo();
938
+ Object.defineProperty(z, "stringify", { enumerable: !0, get: /* @__PURE__ */ n(function() {
939
+ return va.stringify;
940
940
  }, "get") });
941
- Da(sr(), B);
941
+ Ea(nr(), z);
942
942
  });
943
943
 
944
944
  // ../node_modules/entities/lib/maps/entities.json
945
- var ht = I((Lf, Ua) => {
946
- Ua.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
945
+ var mt = I((Sf, _a) => {
946
+ _a.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
947
947
  \xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}",
948
948
  Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\
949
949
  \u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220",
@@ -1224,8 +1224,8 @@ var ht = I((Lf, Ua) => {
1224
1224
  });
1225
1225
 
1226
1226
  // ../node_modules/entities/lib/maps/legacy.json
1227
- var fn = I((qf, Ha) => {
1228
- Ha.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
1227
+ var on = I((Tf, Na) => {
1228
+ Na.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
1229
1229
  \xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\
1230
1230
  \xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9",
1231
1231
  eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\
@@ -1239,25 +1239,25 @@ var fn = I((qf, Ha) => {
1239
1239
  });
1240
1240
 
1241
1241
  // ../node_modules/entities/lib/maps/xml.json
1242
- var gt = I((Bf, Va) => {
1243
- Va.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
1242
+ var ht = I((xf, La) => {
1243
+ La.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
1244
1244
  });
1245
1245
 
1246
1246
  // ../node_modules/entities/lib/maps/decode.json
1247
- var yn = I((zf, Wa) => {
1248
- Wa.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
1247
+ var nn = I((Rf, qa) => {
1248
+ qa.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
1249
1249
  "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212,
1250
1250
  "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 };
1251
1251
  });
1252
1252
 
1253
1253
  // ../node_modules/entities/lib/decode_codepoint.js
1254
- var hn = I((ze) => {
1254
+ var an = I((ze) => {
1255
1255
  "use strict";
1256
- var $a = ze && ze.__importDefault || function(r) {
1256
+ var za = ze && ze.__importDefault || function(r) {
1257
1257
  return r && r.__esModule ? r : { default: r };
1258
1258
  };
1259
1259
  Object.defineProperty(ze, "__esModule", { value: !0 });
1260
- var mn = $a(yn()), Ya = (
1260
+ var sn = za(nn()), Ba = (
1261
1261
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1262
1262
  String.fromCodePoint || function(r) {
1263
1263
  var e = "";
@@ -1265,38 +1265,38 @@ var hn = I((ze) => {
1265
1265
  e;
1266
1266
  }
1267
1267
  );
1268
- function Ka(r) {
1269
- return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in mn.default && (r = mn.default[r]), Ya(r));
1268
+ function Ga(r) {
1269
+ return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in sn.default && (r = sn.default[r]), Ba(r));
1270
1270
  }
1271
- n(Ka, "decodeCodePoint");
1272
- ze.default = Ka;
1271
+ n(Ga, "decodeCodePoint");
1272
+ ze.default = Ga;
1273
1273
  });
1274
1274
 
1275
1275
  // ../node_modules/entities/lib/decode.js
1276
- var St = I((H) => {
1276
+ var bt = I((H) => {
1277
1277
  "use strict";
1278
- var dr = H && H.__importDefault || function(r) {
1278
+ var cr = H && H.__importDefault || function(r) {
1279
1279
  return r && r.__esModule ? r : { default: r };
1280
1280
  };
1281
1281
  Object.defineProperty(H, "__esModule", { value: !0 });
1282
1282
  H.decodeHTML = H.decodeHTMLStrict = H.decodeXML = void 0;
1283
- var bt = dr(ht()), Xa = dr(fn()), Ja = dr(gt()), gn = dr(hn()), Qa = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
1284
- H.decodeXML = Sn(Ja.default);
1285
- H.decodeHTMLStrict = Sn(bt.default);
1286
- function Sn(r) {
1287
- var e = Tn(r);
1283
+ var gt = cr(mt()), Ua = cr(on()), Ha = cr(ht()), ln = cr(an()), Va = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
1284
+ H.decodeXML = dn(Ha.default);
1285
+ H.decodeHTMLStrict = dn(gt.default);
1286
+ function dn(r) {
1287
+ var e = pn(r);
1288
1288
  return function(t) {
1289
- return String(t).replace(Qa, e);
1289
+ return String(t).replace(Va, e);
1290
1290
  };
1291
1291
  }
1292
- n(Sn, "getStrictDecoder");
1293
- var bn = /* @__PURE__ */ n(function(r, e) {
1292
+ n(dn, "getStrictDecoder");
1293
+ var cn = /* @__PURE__ */ n(function(r, e) {
1294
1294
  return r < e ? 1 : -1;
1295
1295
  }, "sorter");
1296
1296
  H.decodeHTML = function() {
1297
- for (var r = Object.keys(Xa.default).sort(bn), e = Object.keys(bt.default).sort(bn), t = 0, o = 0; t < e.length; t++)
1297
+ for (var r = Object.keys(Ua.default).sort(cn), e = Object.keys(gt.default).sort(cn), t = 0, o = 0; t < e.length; t++)
1298
1298
  r[o] === e[t] ? (e[t] += ";?", o++) : e[t] += ";";
1299
- var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = Tn(bt.default);
1299
+ var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = pn(gt.default);
1300
1300
  function a(l) {
1301
1301
  return l.substr(-1) !== ";" && (l += ";"), i(l);
1302
1302
  }
@@ -1304,38 +1304,38 @@ var St = I((H) => {
1304
1304
  return String(l).replace(s, a);
1305
1305
  };
1306
1306
  }();
1307
- function Tn(r) {
1307
+ function pn(r) {
1308
1308
  return /* @__PURE__ */ n(function(t) {
1309
1309
  if (t.charAt(1) === "#") {
1310
1310
  var o = t.charAt(2);
1311
- return o === "X" || o === "x" ? gn.default(parseInt(t.substr(3), 16)) : gn.default(parseInt(t.substr(2), 10));
1311
+ return o === "X" || o === "x" ? ln.default(parseInt(t.substr(3), 16)) : ln.default(parseInt(t.substr(2), 10));
1312
1312
  }
1313
1313
  return r[t.slice(1, -1)] || t;
1314
1314
  }, "replace");
1315
1315
  }
1316
- n(Tn, "getReplacer");
1316
+ n(pn, "getReplacer");
1317
1317
  });
1318
1318
 
1319
1319
  // ../node_modules/entities/lib/encode.js
1320
- var xt = I((M) => {
1320
+ var Tt = I((M) => {
1321
1321
  "use strict";
1322
- var xn = M && M.__importDefault || function(r) {
1322
+ var un = M && M.__importDefault || function(r) {
1323
1323
  return r && r.__esModule ? r : { default: r };
1324
1324
  };
1325
1325
  Object.defineProperty(M, "__esModule", { value: !0 });
1326
1326
  M.escapeUTF8 = M.escape = M.encodeNonAsciiHTML = M.encodeHTML = M.encodeXML = void 0;
1327
- var Za = xn(gt()), Rn = An(Za.default), wn = En(Rn);
1328
- M.encodeXML = Pn(Rn);
1329
- var el = xn(ht()), Tt = An(el.default), rl = En(Tt);
1330
- M.encodeHTML = ol(Tt, rl);
1331
- M.encodeNonAsciiHTML = Pn(Tt);
1332
- function An(r) {
1327
+ var Wa = un(ht()), fn = mn(Wa.default), yn = hn(fn);
1328
+ M.encodeXML = Sn(fn);
1329
+ var $a = un(mt()), St = mn($a.default), Ya = hn(St);
1330
+ M.encodeHTML = Xa(St, Ya);
1331
+ M.encodeNonAsciiHTML = Sn(St);
1332
+ function mn(r) {
1333
1333
  return Object.keys(r).sort().reduce(function(e, t) {
1334
1334
  return e[r[t]] = "&" + t + ";", e;
1335
1335
  }, {});
1336
1336
  }
1337
- n(An, "getInverseObj");
1338
- function En(r) {
1337
+ n(mn, "getInverseObj");
1338
+ function hn(r) {
1339
1339
  for (var e = [], t = [], o = 0, s = Object.keys(r); o < s.length; o++) {
1340
1340
  var i = s[o];
1341
1341
  i.length === 1 ? e.push("\\" + i) : t.push(i);
@@ -1349,9 +1349,9 @@ var xt = I((M) => {
1349
1349
  }
1350
1350
  return t.unshift("[" + e.join("") + "]"), new RegExp(t.join("|"), "g");
1351
1351
  }
1352
- n(En, "getInverseReplacer");
1353
- var Cn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1354
- tl = (
1352
+ n(hn, "getInverseReplacer");
1353
+ var gn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1354
+ Ka = (
1355
1355
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1356
1356
  String.prototype.codePointAt != null ? (
1357
1357
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -1365,63 +1365,63 @@ var xt = I((M) => {
1365
1365
  }
1366
1366
  )
1367
1367
  );
1368
- function pr(r) {
1369
- return "&#x" + (r.length > 1 ? tl(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
1368
+ function dr(r) {
1369
+ return "&#x" + (r.length > 1 ? Ka(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
1370
1370
  }
1371
- n(pr, "singleCharReplacer");
1372
- function ol(r, e) {
1371
+ n(dr, "singleCharReplacer");
1372
+ function Xa(r, e) {
1373
1373
  return function(t) {
1374
1374
  return t.replace(e, function(o) {
1375
1375
  return r[o];
1376
- }).replace(Cn, pr);
1376
+ }).replace(gn, dr);
1377
1377
  };
1378
1378
  }
1379
- n(ol, "getInverse");
1380
- var vn = new RegExp(wn.source + "|" + Cn.source, "g");
1381
- function nl(r) {
1382
- return r.replace(vn, pr);
1379
+ n(Xa, "getInverse");
1380
+ var bn = new RegExp(yn.source + "|" + gn.source, "g");
1381
+ function Ja(r) {
1382
+ return r.replace(bn, dr);
1383
1383
  }
1384
- n(nl, "escape");
1385
- M.escape = nl;
1386
- function sl(r) {
1387
- return r.replace(wn, pr);
1384
+ n(Ja, "escape");
1385
+ M.escape = Ja;
1386
+ function Qa(r) {
1387
+ return r.replace(yn, dr);
1388
1388
  }
1389
- n(sl, "escapeUTF8");
1390
- M.escapeUTF8 = sl;
1391
- function Pn(r) {
1389
+ n(Qa, "escapeUTF8");
1390
+ M.escapeUTF8 = Qa;
1391
+ function Sn(r) {
1392
1392
  return function(e) {
1393
- return e.replace(vn, function(t) {
1394
- return r[t] || pr(t);
1393
+ return e.replace(bn, function(t) {
1394
+ return r[t] || dr(t);
1395
1395
  });
1396
1396
  };
1397
1397
  }
1398
- n(Pn, "getASCIIEncoder");
1398
+ n(Sn, "getASCIIEncoder");
1399
1399
  });
1400
1400
 
1401
1401
  // ../node_modules/entities/lib/index.js
1402
- var In = I((A) => {
1402
+ var xn = I((A) => {
1403
1403
  "use strict";
1404
1404
  Object.defineProperty(A, "__esModule", { value: !0 });
1405
1405
  A.decodeXMLStrict = A.decodeHTML5Strict = A.decodeHTML4Strict = A.decodeHTML5 = A.decodeHTML4 = A.decodeHTMLStrict = A.decodeHTML = A.decodeXML =
1406
1406
  A.encodeHTML5 = A.encodeHTML4 = A.escapeUTF8 = A.escape = A.encodeNonAsciiHTML = A.encodeHTML = A.encodeXML = A.encode = A.decodeStrict = A.
1407
1407
  decode = void 0;
1408
- var ur = St(), Fn = xt();
1409
- function il(r, e) {
1410
- return (!e || e <= 0 ? ur.decodeXML : ur.decodeHTML)(r);
1411
- }
1412
- n(il, "decode");
1413
- A.decode = il;
1414
- function al(r, e) {
1415
- return (!e || e <= 0 ? ur.decodeXML : ur.decodeHTMLStrict)(r);
1416
- }
1417
- n(al, "decodeStrict");
1418
- A.decodeStrict = al;
1419
- function ll(r, e) {
1420
- return (!e || e <= 0 ? Fn.encodeXML : Fn.encodeHTML)(r);
1421
- }
1422
- n(ll, "encode");
1423
- A.encode = ll;
1424
- var ce = xt();
1408
+ var pr = bt(), Tn = Tt();
1409
+ function Za(r, e) {
1410
+ return (!e || e <= 0 ? pr.decodeXML : pr.decodeHTML)(r);
1411
+ }
1412
+ n(Za, "decode");
1413
+ A.decode = Za;
1414
+ function el(r, e) {
1415
+ return (!e || e <= 0 ? pr.decodeXML : pr.decodeHTMLStrict)(r);
1416
+ }
1417
+ n(el, "decodeStrict");
1418
+ A.decodeStrict = el;
1419
+ function rl(r, e) {
1420
+ return (!e || e <= 0 ? Tn.encodeXML : Tn.encodeHTML)(r);
1421
+ }
1422
+ n(rl, "encode");
1423
+ A.encode = rl;
1424
+ var ce = Tt();
1425
1425
  Object.defineProperty(A, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1426
1426
  return ce.encodeXML;
1427
1427
  }, "get") });
@@ -1443,7 +1443,7 @@ var In = I((A) => {
1443
1443
  Object.defineProperty(A, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1444
1444
  return ce.encodeHTML;
1445
1445
  }, "get") });
1446
- var ee = St();
1446
+ var ee = bt();
1447
1447
  Object.defineProperty(A, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1448
1448
  return ee.decodeXML;
1449
1449
  }, "get") });
@@ -1471,28 +1471,28 @@ var In = I((A) => {
1471
1471
  });
1472
1472
 
1473
1473
  // ../node_modules/ansi-to-html/lib/ansi_to_html.js
1474
- var zn = I((Xf, Bn) => {
1474
+ var Dn = I((Of, On) => {
1475
1475
  "use strict";
1476
- function cl(r, e) {
1476
+ function tl(r, e) {
1477
1477
  if (!(r instanceof e))
1478
1478
  throw new TypeError("Cannot call a class as a function");
1479
1479
  }
1480
- n(cl, "_classCallCheck");
1481
- function On(r, e) {
1480
+ n(tl, "_classCallCheck");
1481
+ function Rn(r, e) {
1482
1482
  for (var t = 0; t < e.length; t++) {
1483
1483
  var o = e[t];
1484
1484
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
1485
1485
  }
1486
1486
  }
1487
- n(On, "_defineProperties");
1488
- function dl(r, e, t) {
1489
- return e && On(r.prototype, e), t && On(r, t), r;
1487
+ n(Rn, "_defineProperties");
1488
+ function ol(r, e, t) {
1489
+ return e && Rn(r.prototype, e), t && Rn(r, t), r;
1490
1490
  }
1491
- n(dl, "_createClass");
1492
- function Nn(r, e) {
1491
+ n(ol, "_createClass");
1492
+ function Pn(r, e) {
1493
1493
  var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
1494
1494
  if (!t) {
1495
- if (Array.isArray(r) || (t = pl(r)) || e && r && typeof r.length == "number") {
1495
+ if (Array.isArray(r) || (t = nl(r)) || e && r && typeof r.length == "number") {
1496
1496
  t && (r = t);
1497
1497
  var o = 0, s = /* @__PURE__ */ n(function() {
1498
1498
  }, "F");
@@ -1521,32 +1521,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1521
1521
  }
1522
1522
  }, "f") };
1523
1523
  }
1524
- n(Nn, "_createForOfIteratorHelper");
1525
- function pl(r, e) {
1524
+ n(Pn, "_createForOfIteratorHelper");
1525
+ function nl(r, e) {
1526
1526
  if (r) {
1527
- if (typeof r == "string") return Dn(r, e);
1527
+ if (typeof r == "string") return wn(r, e);
1528
1528
  var t = Object.prototype.toString.call(r).slice(8, -1);
1529
1529
  if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set") return Array.from(r);
1530
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Dn(r, e);
1530
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return wn(r, e);
1531
1531
  }
1532
1532
  }
1533
- n(pl, "_unsupportedIterableToArray");
1534
- function Dn(r, e) {
1533
+ n(nl, "_unsupportedIterableToArray");
1534
+ function wn(r, e) {
1535
1535
  (e == null || e > r.length) && (e = r.length);
1536
1536
  for (var t = 0, o = new Array(e); t < e; t++)
1537
1537
  o[t] = r[t];
1538
1538
  return o;
1539
1539
  }
1540
- n(Dn, "_arrayLikeToArray");
1541
- var ul = In(), kn = {
1540
+ n(wn, "_arrayLikeToArray");
1541
+ var sl = xn(), An = {
1542
1542
  fg: "#FFF",
1543
1543
  bg: "#000",
1544
1544
  newline: !1,
1545
1545
  escapeXML: !1,
1546
1546
  stream: !1,
1547
- colors: fl()
1547
+ colors: il()
1548
1548
  };
1549
- function fl() {
1549
+ function il() {
1550
1550
  var r = {
1551
1551
  0: "#000",
1552
1552
  1: "#A00",
@@ -1565,35 +1565,35 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1565
1565
  14: "#5FF",
1566
1566
  15: "#FFF"
1567
1567
  };
1568
- return fr(0, 5).forEach(function(e) {
1569
- fr(0, 5).forEach(function(t) {
1570
- fr(0, 5).forEach(function(o) {
1571
- return yl(e, t, o, r);
1568
+ return ur(0, 5).forEach(function(e) {
1569
+ ur(0, 5).forEach(function(t) {
1570
+ ur(0, 5).forEach(function(o) {
1571
+ return al(e, t, o, r);
1572
1572
  });
1573
1573
  });
1574
- }), fr(0, 23).forEach(function(e) {
1575
- var t = e + 232, o = Ln(e * 10 + 8);
1574
+ }), ur(0, 23).forEach(function(e) {
1575
+ var t = e + 232, o = Fn(e * 10 + 8);
1576
1576
  r[t] = "#" + o + o + o;
1577
1577
  }), r;
1578
1578
  }
1579
- n(fl, "getDefaultColors");
1580
- function yl(r, e, t, o) {
1579
+ n(il, "getDefaultColors");
1580
+ function al(r, e, t, o) {
1581
1581
  var s = 16 + r * 36 + e * 6 + t, i = r > 0 ? r * 40 + 55 : 0, a = e > 0 ? e * 40 + 55 : 0, l = t > 0 ? t * 40 + 55 : 0;
1582
- o[s] = ml([i, a, l]);
1582
+ o[s] = ll([i, a, l]);
1583
1583
  }
1584
- n(yl, "setStyleColor");
1585
- function Ln(r) {
1584
+ n(al, "setStyleColor");
1585
+ function Fn(r) {
1586
1586
  for (var e = r.toString(16); e.length < 2; )
1587
1587
  e = "0" + e;
1588
1588
  return e;
1589
1589
  }
1590
- n(Ln, "toHexString");
1591
- function ml(r) {
1592
- var e = [], t = Nn(r), o;
1590
+ n(Fn, "toHexString");
1591
+ function ll(r) {
1592
+ var e = [], t = Pn(r), o;
1593
1593
  try {
1594
1594
  for (t.s(); !(o = t.n()).done; ) {
1595
1595
  var s = o.value;
1596
- e.push(Ln(s));
1596
+ e.push(Fn(s));
1597
1597
  }
1598
1598
  } catch (i) {
1599
1599
  t.e(i);
@@ -1602,29 +1602,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1602
1602
  }
1603
1603
  return "#" + e.join("");
1604
1604
  }
1605
- n(ml, "toColorHexString");
1606
- function jn(r, e, t, o) {
1605
+ n(ll, "toColorHexString");
1606
+ function En(r, e, t, o) {
1607
1607
  var s;
1608
- return e === "text" ? s = Sl(t, o) : e === "display" ? s = gl(r, t, o) : e === "xterm256Foreground" ? s = mr(r, o.colors[t]) : e === "xt\
1609
- erm256Background" ? s = hr(r, o.colors[t]) : e === "rgb" && (s = hl(r, t)), s;
1608
+ return e === "text" ? s = ul(t, o) : e === "display" ? s = dl(r, t, o) : e === "xterm256Foreground" ? s = yr(r, o.colors[t]) : e === "xt\
1609
+ erm256Background" ? s = mr(r, o.colors[t]) : e === "rgb" && (s = cl(r, t)), s;
1610
1610
  }
1611
- n(jn, "generateOutput");
1612
- function hl(r, e) {
1611
+ n(En, "generateOutput");
1612
+ function cl(r, e) {
1613
1613
  e = e.substring(2).slice(0, -1);
1614
1614
  var t = +e.substr(0, 2), o = e.substring(5).split(";"), s = o.map(function(i) {
1615
1615
  return ("0" + Number(i).toString(16)).substr(-2);
1616
1616
  }).join("");
1617
- return yr(r, (t === 38 ? "color:#" : "background-color:#") + s);
1617
+ return fr(r, (t === 38 ? "color:#" : "background-color:#") + s);
1618
1618
  }
1619
- n(hl, "handleRgb");
1620
- function gl(r, e, t) {
1619
+ n(cl, "handleRgb");
1620
+ function dl(r, e, t) {
1621
1621
  e = parseInt(e, 10);
1622
1622
  var o = {
1623
1623
  "-1": /* @__PURE__ */ n(function() {
1624
1624
  return "<br/>";
1625
1625
  }, "_"),
1626
1626
  0: /* @__PURE__ */ n(function() {
1627
- return r.length && qn(r);
1627
+ return r.length && In(r);
1628
1628
  }, "_"),
1629
1629
  1: /* @__PURE__ */ n(function() {
1630
1630
  return re(r, "b");
@@ -1636,89 +1636,89 @@ erm256Background" ? s = hr(r, o.colors[t]) : e === "rgb" && (s = hl(r, t)), s;
1636
1636
  return re(r, "u");
1637
1637
  }, "_"),
1638
1638
  8: /* @__PURE__ */ n(function() {
1639
- return yr(r, "display:none");
1639
+ return fr(r, "display:none");
1640
1640
  }, "_"),
1641
1641
  9: /* @__PURE__ */ n(function() {
1642
1642
  return re(r, "strike");
1643
1643
  }, "_"),
1644
1644
  22: /* @__PURE__ */ n(function() {
1645
- return yr(r, "font-weight:normal;text-decoration:none;font-style:normal");
1645
+ return fr(r, "font-weight:normal;text-decoration:none;font-style:normal");
1646
1646
  }, "_"),
1647
1647
  23: /* @__PURE__ */ n(function() {
1648
- return _n(r, "i");
1648
+ return vn(r, "i");
1649
1649
  }, "_"),
1650
1650
  24: /* @__PURE__ */ n(function() {
1651
- return _n(r, "u");
1651
+ return vn(r, "u");
1652
1652
  }, "_"),
1653
1653
  39: /* @__PURE__ */ n(function() {
1654
- return mr(r, t.fg);
1654
+ return yr(r, t.fg);
1655
1655
  }, "_"),
1656
1656
  49: /* @__PURE__ */ n(function() {
1657
- return hr(r, t.bg);
1657
+ return mr(r, t.bg);
1658
1658
  }, "_"),
1659
1659
  53: /* @__PURE__ */ n(function() {
1660
- return yr(r, "text-decoration:overline");
1660
+ return fr(r, "text-decoration:overline");
1661
1661
  }, "_")
1662
1662
  }, s;
1663
- return o[e] ? s = o[e]() : 4 < e && e < 7 ? s = re(r, "blink") : 29 < e && e < 38 ? s = mr(r, t.colors[e - 30]) : 39 < e && e < 48 ? s =
1664
- hr(r, t.colors[e - 40]) : 89 < e && e < 98 ? s = mr(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (s = hr(r, t.colors[8 + (e - 100)])),
1663
+ return o[e] ? s = o[e]() : 4 < e && e < 7 ? s = re(r, "blink") : 29 < e && e < 38 ? s = yr(r, t.colors[e - 30]) : 39 < e && e < 48 ? s =
1664
+ mr(r, t.colors[e - 40]) : 89 < e && e < 98 ? s = yr(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (s = mr(r, t.colors[8 + (e - 100)])),
1665
1665
  s;
1666
1666
  }
1667
- n(gl, "handleDisplay");
1668
- function qn(r) {
1667
+ n(dl, "handleDisplay");
1668
+ function In(r) {
1669
1669
  var e = r.slice(0);
1670
1670
  return r.length = 0, e.reverse().map(function(t) {
1671
1671
  return "</" + t + ">";
1672
1672
  }).join("");
1673
1673
  }
1674
- n(qn, "resetStyles");
1675
- function fr(r, e) {
1674
+ n(In, "resetStyles");
1675
+ function ur(r, e) {
1676
1676
  for (var t = [], o = r; o <= e; o++)
1677
1677
  t.push(o);
1678
1678
  return t;
1679
1679
  }
1680
- n(fr, "range");
1681
- function bl(r) {
1680
+ n(ur, "range");
1681
+ function pl(r) {
1682
1682
  return function(e) {
1683
1683
  return (r === null || e.category !== r) && r !== "all";
1684
1684
  };
1685
1685
  }
1686
- n(bl, "notCategory");
1687
- function Mn(r) {
1686
+ n(pl, "notCategory");
1687
+ function Cn(r) {
1688
1688
  r = parseInt(r, 10);
1689
1689
  var e = null;
1690
1690
  return r === 0 ? e = "all" : r === 1 ? e = "bold" : 2 < r && r < 5 ? e = "underline" : 4 < r && r < 7 ? e = "blink" : r === 8 ? e = "hid\
1691
1691
  e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ? e = "foreground-color" : (39 < r && r < 48 || r === 49 || 99 <
1692
1692
  r && r < 108) && (e = "background-color"), e;
1693
1693
  }
1694
- n(Mn, "categoryForCode");
1695
- function Sl(r, e) {
1696
- return e.escapeXML ? ul.encodeXML(r) : r;
1694
+ n(Cn, "categoryForCode");
1695
+ function ul(r, e) {
1696
+ return e.escapeXML ? sl.encodeXML(r) : r;
1697
1697
  }
1698
- n(Sl, "pushText");
1698
+ n(ul, "pushText");
1699
1699
  function re(r, e, t) {
1700
1700
  return t || (t = ""), r.push(e), "<".concat(e).concat(t ? ' style="'.concat(t, '"') : "", ">");
1701
1701
  }
1702
1702
  n(re, "pushTag");
1703
- function yr(r, e) {
1703
+ function fr(r, e) {
1704
1704
  return re(r, "span", e);
1705
1705
  }
1706
- n(yr, "pushStyle");
1707
- function mr(r, e) {
1706
+ n(fr, "pushStyle");
1707
+ function yr(r, e) {
1708
1708
  return re(r, "span", "color:" + e);
1709
1709
  }
1710
- n(mr, "pushForegroundColor");
1711
- function hr(r, e) {
1710
+ n(yr, "pushForegroundColor");
1711
+ function mr(r, e) {
1712
1712
  return re(r, "span", "background-color:" + e);
1713
1713
  }
1714
- n(hr, "pushBackgroundColor");
1715
- function _n(r, e) {
1714
+ n(mr, "pushBackgroundColor");
1715
+ function vn(r, e) {
1716
1716
  var t;
1717
1717
  if (r.slice(-1)[0] === e && (t = r.pop()), t)
1718
1718
  return "</" + e + ">";
1719
1719
  }
1720
- n(_n, "closeTag");
1721
- function Tl(r, e, t) {
1720
+ n(vn, "closeTag");
1721
+ function fl(r, e, t) {
1722
1722
  var o = !1, s = 3;
1723
1723
  function i() {
1724
1724
  return "";
@@ -1738,7 +1738,7 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1738
1738
  n(c, "newline");
1739
1739
  function d(R, w) {
1740
1740
  o = !0, w.trim().length === 0 && (w = "0"), w = w.trimRight(";").split(";");
1741
- var E = Nn(w), D;
1741
+ var E = Pn(w), D;
1742
1742
  try {
1743
1743
  for (E.s(); !(D = E.n()).done; ) {
1744
1744
  var k = D.value;
@@ -1839,61 +1839,61 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1839
1839
  }
1840
1840
  return g;
1841
1841
  }
1842
- n(Tl, "tokenize");
1843
- function xl(r, e, t) {
1844
- return e !== "text" && (r = r.filter(bl(Mn(t))), r.push({
1842
+ n(fl, "tokenize");
1843
+ function yl(r, e, t) {
1844
+ return e !== "text" && (r = r.filter(pl(Cn(t))), r.push({
1845
1845
  token: e,
1846
1846
  data: t,
1847
- category: Mn(t)
1847
+ category: Cn(t)
1848
1848
  })), r;
1849
1849
  }
1850
- n(xl, "updateStickyStack");
1851
- var Rl = /* @__PURE__ */ function() {
1850
+ n(yl, "updateStickyStack");
1851
+ var ml = /* @__PURE__ */ function() {
1852
1852
  function r(e) {
1853
- cl(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, kn.colors, e.colors)), this.options = Object.assign({}, kn, e), this.
1853
+ tl(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, An.colors, e.colors)), this.options = Object.assign({}, An, e), this.
1854
1854
  stack = [], this.stickyStack = [];
1855
1855
  }
1856
- return n(r, "Filter"), dl(r, [{
1856
+ return n(r, "Filter"), ol(r, [{
1857
1857
  key: "toHtml",
1858
1858
  value: /* @__PURE__ */ n(function(t) {
1859
1859
  var o = this;
1860
1860
  t = typeof t == "string" ? [t] : t;
1861
1861
  var s = this.stack, i = this.options, a = [];
1862
1862
  return this.stickyStack.forEach(function(l) {
1863
- var c = jn(s, l.token, l.data, i);
1863
+ var c = En(s, l.token, l.data, i);
1864
1864
  c && a.push(c);
1865
- }), Tl(t.join(""), i, function(l, c) {
1866
- var d = jn(s, l, c, i);
1867
- d && a.push(d), i.stream && (o.stickyStack = xl(o.stickyStack, l, c));
1868
- }), s.length && a.push(qn(s)), a.join("");
1865
+ }), fl(t.join(""), i, function(l, c) {
1866
+ var d = En(s, l, c, i);
1867
+ d && a.push(d), i.stream && (o.stickyStack = yl(o.stickyStack, l, c));
1868
+ }), s.length && a.push(In(s)), a.join("");
1869
1869
  }, "toHtml")
1870
1870
  }]), r;
1871
1871
  }();
1872
- Bn.exports = Rl;
1872
+ On.exports = ml;
1873
1873
  });
1874
1874
 
1875
1875
  // src/preview-api/modules/addons/main.ts
1876
- import { global as xr } from "@storybook/global";
1876
+ import { global as Tr } from "@storybook/global";
1877
1877
 
1878
1878
  // src/preview-api/modules/addons/storybook-channel-mock.ts
1879
- import { Channel as ss } from "storybook/internal/channels";
1880
- function Tr() {
1879
+ import { Channel as Xn } from "storybook/internal/channels";
1880
+ function Sr() {
1881
1881
  let r = {
1882
1882
  setHandler: /* @__PURE__ */ n(() => {
1883
1883
  }, "setHandler"),
1884
1884
  send: /* @__PURE__ */ n(() => {
1885
1885
  }, "send")
1886
1886
  };
1887
- return new ss({ transport: r });
1887
+ return new Xn({ transport: r });
1888
1888
  }
1889
- n(Tr, "mockChannel");
1889
+ n(Sr, "mockChannel");
1890
1890
 
1891
1891
  // src/preview-api/modules/addons/main.ts
1892
- var Ar = class Ar {
1892
+ var wr = class wr {
1893
1893
  constructor() {
1894
1894
  this.getChannel = /* @__PURE__ */ n(() => {
1895
1895
  if (!this.channel) {
1896
- let e = Tr();
1896
+ let e = Sr();
1897
1897
  return this.setChannel(e), e;
1898
1898
  }
1899
1899
  return this.channel;
@@ -1908,31 +1908,25 @@ var Ar = class Ar {
1908
1908
  });
1909
1909
  }
1910
1910
  };
1911
- n(Ar, "AddonStore");
1912
- var wr = Ar, Rr = "__STORYBOOK_ADDONS_PREVIEW";
1913
- function is() {
1914
- return xr[Rr] || (xr[Rr] = new wr()), xr[Rr];
1911
+ n(wr, "AddonStore");
1912
+ var Rr = wr, xr = "__STORYBOOK_ADDONS_PREVIEW";
1913
+ function Jn() {
1914
+ return Tr[xr] || (Tr[xr] = new Rr()), Tr[xr];
1915
1915
  }
1916
- n(is, "getAddonsStore");
1917
- var _ = is();
1918
-
1919
- // src/preview-api/modules/addons/definePreview.ts
1920
- function as(r) {
1921
- return r;
1922
- }
1923
- n(as, "definePreview");
1916
+ n(Jn, "getAddonsStore");
1917
+ var _ = Jn();
1924
1918
 
1925
1919
  // src/preview-api/modules/addons/hooks.ts
1926
1920
  import { logger as Ce } from "storybook/internal/client-logger";
1927
1921
  import {
1928
- FORCE_RE_RENDER as ls,
1929
- RESET_STORY_ARGS as cs,
1930
- STORY_RENDERED as vt,
1931
- UPDATE_GLOBALS as ds,
1932
- UPDATE_STORY_ARGS as ps
1922
+ FORCE_RE_RENDER as Qn,
1923
+ RESET_STORY_ARGS as Zn,
1924
+ STORY_RENDERED as Ct,
1925
+ UPDATE_GLOBALS as es,
1926
+ UPDATE_STORY_ARGS as rs
1933
1927
  } from "storybook/internal/core-events";
1934
- import { global as Ue } from "@storybook/global";
1935
- var Fr = class Fr {
1928
+ import { global as Ge } from "@storybook/global";
1929
+ var Pr = class Pr {
1936
1930
  constructor() {
1937
1931
  this.hookListsMap = void 0;
1938
1932
  this.mountedDecorators = void 0;
@@ -1972,24 +1966,24 @@ var Fr = class Fr {
1972
1966
  }), this.prevEffects = this.currentEffects, this.currentEffects = [];
1973
1967
  }
1974
1968
  addRenderListeners() {
1975
- this.removeRenderListeners(), _.getChannel().on(vt, this.renderListener);
1969
+ this.removeRenderListeners(), _.getChannel().on(Ct, this.renderListener);
1976
1970
  }
1977
1971
  removeRenderListeners() {
1978
- _.getChannel().removeListener(vt, this.renderListener);
1972
+ _.getChannel().removeListener(Ct, this.renderListener);
1979
1973
  }
1980
1974
  };
1981
- n(Fr, "HooksContext");
1982
- var te = Fr;
1983
- function Pt(r) {
1975
+ n(Pr, "HooksContext");
1976
+ var te = Pr;
1977
+ function vt(r) {
1984
1978
  let e = /* @__PURE__ */ n((...t) => {
1985
1979
  let { hooks: o } = typeof t[0] == "function" ? t[1] : t[0], s = o.currentPhase, i = o.currentHooks, a = o.nextHookIndex, l = o.currentDecoratorName;
1986
1980
  o.currentDecoratorName = r.name, o.prevMountedDecorators.has(r) ? (o.currentPhase = "UPDATE", o.currentHooks = o.hookListsMap.get(r) || []) :
1987
1981
  (o.currentPhase = "MOUNT", o.currentHooks = [], o.hookListsMap.set(r, o.currentHooks), o.prevMountedDecorators.add(r)), o.nextHookIndex =
1988
1982
  0;
1989
- let c = Ue.STORYBOOK_HOOKS_CONTEXT;
1990
- Ue.STORYBOOK_HOOKS_CONTEXT = o;
1983
+ let c = Ge.STORYBOOK_HOOKS_CONTEXT;
1984
+ Ge.STORYBOOK_HOOKS_CONTEXT = o;
1991
1985
  let d = r(...t);
1992
- if (Ue.STORYBOOK_HOOKS_CONTEXT = c, o.currentPhase === "UPDATE" && o.getNextHook() != null)
1986
+ if (Ge.STORYBOOK_HOOKS_CONTEXT = c, o.currentPhase === "UPDATE" && o.getNextHook() != null)
1993
1987
  throw new Error(
1994
1988
  "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
1995
1989
  );
@@ -1997,39 +1991,39 @@ function Pt(r) {
1997
1991
  }, "hookified");
1998
1992
  return e.originalFn = r, e;
1999
1993
  }
2000
- n(Pt, "hookify");
2001
- var Er = 0, us = 25, Cr = /* @__PURE__ */ n((r) => (e, t) => {
1994
+ n(vt, "hookify");
1995
+ var Ar = 0, ts = 25, Er = /* @__PURE__ */ n((r) => (e, t) => {
2002
1996
  let o = r(
2003
- Pt(e),
2004
- t.map((s) => Pt(s))
1997
+ vt(e),
1998
+ t.map((s) => vt(s))
2005
1999
  );
2006
2000
  return (s) => {
2007
2001
  let { hooks: i } = s;
2008
2002
  i.prevMountedDecorators ??= /* @__PURE__ */ new Set(), i.mountedDecorators = /* @__PURE__ */ new Set([e, ...t]), i.currentContext = s, i.
2009
2003
  hasUpdates = !1;
2010
2004
  let a = o(s);
2011
- for (Er = 1; i.hasUpdates; )
2012
- if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), Er += 1, Er > us)
2005
+ for (Ar = 1; i.hasUpdates; )
2006
+ if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), Ar += 1, Ar > ts)
2013
2007
  throw new Error(
2014
2008
  "Too many re-renders. Storybook limits the number of renders to prevent an infinite loop."
2015
2009
  );
2016
2010
  return i.addRenderListeners(), a;
2017
2011
  };
2018
- }, "applyHooks"), fs = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), vr = /* @__PURE__ */ n(
2012
+ }, "applyHooks"), os = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), Cr = /* @__PURE__ */ n(
2019
2013
  () => new Error("Storybook preview hooks can only be called inside decorators and story functions."), "invalidHooksError");
2020
- function Ft() {
2021
- return Ue.STORYBOOK_HOOKS_CONTEXT || null;
2014
+ function Pt() {
2015
+ return Ge.STORYBOOK_HOOKS_CONTEXT || null;
2022
2016
  }
2023
- n(Ft, "getHooksContextOrNull");
2024
- function Pr() {
2025
- let r = Ft();
2017
+ n(Pt, "getHooksContextOrNull");
2018
+ function vr() {
2019
+ let r = Pt();
2026
2020
  if (r == null)
2027
- throw vr();
2021
+ throw Cr();
2028
2022
  return r;
2029
2023
  }
2030
- n(Pr, "getHooksContextOrThrow");
2031
- function ys(r, e, t) {
2032
- let o = Pr();
2024
+ n(vr, "getHooksContextOrThrow");
2025
+ function ns(r, e, t) {
2026
+ let o = vr();
2033
2027
  if (o.currentPhase === "MOUNT") {
2034
2028
  t != null && !Array.isArray(t) && Ce.warn(
2035
2029
  `${r} received a final argument that is not an array (instead, received ${t}). When specified, the final argument must be an array.`
@@ -2050,13 +2044,13 @@ s type cannot change between renders.`
2050
2044
  ), t != null && s.deps != null && t.length !== s.deps.length && Ce.warn(`The final argument passed to ${r} changed size between renders.\
2051
2045
  The order and size of this array must remain constant.
2052
2046
  Previous: ${s.deps}
2053
- Incoming: ${t}`), (t == null || s.deps == null || !fs(t, s.deps)) && (e(s), s.deps = t), s;
2047
+ Incoming: ${t}`), (t == null || s.deps == null || !os(t, s.deps)) && (e(s), s.deps = t), s;
2054
2048
  }
2055
- throw vr();
2049
+ throw Cr();
2056
2050
  }
2057
- n(ys, "useHook");
2058
- function He(r, e, t) {
2059
- let { memoizedState: o } = ys(
2051
+ n(ns, "useHook");
2052
+ function Ue(r, e, t) {
2053
+ let { memoizedState: o } = ns(
2060
2054
  r,
2061
2055
  (s) => {
2062
2056
  s.memoizedState = e();
@@ -2065,104 +2059,104 @@ function He(r, e, t) {
2065
2059
  );
2066
2060
  return o;
2067
2061
  }
2068
- n(He, "useMemoLike");
2069
- function ms(r, e) {
2070
- return He("useMemo", r, e);
2062
+ n(Ue, "useMemoLike");
2063
+ function ss(r, e) {
2064
+ return Ue("useMemo", r, e);
2071
2065
  }
2072
- n(ms, "useMemo");
2066
+ n(ss, "useMemo");
2073
2067
  function ve(r, e) {
2074
- return He("useCallback", () => r, e);
2068
+ return Ue("useCallback", () => r, e);
2075
2069
  }
2076
2070
  n(ve, "useCallback");
2077
- function It(r, e) {
2078
- return He(r, () => ({ current: e }), []);
2071
+ function Ft(r, e) {
2072
+ return Ue(r, () => ({ current: e }), []);
2079
2073
  }
2080
- n(It, "useRefLike");
2081
- function hs(r) {
2082
- return It("useRef", r);
2074
+ n(Ft, "useRefLike");
2075
+ function is(r) {
2076
+ return Ft("useRef", r);
2083
2077
  }
2084
- n(hs, "useRef");
2085
- function gs() {
2086
- let r = Ft();
2078
+ n(is, "useRef");
2079
+ function as() {
2080
+ let r = Pt();
2087
2081
  if (r != null && r.currentPhase !== "NONE")
2088
2082
  r.hasUpdates = !0;
2089
2083
  else
2090
2084
  try {
2091
- _.getChannel().emit(ls);
2085
+ _.getChannel().emit(Qn);
2092
2086
  } catch {
2093
2087
  Ce.warn("State updates of Storybook preview hooks work only in browser");
2094
2088
  }
2095
2089
  }
2096
- n(gs, "triggerUpdate");
2097
- function Ot(r, e) {
2098
- let t = It(
2090
+ n(as, "triggerUpdate");
2091
+ function It(r, e) {
2092
+ let t = Ft(
2099
2093
  r,
2100
2094
  // @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript
2101
2095
  typeof e == "function" ? e() : e
2102
2096
  ), o = /* @__PURE__ */ n((s) => {
2103
- t.current = typeof s == "function" ? s(t.current) : s, gs();
2097
+ t.current = typeof s == "function" ? s(t.current) : s, as();
2104
2098
  }, "setState");
2105
2099
  return [t.current, o];
2106
2100
  }
2107
- n(Ot, "useStateLike");
2108
- function bs(r) {
2109
- return Ot("useState", r);
2101
+ n(It, "useStateLike");
2102
+ function ls(r) {
2103
+ return It("useState", r);
2110
2104
  }
2111
- n(bs, "useState");
2112
- function Ss(r, e, t) {
2113
- let o = t != null ? () => t(e) : e, [s, i] = Ot("useReducer", o);
2105
+ n(ls, "useState");
2106
+ function cs(r, e, t) {
2107
+ let o = t != null ? () => t(e) : e, [s, i] = It("useReducer", o);
2114
2108
  return [s, /* @__PURE__ */ n((l) => i((c) => r(c, l)), "dispatch")];
2115
2109
  }
2116
- n(Ss, "useReducer");
2117
- function Dt(r, e) {
2118
- let t = Pr(), o = He("useEffect", () => ({ create: r }), e);
2110
+ n(cs, "useReducer");
2111
+ function Ot(r, e) {
2112
+ let t = vr(), o = Ue("useEffect", () => ({ create: r }), e);
2119
2113
  t.currentEffects.includes(o) || t.currentEffects.push(o);
2120
2114
  }
2121
- n(Dt, "useEffect");
2122
- function Ts(r, e = []) {
2115
+ n(Ot, "useEffect");
2116
+ function ds(r, e = []) {
2123
2117
  let t = _.getChannel();
2124
- return Dt(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
2118
+ return Ot(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
2125
2119
  Object.entries(r).forEach(
2126
2120
  ([o, s]) => t.removeListener(o, s)
2127
2121
  );
2128
2122
  }), [...Object.keys(r), ...e]), ve(t.emit.bind(t), [t]);
2129
2123
  }
2130
- n(Ts, "useChannel");
2131
- function Ve() {
2132
- let { currentContext: r } = Pr();
2124
+ n(ds, "useChannel");
2125
+ function He() {
2126
+ let { currentContext: r } = vr();
2133
2127
  if (r == null)
2134
- throw vr();
2128
+ throw Cr();
2135
2129
  return r;
2136
2130
  }
2137
- n(Ve, "useStoryContext");
2138
- function xs(r, e) {
2139
- let { parameters: t } = Ve();
2131
+ n(He, "useStoryContext");
2132
+ function ps(r, e) {
2133
+ let { parameters: t } = He();
2140
2134
  if (r)
2141
2135
  return t[r] ?? e;
2142
2136
  }
2143
- n(xs, "useParameter");
2144
- function Rs() {
2145
- let r = _.getChannel(), { id: e, args: t } = Ve(), o = ve(
2146
- (i) => r.emit(ps, { storyId: e, updatedArgs: i }),
2137
+ n(ps, "useParameter");
2138
+ function us() {
2139
+ let r = _.getChannel(), { id: e, args: t } = He(), o = ve(
2140
+ (i) => r.emit(rs, { storyId: e, updatedArgs: i }),
2147
2141
  [r, e]
2148
2142
  ), s = ve(
2149
- (i) => r.emit(cs, { storyId: e, argNames: i }),
2143
+ (i) => r.emit(Zn, { storyId: e, argNames: i }),
2150
2144
  [r, e]
2151
2145
  );
2152
2146
  return [t, o, s];
2153
2147
  }
2154
- n(Rs, "useArgs");
2155
- function ws() {
2156
- let r = _.getChannel(), { globals: e } = Ve(), t = ve(
2157
- (o) => r.emit(ds, { globals: o }),
2148
+ n(us, "useArgs");
2149
+ function fs() {
2150
+ let r = _.getChannel(), { globals: e } = He(), t = ve(
2151
+ (o) => r.emit(es, { globals: o }),
2158
2152
  [r]
2159
2153
  );
2160
2154
  return [e, t];
2161
2155
  }
2162
- n(ws, "useGlobals");
2156
+ n(fs, "useGlobals");
2163
2157
 
2164
2158
  // src/preview-api/modules/addons/make-decorator.ts
2165
- var As = /* @__PURE__ */ n(({
2159
+ var ys = /* @__PURE__ */ n(({
2166
2160
  name: r,
2167
2161
  parameterName: e,
2168
2162
  wrapper: t,
@@ -2186,34 +2180,35 @@ var As = /* @__PURE__ */ n(({
2186
2180
  }, "makeDecorator");
2187
2181
 
2188
2182
  // src/preview-api/modules/store/StoryStore.ts
2183
+ import { getCoreAnnotations as ri } from "storybook/internal/csf";
2189
2184
  import {
2190
- CalledExtractOnStoreError as di,
2191
- MissingStoryFromCsfFileError as pi
2185
+ CalledExtractOnStoreError as ti,
2186
+ MissingStoryFromCsfFileError as oi
2192
2187
  } from "storybook/internal/preview-errors";
2193
2188
 
2194
2189
  // ../node_modules/es-toolkit/dist/function/noop.mjs
2195
- function kt() {
2190
+ function Dt() {
2196
2191
  }
2197
- n(kt, "noop");
2192
+ n(Dt, "noop");
2198
2193
 
2199
2194
  // ../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
2200
- function Ir(r) {
2195
+ function Fr(r) {
2201
2196
  return Object.getOwnPropertySymbols(r).filter((e) => Object.prototype.propertyIsEnumerable.call(r, e));
2202
2197
  }
2203
- n(Ir, "getSymbols");
2198
+ n(Fr, "getSymbols");
2204
2199
 
2205
2200
  // ../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
2206
- function Or(r) {
2201
+ function Ir(r) {
2207
2202
  return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(r);
2208
2203
  }
2209
- n(Or, "getTag");
2204
+ n(Ir, "getTag");
2210
2205
 
2211
2206
  // ../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
2212
- var jt = "[object RegExp]", Mt = "[object String]", _t = "[object Number]", Nt = "[object Boolean]", Dr = "[object Arguments]", Lt = "[objec\
2213
- t Symbol]", qt = "[object Date]", Bt = "[object Map]", zt = "[object Set]", Gt = "[object Array]", Ut = "[object Function]", Ht = "[object A\
2214
- rrayBuffer]", We = "[object Object]", Vt = "[object Error]", Wt = "[object DataView]", $t = "[object Uint8Array]", Yt = "[object Uint8Clampe\
2215
- dArray]", Kt = "[object Uint16Array]", Xt = "[object Uint32Array]", Jt = "[object BigUint64Array]", Qt = "[object Int8Array]", Zt = "[object\
2216
- Int16Array]", eo = "[object Int32Array]", ro = "[object BigInt64Array]", to = "[object Float32Array]", oo = "[object Float64Array]";
2207
+ var kt = "[object RegExp]", jt = "[object String]", Mt = "[object Number]", _t = "[object Boolean]", Or = "[object Arguments]", Nt = "[objec\
2208
+ t Symbol]", Lt = "[object Date]", qt = "[object Map]", zt = "[object Set]", Bt = "[object Array]", Gt = "[object Function]", Ut = "[object A\
2209
+ rrayBuffer]", Ve = "[object Object]", Ht = "[object Error]", Vt = "[object DataView]", Wt = "[object Uint8Array]", $t = "[object Uint8Clampe\
2210
+ dArray]", Yt = "[object Uint16Array]", Kt = "[object Uint32Array]", Xt = "[object BigUint64Array]", Jt = "[object Int8Array]", Qt = "[object\
2211
+ Int16Array]", Zt = "[object Int32Array]", eo = "[object BigInt64Array]", ro = "[object Float32Array]", to = "[object Float64Array]";
2217
2212
 
2218
2213
  // ../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
2219
2214
  function j(r) {
@@ -2237,7 +2232,7 @@ function V(r, e) {
2237
2232
  n(V, "mapValues");
2238
2233
 
2239
2234
  // ../node_modules/es-toolkit/dist/object/pickBy.mjs
2240
- function kr(r, e) {
2235
+ function Dr(r, e) {
2241
2236
  let t = {}, o = Object.keys(r);
2242
2237
  for (let s = 0; s < o.length; s++) {
2243
2238
  let i = o[s], a = r[i];
@@ -2245,19 +2240,19 @@ function kr(r, e) {
2245
2240
  }
2246
2241
  return t;
2247
2242
  }
2248
- n(kr, "pickBy");
2243
+ n(Dr, "pickBy");
2249
2244
 
2250
2245
  // ../node_modules/es-toolkit/dist/compat/util/eq.mjs
2251
- function no(r, e) {
2246
+ function oo(r, e) {
2252
2247
  return r === e || Number.isNaN(r) && Number.isNaN(e);
2253
2248
  }
2254
- n(no, "eq");
2249
+ n(oo, "eq");
2255
2250
 
2256
2251
  // ../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
2257
- function so(r, e, t) {
2252
+ function no(r, e, t) {
2258
2253
  return Pe(r, e, void 0, void 0, void 0, void 0, t);
2259
2254
  }
2260
- n(so, "isEqualWith");
2255
+ n(no, "isEqualWith");
2261
2256
  function Pe(r, e, t, o, s, i, a) {
2262
2257
  let l = a(r, e, t, o, s, i);
2263
2258
  if (l !== void 0)
@@ -2283,23 +2278,23 @@ n(Pe, "isEqualWithImpl");
2283
2278
  function Fe(r, e, t, o) {
2284
2279
  if (Object.is(r, e))
2285
2280
  return !0;
2286
- let s = Or(r), i = Or(e);
2287
- if (s === Dr && (s = We), i === Dr && (i = We), s !== i)
2281
+ let s = Ir(r), i = Ir(e);
2282
+ if (s === Or && (s = Ve), i === Or && (i = Ve), s !== i)
2288
2283
  return !1;
2289
2284
  switch (s) {
2290
- case Mt:
2285
+ case jt:
2291
2286
  return r.toString() === e.toString();
2292
- case _t: {
2287
+ case Mt: {
2293
2288
  let c = r.valueOf(), d = e.valueOf();
2294
- return no(c, d);
2289
+ return oo(c, d);
2295
2290
  }
2296
- case Nt:
2297
- case qt:
2291
+ case _t:
2298
2292
  case Lt:
2293
+ case Nt:
2299
2294
  return Object.is(r.valueOf(), e.valueOf());
2300
- case jt:
2295
+ case kt:
2301
2296
  return r.source === e.source && r.flags === e.flags;
2302
- case Ut:
2297
+ case Gt:
2303
2298
  return r === e;
2304
2299
  }
2305
2300
  t = t ?? /* @__PURE__ */ new Map();
@@ -2309,7 +2304,7 @@ function Fe(r, e, t, o) {
2309
2304
  t.set(r, e), t.set(e, r);
2310
2305
  try {
2311
2306
  switch (s) {
2312
- case Bt: {
2307
+ case qt: {
2313
2308
  if (r.size !== e.size)
2314
2309
  return !1;
2315
2310
  for (let [c, d] of r.entries())
@@ -2329,7 +2324,8 @@ function Fe(r, e, t, o) {
2329
2324
  }
2330
2325
  return !0;
2331
2326
  }
2332
- case Gt:
2327
+ case Bt:
2328
+ case Wt:
2333
2329
  case $t:
2334
2330
  case Yt:
2335
2331
  case Kt:
@@ -2339,8 +2335,7 @@ function Fe(r, e, t, o) {
2339
2335
  case Zt:
2340
2336
  case eo:
2341
2337
  case ro:
2342
- case to:
2343
- case oo: {
2338
+ case to: {
2344
2339
  if (typeof Buffer < "u" && Buffer.isBuffer(r) !== Buffer.isBuffer(e) || r.length !== e.length)
2345
2340
  return !1;
2346
2341
  for (let c = 0; c < r.length; c++)
@@ -2348,16 +2343,16 @@ function Fe(r, e, t, o) {
2348
2343
  return !1;
2349
2344
  return !0;
2350
2345
  }
2351
- case Ht:
2346
+ case Ut:
2352
2347
  return r.byteLength !== e.byteLength ? !1 : Fe(new Uint8Array(r), new Uint8Array(e), t, o);
2353
- case Wt:
2354
- return r.byteLength !== e.byteLength || r.byteOffset !== e.byteOffset ? !1 : Fe(new Uint8Array(r), new Uint8Array(e), t, o);
2355
2348
  case Vt:
2349
+ return r.byteLength !== e.byteLength || r.byteOffset !== e.byteOffset ? !1 : Fe(new Uint8Array(r), new Uint8Array(e), t, o);
2350
+ case Ht:
2356
2351
  return r.name === e.name && r.message === e.message;
2357
- case We: {
2352
+ case Ve: {
2358
2353
  if (!(Fe(r.constructor, e.constructor, t, o) || j(r) && j(e)))
2359
2354
  return !1;
2360
- let d = [...Object.keys(r), ...Ir(r)], p = [...Object.keys(e), ...Ir(e)];
2355
+ let d = [...Object.keys(r), ...Fr(r)], p = [...Object.keys(e), ...Fr(e)];
2361
2356
  if (d.length !== p.length)
2362
2357
  return !1;
2363
2358
  for (let u = 0; u < d.length; u++) {
@@ -2380,47 +2375,16 @@ function Fe(r, e, t, o) {
2380
2375
  n(Fe, "areObjectsEqual");
2381
2376
 
2382
2377
  // ../node_modules/es-toolkit/dist/predicate/isEqual.mjs
2383
- function jr(r, e) {
2384
- return so(r, e, kt);
2378
+ function kr(r, e) {
2379
+ return no(r, e, Dt);
2385
2380
  }
2386
- n(jr, "isEqual");
2381
+ n(kr, "isEqual");
2387
2382
 
2388
2383
  // src/preview-api/modules/store/StoryStore.ts
2389
- var tr = ue(_r(), 1);
2390
-
2391
- // src/shared/preview/core-annotations.ts
2392
- import ao from "storybook/internal/component-testing/preview";
2393
- import lo from "storybook/actions/preview";
2394
- import co from "storybook/backgrounds/preview";
2395
- import po from "storybook/highlight/preview";
2396
- import uo from "storybook/measure/preview";
2397
- import fo from "storybook/outline/preview";
2398
- import yo from "storybook/test/preview";
2399
- import mo from "storybook/viewport/preview";
2400
- function Ie() {
2401
- return [
2402
- // @ts-expect-error CJS fallback
2403
- (uo.default ?? uo)(),
2404
- // @ts-expect-error CJS fallback
2405
- (co.default ?? co)(),
2406
- // @ts-expect-error CJS fallback
2407
- (po.default ?? po)(),
2408
- // @ts-expect-error CJS fallback
2409
- (fo.default ?? fo)(),
2410
- // @ts-expect-error CJS fallback
2411
- (mo.default ?? mo)(),
2412
- // @ts-expect-error CJS fallback
2413
- (lo.default ?? lo)(),
2414
- // @ts-expect-error CJS fallback
2415
- (ao.default ?? ao)(),
2416
- // @ts-expect-error CJS fallback
2417
- (yo.default ?? yo)()
2418
- ];
2419
- }
2420
- n(Ie, "getCoreAnnotations");
2384
+ var rr = ue(Mr(), 1);
2421
2385
 
2422
2386
  // src/preview-api/modules/store/args.ts
2423
- import { once as Nr } from "storybook/internal/client-logger";
2387
+ import { once as _r } from "storybook/internal/client-logger";
2424
2388
 
2425
2389
  // ../node_modules/ts-dedent/esm/index.js
2426
2390
  function P(r) {
@@ -2458,7 +2422,7 @@ function P(r) {
2458
2422
  n(P, "dedent");
2459
2423
 
2460
2424
  // src/preview-api/modules/store/args.ts
2461
- var fe = Symbol("incompatible"), Lr = /* @__PURE__ */ n((r, e) => {
2425
+ var fe = Symbol("incompatible"), Nr = /* @__PURE__ */ n((r, e) => {
2462
2426
  let t = e.type;
2463
2427
  if (r == null || !t || e.mapping)
2464
2428
  return r;
@@ -2473,46 +2437,46 @@ var fe = Symbol("incompatible"), Lr = /* @__PURE__ */ n((r, e) => {
2473
2437
  return String(r) === "true";
2474
2438
  case "array":
2475
2439
  return !t.value || !Array.isArray(r) ? fe : r.reduce((o, s, i) => {
2476
- let a = Lr(s, { type: t.value });
2440
+ let a = Nr(s, { type: t.value });
2477
2441
  return a !== fe && (o[i] = a), o;
2478
2442
  }, new Array(r.length));
2479
2443
  case "object":
2480
2444
  return typeof r == "string" || typeof r == "number" ? r : !t.value || typeof r != "object" ? fe : Object.entries(r).reduce((o, [s, i]) => {
2481
- let a = Lr(i, { type: t.value[s] });
2445
+ let a = Nr(i, { type: t.value[s] });
2482
2446
  return a === fe ? o : Object.assign(o, { [s]: a });
2483
2447
  }, {});
2484
2448
  default:
2485
2449
  return fe;
2486
2450
  }
2487
- }, "map"), ho = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
2451
+ }, "map"), io = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
2488
2452
  if (!e[o])
2489
2453
  return t;
2490
- let i = Lr(s, e[o]);
2454
+ let i = Nr(s, e[o]);
2491
2455
  return i === fe ? t : Object.assign(t, { [o]: i });
2492
- }, {}), "mapArgsToTypes"), Oe = /* @__PURE__ */ n((r, e) => Array.isArray(r) && Array.isArray(e) ? e.reduce(
2493
- (t, o, s) => (t[s] = Oe(r[s], e[s]), t),
2456
+ }, {}), "mapArgsToTypes"), Ie = /* @__PURE__ */ n((r, e) => Array.isArray(r) && Array.isArray(e) ? e.reduce(
2457
+ (t, o, s) => (t[s] = Ie(r[s], e[s]), t),
2494
2458
  [...r]
2495
2459
  ).filter((t) => t !== void 0) : !j(r) || !j(e) ? e : Object.keys({ ...r, ...e }).reduce((t, o) => {
2496
2460
  if (o in e) {
2497
- let s = Oe(r[o], e[o]);
2461
+ let s = Ie(r[o], e[o]);
2498
2462
  s !== void 0 && (t[o] = s);
2499
2463
  } else
2500
2464
  t[o] = r[o];
2501
2465
  return t;
2502
- }, {}), "combineArgs"), go = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
2466
+ }, {}), "combineArgs"), ao = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
2503
2467
  function i() {
2504
2468
  return o in r && (t[o] = r[o]), t;
2505
2469
  }
2506
2470
  if (n(i, "allowArg"), !s)
2507
2471
  return i();
2508
2472
  if (!Array.isArray(s))
2509
- return Nr.error(P`
2473
+ return _r.error(P`
2510
2474
  Invalid argType: '${o}.options' should be an array.
2511
2475
 
2512
2476
  More info: https://storybook.js.org/docs/api/arg-types
2513
2477
  `), i();
2514
2478
  if (s.some((u) => u && ["object", "function"].includes(typeof u)))
2515
- return Nr.error(P`
2479
+ return _r.error(P`
2516
2480
  Invalid argType: '${o}.options' should only contain primitives. Use a 'mapping' for complex values.
2517
2481
 
2518
2482
  More info: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
@@ -2521,11 +2485,11 @@ var fe = Symbol("incompatible"), Lr = /* @__PURE__ */ n((r, e) => {
2521
2485
  if (r[o] === void 0 || s.includes(r[o]) || c)
2522
2486
  return i();
2523
2487
  let d = a ? `${o}[${l}]` : o, p = s.map((u) => typeof u == "string" ? `'${u}'` : String(u)).join(", ");
2524
- return Nr.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
2488
+ return _r.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
2525
2489
  }, {}), "validateOptions"), oe = Symbol("Deeply equal"), ye = /* @__PURE__ */ n((r, e) => {
2526
2490
  if (typeof r != typeof e)
2527
2491
  return e;
2528
- if (jr(r, e))
2492
+ if (kr(r, e))
2529
2493
  return oe;
2530
2494
  if (Array.isArray(r) && Array.isArray(e)) {
2531
2495
  let t = e.reduce((o, s, i) => {
@@ -2538,25 +2502,25 @@ var fe = Symbol("incompatible"), Lr = /* @__PURE__ */ n((r, e) => {
2538
2502
  let s = ye(r?.[o], e?.[o]);
2539
2503
  return s === oe ? t : Object.assign(t, { [o]: s });
2540
2504
  }, {}) : e;
2541
- }, "deepDiff"), qr = "UNTARGETED";
2542
- function bo({
2505
+ }, "deepDiff"), Lr = "UNTARGETED";
2506
+ function lo({
2543
2507
  args: r,
2544
2508
  argTypes: e
2545
2509
  }) {
2546
2510
  let t = {};
2547
2511
  return Object.entries(r).forEach(([o, s]) => {
2548
- let { target: i = qr } = e[o] || {};
2512
+ let { target: i = Lr } = e[o] || {};
2549
2513
  t[i] = t[i] || {}, t[i][o] = s;
2550
2514
  }), t;
2551
2515
  }
2552
- n(bo, "groupArgsByTarget");
2516
+ n(lo, "groupArgsByTarget");
2553
2517
 
2554
2518
  // src/preview-api/modules/store/ArgsStore.ts
2555
- function Es(r) {
2519
+ function ms(r) {
2556
2520
  return Object.keys(r).forEach((e) => r[e] === void 0 && delete r[e]), r;
2557
2521
  }
2558
- n(Es, "deleteUndefined");
2559
- var Br = class Br {
2522
+ n(ms, "deleteUndefined");
2523
+ var qr = class qr {
2560
2524
  constructor() {
2561
2525
  this.initialArgsByStoryId = {};
2562
2526
  this.argsByStoryId = {};
@@ -2575,30 +2539,30 @@ var Br = class Br {
2575
2539
  }
2576
2540
  }
2577
2541
  updateFromDelta(e, t) {
2578
- let o = go(t, e.argTypes);
2579
- this.argsByStoryId[e.id] = Oe(this.argsByStoryId[e.id], o);
2542
+ let o = ao(t, e.argTypes);
2543
+ this.argsByStoryId[e.id] = Ie(this.argsByStoryId[e.id], o);
2580
2544
  }
2581
2545
  updateFromPersisted(e, t) {
2582
- let o = ho(t, e.argTypes);
2546
+ let o = io(t, e.argTypes);
2583
2547
  return this.updateFromDelta(e, o);
2584
2548
  }
2585
2549
  update(e, t) {
2586
2550
  if (!(e in this.argsByStoryId))
2587
2551
  throw new Error(`No args known for ${e} -- has it been rendered yet?`);
2588
- this.argsByStoryId[e] = Es({
2552
+ this.argsByStoryId[e] = ms({
2589
2553
  ...this.argsByStoryId[e],
2590
2554
  ...t
2591
2555
  });
2592
2556
  }
2593
2557
  };
2594
- n(Br, "ArgsStore");
2595
- var $e = Br;
2558
+ n(qr, "ArgsStore");
2559
+ var We = qr;
2596
2560
 
2597
2561
  // src/preview-api/modules/store/GlobalsStore.ts
2598
- import { logger as Cs } from "storybook/internal/client-logger";
2562
+ import { logger as hs } from "storybook/internal/client-logger";
2599
2563
 
2600
2564
  // src/preview-api/modules/store/csf/getValuesFromArgTypes.ts
2601
- var Ye = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
2565
+ var $e = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
2602
2566
  tValuesFromArgTypes");
2603
2567
 
2604
2568
  // src/preview-api/modules/store/GlobalsStore.ts
@@ -2612,11 +2576,11 @@ var zr = class zr {
2612
2576
  set({ globals: e = {}, globalTypes: t = {} }) {
2613
2577
  let o = this.initialGlobals && ye(this.initialGlobals, this.globals);
2614
2578
  this.allowedGlobalNames = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
2615
- let s = Ye(t);
2579
+ let s = $e(t);
2616
2580
  this.initialGlobals = { ...s, ...e }, this.globals = this.initialGlobals, o && o !== oe && this.updateFromPersisted(o);
2617
2581
  }
2618
2582
  filterAllowedGlobals(e) {
2619
- return Object.entries(e).reduce((t, [o, s]) => (this.allowedGlobalNames.has(o) ? t[o] = s : Cs.warn(
2583
+ return Object.entries(e).reduce((t, [o, s]) => (this.allowedGlobalNames.has(o) ? t[o] = s : hs.warn(
2620
2584
  `Attempted to set a global (${o}) that is not defined in initial globals or globalTypes`
2621
2585
  ), t), {});
2622
2586
  }
@@ -2634,17 +2598,17 @@ var zr = class zr {
2634
2598
  }
2635
2599
  };
2636
2600
  n(zr, "GlobalsStore");
2637
- var Ke = zr;
2601
+ var Ye = zr;
2638
2602
 
2639
2603
  // src/preview-api/modules/store/StoryIndexStore.ts
2640
- var So = ue(_r(), 1);
2641
- import { MissingStoryAfterHmrError as vs } from "storybook/internal/preview-errors";
2642
- var Ps = (0, So.default)(1)(
2604
+ var co = ue(Mr(), 1);
2605
+ import { MissingStoryAfterHmrError as gs } from "storybook/internal/preview-errors";
2606
+ var bs = (0, co.default)(1)(
2643
2607
  (r) => Object.values(r).reduce(
2644
2608
  (e, t) => (e[t.importPath] = e[t.importPath] || t, e),
2645
2609
  {}
2646
2610
  )
2647
- ), Gr = class Gr {
2611
+ ), Br = class Br {
2648
2612
  constructor({ entries: e } = { v: 5, entries: {} }) {
2649
2613
  this.entries = e;
2650
2614
  }
@@ -2660,35 +2624,35 @@ var Ps = (0, So.default)(1)(
2660
2624
  storyIdToEntry(e) {
2661
2625
  let t = this.entries[e];
2662
2626
  if (!t)
2663
- throw new vs({ storyId: e });
2627
+ throw new gs({ storyId: e });
2664
2628
  return t;
2665
2629
  }
2666
2630
  importPathToEntry(e) {
2667
- return Ps(this.entries)[e];
2631
+ return bs(this.entries)[e];
2668
2632
  }
2669
2633
  };
2670
- n(Gr, "StoryIndexStore");
2671
- var Xe = Gr;
2634
+ n(Br, "StoryIndexStore");
2635
+ var Ke = Br;
2672
2636
 
2673
2637
  // src/preview-api/modules/store/csf/normalizeInputTypes.ts
2674
- var Fs = /* @__PURE__ */ n((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), Is = /* @__PURE__ */ n((r) => typeof r == "strin\
2675
- g" ? { type: r } : r, "normalizeControl"), Os = /* @__PURE__ */ n((r, e) => {
2638
+ var Ss = /* @__PURE__ */ n((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), Ts = /* @__PURE__ */ n((r) => typeof r == "strin\
2639
+ g" ? { type: r } : r, "normalizeControl"), xs = /* @__PURE__ */ n((r, e) => {
2676
2640
  let { type: t, control: o, ...s } = r, i = {
2677
2641
  name: e,
2678
2642
  ...s
2679
2643
  };
2680
- return t && (i.type = Fs(t)), o ? i.control = Is(o) : o === !1 && (i.control = { disable: !0 }), i;
2681
- }, "normalizeInputType"), ne = /* @__PURE__ */ n((r) => V(r, Os), "normalizeInputTypes");
2644
+ return t && (i.type = Ss(t)), o ? i.control = Ts(o) : o === !1 && (i.control = { disable: !0 }), i;
2645
+ }, "normalizeInputType"), ne = /* @__PURE__ */ n((r) => V(r, xs), "normalizeInputTypes");
2682
2646
 
2683
2647
  // src/preview-api/modules/store/csf/normalizeStory.ts
2684
- import { deprecate as Ds, logger as ks } from "storybook/internal/client-logger";
2685
- import { storyNameFromExport as js, toId as Ms } from "storybook/internal/csf";
2648
+ import { deprecate as Rs, logger as ws } from "storybook/internal/client-logger";
2649
+ import { storyNameFromExport as As, toId as Es } from "storybook/internal/csf";
2686
2650
 
2687
2651
  // src/preview-api/modules/store/csf/normalizeArrays.ts
2688
2652
  var C = /* @__PURE__ */ n((r) => Array.isArray(r) ? r : r ? [r] : [], "normalizeArrays");
2689
2653
 
2690
2654
  // src/preview-api/modules/store/csf/normalizeStory.ts
2691
- var _s = P`
2655
+ var Cs = P`
2692
2656
  CSF .story annotations deprecated; annotate story functions directly:
2693
2657
  - StoryFn.story.name => StoryFn.storyName
2694
2658
  - StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
@@ -2696,8 +2660,8 @@ See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-
2696
2660
  `;
2697
2661
  function me(r, e, t) {
2698
2662
  let o = e, s = typeof e == "function" ? e : null, { story: i } = o;
2699
- i && (ks.debug("deprecated story", i), Ds(_s));
2700
- let a = js(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
2663
+ i && (ws.debug("deprecated story", i), Rs(Cs));
2664
+ let a = As(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
2701
2665
  ...C(o.decorators),
2702
2666
  ...C(i?.decorators)
2703
2667
  ], d = { ...i?.parameters, ...o.parameters }, p = { ...i?.args, ...o.args }, u = { ...i?.argTypes, ...o.argTypes }, y = [...C(o.loaders), ...C(
@@ -2707,7 +2671,7 @@ function me(r, e, t) {
2707
2671
  ], g = [
2708
2672
  ...C(o.afterEach),
2709
2673
  ...C(i?.afterEach)
2710
- ], { render: b, play: m, tags: T = [], globals: x = {} } = o, f = d.__id || Ms(t.id, a);
2674
+ ], { render: b, play: m, tags: T = [], globals: x = {} } = o, f = d.__id || Es(t.id, a);
2711
2675
  return {
2712
2676
  moduleExport: e,
2713
2677
  id: f,
@@ -2729,15 +2693,15 @@ function me(r, e, t) {
2729
2693
  n(me, "normalizeStory");
2730
2694
 
2731
2695
  // src/preview-api/modules/store/csf/processCSFFile.ts
2732
- import { logger as xo } from "storybook/internal/client-logger";
2733
- import { isExportStory as To, isStory as Ls } from "storybook/internal/csf";
2696
+ import { logger as uo } from "storybook/internal/client-logger";
2697
+ import { isExportStory as po, isStory as Ps } from "storybook/internal/csf";
2734
2698
 
2735
2699
  // src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts
2736
- import { sanitize as Ns } from "storybook/internal/csf";
2737
- function De(r, e = r.title, t) {
2700
+ import { sanitize as vs } from "storybook/internal/csf";
2701
+ function Oe(r, e = r.title, t) {
2738
2702
  let { id: o, argTypes: s } = r;
2739
2703
  return {
2740
- id: Ns(o || e),
2704
+ id: vs(o || e),
2741
2705
  ...r,
2742
2706
  title: e,
2743
2707
  ...s && { argTypes: ne(s) },
@@ -2747,76 +2711,76 @@ function De(r, e = r.title, t) {
2747
2711
  }
2748
2712
  };
2749
2713
  }
2750
- n(De, "normalizeComponentAnnotations");
2714
+ n(Oe, "normalizeComponentAnnotations");
2751
2715
 
2752
2716
  // src/preview-api/modules/store/csf/processCSFFile.ts
2753
- var qs = /* @__PURE__ */ n((r) => {
2717
+ var Fs = /* @__PURE__ */ n((r) => {
2754
2718
  let { globals: e, globalTypes: t } = r;
2755
- (e || t) && xo.error(
2719
+ (e || t) && uo.error(
2756
2720
  "Global args/argTypes can only be set globally",
2757
2721
  JSON.stringify({
2758
2722
  globals: e,
2759
2723
  globalTypes: t
2760
2724
  })
2761
2725
  );
2762
- }, "checkGlobals"), Bs = /* @__PURE__ */ n((r) => {
2726
+ }, "checkGlobals"), Is = /* @__PURE__ */ n((r) => {
2763
2727
  let { options: e } = r;
2764
- e?.storySort && xo.error("The storySort option parameter can only be set globally");
2765
- }, "checkStorySort"), Je = /* @__PURE__ */ n((r) => {
2766
- r && (qs(r), Bs(r));
2728
+ e?.storySort && uo.error("The storySort option parameter can only be set globally");
2729
+ }, "checkStorySort"), Xe = /* @__PURE__ */ n((r) => {
2730
+ r && (Fs(r), Is(r));
2767
2731
  }, "checkDisallowedParameters");
2768
- function Ro(r, e, t) {
2732
+ function fo(r, e, t) {
2769
2733
  let { default: o, __namedExportsOrder: s, ...i } = r, a = Object.values(i)[0];
2770
- if (Ls(a)) {
2771
- let d = De(a.meta.input, t, e);
2772
- Je(d.parameters);
2734
+ if (Ps(a)) {
2735
+ let d = Oe(a.meta.input, t, e);
2736
+ Xe(d.parameters);
2773
2737
  let p = { meta: d, stories: {}, moduleExports: r };
2774
2738
  return Object.keys(i).forEach((u) => {
2775
- if (To(u, d)) {
2739
+ if (po(u, d)) {
2776
2740
  let y = me(u, i[u].input, d);
2777
- Je(y.parameters), p.stories[y.id] = y;
2741
+ Xe(y.parameters), p.stories[y.id] = y;
2778
2742
  }
2779
2743
  }), p.projectAnnotations = a.meta.preview.composed, p;
2780
2744
  }
2781
- let l = De(
2745
+ let l = Oe(
2782
2746
  o,
2783
2747
  t,
2784
2748
  e
2785
2749
  );
2786
- Je(l.parameters);
2750
+ Xe(l.parameters);
2787
2751
  let c = { meta: l, stories: {}, moduleExports: r };
2788
2752
  return Object.keys(i).forEach((d) => {
2789
- if (To(d, l)) {
2753
+ if (po(d, l)) {
2790
2754
  let p = me(d, i[d], l);
2791
- Je(p.parameters), c.stories[p.id] = p;
2755
+ Xe(p.parameters), c.stories[p.id] = p;
2792
2756
  }
2793
2757
  }), c;
2794
2758
  }
2795
- n(Ro, "processCSFFile");
2759
+ n(fo, "processCSFFile");
2796
2760
 
2797
2761
  // src/preview-api/modules/store/csf/prepareStory.ts
2798
- import { combineTags as Gs, includeConditionalArg as Us } from "storybook/internal/csf";
2799
- import { NoRenderFunctionError as Hs } from "storybook/internal/preview-errors";
2800
- import { global as Vs } from "@storybook/global";
2801
- import { global as Ws } from "@storybook/global";
2762
+ import { combineTags as Ds, includeConditionalArg as ks } from "storybook/internal/csf";
2763
+ import { NoRenderFunctionError as js } from "storybook/internal/preview-errors";
2764
+ import { global as Ms } from "@storybook/global";
2765
+ import { global as _s } from "@storybook/global";
2802
2766
 
2803
2767
  // src/preview-api/modules/preview-web/render/mount-utils.ts
2804
- function Ao(r) {
2805
- return r != null && zs(r).includes("mount");
2768
+ function mo(r) {
2769
+ return r != null && Os(r).includes("mount");
2806
2770
  }
2807
- n(Ao, "mountDestructured");
2808
- function zs(r) {
2771
+ n(mo, "mountDestructured");
2772
+ function Os(r) {
2809
2773
  let e = r.toString().match(/[^(]*\(([^)]*)/);
2810
2774
  if (!e)
2811
2775
  return [];
2812
- let t = wo(e[1]);
2776
+ let t = yo(e[1]);
2813
2777
  if (!t.length)
2814
2778
  return [];
2815
2779
  let o = t[0];
2816
- return o.startsWith("{") && o.endsWith("}") ? wo(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
2780
+ return o.startsWith("{") && o.endsWith("}") ? yo(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
2817
2781
  }
2818
- n(zs, "getUsedProps");
2819
- function wo(r) {
2782
+ n(Os, "getUsedProps");
2783
+ function yo(r) {
2820
2784
  let e = [], t = [], o = 0;
2821
2785
  for (let i = 0; i < r.length; i++)
2822
2786
  if (r[i] === "{" || r[i] === "[")
@@ -2830,15 +2794,15 @@ function wo(r) {
2830
2794
  let s = r.substring(o).trim();
2831
2795
  return s && e.push(s), e;
2832
2796
  }
2833
- n(wo, "splitByComma");
2797
+ n(yo, "splitByComma");
2834
2798
 
2835
2799
  // src/preview-api/modules/store/decorators.ts
2836
- function Eo(r, e, t) {
2800
+ function ho(r, e, t) {
2837
2801
  let o = t(r);
2838
2802
  return (s) => e(o, s);
2839
2803
  }
2840
- n(Eo, "decorateStory");
2841
- function Co({
2804
+ n(ho, "decorateStory");
2805
+ function go({
2842
2806
  componentId: r,
2843
2807
  title: e,
2844
2808
  kind: t,
@@ -2852,22 +2816,22 @@ function Co({
2852
2816
  } = {}) {
2853
2817
  return d;
2854
2818
  }
2855
- n(Co, "sanitizeStoryContextUpdate");
2856
- function Ur(r, e) {
2819
+ n(go, "sanitizeStoryContextUpdate");
2820
+ function Gr(r, e) {
2857
2821
  let t = {}, o = /* @__PURE__ */ n((i) => (a) => {
2858
2822
  if (!t.value)
2859
2823
  throw new Error("Decorated function called without init");
2860
2824
  return t.value = {
2861
2825
  ...t.value,
2862
- ...Co(a)
2826
+ ...go(a)
2863
2827
  }, i(t.value);
2864
2828
  }, "bindWithContext"), s = e.reduce(
2865
- (i, a) => Eo(i, a, o),
2829
+ (i, a) => ho(i, a, o),
2866
2830
  r
2867
2831
  );
2868
2832
  return (i) => (t.value = i, s(i));
2869
2833
  }
2870
- n(Ur, "defaultDecorateStory");
2834
+ n(Gr, "defaultDecorateStory");
2871
2835
 
2872
2836
  // src/preview-api/modules/store/parameters.ts
2873
2837
  var N = /* @__PURE__ */ n((...r) => {
@@ -2882,8 +2846,8 @@ var N = /* @__PURE__ */ n((...r) => {
2882
2846
  }, "combineParameters");
2883
2847
 
2884
2848
  // src/preview-api/modules/store/csf/prepareStory.ts
2885
- function ke(r, e, t) {
2886
- let { moduleExport: o, id: s, name: i } = r || {}, a = vo(
2849
+ function De(r, e, t) {
2850
+ let { moduleExport: o, id: s, name: i } = r || {}, a = bo(
2887
2851
  r,
2888
2852
  e,
2889
2853
  t
@@ -2924,15 +2888,15 @@ function ke(r, e, t) {
2924
2888
  return;
2925
2889
  await D(w);
2926
2890
  }
2927
- }, "applyAfterEach"), p = /* @__PURE__ */ n((w) => w.originalStoryFn(w.args, w), "undecoratedStoryFn"), { applyDecorators: u = Ur, runStep: y } = t,
2891
+ }, "applyAfterEach"), p = /* @__PURE__ */ n((w) => w.originalStoryFn(w.args, w), "undecoratedStoryFn"), { applyDecorators: u = Gr, runStep: y } = t,
2928
2892
  h = [
2929
2893
  ...C(r?.decorators),
2930
2894
  ...C(e?.decorators),
2931
2895
  ...C(t?.decorators)
2932
- ], g = r?.userStoryFn || r?.render || e.render || t.render, b = Cr(u)(p, h), m = /* @__PURE__ */ n((w) => b(w), "unboundStoryFn"), T = r?.
2933
- play ?? e?.play, x = Ao(T);
2896
+ ], g = r?.userStoryFn || r?.render || e.render || t.render, b = Er(u)(p, h), m = /* @__PURE__ */ n((w) => b(w), "unboundStoryFn"), T = r?.
2897
+ play ?? e?.play, x = mo(T);
2934
2898
  if (!g && !x)
2935
- throw new Hs({ id: s });
2899
+ throw new js({ id: s });
2936
2900
  let f = /* @__PURE__ */ n((w) => async () => (await w.renderToCanvas(), w.canvas), "defaultMount"), S = r.mount ?? e.mount ?? t.mount ?? f,
2937
2901
  R = t.testingLibraryRender;
2938
2902
  return {
@@ -2956,16 +2920,16 @@ function ke(r, e, t) {
2956
2920
  usesMount: x
2957
2921
  };
2958
2922
  }
2959
- n(ke, "prepareStory");
2960
- function Hr(r, e, t) {
2923
+ n(De, "prepareStory");
2924
+ function Ur(r, e, t) {
2961
2925
  return {
2962
- ...vo(void 0, r, e),
2926
+ ...bo(void 0, r, e),
2963
2927
  moduleExport: t
2964
2928
  };
2965
2929
  }
2966
- n(Hr, "prepareMeta");
2967
- function vo(r, e, t) {
2968
- let o = ["dev", "test"], s = Ws.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = Gs(
2930
+ n(Ur, "prepareMeta");
2931
+ function bo(r, e, t) {
2932
+ let o = ["dev", "test"], s = _s.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = Ds(
2969
2933
  ...o,
2970
2934
  ...s,
2971
2935
  ...t.tags ?? [],
@@ -3027,20 +2991,20 @@ function vo(r, e, t) {
3027
2991
  let { name: g, story: b, ...m } = y;
3028
2992
  return m;
3029
2993
  }
3030
- n(vo, "preparePartialAnnotations");
3031
- function Qe(r) {
2994
+ n(bo, "preparePartialAnnotations");
2995
+ function Je(r) {
3032
2996
  let { args: e } = r, t = {
3033
2997
  ...r,
3034
2998
  allArgs: void 0,
3035
2999
  argsByTarget: void 0
3036
3000
  };
3037
- if (Vs.FEATURES?.argTypeTargetsV7) {
3038
- let i = bo(r);
3001
+ if (Ms.FEATURES?.argTypeTargetsV7) {
3002
+ let i = lo(r);
3039
3003
  t = {
3040
3004
  ...r,
3041
3005
  allArgs: r.args,
3042
3006
  argsByTarget: i,
3043
- args: i[qr] || {}
3007
+ args: i[Lr] || {}
3044
3008
  };
3045
3009
  }
3046
3010
  let o = Object.entries(t.args).reduce((i, [a, l]) => {
@@ -3053,15 +3017,15 @@ function Qe(r) {
3053
3017
  return i[a] = Array.isArray(l) ? l.map(c) : c(l), i;
3054
3018
  }, {}), s = Object.entries(o).reduce((i, [a, l]) => {
3055
3019
  let c = t.argTypes[a] || {};
3056
- return Us(c, o, t.globals) && (i[a] = l), i;
3020
+ return ks(c, o, t.globals) && (i[a] = l), i;
3057
3021
  }, {});
3058
3022
  return { ...t, unmappedArgs: e, args: s };
3059
3023
  }
3060
- n(Qe, "prepareContext");
3024
+ n(Je, "prepareContext");
3061
3025
 
3062
3026
  // src/preview-api/modules/store/inferArgTypes.ts
3063
- import { logger as $s } from "storybook/internal/client-logger";
3064
- var Vr = /* @__PURE__ */ n((r, e, t) => {
3027
+ import { logger as Ns } from "storybook/internal/client-logger";
3028
+ var Hr = /* @__PURE__ */ n((r, e, t) => {
3065
3029
  let o = typeof r;
3066
3030
  switch (o) {
3067
3031
  case "boolean":
@@ -3073,44 +3037,44 @@ var Vr = /* @__PURE__ */ n((r, e, t) => {
3073
3037
  default:
3074
3038
  break;
3075
3039
  }
3076
- return r ? t.has(r) ? ($s.warn(P`
3040
+ return r ? t.has(r) ? (Ns.warn(P`
3077
3041
  We've detected a cycle in arg '${e}'. Args should be JSON-serializable.
3078
3042
 
3079
3043
  Consider using the mapping feature or fully custom args:
3080
3044
  - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
3081
3045
  - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
3082
- `), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? Vr(r[0], e, new Set(
3083
- t)) : { name: "other", value: "unknown" } } : { name: "object", value: V(r, (i) => Vr(i, e, new Set(t))) }) : { name: "object", value: {} };
3084
- }, "inferType"), Wr = /* @__PURE__ */ n((r) => {
3046
+ `), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? Hr(r[0], e, new Set(
3047
+ t)) : { name: "other", value: "unknown" } } : { name: "object", value: V(r, (i) => Hr(i, e, new Set(t))) }) : { name: "object", value: {} };
3048
+ }, "inferType"), Vr = /* @__PURE__ */ n((r) => {
3085
3049
  let { id: e, argTypes: t = {}, initialArgs: o = {} } = r, s = V(o, (a, l) => ({
3086
3050
  name: l,
3087
- type: Vr(a, `${e}.${l}`, /* @__PURE__ */ new Set())
3051
+ type: Hr(a, `${e}.${l}`, /* @__PURE__ */ new Set())
3088
3052
  })), i = V(t, (a, l) => ({
3089
3053
  name: l
3090
3054
  }));
3091
3055
  return N(s, i, t);
3092
3056
  }, "inferArgTypes");
3093
- Wr.secondPass = !0;
3057
+ Vr.secondPass = !0;
3094
3058
 
3095
3059
  // src/preview-api/modules/store/inferControls.ts
3096
- import { logger as Ys } from "storybook/internal/client-logger";
3060
+ import { logger as Ls } from "storybook/internal/client-logger";
3097
3061
 
3098
3062
  // src/preview-api/modules/store/filterArgTypes.ts
3099
- var Po = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Ze = /* @__PURE__ */ n((r, e, t) => !e && !t ?
3100
- r : r && kr(r, (o, s) => {
3063
+ var So = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Qe = /* @__PURE__ */ n((r, e, t) => !e && !t ?
3064
+ r : r && Dr(r, (o, s) => {
3101
3065
  let i = o.name || s.toString();
3102
- return !!(!e || Po(i, e)) && (!t || !Po(i, t));
3066
+ return !!(!e || So(i, e)) && (!t || !So(i, t));
3103
3067
  }), "filterArgTypes");
3104
3068
 
3105
3069
  // src/preview-api/modules/store/inferControls.ts
3106
- var Ks = /* @__PURE__ */ n((r, e, t) => {
3070
+ var qs = /* @__PURE__ */ n((r, e, t) => {
3107
3071
  let { type: o, options: s } = r;
3108
3072
  if (o) {
3109
3073
  if (t.color && t.color.test(e)) {
3110
3074
  let i = o.name;
3111
3075
  if (i === "string")
3112
3076
  return { control: { type: "color" } };
3113
- i !== "enum" && Ys.warn(
3077
+ i !== "enum" && Ls.warn(
3114
3078
  `Addon controls: Control of type color only supports string, received "${i}" instead`
3115
3079
  );
3116
3080
  }
@@ -3136,17 +3100,17 @@ var Ks = /* @__PURE__ */ n((r, e, t) => {
3136
3100
  return { control: { type: s ? "select" : "object" } };
3137
3101
  }
3138
3102
  }
3139
- }, "inferControl"), je = /* @__PURE__ */ n((r) => {
3103
+ }, "inferControl"), ke = /* @__PURE__ */ n((r) => {
3140
3104
  let {
3141
3105
  argTypes: e,
3142
3106
  parameters: { __isArgsStory: t, controls: { include: o = null, exclude: s = null, matchers: i = {} } = {} }
3143
3107
  } = r;
3144
3108
  if (!t)
3145
3109
  return e;
3146
- let a = Ze(e, o, s), l = V(a, (c, d) => c?.type && Ks(c, d.toString(), i));
3110
+ let a = Qe(e, o, s), l = V(a, (c, d) => c?.type && qs(c, d.toString(), i));
3147
3111
  return N(l, a);
3148
3112
  }, "inferControls");
3149
- je.secondPass = !0;
3113
+ ke.secondPass = !0;
3150
3114
 
3151
3115
  // src/preview-api/modules/store/csf/normalizeProjectAnnotations.ts
3152
3116
  function he({
@@ -3169,7 +3133,7 @@ function he({
3169
3133
  afterEach: C(a),
3170
3134
  argTypesEnhancers: [
3171
3135
  ...t || [],
3172
- Wr,
3136
+ Vr,
3173
3137
  // There's an architectural decision to be made regarding embedded addons in core:
3174
3138
  //
3175
3139
  // Option 1: Keep embedded addons but ensure consistency by moving addon-specific code
@@ -3185,7 +3149,7 @@ function he({
3185
3149
  // currently rely on this behavior.
3186
3150
  //
3187
3151
  // TODO: Make an architectural decision on the handling of core addons
3188
- je
3152
+ ke
3189
3153
  ],
3190
3154
  initialGlobals: l,
3191
3155
  ...c
@@ -3194,10 +3158,10 @@ function he({
3194
3158
  n(he, "normalizeProjectAnnotations");
3195
3159
 
3196
3160
  // src/preview-api/modules/store/csf/composeConfigs.ts
3197
- import { global as Xs } from "@storybook/global";
3161
+ import { global as zs } from "@storybook/global";
3198
3162
 
3199
3163
  // src/preview-api/modules/store/csf/beforeAll.ts
3200
- var Fo = /* @__PURE__ */ n((r) => async () => {
3164
+ var To = /* @__PURE__ */ n((r) => async () => {
3201
3165
  let e = [];
3202
3166
  for (let t of r) {
3203
3167
  let o = await t();
@@ -3210,7 +3174,7 @@ var Fo = /* @__PURE__ */ n((r) => async () => {
3210
3174
  }, "composeBeforeAllHooks");
3211
3175
 
3212
3176
  // src/preview-api/modules/store/csf/stepRunners.ts
3213
- function $r(r) {
3177
+ function Wr(r) {
3214
3178
  return async (e, t, o) => {
3215
3179
  await r.reduceRight(
3216
3180
  (i, a) => async () => a(e, i, o),
@@ -3218,65 +3182,66 @@ function $r(r) {
3218
3182
  )();
3219
3183
  };
3220
3184
  }
3221
- n($r, "composeStepRunners");
3185
+ n(Wr, "composeStepRunners");
3222
3186
 
3223
3187
  // src/preview-api/modules/store/csf/composeConfigs.ts
3224
- function _e(r, e) {
3188
+ function Me(r, e) {
3225
3189
  return r.map((t) => t.default?.[e] ?? t[e]).filter(Boolean);
3226
3190
  }
3227
- n(_e, "getField");
3191
+ n(Me, "getField");
3228
3192
  function Y(r, e, t = {}) {
3229
- return _e(r, e).reduce((o, s) => {
3193
+ return Me(r, e).reduce((o, s) => {
3230
3194
  let i = C(s);
3231
3195
  return t.reverseFileOrder ? [...i, ...o] : [...o, ...i];
3232
3196
  }, []);
3233
3197
  }
3234
3198
  n(Y, "getArrayField");
3235
- function er(r, e) {
3236
- return Object.assign({}, ..._e(r, e));
3199
+ function Ze(r, e) {
3200
+ return Object.assign({}, ...Me(r, e));
3237
3201
  }
3238
- n(er, "getObjectField");
3239
- function Me(r, e) {
3240
- return _e(r, e).pop();
3202
+ n(Ze, "getObjectField");
3203
+ function je(r, e) {
3204
+ return Me(r, e).pop();
3241
3205
  }
3242
- n(Me, "getSingletonField");
3206
+ n(je, "getSingletonField");
3243
3207
  function K(r) {
3244
- let e = Y(r, "argTypesEnhancers"), t = _e(r, "runStep"), o = Y(r, "beforeAll");
3208
+ let e = Y(r, "argTypesEnhancers"), t = Me(r, "runStep"), o = Y(r, "beforeAll");
3245
3209
  return {
3246
- parameters: N(..._e(r, "parameters")),
3210
+ parameters: N(...Me(r, "parameters")),
3247
3211
  decorators: Y(r, "decorators", {
3248
- reverseFileOrder: !(Xs.FEATURES?.legacyDecoratorFileOrder ?? !1)
3212
+ reverseFileOrder: !(zs.FEATURES?.legacyDecoratorFileOrder ?? !1)
3249
3213
  }),
3250
- args: er(r, "args"),
3214
+ args: Ze(r, "args"),
3251
3215
  argsEnhancers: Y(r, "argsEnhancers"),
3252
- argTypes: er(r, "argTypes"),
3216
+ argTypes: Ze(r, "argTypes"),
3253
3217
  argTypesEnhancers: [
3254
3218
  ...e.filter((s) => !s.secondPass),
3255
3219
  ...e.filter((s) => s.secondPass)
3256
3220
  ],
3257
- initialGlobals: er(r, "initialGlobals"),
3258
- globalTypes: er(r, "globalTypes"),
3221
+ initialGlobals: Ze(r, "initialGlobals"),
3222
+ globalTypes: Ze(r, "globalTypes"),
3259
3223
  loaders: Y(r, "loaders"),
3260
- beforeAll: Fo(o),
3224
+ beforeAll: To(o),
3261
3225
  beforeEach: Y(r, "beforeEach"),
3262
3226
  afterEach: Y(r, "afterEach"),
3263
- render: Me(r, "render"),
3264
- renderToCanvas: Me(r, "renderToCanvas"),
3265
- applyDecorators: Me(r, "applyDecorators"),
3266
- runStep: $r(t),
3227
+ render: je(r, "render"),
3228
+ renderToCanvas: je(r, "renderToCanvas"),
3229
+ applyDecorators: je(r, "applyDecorators"),
3230
+ runStep: Wr(t),
3267
3231
  tags: Y(r, "tags"),
3268
- mount: Me(r, "mount"),
3269
- testingLibraryRender: Me(r, "testingLibraryRender")
3232
+ mount: je(r, "mount"),
3233
+ testingLibraryRender: je(r, "testingLibraryRender")
3270
3234
  };
3271
3235
  }
3272
3236
  n(K, "composeConfigs");
3273
3237
 
3274
3238
  // src/preview-api/modules/store/csf/portable-stories.ts
3275
- import { isExportStory as Zs } from "storybook/internal/csf";
3276
- import { MountMustBeDestructuredError as ei } from "storybook/internal/preview-errors";
3239
+ import { isExportStory as Us } from "storybook/internal/csf";
3240
+ import { getCoreAnnotations as Hs } from "storybook/internal/csf";
3241
+ import { MountMustBeDestructuredError as Vs } from "storybook/internal/preview-errors";
3277
3242
 
3278
3243
  // src/preview-api/modules/preview-web/render/animation-utils.ts
3279
- function rr() {
3244
+ function er() {
3280
3245
  try {
3281
3246
  return (
3282
3247
  // @ts-expect-error this property exists in certain environments
@@ -3287,7 +3252,7 @@ function rr() {
3287
3252
  return !1;
3288
3253
  }
3289
3254
  }
3290
- n(rr, "isTestEnvironment");
3255
+ n(er, "isTestEnvironment");
3291
3256
  function ge(r = !0) {
3292
3257
  if (!("document" in globalThis && "createElement" in globalThis.document))
3293
3258
  return () => {
@@ -3316,10 +3281,10 @@ async function be(r) {
3316
3281
  // If new animations are created while waiting, we'll wait for them too
3317
3282
  new Promise((t) => {
3318
3283
  setTimeout(() => {
3319
- let o = [globalThis.document, ...Io(globalThis.document)], s = /* @__PURE__ */ n(async () => {
3284
+ let o = [globalThis.document, ...xo(globalThis.document)], s = /* @__PURE__ */ n(async () => {
3320
3285
  if (e || r?.aborted)
3321
3286
  return;
3322
- let i = o.flatMap((a) => a?.getAnimations?.() || []).filter((a) => a.playState === "running" && !Js(a));
3287
+ let i = o.flatMap((a) => a?.getAnimations?.() || []).filter((a) => a.playState === "running" && !Bs(a));
3323
3288
  i.length > 0 && (await Promise.all(i.map((a) => a.finished)), await s());
3324
3289
  }, "checkAnimationsFinished");
3325
3290
  s().then(t);
@@ -3334,22 +3299,22 @@ async function be(r) {
3334
3299
  ]);
3335
3300
  }
3336
3301
  n(be, "waitForAnimations");
3337
- function Io(r) {
3338
- return [r, ...r.querySelectorAll("*")].reduce((e, t) => ("shadowRoot" in t && t.shadowRoot && e.push(t.shadowRoot, ...Io(t.shadowRoot)), e),
3302
+ function xo(r) {
3303
+ return [r, ...r.querySelectorAll("*")].reduce((e, t) => ("shadowRoot" in t && t.shadowRoot && e.push(t.shadowRoot, ...xo(t.shadowRoot)), e),
3339
3304
  []);
3340
3305
  }
3341
- n(Io, "getShadowRoots");
3342
- function Js(r) {
3306
+ n(xo, "getShadowRoots");
3307
+ function Bs(r) {
3343
3308
  if (r instanceof CSSAnimation && r.effect instanceof KeyframeEffect && r.effect.target) {
3344
3309
  let e = getComputedStyle(r.effect.target, r.effect.pseudoElement), t = e.animationName?.split(", ").indexOf(r.animationName);
3345
3310
  return e.animationIterationCount.split(", ")[t] === "infinite";
3346
3311
  }
3347
3312
  return !1;
3348
3313
  }
3349
- n(Js, "isInfiniteAnimation");
3314
+ n(Bs, "isInfiniteAnimation");
3350
3315
 
3351
3316
  // src/preview-api/modules/store/reporter-api.ts
3352
- var Yr = class Yr {
3317
+ var $r = class $r {
3353
3318
  constructor() {
3354
3319
  this.reports = [];
3355
3320
  }
@@ -3357,45 +3322,45 @@ var Yr = class Yr {
3357
3322
  this.reports.push(e);
3358
3323
  }
3359
3324
  };
3360
- n(Yr, "ReporterAPI");
3361
- var se = Yr;
3325
+ n($r, "ReporterAPI");
3326
+ var se = $r;
3362
3327
 
3363
3328
  // src/preview-api/modules/store/csf/csf-factory-utils.ts
3364
- import { isStory as Qs } from "storybook/internal/csf";
3365
- function Kr(r, e, t) {
3366
- return Qs(r) ? {
3329
+ import { isStory as Gs } from "storybook/internal/csf";
3330
+ function Yr(r, e, t) {
3331
+ return Gs(r) ? {
3367
3332
  story: r.input,
3368
3333
  meta: r.meta.input,
3369
3334
  preview: r.meta.preview.composed
3370
3335
  } : { story: r, meta: e, preview: t };
3371
3336
  }
3372
- n(Kr, "getCsfFactoryAnnotations");
3337
+ n(Yr, "getCsfFactoryAnnotations");
3373
3338
 
3374
3339
  // src/preview-api/modules/store/csf/portable-stories.ts
3375
- function ri(r) {
3340
+ function Ws(r) {
3376
3341
  globalThis.defaultProjectAnnotations = r;
3377
3342
  }
3378
- n(ri, "setDefaultProjectAnnotations");
3379
- var ti = "ComposedStory", oi = "Unnamed Story";
3380
- function ni(r) {
3343
+ n(Ws, "setDefaultProjectAnnotations");
3344
+ var $s = "ComposedStory", Ys = "Unnamed Story";
3345
+ function Ks(r) {
3381
3346
  return r ? K([r]) : {};
3382
3347
  }
3383
- n(ni, "extractAnnotation");
3384
- function si(r) {
3348
+ n(Ks, "extractAnnotation");
3349
+ function Xs(r) {
3385
3350
  let e = Array.isArray(r) ? r : [r];
3386
3351
  return globalThis.globalProjectAnnotations = K([
3387
- ...Ie(),
3352
+ ...Hs(),
3388
3353
  globalThis.defaultProjectAnnotations ?? {},
3389
- K(e.map(ni))
3354
+ K(e.map(Ks))
3390
3355
  ]), globalThis.globalProjectAnnotations ?? {};
3391
3356
  }
3392
- n(si, "setProjectAnnotations");
3357
+ n(Xs, "setProjectAnnotations");
3393
3358
  var X = [];
3394
- function Oo(r, e, t, o, s) {
3359
+ function Ro(r, e, t, o, s) {
3395
3360
  if (r === void 0)
3396
3361
  throw new Error("Expected a story but received undefined.");
3397
- e.title = e.title ?? ti;
3398
- let i = De(e), a = s || r.storyName || r.story?.name || r.name || oi, l = me(
3362
+ e.title = e.title ?? $s;
3363
+ let i = Oe(e), a = s || r.storyName || r.story?.name || r.name || Ys, l = me(
3399
3364
  a,
3400
3365
  r,
3401
3366
  i
@@ -3404,16 +3369,16 @@ function Oo(r, e, t, o, s) {
3404
3369
  o ?? globalThis.globalProjectAnnotations ?? {},
3405
3370
  t ?? {}
3406
3371
  ])
3407
- ), d = ke(
3372
+ ), d = De(
3408
3373
  l,
3409
3374
  i,
3410
3375
  c
3411
3376
  ), u = {
3412
- ...Ye(c.globalTypes),
3377
+ ...$e(c.globalTypes),
3413
3378
  ...c.initialGlobals,
3414
3379
  ...d.storyGlobals
3415
3380
  }, y = new se(), h = /* @__PURE__ */ n(() => {
3416
- let f = Qe({
3381
+ let f = Je({
3417
3382
  hooks: new te(),
3418
3383
  globals: u,
3419
3384
  args: { ...d.initialArgs },
@@ -3461,7 +3426,7 @@ ${R.description}`);
3461
3426
  return S.canvasElement ??= globalThis?.document?.body, g && (S.loaded = g.loaded), Object.assign(S, f), d.playFunction(S);
3462
3427
  }, "play"), m = /* @__PURE__ */ n((f) => {
3463
3428
  let S = h();
3464
- return Object.assign(S, f), ci(d, S);
3429
+ return Object.assign(S, f), ei(d, S);
3465
3430
  }, "run"), T = d.playFunction ? b : void 0;
3466
3431
  return Object.assign(
3467
3432
  /* @__PURE__ */ n(function(S) {
@@ -3492,22 +3457,22 @@ ${R.description}`);
3492
3457
  }
3493
3458
  );
3494
3459
  }
3495
- n(Oo, "composeStory");
3496
- var ii = /* @__PURE__ */ n((r, e, t, o) => Oo(r, e, t, {}, o), "defaultComposeStory");
3497
- function ai(r, e, t = ii) {
3460
+ n(Ro, "composeStory");
3461
+ var Js = /* @__PURE__ */ n((r, e, t, o) => Ro(r, e, t, {}, o), "defaultComposeStory");
3462
+ function Qs(r, e, t = Js) {
3498
3463
  let { default: o, __esModule: s, __namedExportsOrder: i, ...a } = r, l = o;
3499
3464
  return Object.entries(a).reduce(
3500
3465
  (d, [p, u]) => {
3501
- let { story: y, meta: h } = Kr(u);
3502
- return !l && h && (l = h), Zs(p, l) ? Object.assign(d, {
3466
+ let { story: y, meta: h } = Yr(u);
3467
+ return !l && h && (l = h), Us(p, l) ? Object.assign(d, {
3503
3468
  [p]: t(y, l, e, p)
3504
3469
  }) : d;
3505
3470
  },
3506
3471
  {}
3507
3472
  );
3508
3473
  }
3509
- n(ai, "composeStories");
3510
- function li(r) {
3474
+ n(Qs, "composeStories");
3475
+ function Zs(r) {
3511
3476
  return r.extend({
3512
3477
  mount: /* @__PURE__ */ n(async ({ mount: e, page: t }, o) => {
3513
3478
  await o(async (s, ...i) => {
@@ -3524,21 +3489,22 @@ function li(r) {
3524
3489
 
3525
3490
  More info: https://storybook.js.org/docs/api/portable-stories-playwright
3526
3491
  `);
3527
- await t.evaluate(async (l) => {
3528
- let c = await globalThis.__pwUnwrapObject?.(l);
3529
- return ("__pw_type" in c ? c.type : c)?.load?.();
3530
- }, s);
3531
- let a = await e(s, ...i);
3532
- return await t.evaluate(async (l) => {
3533
- let c = await globalThis.__pwUnwrapObject?.(l), d = "__pw_type" in c ? c.type : c, p = document.querySelector("#root");
3534
- return d?.play?.({ canvasElement: p });
3535
- }, s), a;
3492
+ let { props: a, ...l } = s;
3493
+ await t.evaluate(async (d) => {
3494
+ let p = await globalThis.__pwUnwrapObject?.(d);
3495
+ return ("__pw_type" in p ? p.type : p)?.load?.();
3496
+ }, l);
3497
+ let c = await e(s, ...i);
3498
+ return await t.evaluate(async (d) => {
3499
+ let p = await globalThis.__pwUnwrapObject?.(d), u = "__pw_type" in p ? p.type : p, y = document.querySelector("#root");
3500
+ return u?.play?.({ canvasElement: y });
3501
+ }, l), c;
3536
3502
  });
3537
3503
  }, "mount")
3538
3504
  });
3539
3505
  }
3540
- n(li, "createPlaywrightTest");
3541
- async function ci(r, e) {
3506
+ n(Zs, "createPlaywrightTest");
3507
+ async function ei(r, e) {
3542
3508
  for (let i of [...X].reverse())
3543
3509
  await i();
3544
3510
  if (X.length = 0, !e.canvasElement) {
@@ -3554,23 +3520,23 @@ async function ci(r, e) {
3554
3520
  if (o || await e.mount(), e.abortSignal.aborted)
3555
3521
  return;
3556
3522
  t && (o || (e.mount = async () => {
3557
- throw new ei({ playFunction: t.toString() });
3523
+ throw new Vs({ playFunction: t.toString() });
3558
3524
  }), await t(e));
3559
3525
  let s;
3560
- rr() ? s = ge() : await be(e.abortSignal), await r.applyAfterEach(e), await s?.();
3526
+ er() ? s = ge() : await be(e.abortSignal), await r.applyAfterEach(e), await s?.();
3561
3527
  }
3562
- n(ci, "runStory");
3528
+ n(ei, "runStory");
3563
3529
 
3564
3530
  // src/preview-api/modules/store/StoryStore.ts
3565
- var Do = 1e3, ui = 1e4, Xr = class Xr {
3531
+ var wo = 1e3, ni = 1e4, Kr = class Kr {
3566
3532
  constructor(e, t, o) {
3567
3533
  this.importFn = t;
3568
- this.storyIndex = new Xe(e), this.projectAnnotations = he(
3569
- K([...Ie(), o])
3534
+ this.storyIndex = new Ke(e), this.projectAnnotations = he(
3535
+ K([...ri(), o])
3570
3536
  );
3571
3537
  let { initialGlobals: s, globalTypes: i } = this.projectAnnotations;
3572
- this.args = new $e(), this.userGlobals = new Ke({ globals: s, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
3573
- (0, tr.default)(Do)(Ro), this.prepareMetaWithCache = (0, tr.default)(Do)(Hr), this.prepareStoryWithCache = (0, tr.default)(ui)(ke);
3538
+ this.args = new We(), this.userGlobals = new Ye({ globals: s, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
3539
+ (0, rr.default)(wo)(fo), this.prepareMetaWithCache = (0, rr.default)(wo)(Ur), this.prepareStoryWithCache = (0, rr.default)(ni)(De);
3574
3540
  }
3575
3541
  setProjectAnnotations(e) {
3576
3542
  this.projectAnnotations = he(e);
@@ -3634,7 +3600,7 @@ var Do = 1e3, ui = 1e4, Xr = class Xr {
3634
3600
  }) {
3635
3601
  let o = t.stories[e];
3636
3602
  if (!o)
3637
- throw new pi({ storyId: e });
3603
+ throw new oi({ storyId: e });
3638
3604
  let s = t.meta, i = this.prepareStoryWithCache(
3639
3605
  o,
3640
3606
  s,
@@ -3662,7 +3628,7 @@ var Do = 1e3, ui = 1e4, Xr = class Xr {
3662
3628
  // and updated separtely to the (immutable) story.
3663
3629
  getStoryContext(e, { forceInitialArgs: t = !1 } = {}) {
3664
3630
  let o = this.userGlobals.get(), { initialGlobals: s } = this.userGlobals, i = new se();
3665
- return Qe({
3631
+ return Je({
3666
3632
  ...e,
3667
3633
  args: t ? e.initialArgs : this.args.get(e.id),
3668
3634
  initialGlobals: s,
@@ -3690,7 +3656,7 @@ var Do = 1e3, ui = 1e4, Xr = class Xr {
3690
3656
  extract(e = { includeDocsOnly: !1 }) {
3691
3657
  let { cachedCSFFiles: t } = this;
3692
3658
  if (!t)
3693
- throw new di();
3659
+ throw new ti();
3694
3660
  return Object.entries(this.storyIndex.entries).reduce(
3695
3661
  (o, [s, { type: i, importPath: a }]) => {
3696
3662
  if (i === "docs")
@@ -3714,20 +3680,20 @@ var Do = 1e3, ui = 1e4, Xr = class Xr {
3714
3680
  );
3715
3681
  }
3716
3682
  };
3717
- n(Xr, "StoryStore");
3718
- var Se = Xr;
3683
+ n(Kr, "StoryStore");
3684
+ var Se = Kr;
3719
3685
 
3720
3686
  // src/preview-api/modules/store/autoTitle.ts
3721
- import { once as fi } from "storybook/internal/client-logger";
3687
+ import { once as si } from "storybook/internal/client-logger";
3722
3688
 
3723
3689
  // ../node_modules/slash/index.js
3724
- function Jr(r) {
3690
+ function Xr(r) {
3725
3691
  return r.startsWith("\\\\?\\") ? r : r.replace(/\\/g, "/");
3726
3692
  }
3727
- n(Jr, "slash");
3693
+ n(Xr, "slash");
3728
3694
 
3729
3695
  // src/preview-api/modules/store/autoTitle.ts
3730
- var yi = /* @__PURE__ */ n((r) => {
3696
+ var ii = /* @__PURE__ */ n((r) => {
3731
3697
  if (r.length === 0)
3732
3698
  return r;
3733
3699
  let e = r[r.length - 1], t = e?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i, "");
@@ -3737,28 +3703,28 @@ var yi = /* @__PURE__ */ n((r) => {
3737
3703
  return t && o && t.toLowerCase() === o.toLowerCase() ? [...r.slice(0, -2), t] : t && (/^(story|stories)([.][^.]+)$/i.test(e) || /^index$/i.
3738
3704
  test(t)) ? r.slice(0, -1) : [...r.slice(0, -1), t];
3739
3705
  }, "sanitize");
3740
- function ko(r) {
3706
+ function Ao(r) {
3741
3707
  return r.flatMap((e) => e.split("/")).filter(Boolean).join("/");
3742
3708
  }
3743
- n(ko, "pathJoin");
3744
- var jo = /* @__PURE__ */ n((r, e, t) => {
3709
+ n(Ao, "pathJoin");
3710
+ var Eo = /* @__PURE__ */ n((r, e, t) => {
3745
3711
  let { directory: o, importPathMatcher: s, titlePrefix: i = "" } = e || {};
3746
- typeof r == "number" && fi.warn(P`
3712
+ typeof r == "number" && si.warn(P`
3747
3713
  CSF Auto-title received a numeric fileName. This typically happens when
3748
3714
  webpack is mis-configured in production mode. To force webpack to produce
3749
3715
  filenames, set optimization.moduleIds = "named" in your webpack config.
3750
3716
  `);
3751
- let a = Jr(String(r));
3717
+ let a = Xr(String(r));
3752
3718
  if (s.exec(a)) {
3753
3719
  if (!t) {
3754
- let l = a.replace(o, ""), c = ko([i, l]).split("/");
3755
- return c = yi(c), c.join("/");
3720
+ let l = a.replace(o, ""), c = Ao([i, l]).split("/");
3721
+ return c = ii(c), c.join("/");
3756
3722
  }
3757
- return i ? ko([i, t]) : t;
3723
+ return i ? Ao([i, t]) : t;
3758
3724
  }
3759
- }, "userOrAutoTitleFromSpecifier"), mi = /* @__PURE__ */ n((r, e, t) => {
3725
+ }, "userOrAutoTitleFromSpecifier"), ai = /* @__PURE__ */ n((r, e, t) => {
3760
3726
  for (let o = 0; o < e.length; o += 1) {
3761
- let s = jo(r, e[o], t);
3727
+ let s = Eo(r, e[o], t);
3762
3728
  if (s)
3763
3729
  return s;
3764
3730
  }
@@ -3766,10 +3732,10 @@ var jo = /* @__PURE__ */ n((r, e, t) => {
3766
3732
  }, "userOrAutoTitle");
3767
3733
 
3768
3734
  // src/preview-api/modules/store/storySort.ts
3769
- var Mo = /\s*\/\s*/, _o = /* @__PURE__ */ n((r = {}) => (e, t) => {
3735
+ var Co = /\s*\/\s*/, vo = /* @__PURE__ */ n((r = {}) => (e, t) => {
3770
3736
  if (e.title === t.title && !r.includeNames)
3771
3737
  return 0;
3772
- let o = r.method || "configure", s = r.order || [], i = e.title.trim().split(Mo), a = t.title.trim().split(Mo);
3738
+ let o = r.method || "configure", s = r.order || [], i = e.title.trim().split(Co), a = t.title.trim().split(Co);
3773
3739
  r.includeNames && (i.push(e.name), a.push(t.name));
3774
3740
  let l = 0;
3775
3741
  for (; i[l] || a[l]; ) {
@@ -3793,18 +3759,18 @@ var Mo = /\s*\/\s*/, _o = /* @__PURE__ */ n((r = {}) => (e, t) => {
3793
3759
  }, "storySort");
3794
3760
 
3795
3761
  // src/preview-api/modules/store/sortStories.ts
3796
- var hi = /* @__PURE__ */ n((r, e, t) => {
3762
+ var li = /* @__PURE__ */ n((r, e, t) => {
3797
3763
  if (e) {
3798
3764
  let o;
3799
- typeof e == "function" ? o = e : o = _o(e), r.sort(o);
3765
+ typeof e == "function" ? o = e : o = vo(e), r.sort(o);
3800
3766
  } else
3801
3767
  r.sort(
3802
3768
  (o, s) => t.indexOf(o.importPath) - t.indexOf(s.importPath)
3803
3769
  );
3804
3770
  return r;
3805
- }, "sortStoriesCommon"), gi = /* @__PURE__ */ n((r, e, t) => {
3771
+ }, "sortStoriesCommon"), ci = /* @__PURE__ */ n((r, e, t) => {
3806
3772
  try {
3807
- return hi(r, e, t);
3773
+ return li(r, e, t);
3808
3774
  } catch (o) {
3809
3775
  throw new Error(P`
3810
3776
  Error sorting stories with sort parameter ${e}:
@@ -3819,48 +3785,49 @@ var hi = /* @__PURE__ */ n((r, e, t) => {
3819
3785
  }, "sortStoriesV7");
3820
3786
 
3821
3787
  // src/preview-api/modules/preview-web/Preview.tsx
3822
- import { deprecate as wi, logger as zo } from "storybook/internal/client-logger";
3788
+ import { deprecate as mi, logger as Do } from "storybook/internal/client-logger";
3823
3789
  import {
3824
- ARGTYPES_INFO_REQUEST as Ai,
3825
- ARGTYPES_INFO_RESPONSE as Go,
3826
- CONFIG_ERROR as Ei,
3827
- FORCE_REMOUNT as Ci,
3828
- FORCE_RE_RENDER as vi,
3829
- GLOBALS_UPDATED as Uo,
3830
- RESET_STORY_ARGS as Pi,
3831
- SET_GLOBALS as Fi,
3832
- STORY_ARGS_UPDATED as Ii,
3833
- STORY_INDEX_INVALIDATED as Oi,
3834
- UPDATE_GLOBALS as Di,
3835
- UPDATE_STORY_ARGS as ki
3790
+ ARGTYPES_INFO_REQUEST as hi,
3791
+ ARGTYPES_INFO_RESPONSE as ko,
3792
+ CONFIG_ERROR as gi,
3793
+ FORCE_REMOUNT as bi,
3794
+ FORCE_RE_RENDER as Si,
3795
+ GLOBALS_UPDATED as jo,
3796
+ RESET_STORY_ARGS as Ti,
3797
+ SET_GLOBALS as xi,
3798
+ STORY_ARGS_UPDATED as Ri,
3799
+ STORY_HOT_UPDATED as wi,
3800
+ STORY_INDEX_INVALIDATED as Ai,
3801
+ UPDATE_GLOBALS as Ei,
3802
+ UPDATE_STORY_ARGS as Ci
3836
3803
  } from "storybook/internal/core-events";
3837
3804
  import {
3838
3805
  CalledPreviewMethodBeforeInitializationError as W,
3839
- MissingRenderToCanvasError as ji,
3840
- StoryIndexFetchError as Mi,
3841
- StoryStoreAccessedBeforeInitializationError as _i
3806
+ MissingRenderToCanvasError as vi,
3807
+ StoryIndexFetchError as Pi,
3808
+ StoryStoreAccessedBeforeInitializationError as Fi
3842
3809
  } from "storybook/internal/preview-errors";
3843
- import { global as Ni } from "@storybook/global";
3810
+ import { global as Ii } from "@storybook/global";
3844
3811
 
3845
3812
  // src/preview-api/modules/preview-web/render/StoryRender.ts
3846
3813
  import {
3847
- PLAY_FUNCTION_THREW_EXCEPTION as bi,
3848
- STORY_FINISHED as No,
3849
- STORY_RENDERED as Si,
3850
- STORY_RENDER_PHASE_CHANGED as Lo,
3851
- UNHANDLED_ERRORS_WHILE_PLAYING as Ti
3814
+ PLAY_FUNCTION_THREW_EXCEPTION as di,
3815
+ STORY_FINISHED as Po,
3816
+ STORY_RENDERED as pi,
3817
+ STORY_RENDER_PHASE_CHANGED as Fo,
3818
+ UNHANDLED_ERRORS_WHILE_PLAYING as ui
3852
3819
  } from "storybook/internal/core-events";
3853
3820
  import {
3854
- MountMustBeDestructuredError as xi,
3855
- NoStoryMountedError as Ri
3821
+ MountMustBeDestructuredError as fi,
3822
+ NoStoryMountedError as yi
3856
3823
  } from "storybook/internal/preview-errors";
3857
3824
 
3858
3825
  // src/preview-api/modules/preview-web/render/Render.ts
3859
3826
  var J = new Error("prepareAborted");
3860
3827
 
3861
3828
  // src/preview-api/modules/preview-web/render/StoryRender.ts
3862
- var { AbortController: qo } = globalThis;
3863
- function Bo(r) {
3829
+ var { AbortController: Io } = globalThis;
3830
+ function Oo(r) {
3864
3831
  try {
3865
3832
  let { name: e = "Error", message: t = String(r), stack: o } = r;
3866
3833
  return { name: e, message: t, stack: o };
@@ -3868,8 +3835,8 @@ function Bo(r) {
3868
3835
  return { name: "Error", message: String(r) };
3869
3836
  }
3870
3837
  }
3871
- n(Bo, "serializeError");
3872
- var Qr = class Qr {
3838
+ n(Oo, "serializeError");
3839
+ var Jr = class Jr {
3873
3840
  constructor(e, t, o, s, i, a, l = { autoplay: !0, forceInitialArgs: !1 }, c) {
3874
3841
  this.channel = e;
3875
3842
  this.store = t;
@@ -3885,13 +3852,13 @@ var Qr = class Qr {
3885
3852
  this.teardownRender = /* @__PURE__ */ n(() => {
3886
3853
  }, "teardownRender");
3887
3854
  this.torndown = !1;
3888
- this.abortController = new qo(), c && (this.story = c, this.phase = "preparing");
3855
+ this.abortController = new Io(), c && (this.story = c, this.phase = "preparing");
3889
3856
  }
3890
3857
  async runPhase(e, t, o) {
3891
- this.phase = t, this.channel.emit(Lo, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
3858
+ this.phase = t, this.channel.emit(Fo, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
3892
3859
  }
3893
3860
  checkIfAborted(e) {
3894
- return e.aborted ? (this.phase = "aborted", this.channel.emit(Lo, { newPhase: this.phase, storyId: this.id }), !0) : !1;
3861
+ return e.aborted ? (this.phase = "aborted", this.channel.emit(Fo, { newPhase: this.phase, storyId: this.id }), !0) : !1;
3895
3862
  }
3896
3863
  async prepare() {
3897
3864
  if (await this.runPhase(this.abortController.signal, "preparing", async () => {
@@ -3943,7 +3910,7 @@ var Qr = class Qr {
3943
3910
  playFunction: g,
3944
3911
  runStep: b
3945
3912
  } = s;
3946
- t && !e && (this.cancelRender(), this.abortController = new qo());
3913
+ t && !e && (this.cancelRender(), this.abortController = new Io());
3947
3914
  let m = this.abortController.signal, T = !1, x = s.usesMount;
3948
3915
  try {
3949
3916
  let f = {
@@ -3952,7 +3919,7 @@ var Qr = class Qr {
3952
3919
  abortSignal: m,
3953
3920
  canvasElement: o,
3954
3921
  loaded: {},
3955
- step: /* @__PURE__ */ n((v, z) => b(v, z, f), "step"),
3922
+ step: /* @__PURE__ */ n((v, B) => b(v, B, f), "step"),
3956
3923
  context: null,
3957
3924
  canvas: {},
3958
3925
  userEvent: {},
@@ -3968,10 +3935,10 @@ var Qr = class Qr {
3968
3935
  // so that a user can just call it as await mount(...args) in their play function.
3969
3936
  mount: /* @__PURE__ */ n(async (...v) => {
3970
3937
  this.callbacks.showStoryDuringRender?.();
3971
- let z = null;
3938
+ let B = null;
3972
3939
  return await this.runPhase(m, "rendering", async () => {
3973
- z = await s.mount(f)(...v);
3974
- }), x && await this.runPhase(m, "playing"), z;
3940
+ B = await s.mount(f)(...v);
3941
+ }), x && await this.runPhase(m, "playing"), B;
3975
3942
  }, "mount")
3976
3943
  };
3977
3944
  f.context = f;
@@ -4004,30 +3971,31 @@ var Qr = class Qr {
4004
3971
  v.reason && E.add(v.reason);
4005
3972
  }, "onUnhandledRejection");
4006
3973
  if (this.renderOptions.autoplay && t && g && this.phase !== "errored") {
4007
- window.addEventListener("error", D), window.addEventListener("unhandledrejection", k), this.disableKeyListeners = !0;
3974
+ window?.addEventListener?.("error", D), window?.addEventListener?.("unhandledrejection", k), this.disableKeyListeners = !0;
4008
3975
  try {
4009
3976
  if (x ? await g(f) : (f.mount = async () => {
4010
- throw new xi({ playFunction: g.toString() });
3977
+ throw new fi({ playFunction: g.toString() });
4011
3978
  }, await this.runPhase(m, "playing", async () => g(f))), !T)
4012
- throw new Ri();
3979
+ throw new yi();
4013
3980
  this.checkIfAborted(m), !w && E.size > 0 ? await this.runPhase(m, "errored") : await this.runPhase(m, "played");
4014
3981
  } catch (v) {
4015
3982
  if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(m, "errored", async () => {
4016
- this.channel.emit(bi, Bo(v));
3983
+ this.channel.emit(di, Oo(v));
4017
3984
  }), this.story.parameters.throwPlayFunctionExceptions !== !1)
4018
3985
  throw v;
4019
3986
  console.error(v);
4020
3987
  }
4021
3988
  if (!w && E.size > 0 && this.channel.emit(
4022
- Ti,
4023
- Array.from(E).map(Bo)
4024
- ), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", k), window.removeEventListener("error", D), m.aborted)
3989
+ ui,
3990
+ Array.from(E).map(Oo)
3991
+ ), this.disableKeyListeners = !1, window?.removeEventListener?.("unhandledrejection", k), window?.removeEventListener?.("error", D),
3992
+ m.aborted)
4025
3993
  return;
4026
3994
  }
4027
3995
  await this.runPhase(m, "completing", async () => {
4028
- rr() ? this.store.addCleanupCallbacks(s, ge()) : await be(m);
3996
+ er() ? this.store.addCleanupCallbacks(s, ge()) : await be(m);
4029
3997
  }), await this.runPhase(m, "completed", async () => {
4030
- this.channel.emit(Si, i);
3998
+ this.channel.emit(pi, i);
4031
3999
  }), this.phase !== "errored" && await this.runPhase(m, "afterEach", async () => {
4032
4000
  await y(f);
4033
4001
  });
@@ -4037,7 +4005,7 @@ var Qr = class Qr {
4037
4005
  await this.runPhase(
4038
4006
  m,
4039
4007
  "finished",
4040
- async () => this.channel.emit(No, {
4008
+ async () => this.channel.emit(Po, {
4041
4009
  storyId: i,
4042
4010
  status: q ? "error" : "success",
4043
4011
  reporters: f.reporting.reports
@@ -4047,7 +4015,7 @@ var Qr = class Qr {
4047
4015
  this.phase = "errored", this.callbacks.showException(f), await this.runPhase(
4048
4016
  m,
4049
4017
  "finished",
4050
- async () => this.channel.emit(No, {
4018
+ async () => this.channel.emit(Po, {
4051
4019
  storyId: i,
4052
4020
  status: "error",
4053
4021
  reporters: []
@@ -4077,7 +4045,10 @@ var Qr = class Qr {
4077
4045
  // as a method to abort them, ASAP, but this is not foolproof as we cannot control what
4078
4046
  // happens inside the user's code.
4079
4047
  cancelRender() {
4080
- this.abortController?.abort();
4048
+ this.abortController.abort();
4049
+ }
4050
+ cancelPlayFunction() {
4051
+ this.phase === "playing" && (this.abortController.abort(), this.runPhase(this.abortController.signal, "aborted"));
4081
4052
  }
4082
4053
  async teardown() {
4083
4054
  this.torndown = !0, this.cancelRender(), this.story && await this.store.cleanupStory(this.story);
@@ -4088,15 +4059,15 @@ var Qr = class Qr {
4088
4059
  }
4089
4060
  await new Promise((t) => setTimeout(t, 0));
4090
4061
  }
4091
- window.location.reload(), await new Promise(() => {
4062
+ window?.location?.reload?.(), await new Promise(() => {
4092
4063
  });
4093
4064
  }
4094
4065
  };
4095
- n(Qr, "StoryRender");
4096
- var ie = Qr;
4066
+ n(Jr, "StoryRender");
4067
+ var ie = Jr;
4097
4068
 
4098
4069
  // src/preview-api/modules/preview-web/Preview.tsx
4099
- var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4070
+ var { fetch: Oi } = Ii, Di = "./index.json", Qr = class Qr {
4100
4071
  constructor(e, t, o = _.getChannel(), s = !0) {
4101
4072
  this.importFn = e;
4102
4073
  this.getProjectAnnotations = t;
@@ -4117,8 +4088,8 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4117
4088
  {
4118
4089
  get: /* @__PURE__ */ n((e, t) => {
4119
4090
  if (this.storyStoreValue)
4120
- return wi("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
4121
- throw new _i();
4091
+ return mi("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
4092
+ throw new Fi();
4122
4093
  }, "get")
4123
4094
  }
4124
4095
  );
@@ -4137,15 +4108,16 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4137
4108
  return this.storeInitializationPromise;
4138
4109
  }
4139
4110
  setupListeners() {
4140
- this.channel.on(Oi, this.onStoryIndexChanged.bind(this)), this.channel.on(Di, this.onUpdateGlobals.bind(this)), this.channel.on(ki, this.
4141
- onUpdateArgs.bind(this)), this.channel.on(Ai, this.onRequestArgTypesInfo.bind(this)), this.channel.on(Pi, this.onResetArgs.bind(this)), this.
4142
- channel.on(vi, this.onForceReRender.bind(this)), this.channel.on(Ci, this.onForceRemount.bind(this));
4111
+ this.channel.on(Ai, this.onStoryIndexChanged.bind(this)), this.channel.on(Ei, this.onUpdateGlobals.bind(this)), this.channel.on(Ci, this.
4112
+ onUpdateArgs.bind(this)), this.channel.on(hi, this.onRequestArgTypesInfo.bind(this)), this.channel.on(Ti, this.onResetArgs.bind(this)), this.
4113
+ channel.on(Si, this.onForceReRender.bind(this)), this.channel.on(bi, this.onForceRemount.bind(this)), this.channel.on(wi, this.onStoryHotUpdated.
4114
+ bind(this));
4143
4115
  }
4144
4116
  async getProjectAnnotationsOrRenderError() {
4145
4117
  try {
4146
4118
  let e = await this.getProjectAnnotations();
4147
4119
  if (this.renderToCanvas = e.renderToCanvas, !this.renderToCanvas)
4148
- throw new ji();
4120
+ throw new vi();
4149
4121
  return e;
4150
4122
  } catch (e) {
4151
4123
  throw this.renderPreviewEntryError("Error reading preview.js:", e), e;
@@ -4169,10 +4141,10 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4169
4141
  }
4170
4142
  }
4171
4143
  async getStoryIndexFromServer() {
4172
- let e = await Li(qi);
4144
+ let e = await Oi(Di);
4173
4145
  if (e.status === 200)
4174
4146
  return e.json();
4175
- throw new Mi({ text: await e.text() });
4147
+ throw new Pi({ text: await e.text() });
4176
4148
  }
4177
4149
  // If initialization gets as far as the story index, this function runs.
4178
4150
  initializeWithStoryIndex(e) {
@@ -4194,7 +4166,7 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4194
4166
  globals: this.storyStoreValue.userGlobals.get() || {},
4195
4167
  globalTypes: this.storyStoreValue.projectAnnotations.globalTypes || {}
4196
4168
  };
4197
- this.channel.emit(Fi, e);
4169
+ this.channel.emit(xi, e);
4198
4170
  }
4199
4171
  // EVENT HANDLERS
4200
4172
  // This happens when a config file gets reloaded
@@ -4239,7 +4211,7 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4239
4211
  throw new W({ methodName: "onUpdateGlobals" });
4240
4212
  if (this.storyStoreValue.userGlobals.update(e), t) {
4241
4213
  let { initialGlobals: o, storyGlobals: s, userGlobals: i, globals: a } = this.storyStoreValue.getStoryContext(t);
4242
- this.channel.emit(Uo, {
4214
+ this.channel.emit(jo, {
4243
4215
  initialGlobals: o,
4244
4216
  userGlobals: i,
4245
4217
  storyGlobals: s,
@@ -4247,7 +4219,7 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4247
4219
  });
4248
4220
  } else {
4249
4221
  let { initialGlobals: o, globals: s } = this.storyStoreValue.userGlobals;
4250
- this.channel.emit(Uo, {
4222
+ this.channel.emit(jo, {
4251
4223
  initialGlobals: o,
4252
4224
  userGlobals: s,
4253
4225
  storyGlobals: {},
@@ -4267,7 +4239,7 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4267
4239
  o.story && o.story.usesMount ? o.remount() : o.rerender()
4268
4240
  )
4269
4241
  )
4270
- ), this.channel.emit(Ii, {
4242
+ ), this.channel.emit(Ri, {
4271
4243
  storyId: e,
4272
4244
  args: this.storyStoreValue.args.get(e)
4273
4245
  });
@@ -4276,14 +4248,14 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4276
4248
  try {
4277
4249
  await this.storeInitializationPromise;
4278
4250
  let o = await this.storyStoreValue?.loadStory(t);
4279
- this.channel.emit(Go, {
4251
+ this.channel.emit(ko, {
4280
4252
  id: e,
4281
4253
  success: !0,
4282
4254
  payload: { argTypes: o?.argTypes || {} },
4283
4255
  error: null
4284
4256
  });
4285
4257
  } catch (o) {
4286
- this.channel.emit(Go, {
4258
+ this.channel.emit(ko, {
4287
4259
  id: e,
4288
4260
  success: !1,
4289
4261
  error: o?.message
@@ -4309,6 +4281,9 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4309
4281
  async onForceRemount({ storyId: e }) {
4310
4282
  await Promise.all(this.storyRenders.filter((t) => t.id === e).map((t) => t.remount()));
4311
4283
  }
4284
+ async onStoryHotUpdated() {
4285
+ await Promise.all(this.storyRenders.map((e) => e.cancelPlayFunction()));
4286
+ }
4312
4287
  // Used by docs to render a story to a given element
4313
4288
  // Note this short-circuits the `prepare()` phase of the StoryRender,
4314
4289
  // main to be consistent with the previous behaviour. In the future,
@@ -4356,59 +4331,59 @@ var { fetch: Li } = Ni, qi = "./index.json", Zr = class Zr {
4356
4331
  }
4357
4332
  // UTILITIES
4358
4333
  renderPreviewEntryError(e, t) {
4359
- this.previewEntryError = t, zo.error(e), zo.error(t), this.channel.emit(Ei, t);
4334
+ this.previewEntryError = t, Do.error(e), Do.error(t), this.channel.emit(gi, t);
4360
4335
  }
4361
4336
  };
4362
- n(Zr, "Preview");
4363
- var Te = Zr;
4337
+ n(Qr, "Preview");
4338
+ var Te = Qr;
4364
4339
 
4365
4340
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
4366
- import { global as El } from "@storybook/global";
4341
+ import { global as bl } from "@storybook/global";
4367
4342
 
4368
4343
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
4369
- import { logger as nr } from "storybook/internal/client-logger";
4344
+ import { logger as or } from "storybook/internal/client-logger";
4370
4345
  import {
4371
- CURRENT_STORY_WAS_SET as Ho,
4372
- DOCS_PREPARED as Hi,
4373
- GLOBALS_UPDATED as Vo,
4374
- PRELOAD_ENTRIES as Vi,
4375
- PREVIEW_KEYDOWN as Wi,
4376
- SET_CURRENT_STORY as $i,
4377
- STORY_CHANGED as Yi,
4378
- STORY_ERRORED as Ki,
4379
- STORY_MISSING as Wo,
4380
- STORY_PREPARED as Xi,
4381
- STORY_RENDER_PHASE_CHANGED as $o,
4382
- STORY_SPECIFIED as Ji,
4383
- STORY_THREW_EXCEPTION as Qi,
4384
- STORY_UNCHANGED as Zi,
4385
- UPDATE_QUERY_PARAMS as ea
4346
+ CURRENT_STORY_WAS_SET as Mo,
4347
+ DOCS_PREPARED as Ni,
4348
+ GLOBALS_UPDATED as _o,
4349
+ PRELOAD_ENTRIES as Li,
4350
+ PREVIEW_KEYDOWN as qi,
4351
+ SET_CURRENT_STORY as zi,
4352
+ STORY_CHANGED as Bi,
4353
+ STORY_ERRORED as Gi,
4354
+ STORY_MISSING as No,
4355
+ STORY_PREPARED as Ui,
4356
+ STORY_RENDER_PHASE_CHANGED as Lo,
4357
+ STORY_SPECIFIED as Hi,
4358
+ STORY_THREW_EXCEPTION as Vi,
4359
+ STORY_UNCHANGED as Wi,
4360
+ UPDATE_QUERY_PARAMS as $i
4386
4361
  } from "storybook/internal/core-events";
4387
4362
  import {
4388
- CalledPreviewMethodBeforeInitializationError as nt,
4389
- EmptyIndexError as ra,
4390
- MdxFileWithNoCsfReferencesError as ta,
4391
- NoStoryMatchError as oa
4363
+ CalledPreviewMethodBeforeInitializationError as ot,
4364
+ EmptyIndexError as Yi,
4365
+ MdxFileWithNoCsfReferencesError as Ki,
4366
+ NoStoryMatchError as Xi
4392
4367
  } from "storybook/internal/preview-errors";
4393
4368
 
4394
4369
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
4395
- var Bi = !1, et = "Invariant failed";
4396
- function or(r, e) {
4370
+ var ki = !1, Zr = "Invariant failed";
4371
+ function tr(r, e) {
4397
4372
  if (!r) {
4398
- if (Bi)
4399
- throw new Error(et);
4400
- var t = typeof e == "function" ? e() : e, o = t ? "".concat(et, ": ").concat(t) : et;
4373
+ if (ki)
4374
+ throw new Error(Zr);
4375
+ var t = typeof e == "function" ? e() : e, o = t ? "".concat(Zr, ": ").concat(t) : Zr;
4401
4376
  throw new Error(o);
4402
4377
  }
4403
4378
  }
4404
- n(or, "invariant");
4379
+ n(tr, "invariant");
4405
4380
 
4406
4381
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
4407
- import { DOCS_RENDERED as Gi } from "storybook/internal/core-events";
4382
+ import { DOCS_RENDERED as Mi } from "storybook/internal/core-events";
4408
4383
 
4409
4384
  // src/preview-api/modules/preview-web/docs-context/DocsContext.ts
4410
- import { isStory as zi } from "storybook/internal/csf";
4411
- var rt = class rt {
4385
+ import { isStory as ji } from "storybook/internal/csf";
4386
+ var et = class et {
4412
4387
  constructor(e, t, o, s) {
4413
4388
  this.channel = e;
4414
4389
  this.store = t;
@@ -4508,7 +4483,7 @@ CSF file?"
4508
4483
  if (t)
4509
4484
  return { type: "meta", csfFile: t };
4510
4485
  let o = this.exportToStory.get(
4511
- zi(e) ? e.input : e
4486
+ ji(e) ? e.input : e
4512
4487
  );
4513
4488
  return o ? { type: "story", story: o } : { type: "component", component: e };
4514
4489
  }
@@ -4546,11 +4521,11 @@ CSF file?"
4546
4521
  }
4547
4522
  }
4548
4523
  };
4549
- n(rt, "DocsContext");
4550
- var Q = rt;
4524
+ n(et, "DocsContext");
4525
+ var Q = et;
4551
4526
 
4552
4527
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
4553
- var tt = class tt {
4528
+ var rt = class rt {
4554
4529
  constructor(e, t, o, s) {
4555
4530
  this.channel = e;
4556
4531
  this.store = t;
@@ -4602,7 +4577,7 @@ var tt = class tt {
4602
4577
  );
4603
4578
  let i = await s.renderer(), { render: a } = i, l = /* @__PURE__ */ n(async () => {
4604
4579
  try {
4605
- await a(o, s, e), this.channel.emit(Gi, this.id);
4580
+ await a(o, s, e), this.channel.emit(Mi, this.id);
4606
4581
  } catch (c) {
4607
4582
  this.callbacks.showException(c);
4608
4583
  }
@@ -4615,12 +4590,12 @@ var tt = class tt {
4615
4590
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
4616
4591
  }
4617
4592
  };
4618
- n(tt, "CsfDocsRender");
4619
- var Ne = tt;
4593
+ n(rt, "CsfDocsRender");
4594
+ var _e = rt;
4620
4595
 
4621
4596
  // src/preview-api/modules/preview-web/render/MdxDocsRender.ts
4622
- import { DOCS_RENDERED as Ui } from "storybook/internal/core-events";
4623
- var ot = class ot {
4597
+ import { DOCS_RENDERED as _i } from "storybook/internal/core-events";
4598
+ var tt = class tt {
4624
4599
  constructor(e, t, o, s) {
4625
4600
  this.channel = e;
4626
4601
  this.store = t;
@@ -4659,14 +4634,14 @@ var ot = class ot {
4659
4634
  async renderToElement(e, t) {
4660
4635
  if (!this.exports || !this.csfFiles || !this.store.projectAnnotations)
4661
4636
  throw new Error("Cannot render docs before preparing");
4662
- let o = this.docsContext(t), { docs: s } = this.store.projectAnnotations.parameters || {};
4637
+ let o = this.docsContext(t), { docs: s } = this.store.projectAnnotations.parameters ?? {};
4663
4638
  if (!s)
4664
4639
  throw new Error(
4665
4640
  "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed"
4666
4641
  );
4667
4642
  let i = { ...s, page: this.exports.default }, a = await s.renderer(), { render: l } = a, c = /* @__PURE__ */ n(async () => {
4668
4643
  try {
4669
- await l(o, i, e), this.channel.emit(Ui, this.id);
4644
+ await l(o, i, e), this.channel.emit(_i, this.id);
4670
4645
  } catch (d) {
4671
4646
  this.callbacks.showException(d);
4672
4647
  }
@@ -4679,34 +4654,34 @@ var ot = class ot {
4679
4654
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
4680
4655
  }
4681
4656
  };
4682
- n(ot, "MdxDocsRender");
4683
- var Le = ot;
4657
+ n(tt, "MdxDocsRender");
4658
+ var Ne = tt;
4684
4659
 
4685
4660
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
4686
- var na = globalThis;
4687
- function sa(r) {
4661
+ var Ji = globalThis;
4662
+ function Qi(r) {
4688
4663
  let e = r.composedPath && r.composedPath()[0] || r.target;
4689
4664
  return /input|textarea/i.test(e.tagName) || e.getAttribute("contenteditable") !== null;
4690
4665
  }
4691
- n(sa, "focusInInput");
4692
- var Yo = "attached-mdx", ia = "unattached-mdx";
4693
- function aa({ tags: r }) {
4694
- return r?.includes(ia) || r?.includes(Yo);
4666
+ n(Qi, "focusInInput");
4667
+ var qo = "attached-mdx", Zi = "unattached-mdx";
4668
+ function ea({ tags: r }) {
4669
+ return r?.includes(Zi) || r?.includes(qo);
4695
4670
  }
4696
- n(aa, "isMdxEntry");
4697
- function st(r) {
4671
+ n(ea, "isMdxEntry");
4672
+ function nt(r) {
4698
4673
  return r.type === "story";
4699
4674
  }
4700
- n(st, "isStoryRender");
4701
- function la(r) {
4675
+ n(nt, "isStoryRender");
4676
+ function ra(r) {
4702
4677
  return r.type === "docs";
4703
4678
  }
4704
- n(la, "isDocsRender");
4705
- function ca(r) {
4706
- return la(r) && r.subtype === "csf";
4679
+ n(ra, "isDocsRender");
4680
+ function ta(r) {
4681
+ return ra(r) && r.subtype === "csf";
4707
4682
  }
4708
- n(ca, "isCsfDocsRender");
4709
- var it = class it extends Te {
4683
+ n(ta, "isCsfDocsRender");
4684
+ var st = class st extends Te {
4710
4685
  constructor(t, o, s, i) {
4711
4686
  super(t, o, void 0, !1);
4712
4687
  this.importFn = t;
@@ -4716,12 +4691,12 @@ var it = class it extends Te {
4716
4691
  this.initialize();
4717
4692
  }
4718
4693
  setupListeners() {
4719
- super.setupListeners(), na.onkeydown = this.onKeydown.bind(this), this.channel.on($i, this.onSetCurrentStory.bind(this)), this.channel.on(
4720
- ea, this.onUpdateQueryParams.bind(this)), this.channel.on(Vi, this.onPreloadStories.bind(this));
4694
+ super.setupListeners(), Ji.onkeydown = this.onKeydown.bind(this), this.channel.on(zi, this.onSetCurrentStory.bind(this)), this.channel.on(
4695
+ $i, this.onUpdateQueryParams.bind(this)), this.channel.on(Li, this.onPreloadStories.bind(this));
4721
4696
  }
4722
4697
  async setInitialGlobals() {
4723
4698
  if (!this.storyStoreValue)
4724
- throw new nt({ methodName: "setInitialGlobals" });
4699
+ throw new ot({ methodName: "setInitialGlobals" });
4725
4700
  let { globals: t } = this.selectionStore.selectionSpecifier || {};
4726
4701
  t && this.storyStoreValue.userGlobals.updateFromPersisted(t), this.emitGlobals();
4727
4702
  }
@@ -4732,7 +4707,7 @@ var it = class it extends Te {
4732
4707
  // Use the selection specifier to choose a story, then render it
4733
4708
  async selectSpecifiedStory() {
4734
4709
  if (!this.storyStoreValue)
4735
- throw new nt({
4710
+ throw new ot({
4736
4711
  methodName: "selectSpecifiedStory"
4737
4712
  });
4738
4713
  if (this.selectionStore.selection) {
@@ -4745,14 +4720,14 @@ var it = class it extends Te {
4745
4720
  }
4746
4721
  let { storySpecifier: t, args: o } = this.selectionStore.selectionSpecifier, s = this.storyStoreValue.storyIndex.entryFromSpecifier(t);
4747
4722
  if (!s) {
4748
- t === "*" ? this.renderStoryLoadingException(t, new ra()) : this.renderStoryLoadingException(
4723
+ t === "*" ? this.renderStoryLoadingException(t, new Yi()) : this.renderStoryLoadingException(
4749
4724
  t,
4750
- new oa({ storySpecifier: t.toString() })
4725
+ new Xi({ storySpecifier: t.toString() })
4751
4726
  );
4752
4727
  return;
4753
4728
  }
4754
4729
  let { id: i, type: a } = s;
4755
- this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Ji, this.selectionStore.selection), this.channel.emit(Ho,
4730
+ this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Hi, this.selectionStore.selection), this.channel.emit(Mo,
4756
4731
  this.selectionStore.selection), await this.renderSelection({ persistedArgs: o });
4757
4732
  }
4758
4733
  // EVENT HANDLERS
@@ -4771,15 +4746,15 @@ var it = class it extends Te {
4771
4746
  selectSpecifiedStory();
4772
4747
  }
4773
4748
  onKeydown(t) {
4774
- if (!this.storyRenders.find((o) => o.disableKeyListeners) && !sa(t)) {
4749
+ if (!this.storyRenders.find((o) => o.disableKeyListeners) && !Qi(t)) {
4775
4750
  let { altKey: o, ctrlKey: s, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d } = t;
4776
- this.channel.emit(Wi, {
4751
+ this.channel.emit(qi, {
4777
4752
  event: { altKey: o, ctrlKey: s, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d }
4778
4753
  });
4779
4754
  }
4780
4755
  }
4781
4756
  async onSetCurrentStory(t) {
4782
- this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(Ho, this.selectionStore.
4757
+ this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(Mo, this.selectionStore.
4783
4758
  selection), this.renderSelection();
4784
4759
  }
4785
4760
  onUpdateQueryParams(t) {
@@ -4787,7 +4762,7 @@ var it = class it extends Te {
4787
4762
  }
4788
4763
  async onUpdateGlobals({ globals: t }) {
4789
4764
  let o = this.currentRender instanceof ie && this.currentRender.story || void 0;
4790
- super.onUpdateGlobals({ globals: t, currentStory: o }), (this.currentRender instanceof Le || this.currentRender instanceof Ne) && await this.
4765
+ super.onUpdateGlobals({ globals: t, currentStory: o }), (this.currentRender instanceof Ne || this.currentRender instanceof _e) && await this.
4791
4766
  currentRender.rerender?.();
4792
4767
  }
4793
4768
  async onUpdateArgs({ storyId: t, updatedArgs: o }) {
@@ -4805,7 +4780,7 @@ var it = class it extends Te {
4805
4780
  async renderSelection({ persistedArgs: t } = {}) {
4806
4781
  let { renderToCanvas: o } = this;
4807
4782
  if (!this.storyStoreValue || !o)
4808
- throw new nt({ methodName: "renderSelection" });
4783
+ throw new ot({ methodName: "renderSelection" });
4809
4784
  let { selection: s } = this.selectionStore;
4810
4785
  if (!s)
4811
4786
  throw new Error("Cannot call renderSelection as no selection was made");
@@ -4827,12 +4802,12 @@ var it = class it extends Te {
4827
4802
  this.mainStoryCallbacks(i),
4828
4803
  i,
4829
4804
  "story"
4830
- ) : aa(a) ? d = new Le(
4805
+ ) : ea(a) ? d = new Ne(
4831
4806
  this.channel,
4832
4807
  this.storyStoreValue,
4833
4808
  a,
4834
4809
  this.mainStoryCallbacks(i)
4835
- ) : d = new Ne(
4810
+ ) : d = new _e(
4836
4811
  this.channel,
4837
4812
  this.storyStoreValue,
4838
4813
  a,
@@ -4849,12 +4824,12 @@ var it = class it extends Te {
4849
4824
  return;
4850
4825
  }
4851
4826
  let y = !l && u && !d.isEqual(u);
4852
- if (t && st(d) && (or(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
4853
- this.currentRender = u, this.channel.emit(Zi, i), this.view.showMain();
4827
+ if (t && nt(d) && (tr(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
4828
+ this.currentRender = u, this.channel.emit(Wi, i), this.view.showMain();
4854
4829
  return;
4855
4830
  }
4856
- if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(Yi, i), st(d)) {
4857
- or(!!d.story);
4831
+ if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(Bi, i), nt(d)) {
4832
+ tr(!!d.story);
4858
4833
  let {
4859
4834
  parameters: h,
4860
4835
  initialArgs: g,
@@ -4865,33 +4840,33 @@ var it = class it extends Te {
4865
4840
  storyGlobals: f,
4866
4841
  globals: S
4867
4842
  } = this.storyStoreValue.getStoryContext(d.story);
4868
- this.channel.emit(Xi, {
4843
+ this.channel.emit(Ui, {
4869
4844
  id: i,
4870
4845
  parameters: h,
4871
4846
  initialArgs: g,
4872
4847
  argTypes: b,
4873
4848
  args: m
4874
- }), this.channel.emit(Vo, { userGlobals: x, storyGlobals: f, globals: S, initialGlobals: T });
4849
+ }), this.channel.emit(_o, { userGlobals: x, storyGlobals: f, globals: S, initialGlobals: T });
4875
4850
  } else {
4876
4851
  let { parameters: h } = this.storyStoreValue.projectAnnotations, { initialGlobals: g, globals: b } = this.storyStoreValue.userGlobals;
4877
- if (this.channel.emit(Vo, {
4852
+ if (this.channel.emit(_o, {
4878
4853
  globals: b,
4879
4854
  initialGlobals: g,
4880
4855
  storyGlobals: {},
4881
4856
  userGlobals: b
4882
- }), ca(d) || d.entry.tags?.includes(Yo)) {
4857
+ }), ta(d) || d.entry.tags?.includes(qo)) {
4883
4858
  if (!d.csfFiles)
4884
- throw new ta({ storyId: i });
4859
+ throw new Ki({ storyId: i });
4885
4860
  ({ parameters: h } = this.storyStoreValue.preparedMetaFromCSFFile({
4886
4861
  csfFile: d.csfFiles[0]
4887
4862
  }));
4888
4863
  }
4889
- this.channel.emit(Hi, {
4864
+ this.channel.emit(Ni, {
4890
4865
  id: i,
4891
4866
  parameters: h
4892
4867
  });
4893
4868
  }
4894
- st(d) ? (or(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
4869
+ nt(d) ? (tr(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
4895
4870
  this.view.prepareForStory(d.story)
4896
4871
  )) : this.currentRender.renderToElement(
4897
4872
  this.view.prepareForDocs(),
@@ -4915,41 +4890,41 @@ var it = class it extends Te {
4915
4890
  super.renderPreviewEntryError(t, o), this.view.showErrorDisplay(o);
4916
4891
  }
4917
4892
  renderMissingStory() {
4918
- this.view.showNoPreview(), this.channel.emit(Wo);
4893
+ this.view.showNoPreview(), this.channel.emit(No);
4919
4894
  }
4920
4895
  renderStoryLoadingException(t, o) {
4921
- nr.error(o), this.view.showErrorDisplay(o), this.channel.emit(Wo, t);
4896
+ or.error(o), this.view.showErrorDisplay(o), this.channel.emit(No, t);
4922
4897
  }
4923
4898
  // renderException is used if we fail to render the story and it is uncaught by the app layer
4924
4899
  renderException(t, o) {
4925
4900
  let { name: s = "Error", message: i = String(o), stack: a } = o;
4926
- this.channel.emit(Qi, { name: s, message: i, stack: a }), this.channel.emit($o, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
4927
- o), nr.error(`Error rendering story '${t}':`), nr.error(o);
4901
+ this.channel.emit(Vi, { name: s, message: i, stack: a }), this.channel.emit(Lo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
4902
+ o), or.error(`Error rendering story '${t}':`), or.error(o);
4928
4903
  }
4929
4904
  // renderError is used by the various app layers to inform the user they have done something
4930
4905
  // wrong -- for instance returned the wrong thing from a story
4931
4906
  renderError(t, { title: o, description: s }) {
4932
- nr.error(`Error rendering story ${o}: ${s}`), this.channel.emit(Ki, { title: o, description: s }), this.channel.emit($o, { newPhase: "er\
4907
+ or.error(`Error rendering story ${o}: ${s}`), this.channel.emit(Gi, { title: o, description: s }), this.channel.emit(Lo, { newPhase: "er\
4933
4908
  rored", storyId: t }), this.view.showErrorDisplay({
4934
4909
  message: o,
4935
4910
  stack: s
4936
4911
  });
4937
4912
  }
4938
4913
  };
4939
- n(it, "PreviewWithSelection");
4940
- var xe = it;
4914
+ n(st, "PreviewWithSelection");
4915
+ var xe = st;
4941
4916
 
4942
4917
  // src/preview-api/modules/preview-web/UrlStore.ts
4943
- var Be = ue(cr(), 1);
4944
- import { global as La } from "@storybook/global";
4918
+ var qe = ue(lr(), 1);
4919
+ import { global as Oa } from "@storybook/global";
4945
4920
 
4946
4921
  // src/preview-api/modules/preview-web/parseArgsParam.ts
4947
- import { once as Ma } from "storybook/internal/client-logger";
4948
- var ln = ue(cr(), 1);
4949
- var an = /^[a-zA-Z0-9 _-]*$/, cn = /^-?[0-9]+(\.[0-9]+)?$/, _a = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, dn = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
4950
- ft = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !an.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
4951
- typeof e == "boolean" ? !0 : typeof e == "string" ? an.test(e) || cn.test(e) || _a.test(e) || dn.test(e) : Array.isArray(e) ? e.every((t) => ft(
4952
- r, t)) : j(e) ? Object.entries(e).every(([t, o]) => ft(t, o)) : !1, "validateArgs"), Na = {
4922
+ import { once as Pa } from "storybook/internal/client-logger";
4923
+ var Qo = ue(lr(), 1);
4924
+ var Jo = /^[a-zA-Z0-9 _-]*$/, Zo = /^-?[0-9]+(\.[0-9]+)?$/, Fa = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, en = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
4925
+ ut = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !Jo.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
4926
+ typeof e == "boolean" ? !0 : typeof e == "string" ? Jo.test(e) || Zo.test(e) || Fa.test(e) || en.test(e) : Array.isArray(e) ? e.every((t) => ut(
4927
+ r, t)) : j(e) ? Object.entries(e).every(([t, o]) => ut(t, o)) : !1, "validateArgs"), Ia = {
4953
4928
  delimiter: ";",
4954
4929
  // we're parsing a single query param
4955
4930
  nesting: !0,
@@ -4971,17 +4946,17 @@ r, t)) : j(e) ? Object.entries(e).every(([t, o]) => ft(t, o)) : !1, "validateArg
4971
4946
  return new Date(r.replaceAll(" ", "+").slice(6, -1));
4972
4947
  if (r.startsWith("!hex(") && r.endsWith(")"))
4973
4948
  return `#${r.slice(5, -1)}`;
4974
- let e = r.slice(1).match(dn);
4949
+ let e = r.slice(1).match(en);
4975
4950
  if (e)
4976
4951
  return r.startsWith("!rgba") || r.startsWith("!RGBA") ? `${e[1]}(${e[2]}, ${e[3]}, ${e[4]}, ${e[5]})` : r.startsWith("!hsla") || r.startsWith(
4977
4952
  "!HSLA") ? `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%, ${e[5]})` : r.startsWith("!rgb") || r.startsWith("!RGB") ? `${e[1]}(${e[2]}, ${e[3]}\
4978
4953
  , ${e[4]})` : `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%)`;
4979
4954
  }
4980
- return cn.test(r) ? Number(r) : r;
4955
+ return Zo.test(r) ? Number(r) : r;
4981
4956
  }
4982
- }, yt = /* @__PURE__ */ n((r) => {
4957
+ }, ft = /* @__PURE__ */ n((r) => {
4983
4958
  let e = r.split(";").map((t) => t.replace("=", "~").replace(":", "="));
4984
- return Object.entries((0, ln.parse)(e.join(";"), Na)).reduce((t, [o, s]) => ft(o, s) ? Object.assign(t, { [o]: s }) : (Ma.warn(P`
4959
+ return Object.entries((0, Qo.parse)(e.join(";"), Ia)).reduce((t, [o, s]) => ut(o, s) ? Object.assign(t, { [o]: s }) : (Pa.warn(P`
4985
4960
  Omitted potentially unsafe URL args.
4986
4961
 
4987
4962
  More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
@@ -4989,88 +4964,88 @@ r, t)) : j(e) ? Object.entries(e).every(([t, o]) => ft(t, o)) : !1, "validateArg
4989
4964
  }, "parseArgsParam");
4990
4965
 
4991
4966
  // src/preview-api/modules/preview-web/UrlStore.ts
4992
- var { history: pn, document: Z } = La;
4993
- function qa(r) {
4967
+ var { history: rn, document: Z } = Oa;
4968
+ function Da(r) {
4994
4969
  let e = (r || "").match(/^\/story\/(.+)/);
4995
4970
  if (!e)
4996
4971
  throw new Error(`Invalid path '${r}', must start with '/story/'`);
4997
4972
  return e[1];
4998
4973
  }
4999
- n(qa, "pathToId");
5000
- var un = /* @__PURE__ */ n(({
4974
+ n(Da, "pathToId");
4975
+ var tn = /* @__PURE__ */ n(({
5001
4976
  selection: r,
5002
4977
  extraParams: e
5003
4978
  }) => {
5004
- let t = Z?.location.search.slice(1), { path: o, selectedKind: s, selectedStory: i, ...a } = (0, Be.parse)(t);
5005
- return `?${(0, Be.stringify)({
4979
+ let t = Z?.location.search.slice(1), { path: o, selectedKind: s, selectedStory: i, ...a } = (0, qe.parse)(t);
4980
+ return `?${(0, qe.stringify)({
5006
4981
  ...a,
5007
4982
  ...e,
5008
4983
  ...r && { id: r.storyId, viewMode: r.viewMode }
5009
4984
  })}`;
5010
- }, "getQueryString"), Ba = /* @__PURE__ */ n((r) => {
4985
+ }, "getQueryString"), ka = /* @__PURE__ */ n((r) => {
5011
4986
  if (!r)
5012
4987
  return;
5013
- let e = un({ selection: r }), { hash: t = "" } = Z.location;
5014
- Z.title = r.storyId, pn.replaceState({}, "", `${Z.location.pathname}${e}${t}`);
5015
- }, "setPath"), za = /* @__PURE__ */ n((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), qe = /* @__PURE__ */ n(
4988
+ let e = tn({ selection: r }), { hash: t = "" } = Z.location;
4989
+ Z.title = r.storyId, rn.replaceState({}, "", `${Z.location.pathname}${e}${t}`);
4990
+ }, "setPath"), ja = /* @__PURE__ */ n((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), Le = /* @__PURE__ */ n(
5016
4991
  (r) => {
5017
4992
  if (r !== void 0) {
5018
4993
  if (typeof r == "string")
5019
4994
  return r;
5020
4995
  if (Array.isArray(r))
5021
- return qe(r[0]);
5022
- if (za(r))
5023
- return qe(
4996
+ return Le(r[0]);
4997
+ if (ja(r))
4998
+ return Le(
5024
4999
  Object.values(r).filter(Boolean)
5025
5000
  );
5026
5001
  }
5027
- }, "getFirstString"), Ga = /* @__PURE__ */ n(() => {
5002
+ }, "getFirstString"), Ma = /* @__PURE__ */ n(() => {
5028
5003
  if (typeof Z < "u") {
5029
- let r = Z.location.search.slice(1), e = (0, Be.parse)(r), t = typeof e.args == "string" ? yt(e.args) : void 0, o = typeof e.globals == "\
5030
- string" ? yt(e.globals) : void 0, s = qe(e.viewMode);
5004
+ let r = Z.location.search.slice(1), e = (0, qe.parse)(r), t = typeof e.args == "string" ? ft(e.args) : void 0, o = typeof e.globals == "\
5005
+ string" ? ft(e.globals) : void 0, s = Le(e.viewMode);
5031
5006
  (typeof s != "string" || !s.match(/docs|story/)) && (s = "story");
5032
- let i = qe(e.path), a = i ? qa(i) : qe(e.id);
5007
+ let i = Le(e.path), a = i ? Da(i) : Le(e.id);
5033
5008
  if (a)
5034
5009
  return { storySpecifier: a, args: t, globals: o, viewMode: s };
5035
5010
  }
5036
5011
  return null;
5037
- }, "getSelectionSpecifierFromPath"), mt = class mt {
5012
+ }, "getSelectionSpecifierFromPath"), yt = class yt {
5038
5013
  constructor() {
5039
- this.selectionSpecifier = Ga();
5014
+ this.selectionSpecifier = Ma();
5040
5015
  }
5041
5016
  setSelection(e) {
5042
- this.selection = e, Ba(this.selection);
5017
+ this.selection = e, ka(this.selection);
5043
5018
  }
5044
5019
  setQueryParams(e) {
5045
- let t = un({ extraParams: e }), { hash: o = "" } = Z.location;
5046
- pn.replaceState({}, "", `${Z.location.pathname}${t}${o}`);
5020
+ let t = tn({ extraParams: e }), { hash: o = "" } = Z.location;
5021
+ rn.replaceState({}, "", `${Z.location.pathname}${t}${o}`);
5047
5022
  }
5048
5023
  };
5049
- n(mt, "UrlStore");
5050
- var Re = mt;
5024
+ n(yt, "UrlStore");
5025
+ var Re = yt;
5051
5026
 
5052
5027
  // src/preview-api/modules/preview-web/WebView.ts
5053
- var Hn = ue(zn(), 1), Vn = ue(cr(), 1);
5054
- import { logger as wl } from "storybook/internal/client-logger";
5055
- import { global as Al } from "@storybook/global";
5056
- var { document: O } = Al, Gn = 100, Wn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
5057
- _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Wn || {}), Rt = {
5028
+ var Mn = ue(Dn(), 1), _n = ue(lr(), 1);
5029
+ import { logger as hl } from "storybook/internal/client-logger";
5030
+ import { global as gl } from "@storybook/global";
5031
+ var { document: O } = gl, kn = 100, Nn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
5032
+ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}), xt = {
5058
5033
  PREPARING_STORY: "sb-show-preparing-story",
5059
5034
  PREPARING_DOCS: "sb-show-preparing-docs",
5060
5035
  MAIN: "sb-show-main",
5061
5036
  NOPREVIEW: "sb-show-nopreview",
5062
5037
  ERROR: "sb-show-errordisplay"
5063
- }, wt = {
5038
+ }, Rt = {
5064
5039
  centered: "sb-main-centered",
5065
5040
  fullscreen: "sb-main-fullscreen",
5066
5041
  padded: "sb-main-padded"
5067
- }, Un = new Hn.default({
5042
+ }, jn = new Mn.default({
5068
5043
  escapeXML: !0
5069
- }), At = class At {
5044
+ }), wt = class wt {
5070
5045
  constructor() {
5071
5046
  this.testing = !1;
5072
5047
  if (typeof O < "u") {
5073
- let { __SPECIAL_TEST_PARAMETER__: e } = (0, Vn.parse)(O.location.search.slice(1));
5048
+ let { __SPECIAL_TEST_PARAMETER__: e } = (0, _n.parse)(O.location.search.slice(1));
5074
5049
  switch (e) {
5075
5050
  case "preparing-story": {
5076
5051
  this.showPreparingStory(), this.testing = !0;
@@ -5105,27 +5080,27 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Wn || {}),
5105
5080
  return;
5106
5081
  }
5107
5082
  this.checkIfLayoutExists(e);
5108
- let t = wt[e];
5083
+ let t = Rt[e];
5109
5084
  O.body.classList.remove(this.currentLayoutClass), O.body.classList.add(t), this.currentLayoutClass = t;
5110
5085
  }
5111
5086
  checkIfLayoutExists(e) {
5112
- wt[e] || wl.warn(
5087
+ Rt[e] || hl.warn(
5113
5088
  P`
5114
5089
  The desired layout: ${e} is not a valid option.
5115
- The possible options are: ${Object.keys(wt).join(", ")}, none.
5090
+ The possible options are: ${Object.keys(Rt).join(", ")}, none.
5116
5091
  `
5117
5092
  );
5118
5093
  }
5119
5094
  showMode(e) {
5120
- clearTimeout(this.preparingTimeout), Object.keys(Wn).forEach((t) => {
5121
- t === e ? O.body.classList.add(Rt[t]) : O.body.classList.remove(Rt[t]);
5095
+ clearTimeout(this.preparingTimeout), Object.keys(Nn).forEach((t) => {
5096
+ t === e ? O.body.classList.add(xt[t]) : O.body.classList.remove(xt[t]);
5122
5097
  });
5123
5098
  }
5124
5099
  showErrorDisplay({ message: e = "", stack: t = "" }) {
5125
5100
  let o = e, s = t, i = e.split(`
5126
5101
  `);
5127
5102
  i.length > 1 && ([o] = i, s = i.slice(1).join(`
5128
- `).replace(/^\n/, "")), O.getElementById("error-message").innerHTML = Un.toHtml(o), O.getElementById("error-stack").innerHTML = Un.toHtml(s),
5103
+ `).replace(/^\n/, "")), O.getElementById("error-message").innerHTML = jn.toHtml(o), O.getElementById("error-stack").innerHTML = jn.toHtml(s),
5129
5104
  this.showMode("ERROR");
5130
5105
  }
5131
5106
  showNoPreview() {
@@ -5135,12 +5110,12 @@ true"));
5135
5110
  showPreparingStory({ immediate: e = !1 } = {}) {
5136
5111
  clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_STORY") : this.preparingTimeout = setTimeout(
5137
5112
  () => this.showMode("PREPARING_STORY"),
5138
- Gn
5113
+ kn
5139
5114
  );
5140
5115
  }
5141
5116
  showPreparingDocs({ immediate: e = !1 } = {}) {
5142
5117
  clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_DOCS") : this.preparingTimeout = setTimeout(() => this.showMode("PREPA\
5143
- RING_DOCS"), Gn);
5118
+ RING_DOCS"), kn);
5144
5119
  }
5145
5120
  showMain() {
5146
5121
  this.showMode("MAIN");
@@ -5152,27 +5127,27 @@ RING_DOCS"), Gn);
5152
5127
  this.docsRoot().setAttribute("hidden", "true"), this.storyRoot().removeAttribute("hidden");
5153
5128
  }
5154
5129
  showStoryDuringRender() {
5155
- O.body.classList.add(Rt.MAIN);
5130
+ O.body.classList.add(xt.MAIN);
5156
5131
  }
5157
5132
  };
5158
- n(At, "WebView");
5159
- var we = At;
5133
+ n(wt, "WebView");
5134
+ var we = wt;
5160
5135
 
5161
5136
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
5162
- var Et = class Et extends xe {
5137
+ var At = class At extends xe {
5163
5138
  constructor(t, o) {
5164
5139
  super(t, o, new Re(), new we());
5165
5140
  this.importFn = t;
5166
5141
  this.getProjectAnnotations = o;
5167
- El.__STORYBOOK_PREVIEW__ = this;
5142
+ bl.__STORYBOOK_PREVIEW__ = this;
5168
5143
  }
5169
5144
  };
5170
- n(Et, "PreviewWeb");
5171
- var gr = Et;
5145
+ n(At, "PreviewWeb");
5146
+ var hr = At;
5172
5147
 
5173
5148
  // src/preview-api/modules/preview-web/simulate-pageload.ts
5174
- import { global as Cl } from "@storybook/global";
5175
- var { document: de } = Cl, vl = [
5149
+ import { global as Sl } from "@storybook/global";
5150
+ var { document: de } = Sl, Tl = [
5176
5151
  "application/javascript",
5177
5152
  "application/ecmascript",
5178
5153
  "application/x-ecmascript",
@@ -5191,105 +5166,104 @@ var { document: de } = Cl, vl = [
5191
5166
  "text/x-javascript",
5192
5167
  // Support modern javascript
5193
5168
  "module"
5194
- ], Pl = "script", $n = "scripts-root";
5195
- function br() {
5169
+ ], xl = "script", Ln = "scripts-root";
5170
+ function gr() {
5196
5171
  let r = de.createEvent("Event");
5197
5172
  r.initEvent("DOMContentLoaded", !0, !0), de.dispatchEvent(r);
5198
5173
  }
5199
- n(br, "simulateDOMContentLoaded");
5200
- function Fl(r, e, t) {
5174
+ n(gr, "simulateDOMContentLoaded");
5175
+ function Rl(r, e, t) {
5201
5176
  let o = de.createElement("script");
5202
5177
  o.type = r.type === "module" ? "module" : "text/javascript", r.src ? (o.onload = e, o.onerror = e, o.src = r.src) : o.textContent = r.innerText,
5203
5178
  t ? t.appendChild(o) : de.head.appendChild(o), r.parentNode.removeChild(r), r.src || e();
5204
5179
  }
5205
- n(Fl, "insertScript");
5206
- function Yn(r, e, t = 0) {
5180
+ n(Rl, "insertScript");
5181
+ function qn(r, e, t = 0) {
5207
5182
  r[t](() => {
5208
- t++, t === r.length ? e() : Yn(r, e, t);
5183
+ t++, t === r.length ? e() : qn(r, e, t);
5209
5184
  });
5210
5185
  }
5211
- n(Yn, "insertScriptsSequentially");
5212
- function Kn(r) {
5213
- let e = de.getElementById($n);
5214
- e ? e.innerHTML = "" : (e = de.createElement("div"), e.id = $n, de.body.appendChild(e));
5215
- let t = Array.from(r.querySelectorAll(Pl));
5186
+ n(qn, "insertScriptsSequentially");
5187
+ function zn(r) {
5188
+ let e = de.getElementById(Ln);
5189
+ e ? e.innerHTML = "" : (e = de.createElement("div"), e.id = Ln, de.body.appendChild(e));
5190
+ let t = Array.from(r.querySelectorAll(xl));
5216
5191
  if (t.length) {
5217
5192
  let o = [];
5218
5193
  t.forEach((s) => {
5219
5194
  let i = s.getAttribute("type");
5220
- (!i || vl.includes(i)) && o.push((a) => Fl(s, a, e));
5221
- }), o.length && Yn(o, br, void 0);
5195
+ (!i || Tl.includes(i)) && o.push((a) => Rl(s, a, e));
5196
+ }), o.length && qn(o, gr, void 0);
5222
5197
  } else
5223
- br();
5198
+ gr();
5224
5199
  }
5225
- n(Kn, "simulatePageLoad");
5200
+ n(zn, "simulatePageLoad");
5226
5201
 
5227
5202
  // src/docs-tools/shared.ts
5228
- var Xn = "storybook/docs", uy = `${Xn}/panel`;
5229
- var Jn = `${Xn}/snippet-rendered`;
5203
+ var Bn = "storybook/docs", $f = `${Bn}/panel`;
5204
+ var Gn = `${Bn}/snippet-rendered`;
5230
5205
 
5231
5206
  // src/preview-api/modules/preview-web/emitTransformCode.ts
5232
- async function Qn(r, e) {
5207
+ async function Un(r, e) {
5233
5208
  let t = e.parameters?.docs?.source?.transform, { id: o, unmappedArgs: s } = e, i = t && r ? t?.(r, e) : r, a = i ? await i : void 0;
5234
- _.getChannel().emit(Jn, {
5209
+ _.getChannel().emit(Gn, {
5235
5210
  id: o,
5236
5211
  source: a,
5237
5212
  args: s
5238
5213
  });
5239
5214
  }
5240
- n(Qn, "emitTransformCode");
5215
+ n(Un, "emitTransformCode");
5241
5216
  export {
5242
5217
  Q as DocsContext,
5243
5218
  te as HooksContext,
5244
5219
  Te as Preview,
5245
- gr as PreviewWeb,
5220
+ hr as PreviewWeb,
5246
5221
  xe as PreviewWithSelection,
5247
5222
  se as ReporterAPI,
5248
5223
  Se as StoryStore,
5249
5224
  Re as UrlStore,
5250
5225
  we as WebView,
5251
5226
  _ as addons,
5252
- Cr as applyHooks,
5253
- Oe as combineArgs,
5227
+ Er as applyHooks,
5228
+ Ie as combineArgs,
5254
5229
  N as combineParameters,
5255
5230
  K as composeConfigs,
5256
- $r as composeStepRunners,
5257
- ai as composeStories,
5258
- Oo as composeStory,
5259
- li as createPlaywrightTest,
5260
- Eo as decorateStory,
5261
- Ur as defaultDecorateStory,
5262
- as as definePreview,
5263
- Qn as emitTransformCode,
5264
- Ze as filterArgTypes,
5265
- Ie as getCoreAnnotations,
5266
- Kr as getCsfFactoryAnnotations,
5267
- je as inferControls,
5268
- As as makeDecorator,
5269
- Tr as mockChannel,
5231
+ Wr as composeStepRunners,
5232
+ Qs as composeStories,
5233
+ Ro as composeStory,
5234
+ Zs as createPlaywrightTest,
5235
+ ho as decorateStory,
5236
+ Gr as defaultDecorateStory,
5237
+ Un as emitTransformCode,
5238
+ Qe as filterArgTypes,
5239
+ Yr as getCsfFactoryAnnotations,
5240
+ ke as inferControls,
5241
+ ys as makeDecorator,
5242
+ Sr as mockChannel,
5243
+ C as normalizeArrays,
5270
5244
  he as normalizeProjectAnnotations,
5271
5245
  me as normalizeStory,
5272
5246
  ge as pauseAnimations,
5273
- Hr as prepareMeta,
5274
- ke as prepareStory,
5275
- Co as sanitizeStoryContextUpdate,
5276
- ri as setDefaultProjectAnnotations,
5277
- si as setProjectAnnotations,
5278
- br as simulateDOMContentLoaded,
5279
- Kn as simulatePageLoad,
5280
- gi as sortStoriesV7,
5281
- Rs as useArgs,
5247
+ Ur as prepareMeta,
5248
+ De as prepareStory,
5249
+ go as sanitizeStoryContextUpdate,
5250
+ Ws as setDefaultProjectAnnotations,
5251
+ Xs as setProjectAnnotations,
5252
+ gr as simulateDOMContentLoaded,
5253
+ zn as simulatePageLoad,
5254
+ ci as sortStoriesV7,
5255
+ us as useArgs,
5282
5256
  ve as useCallback,
5283
- Ts as useChannel,
5284
- Dt as useEffect,
5285
- ws as useGlobals,
5286
- ms as useMemo,
5287
- xs as useParameter,
5288
- Ss as useReducer,
5289
- hs as useRef,
5290
- bs as useState,
5291
- Ve as useStoryContext,
5292
- mi as userOrAutoTitle,
5293
- jo as userOrAutoTitleFromSpecifier,
5257
+ ds as useChannel,
5258
+ Ot as useEffect,
5259
+ fs as useGlobals,
5260
+ ss as useMemo,
5261
+ ps as useParameter,
5262
+ cs as useReducer,
5263
+ is as useRef,
5264
+ ls as useState,
5265
+ He as useStoryContext,
5266
+ ai as userOrAutoTitle,
5267
+ Eo as userOrAutoTitleFromSpecifier,
5294
5268
  be as waitForAnimations
5295
5269
  };