twd-js 1.6.3 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
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;
1
+ var oe, y, Pe, st, M, Se, Fe, Oe, de, G, O, je, ge, _e, pe, it, ee = {}, te = [], at = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, se = Array.isArray;
2
2
  function A(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 ve(e) {
7
7
  e && e.parentNode && e.parentNode.removeChild(e);
8
8
  }
9
- function st(e, t, r) {
9
+ function lt(e, t, r) {
10
10
  var n, o, s, l = {};
11
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);
12
+ if (arguments.length > 2 && (l.children = arguments.length > 3 ? oe.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 Q(e, l, n, o, null);
14
14
  }
15
- function G(e, t, r, n, o) {
15
+ function Q(e, t, r, n, o) {
16
16
  var s = {
17
17
  type: e,
18
18
  props: t,
@@ -24,16 +24,16 @@ 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: o ?? ++Pe,
28
28
  __i: -1,
29
29
  __u: 0
30
30
  };
31
31
  return o == null && y.vnode != null && y.vnode(s), s;
32
32
  }
33
- function V(e) {
33
+ function J(e) {
34
34
  return e.children;
35
35
  }
36
- function K(e, t) {
36
+ function Y(e, t) {
37
37
  this.props = e, this.context = t;
38
38
  }
39
39
  function H(e, t) {
@@ -41,42 +41,42 @@ function H(e, t) {
41
41
  for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
42
42
  return typeof e.type == "function" ? H(e) : null;
43
43
  }
44
- function it(e) {
44
+ function dt(e) {
45
45
  if (e.__P && e.__d) {
46
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);
47
+ s.__v = t.__v + 1, y.vnode && y.vnode(s), me(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, Je(n, s, o), t.__e = t.__ = null, s.__e != r && Ue(s);
48
48
  }
49
49
  }
50
- function Fe(e) {
50
+ function Ue(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
+ }), Ue(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 xe(e) {
56
+ (!e.__d && (e.__d = !0) && M.push(e) && !re.__r++ || Se != y.debounceRendering) && ((Se = y.debounceRendering) || Fe)(re);
57
57
  }
58
- function ee() {
58
+ function re() {
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(Oe), e = M.shift(), t = M.length, dt(e);
61
61
  } finally {
62
- M.length = ee.__r = 0;
62
+ M.length = re.__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 qe(e, t, r, n, o, s, l, d, u, a, f) {
66
+ var i, _, p, w, C, k, g, v = n && n.__k || te, $ = t.length;
67
+ for (u = ct(r, t, v, u, $), i = 0; i < $; i++) (p = r.__k[i]) != null && (_ = p.__i != -1 && v[p.__i] || ee, p.__i = i, k = me(e, p, _, o, s, l, d, u, a, f), w = p.__e, p.ref && _.ref != p.ref && (_.ref && ye(_.ref, null, p), f.push(p.ref, p.__c || w, p)), C == null && w != null && (C = w), (g = !!(4 & p.__u)) || _.__k === p.__k ? (u = Ve(p, u, e, g), g && _.__e && (_.__e = null)) : typeof p.type == "function" && k !== void 0 ? u = k : w && (u = w.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 ct(e, t, r, n, o) {
71
+ var s, l, d, u, a, f = r.length, i = 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] = Q(null, l, null, null, null) : se(l) ? l = e.__k[s] = Q(J, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[s] = Q(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[s] = l, u = s + _, l.__ = e, l.__b = e.__b + 1, d = null, (a = l.__i = ut(l, r, u, i)) != -1 && (i--, (d = r[a]) && (d.__u |= 2)), d == null || d.__v == null ? (a == -1 && (o > f ? _-- : o < f && _++), typeof l.type != "function" && (l.__u |= 4)) : a != u && (a == u - 1 ? _-- : a == u + 1 ? _++ : (a > u ? _-- : _++, l.__u |= 4))) : e.__k[s] = null;
73
+ if (i) for (s = 0; s < f; s++) (d = r[s]) != null && (2 & d.__u) == 0 && (d.__e == n && (n = H(d)), Xe(d, d));
74
74
  return n;
75
75
  }
76
- function je(e, t, r, n) {
76
+ function Ve(e, t, r, n) {
77
77
  var o, s;
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 (o = e.__k, s = 0; o && s < o.length; s++) o[s] && (o[s].__ = e, t = Ve(o[s], t, r, n));
80
80
  return t;
81
81
  }
82
82
  e.__e != t && (n && (t && e.type && !t.parentNode && (t = H(e)), r.insertBefore(e.__e, t || null)), t = e.__e);
@@ -85,25 +85,25 @@ function je(e, t, r, n) {
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)) {
88
+ function ut(e, t, r, n) {
89
+ var o, s, l, d = e.key, u = e.type, a = t[r], f = a != null && (2 & a.__u) == 0;
90
+ if (a === null && d == null || f && d == a.key && u == a.type) return r;
91
+ if (n > (f ? 1 : 0)) {
92
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;
93
93
  }
94
94
  return -1;
95
95
  }
96
- function ke(e, t, r) {
97
- t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || ot.test(t) ? r : r + "px";
96
+ function Te(e, t, r) {
97
+ t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || at.test(t) ? r : r + "px";
98
98
  }
99
- function J(e, t, r, n, o) {
99
+ function K(e, t, r, n, o) {
100
100
  var s, 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 || Te(e.style, t, "");
104
+ if (r) for (t in r) n && r[t] == n[t] || Te(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") s = t != (t = t.replace(je, "$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[O] = n[O] : (r[O] = ge, e.addEventListener(t, s ? pe : _e, s)) : e.removeEventListener(t, s ? pe : _e, s);
107
107
  else {
108
108
  if (o == "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 {
@@ -114,57 +114,57 @@ function J(e, t, r, n, o) {
114
114
  typeof r == "function" || (r == null || r === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && r == 1 ? "" : r));
115
115
  }
116
116
  }
117
- function Se(e) {
117
+ function Re(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;
121
+ if (t[G] == null) t[G] = ge++;
122
+ else if (t[G] < r[O]) return;
123
123
  return r(y.event ? y.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 me(e, t, r, n, o, s, l, d, u, a) {
128
+ var f, i, _, p, w, C, k, g, v, $, I, z, h, b, R, 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), s = [d = t.__e = r.__e]), (f = y.__b) && f(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, v = E.prototype && E.prototype.render, $ = (f = E.contextType) && n[f.__c], I = f ? $ ? $.props.value : f.__ : n, r.__c ? k = (i = t.__c = r.__c).__ = i.__E : (v ? t.__c = i = new E(g, I) : (t.__c = i = new Y(g, I), i.constructor = E, i.render = pt), $ && $.sub(i), i.state || (i.state = {}), i.__n = n, _ = i.__d = !0, i.__h = [], i._sb = []), v && i.__s == null && (i.__s = i.state), v && E.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = A({}, i.__s)), A(i.__s, E.getDerivedStateFromProps(g, i.__s))), p = i.props, w = i.state, i.__v = t, _) v && E.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), v && 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) {
134
+ if (v && E.getDerivedStateFromProps == null && g !== p && i.componentWillReceiveProps != null && i.componentWillReceiveProps(g, I), t.__v == r.__v || !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(g, i.__s, I) === !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(W) {
136
136
  W && (W.__ = t);
137
- }), Z.push.apply(i.__h, i._sb), i._sb = [], i.__h.length && l.push(i);
137
+ }), te.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, I), v && i.componentDidUpdate != null && i.__h.push(function() {
141
+ i.componentDidUpdate(p, w, 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 = I, i.props = g, i.__P = e, i.__e = !1, z = y.__r, h = 0, v) i.state = i.__s, i.__d = !1, z && z(t), f = i.render(i.props, i.state, i.context), te.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), f = 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);
148
+ i.state = i.__s, i.getChildContext != null && (n = A(A({}, n), i.getChildContext())), v && !_ && i.getSnapshotBeforeUpdate != null && (C = i.getSnapshotBeforeUpdate(p, w)), b = f != null && f.type === J && f.key == null ? Ke(f.props.children) : f, d = qe(e, se(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
149
  } catch (W) {
150
150
  if (t.__v = null, u || s != null) if (W.then) {
151
151
  for (t.__u |= u ? 160 : 128; d && d.nodeType == 8 && d.nextSibling; ) d = d.nextSibling;
152
152
  s[s.indexOf(d)] = null, t.__e = d;
153
153
  } else {
154
- for (R = s.length; R--; ) fe(s[R]);
155
- ue(t);
154
+ for (R = s.length; R--; ) ve(s[R]);
155
+ fe(t);
156
156
  }
157
- else t.__e = r.__e, t.__k = r.__k, W.then || ue(t);
157
+ else t.__e = r.__e, t.__k = r.__k, W.then || fe(t);
158
158
  y.__e(W, 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 s == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : d = t.__e = _t(r.__e, t, r, n, o, s, l, u, a);
161
+ return (f = y.diffed) && f(t), 128 & t.__u ? void 0 : d;
162
162
  }
163
- function ue(e) {
164
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ue));
163
+ function fe(e) {
164
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(fe));
165
165
  }
166
- function Ue(e, t, r) {
167
- for (var n = 0; n < r.length; n++) ge(r[n], r[++n], r[++n]);
166
+ function Je(e, t, r) {
167
+ for (var n = 0; n < r.length; n++) ye(r[n], r[++n], r[++n]);
168
168
  y.__c && y.__c(t, e), e.some(function(o) {
169
169
  try {
170
170
  e = o.__h, o.__h = [], e.some(function(s) {
@@ -175,33 +175,33 @@ function Ue(e, t, r) {
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 Ke(e) {
179
+ return typeof e != "object" || e == null || e.__b > 0 ? e : se(e) ? e.map(Ke) : A({}, 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 _t(e, t, r, n, o, s, l, d, u) {
182
+ var a, f, i, _, p, w, C, k = r.props || ee, g = t.props, v = t.type;
183
+ if (v == "svg" ? o = "http://www.w3.org/2000/svg" : v == "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 ((p = s[a]) && "setAttribute" in p == !!v && (v ? p.localName == v : p.nodeType == 3)) {
185
+ e = p, s[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 (v == null) return document.createTextNode(g);
191
+ e = document.createElementNS(o, v, g.is && g), d && (y.__m && y.__m(t, s), d = !1), s = null;
192
192
  }
193
- if (g == null) k === v || d && e.data == v || (e.data = v);
193
+ if (v == null) k === g || d && 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 (s = s && oe.call(e.childNodes), !d && s != 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 || K(e, a, null, p, o);
197
+ for (a in g) p = g[a], a == "children" ? _ = p : a == "dangerouslySetInnerHTML" ? f = p : a == "value" ? w = p : a == "checked" ? C = p : d && typeof p != "function" || k[a] === p || K(e, a, p, k[a], o);
198
+ if (f) d || i && (f.__html == i.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
199
+ else if (i && (e.innerHTML = ""), qe(t.type == "template" ? e.content : e, se(_) ? _ : [_], t, r, n, v == "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--; ) ve(s[a]);
200
+ d || (a = "value", v == "progress" && w == null ? e.removeAttribute("value") : w != null && (w !== e[a] || v == "progress" && !w || v == "option" && w != k[a]) && K(e, a, w, k[a], o), a = "checked", C != null && C != e[a] && K(e, a, C, k[a], o));
201
201
  }
202
202
  return e;
203
203
  }
204
- function ge(e, t, r) {
204
+ function ye(e, t, r) {
205
205
  try {
206
206
  if (typeof e == "function") {
207
207
  var n = typeof e.__u == "function";
@@ -211,9 +211,9 @@ function ge(e, t, r) {
211
211
  y.__e(o, r);
212
212
  }
213
213
  }
214
- function Ve(e, t, r) {
214
+ function Xe(e, t, r) {
215
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) {
216
+ if (y.unmount && y.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || ye(n, null, t)), (n = e.__c) != null) {
217
217
  if (n.componentWillUnmount) try {
218
218
  n.componentWillUnmount();
219
219
  } catch (s) {
@@ -221,34 +221,34 @@ function Ve(e, t, r) {
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 (o = 0; o < n.length; o++) n[o] && Xe(n[o], t, r || typeof e.type != "function");
225
+ r || ve(e.__e), e.__c = e.__ = e.__e = void 0;
226
226
  }
227
- function ct(e, t, r) {
227
+ function pt(e, t, r) {
228
228
  return this.constructor(e, r);
229
229
  }
230
- function ut(e, t, r) {
230
+ function ft(e, t, r) {
231
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);
232
+ t == document && (t = document.documentElement), y.__ && y.__(e, t), o = (n = typeof r == "function") ? null : r && r.__k || t.__k, s = [], l = [], me(t, e = (!n && r || t).__k = lt(J, null, [e]), o || ee, ee, t.namespaceURI, !n && r ? [r] : o ? null : t.firstChild ? oe.call(t.childNodes) : null, s, !n && r ? r : o ? o.__e : t.firstChild, n, l), Je(s, e, l);
233
233
  }
234
- re = Z.slice, y = { __e: function(e, t, r, n) {
234
+ oe = te.slice, y = { __e: function(e, t, r, n) {
235
235
  for (var o, s, l; t = t.__; ) if ((o = t.__c) && !o.__) try {
236
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
237
  } catch (d) {
238
238
  e = d;
239
239
  }
240
240
  throw e;
241
- } }, He = 0, rt = function(e) {
241
+ } }, Pe = 0, st = function(e) {
242
242
  return e != null && e.constructor === void 0;
243
- }, K.prototype.setState = function(e, t) {
243
+ }, Y.prototype.setState = function(e, t) {
244
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) {
245
+ typeof e == "function" && (e = e(A({}, r), this.props)), e && A(r, e), e != null && this.__v && (t && this._sb.push(t), xe(this));
246
+ }, Y.prototype.forceUpdate = function(e) {
247
+ this.__v && (this.__e = !0, e && this.__h.push(e), xe(this));
248
+ }, Y.prototype.render = J, M = [], Fe = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Oe = 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
+ }, re.__r = 0, de = Math.random().toString(8), G = "__d" + de, O = "__a" + de, je = /(PointerCapture)$|Capture$/i, ge = 0, _e = Re(!1), pe = Re(!0), it = 0;
251
+ var ht = {
252
252
  primary: "#2563eb",
253
253
  background: "#1e293b",
254
254
  backgroundSecondary: "#182130",
@@ -296,39 +296,39 @@ var _t = {
296
296
  iconColor: "#f1f5f9",
297
297
  iconColorSecondary: "#cbd5e1"
298
298
  };
299
- function pt(e = {}) {
299
+ function gt(e = {}) {
300
300
  return Object.entries({
301
- ..._t,
301
+ ...ht,
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 vt(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 = gt(e);
311
311
  r.textContent = `
312
312
  :root {
313
313
  ${n}
314
314
  }
315
315
  `;
316
316
  }
317
- var ht = (e) => {
317
+ var mt = (e) => {
318
318
  const { Component: t, createRoot: r, theme: n } = e;
319
- ft(n);
319
+ vt(n);
320
320
  const o = document.createElement("div");
321
321
  o.setAttribute("id", "twd-sidebar-root"), document.body.appendChild(o), r(o).render(t);
322
- }, gt = async (e, t, r, n) => {
322
+ }, yt = async (e, t, r, n) => {
323
323
  for (const o in e) await e[o]();
324
- ht({
324
+ mt({
325
325
  Component: t,
326
326
  createRoot: r,
327
327
  theme: n
328
328
  });
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.__;
330
- function ve(e, t) {
331
- x.__h && x.__h(S, e, te || t), te = 0;
329
+ }, U, S, ce, Ce, ne = 0, Ge = [], x = y, $e = x.__b, Ee = x.__r, Ie = x.diffed, Ae = x.__c, Le = x.unmount, Me = x.__;
330
+ function we(e, t) {
331
+ x.__h && x.__h(S, e, ne || t), ne = 0;
332
332
  var r = S.__H || (S.__H = {
333
333
  __: [],
334
334
  __h: []
@@ -336,27 +336,27 @@ function ve(e, t) {
336
336
  return e >= r.__.length && r.__.push({}), r.__[e];
337
337
  }
338
338
  function P(e) {
339
- return te = 1, vt(Ge, e);
339
+ return ne = 1, wt(Ye, e);
340
340
  }
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) {
341
+ function wt(e, t, r) {
342
+ var n = we(U++, 2);
343
+ if (n.t = e, !n.__c && (n.__ = [r ? r(t) : Ye(void 0, t), function(d) {
344
344
  var u = n.__N ? n.__N[0] : n.__[0], a = n.t(u, d);
345
345
  u !== a && (n.__N = [a, n.__[1]], n.__c.setState({}));
346
346
  }], n.__c = S, !S.__f)) {
347
347
  var o = function(d, u, a) {
348
348
  if (!n.__c.__H) return !0;
349
- var p = n.__c.__H.__.filter(function(f) {
350
- return f.__c;
349
+ var f = n.__c.__H.__.filter(function(_) {
350
+ return _.__c;
351
351
  });
352
- if (p.every(function(f) {
353
- return !f.__N;
352
+ if (f.every(function(_) {
353
+ return !_.__N;
354
354
  })) return !s || s.call(this, d, u, a);
355
355
  var i = n.__c.props !== d;
356
- return p.some(function(f) {
357
- if (f.__N) {
358
- var _ = f.__[0];
359
- f.__ = f.__N, f.__N = void 0, _ !== f.__[0] && (i = !0);
356
+ return f.some(function(_) {
357
+ if (_.__N) {
358
+ var p = _.__[0];
359
+ _.__ = _.__N, _.__N = void 0, p !== _.__[0] && (i = !0);
360
360
  }
361
361
  }), s && s.call(this, d, u, a) || i;
362
362
  };
@@ -364,100 +364,100 @@ function vt(e, t, r) {
364
364
  var s = S.shouldComponentUpdate, l = S.componentWillUpdate;
365
365
  S.componentWillUpdate = function(d, u, a) {
366
366
  if (this.__e) {
367
- var p = s;
368
- s = void 0, o(d, u, a), s = p;
367
+ var f = s;
368
+ s = void 0, o(d, u, a), s = f;
369
369
  }
370
370
  l && l.call(this, d, u, a);
371
371
  }, S.shouldComponentUpdate = o;
372
372
  }
373
373
  return n.__N || n.__;
374
374
  }
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));
375
+ function ie(e, t) {
376
+ var r = we(U++, 3);
377
+ !x.__s && Qe(r.__H, t) && (r.__ = e, r.u = t, S.__H.__h.push(r));
378
378
  }
379
- function O(e) {
380
- return te = 5, N(function() {
379
+ function j(e) {
380
+ return ne = 5, N(function() {
381
381
  return { current: e };
382
382
  }, []);
383
383
  }
384
384
  function N(e, t) {
385
- var r = ve(j++, 7);
386
- return Xe(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
385
+ var r = we(U++, 7);
386
+ return Qe(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
387
387
  }
388
- function mt() {
389
- for (var e; e = Je.shift(); ) {
388
+ function bt() {
389
+ for (var e; e = Ge.shift(); ) {
390
390
  var t = e.__H;
391
391
  if (e.__P && t) try {
392
- t.__h.some(Y), t.__h.some(_e), t.__h = [];
392
+ t.__h.some(Z), t.__h.some(he), t.__h = [];
393
393
  } catch (r) {
394
394
  t.__h = [], x.__e(r, e.__v);
395
395
  }
396
396
  }
397
397
  }
398
398
  x.__b = function(e) {
399
- S = null, Te && Te(e);
399
+ S = null, $e && $e(e);
400
400
  }, x.__ = function(e, t) {
401
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ie && Ie(e, t);
401
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Me && Me(e, t);
402
402
  }, x.__r = function(e) {
403
- Re && Re(e), j = 0;
403
+ Ee && Ee(e), U = 0;
404
404
  var t = (S = e.__c).__H;
405
- t && (ae === S ? (t.__h = [], S.__h = [], t.__.some(function(r) {
405
+ t && (ce === S ? (t.__h = [], S.__h = [], t.__.some(function(r) {
406
406
  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;
407
+ })) : (t.__h.some(Z), t.__h.some(he), t.__h = [], U = 0)), ce = S;
408
408
  }, x.diffed = function(e) {
409
- Ce && Ce(e);
409
+ Ie && Ie(e);
410
410
  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) {
411
+ t && t.__H && (t.__H.__h.length && (Ge.push(t) !== 1 && Ce === x.requestAnimationFrame || ((Ce = x.requestAnimationFrame) || kt)(bt)), t.__H.__.some(function(r) {
412
412
  r.u && (r.__H = r.u), r.u = void 0;
413
- })), ae = S = null;
413
+ })), ce = S = null;
414
414
  }, x.__c = function(e, t) {
415
415
  t.some(function(r) {
416
416
  try {
417
- r.__h.some(Y), r.__h = r.__h.filter(function(n) {
418
- return !n.__ || _e(n);
417
+ r.__h.some(Z), r.__h = r.__h.filter(function(n) {
418
+ return !n.__ || he(n);
419
419
  });
420
420
  } catch (n) {
421
421
  t.some(function(o) {
422
422
  o.__h && (o.__h = []);
423
423
  }), t = [], x.__e(n, r.__v);
424
424
  }
425
- }), $e && $e(e, t);
425
+ }), Ae && Ae(e, t);
426
426
  }, x.unmount = function(e) {
427
- Ee && Ee(e);
427
+ Le && Le(e);
428
428
  var t, r = e.__c;
429
429
  r && r.__H && (r.__H.__.some(function(n) {
430
430
  try {
431
- Y(n);
431
+ Z(n);
432
432
  } catch (o) {
433
433
  t = o;
434
434
  }
435
435
  }), r.__H = void 0, t && x.__e(t, r.__v));
436
436
  };
437
- var Ae = typeof requestAnimationFrame == "function";
438
- function yt(e) {
437
+ var ze = typeof requestAnimationFrame == "function";
438
+ function kt(e) {
439
439
  var t, r = function() {
440
- clearTimeout(n), Ae && cancelAnimationFrame(t), setTimeout(e);
440
+ clearTimeout(n), ze && cancelAnimationFrame(t), setTimeout(e);
441
441
  }, n = setTimeout(r, 35);
442
- Ae && (t = requestAnimationFrame(r));
442
+ ze && (t = requestAnimationFrame(r));
443
443
  }
444
- function Y(e) {
444
+ function Z(e) {
445
445
  var t = S, r = e.__c;
446
446
  typeof r == "function" && (e.__c = void 0, r()), S = t;
447
447
  }
448
- function _e(e) {
448
+ function he(e) {
449
449
  var t = S;
450
450
  e.__c = e.__(), S = t;
451
451
  }
452
- function Xe(e, t) {
452
+ function Qe(e, t) {
453
453
  return !e || e.length !== t.length || t.some(function(r, n) {
454
454
  return r !== e[n];
455
455
  });
456
456
  }
457
- function Ge(e, t) {
457
+ function Ye(e, t) {
458
458
  return typeof t == "function" ? t(e) : t;
459
459
  }
460
- var wt = 0;
460
+ var St = 0;
461
461
  function c(e, t, r, n, o, s) {
462
462
  t || (t = {});
463
463
  var l, d, u = t;
@@ -473,7 +473,7 @@ function c(e, t, r, n, o, s) {
473
473
  __e: null,
474
474
  __c: null,
475
475
  constructor: void 0,
476
- __v: --wt,
476
+ __v: --St,
477
477
  __i: -1,
478
478
  __u: 0,
479
479
  __source: o,
@@ -482,7 +482,7 @@ function c(e, t, r, n, o, s) {
482
482
  if (typeof e == "function" && (l = e.defaultProps)) for (d in l) u[d] === void 0 && (u[d] = l[d]);
483
483
  return y.vnode && y.vnode(a), a;
484
484
  }
485
- var bt = { animation: "spin 1s linear infinite" }, kt = () => /* @__PURE__ */ c("svg", {
485
+ var xt = { animation: "spin 1s linear infinite" }, Tt = () => /* @__PURE__ */ c("svg", {
486
486
  xmlns: "http://www.w3.org/2000/svg",
487
487
  width: "24",
488
488
  height: "24",
@@ -493,7 +493,7 @@ var bt = { animation: "spin 1s linear infinite" }, kt = () => /* @__PURE__ */ c(
493
493
  strokeLinecap: "round",
494
494
  strokeLinejoin: "round",
495
495
  className: "lucide lucide-loader-circle-icon lucide-loader-circle",
496
- style: bt,
496
+ style: xt,
497
497
  "data-testid": "loader-icon",
498
498
  children: /* @__PURE__ */ c("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
499
499
  }), X = document.createElement("style");
@@ -503,7 +503,7 @@ X && !document.getElementById("loader-spin-keyframes") && (X.id = "loader-spin-k
503
503
  100% { transform: rotate(360deg); }
504
504
  }
505
505
  `, document.head.appendChild(X));
506
- var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("svg", {
506
+ var ae = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("svg", {
507
507
  xmlns: "http://www.w3.org/2000/svg",
508
508
  width: "16",
509
509
  height: "16",
@@ -516,11 +516,11 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
516
516
  className: `lucide ${e}`,
517
517
  "data-testid": r,
518
518
  children: t
519
- }), St = () => /* @__PURE__ */ c(se, {
519
+ }), Rt = () => /* @__PURE__ */ c(ae, {
520
520
  className: "lucide-play-icon lucide-play",
521
521
  dataTestId: "play-icon",
522
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: [
523
+ }), Ze = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ c(J, { children: [
524
524
  t,
525
525
  " ",
526
526
  n && /* @__PURE__ */ c("span", {
@@ -535,14 +535,14 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
535
535
  })
536
536
  ] }), L = /* @__PURE__ */ (function(e) {
537
537
  return e.CHAI_DIFF = "chai-diff", e.CHAI_MESSAGE = "chai-message", e.ERROR = "error", e;
538
- })({}), xt = (e) => {
538
+ })({}), Ct = (e) => {
539
539
  try {
540
540
  const t = JSON.parse(e);
541
541
  if (t && typeof t == "object" && "type" in t) return t;
542
542
  } catch {
543
543
  }
544
544
  return null;
545
- }, Le = (e) => {
545
+ }, Ne = (e) => {
546
546
  if (e === null) return "null";
547
547
  if (e === void 0) return "undefined";
548
548
  if (typeof e == "string") return e;
@@ -552,14 +552,14 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
552
552
  return String(e);
553
553
  }
554
554
  return String(e);
555
- }, Tt = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? {
555
+ }, $t = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? {
556
556
  color: "var(--twd-success)",
557
557
  fontWeight: "var(--twd-font-weight-bold)"
558
558
  } : e.startsWith("Test failed") ? {
559
559
  color: "var(--twd-error)",
560
560
  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);
561
+ } : {}, Et = (e) => e.type === L.CHAI_MESSAGE || e.type === L.ERROR, It = (e, t) => t && Et(t) ? t.message : e, At = ({ log: e, index: t }) => {
562
+ const r = Ct(e);
563
563
  if (r?.type === L.CHAI_DIFF) return /* @__PURE__ */ c("li", {
564
564
  style: {
565
565
  fontSize: "var(--twd-font-size-sm)",
@@ -600,7 +600,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
600
600
  whiteSpace: "pre-wrap",
601
601
  wordBreak: "break-word"
602
602
  },
603
- children: Le(r.expected)
603
+ children: Ne(r.expected)
604
604
  })]
605
605
  }),
606
606
  /* @__PURE__ */ c("div", {
@@ -627,19 +627,19 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
627
627
  whiteSpace: "pre-wrap",
628
628
  wordBreak: "break-word"
629
629
  },
630
- children: Le(r.actual)
630
+ children: Ne(r.actual)
631
631
  })]
632
632
  })
633
633
  ]
634
634
  }, t);
635
- const n = Ct(e, r);
635
+ const n = It(e, r);
636
636
  return /* @__PURE__ */ c("li", {
637
637
  style: {
638
638
  fontSize: "var(--twd-font-size-sm)",
639
639
  padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
640
640
  borderBottom: "1px solid var(--twd-border-light)",
641
641
  color: "var(--twd-text)",
642
- ...Tt(n)
642
+ ...$t(n)
643
643
  },
644
644
  children: n
645
645
  }, t);
@@ -682,7 +682,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
682
682
  marginTop: "var(--twd-spacing-xs)",
683
683
  textAlign: "left"
684
684
  }
685
- }, Et = (e) => {
685
+ }, Lt = (e) => {
686
686
  switch (e.status) {
687
687
  case "pass":
688
688
  return {
@@ -701,20 +701,20 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
701
701
  default:
702
702
  return { item: { background: "transparent" } };
703
703
  }
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(() => ({
704
+ }, Mt = ({ node: e, depth: t, id: r, runTest: n }) => {
705
+ const o = j(null), s = j(e.status), l = j(e.logs?.length || 0), d = N(() => Lt(e), [e.status]), u = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name, a = N(() => ({
706
706
  ...D.container,
707
707
  marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
708
708
  ...d.container || {}
709
- }), [t, d]), p = N(() => ({
709
+ }), [t, d]), f = N(() => ({
710
710
  ...D.item,
711
711
  ...d.item,
712
712
  ...u && { border: "1px dashed var(--twd-border)" }
713
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;
714
+ ie(() => {
715
+ const _ = o.current;
716
+ !_ || !e.logs || e.logs.length === 0 || ((s.current === "running" && (e.status === "pass" || e.status === "fail") || e.logs.length > l.current) && setTimeout(() => {
717
+ _.scrollTop = _.scrollHeight;
718
718
  }, 0), s.current = e.status, l.current = e.logs.length);
719
719
  }, [e.status, e.logs]);
720
720
  const i = () => {
@@ -738,10 +738,10 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
738
738
  role: "listitem",
739
739
  "aria-label": `Test ${e.name}, status: ${i()}`,
740
740
  children: [/* @__PURE__ */ c("div", {
741
- style: p,
741
+ style: f,
742
742
  children: [/* @__PURE__ */ c("span", {
743
743
  style: D.nameSpan,
744
- children: /* @__PURE__ */ c(Ke, {
744
+ children: /* @__PURE__ */ c(Ze, {
745
745
  id: r,
746
746
  name: e.name,
747
747
  skip: e.skip,
@@ -753,60 +753,60 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
753
753
  style: D.button,
754
754
  disabled: e.status === "running",
755
755
  "data-testid": `run-test-button-${r}`,
756
- children: e.status === "running" ? /* @__PURE__ */ c(kt, {}) : /* @__PURE__ */ c(St, {})
756
+ children: e.status === "running" ? /* @__PURE__ */ c(Tt, {}) : /* @__PURE__ */ c(Rt, {})
757
757
  })]
758
758
  }), e.logs && e.logs.length > 0 && /* @__PURE__ */ c("ul", {
759
759
  ref: o,
760
760
  style: D.logsList,
761
- children: e.logs.map((f, _) => /* @__PURE__ */ c($t, {
762
- log: f,
763
- index: _
764
- }, _))
761
+ children: e.logs.map((_, p) => /* @__PURE__ */ c(At, {
762
+ log: _,
763
+ index: p
764
+ }, p))
765
765
  })]
766
766
  }, e.name);
767
- }, At = () => /* @__PURE__ */ c(se, {
767
+ }, zt = () => /* @__PURE__ */ c(ae, {
768
768
  className: "lucide-chevron-down-icon lucide-chevron-down",
769
769
  dataTestId: "chevron-down-icon",
770
770
  children: /* @__PURE__ */ c("path", { d: "m6 9 6 6 6-6" })
771
- }), Lt = () => /* @__PURE__ */ c(se, {
771
+ }), Nt = () => /* @__PURE__ */ c(ae, {
772
772
  className: "lucide-chevron-right-icon lucide-chevron-right",
773
773
  dataTestId: "chevron-right-icon",
774
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]
775
+ }), Wt = ({ roots: e, runTest: t, searchQuery: r = "" }) => {
776
+ const [n, o] = P({}), s = j(null), l = j(!1), d = (a) => o((f) => ({
777
+ ...f,
778
+ [a]: !f[a]
779
779
  }));
780
- oe(() => {
780
+ ie(() => {
781
781
  if (l.current) return;
782
782
  const a = sessionStorage.getItem("twd-last-run-test-name");
783
783
  if (!a) return;
784
- const p = setTimeout(() => {
784
+ const f = setTimeout(() => {
785
785
  const i = document.querySelector(`[data-test-name="${a}"]`);
786
786
  if (i) {
787
- const f = s.current?.closest('[data-testid="twd-sidebar"]');
788
- 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;
790
- f.scrollTo({
791
- top: k - g,
787
+ const _ = s.current?.closest('[data-testid="twd-sidebar"]');
788
+ if (_) {
789
+ const p = i.getBoundingClientRect(), w = _.getBoundingClientRect(), C = _.scrollTop, k = p.top - w.top + C, g = _.querySelector('[data-testid="twd-sidebar-header"]'), v = g ? g.getBoundingClientRect().height + 16 : 150;
790
+ _.scrollTo({
791
+ top: k - v,
792
792
  behavior: "smooth"
793
793
  });
794
794
  }
795
795
  l.current = !0;
796
796
  }
797
797
  }, 100);
798
- return () => clearTimeout(p);
798
+ return () => clearTimeout(f);
799
799
  }, []);
800
- const u = (a, p = 0) => {
801
- if (a.type === "test") return /* @__PURE__ */ c(It, {
800
+ const u = (a, f = 0) => {
801
+ if (a.type === "test") return /* @__PURE__ */ c(Mt, {
802
802
  node: a,
803
- depth: p,
803
+ depth: f,
804
804
  id: a.id,
805
805
  runTest: () => t(a.id)
806
806
  }, a.id);
807
807
  const i = n[a.id];
808
808
  return /* @__PURE__ */ c("li", {
809
- style: { marginLeft: `calc(${p} * var(--twd-spacing-lg))` },
809
+ style: { marginLeft: `calc(${f} * var(--twd-spacing-lg))` },
810
810
  children: [/* @__PURE__ */ c("div", {
811
811
  style: {
812
812
  background: "var(--twd-describe-bg)",
@@ -834,12 +834,12 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
834
834
  "aria-expanded": !i,
835
835
  "aria-label": `${i ? "Expand" : "Collapse"} test suite ${a.name}`,
836
836
  onClick: () => d(a.id),
837
- children: [/* @__PURE__ */ c(Ke, {
837
+ children: [/* @__PURE__ */ c(Ze, {
838
838
  id: a.id,
839
839
  name: a.name,
840
840
  skip: a.skip,
841
841
  only: a.only
842
- }), i ? /* @__PURE__ */ c(Lt, {}) : /* @__PURE__ */ c(At, {})]
842
+ }), i ? /* @__PURE__ */ c(Nt, {}) : /* @__PURE__ */ c(zt, {})]
843
843
  })
844
844
  }), !i && a.childrenNodes && a.childrenNodes.length > 0 && /* @__PURE__ */ c("ul", {
845
845
  style: {
@@ -847,7 +847,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
847
847
  padding: 0,
848
848
  margin: 0
849
849
  },
850
- children: a.childrenNodes.map((f) => u(f, p + 1))
850
+ children: a.childrenNodes.map((_) => u(_, f + 1))
851
851
  })]
852
852
  }, a.id);
853
853
  };
@@ -874,7 +874,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
874
874
  ]
875
875
  }) : e.map((a) => u(a))
876
876
  });
877
- }, zt = {
877
+ }, Ht = {
878
878
  left: {
879
879
  left: 0,
880
880
  borderTopRightRadius: "var(--twd-border-radius-lg)",
@@ -889,7 +889,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
889
889
  borderTopRightRadius: "0",
890
890
  borderBottomRightRadius: "0"
891
891
  }
892
- }, Nt = ({ setOpen: e, position: t }) => /* @__PURE__ */ c("button", {
892
+ }, Bt = ({ setOpen: e, position: t }) => /* @__PURE__ */ c("button", {
893
893
  "aria-label": "Open TWD sidebar",
894
894
  style: {
895
895
  position: "fixed",
@@ -901,49 +901,49 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
901
901
  padding: "var(--twd-spacing-sm) 10px",
902
902
  cursor: "pointer",
903
903
  fontSize: "var(--twd-font-size-sm)",
904
- ...zt[t]
904
+ ...Ht[t]
905
905
  },
906
906
  onClick: () => e(!0),
907
907
  children: "TWD"
908
- }), Wt = ({ isOpen: e, position: t }) => {
909
- oe(() => {
908
+ }), Dt = ({ isOpen: e, position: t }) => {
909
+ ie(() => {
910
910
  const r = document.documentElement, n = getComputedStyle(document.documentElement).getPropertyValue("--twd-sidebar-width") || "280px";
911
911
  return e ? t === "left" ? r.style.marginLeft = n : r.style.marginRight = n : (r.style.marginRight = "0", r.style.marginLeft = "0"), () => {
912
912
  r.style.marginRight = "0", r.style.marginLeft = "0";
913
913
  };
914
914
  }, [e, t]);
915
915
  };
916
- function U(e) {
916
+ function q(e) {
917
917
  "@babel/helpers - typeof";
918
- return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
918
+ return q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
919
919
  return typeof t;
920
920
  } : function(t) {
921
921
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
922
- }, U(e);
922
+ }, q(e);
923
923
  }
924
- function Ht(e, t) {
925
- if (U(e) != "object" || !e) return e;
924
+ function Pt(e, t) {
925
+ if (q(e) != "object" || !e) return e;
926
926
  var r = e[Symbol.toPrimitive];
927
927
  if (r !== void 0) {
928
928
  var n = r.call(e, t || "default");
929
- if (U(n) != "object") return n;
929
+ if (q(n) != "object") return n;
930
930
  throw new TypeError("@@toPrimitive must return a primitive value.");
931
931
  }
932
932
  return (t === "string" ? String : Number)(e);
933
933
  }
934
- function Bt(e) {
935
- var t = Ht(e, "string");
936
- return U(t) == "symbol" ? t : t + "";
934
+ function Ft(e) {
935
+ var t = Pt(e, "string");
936
+ return q(t) == "symbol" ? t : t + "";
937
937
  }
938
- function Me(e, t, r) {
939
- return (t = Bt(t)) in e ? Object.defineProperty(e, t, {
938
+ function We(e, t, r) {
939
+ return (t = Ft(t)) in e ? Object.defineProperty(e, t, {
940
940
  value: r,
941
941
  enumerable: !0,
942
942
  configurable: !0,
943
943
  writable: !0
944
944
  }) : e[t] = r, e;
945
945
  }
946
- var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
946
+ var Ot = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
947
947
  handlers: /* @__PURE__ */ new Map(),
948
948
  beforeEachHooks: /* @__PURE__ */ new Map(),
949
949
  afterEachHooks: /* @__PURE__ */ new Map(),
@@ -953,7 +953,7 @@ var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STAT
953
953
  beforeEachHooks: /* @__PURE__ */ new Map(),
954
954
  afterEachHooks: /* @__PURE__ */ new Map(),
955
955
  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) => {
956
+ }, le = Ot(), m = le.handlers, He = le.beforeEachHooks, Be = le.afterEachHooks, T = le.stack, B = () => Math.random().toString(36).slice(2, 11), et = (e, t) => {
957
957
  const r = B(), n = T.at(-1);
958
958
  m.set(r, {
959
959
  id: r,
@@ -966,7 +966,7 @@ var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STAT
966
966
  handler: t
967
967
  }), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
968
968
  };
969
- Ye.only = (e, t) => {
969
+ et.only = (e, t) => {
970
970
  const r = B(), n = T.at(-1);
971
971
  m.set(r, {
972
972
  id: r,
@@ -980,7 +980,7 @@ Ye.only = (e, t) => {
980
980
  only: !0
981
981
  }), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
982
982
  };
983
- Ye.skip = (e, t) => {
983
+ et.skip = (e, t) => {
984
984
  const r = B(), n = T.at(-1);
985
985
  m.set(r, {
986
986
  id: r,
@@ -994,7 +994,7 @@ Ye.skip = (e, t) => {
994
994
  skip: !0
995
995
  }), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
996
996
  };
997
- var Qe = (e, t) => {
997
+ var tt = (e, t) => {
998
998
  const r = B(), n = T.at(-1), o = {
999
999
  id: r,
1000
1000
  name: e,
@@ -1006,7 +1006,7 @@ var Qe = (e, t) => {
1006
1006
  };
1007
1007
  n && m.get(n).children.push(r), m.set(r, o);
1008
1008
  };
1009
- Qe.only = (e, t) => {
1009
+ tt.only = (e, t) => {
1010
1010
  const r = B(), n = T.at(-1), o = {
1011
1011
  id: r,
1012
1012
  name: e,
@@ -1019,7 +1019,7 @@ Qe.only = (e, t) => {
1019
1019
  };
1020
1020
  n && m.get(n).children.push(r), m.set(r, o);
1021
1021
  };
1022
- Qe.skip = (e, t) => {
1022
+ tt.skip = (e, t) => {
1023
1023
  const r = B(), n = T.at(-1), o = {
1024
1024
  id: r,
1025
1025
  name: e,
@@ -1033,11 +1033,11 @@ Qe.skip = (e, t) => {
1033
1033
  };
1034
1034
  n && m.get(n).children.push(r), m.set(r, o);
1035
1035
  };
1036
- var Pt = (e) => {
1036
+ var jt = (e) => {
1037
1037
  const t = [], r = [];
1038
1038
  let n = e;
1039
1039
  for (; n; )
1040
- ze.has(n) && t.unshift(...ze.get(n)), Ne.has(n) && r.push(...Ne.get(n)), n = m.get(n)?.parent;
1040
+ He.has(n) && t.unshift(...He.get(n)), Be.has(n) && r.push(...Be.get(n)), n = m.get(n)?.parent;
1041
1041
  return {
1042
1042
  before: t,
1043
1043
  after: r
@@ -1045,7 +1045,7 @@ var Pt = (e) => {
1045
1045
  }, F = (e) => {
1046
1046
  const t = m.get(e);
1047
1047
  return t ? t.only ? !0 : t.children ? t.children.some((r) => F(r)) : !1 : !1;
1048
- }, Ft = (e) => {
1048
+ }, Ut = (e) => {
1049
1049
  let t = m.get(e);
1050
1050
  for (; t?.parent; ) {
1051
1051
  const r = m.get(t.parent);
@@ -1053,7 +1053,7 @@ var Pt = (e) => {
1053
1053
  t = r;
1054
1054
  }
1055
1055
  return !1;
1056
- }, le = (e) => {
1056
+ }, ue = (e) => {
1057
1057
  let t = m.get(e);
1058
1058
  for (; t; ) {
1059
1059
  if (t.skip) return !0;
@@ -1061,9 +1061,9 @@ var Pt = (e) => {
1061
1061
  t = m.get(t.parent);
1062
1062
  }
1063
1063
  return !1;
1064
- }, Ze = class {
1064
+ }, rt = class {
1065
1065
  constructor(e, t) {
1066
- Me(this, "events", void 0), Me(this, "retryCount", void 0), this.events = e, this.retryCount = t?.retryCount ?? 1;
1066
+ We(this, "events", void 0), We(this, "retryCount", void 0), this.events = e, this.retryCount = t?.retryCount ?? 1;
1067
1067
  }
1068
1068
  async runAll() {
1069
1069
  const e = Array.from(m.values()).filter((r) => !r.parent && r.type === "suite"), t = Array.from(m.values()).some((r) => r.only);
@@ -1081,7 +1081,7 @@ var Pt = (e) => {
1081
1081
  }
1082
1082
  async runSuiteByIds(e, t, r) {
1083
1083
  if (!this.hasDescendantInSet(e, t)) return;
1084
- if (le(e.id) && !F(e.id)) {
1084
+ if (ue(e.id) && !F(e.id)) {
1085
1085
  this.events.onSkip?.(e);
1086
1086
  return;
1087
1087
  }
@@ -1098,7 +1098,7 @@ var Pt = (e) => {
1098
1098
  }) : !1;
1099
1099
  }
1100
1100
  async runSuite(e, t) {
1101
- if (le(e.id) && !F(e.id)) {
1101
+ if (ue(e.id) && !F(e.id)) {
1102
1102
  this.events.onSkip?.(e);
1103
1103
  return;
1104
1104
  }
@@ -1109,17 +1109,17 @@ var Pt = (e) => {
1109
1109
  this.events.onSuiteEnd?.(e);
1110
1110
  }
1111
1111
  async runTest(e, t) {
1112
- if ((le(e.id) || e.skip) && !e.only) {
1112
+ if ((ue(e.id) || e.skip) && !e.only) {
1113
1113
  this.events.onSkip(e);
1114
1114
  return;
1115
1115
  }
1116
- const r = Ft(e.id);
1116
+ const r = Ut(e.id);
1117
1117
  if (t && !e.only && !r) {
1118
1118
  this.events.onSkip(e);
1119
1119
  return;
1120
1120
  }
1121
1121
  this.events.onStart?.(e);
1122
- const n = Pt(e.parent);
1122
+ const n = jt(e.parent);
1123
1123
  let o = null;
1124
1124
  for (let s = 1; s <= this.retryCount; s++) try {
1125
1125
  for (const l of n.before) await l();
@@ -1133,33 +1133,33 @@ var Pt = (e) => {
1133
1133
  this.events.onFail(e, o);
1134
1134
  }
1135
1135
  };
1136
- window.__testRunner = Ze;
1137
- var me = "1.6.3", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
1136
+ window.__testRunner = rt;
1137
+ var be = "1.6.5", qt = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
1138
1138
  rules: [],
1139
1139
  counts: {}
1140
1140
  }), window.__TWD_MOCK_STATE__) : {
1141
1141
  rules: [],
1142
1142
  counts: {}
1143
- }, q = Ot(), ye = q.rules, We = !1, jt = async (e) => {
1144
- if (We) {
1143
+ }, V = qt(), ke = V.rules, De = !1, Vt = async (e) => {
1144
+ if (De) {
1145
1145
  console.warn("[TWD] Request mocking already initialized");
1146
1146
  return;
1147
1147
  }
1148
- "serviceWorker" in navigator && (We = !0, await navigator.serviceWorker.register(`${e ?? "/mock-sw.js"}?v=${me}`), navigator.serviceWorker.controller || await new Promise((t) => {
1148
+ "serviceWorker" in navigator && (De = !0, await navigator.serviceWorker.register(`${e ?? "/mock-sw.js"}?v=${be}`), navigator.serviceWorker.controller || await new Promise((t) => {
1149
1149
  navigator.serviceWorker.addEventListener("controllerchange", t, { once: !0 });
1150
1150
  }), navigator.serviceWorker.addEventListener("message", (t) => {
1151
1151
  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;
1152
+ const { alias: r, request: n, hitCount: o } = t.data, s = ke.find((l) => l.alias === r);
1153
+ s && (s.executed = !0, s.request = n, s.hitCount = o), V.counts[r] = o ?? (V.counts[r] ?? 0) + 1;
1154
1154
  }
1155
1155
  }));
1156
- }, Ut = () => ye, qt = () => {
1156
+ }, Jt = () => ke, Kt = () => {
1157
1157
  navigator.serviceWorker.controller?.postMessage({
1158
1158
  type: "CLEAR_RULES",
1159
- version: me
1160
- }), ye.length = 0;
1161
- for (const e in q.counts) delete q.counts[e];
1162
- }, Vt = () => /* @__PURE__ */ c(se, {
1159
+ version: be
1160
+ }), ke.length = 0;
1161
+ for (const e in V.counts) delete V.counts[e];
1162
+ }, Xt = () => /* @__PURE__ */ c(ae, {
1163
1163
  className: "lucide-wifi-pen-icon lucide-wifi-pen",
1164
1164
  dataTestId: "wifi-pen-icon",
1165
1165
  children: [
@@ -1168,8 +1168,8 @@ var me = "1.6.3", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ ||
1168
1168
  /* @__PURE__ */ c("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
1169
1169
  /* @__PURE__ */ c("path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" })
1170
1170
  ]
1171
- }), Jt = () => {
1172
- const e = Ut(), t = e.filter((n) => n.executed);
1171
+ }), Gt = () => {
1172
+ const e = Jt(), t = e.filter((n) => n.executed);
1173
1173
  return /* @__PURE__ */ c("button", {
1174
1174
  onClick: () => {
1175
1175
  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();
@@ -1193,7 +1193,7 @@ var me = "1.6.3", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ ||
1193
1193
  boxShadow: "var(--twd-shadow-sm)"
1194
1194
  },
1195
1195
  children: [
1196
- /* @__PURE__ */ c(Vt, {}),
1196
+ /* @__PURE__ */ c(Xt, {}),
1197
1197
  /* @__PURE__ */ c("span", {
1198
1198
  style: { flex: 1 },
1199
1199
  children: [
@@ -1214,11 +1214,11 @@ var me = "1.6.3", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ ||
1214
1214
  })
1215
1215
  ]
1216
1216
  });
1217
- }, Xt = /* @__PURE__ */ new Map();
1218
- function Gt() {
1219
- Xt.clear();
1217
+ }, Qt = /* @__PURE__ */ new Map();
1218
+ function Yt() {
1219
+ Qt.clear();
1220
1220
  }
1221
- var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
1221
+ var Zt = (e) => e instanceof Error && "actual" in e && "expected" in e, nt = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
1222
1222
  type: "diff",
1223
1223
  actual: e.actual,
1224
1224
  expected: e.expected,
@@ -1226,10 +1226,10 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1226
1226
  } : {
1227
1227
  type: "message",
1228
1228
  message: e.message
1229
- }, Yt = (e) => {
1230
- const t = et(e);
1229
+ }, er = (e) => {
1230
+ const t = nt(e);
1231
1231
  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) => {
1232
+ }, tr = (e) => {
1233
1233
  if (e.status === "pass") return `Test "${e.name}" passed.`;
1234
1234
  if (e.status === "fail") {
1235
1235
  if (!e.logs || e.logs.length === 0) return `Test "${e.name}" failed.`;
@@ -1242,10 +1242,10 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1242
1242
  }
1243
1243
  } else if (e.status === "skip") return `Test "${e.name}" skipped.`;
1244
1244
  return "";
1245
- }, Zt = (e) => {
1245
+ }, rr = (e) => {
1246
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
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", {
1248
+ }, nr = ({ value: e, onChange: t }) => /* @__PURE__ */ c("div", {
1249
1249
  style: {
1250
1250
  position: "relative",
1251
1251
  marginBottom: "var(--twd-spacing-md)"
@@ -1269,7 +1269,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1269
1269
  outline: "none"
1270
1270
  }
1271
1271
  })
1272
- }), tr = (e, t) => {
1272
+ }), or = (e, t) => {
1273
1273
  if (!t.trim()) return e;
1274
1274
  const r = t.toLowerCase(), n = (o) => {
1275
1275
  const s = o.name.toLowerCase().includes(r);
@@ -1281,7 +1281,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1281
1281
  } : null;
1282
1282
  };
1283
1283
  return e.map(n).filter((o) => o !== null);
1284
- }, rr = (e) => {
1284
+ }, sr = (e) => {
1285
1285
  const t = /* @__PURE__ */ new Map(), r = [];
1286
1286
  for (const n of e) t.set(n.id, {
1287
1287
  ...n,
@@ -1289,7 +1289,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1289
1289
  });
1290
1290
  for (const n of t.values()) n.parent ? t.get(n.parent)?.childrenNodes?.push(n) : r.push(n);
1291
1291
  return r;
1292
- }, nr = {
1292
+ }, ir = {
1293
1293
  left: {
1294
1294
  left: 0,
1295
1295
  borderRight: "1px solid var(--twd-border)"
@@ -1298,23 +1298,23 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1298
1298
  right: 0,
1299
1299
  borderLeft: "1px solid var(--twd-border)"
1300
1300
  }
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) => {
1301
+ }, ar = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', lr = (e) => e ? sessionStorage.getItem("twd-search-filter") || "" : (sessionStorage.removeItem("twd-search-filter"), ""), dr = (e) => sessionStorage.getItem("twd-sidebar-open") ? sessionStorage.getItem("twd-sidebar-open") === "true" : e, ot = (e) => {
1302
1302
  const t = [];
1303
1303
  for (const r of e)
1304
- r.type === "test" && t.push(r.id), r.childrenNodes && t.push(...tt(r.childrenNodes));
1304
+ r.type === "test" && t.push(r.id), r.childrenNodes && t.push(...ot(r.childrenNodes));
1305
1305
  return t;
1306
- }, ar = ({ open: e, position: t = "left", search: r }) => {
1307
- const [n, o] = P(0), [s, l] = P(ir(e));
1308
- Wt({
1306
+ }, cr = ({ open: e, position: t = "left", search: r }) => {
1307
+ const [n, o] = P(0), [s, l] = P(dr(e));
1308
+ Dt({
1309
1309
  isOpen: s,
1310
1310
  position: t
1311
1311
  });
1312
- const [d, u] = P(""), [a, p] = P(sr(r));
1313
- oe(() => {
1312
+ const [d, u] = P(""), [a, f] = P(lr(r));
1313
+ ie(() => {
1314
1314
  const h = () => o((b) => b + 1);
1315
1315
  return window.addEventListener("twd:state-change", h), () => window.removeEventListener("twd:state-change", h);
1316
1316
  }, []);
1317
- const i = new Ze({
1317
+ const i = new rt({
1318
1318
  onStart: (h) => {
1319
1319
  h.status = "running", o((b) => b + 1);
1320
1320
  },
@@ -1322,9 +1322,9 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1322
1322
  h.status = "pass", o((b) => b + 1);
1323
1323
  },
1324
1324
  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);
1325
+ if (h.status = "fail", console.group(`%c❌ Test failed: ${h.name}`, "color: red; font-weight: bold;"), Zt(b)) {
1326
+ er(b);
1327
+ const R = nt(b);
1328
1328
  R.type === "diff" ? h.logs.push(JSON.stringify({
1329
1329
  type: L.CHAI_DIFF,
1330
1330
  expected: R.expected,
@@ -1343,13 +1343,13 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1343
1343
  onSkip: (h) => {
1344
1344
  h.status = "skip", o((b) => b + 1);
1345
1345
  }
1346
- }), f = (h) => {
1347
- p(h), h ? sessionStorage.setItem("twd-search-filter", h) : sessionStorage.removeItem("twd-search-filter");
1348
- }, _ = (h) => {
1346
+ }), _ = (h) => {
1347
+ f(h), h ? sessionStorage.setItem("twd-search-filter", h) : sessionStorage.removeItem("twd-search-filter");
1348
+ }, p = (h) => {
1349
1349
  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(() => {
1350
+ }, w = Array.from(m.values()), C = N(() => sr(w), [n]), k = N(() => or(C, a), [C, a]), { filteredTestIds: g, displayTests: v } = N(() => {
1351
1351
  if (a) {
1352
- const h = tt(k), b = new Set(h);
1352
+ const h = ot(k), b = new Set(h);
1353
1353
  return {
1354
1354
  filteredTestIds: h,
1355
1355
  displayTests: w.filter((R) => R.type === "test" && b.has(R.id))
@@ -1364,19 +1364,19 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1364
1364
  a,
1365
1365
  n
1366
1366
  ]), $ = async () => {
1367
- u(""), sessionStorage.removeItem("twd-last-run-test-name"), v ? await i.runByIds(v) : await i.runAll(), u(Zt(w));
1367
+ u(""), sessionStorage.removeItem("twd-last-run-test-name"), g ? await i.runByIds(g) : await i.runAll(), u(rr(w));
1368
1368
  }, I = async (h) => {
1369
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)));
1370
+ b && (u(""), sessionStorage.setItem("twd-last-run-test-name", b.name), await i.runSingle(b.id), u(tr(b)));
1371
1371
  };
1372
- if (!s) return /* @__PURE__ */ c(Nt, {
1372
+ if (!s) return /* @__PURE__ */ c(Bt, {
1373
1373
  position: t,
1374
- setOpen: _
1374
+ setOpen: p
1375
1375
  });
1376
- const z = g.length;
1376
+ const z = v.length;
1377
1377
  return /* @__PURE__ */ c("div", {
1378
1378
  style: {
1379
- fontFamily: or,
1379
+ fontFamily: ar,
1380
1380
  position: "fixed",
1381
1381
  top: 0,
1382
1382
  bottom: 0,
@@ -1389,7 +1389,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1389
1389
  zIndex: "var(--twd-z-index-sidebar)",
1390
1390
  pointerEvents: "all",
1391
1391
  isolation: "isolate",
1392
- ...nr[t]
1392
+ ...ir[t]
1393
1393
  },
1394
1394
  "data-testid": "twd-sidebar",
1395
1395
  role: "complementary",
@@ -1451,7 +1451,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1451
1451
  }),
1452
1452
  /* @__PURE__ */ c("button", {
1453
1453
  onClick: () => {
1454
- qt(), Gt();
1454
+ Kt(), Yt();
1455
1455
  },
1456
1456
  "aria-label": "Clear all mocks",
1457
1457
  style: {
@@ -1470,7 +1470,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1470
1470
  fontSize: "var(--twd-font-size-sm)",
1471
1471
  alignSelf: "center"
1472
1472
  },
1473
- children: ["v", me]
1473
+ children: ["v", be]
1474
1474
  })
1475
1475
  ]
1476
1476
  }), /* @__PURE__ */ c("button", {
@@ -1483,7 +1483,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1483
1483
  paddingRight: "0",
1484
1484
  paddingLeft: "0"
1485
1485
  },
1486
- onClick: () => _(!1),
1486
+ onClick: () => p(!1),
1487
1487
  children: "✖"
1488
1488
  })]
1489
1489
  }),
@@ -1506,23 +1506,23 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1506
1506
  },
1507
1507
  children: [/* @__PURE__ */ c("span", {
1508
1508
  style: { color: "var(--twd-success)" },
1509
- children: ["✓ ", g.filter((h) => h.status === "pass").length]
1509
+ children: ["✓ ", v.filter((h) => h.status === "pass").length]
1510
1510
  }), /* @__PURE__ */ c("span", {
1511
1511
  style: { color: "var(--twd-error)" },
1512
- children: ["✗ ", g.filter((h) => h.status === "fail").length]
1512
+ children: ["✗ ", v.filter((h) => h.status === "fail").length]
1513
1513
  })]
1514
1514
  })]
1515
1515
  }),
1516
- /* @__PURE__ */ c(Jt, {}),
1517
- r && /* @__PURE__ */ c(er, {
1516
+ /* @__PURE__ */ c(Gt, {}),
1517
+ r && /* @__PURE__ */ c(nr, {
1518
1518
  value: a,
1519
- onChange: f
1519
+ onChange: _
1520
1520
  })
1521
1521
  ]
1522
1522
  }),
1523
1523
  /* @__PURE__ */ c("div", {
1524
1524
  style: { padding: "var(--twd-spacing-md)" },
1525
- children: /* @__PURE__ */ c(Mt, {
1525
+ children: /* @__PURE__ */ c(Wt, {
1526
1526
  roots: k,
1527
1527
  runTest: I,
1528
1528
  searchQuery: a
@@ -1530,20 +1530,20 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
1530
1530
  })
1531
1531
  ]
1532
1532
  });
1533
- }, lr = (e) => ({ render: (t) => {
1534
- ut(t, e);
1535
- } }), dr = (e, t) => {
1533
+ }, ur = (e) => ({ render: (t) => {
1534
+ ft(t, e);
1535
+ } }), _r = (e, t) => {
1536
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, {
1537
+ yt(e, /* @__PURE__ */ c(cr, {
1538
1538
  open: r,
1539
1539
  position: n,
1540
1540
  ...d !== void 0 && { search: d }
1541
- }), lr, l), o && jt(s).then(() => {
1541
+ }), ur, l), o && Vt(s).then(() => {
1542
1542
  console.log("Request mocking initialized");
1543
1543
  }).catch((u) => {
1544
1544
  console.error("Error initializing request mocking:", u);
1545
1545
  });
1546
1546
  };
1547
1547
  export {
1548
- dr as initTWD
1548
+ _r as initTWD
1549
1549
  };