twd-js 1.6.4 → 1.6.6

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.
@@ -1,19 +1,19 @@
1
- var re, y, He, rt, M, we, Be, De, Pe, pe, de, ce, nt, Q = {}, Z = [], ot = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ne = Array.isArray;
2
- function A(e, t) {
1
+ var re, w, Be, nt, M, be, De, Pe, ae, J, P, Fe, fe, ce, ue, st, Y = {}, Z = [], ot = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ne = Array.isArray;
2
+ function I(e, t) {
3
3
  for (var r in t) e[r] = t[r];
4
4
  return e;
5
5
  }
6
- function fe(e) {
6
+ function he(e) {
7
7
  e && e.parentNode && e.parentNode.removeChild(e);
8
8
  }
9
- function st(e, t, r) {
10
- var n, o, s, l = {};
11
- for (s in t) s == "key" ? n = t[s] : s == "ref" ? o = t[s] : l[s] = t[s];
12
- if (arguments.length > 2 && (l.children = arguments.length > 3 ? re.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (s in e.defaultProps) l[s] === void 0 && (l[s] = e.defaultProps[s]);
13
- return G(e, l, n, o, null);
9
+ function it(e, t, r) {
10
+ var n, s, o, l = {};
11
+ for (o in t) o == "key" ? n = t[o] : o == "ref" ? s = t[o] : l[o] = t[o];
12
+ if (arguments.length > 2 && (l.children = arguments.length > 3 ? re.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) l[o] === void 0 && (l[o] = e.defaultProps[o]);
13
+ return K(e, l, n, s, null);
14
14
  }
15
- function G(e, t, r, n, o) {
16
- var s = {
15
+ function K(e, t, r, n, s) {
16
+ var o = {
17
17
  type: e,
18
18
  props: t,
19
19
  key: r,
@@ -24,88 +24,88 @@ function G(e, t, r, n, o) {
24
24
  __e: null,
25
25
  __c: null,
26
26
  constructor: void 0,
27
- __v: o ?? ++He,
27
+ __v: s ?? ++Be,
28
28
  __i: -1,
29
29
  __u: 0
30
30
  };
31
- return o == null && y.vnode != null && y.vnode(s), s;
31
+ return s == null && w.vnode != null && w.vnode(o), o;
32
32
  }
33
- function V(e) {
33
+ function q(e) {
34
34
  return e.children;
35
35
  }
36
- function K(e, t) {
36
+ function X(e, t) {
37
37
  this.props = e, this.context = t;
38
38
  }
39
- function H(e, t) {
40
- if (t == null) return e.__ ? H(e.__, e.__i + 1) : null;
39
+ function W(e, t) {
40
+ if (t == null) return e.__ ? W(e.__, e.__i + 1) : null;
41
41
  for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
42
- return typeof e.type == "function" ? H(e) : null;
42
+ return typeof e.type == "function" ? W(e) : null;
43
43
  }
44
- function it(e) {
44
+ function at(e) {
45
45
  if (e.__P && e.__d) {
46
- var t = e.__v, r = t.__e, n = [], o = [], s = A({}, t);
47
- s.__v = t.__v + 1, y.vnode && y.vnode(s), he(e.__P, s, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [r] : null, n, r ?? H(t), !!(32 & t.__u), o), s.__v = t.__v, s.__.__k[s.__i] = s, Ue(n, s, o), t.__e = t.__ = null, s.__e != r && Fe(s);
46
+ var t = e.__v, r = t.__e, n = [], s = [], o = I({}, t);
47
+ o.__v = t.__v + 1, w.vnode && w.vnode(o), ge(e.__P, o, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [r] : null, n, r ?? W(t), !!(32 & t.__u), s), o.__v = t.__v, o.__.__k[o.__i] = o, qe(n, o, s), t.__e = t.__ = null, o.__e != r && Oe(o);
48
48
  }
49
49
  }
50
- function Fe(e) {
50
+ function Oe(e) {
51
51
  if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
52
52
  if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
53
- }), Fe(e);
53
+ }), Oe(e);
54
54
  }
55
- function be(e) {
56
- (!e.__d && (e.__d = !0) && M.push(e) && !ee.__r++ || we != y.debounceRendering) && ((we = y.debounceRendering) || Be)(ee);
55
+ function ke(e) {
56
+ (!e.__d && (e.__d = !0) && M.push(e) && !ee.__r++ || be != w.debounceRendering) && ((be = w.debounceRendering) || De)(ee);
57
57
  }
58
58
  function ee() {
59
59
  try {
60
- for (var e, t = 1; M.length; ) M.length > t && M.sort(De), e = M.shift(), t = M.length, it(e);
60
+ for (var e, t = 1; M.length; ) M.length > t && M.sort(Pe), e = M.shift(), t = M.length, at(e);
61
61
  } finally {
62
62
  M.length = ee.__r = 0;
63
63
  }
64
64
  }
65
- function Oe(e, t, r, n, o, s, l, d, u, a, p) {
66
- var i, f, _, w, C, k, v, g = n && n.__k || Z, $ = t.length;
67
- for (u = at(r, t, g, u, $), i = 0; i < $; i++) (_ = r.__k[i]) != null && (f = _.__i != -1 && g[_.__i] || Q, _.__i = i, k = he(e, _, f, o, s, l, d, u, a, p), w = _.__e, _.ref && f.ref != _.ref && (f.ref && ge(f.ref, null, _), p.push(_.ref, _.__c || w, _)), C == null && w != null && (C = w), (v = !!(4 & _.__u)) || f.__k === _.__k ? u = je(_, u, e, v) : typeof _.type == "function" && k !== void 0 ? u = k : w && (u = w.nextSibling), _.__u &= -7);
65
+ function je(e, t, r, n, s, o, l, c, u, a, _) {
66
+ var i, f, p, y, C, k, g, m = n && n.__k || Z, R = t.length;
67
+ for (u = lt(r, t, m, u, R), i = 0; i < R; i++) (p = r.__k[i]) != null && (f = p.__i != -1 && m[p.__i] || Y, p.__i = i, k = ge(e, p, f, s, o, l, c, u, a, _), y = p.__e, p.ref && f.ref != p.ref && (f.ref && me(f.ref, null, p), _.push(p.ref, p.__c || y, p)), C == null && y != null && (C = y), (g = !!(4 & p.__u)) || f.__k === p.__k ? (u = Ue(p, u, e, g), g && f.__e && (f.__e = null)) : typeof p.type == "function" && k !== void 0 ? u = k : y && (u = y.nextSibling), p.__u &= -7);
68
68
  return r.__e = C, u;
69
69
  }
70
- function at(e, t, r, n, o) {
71
- var s, l, d, u, a, p = r.length, i = p, f = 0;
72
- for (e.__k = new Array(o), s = 0; s < o; s++) (l = t[s]) != null && typeof l != "boolean" && typeof l != "function" ? (typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? l = e.__k[s] = G(null, l, null, null, null) : ne(l) ? l = e.__k[s] = G(V, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[s] = G(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[s] = l, u = s + f, l.__ = e, l.__b = e.__b + 1, d = null, (a = l.__i = lt(l, r, u, i)) != -1 && (i--, (d = r[a]) && (d.__u |= 2)), d == null || d.__v == null ? (a == -1 && (o > p ? f-- : o < p && f++), typeof l.type != "function" && (l.__u |= 4)) : a != u && (a == u - 1 ? f-- : a == u + 1 ? f++ : (a > u ? f-- : f++, l.__u |= 4))) : e.__k[s] = null;
73
- if (i) for (s = 0; s < p; s++) (d = r[s]) != null && (2 & d.__u) == 0 && (d.__e == n && (n = H(d)), Ve(d, d));
70
+ function lt(e, t, r, n, s) {
71
+ var o, l, c, u, a, _ = r.length, i = _, f = 0;
72
+ for (e.__k = new Array(s), o = 0; o < s; o++) (l = t[o]) != null && typeof l != "boolean" && typeof l != "function" ? (typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? l = e.__k[o] = K(null, l, null, null, null) : ne(l) ? l = e.__k[o] = K(q, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[o] = K(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[o] = l, u = o + f, l.__ = e, l.__b = e.__b + 1, c = null, (a = l.__i = dt(l, r, u, i)) != -1 && (i--, (c = r[a]) && (c.__u |= 2)), c == null || c.__v == null ? (a == -1 && (s > _ ? f-- : s < _ && f++), typeof l.type != "function" && (l.__u |= 4)) : a != u && (a == u - 1 ? f-- : a == u + 1 ? f++ : (a > u ? f-- : f++, l.__u |= 4))) : e.__k[o] = null;
73
+ if (i) for (o = 0; o < _; o++) (c = r[o]) != null && (2 & c.__u) == 0 && (c.__e == n && (n = W(c)), Je(c, c));
74
74
  return n;
75
75
  }
76
- function je(e, t, r, n) {
77
- var o, s;
76
+ function Ue(e, t, r, n) {
77
+ var s, o;
78
78
  if (typeof e.type == "function") {
79
- for (o = e.__k, s = 0; o && s < o.length; s++) o[s] && (o[s].__ = e, t = je(o[s], t, r, n));
79
+ for (s = e.__k, o = 0; s && o < s.length; o++) s[o] && (s[o].__ = e, t = Ue(s[o], t, r, n));
80
80
  return t;
81
81
  }
82
- e.__e != t && (n && (t && e.type && !t.parentNode && (t = H(e)), r.insertBefore(e.__e, t || null)), t = e.__e);
82
+ e.__e != t && (n && (t && e.type && !t.parentNode && (t = W(e)), r.insertBefore(e.__e, t || null)), t = e.__e);
83
83
  do
84
84
  t = t && t.nextSibling;
85
85
  while (t != null && t.nodeType == 8);
86
86
  return t;
87
87
  }
88
- function lt(e, t, r, n) {
89
- var o, s, l, d = e.key, u = e.type, a = t[r], p = a != null && (2 & a.__u) == 0;
90
- if (a === null && d == null || p && d == a.key && u == a.type) return r;
91
- if (n > (p ? 1 : 0)) {
92
- for (o = r - 1, s = r + 1; o >= 0 || s < t.length; ) if ((a = t[l = o >= 0 ? o-- : s++]) != null && (2 & a.__u) == 0 && d == a.key && u == a.type) return l;
88
+ function dt(e, t, r, n) {
89
+ var s, o, l, c = e.key, u = e.type, a = t[r], _ = a != null && (2 & a.__u) == 0;
90
+ if (a === null && c == null || _ && c == a.key && u == a.type) return r;
91
+ if (n > (_ ? 1 : 0)) {
92
+ for (s = r - 1, o = r + 1; s >= 0 || o < t.length; ) if ((a = t[l = s >= 0 ? s-- : o++]) != null && (2 & a.__u) == 0 && c == a.key && u == a.type) return l;
93
93
  }
94
94
  return -1;
95
95
  }
96
- function ke(e, t, r) {
96
+ function xe(e, t, r) {
97
97
  t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || ot.test(t) ? r : r + "px";
98
98
  }
99
- function J(e, t, r, n, o) {
100
- var s, l;
99
+ function V(e, t, r, n, s) {
100
+ var o, l;
101
101
  e: if (t == "style") if (typeof r == "string") e.style.cssText = r;
102
102
  else {
103
- if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || ke(e.style, t, "");
104
- if (r) for (t in r) n && r[t] == n[t] || ke(e.style, t, r[t]);
103
+ if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || xe(e.style, t, "");
104
+ if (r) for (t in r) n && r[t] == n[t] || xe(e.style, t, r[t]);
105
105
  }
106
- else if (t[0] == "o" && t[1] == "n") s = t != (t = t.replace(Pe, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + s] = r, r ? n ? r.u = n.u : (r.u = pe, e.addEventListener(t, s ? ce : de, s)) : e.removeEventListener(t, s ? ce : de, s);
106
+ else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(Fe, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + o] = r, r ? n ? r[P] = n[P] : (r[P] = fe, e.addEventListener(t, o ? ue : ce, o)) : e.removeEventListener(t, o ? ue : ce, o);
107
107
  else {
108
- if (o == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
108
+ if (s == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
109
109
  else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
110
110
  e[t] = r ?? "";
111
111
  break e;
@@ -118,137 +118,137 @@ function Se(e) {
118
118
  return function(t) {
119
119
  if (this.l) {
120
120
  var r = this.l[t.type + e];
121
- if (t.t == null) t.t = pe++;
122
- else if (t.t < r.u) return;
123
- return r(y.event ? y.event(t) : t);
121
+ if (t[J] == null) t[J] = fe++;
122
+ else if (t[J] < r[P]) return;
123
+ return r(w.event ? w.event(t) : t);
124
124
  }
125
125
  };
126
126
  }
127
- function he(e, t, r, n, o, s, l, d, u, a) {
128
- var p, i, f, _, w, C, k, v, g, $, I, z, h, b, R, E = t.type;
127
+ function ge(e, t, r, n, s, o, l, c, u, a) {
128
+ var _, i, f, p, y, C, k, g, m, R, N, z, h, b, $, E = t.type;
129
129
  if (t.constructor !== void 0) return null;
130
- 128 & r.__u && (u = !!(32 & r.__u), s = [d = t.__e = r.__e]), (p = y.__b) && p(t);
130
+ 128 & r.__u && (u = !!(32 & r.__u), o = [c = t.__e = r.__e]), (_ = w.__b) && _(t);
131
131
  e: if (typeof E == "function") try {
132
- if (v = t.props, g = E.prototype && E.prototype.render, $ = (p = E.contextType) && n[p.__c], I = p ? $ ? $.props.value : p.__ : n, r.__c ? k = (i = t.__c = r.__c).__ = i.__E : (g ? t.__c = i = new E(v, I) : (t.__c = i = new K(v, I), i.constructor = E, i.render = ct), $ && $.sub(i), i.state || (i.state = {}), i.__n = n, f = i.__d = !0, i.__h = [], i._sb = []), g && i.__s == null && (i.__s = i.state), g && E.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = A({}, i.__s)), A(i.__s, E.getDerivedStateFromProps(v, i.__s))), _ = i.props, w = i.state, i.__v = t, f) g && E.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), g && i.componentDidMount != null && i.__h.push(i.componentDidMount);
132
+ if (g = t.props, m = E.prototype && E.prototype.render, R = (_ = E.contextType) && n[_.__c], N = _ ? R ? R.props.value : _.__ : n, r.__c ? k = (i = t.__c = r.__c).__ = i.__E : (m ? t.__c = i = new E(g, N) : (t.__c = i = new X(g, N), i.constructor = E, i.render = ut), R && R.sub(i), i.state || (i.state = {}), i.__n = n, f = i.__d = !0, i.__h = [], i._sb = []), m && i.__s == null && (i.__s = i.state), m && E.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = I({}, i.__s)), I(i.__s, E.getDerivedStateFromProps(g, i.__s))), p = i.props, y = i.state, i.__v = t, f) m && E.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), m && i.componentDidMount != null && i.__h.push(i.componentDidMount);
133
133
  else {
134
- if (g && E.getDerivedStateFromProps == null && v !== _ && i.componentWillReceiveProps != null && i.componentWillReceiveProps(v, I), t.__v == r.__v || !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(v, i.__s, I) === !1) {
135
- t.__v != r.__v && (i.props = v, i.state = i.__s, i.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(W) {
136
- W && (W.__ = t);
134
+ if (m && E.getDerivedStateFromProps == null && g !== p && i.componentWillReceiveProps != null && i.componentWillReceiveProps(g, N), t.__v == r.__v || !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(g, i.__s, N) === !1) {
135
+ t.__v != r.__v && (i.props = g, i.state = i.__s, i.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(L) {
136
+ L && (L.__ = t);
137
137
  }), Z.push.apply(i.__h, i._sb), i._sb = [], i.__h.length && l.push(i);
138
138
  break e;
139
139
  }
140
- i.componentWillUpdate != null && i.componentWillUpdate(v, i.__s, I), g && i.componentDidUpdate != null && i.__h.push(function() {
141
- i.componentDidUpdate(_, w, C);
140
+ i.componentWillUpdate != null && i.componentWillUpdate(g, i.__s, N), m && i.componentDidUpdate != null && i.__h.push(function() {
141
+ i.componentDidUpdate(p, y, C);
142
142
  });
143
143
  }
144
- if (i.context = I, i.props = v, i.__P = e, i.__e = !1, z = y.__r, h = 0, g) i.state = i.__s, i.__d = !1, z && z(t), p = i.render(i.props, i.state, i.context), Z.push.apply(i.__h, i._sb), i._sb = [];
144
+ if (i.context = N, i.props = g, i.__P = e, i.__e = !1, z = w.__r, h = 0, m) i.state = i.__s, i.__d = !1, z && z(t), _ = i.render(i.props, i.state, i.context), Z.push.apply(i.__h, i._sb), i._sb = [];
145
145
  else do
146
- i.__d = !1, z && z(t), p = i.render(i.props, i.state, i.context), i.state = i.__s;
146
+ i.__d = !1, z && z(t), _ = i.render(i.props, i.state, i.context), i.state = i.__s;
147
147
  while (i.__d && ++h < 25);
148
- i.state = i.__s, i.getChildContext != null && (n = A(A({}, n), i.getChildContext())), g && !f && i.getSnapshotBeforeUpdate != null && (C = i.getSnapshotBeforeUpdate(_, w)), b = p != null && p.type === V && p.key == null ? qe(p.props.children) : p, d = Oe(e, ne(b) ? b : [b], t, r, n, o, s, l, d, u, a), i.base = t.__e, t.__u &= -161, i.__h.length && l.push(i), k && (i.__E = i.__ = null);
149
- } catch (W) {
150
- if (t.__v = null, u || s != null) if (W.then) {
151
- for (t.__u |= u ? 160 : 128; d && d.nodeType == 8 && d.nextSibling; ) d = d.nextSibling;
152
- s[s.indexOf(d)] = null, t.__e = d;
148
+ i.state = i.__s, i.getChildContext != null && (n = I(I({}, n), i.getChildContext())), m && !f && i.getSnapshotBeforeUpdate != null && (C = i.getSnapshotBeforeUpdate(p, y)), b = _ != null && _.type === q && _.key == null ? Ve(_.props.children) : _, c = je(e, ne(b) ? b : [b], t, r, n, s, o, l, c, u, a), i.base = t.__e, t.__u &= -161, i.__h.length && l.push(i), k && (i.__E = i.__ = null);
149
+ } catch (L) {
150
+ if (t.__v = null, u || o != null) if (L.then) {
151
+ for (t.__u |= u ? 160 : 128; c && c.nodeType == 8 && c.nextSibling; ) c = c.nextSibling;
152
+ o[o.indexOf(c)] = null, t.__e = c;
153
153
  } else {
154
- for (R = s.length; R--; ) fe(s[R]);
155
- ue(t);
154
+ for ($ = o.length; $--; ) he(o[$]);
155
+ _e(t);
156
156
  }
157
- else t.__e = r.__e, t.__k = r.__k, W.then || ue(t);
158
- y.__e(W, t, r);
157
+ else t.__e = r.__e, t.__k = r.__k, L.then || _e(t);
158
+ w.__e(L, t, r);
159
159
  }
160
- else s == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : d = t.__e = dt(r.__e, t, r, n, o, s, l, u, a);
161
- return (p = y.diffed) && p(t), 128 & t.__u ? void 0 : d;
160
+ else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : c = t.__e = ct(r.__e, t, r, n, s, o, l, u, a);
161
+ return (_ = w.diffed) && _(t), 128 & t.__u ? void 0 : c;
162
162
  }
163
- function ue(e) {
164
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ue));
163
+ function _e(e) {
164
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(_e));
165
165
  }
166
- function Ue(e, t, r) {
167
- for (var n = 0; n < r.length; n++) ge(r[n], r[++n], r[++n]);
168
- y.__c && y.__c(t, e), e.some(function(o) {
166
+ function qe(e, t, r) {
167
+ for (var n = 0; n < r.length; n++) me(r[n], r[++n], r[++n]);
168
+ w.__c && w.__c(t, e), e.some(function(s) {
169
169
  try {
170
- e = o.__h, o.__h = [], e.some(function(s) {
171
- s.call(o);
170
+ e = s.__h, s.__h = [], e.some(function(o) {
171
+ o.call(s);
172
172
  });
173
- } catch (s) {
174
- y.__e(s, o.__v);
173
+ } catch (o) {
174
+ w.__e(o, s.__v);
175
175
  }
176
176
  });
177
177
  }
178
- function qe(e) {
179
- return typeof e != "object" || e == null || e.__b > 0 ? e : ne(e) ? e.map(qe) : A({}, e);
178
+ function Ve(e) {
179
+ return typeof e != "object" || e == null || e.__b > 0 ? e : ne(e) ? e.map(Ve) : I({}, e);
180
180
  }
181
- function dt(e, t, r, n, o, s, l, d, u) {
182
- var a, p, i, f, _, w, C, k = r.props || Q, v = t.props, g = t.type;
183
- if (g == "svg" ? o = "http://www.w3.org/2000/svg" : g == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), s != null) {
184
- for (a = 0; a < s.length; a++) if ((_ = s[a]) && "setAttribute" in _ == !!g && (g ? _.localName == g : _.nodeType == 3)) {
185
- e = _, s[a] = null;
181
+ function ct(e, t, r, n, s, o, l, c, u) {
182
+ var a, _, i, f, p, y, C, k = r.props || Y, g = t.props, m = t.type;
183
+ if (m == "svg" ? s = "http://www.w3.org/2000/svg" : m == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), o != null) {
184
+ for (a = 0; a < o.length; a++) if ((p = o[a]) && "setAttribute" in p == !!m && (m ? p.localName == m : p.nodeType == 3)) {
185
+ e = p, o[a] = null;
186
186
  break;
187
187
  }
188
188
  }
189
189
  if (e == null) {
190
- if (g == null) return document.createTextNode(v);
191
- e = document.createElementNS(o, g, v.is && v), d && (y.__m && y.__m(t, s), d = !1), s = null;
190
+ if (m == null) return document.createTextNode(g);
191
+ e = document.createElementNS(s, m, g.is && g), c && (w.__m && w.__m(t, o), c = !1), o = null;
192
192
  }
193
- if (g == null) k === v || d && e.data == v || (e.data = v);
193
+ if (m == null) k === g || c && e.data == g || (e.data = g);
194
194
  else {
195
- if (s = s && re.call(e.childNodes), !d && s != null) for (k = {}, a = 0; a < e.attributes.length; a++) k[(_ = e.attributes[a]).name] = _.value;
196
- for (a in k) _ = k[a], a == "dangerouslySetInnerHTML" ? i = _ : a == "children" || a in v || a == "value" && "defaultValue" in v || a == "checked" && "defaultChecked" in v || J(e, a, null, _, o);
197
- for (a in v) _ = v[a], a == "children" ? f = _ : a == "dangerouslySetInnerHTML" ? p = _ : a == "value" ? w = _ : a == "checked" ? C = _ : d && typeof _ != "function" || k[a] === _ || J(e, a, _, k[a], o);
198
- if (p) d || i && (p.__html == i.__html || p.__html == e.innerHTML) || (e.innerHTML = p.__html), t.__k = [];
199
- else if (i && (e.innerHTML = ""), Oe(t.type == "template" ? e.content : e, ne(f) ? f : [f], t, r, n, g == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, l, s ? s[0] : r.__k && H(r, 0), d, u), s != null) for (a = s.length; a--; ) fe(s[a]);
200
- d || (a = "value", g == "progress" && w == null ? e.removeAttribute("value") : w != null && (w !== e[a] || g == "progress" && !w || g == "option" && w != k[a]) && J(e, a, w, k[a], o), a = "checked", C != null && C != e[a] && J(e, a, C, k[a], o));
195
+ if (o = o && re.call(e.childNodes), !c && o != null) for (k = {}, a = 0; a < e.attributes.length; a++) k[(p = e.attributes[a]).name] = p.value;
196
+ for (a in k) p = k[a], a == "dangerouslySetInnerHTML" ? i = p : a == "children" || a in g || a == "value" && "defaultValue" in g || a == "checked" && "defaultChecked" in g || V(e, a, null, p, s);
197
+ for (a in g) p = g[a], a == "children" ? f = p : a == "dangerouslySetInnerHTML" ? _ = p : a == "value" ? y = p : a == "checked" ? C = p : c && typeof p != "function" || k[a] === p || V(e, a, p, k[a], s);
198
+ if (_) c || i && (_.__html == i.__html || _.__html == e.innerHTML) || (e.innerHTML = _.__html), t.__k = [];
199
+ else if (i && (e.innerHTML = ""), je(t.type == "template" ? e.content : e, ne(f) ? f : [f], t, r, n, m == "foreignObject" ? "http://www.w3.org/1999/xhtml" : s, o, l, o ? o[0] : r.__k && W(r, 0), c, u), o != null) for (a = o.length; a--; ) he(o[a]);
200
+ c || (a = "value", m == "progress" && y == null ? e.removeAttribute("value") : y != null && (y !== e[a] || m == "progress" && !y || m == "option" && y != k[a]) && V(e, a, y, k[a], s), a = "checked", C != null && C != e[a] && V(e, a, C, k[a], s));
201
201
  }
202
202
  return e;
203
203
  }
204
- function ge(e, t, r) {
204
+ function me(e, t, r) {
205
205
  try {
206
206
  if (typeof e == "function") {
207
207
  var n = typeof e.__u == "function";
208
208
  n && e.__u(), n && t == null || (e.__u = e(t));
209
209
  } else e.current = t;
210
- } catch (o) {
211
- y.__e(o, r);
210
+ } catch (s) {
211
+ w.__e(s, r);
212
212
  }
213
213
  }
214
- function Ve(e, t, r) {
215
- var n, o;
216
- if (y.unmount && y.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || ge(n, null, t)), (n = e.__c) != null) {
214
+ function Je(e, t, r) {
215
+ var n, s;
216
+ if (w.unmount && w.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || me(n, null, t)), (n = e.__c) != null) {
217
217
  if (n.componentWillUnmount) try {
218
218
  n.componentWillUnmount();
219
- } catch (s) {
220
- y.__e(s, t);
219
+ } catch (o) {
220
+ w.__e(o, t);
221
221
  }
222
222
  n.base = n.__P = null;
223
223
  }
224
- if (n = e.__k) for (o = 0; o < n.length; o++) n[o] && Ve(n[o], t, r || typeof e.type != "function");
225
- r || fe(e.__e), e.__c = e.__ = e.__e = void 0;
224
+ if (n = e.__k) for (s = 0; s < n.length; s++) n[s] && Je(n[s], t, r || typeof e.type != "function");
225
+ r || he(e.__e), e.__c = e.__ = e.__e = void 0;
226
226
  }
227
- function ct(e, t, r) {
227
+ function ut(e, t, r) {
228
228
  return this.constructor(e, r);
229
229
  }
230
- function ut(e, t, r) {
231
- var n, o, s, l;
232
- t == document && (t = document.documentElement), y.__ && y.__(e, t), o = (n = typeof r == "function") ? null : r && r.__k || t.__k, s = [], l = [], he(t, e = (!n && r || t).__k = st(V, null, [e]), o || Q, Q, t.namespaceURI, !n && r ? [r] : o ? null : t.firstChild ? re.call(t.childNodes) : null, s, !n && r ? r : o ? o.__e : t.firstChild, n, l), Ue(s, e, l);
233
- }
234
- re = Z.slice, y = { __e: function(e, t, r, n) {
235
- for (var o, s, l; t = t.__; ) if ((o = t.__c) && !o.__) try {
236
- if ((s = o.constructor) && s.getDerivedStateFromError != null && (o.setState(s.getDerivedStateFromError(e)), l = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, n || {}), l = o.__d), l) return o.__E = o;
237
- } catch (d) {
238
- e = d;
230
+ function _t(e, t, r) {
231
+ var n, s, o, l;
232
+ t == document && (t = document.documentElement), w.__ && w.__(e, t), s = (n = typeof r == "function") ? null : r && r.__k || t.__k, o = [], l = [], ge(t, e = (!n && r || t).__k = it(q, null, [e]), s || Y, Y, t.namespaceURI, !n && r ? [r] : s ? null : t.firstChild ? re.call(t.childNodes) : null, o, !n && r ? r : s ? s.__e : t.firstChild, n, l), qe(o, e, l);
233
+ }
234
+ re = Z.slice, w = { __e: function(e, t, r, n) {
235
+ for (var s, o, l; t = t.__; ) if ((s = t.__c) && !s.__) try {
236
+ if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(e)), l = s.__d), s.componentDidCatch != null && (s.componentDidCatch(e, n || {}), l = s.__d), l) return s.__E = s;
237
+ } catch (c) {
238
+ e = c;
239
239
  }
240
240
  throw e;
241
- } }, He = 0, rt = function(e) {
241
+ } }, Be = 0, nt = function(e) {
242
242
  return e != null && e.constructor === void 0;
243
- }, K.prototype.setState = function(e, t) {
244
- var r = this.__s != null && this.__s != this.state ? this.__s : this.__s = A({}, this.state);
245
- typeof e == "function" && (e = e(A({}, r), this.props)), e && A(r, e), e != null && this.__v && (t && this._sb.push(t), be(this));
246
- }, K.prototype.forceUpdate = function(e) {
247
- this.__v && (this.__e = !0, e && this.__h.push(e), be(this));
248
- }, K.prototype.render = V, M = [], Be = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, De = function(e, t) {
243
+ }, X.prototype.setState = function(e, t) {
244
+ var r = this.__s != null && this.__s != this.state ? this.__s : this.__s = I({}, this.state);
245
+ typeof e == "function" && (e = e(I({}, r), this.props)), e && I(r, e), e != null && this.__v && (t && this._sb.push(t), ke(this));
246
+ }, X.prototype.forceUpdate = function(e) {
247
+ this.__v && (this.__e = !0, e && this.__h.push(e), ke(this));
248
+ }, X.prototype.render = q, M = [], De = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Pe = function(e, t) {
249
249
  return e.__v.__b - t.__v.__b;
250
- }, ee.__r = 0, Pe = /(PointerCapture)$|Capture$/i, pe = 0, de = Se(!1), ce = Se(!0), nt = 0;
251
- var _t = {
250
+ }, ee.__r = 0, ae = Math.random().toString(8), J = "__d" + ae, P = "__a" + ae, Fe = /(PointerCapture)$|Capture$/i, fe = 0, ce = Se(!1), ue = Se(!0), st = 0;
251
+ var pt = {
252
252
  primary: "#2563eb",
253
253
  background: "#1e293b",
254
254
  backgroundSecondary: "#182130",
@@ -296,158 +296,392 @@ var _t = {
296
296
  iconColor: "#f1f5f9",
297
297
  iconColorSecondary: "#cbd5e1"
298
298
  };
299
- function pt(e = {}) {
299
+ function ft(e = {}) {
300
300
  return Object.entries({
301
- ..._t,
301
+ ...pt,
302
302
  ...e
303
303
  }).map(([t, r]) => `${`--twd-${t.replace(/([A-Z])/g, "-$1").toLowerCase()}`}: ${r};`).join(`
304
304
  `);
305
305
  }
306
- function ft(e) {
306
+ function ht(e) {
307
307
  const t = "twd-theme-variables";
308
308
  let r = document.getElementById(t);
309
309
  r || (r = document.createElement("style"), r.id = t, document.head.appendChild(r));
310
- const n = pt(e);
310
+ const n = ft(e);
311
311
  r.textContent = `
312
312
  :root {
313
313
  ${n}
314
314
  }
315
315
  `;
316
316
  }
317
- var ht = (e) => {
317
+ var gt = `
318
+ /* ========================
319
+ Animation keyframes
320
+ ======================== */
321
+ @keyframes twd-spin {
322
+ 0% { transform: rotate(0deg); }
323
+ 100% { transform: rotate(360deg); }
324
+ }
325
+
326
+ /* ========================
327
+ Buttons — shared base
328
+ ======================== */
329
+ .twd-btn {
330
+ cursor: pointer;
331
+ border-radius: var(--twd-border-radius);
332
+ transition: all var(--twd-animation-duration) ease;
333
+ }
334
+ .twd-btn:hover { filter: brightness(1.15); }
335
+ .twd-btn:active { filter: brightness(0.9); }
336
+ .twd-btn:focus-visible {
337
+ outline: 2px solid var(--twd-primary);
338
+ outline-offset: 2px;
339
+ }
340
+ .twd-btn:disabled {
341
+ opacity: 0.5;
342
+ cursor: not-allowed;
343
+ }
344
+ .twd-btn:disabled:hover { filter: none; }
345
+
346
+ /* ========================
347
+ Button variants
348
+ ======================== */
349
+ .twd-btn-primary {
350
+ background: var(--twd-button-primary);
351
+ color: var(--twd-button-primary-text);
352
+ padding: var(--twd-spacing-xs) var(--twd-spacing-md);
353
+ border: none;
354
+ }
355
+ .twd-btn-secondary {
356
+ background: var(--twd-button-secondary);
357
+ color: var(--twd-button-secondary-text);
358
+ padding: var(--twd-spacing-xs) var(--twd-spacing-md);
359
+ border: 1px solid var(--twd-button-border);
360
+ }
361
+ .twd-btn-icon {
362
+ background: transparent;
363
+ border: 1px solid var(--twd-border-light);
364
+ padding: 0;
365
+ width: 24px;
366
+ height: 24px;
367
+ display: flex;
368
+ align-items: center;
369
+ justify-content: center;
370
+ vertical-align: middle;
371
+ font-size: var(--twd-font-size-sm);
372
+ }
373
+ .twd-btn-mock-rules {
374
+ background: var(--twd-button-secondary);
375
+ border: 1px solid var(--twd-button-border);
376
+ border-radius: var(--twd-border-radius-lg);
377
+ padding: var(--twd-spacing-md) var(--twd-spacing-lg);
378
+ font-size: var(--twd-font-size-sm);
379
+ color: var(--twd-button-secondary-text);
380
+ display: flex;
381
+ align-items: center;
382
+ gap: var(--twd-spacing-md);
383
+ margin-bottom: 10px;
384
+ width: 100%;
385
+ text-align: left;
386
+ transition: all var(--twd-animation-duration) ease;
387
+ box-shadow: var(--twd-shadow-sm);
388
+ }
389
+
390
+ /* ========================
391
+ Sidebar layout
392
+ ======================== */
393
+ .twd-sidebar {
394
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
395
+ position: fixed;
396
+ top: 0;
397
+ bottom: 0;
398
+ width: var(--twd-sidebar-width);
399
+ background: var(--twd-background);
400
+ font-size: var(--twd-font-size-md);
401
+ overflow-y: auto;
402
+ box-shadow: var(--twd-shadow);
403
+ text-align: left;
404
+ z-index: var(--twd-z-index-sidebar);
405
+ pointer-events: all;
406
+ isolation: isolate;
407
+ }
408
+ .twd-sidebar-header {
409
+ padding: var(--twd-spacing-md);
410
+ background: var(--twd-background);
411
+ position: sticky;
412
+ top: 0;
413
+ z-index: var(--twd-z-index-sticky);
414
+ border-bottom: 1px solid var(--twd-border);
415
+ }
416
+ .twd-sidebar-header-row {
417
+ display: flex;
418
+ justify-content: space-between;
419
+ align-items: center;
420
+ margin-bottom: var(--twd-spacing-xl);
421
+ }
422
+ .twd-sidebar-header-buttons {
423
+ display: flex;
424
+ gap: var(--twd-spacing-xs);
425
+ }
426
+ .twd-sidebar-stats {
427
+ display: flex;
428
+ justify-content: space-between;
429
+ align-items: center;
430
+ font-size: var(--twd-font-size-md);
431
+ color: var(--twd-text-secondary);
432
+ margin-bottom: 10px;
433
+ }
434
+ .twd-sidebar-stats-counts {
435
+ display: flex;
436
+ gap: var(--twd-spacing-xs);
437
+ }
438
+ .twd-sidebar-content {
439
+ padding: var(--twd-spacing-md);
440
+ }
441
+ .twd-sidebar-closed {
442
+ position: fixed;
443
+ top: 50%;
444
+ transform: translateY(-50%);
445
+ z-index: var(--twd-z-index-sidebar);
446
+ background: var(--twd-button-primary);
447
+ color: var(--twd-button-primary-text);
448
+ padding: var(--twd-spacing-sm) 10px;
449
+ font-size: var(--twd-font-size-sm);
450
+ }
451
+ .twd-sidebar-version {
452
+ color: var(--twd-text-secondary);
453
+ font-size: var(--twd-font-size-sm);
454
+ align-self: center;
455
+ }
456
+
457
+ /* ========================
458
+ Test list
459
+ ======================== */
460
+ .twd-test-list {
461
+ list-style: none;
462
+ padding: 0;
463
+ margin: 0;
464
+ }
465
+ .twd-test-group {
466
+ background: var(--twd-describe-bg);
467
+ border-left: 3px solid var(--twd-describe-border);
468
+ border-radius: var(--twd-border-radius);
469
+ padding: var(--twd-spacing-xs) var(--twd-spacing-sm);
470
+ margin-bottom: var(--twd-spacing-sm);
471
+ }
472
+ .twd-test-group-toggle {
473
+ font-weight: var(--twd-font-weight-medium);
474
+ font-size: var(--twd-font-size-sm);
475
+ cursor: pointer;
476
+ color: var(--twd-describe-text);
477
+ display: flex;
478
+ align-items: center;
479
+ justify-content: space-between;
480
+ gap: var(--twd-spacing-sm);
481
+ text-transform: uppercase;
482
+ letter-spacing: 0.05em;
483
+ }
484
+ .twd-test-item {
485
+ display: flex;
486
+ align-items: left;
487
+ justify-content: space-between;
488
+ padding: var(--twd-spacing-sm) var(--twd-spacing-sm);
489
+ border-radius: var(--twd-border-radius);
490
+ }
491
+ .twd-test-item-name {
492
+ font-weight: var(--twd-font-weight-medium);
493
+ font-size: var(--twd-font-size-md);
494
+ color: var(--twd-text);
495
+ max-width: 220px;
496
+ }
497
+ .twd-test-item-logs {
498
+ border-radius: var(--twd-border-radius);
499
+ max-height: 260px;
500
+ overflow-y: auto;
501
+ padding: 0;
502
+ background: var(--twd-background-secondary);
503
+ list-style: none;
504
+ margin-top: var(--twd-spacing-xs);
505
+ text-align: left;
506
+ }
507
+
508
+ /* ========================
509
+ Status variants
510
+ ======================== */
511
+ .twd-status-pass { background: var(--twd-success-bg); }
512
+ .twd-status-fail { background: var(--twd-error-bg); }
513
+ .twd-status-skip { background: var(--twd-skip-bg); }
514
+ .twd-status-running { background: var(--twd-warning-bg); }
515
+
516
+ /* ========================
517
+ Search
518
+ ======================== */
519
+ .twd-search-wrapper {
520
+ position: relative;
521
+ margin-bottom: var(--twd-spacing-md);
522
+ }
523
+ .twd-search-input {
524
+ width: 100%;
525
+ padding: var(--twd-spacing-md);
526
+ background: var(--twd-background);
527
+ color: var(--twd-text);
528
+ border: 1px solid var(--twd-border);
529
+ border-radius: var(--twd-border-radius);
530
+ font-size: var(--twd-font-size-md);
531
+ box-sizing: border-box;
532
+ }
533
+ .twd-search-input:focus-visible {
534
+ outline: 2px solid var(--twd-primary);
535
+ outline-offset: 2px;
536
+ }
537
+
538
+ /* ========================
539
+ Loader
540
+ ======================== */
541
+ .twd-loader {
542
+ animation: twd-spin 1s linear infinite;
543
+ }
544
+ `;
545
+ function mt() {
546
+ const e = "twd-styles";
547
+ if (document.getElementById(e)) return;
548
+ const t = document.createElement("style");
549
+ t.id = e, t.textContent = gt, document.head.appendChild(t);
550
+ }
551
+ var vt = (e) => {
318
552
  const { Component: t, createRoot: r, theme: n } = e;
319
- ft(n);
320
- const o = document.createElement("div");
321
- o.setAttribute("id", "twd-sidebar-root"), document.body.appendChild(o), r(o).render(t);
322
- }, gt = async (e, t, r, n) => {
323
- for (const o in e) await e[o]();
324
- ht({
553
+ ht(n), mt();
554
+ const s = document.createElement("div");
555
+ s.setAttribute("id", "twd-sidebar-root"), document.body.appendChild(s), r(s).render(t);
556
+ }, wt = async (e, t, r, n) => {
557
+ for (const s in e) await e[s]();
558
+ vt({
325
559
  Component: t,
326
560
  createRoot: r,
327
561
  theme: n
328
562
  });
329
- }, j, S, ae, xe, te = 0, Je = [], x = y, Te = x.__b, Re = x.__r, Ce = x.diffed, $e = x.__c, Ee = x.unmount, Ie = x.__;
563
+ }, O, x, le, Te, te = 0, Ke = [], S = w, $e = S.__b, Ce = S.__r, Re = S.diffed, Ee = S.__c, Ne = S.unmount, Ie = S.__;
330
564
  function ve(e, t) {
331
- x.__h && x.__h(S, e, te || t), te = 0;
332
- var r = S.__H || (S.__H = {
565
+ S.__h && S.__h(x, e, te || t), te = 0;
566
+ var r = x.__H || (x.__H = {
333
567
  __: [],
334
568
  __h: []
335
569
  });
336
570
  return e >= r.__.length && r.__.push({}), r.__[e];
337
571
  }
338
- function P(e) {
339
- return te = 1, vt(Ge, e);
572
+ function B(e) {
573
+ return te = 1, yt(Ge, e);
340
574
  }
341
- function vt(e, t, r) {
342
- var n = ve(j++, 2);
343
- if (n.t = e, !n.__c && (n.__ = [r ? r(t) : Ge(void 0, t), function(d) {
344
- var u = n.__N ? n.__N[0] : n.__[0], a = n.t(u, d);
575
+ function yt(e, t, r) {
576
+ var n = ve(O++, 2);
577
+ if (n.t = e, !n.__c && (n.__ = [r ? r(t) : Ge(void 0, t), function(c) {
578
+ var u = n.__N ? n.__N[0] : n.__[0], a = n.t(u, c);
345
579
  u !== a && (n.__N = [a, n.__[1]], n.__c.setState({}));
346
- }], n.__c = S, !S.__f)) {
347
- var o = function(d, u, a) {
580
+ }], n.__c = x, !x.__f)) {
581
+ var s = function(c, u, a) {
348
582
  if (!n.__c.__H) return !0;
349
- var p = n.__c.__H.__.filter(function(f) {
583
+ var _ = n.__c.__H.__.filter(function(f) {
350
584
  return f.__c;
351
585
  });
352
- if (p.every(function(f) {
586
+ if (_.every(function(f) {
353
587
  return !f.__N;
354
- })) return !s || s.call(this, d, u, a);
355
- var i = n.__c.props !== d;
356
- return p.some(function(f) {
588
+ })) return !o || o.call(this, c, u, a);
589
+ var i = n.__c.props !== c;
590
+ return _.some(function(f) {
357
591
  if (f.__N) {
358
- var _ = f.__[0];
359
- f.__ = f.__N, f.__N = void 0, _ !== f.__[0] && (i = !0);
592
+ var p = f.__[0];
593
+ f.__ = f.__N, f.__N = void 0, p !== f.__[0] && (i = !0);
360
594
  }
361
- }), s && s.call(this, d, u, a) || i;
595
+ }), o && o.call(this, c, u, a) || i;
362
596
  };
363
- S.__f = !0;
364
- var s = S.shouldComponentUpdate, l = S.componentWillUpdate;
365
- S.componentWillUpdate = function(d, u, a) {
597
+ x.__f = !0;
598
+ var o = x.shouldComponentUpdate, l = x.componentWillUpdate;
599
+ x.componentWillUpdate = function(c, u, a) {
366
600
  if (this.__e) {
367
- var p = s;
368
- s = void 0, o(d, u, a), s = p;
601
+ var _ = o;
602
+ o = void 0, s(c, u, a), o = _;
369
603
  }
370
- l && l.call(this, d, u, a);
371
- }, S.shouldComponentUpdate = o;
604
+ l && l.call(this, c, u, a);
605
+ }, x.shouldComponentUpdate = s;
372
606
  }
373
607
  return n.__N || n.__;
374
608
  }
375
- function oe(e, t) {
376
- var r = ve(j++, 3);
377
- !x.__s && Xe(r.__H, t) && (r.__ = e, r.u = t, S.__H.__h.push(r));
609
+ function se(e, t) {
610
+ var r = ve(O++, 3);
611
+ !S.__s && Xe(r.__H, t) && (r.__ = e, r.u = t, x.__H.__h.push(r));
378
612
  }
379
- function O(e) {
380
- return te = 5, N(function() {
613
+ function F(e) {
614
+ return te = 5, G(function() {
381
615
  return { current: e };
382
616
  }, []);
383
617
  }
384
- function N(e, t) {
385
- var r = ve(j++, 7);
618
+ function G(e, t) {
619
+ var r = ve(O++, 7);
386
620
  return Xe(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
387
621
  }
388
- function mt() {
389
- for (var e; e = Je.shift(); ) {
622
+ function bt() {
623
+ for (var e; e = Ke.shift(); ) {
390
624
  var t = e.__H;
391
625
  if (e.__P && t) try {
392
- t.__h.some(Y), t.__h.some(_e), t.__h = [];
626
+ t.__h.some(Q), t.__h.some(pe), t.__h = [];
393
627
  } catch (r) {
394
- t.__h = [], x.__e(r, e.__v);
628
+ t.__h = [], S.__e(r, e.__v);
395
629
  }
396
630
  }
397
631
  }
398
- x.__b = function(e) {
399
- S = null, Te && Te(e);
400
- }, x.__ = function(e, t) {
632
+ S.__b = function(e) {
633
+ x = null, $e && $e(e);
634
+ }, S.__ = function(e, t) {
401
635
  e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ie && Ie(e, t);
402
- }, x.__r = function(e) {
403
- Re && Re(e), j = 0;
404
- var t = (S = e.__c).__H;
405
- t && (ae === S ? (t.__h = [], S.__h = [], t.__.some(function(r) {
636
+ }, S.__r = function(e) {
637
+ Ce && Ce(e), O = 0;
638
+ var t = (x = e.__c).__H;
639
+ t && (le === x ? (t.__h = [], x.__h = [], t.__.some(function(r) {
406
640
  r.__N && (r.__ = r.__N), r.u = r.__N = void 0;
407
- })) : (t.__h.some(Y), t.__h.some(_e), t.__h = [], j = 0)), ae = S;
408
- }, x.diffed = function(e) {
409
- Ce && Ce(e);
641
+ })) : (t.__h.some(Q), t.__h.some(pe), t.__h = [], O = 0)), le = x;
642
+ }, S.diffed = function(e) {
643
+ Re && Re(e);
410
644
  var t = e.__c;
411
- t && t.__H && (t.__H.__h.length && (Je.push(t) !== 1 && xe === x.requestAnimationFrame || ((xe = x.requestAnimationFrame) || yt)(mt)), t.__H.__.some(function(r) {
645
+ t && t.__H && (t.__H.__h.length && (Ke.push(t) !== 1 && Te === S.requestAnimationFrame || ((Te = S.requestAnimationFrame) || kt)(bt)), t.__H.__.some(function(r) {
412
646
  r.u && (r.__H = r.u), r.u = void 0;
413
- })), ae = S = null;
414
- }, x.__c = function(e, t) {
647
+ })), le = x = null;
648
+ }, S.__c = function(e, t) {
415
649
  t.some(function(r) {
416
650
  try {
417
- r.__h.some(Y), r.__h = r.__h.filter(function(n) {
418
- return !n.__ || _e(n);
651
+ r.__h.some(Q), r.__h = r.__h.filter(function(n) {
652
+ return !n.__ || pe(n);
419
653
  });
420
654
  } catch (n) {
421
- t.some(function(o) {
422
- o.__h && (o.__h = []);
423
- }), t = [], x.__e(n, r.__v);
655
+ t.some(function(s) {
656
+ s.__h && (s.__h = []);
657
+ }), t = [], S.__e(n, r.__v);
424
658
  }
425
- }), $e && $e(e, t);
426
- }, x.unmount = function(e) {
427
- Ee && Ee(e);
659
+ }), Ee && Ee(e, t);
660
+ }, S.unmount = function(e) {
661
+ Ne && Ne(e);
428
662
  var t, r = e.__c;
429
663
  r && r.__H && (r.__H.__.some(function(n) {
430
664
  try {
431
- Y(n);
432
- } catch (o) {
433
- t = o;
665
+ Q(n);
666
+ } catch (s) {
667
+ t = s;
434
668
  }
435
- }), r.__H = void 0, t && x.__e(t, r.__v));
669
+ }), r.__H = void 0, t && S.__e(t, r.__v));
436
670
  };
437
671
  var Ae = typeof requestAnimationFrame == "function";
438
- function yt(e) {
672
+ function kt(e) {
439
673
  var t, r = function() {
440
674
  clearTimeout(n), Ae && cancelAnimationFrame(t), setTimeout(e);
441
675
  }, n = setTimeout(r, 35);
442
676
  Ae && (t = requestAnimationFrame(r));
443
677
  }
444
- function Y(e) {
445
- var t = S, r = e.__c;
446
- typeof r == "function" && (e.__c = void 0, r()), S = t;
678
+ function Q(e) {
679
+ var t = x, r = e.__c;
680
+ typeof r == "function" && (e.__c = void 0, r()), x = t;
447
681
  }
448
- function _e(e) {
449
- var t = S;
450
- e.__c = e.__(), S = t;
682
+ function pe(e) {
683
+ var t = x;
684
+ e.__c = e.__(), x = t;
451
685
  }
452
686
  function Xe(e, t) {
453
687
  return !e || e.length !== t.length || t.some(function(r, n) {
@@ -457,11 +691,11 @@ function Xe(e, t) {
457
691
  function Ge(e, t) {
458
692
  return typeof t == "function" ? t(e) : t;
459
693
  }
460
- var wt = 0;
461
- function c(e, t, r, n, o, s) {
694
+ var xt = 0;
695
+ function d(e, t, r, n, s, o) {
462
696
  t || (t = {});
463
- var l, d, u = t;
464
- if ("ref" in u) for (d in u = {}, t) d == "ref" ? l = t[d] : u[d] = t[d];
697
+ var l, c, u = t;
698
+ if ("ref" in u) for (c in u = {}, t) c == "ref" ? l = t[c] : u[c] = t[c];
465
699
  var a = {
466
700
  type: e,
467
701
  props: u,
@@ -473,16 +707,16 @@ function c(e, t, r, n, o, s) {
473
707
  __e: null,
474
708
  __c: null,
475
709
  constructor: void 0,
476
- __v: --wt,
710
+ __v: --xt,
477
711
  __i: -1,
478
712
  __u: 0,
479
- __source: o,
480
- __self: s
713
+ __source: s,
714
+ __self: o
481
715
  };
482
- if (typeof e == "function" && (l = e.defaultProps)) for (d in l) u[d] === void 0 && (u[d] = l[d]);
483
- return y.vnode && y.vnode(a), a;
716
+ if (typeof e == "function" && (l = e.defaultProps)) for (c in l) u[c] === void 0 && (u[c] = l[c]);
717
+ return w.vnode && w.vnode(a), a;
484
718
  }
485
- var bt = { animation: "spin 1s linear infinite" }, kt = () => /* @__PURE__ */ c("svg", {
719
+ var St = () => /* @__PURE__ */ d("svg", {
486
720
  xmlns: "http://www.w3.org/2000/svg",
487
721
  width: "24",
488
722
  height: "24",
@@ -492,18 +726,10 @@ var bt = { animation: "spin 1s linear infinite" }, kt = () => /* @__PURE__ */ c(
492
726
  strokeWidth: "2",
493
727
  strokeLinecap: "round",
494
728
  strokeLinejoin: "round",
495
- className: "lucide lucide-loader-circle-icon lucide-loader-circle",
496
- style: bt,
729
+ className: "lucide lucide-loader-circle-icon lucide-loader-circle twd-loader",
497
730
  "data-testid": "loader-icon",
498
- children: /* @__PURE__ */ c("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
499
- }), X = document.createElement("style");
500
- X && !document.getElementById("loader-spin-keyframes") && (X.id = "loader-spin-keyframes", X.innerHTML = `
501
- @keyframes spin {
502
- 0% { transform: rotate(0deg); }
503
- 100% { transform: rotate(360deg); }
504
- }
505
- `, document.head.appendChild(X));
506
- var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("svg", {
731
+ children: /* @__PURE__ */ d("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
732
+ }), oe = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ d("svg", {
507
733
  xmlns: "http://www.w3.org/2000/svg",
508
734
  width: "16",
509
735
  height: "16",
@@ -516,33 +742,33 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
516
742
  className: `lucide ${e}`,
517
743
  "data-testid": r,
518
744
  children: t
519
- }), St = () => /* @__PURE__ */ c(se, {
745
+ }), Tt = () => /* @__PURE__ */ d(oe, {
520
746
  className: "lucide-play-icon lucide-play",
521
747
  dataTestId: "play-icon",
522
- children: /* @__PURE__ */ c("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" })
523
- }), Ke = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ c(V, { children: [
748
+ children: /* @__PURE__ */ d("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" })
749
+ }), Qe = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ d(q, { children: [
524
750
  t,
525
751
  " ",
526
- n && /* @__PURE__ */ c("span", {
752
+ n && /* @__PURE__ */ d("span", {
527
753
  style: { color: "var(--twd-primary)" },
528
754
  "data-testid": `only-indicator-${e}`,
529
755
  children: [" ", "(only)"]
530
756
  }),
531
- r && /* @__PURE__ */ c("span", {
757
+ r && /* @__PURE__ */ d("span", {
532
758
  style: { color: "var(--twd-text-secondary)" },
533
759
  "data-testid": `skip-indicator-${e}`,
534
760
  children: [" ", "(skipped)"]
535
761
  })
536
- ] }), L = /* @__PURE__ */ (function(e) {
762
+ ] }), A = /* @__PURE__ */ (function(e) {
537
763
  return e.CHAI_DIFF = "chai-diff", e.CHAI_MESSAGE = "chai-message", e.ERROR = "error", e;
538
- })({}), xt = (e) => {
764
+ })({}), $t = (e) => {
539
765
  try {
540
766
  const t = JSON.parse(e);
541
767
  if (t && typeof t == "object" && "type" in t) return t;
542
768
  } catch {
543
769
  }
544
770
  return null;
545
- }, Le = (e) => {
771
+ }, Me = (e) => {
546
772
  if (e === null) return "null";
547
773
  if (e === void 0) return "undefined";
548
774
  if (typeof e == "string") return e;
@@ -552,15 +778,15 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
552
778
  return String(e);
553
779
  }
554
780
  return String(e);
555
- }, Tt = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? {
781
+ }, Ct = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? {
556
782
  color: "var(--twd-success)",
557
783
  fontWeight: "var(--twd-font-weight-bold)"
558
784
  } : e.startsWith("Test failed") ? {
559
785
  color: "var(--twd-error)",
560
786
  fontWeight: "var(--twd-font-weight-bold)"
561
- } : {}, Rt = (e) => e.type === L.CHAI_MESSAGE || e.type === L.ERROR, Ct = (e, t) => t && Rt(t) ? t.message : e, $t = ({ log: e, index: t }) => {
562
- const r = xt(e);
563
- if (r?.type === L.CHAI_DIFF) return /* @__PURE__ */ c("li", {
787
+ } : {}, Rt = (e) => e.type === A.CHAI_MESSAGE || e.type === A.ERROR, Et = (e, t) => t && Rt(t) ? t.message : e, Nt = ({ log: e, index: t }) => {
788
+ const r = $t(e);
789
+ if (r?.type === A.CHAI_DIFF) return /* @__PURE__ */ d("li", {
564
790
  style: {
565
791
  fontSize: "var(--twd-font-size-sm)",
566
792
  padding: "var(--twd-spacing-sm)",
@@ -568,7 +794,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
568
794
  color: "var(--twd-text)"
569
795
  },
570
796
  children: [
571
- /* @__PURE__ */ c("div", {
797
+ /* @__PURE__ */ d("div", {
572
798
  style: {
573
799
  color: "var(--twd-error)",
574
800
  fontWeight: "var(--twd-font-weight-bold)",
@@ -576,20 +802,20 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
576
802
  },
577
803
  children: "❌ Assertion failed"
578
804
  }),
579
- /* @__PURE__ */ c("div", {
805
+ /* @__PURE__ */ d("div", {
580
806
  style: {
581
807
  marginTop: "var(--twd-spacing-xs)",
582
808
  paddingLeft: "var(--twd-spacing-sm)",
583
809
  borderLeft: "2px solid var(--twd-success)"
584
810
  },
585
- children: [/* @__PURE__ */ c("div", {
811
+ children: [/* @__PURE__ */ d("div", {
586
812
  style: {
587
813
  color: "var(--twd-success)",
588
814
  fontWeight: "var(--twd-font-weight-medium)",
589
815
  marginBottom: "var(--twd-spacing-xs)"
590
816
  },
591
817
  children: "Expected:"
592
- }), /* @__PURE__ */ c("pre", {
818
+ }), /* @__PURE__ */ d("pre", {
593
819
  style: {
594
820
  margin: 0,
595
821
  padding: "var(--twd-spacing-xs)",
@@ -600,23 +826,23 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
600
826
  whiteSpace: "pre-wrap",
601
827
  wordBreak: "break-word"
602
828
  },
603
- children: Le(r.expected)
829
+ children: Me(r.expected)
604
830
  })]
605
831
  }),
606
- /* @__PURE__ */ c("div", {
832
+ /* @__PURE__ */ d("div", {
607
833
  style: {
608
834
  marginTop: "var(--twd-spacing-xs)",
609
835
  paddingLeft: "var(--twd-spacing-sm)",
610
836
  borderLeft: "2px solid var(--twd-error)"
611
837
  },
612
- children: [/* @__PURE__ */ c("div", {
838
+ children: [/* @__PURE__ */ d("div", {
613
839
  style: {
614
840
  color: "var(--twd-error)",
615
841
  fontWeight: "var(--twd-font-weight-medium)",
616
842
  marginBottom: "var(--twd-spacing-xs)"
617
843
  },
618
844
  children: "Actual:"
619
- }), /* @__PURE__ */ c("pre", {
845
+ }), /* @__PURE__ */ d("pre", {
620
846
  style: {
621
847
  margin: 0,
622
848
  padding: "var(--twd-spacing-xs)",
@@ -627,97 +853,44 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
627
853
  whiteSpace: "pre-wrap",
628
854
  wordBreak: "break-word"
629
855
  },
630
- children: Le(r.actual)
856
+ children: Me(r.actual)
631
857
  })]
632
858
  })
633
859
  ]
634
860
  }, t);
635
- const n = Ct(e, r);
636
- return /* @__PURE__ */ c("li", {
861
+ const n = Et(e, r);
862
+ return /* @__PURE__ */ d("li", {
637
863
  style: {
638
864
  fontSize: "var(--twd-font-size-sm)",
639
865
  padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
640
866
  borderBottom: "1px solid var(--twd-border-light)",
641
867
  color: "var(--twd-text)",
642
- ...Tt(n)
868
+ ...Ct(n)
643
869
  },
644
870
  children: n
645
871
  }, t);
646
- }, D = {
647
- container: { marginBottom: "var(--twd-spacing-xs)" },
648
- item: {
649
- display: "flex",
650
- alignItems: "left",
651
- justifyContent: "space-between",
652
- padding: "var(--twd-spacing-sm) var(--twd-spacing-sm)",
653
- borderRadius: "var(--twd-border-radius)"
654
- },
655
- nameSpan: {
656
- fontWeight: "var(--twd-font-weight-medium)",
657
- fontSize: "var(--twd-font-size-md)",
658
- color: "var(--twd-text)",
659
- maxWidth: "220px"
660
- },
661
- button: {
662
- background: "transparent",
663
- border: "1px solid var(--twd-border-light)",
664
- borderRadius: "var(--twd-border-radius)",
665
- padding: "0",
666
- cursor: "pointer",
667
- verticalAlign: "middle",
668
- fontSize: "var(--twd-font-size-sm)",
669
- width: "24px",
670
- height: "24px",
671
- display: "flex",
672
- alignItems: "center",
673
- justifyContent: "center"
674
- },
675
- logsList: {
676
- borderRadius: "var(--twd-border-radius)",
677
- maxHeight: "260px",
678
- overflowY: "auto",
679
- padding: 0,
680
- background: "var(--twd-background-secondary)",
681
- listStyle: "none",
682
- marginTop: "var(--twd-spacing-xs)",
683
- textAlign: "left"
684
- }
685
- }, Et = (e) => {
686
- switch (e.status) {
872
+ }, It = (e) => {
873
+ switch (e) {
687
874
  case "pass":
688
- return {
689
- item: { background: "var(--twd-success-bg)" },
690
- container: { borderLeft: "3px solid var(--twd-success)" }
691
- };
875
+ return "twd-status-pass";
692
876
  case "fail":
693
- return {
694
- item: { background: "var(--twd-error-bg)" },
695
- container: { borderLeft: "3px solid var(--twd-error)" }
696
- };
877
+ return "twd-status-fail";
697
878
  case "skip":
698
- return { item: { background: "var(--twd-skip-bg)" } };
879
+ return "twd-status-skip";
699
880
  case "running":
700
- return { item: { background: "var(--twd-warning-bg)" } };
881
+ return "twd-status-running";
701
882
  default:
702
- return { item: { background: "transparent" } };
883
+ return "";
703
884
  }
704
- }, It = ({ node: e, depth: t, id: r, runTest: n }) => {
705
- const o = O(null), s = O(e.status), l = O(e.logs?.length || 0), d = N(() => Et(e), [e.status]), u = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name, a = N(() => ({
706
- ...D.container,
707
- marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
708
- ...d.container || {}
709
- }), [t, d]), p = N(() => ({
710
- ...D.item,
711
- ...d.item,
712
- ...u && { border: "1px dashed var(--twd-border)" }
713
- }), [d, u]);
714
- oe(() => {
715
- const f = o.current;
716
- !f || !e.logs || e.logs.length === 0 || ((s.current === "running" && (e.status === "pass" || e.status === "fail") || e.logs.length > l.current) && setTimeout(() => {
717
- f.scrollTop = f.scrollHeight;
718
- }, 0), s.current = e.status, l.current = e.logs.length);
885
+ }, At = ({ node: e, depth: t, id: r, runTest: n }) => {
886
+ const s = F(null), o = F(e.status), l = F(e.logs?.length || 0), c = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name;
887
+ se(() => {
888
+ const a = s.current;
889
+ !a || !e.logs || e.logs.length === 0 || ((o.current === "running" && (e.status === "pass" || e.status === "fail") || e.logs.length > l.current) && setTimeout(() => {
890
+ a.scrollTop = a.scrollHeight;
891
+ }, 0), o.current = e.status, l.current = e.logs.length);
719
892
  }, [e.status, e.logs]);
720
- const i = () => {
893
+ const u = () => {
721
894
  switch (e.status) {
722
895
  case "pass":
723
896
  return "passed";
@@ -731,136 +904,115 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
731
904
  return "not run";
732
905
  }
733
906
  };
734
- return /* @__PURE__ */ c("li", {
735
- style: a,
907
+ return /* @__PURE__ */ d("li", {
908
+ style: {
909
+ marginBottom: "var(--twd-spacing-xs)",
910
+ marginLeft: `calc(${t} * var(--twd-spacing-sm))`
911
+ },
736
912
  "data-testid": `test-list-item-${r}`,
737
913
  "data-test-name": e.name,
738
914
  role: "listitem",
739
- "aria-label": `Test ${e.name}, status: ${i()}`,
740
- children: [/* @__PURE__ */ c("div", {
741
- style: p,
742
- children: [/* @__PURE__ */ c("span", {
743
- style: D.nameSpan,
744
- children: /* @__PURE__ */ c(Ke, {
915
+ "aria-label": `Test ${e.name}, status: ${u()}`,
916
+ children: [/* @__PURE__ */ d("div", {
917
+ className: `twd-test-item ${It(e.status)}`,
918
+ style: c ? { border: "1px dashed var(--twd-border)" } : void 0,
919
+ children: [/* @__PURE__ */ d("span", {
920
+ className: "twd-test-item-name",
921
+ children: /* @__PURE__ */ d(Qe, {
745
922
  id: r,
746
923
  name: e.name,
747
924
  skip: e.skip,
748
925
  only: e.only
749
926
  })
750
- }), /* @__PURE__ */ c("button", {
927
+ }), /* @__PURE__ */ d("button", {
751
928
  onClick: () => n(r),
752
929
  "aria-label": `Run ${e.name} test`,
753
- style: D.button,
930
+ className: "twd-btn twd-btn-icon",
754
931
  disabled: e.status === "running",
755
932
  "data-testid": `run-test-button-${r}`,
756
- children: e.status === "running" ? /* @__PURE__ */ c(kt, {}) : /* @__PURE__ */ c(St, {})
933
+ children: e.status === "running" ? /* @__PURE__ */ d(St, {}) : /* @__PURE__ */ d(Tt, {})
757
934
  })]
758
- }), e.logs && e.logs.length > 0 && /* @__PURE__ */ c("ul", {
759
- ref: o,
760
- style: D.logsList,
761
- children: e.logs.map((f, _) => /* @__PURE__ */ c($t, {
762
- log: f,
935
+ }), e.logs && e.logs.length > 0 && /* @__PURE__ */ d("ul", {
936
+ ref: s,
937
+ className: "twd-test-item-logs",
938
+ children: e.logs.map((a, _) => /* @__PURE__ */ d(Nt, {
939
+ log: a,
763
940
  index: _
764
941
  }, _))
765
942
  })]
766
943
  }, e.name);
767
- }, At = () => /* @__PURE__ */ c(se, {
944
+ }, Mt = () => /* @__PURE__ */ d(oe, {
768
945
  className: "lucide-chevron-down-icon lucide-chevron-down",
769
946
  dataTestId: "chevron-down-icon",
770
- children: /* @__PURE__ */ c("path", { d: "m6 9 6 6 6-6" })
771
- }), Lt = () => /* @__PURE__ */ c(se, {
947
+ children: /* @__PURE__ */ d("path", { d: "m6 9 6 6 6-6" })
948
+ }), zt = () => /* @__PURE__ */ d(oe, {
772
949
  className: "lucide-chevron-right-icon lucide-chevron-right",
773
950
  dataTestId: "chevron-right-icon",
774
- children: /* @__PURE__ */ c("path", { d: "m9 18 6-6-6-6" })
775
- }), Mt = ({ roots: e, runTest: t, searchQuery: r = "" }) => {
776
- const [n, o] = P({}), s = O(null), l = O(!1), d = (a) => o((p) => ({
777
- ...p,
778
- [a]: !p[a]
951
+ children: /* @__PURE__ */ d("path", { d: "m9 18 6-6-6-6" })
952
+ }), Lt = ({ roots: e, runTest: t, searchQuery: r = "" }) => {
953
+ const [n, s] = B({}), o = F(null), l = F(!1), c = (a) => s((_) => ({
954
+ ..._,
955
+ [a]: !_[a]
779
956
  }));
780
- oe(() => {
957
+ se(() => {
781
958
  if (l.current) return;
782
959
  const a = sessionStorage.getItem("twd-last-run-test-name");
783
960
  if (!a) return;
784
- const p = setTimeout(() => {
961
+ const _ = setTimeout(() => {
785
962
  const i = document.querySelector(`[data-test-name="${a}"]`);
786
963
  if (i) {
787
- const f = s.current?.closest('[data-testid="twd-sidebar"]');
964
+ const f = o.current?.closest('[data-testid="twd-sidebar"]');
788
965
  if (f) {
789
- const _ = i.getBoundingClientRect(), w = f.getBoundingClientRect(), C = f.scrollTop, k = _.top - w.top + C, v = f.querySelector('[data-testid="twd-sidebar-header"]'), g = v ? v.getBoundingClientRect().height + 16 : 150;
966
+ const p = i.getBoundingClientRect(), y = f.getBoundingClientRect(), C = f.scrollTop, k = p.top - y.top + C, g = f.querySelector('[data-testid="twd-sidebar-header"]'), m = g ? g.getBoundingClientRect().height + 16 : 150;
790
967
  f.scrollTo({
791
- top: k - g,
968
+ top: k - m,
792
969
  behavior: "smooth"
793
970
  });
794
971
  }
795
972
  l.current = !0;
796
973
  }
797
974
  }, 100);
798
- return () => clearTimeout(p);
975
+ return () => clearTimeout(_);
799
976
  }, []);
800
- const u = (a, p = 0) => {
801
- if (a.type === "test") return /* @__PURE__ */ c(It, {
977
+ const u = (a, _ = 0) => {
978
+ if (a.type === "test") return /* @__PURE__ */ d(At, {
802
979
  node: a,
803
- depth: p,
980
+ depth: _,
804
981
  id: a.id,
805
982
  runTest: () => t(a.id)
806
983
  }, a.id);
807
984
  const i = n[a.id];
808
- return /* @__PURE__ */ c("li", {
809
- style: { marginLeft: `calc(${p} * var(--twd-spacing-lg))` },
810
- children: [/* @__PURE__ */ c("div", {
811
- style: {
812
- background: "var(--twd-describe-bg)",
813
- borderLeft: "3px solid var(--twd-describe-border)",
814
- borderRadius: "var(--twd-border-radius)",
815
- padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
816
- marginBottom: "var(--twd-spacing-sm)"
817
- },
818
- children: /* @__PURE__ */ c("span", {
819
- style: {
820
- fontWeight: "var(--twd-font-weight-medium)",
821
- fontSize: "var(--twd-font-size-sm)",
822
- cursor: "pointer",
823
- color: "var(--twd-describe-text)",
824
- display: "flex",
825
- alignItems: "center",
826
- justifyContent: "space-between",
827
- gap: "var(--twd-spacing-sm)",
828
- textTransform: "uppercase",
829
- letterSpacing: "0.05em"
830
- },
985
+ return /* @__PURE__ */ d("li", {
986
+ style: { marginLeft: `calc(${_} * var(--twd-spacing-lg))` },
987
+ children: [/* @__PURE__ */ d("div", {
988
+ className: "twd-test-group",
989
+ children: /* @__PURE__ */ d("span", {
990
+ className: "twd-test-group-toggle",
831
991
  "data-testid": `test-group-${a.name}`,
832
992
  tabIndex: 0,
833
993
  role: "button",
834
994
  "aria-expanded": !i,
835
995
  "aria-label": `${i ? "Expand" : "Collapse"} test suite ${a.name}`,
836
- onClick: () => d(a.id),
837
- children: [/* @__PURE__ */ c(Ke, {
996
+ onClick: () => c(a.id),
997
+ children: [/* @__PURE__ */ d(Qe, {
838
998
  id: a.id,
839
999
  name: a.name,
840
1000
  skip: a.skip,
841
1001
  only: a.only
842
- }), i ? /* @__PURE__ */ c(Lt, {}) : /* @__PURE__ */ c(At, {})]
1002
+ }), i ? /* @__PURE__ */ d(zt, {}) : /* @__PURE__ */ d(Mt, {})]
843
1003
  })
844
- }), !i && a.childrenNodes && a.childrenNodes.length > 0 && /* @__PURE__ */ c("ul", {
845
- style: {
846
- listStyle: "none",
847
- padding: 0,
848
- margin: 0
849
- },
850
- children: a.childrenNodes.map((f) => u(f, p + 1))
1004
+ }), !i && a.childrenNodes && a.childrenNodes.length > 0 && /* @__PURE__ */ d("ul", {
1005
+ className: "twd-test-list",
1006
+ children: a.childrenNodes.map((f) => u(f, _ + 1))
851
1007
  })]
852
1008
  }, a.id);
853
1009
  };
854
- return /* @__PURE__ */ c("ul", {
855
- ref: s,
856
- style: {
857
- listStyle: "none",
858
- padding: 0,
859
- margin: 0
860
- },
1010
+ return /* @__PURE__ */ d("ul", {
1011
+ ref: o,
1012
+ className: "twd-test-list",
861
1013
  role: "list",
862
1014
  "aria-label": "Test list",
863
- children: e.length === 0 && r ? /* @__PURE__ */ c("li", {
1015
+ children: e.length === 0 && r ? /* @__PURE__ */ d("li", {
864
1016
  style: {
865
1017
  padding: "var(--twd-spacing-md)",
866
1018
  color: "var(--twd-text-secondary)",
@@ -874,7 +1026,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
874
1026
  ]
875
1027
  }) : e.map((a) => u(a))
876
1028
  });
877
- }, zt = {
1029
+ }, Wt = {
878
1030
  left: {
879
1031
  left: 0,
880
1032
  borderTopRightRadius: "var(--twd-border-radius-lg)",
@@ -889,61 +1041,51 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
889
1041
  borderTopRightRadius: "0",
890
1042
  borderBottomRightRadius: "0"
891
1043
  }
892
- }, Nt = ({ setOpen: e, position: t }) => /* @__PURE__ */ c("button", {
1044
+ }, Ht = ({ setOpen: e, position: t }) => /* @__PURE__ */ d("button", {
893
1045
  "aria-label": "Open TWD sidebar",
894
- style: {
895
- position: "fixed",
896
- top: "50%",
897
- transform: "translateY(-50%)",
898
- zIndex: "var(--twd-z-index-sidebar)",
899
- background: "var(--twd-button-primary)",
900
- color: "var(--twd-button-primary-text)",
901
- padding: "var(--twd-spacing-sm) 10px",
902
- cursor: "pointer",
903
- fontSize: "var(--twd-font-size-sm)",
904
- ...zt[t]
905
- },
1046
+ className: "twd-btn twd-sidebar-closed",
1047
+ style: { ...Wt[t] },
906
1048
  onClick: () => e(!0),
907
1049
  children: "TWD"
908
- }), Wt = ({ isOpen: e, position: t }) => {
909
- oe(() => {
1050
+ }), Bt = ({ isOpen: e, position: t }) => {
1051
+ se(() => {
910
1052
  const r = document.documentElement, n = getComputedStyle(document.documentElement).getPropertyValue("--twd-sidebar-width") || "280px";
911
1053
  return e ? t === "left" ? r.style.marginLeft = n : r.style.marginRight = n : (r.style.marginRight = "0", r.style.marginLeft = "0"), () => {
912
1054
  r.style.marginRight = "0", r.style.marginLeft = "0";
913
1055
  };
914
1056
  }, [e, t]);
915
1057
  };
916
- function U(e) {
1058
+ function j(e) {
917
1059
  "@babel/helpers - typeof";
918
- return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1060
+ return j = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
919
1061
  return typeof t;
920
1062
  } : function(t) {
921
1063
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
922
- }, U(e);
1064
+ }, j(e);
923
1065
  }
924
- function Ht(e, t) {
925
- if (U(e) != "object" || !e) return e;
1066
+ function Dt(e, t) {
1067
+ if (j(e) != "object" || !e) return e;
926
1068
  var r = e[Symbol.toPrimitive];
927
1069
  if (r !== void 0) {
928
1070
  var n = r.call(e, t || "default");
929
- if (U(n) != "object") return n;
1071
+ if (j(n) != "object") return n;
930
1072
  throw new TypeError("@@toPrimitive must return a primitive value.");
931
1073
  }
932
1074
  return (t === "string" ? String : Number)(e);
933
1075
  }
934
- function Bt(e) {
935
- var t = Ht(e, "string");
936
- return U(t) == "symbol" ? t : t + "";
1076
+ function Pt(e) {
1077
+ var t = Dt(e, "string");
1078
+ return j(t) == "symbol" ? t : t + "";
937
1079
  }
938
- function Me(e, t, r) {
939
- return (t = Bt(t)) in e ? Object.defineProperty(e, t, {
1080
+ function ze(e, t, r) {
1081
+ return (t = Pt(t)) in e ? Object.defineProperty(e, t, {
940
1082
  value: r,
941
1083
  enumerable: !0,
942
1084
  configurable: !0,
943
1085
  writable: !0
944
1086
  }) : e[t] = r, e;
945
1087
  }
946
- var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
1088
+ var Ft = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
947
1089
  handlers: /* @__PURE__ */ new Map(),
948
1090
  beforeEachHooks: /* @__PURE__ */ new Map(),
949
1091
  afterEachHooks: /* @__PURE__ */ new Map(),
@@ -953,9 +1095,9 @@ var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STAT
953
1095
  beforeEachHooks: /* @__PURE__ */ new Map(),
954
1096
  afterEachHooks: /* @__PURE__ */ new Map(),
955
1097
  stack: []
956
- }, ie = Dt(), m = ie.handlers, ze = ie.beforeEachHooks, Ne = ie.afterEachHooks, T = ie.stack, B = () => Math.random().toString(36).slice(2, 11), Ye = (e, t) => {
957
- const r = B(), n = T.at(-1);
958
- m.set(r, {
1098
+ }, ie = Ft(), v = ie.handlers, Le = ie.beforeEachHooks, We = ie.afterEachHooks, T = ie.stack, H = () => Math.random().toString(36).slice(2, 11), Ye = (e, t) => {
1099
+ const r = H(), n = T.at(-1);
1100
+ v.set(r, {
959
1101
  id: r,
960
1102
  name: e,
961
1103
  type: "suite",
@@ -964,11 +1106,11 @@ var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STAT
964
1106
  depth: T.length,
965
1107
  parent: n,
966
1108
  handler: t
967
- }), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
1109
+ }), n && v.get(n).children.push(r), T.push(r), t(), T.pop();
968
1110
  };
969
1111
  Ye.only = (e, t) => {
970
- const r = B(), n = T.at(-1);
971
- m.set(r, {
1112
+ const r = H(), n = T.at(-1);
1113
+ v.set(r, {
972
1114
  id: r,
973
1115
  name: e,
974
1116
  type: "suite",
@@ -978,11 +1120,11 @@ Ye.only = (e, t) => {
978
1120
  parent: n,
979
1121
  handler: t,
980
1122
  only: !0
981
- }), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
1123
+ }), n && v.get(n).children.push(r), T.push(r), t(), T.pop();
982
1124
  };
983
1125
  Ye.skip = (e, t) => {
984
- const r = B(), n = T.at(-1);
985
- m.set(r, {
1126
+ const r = H(), n = T.at(-1);
1127
+ v.set(r, {
986
1128
  id: r,
987
1129
  name: e,
988
1130
  type: "suite",
@@ -992,10 +1134,10 @@ Ye.skip = (e, t) => {
992
1134
  parent: n,
993
1135
  handler: t,
994
1136
  skip: !0
995
- }), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
1137
+ }), n && v.get(n).children.push(r), T.push(r), t(), T.pop();
996
1138
  };
997
- var Qe = (e, t) => {
998
- const r = B(), n = T.at(-1), o = {
1139
+ var Ze = (e, t) => {
1140
+ const r = H(), n = T.at(-1), s = {
999
1141
  id: r,
1000
1142
  name: e,
1001
1143
  type: "test",
@@ -1004,10 +1146,10 @@ var Qe = (e, t) => {
1004
1146
  logs: [],
1005
1147
  parent: n
1006
1148
  };
1007
- n && m.get(n).children.push(r), m.set(r, o);
1149
+ n && v.get(n).children.push(r), v.set(r, s);
1008
1150
  };
1009
- Qe.only = (e, t) => {
1010
- const r = B(), n = T.at(-1), o = {
1151
+ Ze.only = (e, t) => {
1152
+ const r = H(), n = T.at(-1), s = {
1011
1153
  id: r,
1012
1154
  name: e,
1013
1155
  type: "test",
@@ -1017,10 +1159,10 @@ Qe.only = (e, t) => {
1017
1159
  parent: n,
1018
1160
  only: !0
1019
1161
  };
1020
- n && m.get(n).children.push(r), m.set(r, o);
1162
+ n && v.get(n).children.push(r), v.set(r, s);
1021
1163
  };
1022
- Qe.skip = (e, t) => {
1023
- const r = B(), n = T.at(-1), o = {
1164
+ Ze.skip = (e, t) => {
1165
+ const r = H(), n = T.at(-1), s = {
1024
1166
  id: r,
1025
1167
  name: e,
1026
1168
  type: "test",
@@ -1031,170 +1173,154 @@ Qe.skip = (e, t) => {
1031
1173
  parent: n,
1032
1174
  skip: !0
1033
1175
  };
1034
- n && m.get(n).children.push(r), m.set(r, o);
1176
+ n && v.get(n).children.push(r), v.set(r, s);
1035
1177
  };
1036
- var Pt = (e) => {
1178
+ var Ot = (e) => {
1037
1179
  const t = [], r = [];
1038
1180
  let n = e;
1039
1181
  for (; n; )
1040
- ze.has(n) && t.unshift(...ze.get(n)), Ne.has(n) && r.push(...Ne.get(n)), n = m.get(n)?.parent;
1182
+ Le.has(n) && t.unshift(...Le.get(n)), We.has(n) && r.push(...We.get(n)), n = v.get(n)?.parent;
1041
1183
  return {
1042
1184
  before: t,
1043
1185
  after: r
1044
1186
  };
1045
- }, F = (e) => {
1046
- const t = m.get(e);
1047
- return t ? t.only ? !0 : t.children ? t.children.some((r) => F(r)) : !1 : !1;
1048
- }, Ft = (e) => {
1049
- let t = m.get(e);
1187
+ }, D = (e) => {
1188
+ const t = v.get(e);
1189
+ return t ? t.only ? !0 : t.children ? t.children.some((r) => D(r)) : !1 : !1;
1190
+ }, jt = (e) => {
1191
+ let t = v.get(e);
1050
1192
  for (; t?.parent; ) {
1051
- const r = m.get(t.parent);
1193
+ const r = v.get(t.parent);
1052
1194
  if (r?.only) return !0;
1053
1195
  t = r;
1054
1196
  }
1055
1197
  return !1;
1056
- }, le = (e) => {
1057
- let t = m.get(e);
1198
+ }, de = (e) => {
1199
+ let t = v.get(e);
1058
1200
  for (; t; ) {
1059
1201
  if (t.skip) return !0;
1060
1202
  if (!t.parent) break;
1061
- t = m.get(t.parent);
1203
+ t = v.get(t.parent);
1062
1204
  }
1063
1205
  return !1;
1064
- }, Ze = class {
1206
+ }, et = class {
1065
1207
  constructor(e, t) {
1066
- Me(this, "events", void 0), Me(this, "retryCount", void 0), this.events = e, this.retryCount = t?.retryCount ?? 1;
1208
+ ze(this, "events", void 0), ze(this, "retryCount", void 0), this.events = e, this.retryCount = t?.retryCount ?? 1;
1067
1209
  }
1068
1210
  async runAll() {
1069
- const e = Array.from(m.values()).filter((r) => !r.parent && r.type === "suite"), t = Array.from(m.values()).some((r) => r.only);
1211
+ const e = Array.from(v.values()).filter((r) => !r.parent && r.type === "suite"), t = Array.from(v.values()).some((r) => r.only);
1070
1212
  for (const r of e) await this.runSuite(r, t);
1071
- return m;
1213
+ return v;
1072
1214
  }
1073
1215
  async runSingle(e) {
1074
- const t = m.get(e);
1216
+ const t = v.get(e);
1075
1217
  !t || t.type !== "test" || await this.runTest(t, !1);
1076
1218
  }
1077
1219
  async runByIds(e) {
1078
- const t = new Set(e), r = Array.from(m.values()).filter((o) => !o.parent && o.type === "suite"), n = Array.from(m.values()).some((o) => o.only);
1079
- for (const o of r) await this.runSuiteByIds(o, t, n);
1080
- return m;
1220
+ const t = new Set(e), r = Array.from(v.values()).filter((s) => !s.parent && s.type === "suite"), n = Array.from(v.values()).some((s) => s.only);
1221
+ for (const s of r) await this.runSuiteByIds(s, t, n);
1222
+ return v;
1081
1223
  }
1082
1224
  async runSuiteByIds(e, t, r) {
1083
1225
  if (!this.hasDescendantInSet(e, t)) return;
1084
- if (le(e.id) && !F(e.id)) {
1226
+ if (de(e.id) && !D(e.id)) {
1085
1227
  this.events.onSkip?.(e);
1086
1228
  return;
1087
1229
  }
1088
- if (r && !F(e.id)) return;
1230
+ if (r && !D(e.id)) return;
1089
1231
  this.events.onSuiteStart?.(e);
1090
- const n = (e.children || []).map((o) => m.get(o));
1091
- for (const o of n) o.type === "suite" ? await this.runSuiteByIds(o, t, r) : o.type === "test" && t.has(o.id) && await this.runTest(o, r);
1232
+ const n = (e.children || []).map((s) => v.get(s));
1233
+ for (const s of n) s.type === "suite" ? await this.runSuiteByIds(s, t, r) : s.type === "test" && t.has(s.id) && await this.runTest(s, r);
1092
1234
  this.events.onSuiteEnd?.(e);
1093
1235
  }
1094
1236
  hasDescendantInSet(e, t) {
1095
1237
  return t.has(e.id) ? !0 : e.children ? e.children.some((r) => {
1096
- const n = m.get(r);
1238
+ const n = v.get(r);
1097
1239
  return n ? this.hasDescendantInSet(n, t) : !1;
1098
1240
  }) : !1;
1099
1241
  }
1100
1242
  async runSuite(e, t) {
1101
- if (le(e.id) && !F(e.id)) {
1243
+ if (de(e.id) && !D(e.id)) {
1102
1244
  this.events.onSkip?.(e);
1103
1245
  return;
1104
1246
  }
1105
- if (t && !F(e.id)) return;
1247
+ if (t && !D(e.id)) return;
1106
1248
  this.events.onSuiteStart?.(e);
1107
- const r = (e.children || []).map((n) => m.get(n));
1249
+ const r = (e.children || []).map((n) => v.get(n));
1108
1250
  for (const n of r) n.type === "suite" ? await this.runSuite(n, t) : n.type === "test" && await this.runTest(n, t);
1109
1251
  this.events.onSuiteEnd?.(e);
1110
1252
  }
1111
1253
  async runTest(e, t) {
1112
- if ((le(e.id) || e.skip) && !e.only) {
1254
+ if ((de(e.id) || e.skip) && !e.only) {
1113
1255
  this.events.onSkip(e);
1114
1256
  return;
1115
1257
  }
1116
- const r = Ft(e.id);
1258
+ const r = jt(e.id);
1117
1259
  if (t && !e.only && !r) {
1118
1260
  this.events.onSkip(e);
1119
1261
  return;
1120
1262
  }
1121
1263
  this.events.onStart?.(e);
1122
- const n = Pt(e.parent);
1123
- let o = null;
1124
- for (let s = 1; s <= this.retryCount; s++) try {
1264
+ const n = Ot(e.parent);
1265
+ let s = null;
1266
+ for (let o = 1; o <= this.retryCount; o++) try {
1125
1267
  for (const l of n.before) await l();
1126
- e.logs = [], await e.handler(), this.events.onPass(e, s > 1 ? s : void 0);
1268
+ e.logs = [], await e.handler(), this.events.onPass(e, o > 1 ? o : void 0);
1127
1269
  return;
1128
1270
  } catch (l) {
1129
- o = l;
1271
+ s = l;
1130
1272
  } finally {
1131
1273
  for (const l of n.after) await l();
1132
1274
  }
1133
- this.events.onFail(e, o);
1275
+ this.events.onFail(e, s);
1134
1276
  }
1135
1277
  };
1136
- window.__testRunner = Ze;
1137
- var me = "1.6.4", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
1278
+ window.__testRunner = et;
1279
+ var we = "1.6.6", Ut = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
1138
1280
  rules: [],
1139
1281
  counts: {}
1140
1282
  }), window.__TWD_MOCK_STATE__) : {
1141
1283
  rules: [],
1142
1284
  counts: {}
1143
- }, q = Ot(), ye = q.rules, We = !1, jt = async (e) => {
1144
- if (We) {
1285
+ }, U = Ut(), ye = U.rules, He = !1, qt = async (e) => {
1286
+ if (He) {
1145
1287
  console.warn("[TWD] Request mocking already initialized");
1146
1288
  return;
1147
1289
  }
1148
- "serviceWorker" in navigator && (We = !0, await navigator.serviceWorker.register(`${e ?? "/mock-sw.js"}?v=${me}`), navigator.serviceWorker.controller || await new Promise((t) => {
1290
+ "serviceWorker" in navigator && (He = !0, await navigator.serviceWorker.register(`${e ?? "/mock-sw.js"}?v=${we}`), navigator.serviceWorker.controller || await new Promise((t) => {
1149
1291
  navigator.serviceWorker.addEventListener("controllerchange", t, { once: !0 });
1150
1292
  }), navigator.serviceWorker.addEventListener("message", (t) => {
1151
1293
  if (t.data?.type === "EXECUTED") {
1152
- const { alias: r, request: n, hitCount: o } = t.data, s = ye.find((l) => l.alias === r);
1153
- s && (s.executed = !0, s.request = n, s.hitCount = o), q.counts[r] = o ?? (q.counts[r] ?? 0) + 1;
1294
+ const { alias: r, request: n, hitCount: s } = t.data, o = ye.find((l) => l.alias === r);
1295
+ o && (o.executed = !0, o.request = n, o.hitCount = s), U.counts[r] = s ?? (U.counts[r] ?? 0) + 1;
1154
1296
  }
1155
1297
  }));
1156
- }, Ut = () => ye, qt = () => {
1298
+ }, Vt = () => ye, Jt = () => {
1157
1299
  navigator.serviceWorker.controller?.postMessage({
1158
1300
  type: "CLEAR_RULES",
1159
- version: me
1301
+ version: we
1160
1302
  }), ye.length = 0;
1161
- for (const e in q.counts) delete q.counts[e];
1162
- }, Vt = () => /* @__PURE__ */ c(se, {
1303
+ for (const e in U.counts) delete U.counts[e];
1304
+ }, Kt = () => /* @__PURE__ */ d(oe, {
1163
1305
  className: "lucide-wifi-pen-icon lucide-wifi-pen",
1164
1306
  dataTestId: "wifi-pen-icon",
1165
1307
  children: [
1166
- /* @__PURE__ */ c("path", { d: "M2 8.82a15 15 0 0 1 20 0" }),
1167
- /* @__PURE__ */ c("path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }),
1168
- /* @__PURE__ */ c("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
1169
- /* @__PURE__ */ c("path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" })
1308
+ /* @__PURE__ */ d("path", { d: "M2 8.82a15 15 0 0 1 20 0" }),
1309
+ /* @__PURE__ */ d("path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }),
1310
+ /* @__PURE__ */ d("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
1311
+ /* @__PURE__ */ d("path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" })
1170
1312
  ]
1171
- }), Jt = () => {
1172
- const e = Ut(), t = e.filter((n) => n.executed);
1173
- return /* @__PURE__ */ c("button", {
1313
+ }), Xt = () => {
1314
+ const e = Vt(), t = e.filter((n) => n.executed);
1315
+ return /* @__PURE__ */ d("button", {
1174
1316
  onClick: () => {
1175
1317
  console.group("🌐 TWD Mock Rules"), console.log("Total rules:", e.length), console.log("Triggered rules:", t.length), console.log("Rules details:"), console.log(e), console.groupEnd();
1176
1318
  },
1177
1319
  "aria-label": "View mock rules details in console",
1178
- style: {
1179
- background: "var(--twd-button-secondary)",
1180
- border: "1px solid var(--twd-button-border)",
1181
- borderRadius: "var(--twd-border-radius-lg)",
1182
- padding: "var(--twd-spacing-md) var(--twd-spacing-lg)",
1183
- cursor: "pointer",
1184
- fontSize: "var(--twd-font-size-sm)",
1185
- color: "var(--twd-button-secondary-text)",
1186
- display: "flex",
1187
- alignItems: "center",
1188
- gap: "var(--twd-spacing-md)",
1189
- marginBottom: "10px",
1190
- width: "100%",
1191
- textAlign: "left",
1192
- transition: "all var(--twd-animation-duration) ease",
1193
- boxShadow: "var(--twd-shadow-sm)"
1194
- },
1320
+ className: "twd-btn twd-btn-mock-rules",
1195
1321
  children: [
1196
- /* @__PURE__ */ c(Vt, {}),
1197
- /* @__PURE__ */ c("span", {
1322
+ /* @__PURE__ */ d(Kt, {}),
1323
+ /* @__PURE__ */ d("span", {
1198
1324
  style: { flex: 1 },
1199
1325
  children: [
1200
1326
  "Rules: ",
@@ -1204,7 +1330,7 @@ var me = "1.6.4", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ ||
1204
1330
  " triggered"
1205
1331
  ]
1206
1332
  }),
1207
- /* @__PURE__ */ c("span", {
1333
+ /* @__PURE__ */ d("span", {
1208
1334
  style: {
1209
1335
  fontSize: "var(--twd-font-size-xs)",
1210
1336
  color: "var(--twd-text)",
@@ -1214,11 +1340,11 @@ var me = "1.6.4", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ ||
1214
1340
  })
1215
1341
  ]
1216
1342
  });
1217
- }, Xt = /* @__PURE__ */ new Map();
1218
- function Gt() {
1219
- Xt.clear();
1343
+ }, Gt = /* @__PURE__ */ new Map();
1344
+ function Qt() {
1345
+ Gt.clear();
1220
1346
  }
1221
- var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
1347
+ var Yt = (e) => e instanceof Error && "actual" in e && "expected" in e, tt = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
1222
1348
  type: "diff",
1223
1349
  actual: e.actual,
1224
1350
  expected: e.expected,
@@ -1226,62 +1352,49 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1226
1352
  } : {
1227
1353
  type: "message",
1228
1354
  message: e.message
1229
- }, Yt = (e) => {
1230
- const t = et(e);
1355
+ }, Zt = (e) => {
1356
+ const t = tt(e);
1231
1357
  t.type === "diff" ? (console.error(`Assertion failed with operator: ${t.operator || "unknown"}`), console.group("Expected:"), console.log(t.expected), console.groupEnd(), console.group("Actual:"), console.log(t.actual), console.groupEnd()) : console.error(t.message);
1232
- }, Qt = (e) => {
1358
+ }, er = (e) => {
1233
1359
  if (e.status === "pass") return `Test "${e.name}" passed.`;
1234
1360
  if (e.status === "fail") {
1235
1361
  if (!e.logs || e.logs.length === 0) return `Test "${e.name}" failed.`;
1236
1362
  const t = e.logs[e.logs.length - 1];
1237
1363
  try {
1238
1364
  const r = JSON.parse(t);
1239
- return r.type === L.CHAI_MESSAGE || r.type === L.ERROR ? `Test "${e.name}" failed. ${r.message}` : r.type === L.CHAI_DIFF ? `Test "${e.name}" failed. Expected value does not match actual value.` : `Test "${e.name}" failed.`;
1365
+ return r.type === A.CHAI_MESSAGE || r.type === A.ERROR ? `Test "${e.name}" failed. ${r.message}` : r.type === A.CHAI_DIFF ? `Test "${e.name}" failed. Expected value does not match actual value.` : `Test "${e.name}" failed.`;
1240
1366
  } catch {
1241
1367
  return `Test "${e.name}" failed. ${t}`;
1242
1368
  }
1243
1369
  } else if (e.status === "skip") return `Test "${e.name}" skipped.`;
1244
1370
  return "";
1245
- }, Zt = (e) => {
1246
- const t = e.filter((l) => l.type === "test"), r = t.filter((l) => l.status === "pass").length, n = t.filter((l) => l.status === "fail").length, o = t.filter((l) => l.status === "skip").length, s = [];
1247
- return n > 0 ? (s.push("Test run completed."), s.push(`${r} test${r !== 1 ? "s" : ""} passed`), s.push(`${n} test${n !== 1 ? "s" : ""} failed`), o > 0 && s.push(`${o} test${o !== 1 ? "s" : ""} skipped`), s.join(", ") + ".") : (s.push("All tests passed."), s.push(`${r} test${r !== 1 ? "s" : ""} completed`), o > 0 && s.push(`${o} test${o !== 1 ? "s" : ""} skipped`), s.join(", ") + ".");
1248
- }, er = ({ value: e, onChange: t }) => /* @__PURE__ */ c("div", {
1249
- style: {
1250
- position: "relative",
1251
- marginBottom: "var(--twd-spacing-md)"
1252
- },
1253
- children: /* @__PURE__ */ c("input", {
1371
+ }, tr = (e) => {
1372
+ const t = e.filter((l) => l.type === "test"), r = t.filter((l) => l.status === "pass").length, n = t.filter((l) => l.status === "fail").length, s = t.filter((l) => l.status === "skip").length, o = [];
1373
+ return n > 0 ? (o.push("Test run completed."), o.push(`${r} test${r !== 1 ? "s" : ""} passed`), o.push(`${n} test${n !== 1 ? "s" : ""} failed`), s > 0 && o.push(`${s} test${s !== 1 ? "s" : ""} skipped`), o.join(", ") + ".") : (o.push("All tests passed."), o.push(`${r} test${r !== 1 ? "s" : ""} completed`), s > 0 && o.push(`${s} test${s !== 1 ? "s" : ""} skipped`), o.join(", ") + ".");
1374
+ }, rr = ({ value: e, onChange: t }) => /* @__PURE__ */ d("div", {
1375
+ className: "twd-search-wrapper",
1376
+ children: /* @__PURE__ */ d("input", {
1254
1377
  type: "search",
1255
1378
  id: "twd-search-input",
1256
1379
  "aria-label": "Filter tests",
1257
1380
  placeholder: "Filter tests...",
1258
1381
  value: e,
1259
1382
  onInput: (r) => t(r.target.value),
1260
- style: {
1261
- width: "100%",
1262
- padding: "var(--twd-spacing-md)",
1263
- background: "var(--twd-background)",
1264
- color: "var(--twd-text)",
1265
- border: "1px solid var(--twd-border)",
1266
- borderRadius: "var(--twd-border-radius)",
1267
- fontSize: "var(--twd-font-size-md)",
1268
- boxSizing: "border-box",
1269
- outline: "none"
1270
- }
1383
+ className: "twd-search-input"
1271
1384
  })
1272
- }), tr = (e, t) => {
1385
+ }), nr = (e, t) => {
1273
1386
  if (!t.trim()) return e;
1274
- const r = t.toLowerCase(), n = (o) => {
1275
- const s = o.name.toLowerCase().includes(r);
1276
- if (o.type === "test") return s ? o : null;
1277
- const l = (o.childrenNodes || []).map(n).filter((d) => d !== null);
1278
- return s || l.length > 0 ? {
1279
- ...o,
1280
- childrenNodes: s ? o.childrenNodes : l
1387
+ const r = t.toLowerCase(), n = (s) => {
1388
+ const o = s.name.toLowerCase().includes(r);
1389
+ if (s.type === "test") return o ? s : null;
1390
+ const l = (s.childrenNodes || []).map(n).filter((c) => c !== null);
1391
+ return o || l.length > 0 ? {
1392
+ ...s,
1393
+ childrenNodes: o ? s.childrenNodes : l
1281
1394
  } : null;
1282
1395
  };
1283
- return e.map(n).filter((o) => o !== null);
1284
- }, rr = (e) => {
1396
+ return e.map(n).filter((s) => s !== null);
1397
+ }, sr = (e) => {
1285
1398
  const t = /* @__PURE__ */ new Map(), r = [];
1286
1399
  for (const n of e) t.set(n.id, {
1287
1400
  ...n,
@@ -1289,7 +1402,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1289
1402
  });
1290
1403
  for (const n of t.values()) n.parent ? t.get(n.parent)?.childrenNodes?.push(n) : r.push(n);
1291
1404
  return r;
1292
- }, nr = {
1405
+ }, or = {
1293
1406
  left: {
1294
1407
  left: 0,
1295
1408
  borderRight: "1px solid var(--twd-border)"
@@ -1298,104 +1411,90 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1298
1411
  right: 0,
1299
1412
  borderLeft: "1px solid var(--twd-border)"
1300
1413
  }
1301
- }, or = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', sr = (e) => e ? sessionStorage.getItem("twd-search-filter") || "" : (sessionStorage.removeItem("twd-search-filter"), ""), ir = (e) => sessionStorage.getItem("twd-sidebar-open") ? sessionStorage.getItem("twd-sidebar-open") === "true" : e, tt = (e) => {
1414
+ }, ir = (e) => e ? sessionStorage.getItem("twd-search-filter") || "" : (sessionStorage.removeItem("twd-search-filter"), ""), ar = (e) => sessionStorage.getItem("twd-sidebar-open") ? sessionStorage.getItem("twd-sidebar-open") === "true" : e, rt = (e) => {
1302
1415
  const t = [];
1303
1416
  for (const r of e)
1304
- r.type === "test" && t.push(r.id), r.childrenNodes && t.push(...tt(r.childrenNodes));
1417
+ r.type === "test" && t.push(r.id), r.childrenNodes && t.push(...rt(r.childrenNodes));
1305
1418
  return t;
1306
- }, ar = ({ open: e, position: t = "left", search: r }) => {
1307
- const [n, o] = P(0), [s, l] = P(ir(e));
1308
- Wt({
1309
- isOpen: s,
1419
+ }, lr = ({ open: e, position: t = "left", search: r }) => {
1420
+ const [n, s] = B(0), [o, l] = B(ar(e));
1421
+ Bt({
1422
+ isOpen: o,
1310
1423
  position: t
1311
1424
  });
1312
- const [d, u] = P(""), [a, p] = P(sr(r));
1313
- oe(() => {
1314
- const h = () => o((b) => b + 1);
1425
+ const [c, u] = B(""), [a, _] = B(ir(r));
1426
+ se(() => {
1427
+ const h = () => s((b) => b + 1);
1315
1428
  return window.addEventListener("twd:state-change", h), () => window.removeEventListener("twd:state-change", h);
1316
1429
  }, []);
1317
- const i = new Ze({
1430
+ const i = new et({
1318
1431
  onStart: (h) => {
1319
- h.status = "running", o((b) => b + 1);
1432
+ h.status = "running", s((b) => b + 1);
1320
1433
  },
1321
1434
  onPass: (h) => {
1322
- h.status = "pass", o((b) => b + 1);
1435
+ h.status = "pass", s((b) => b + 1);
1323
1436
  },
1324
1437
  onFail: (h, b) => {
1325
- if (h.status = "fail", console.group(`%c❌ Test failed: ${h.name}`, "color: red; font-weight: bold;"), Kt(b)) {
1326
- Yt(b);
1327
- const R = et(b);
1328
- R.type === "diff" ? h.logs.push(JSON.stringify({
1329
- type: L.CHAI_DIFF,
1330
- expected: R.expected,
1331
- actual: R.actual
1438
+ if (h.status = "fail", console.group(`%c❌ Test failed: ${h.name}`, "color: red; font-weight: bold;"), Yt(b)) {
1439
+ Zt(b);
1440
+ const $ = tt(b);
1441
+ $.type === "diff" ? h.logs.push(JSON.stringify({
1442
+ type: A.CHAI_DIFF,
1443
+ expected: $.expected,
1444
+ actual: $.actual
1332
1445
  })) : h.logs.push(JSON.stringify({
1333
- type: L.CHAI_MESSAGE,
1334
- message: `Test failed: ${R.message}`
1446
+ type: A.CHAI_MESSAGE,
1447
+ message: `Test failed: ${$.message}`
1335
1448
  }));
1336
1449
  } else
1337
1450
  console.error(b.message), h.logs.push(JSON.stringify({
1338
- type: L.ERROR,
1451
+ type: A.ERROR,
1339
1452
  message: `Test failed: ${b.message}`
1340
1453
  }));
1341
- console.groupEnd(), o((R) => R + 1);
1454
+ console.groupEnd(), s(($) => $ + 1);
1342
1455
  },
1343
1456
  onSkip: (h) => {
1344
- h.status = "skip", o((b) => b + 1);
1457
+ h.status = "skip", s((b) => b + 1);
1345
1458
  }
1346
1459
  }), f = (h) => {
1347
- p(h), h ? sessionStorage.setItem("twd-search-filter", h) : sessionStorage.removeItem("twd-search-filter");
1348
- }, _ = (h) => {
1460
+ _(h), h ? sessionStorage.setItem("twd-search-filter", h) : sessionStorage.removeItem("twd-search-filter");
1461
+ }, p = (h) => {
1349
1462
  l(h), sessionStorage.setItem("twd-sidebar-open", h.toString());
1350
- }, w = Array.from(m.values()), C = N(() => rr(w), [n]), k = N(() => tr(C, a), [C, a]), { filteredTestIds: v, displayTests: g } = N(() => {
1463
+ }, y = Array.from(v.values()), C = G(() => sr(y), [n]), k = G(() => nr(C, a), [C, a]), { filteredTestIds: g, displayTests: m } = G(() => {
1351
1464
  if (a) {
1352
- const h = tt(k), b = new Set(h);
1465
+ const h = rt(k), b = new Set(h);
1353
1466
  return {
1354
1467
  filteredTestIds: h,
1355
- displayTests: w.filter((R) => R.type === "test" && b.has(R.id))
1468
+ displayTests: y.filter(($) => $.type === "test" && b.has($.id))
1356
1469
  };
1357
1470
  }
1358
1471
  return {
1359
1472
  filteredTestIds: null,
1360
- displayTests: w.filter((h) => h.type === "test")
1473
+ displayTests: y.filter((h) => h.type === "test")
1361
1474
  };
1362
1475
  }, [
1363
1476
  k,
1364
1477
  a,
1365
1478
  n
1366
- ]), $ = async () => {
1367
- u(""), sessionStorage.removeItem("twd-last-run-test-name"), v ? await i.runByIds(v) : await i.runAll(), u(Zt(w));
1368
- }, I = async (h) => {
1369
- const b = Array.from(m.values()).filter((R) => R.type === "test").find((R) => R.id === h);
1370
- b && (u(""), sessionStorage.setItem("twd-last-run-test-name", b.name), await i.runSingle(b.id), u(Qt(b)));
1479
+ ]), R = async () => {
1480
+ u(""), sessionStorage.removeItem("twd-last-run-test-name"), g ? await i.runByIds(g) : await i.runAll(), u(tr(y));
1481
+ }, N = async (h) => {
1482
+ const b = Array.from(v.values()).filter(($) => $.type === "test").find(($) => $.id === h);
1483
+ b && (u(""), sessionStorage.setItem("twd-last-run-test-name", b.name), await i.runSingle(b.id), u(er(b)));
1371
1484
  };
1372
- if (!s) return /* @__PURE__ */ c(Nt, {
1485
+ if (!o) return /* @__PURE__ */ d(Ht, {
1373
1486
  position: t,
1374
- setOpen: _
1487
+ setOpen: p
1375
1488
  });
1376
- const z = g.length;
1377
- return /* @__PURE__ */ c("div", {
1378
- style: {
1379
- fontFamily: or,
1380
- position: "fixed",
1381
- top: 0,
1382
- bottom: 0,
1383
- width: "var(--twd-sidebar-width)",
1384
- background: "var(--twd-background)",
1385
- fontSize: "var(--twd-font-size-md)",
1386
- overflowY: "auto",
1387
- boxShadow: "var(--twd-shadow)",
1388
- textAlign: "left",
1389
- zIndex: "var(--twd-z-index-sidebar)",
1390
- pointerEvents: "all",
1391
- isolation: "isolate",
1392
- ...nr[t]
1393
- },
1489
+ const z = m.length;
1490
+ return /* @__PURE__ */ d("div", {
1491
+ className: "twd-sidebar",
1492
+ style: or[t],
1394
1493
  "data-testid": "twd-sidebar",
1395
1494
  role: "complementary",
1396
1495
  "aria-label": "Test While Developing sidebar",
1397
1496
  children: [
1398
- /* @__PURE__ */ c("div", {
1497
+ /* @__PURE__ */ d("div", {
1399
1498
  "aria-live": "polite",
1400
1499
  "aria-atomic": "true",
1401
1500
  style: {
@@ -1408,142 +1507,92 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1408
1507
  overflow: "hidden",
1409
1508
  clip: "rect(0 0 0 0)"
1410
1509
  },
1411
- children: d
1510
+ children: c
1412
1511
  }),
1413
- /* @__PURE__ */ c("div", {
1512
+ /* @__PURE__ */ d("div", {
1414
1513
  "data-testid": "twd-sidebar-header",
1415
- style: {
1416
- padding: "var(--twd-spacing-md)",
1417
- background: "var(--twd-background)",
1418
- position: "sticky",
1419
- top: 0,
1420
- zIndex: "var(--twd-z-index-sticky)",
1421
- borderBottom: "1px solid var(--twd-border)"
1422
- },
1514
+ className: "twd-sidebar-header",
1423
1515
  children: [
1424
- /* @__PURE__ */ c("div", {
1425
- style: {
1426
- display: "flex",
1427
- justifyContent: "space-between",
1428
- alignItems: "center",
1429
- marginBottom: "var(--twd-spacing-xl)"
1430
- },
1431
- children: [/* @__PURE__ */ c("div", {
1432
- style: {
1433
- display: "flex",
1434
- gap: "var(--twd-spacing-xs)"
1435
- },
1516
+ /* @__PURE__ */ d("div", {
1517
+ className: "twd-sidebar-header-row",
1518
+ children: [/* @__PURE__ */ d("div", {
1519
+ className: "twd-sidebar-header-buttons",
1436
1520
  children: [
1437
- /* @__PURE__ */ c("button", {
1438
- onClick: $,
1439
- style: {
1440
- background: "var(--twd-button-primary)",
1441
- color: "var(--twd-button-primary-text)",
1442
- padding: "var(--twd-spacing-xs) var(--twd-spacing-md)",
1443
- borderRadius: "var(--twd-border-radius)",
1444
- border: "none",
1445
- cursor: "pointer"
1446
- },
1447
- children: /* @__PURE__ */ c("span", {
1521
+ /* @__PURE__ */ d("button", {
1522
+ onClick: R,
1523
+ className: "twd-btn twd-btn-primary",
1524
+ children: /* @__PURE__ */ d("span", {
1448
1525
  "aria-live": "polite",
1449
1526
  children: a ? "Run Filtered" : "Run All"
1450
1527
  })
1451
1528
  }),
1452
- /* @__PURE__ */ c("button", {
1529
+ /* @__PURE__ */ d("button", {
1453
1530
  onClick: () => {
1454
- qt(), Gt();
1531
+ Jt(), Qt();
1455
1532
  },
1456
1533
  "aria-label": "Clear all mocks",
1457
- style: {
1458
- background: "var(--twd-button-secondary)",
1459
- color: "var(--twd-button-secondary-text)",
1460
- padding: "var(--twd-spacing-xs) var(--twd-spacing-md)",
1461
- borderRadius: "var(--twd-border-radius)",
1462
- border: "1px solid var(--twd-button-border)",
1463
- cursor: "pointer"
1464
- },
1534
+ className: "twd-btn twd-btn-secondary",
1465
1535
  children: "Clear mocks"
1466
1536
  }),
1467
- /* @__PURE__ */ c("span", {
1468
- style: {
1469
- color: "var(--twd-text-secondary)",
1470
- fontSize: "var(--twd-font-size-sm)",
1471
- alignSelf: "center"
1472
- },
1473
- children: ["v", me]
1537
+ /* @__PURE__ */ d("span", {
1538
+ className: "twd-sidebar-version",
1539
+ children: ["v", we]
1474
1540
  })
1475
1541
  ]
1476
- }), /* @__PURE__ */ c("button", {
1542
+ }), /* @__PURE__ */ d("button", {
1477
1543
  "aria-label": "Close sidebar",
1478
- style: {
1479
- background: "transparent",
1480
- border: "none",
1481
- cursor: "pointer",
1482
- fontSize: "var(--twd-font-size-md)",
1483
- paddingRight: "0",
1484
- paddingLeft: "0"
1485
- },
1486
- onClick: () => _(!1),
1544
+ className: "twd-btn twd-btn-icon",
1545
+ onClick: () => p(!1),
1487
1546
  children: "✖"
1488
1547
  })]
1489
1548
  }),
1490
- /* @__PURE__ */ c("div", {
1491
- style: {
1492
- display: "flex",
1493
- justifyContent: "space-between",
1494
- alignItems: "center",
1495
- fontSize: "var(--twd-font-size-md)",
1496
- color: "var(--twd-text-secondary)",
1497
- marginBottom: "10px"
1498
- },
1499
- children: [/* @__PURE__ */ c("span", {
1549
+ /* @__PURE__ */ d("div", {
1550
+ className: "twd-sidebar-stats",
1551
+ children: [/* @__PURE__ */ d("span", {
1500
1552
  style: { color: "var(--twd-text)" },
1501
1553
  children: ["Total: ", z]
1502
- }), /* @__PURE__ */ c("div", {
1503
- style: {
1504
- display: "flex",
1505
- gap: "var(--twd-spacing-xs)"
1506
- },
1507
- children: [/* @__PURE__ */ c("span", {
1554
+ }), /* @__PURE__ */ d("div", {
1555
+ className: "twd-sidebar-stats-counts",
1556
+ children: [/* @__PURE__ */ d("span", {
1508
1557
  style: { color: "var(--twd-success)" },
1509
- children: ["✓ ", g.filter((h) => h.status === "pass").length]
1510
- }), /* @__PURE__ */ c("span", {
1558
+ children: ["✓ ", m.filter((h) => h.status === "pass").length]
1559
+ }), /* @__PURE__ */ d("span", {
1511
1560
  style: { color: "var(--twd-error)" },
1512
- children: ["✗ ", g.filter((h) => h.status === "fail").length]
1561
+ children: ["✗ ", m.filter((h) => h.status === "fail").length]
1513
1562
  })]
1514
1563
  })]
1515
1564
  }),
1516
- /* @__PURE__ */ c(Jt, {}),
1517
- r && /* @__PURE__ */ c(er, {
1565
+ /* @__PURE__ */ d(Xt, {}),
1566
+ r && /* @__PURE__ */ d(rr, {
1518
1567
  value: a,
1519
1568
  onChange: f
1520
1569
  })
1521
1570
  ]
1522
1571
  }),
1523
- /* @__PURE__ */ c("div", {
1524
- style: { padding: "var(--twd-spacing-md)" },
1525
- children: /* @__PURE__ */ c(Mt, {
1572
+ /* @__PURE__ */ d("div", {
1573
+ className: "twd-sidebar-content",
1574
+ children: /* @__PURE__ */ d(Lt, {
1526
1575
  roots: k,
1527
- runTest: I,
1576
+ runTest: N,
1528
1577
  searchQuery: a
1529
1578
  })
1530
1579
  })
1531
1580
  ]
1532
1581
  });
1533
- }, lr = (e) => ({ render: (t) => {
1534
- ut(t, e);
1535
- } }), dr = (e, t) => {
1536
- const { open: r = !0, position: n = "left", serviceWorker: o = !0, serviceWorkerUrl: s = "/mock-sw.js", theme: l, search: d } = t || {};
1537
- gt(e, /* @__PURE__ */ c(ar, {
1582
+ }, dr = (e) => ({ render: (t) => {
1583
+ _t(t, e);
1584
+ } }), cr = (e, t) => {
1585
+ const { open: r = !0, position: n = "left", serviceWorker: s = !0, serviceWorkerUrl: o = "/mock-sw.js", theme: l, search: c } = t || {};
1586
+ wt(e, /* @__PURE__ */ d(lr, {
1538
1587
  open: r,
1539
1588
  position: n,
1540
- ...d !== void 0 && { search: d }
1541
- }), lr, l), o && jt(s).then(() => {
1589
+ ...c !== void 0 && { search: c }
1590
+ }), dr, l), s && qt(o).then(() => {
1542
1591
  console.log("Request mocking initialized");
1543
1592
  }).catch((u) => {
1544
1593
  console.error("Error initializing request mocking:", u);
1545
1594
  });
1546
1595
  };
1547
1596
  export {
1548
- dr as initTWD
1597
+ cr as initTWD
1549
1598
  };