twd-js 1.4.1 → 1.4.3
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.
- package/dist/bundled.es.js +578 -525
- package/dist/cli.js +1 -1
- package/dist/index.cjs.js +38 -38
- package/dist/index.d.ts +5 -2
- package/dist/index.es.js +3776 -3744
- package/dist/{jsx-runtime-CjngqUuo.js → jsx-runtime-BbmOcM6v.js} +2 -2
- package/dist/mock-sw.js +3 -3
- package/dist/runner.cjs.js +1 -1
- package/dist/runner.es.js +101 -98
- package/dist/ui.cjs.js +1 -1
- package/package.json +12 -11
- package/dist/bundled.umd.js +0 -11
package/dist/bundled.es.js
CHANGED
|
@@ -1,93 +1,96 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var Ke = (e, t, r) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var fe = (e, t, r) => Ke(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
var Y, w, Le, C, he, Me, We, He, ie, te, re, z = {}, ze = [], Ze = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, K = Array.isArray;
|
|
2
5
|
function T(e, t) {
|
|
3
6
|
for (var r in t) e[r] = t[r];
|
|
4
7
|
return e;
|
|
5
8
|
}
|
|
6
|
-
function
|
|
9
|
+
function ae(e) {
|
|
7
10
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
8
11
|
}
|
|
9
|
-
function
|
|
10
|
-
var n,
|
|
11
|
-
for (o in t) o == "key" ? n = t[o] : o == "ref" ?
|
|
12
|
-
if (arguments.length > 2 && (l.children = arguments.length > 3 ?
|
|
13
|
-
return
|
|
12
|
+
function Qe(e, t, r) {
|
|
13
|
+
var n, s, o, l = {};
|
|
14
|
+
for (o in t) o == "key" ? n = t[o] : o == "ref" ? s = t[o] : l[o] = t[o];
|
|
15
|
+
if (arguments.length > 2 && (l.children = arguments.length > 3 ? Y.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) l[o] === void 0 && (l[o] = e.defaultProps[o]);
|
|
16
|
+
return j(e, l, n, s, null);
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v:
|
|
17
|
-
return
|
|
18
|
+
function j(e, t, r, n, s) {
|
|
19
|
+
var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s ?? ++Le, __i: -1, __u: 0 };
|
|
20
|
+
return s == null && w.vnode != null && w.vnode(o), o;
|
|
18
21
|
}
|
|
19
|
-
function
|
|
22
|
+
function B(e) {
|
|
20
23
|
return e.children;
|
|
21
24
|
}
|
|
22
25
|
function U(e, t) {
|
|
23
26
|
this.props = e, this.context = t;
|
|
24
27
|
}
|
|
25
|
-
function
|
|
26
|
-
if (t == null) return e.__ ?
|
|
28
|
+
function A(e, t) {
|
|
29
|
+
if (t == null) return e.__ ? A(e.__, e.__i + 1) : null;
|
|
27
30
|
for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
|
|
28
|
-
return typeof e.type == "function" ?
|
|
31
|
+
return typeof e.type == "function" ? A(e) : null;
|
|
29
32
|
}
|
|
30
|
-
function
|
|
33
|
+
function Ne(e) {
|
|
31
34
|
var t, r;
|
|
32
35
|
if ((e = e.__) != null && e.__c != null) {
|
|
33
36
|
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) {
|
|
34
37
|
e.__e = e.__c.base = r.__e;
|
|
35
38
|
break;
|
|
36
39
|
}
|
|
37
|
-
return
|
|
40
|
+
return Ne(e);
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
(!e.__d && (e.__d = !0) && C.push(e) && !
|
|
43
|
+
function ge(e) {
|
|
44
|
+
(!e.__d && (e.__d = !0) && C.push(e) && !X.__r++ || he != w.debounceRendering) && ((he = w.debounceRendering) || Me)(X);
|
|
42
45
|
}
|
|
43
|
-
function
|
|
44
|
-
for (var e, t, r, n,
|
|
45
|
-
|
|
46
|
+
function X() {
|
|
47
|
+
for (var e, t, r, n, s, o, l, c = 1; C.length; ) C.length > c && C.sort(We), e = C.shift(), c = C.length, e.__d && (r = void 0, n = void 0, s = (n = (t = e).__v).__e, o = [], l = [], t.__P && ((r = T({}, n)).__v = n.__v + 1, w.vnode && w.vnode(r), le(t.__P, r, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [s] : null, o, s ?? A(n), !!(32 & n.__u), l), r.__v = n.__v, r.__.__k[r.__i] = r, Pe(o, r, l), n.__e = n.__ = null, r.__e != s && Ne(r)));
|
|
48
|
+
X.__r = 0;
|
|
46
49
|
}
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
for (f =
|
|
50
|
-
return r.__e =
|
|
50
|
+
function Be(e, t, r, n, s, o, l, c, f, a, h) {
|
|
51
|
+
var i, u, p, _, g, v, m, y = n && n.__k || ze, E = t.length;
|
|
52
|
+
for (f = et(r, t, y, f, E), i = 0; i < E; i++) (p = r.__k[i]) != null && (u = p.__i == -1 ? z : y[p.__i] || z, p.__i = i, v = le(e, p, u, s, o, l, c, f, a, h), _ = p.__e, p.ref && u.ref != p.ref && (u.ref && ce(u.ref, null, p), h.push(p.ref, p.__c || _, p)), g == null && _ != null && (g = _), (m = !!(4 & p.__u)) || u.__k === p.__k ? f = De(p, f, e, m) : typeof p.type == "function" && v !== void 0 ? f = v : _ && (f = _.nextSibling), p.__u &= -7);
|
|
53
|
+
return r.__e = g, f;
|
|
51
54
|
}
|
|
52
|
-
function
|
|
53
|
-
var o, l,
|
|
54
|
-
for (e.__k = new Array(
|
|
55
|
-
if (
|
|
55
|
+
function et(e, t, r, n, s) {
|
|
56
|
+
var o, l, c, f, a, h = r.length, i = h, u = 0;
|
|
57
|
+
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] = j(null, l, null, null, null) : K(l) ? l = e.__k[o] = j(B, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[o] = j(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[o] = l, f = o + u, l.__ = e, l.__b = e.__b + 1, c = null, (a = l.__i = tt(l, r, f, i)) != -1 && (i--, (c = r[a]) && (c.__u |= 2)), c == null || c.__v == null ? (a == -1 && (s > h ? u-- : s < h && u++), typeof l.type != "function" && (l.__u |= 4)) : a != f && (a == f - 1 ? u-- : a == f + 1 ? u++ : (a > f ? u-- : u++, l.__u |= 4))) : e.__k[o] = null;
|
|
58
|
+
if (i) for (o = 0; o < h; o++) (c = r[o]) != null && (2 & c.__u) == 0 && (c.__e == n && (n = A(c)), Oe(c, c));
|
|
56
59
|
return n;
|
|
57
60
|
}
|
|
58
|
-
function
|
|
59
|
-
var
|
|
61
|
+
function De(e, t, r, n) {
|
|
62
|
+
var s, o;
|
|
60
63
|
if (typeof e.type == "function") {
|
|
61
|
-
for (
|
|
64
|
+
for (s = e.__k, o = 0; s && o < s.length; o++) s[o] && (s[o].__ = e, t = De(s[o], t, r, n));
|
|
62
65
|
return t;
|
|
63
66
|
}
|
|
64
|
-
e.__e != t && (n && (t && e.type && !t.parentNode && (t =
|
|
67
|
+
e.__e != t && (n && (t && e.type && !t.parentNode && (t = A(e)), r.insertBefore(e.__e, t || null)), t = e.__e);
|
|
65
68
|
do
|
|
66
69
|
t = t && t.nextSibling;
|
|
67
70
|
while (t != null && t.nodeType == 8);
|
|
68
71
|
return t;
|
|
69
72
|
}
|
|
70
|
-
function
|
|
71
|
-
var
|
|
72
|
-
if (a === null &&
|
|
73
|
-
if (n > (
|
|
74
|
-
for (
|
|
73
|
+
function tt(e, t, r, n) {
|
|
74
|
+
var s, o, l, c = e.key, f = e.type, a = t[r], h = a != null && (2 & a.__u) == 0;
|
|
75
|
+
if (a === null && c == null || h && c == a.key && f == a.type) return r;
|
|
76
|
+
if (n > (h ? 1 : 0)) {
|
|
77
|
+
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 && f == a.type) return l;
|
|
75
78
|
}
|
|
76
79
|
return -1;
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" ||
|
|
81
|
+
function me(e, t, r) {
|
|
82
|
+
t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Ze.test(t) ? r : r + "px";
|
|
80
83
|
}
|
|
81
|
-
function
|
|
84
|
+
function F(e, t, r, n, s) {
|
|
82
85
|
var o, l;
|
|
83
86
|
e: if (t == "style") if (typeof r == "string") e.style.cssText = r;
|
|
84
87
|
else {
|
|
85
|
-
if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r ||
|
|
86
|
-
if (r) for (t in r) n && r[t] == n[t] ||
|
|
88
|
+
if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || me(e.style, t, "");
|
|
89
|
+
if (r) for (t in r) n && r[t] == n[t] || me(e.style, t, r[t]);
|
|
87
90
|
}
|
|
88
|
-
else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(
|
|
91
|
+
else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(He, "$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.u = n.u : (r.u = ie, e.addEventListener(t, o ? re : te, o)) : e.removeEventListener(t, o ? re : te, o);
|
|
89
92
|
else {
|
|
90
|
-
if (
|
|
93
|
+
if (s == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
91
94
|
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 {
|
|
92
95
|
e[t] = r ?? "";
|
|
93
96
|
break e;
|
|
@@ -96,157 +99,157 @@ function P(e, t, r, n, i) {
|
|
|
96
99
|
typeof r == "function" || (r == null || r === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && r == 1 ? "" : r));
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
|
-
function
|
|
102
|
+
function ve(e) {
|
|
100
103
|
return function(t) {
|
|
101
104
|
if (this.l) {
|
|
102
105
|
var r = this.l[t.type + e];
|
|
103
|
-
if (t.t == null) t.t =
|
|
106
|
+
if (t.t == null) t.t = ie++;
|
|
104
107
|
else if (t.t < r.u) return;
|
|
105
|
-
return r(
|
|
108
|
+
return r(w.event ? w.event(t) : t);
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
111
|
}
|
|
109
|
-
function
|
|
110
|
-
var
|
|
112
|
+
function le(e, t, r, n, s, o, l, c, f, a) {
|
|
113
|
+
var h, i, u, p, _, g, v, m, y, E, $, D, L, pe, P, M, Q, x = t.type;
|
|
111
114
|
if (t.constructor !== void 0) return null;
|
|
112
|
-
128 & r.__u && (f = !!(32 & r.__u), o = [
|
|
113
|
-
e: if (typeof
|
|
114
|
-
if (
|
|
115
|
+
128 & r.__u && (f = !!(32 & r.__u), o = [c = t.__e = r.__e]), (h = w.__b) && h(t);
|
|
116
|
+
e: if (typeof x == "function") try {
|
|
117
|
+
if (m = t.props, y = "prototype" in x && x.prototype.render, E = (h = x.contextType) && n[h.__c], $ = h ? E ? E.props.value : h.__ : n, r.__c ? v = (i = t.__c = r.__c).__ = i.__E : (y ? t.__c = i = new x(m, $) : (t.__c = i = new U(m, $), i.constructor = x, i.render = nt), E && E.sub(i), i.state || (i.state = {}), i.__n = n, u = i.__d = !0, i.__h = [], i._sb = []), y && i.__s == null && (i.__s = i.state), y && x.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = T({}, i.__s)), T(i.__s, x.getDerivedStateFromProps(m, i.__s))), p = i.props, _ = i.state, i.__v = t, u) y && x.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), y && i.componentDidMount != null && i.__h.push(i.componentDidMount);
|
|
115
118
|
else {
|
|
116
|
-
if (
|
|
117
|
-
for (t.__v != r.__v && (
|
|
118
|
-
|
|
119
|
-
}),
|
|
120
|
-
|
|
119
|
+
if (y && x.getDerivedStateFromProps == null && m !== p && i.componentWillReceiveProps != null && i.componentWillReceiveProps(m, $), t.__v == r.__v || !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(m, i.__s, $) === !1) {
|
|
120
|
+
for (t.__v != r.__v && (i.props = m, i.state = i.__s, i.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(I) {
|
|
121
|
+
I && (I.__ = t);
|
|
122
|
+
}), D = 0; D < i._sb.length; D++) i.__h.push(i._sb[D]);
|
|
123
|
+
i._sb = [], i.__h.length && l.push(i);
|
|
121
124
|
break e;
|
|
122
125
|
}
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
i.componentWillUpdate != null && i.componentWillUpdate(m, i.__s, $), y && i.componentDidUpdate != null && i.__h.push(function() {
|
|
127
|
+
i.componentDidUpdate(p, _, g);
|
|
125
128
|
});
|
|
126
129
|
}
|
|
127
|
-
if (
|
|
128
|
-
for (
|
|
129
|
-
|
|
130
|
+
if (i.context = $, i.props = m, i.__P = e, i.__e = !1, L = w.__r, pe = 0, y) {
|
|
131
|
+
for (i.state = i.__s, i.__d = !1, L && L(t), h = i.render(i.props, i.state, i.context), P = 0; P < i._sb.length; P++) i.__h.push(i._sb[P]);
|
|
132
|
+
i._sb = [];
|
|
130
133
|
} else do
|
|
131
|
-
|
|
132
|
-
while (
|
|
133
|
-
|
|
134
|
-
} catch (
|
|
135
|
-
if (t.__v = null, f || o != null) if (
|
|
136
|
-
for (t.__u |= f ? 160 : 128;
|
|
137
|
-
o[o.indexOf(
|
|
134
|
+
i.__d = !1, L && L(t), h = i.render(i.props, i.state, i.context), i.state = i.__s;
|
|
135
|
+
while (i.__d && ++pe < 25);
|
|
136
|
+
i.state = i.__s, i.getChildContext != null && (n = T(T({}, n), i.getChildContext())), y && !u && i.getSnapshotBeforeUpdate != null && (g = i.getSnapshotBeforeUpdate(p, _)), M = h, h != null && h.type === B && h.key == null && (M = Fe(h.props.children)), c = Be(e, K(M) ? M : [M], t, r, n, s, o, l, c, f, a), i.base = t.__e, t.__u &= -161, i.__h.length && l.push(i), v && (i.__E = i.__ = null);
|
|
137
|
+
} catch (I) {
|
|
138
|
+
if (t.__v = null, f || o != null) if (I.then) {
|
|
139
|
+
for (t.__u |= f ? 160 : 128; c && c.nodeType == 8 && c.nextSibling; ) c = c.nextSibling;
|
|
140
|
+
o[o.indexOf(c)] = null, t.__e = c;
|
|
138
141
|
} else {
|
|
139
|
-
for (
|
|
140
|
-
|
|
142
|
+
for (Q = o.length; Q--; ) ae(o[Q]);
|
|
143
|
+
ne(t);
|
|
141
144
|
}
|
|
142
|
-
else t.__e = r.__e, t.__k = r.__k,
|
|
143
|
-
|
|
145
|
+
else t.__e = r.__e, t.__k = r.__k, I.then || ne(t);
|
|
146
|
+
w.__e(I, t, r);
|
|
144
147
|
}
|
|
145
|
-
else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) :
|
|
146
|
-
return (
|
|
148
|
+
else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : c = t.__e = rt(r.__e, t, r, n, s, o, l, f, a);
|
|
149
|
+
return (h = w.diffed) && h(t), 128 & t.__u ? void 0 : c;
|
|
147
150
|
}
|
|
148
|
-
function
|
|
149
|
-
e && e.__c && (e.__c.__e = !0), e && e.__k && e.__k.forEach(
|
|
151
|
+
function ne(e) {
|
|
152
|
+
e && e.__c && (e.__c.__e = !0), e && e.__k && e.__k.forEach(ne);
|
|
150
153
|
}
|
|
151
|
-
function
|
|
152
|
-
for (var n = 0; n < r.length; n++)
|
|
153
|
-
|
|
154
|
+
function Pe(e, t, r) {
|
|
155
|
+
for (var n = 0; n < r.length; n++) ce(r[n], r[++n], r[++n]);
|
|
156
|
+
w.__c && w.__c(t, e), e.some(function(s) {
|
|
154
157
|
try {
|
|
155
|
-
e =
|
|
156
|
-
o.call(
|
|
158
|
+
e = s.__h, s.__h = [], e.some(function(o) {
|
|
159
|
+
o.call(s);
|
|
157
160
|
});
|
|
158
161
|
} catch (o) {
|
|
159
|
-
|
|
162
|
+
w.__e(o, s.__v);
|
|
160
163
|
}
|
|
161
164
|
});
|
|
162
165
|
}
|
|
163
|
-
function
|
|
164
|
-
return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e :
|
|
166
|
+
function Fe(e) {
|
|
167
|
+
return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e : K(e) ? e.map(Fe) : T({}, e);
|
|
165
168
|
}
|
|
166
|
-
function
|
|
167
|
-
var a,
|
|
168
|
-
if (
|
|
169
|
-
for (a = 0; a < o.length; a++) if ((
|
|
170
|
-
e =
|
|
169
|
+
function rt(e, t, r, n, s, o, l, c, f) {
|
|
170
|
+
var a, h, i, u, p, _, g, v = r.props || z, m = t.props, y = t.type;
|
|
171
|
+
if (y == "svg" ? s = "http://www.w3.org/2000/svg" : y == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
172
|
+
for (a = 0; a < o.length; a++) if ((p = o[a]) && "setAttribute" in p == !!y && (y ? p.localName == y : p.nodeType == 3)) {
|
|
173
|
+
e = p, o[a] = null;
|
|
171
174
|
break;
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
if (e == null) {
|
|
175
|
-
if (
|
|
176
|
-
e = document.createElementNS(
|
|
178
|
+
if (y == null) return document.createTextNode(m);
|
|
179
|
+
e = document.createElementNS(s, y, m.is && m), c && (w.__m && w.__m(t, o), c = !1), o = null;
|
|
177
180
|
}
|
|
178
|
-
if (
|
|
181
|
+
if (y == null) v === m || c && e.data == m || (e.data = m);
|
|
179
182
|
else {
|
|
180
|
-
if (o = o &&
|
|
181
|
-
for (a in
|
|
182
|
-
if (a == "dangerouslySetInnerHTML")
|
|
183
|
-
else if (!(a in
|
|
184
|
-
if (a == "value" && "defaultValue" in
|
|
185
|
-
|
|
183
|
+
if (o = o && Y.call(e.childNodes), !c && o != null) for (v = {}, a = 0; a < e.attributes.length; a++) v[(p = e.attributes[a]).name] = p.value;
|
|
184
|
+
for (a in v) if (p = v[a], a != "children") {
|
|
185
|
+
if (a == "dangerouslySetInnerHTML") i = p;
|
|
186
|
+
else if (!(a in m)) {
|
|
187
|
+
if (a == "value" && "defaultValue" in m || a == "checked" && "defaultChecked" in m) continue;
|
|
188
|
+
F(e, a, null, p, s);
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
|
-
for (a in
|
|
189
|
-
if (
|
|
190
|
-
else if (
|
|
191
|
-
|
|
191
|
+
for (a in m) p = m[a], a == "children" ? u = p : a == "dangerouslySetInnerHTML" ? h = p : a == "value" ? _ = p : a == "checked" ? g = p : c && typeof p != "function" || v[a] === p || F(e, a, p, v[a], s);
|
|
192
|
+
if (h) c || i && (h.__html == i.__html || h.__html == e.innerHTML) || (e.innerHTML = h.__html), t.__k = [];
|
|
193
|
+
else if (i && (e.innerHTML = ""), Be(t.type == "template" ? e.content : e, K(u) ? u : [u], t, r, n, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : s, o, l, o ? o[0] : r.__k && A(r, 0), c, f), o != null) for (a = o.length; a--; ) ae(o[a]);
|
|
194
|
+
c || (a = "value", y == "progress" && _ == null ? e.removeAttribute("value") : _ != null && (_ !== e[a] || y == "progress" && !_ || y == "option" && _ != v[a]) && F(e, a, _, v[a], s), a = "checked", g != null && g != e[a] && F(e, a, g, v[a], s));
|
|
192
195
|
}
|
|
193
196
|
return e;
|
|
194
197
|
}
|
|
195
|
-
function
|
|
198
|
+
function ce(e, t, r) {
|
|
196
199
|
try {
|
|
197
200
|
if (typeof e == "function") {
|
|
198
201
|
var n = typeof e.__u == "function";
|
|
199
202
|
n && e.__u(), n && t == null || (e.__u = e(t));
|
|
200
203
|
} else e.current = t;
|
|
201
|
-
} catch (
|
|
202
|
-
|
|
204
|
+
} catch (s) {
|
|
205
|
+
w.__e(s, r);
|
|
203
206
|
}
|
|
204
207
|
}
|
|
205
|
-
function
|
|
206
|
-
var n,
|
|
207
|
-
if (
|
|
208
|
+
function Oe(e, t, r) {
|
|
209
|
+
var n, s;
|
|
210
|
+
if (w.unmount && w.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || ce(n, null, t)), (n = e.__c) != null) {
|
|
208
211
|
if (n.componentWillUnmount) try {
|
|
209
212
|
n.componentWillUnmount();
|
|
210
213
|
} catch (o) {
|
|
211
|
-
|
|
214
|
+
w.__e(o, t);
|
|
212
215
|
}
|
|
213
216
|
n.base = n.__P = null;
|
|
214
217
|
}
|
|
215
|
-
if (n = e.__k) for (
|
|
216
|
-
r ||
|
|
218
|
+
if (n = e.__k) for (s = 0; s < n.length; s++) n[s] && Oe(n[s], t, r || typeof e.type != "function");
|
|
219
|
+
r || ae(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
217
220
|
}
|
|
218
|
-
function
|
|
221
|
+
function nt(e, t, r) {
|
|
219
222
|
return this.constructor(e, r);
|
|
220
223
|
}
|
|
221
|
-
function
|
|
222
|
-
var n,
|
|
223
|
-
t == document && (t = document.documentElement),
|
|
224
|
+
function ot(e, t, r) {
|
|
225
|
+
var n, s, o, l;
|
|
226
|
+
t == document && (t = document.documentElement), w.__ && w.__(e, t), s = (n = !1) ? null : t.__k, o = [], l = [], le(t, e = t.__k = Qe(B, null, [e]), s || z, z, t.namespaceURI, s ? null : t.firstChild ? Y.call(t.childNodes) : null, o, s ? s.__e : t.firstChild, n, l), Pe(o, e, l);
|
|
224
227
|
}
|
|
225
|
-
|
|
226
|
-
for (var
|
|
227
|
-
if ((o =
|
|
228
|
-
} catch (
|
|
229
|
-
e =
|
|
228
|
+
Y = ze.slice, w = { __e: function(e, t, r, n) {
|
|
229
|
+
for (var s, o, l; t = t.__; ) if ((s = t.__c) && !s.__) try {
|
|
230
|
+
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;
|
|
231
|
+
} catch (c) {
|
|
232
|
+
e = c;
|
|
230
233
|
}
|
|
231
234
|
throw e;
|
|
232
|
-
} },
|
|
235
|
+
} }, Le = 0, U.prototype.setState = function(e, t) {
|
|
233
236
|
var r;
|
|
234
|
-
r = this.__s != null && this.__s != this.state ? this.__s : this.__s = T({}, this.state), typeof e == "function" && (e = e(T({}, r), this.props)), e && T(r, e), e != null && this.__v && (t && this._sb.push(t),
|
|
237
|
+
r = this.__s != null && this.__s != this.state ? this.__s : this.__s = T({}, this.state), typeof e == "function" && (e = e(T({}, r), this.props)), e && T(r, e), e != null && this.__v && (t && this._sb.push(t), ge(this));
|
|
235
238
|
}, U.prototype.forceUpdate = function(e) {
|
|
236
|
-
this.__v && (this.__e = !0, e && this.__h.push(e),
|
|
237
|
-
}, U.prototype.render =
|
|
239
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), ge(this));
|
|
240
|
+
}, U.prototype.render = B, C = [], Me = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, We = function(e, t) {
|
|
238
241
|
return e.__v.__b - t.__v.__b;
|
|
239
|
-
},
|
|
240
|
-
var
|
|
241
|
-
function
|
|
242
|
+
}, X.__r = 0, He = /(PointerCapture)$|Capture$/i, ie = 0, te = ve(!1), re = ve(!0);
|
|
243
|
+
var st = 0;
|
|
244
|
+
function d(e, t, r, n, s, o) {
|
|
242
245
|
t || (t = {});
|
|
243
|
-
var l,
|
|
244
|
-
if ("ref" in f) for (
|
|
245
|
-
var a = { type: e, props: f, key: r, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
246
|
-
if (typeof e == "function" && (l = e.defaultProps)) for (
|
|
247
|
-
return
|
|
246
|
+
var l, c, f = t;
|
|
247
|
+
if ("ref" in f) for (c in f = {}, t) c == "ref" ? l = t[c] : f[c] = t[c];
|
|
248
|
+
var a = { type: e, props: f, key: r, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --st, __i: -1, __u: 0, __source: s, __self: o };
|
|
249
|
+
if (typeof e == "function" && (l = e.defaultProps)) for (c in l) f[c] === void 0 && (f[c] = l[c]);
|
|
250
|
+
return w.vnode && w.vnode(a), a;
|
|
248
251
|
}
|
|
249
|
-
const
|
|
252
|
+
const it = {
|
|
250
253
|
// Colors
|
|
251
254
|
primary: "#2563eb",
|
|
252
255
|
// Darker blue for AA contrast with white text (4.5:1)
|
|
@@ -258,6 +261,10 @@ const et = {
|
|
|
258
261
|
text: "#f1f5f9",
|
|
259
262
|
textSecondary: "#cbd5e1",
|
|
260
263
|
textMuted: "#94a3b8",
|
|
264
|
+
// Describe blocks
|
|
265
|
+
describeBg: "#0f172a",
|
|
266
|
+
describeText: "#94a3b8",
|
|
267
|
+
describeBorder: "#334155",
|
|
261
268
|
// Status colors
|
|
262
269
|
success: "#22c55e",
|
|
263
270
|
successBg: "#14532d",
|
|
@@ -297,173 +304,173 @@ const et = {
|
|
|
297
304
|
shadow: "2px 0 8px rgba(0,0,0,0.3)",
|
|
298
305
|
shadowSm: "0 2px 4px rgba(0, 0, 0, 0.2)",
|
|
299
306
|
// Z-index
|
|
300
|
-
zIndexSidebar: "
|
|
301
|
-
zIndexSticky: "
|
|
307
|
+
zIndexSidebar: "99999",
|
|
308
|
+
zIndexSticky: "100000",
|
|
302
309
|
// Animation
|
|
303
310
|
animationDuration: "0.2s",
|
|
304
311
|
// Icon colors
|
|
305
312
|
iconColor: "#f1f5f9",
|
|
306
313
|
iconColorSecondary: "#cbd5e1"
|
|
307
314
|
};
|
|
308
|
-
function
|
|
309
|
-
const t = { ...
|
|
315
|
+
function at(e = {}) {
|
|
316
|
+
const t = { ...it, ...e };
|
|
310
317
|
return Object.entries(t).map(([r, n]) => `${`--twd-${r.replace(/([A-Z])/g, "-$1").toLowerCase()}`}: ${n};`).join(`
|
|
311
318
|
`);
|
|
312
319
|
}
|
|
313
|
-
function
|
|
320
|
+
function lt(e) {
|
|
314
321
|
const t = "twd-theme-variables";
|
|
315
322
|
let r = document.getElementById(t);
|
|
316
323
|
r || (r = document.createElement("style"), r.id = t, document.head.appendChild(r));
|
|
317
|
-
const n =
|
|
324
|
+
const n = at(e);
|
|
318
325
|
r.textContent = `
|
|
319
326
|
:root {
|
|
320
327
|
${n}
|
|
321
328
|
}
|
|
322
329
|
`;
|
|
323
330
|
}
|
|
324
|
-
const
|
|
331
|
+
const ct = (e) => {
|
|
325
332
|
const { Component: t, createRoot: r, theme: n } = e;
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
},
|
|
330
|
-
for (const
|
|
331
|
-
|
|
333
|
+
lt(n);
|
|
334
|
+
const s = document.createElement("div");
|
|
335
|
+
s.setAttribute("id", "twd-sidebar-root"), document.body.appendChild(s), r(s).render(t);
|
|
336
|
+
}, dt = async (e, t, r, n) => {
|
|
337
|
+
for (const s in e) await e[s]();
|
|
338
|
+
ct({ Component: t, createRoot: r, theme: n });
|
|
332
339
|
};
|
|
333
|
-
var N,
|
|
334
|
-
function
|
|
335
|
-
|
|
336
|
-
var r =
|
|
340
|
+
var N, b, ee, we, G = 0, je = [], k = w, ye = k.__b, be = k.__r, ke = k.diffed, Se = k.__c, xe = k.unmount, Te = k.__;
|
|
341
|
+
function de(e, t) {
|
|
342
|
+
k.__h && k.__h(b, e, G || t), G = 0;
|
|
343
|
+
var r = b.__H || (b.__H = { __: [], __h: [] });
|
|
337
344
|
return e >= r.__.length && r.__.push({}), r.__[e];
|
|
338
345
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
346
|
+
function q(e) {
|
|
347
|
+
return G = 1, _t(qe, e);
|
|
341
348
|
}
|
|
342
|
-
function
|
|
343
|
-
var n =
|
|
344
|
-
if (n.t = e, !n.__c && (n.__ = [
|
|
345
|
-
var f = n.__N ? n.__N[0] : n.__[0], a = n.t(f,
|
|
349
|
+
function _t(e, t, r) {
|
|
350
|
+
var n = de(N++, 2);
|
|
351
|
+
if (n.t = e, !n.__c && (n.__ = [qe(void 0, t), function(c) {
|
|
352
|
+
var f = n.__N ? n.__N[0] : n.__[0], a = n.t(f, c);
|
|
346
353
|
f !== a && (n.__N = [a, n.__[1]], n.__c.setState({}));
|
|
347
|
-
}], n.__c =
|
|
348
|
-
var
|
|
354
|
+
}], n.__c = b, !b.__f)) {
|
|
355
|
+
var s = function(c, f, a) {
|
|
349
356
|
if (!n.__c.__H) return !0;
|
|
350
|
-
var
|
|
351
|
-
return !!
|
|
357
|
+
var h = n.__c.__H.__.filter(function(u) {
|
|
358
|
+
return !!u.__c;
|
|
352
359
|
});
|
|
353
|
-
if (
|
|
354
|
-
return !
|
|
355
|
-
})) return !o || o.call(this,
|
|
356
|
-
var
|
|
357
|
-
return
|
|
358
|
-
if (
|
|
359
|
-
var
|
|
360
|
-
|
|
360
|
+
if (h.every(function(u) {
|
|
361
|
+
return !u.__N;
|
|
362
|
+
})) return !o || o.call(this, c, f, a);
|
|
363
|
+
var i = n.__c.props !== c;
|
|
364
|
+
return h.forEach(function(u) {
|
|
365
|
+
if (u.__N) {
|
|
366
|
+
var p = u.__[0];
|
|
367
|
+
u.__ = u.__N, u.__N = void 0, p !== u.__[0] && (i = !0);
|
|
361
368
|
}
|
|
362
|
-
}), o && o.call(this,
|
|
369
|
+
}), o && o.call(this, c, f, a) || i;
|
|
363
370
|
};
|
|
364
|
-
|
|
365
|
-
var o =
|
|
366
|
-
|
|
371
|
+
b.__f = !0;
|
|
372
|
+
var o = b.shouldComponentUpdate, l = b.componentWillUpdate;
|
|
373
|
+
b.componentWillUpdate = function(c, f, a) {
|
|
367
374
|
if (this.__e) {
|
|
368
|
-
var
|
|
369
|
-
o = void 0,
|
|
375
|
+
var h = o;
|
|
376
|
+
o = void 0, s(c, f, a), o = h;
|
|
370
377
|
}
|
|
371
|
-
l && l.call(this,
|
|
372
|
-
},
|
|
378
|
+
l && l.call(this, c, f, a);
|
|
379
|
+
}, b.shouldComponentUpdate = s;
|
|
373
380
|
}
|
|
374
381
|
return n.__N || n.__;
|
|
375
382
|
}
|
|
376
|
-
function
|
|
377
|
-
var r =
|
|
378
|
-
!
|
|
383
|
+
function _e(e, t) {
|
|
384
|
+
var r = de(N++, 3);
|
|
385
|
+
!k.__s && Ue(r.__H, t) && (r.__ = e, r.u = t, b.__H.__h.push(r));
|
|
379
386
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
387
|
+
function H(e) {
|
|
388
|
+
return G = 5, V(function() {
|
|
382
389
|
return { current: e };
|
|
383
390
|
}, []);
|
|
384
391
|
}
|
|
385
|
-
function
|
|
386
|
-
var r =
|
|
387
|
-
return
|
|
392
|
+
function V(e, t) {
|
|
393
|
+
var r = de(N++, 7);
|
|
394
|
+
return Ue(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
|
|
388
395
|
}
|
|
389
|
-
function
|
|
390
|
-
for (var e; e =
|
|
391
|
-
e.__H.__h.forEach(
|
|
396
|
+
function ut() {
|
|
397
|
+
for (var e; e = je.shift(); ) if (e.__P && e.__H) try {
|
|
398
|
+
e.__H.__h.forEach(J), e.__H.__h.forEach(oe), e.__H.__h = [];
|
|
392
399
|
} catch (t) {
|
|
393
|
-
e.__H.__h = [],
|
|
400
|
+
e.__H.__h = [], k.__e(t, e.__v);
|
|
394
401
|
}
|
|
395
402
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
e && t.__k && t.__k.__m && (e.__m = t.__k.__m),
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
var t = (
|
|
403
|
-
t && (
|
|
403
|
+
k.__b = function(e) {
|
|
404
|
+
b = null, ye && ye(e);
|
|
405
|
+
}, k.__ = function(e, t) {
|
|
406
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Te && Te(e, t);
|
|
407
|
+
}, k.__r = function(e) {
|
|
408
|
+
be && be(e), N = 0;
|
|
409
|
+
var t = (b = e.__c).__H;
|
|
410
|
+
t && (ee === b ? (t.__h = [], b.__h = [], t.__.forEach(function(r) {
|
|
404
411
|
r.__N && (r.__ = r.__N), r.u = r.__N = void 0;
|
|
405
|
-
})) : (t.__h.forEach(
|
|
406
|
-
},
|
|
407
|
-
|
|
412
|
+
})) : (t.__h.forEach(J), t.__h.forEach(oe), t.__h = [], N = 0)), ee = b;
|
|
413
|
+
}, k.diffed = function(e) {
|
|
414
|
+
ke && ke(e);
|
|
408
415
|
var t = e.__c;
|
|
409
|
-
t && t.__H && (t.__H.__h.length && (
|
|
416
|
+
t && t.__H && (t.__H.__h.length && (je.push(t) !== 1 && we === k.requestAnimationFrame || ((we = k.requestAnimationFrame) || pt)(ut)), t.__H.__.forEach(function(r) {
|
|
410
417
|
r.u && (r.__H = r.u), r.u = void 0;
|
|
411
|
-
})),
|
|
412
|
-
},
|
|
418
|
+
})), ee = b = null;
|
|
419
|
+
}, k.__c = function(e, t) {
|
|
413
420
|
t.some(function(r) {
|
|
414
421
|
try {
|
|
415
|
-
r.__h.forEach(
|
|
416
|
-
return !n.__ ||
|
|
422
|
+
r.__h.forEach(J), r.__h = r.__h.filter(function(n) {
|
|
423
|
+
return !n.__ || oe(n);
|
|
417
424
|
});
|
|
418
425
|
} catch (n) {
|
|
419
|
-
t.some(function(
|
|
420
|
-
|
|
421
|
-
}), t = [],
|
|
426
|
+
t.some(function(s) {
|
|
427
|
+
s.__h && (s.__h = []);
|
|
428
|
+
}), t = [], k.__e(n, r.__v);
|
|
422
429
|
}
|
|
423
|
-
}),
|
|
424
|
-
},
|
|
425
|
-
|
|
430
|
+
}), Se && Se(e, t);
|
|
431
|
+
}, k.unmount = function(e) {
|
|
432
|
+
xe && xe(e);
|
|
426
433
|
var t, r = e.__c;
|
|
427
434
|
r && r.__H && (r.__H.__.forEach(function(n) {
|
|
428
435
|
try {
|
|
429
|
-
|
|
430
|
-
} catch (
|
|
431
|
-
t =
|
|
436
|
+
J(n);
|
|
437
|
+
} catch (s) {
|
|
438
|
+
t = s;
|
|
432
439
|
}
|
|
433
|
-
}), r.__H = void 0, t &&
|
|
440
|
+
}), r.__H = void 0, t && k.__e(t, r.__v));
|
|
434
441
|
};
|
|
435
|
-
var
|
|
436
|
-
function
|
|
442
|
+
var Ee = typeof requestAnimationFrame == "function";
|
|
443
|
+
function pt(e) {
|
|
437
444
|
var t, r = function() {
|
|
438
|
-
clearTimeout(n),
|
|
445
|
+
clearTimeout(n), Ee && cancelAnimationFrame(t), setTimeout(e);
|
|
439
446
|
}, n = setTimeout(r, 35);
|
|
440
|
-
|
|
447
|
+
Ee && (t = requestAnimationFrame(r));
|
|
441
448
|
}
|
|
442
|
-
function
|
|
443
|
-
var t =
|
|
444
|
-
typeof r == "function" && (e.__c = void 0, r()),
|
|
449
|
+
function J(e) {
|
|
450
|
+
var t = b, r = e.__c;
|
|
451
|
+
typeof r == "function" && (e.__c = void 0, r()), b = t;
|
|
445
452
|
}
|
|
446
|
-
function
|
|
447
|
-
var t =
|
|
448
|
-
e.__c = e.__(),
|
|
453
|
+
function oe(e) {
|
|
454
|
+
var t = b;
|
|
455
|
+
e.__c = e.__(), b = t;
|
|
449
456
|
}
|
|
450
|
-
function
|
|
457
|
+
function Ue(e, t) {
|
|
451
458
|
return !e || e.length !== t.length || t.some(function(r, n) {
|
|
452
459
|
return r !== e[n];
|
|
453
460
|
});
|
|
454
461
|
}
|
|
455
|
-
function
|
|
462
|
+
function qe(e, t) {
|
|
456
463
|
return typeof t == "function" ? t(e) : t;
|
|
457
464
|
}
|
|
458
|
-
const
|
|
465
|
+
const ft = (e) => {
|
|
459
466
|
const t = /* @__PURE__ */ new Map(), r = [];
|
|
460
467
|
for (const n of e) t.set(n.id, { ...n, childrenNodes: [] });
|
|
461
468
|
for (const n of t.values())
|
|
462
469
|
n.parent ? t.get(n.parent)?.childrenNodes?.push(n) : r.push(n);
|
|
463
470
|
return r;
|
|
464
|
-
},
|
|
471
|
+
}, ht = {
|
|
465
472
|
animation: "spin 1s linear infinite"
|
|
466
|
-
},
|
|
473
|
+
}, gt = () => /* @__PURE__ */ d(
|
|
467
474
|
"svg",
|
|
468
475
|
{
|
|
469
476
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -476,18 +483,18 @@ const ct = (e) => {
|
|
|
476
483
|
strokeLinecap: "round",
|
|
477
484
|
strokeLinejoin: "round",
|
|
478
485
|
className: "lucide lucide-loader-circle-icon lucide-loader-circle",
|
|
479
|
-
style:
|
|
486
|
+
style: ht,
|
|
480
487
|
"data-testid": "loader-icon",
|
|
481
|
-
children: /* @__PURE__ */
|
|
488
|
+
children: /* @__PURE__ */ d("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
482
489
|
}
|
|
483
|
-
),
|
|
484
|
-
|
|
490
|
+
), O = document.createElement("style");
|
|
491
|
+
O && !document.getElementById("loader-spin-keyframes") && (O.id = "loader-spin-keyframes", O.innerHTML = `
|
|
485
492
|
@keyframes spin {
|
|
486
493
|
0% { transform: rotate(0deg); }
|
|
487
494
|
100% { transform: rotate(360deg); }
|
|
488
495
|
}
|
|
489
|
-
`, document.head.appendChild(
|
|
490
|
-
const
|
|
496
|
+
`, document.head.appendChild(O));
|
|
497
|
+
const Z = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ d(
|
|
491
498
|
"svg",
|
|
492
499
|
{
|
|
493
500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -503,10 +510,10 @@ const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
|
|
|
503
510
|
"data-testid": r,
|
|
504
511
|
children: t
|
|
505
512
|
}
|
|
506
|
-
),
|
|
513
|
+
), mt = () => /* @__PURE__ */ d(Z, { className: "lucide-play-icon lucide-play", dataTestId: "play-icon", 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" }) }), Ve = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ d(B, { children: [
|
|
507
514
|
t,
|
|
508
515
|
" ",
|
|
509
|
-
n && /* @__PURE__ */
|
|
516
|
+
n && /* @__PURE__ */ d(
|
|
510
517
|
"span",
|
|
511
518
|
{
|
|
512
519
|
style: { color: "var(--twd-primary)" },
|
|
@@ -517,7 +524,7 @@ const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
|
|
|
517
524
|
]
|
|
518
525
|
}
|
|
519
526
|
),
|
|
520
|
-
r && /* @__PURE__ */
|
|
527
|
+
r && /* @__PURE__ */ d(
|
|
521
528
|
"span",
|
|
522
529
|
{
|
|
523
530
|
style: { color: "var(--twd-text-secondary)" },
|
|
@@ -529,8 +536,8 @@ const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
|
|
|
529
536
|
}
|
|
530
537
|
)
|
|
531
538
|
] });
|
|
532
|
-
var
|
|
533
|
-
const
|
|
539
|
+
var R = /* @__PURE__ */ ((e) => (e.CHAI_DIFF = "chai-diff", e.CHAI_MESSAGE = "chai-message", e.ERROR = "error", e))(R || {});
|
|
540
|
+
const vt = (e) => {
|
|
534
541
|
try {
|
|
535
542
|
const t = JSON.parse(e);
|
|
536
543
|
if (t && typeof t == "object" && "type" in t)
|
|
@@ -538,7 +545,7 @@ const pt = (e) => {
|
|
|
538
545
|
} catch {
|
|
539
546
|
}
|
|
540
547
|
return null;
|
|
541
|
-
},
|
|
548
|
+
}, Re = (e) => {
|
|
542
549
|
if (e === null) return "null";
|
|
543
550
|
if (e === void 0) return "undefined";
|
|
544
551
|
if (typeof e == "string") return e;
|
|
@@ -549,10 +556,10 @@ const pt = (e) => {
|
|
|
549
556
|
return String(e);
|
|
550
557
|
}
|
|
551
558
|
return String(e);
|
|
552
|
-
},
|
|
553
|
-
const r =
|
|
554
|
-
if (r?.type ===
|
|
555
|
-
return /* @__PURE__ */
|
|
559
|
+
}, wt = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? { color: "var(--twd-success)", fontWeight: "var(--twd-font-weight-bold)" } : e.startsWith("Test failed") ? { color: "var(--twd-error)", fontWeight: "var(--twd-font-weight-bold)" } : {}, yt = (e) => e.type === "chai-message" || e.type === "error", bt = (e, t) => t && yt(t) ? t.message : e, kt = ({ log: e, index: t }) => {
|
|
560
|
+
const r = vt(e);
|
|
561
|
+
if (r?.type === R.CHAI_DIFF)
|
|
562
|
+
return /* @__PURE__ */ d(
|
|
556
563
|
"li",
|
|
557
564
|
{
|
|
558
565
|
style: {
|
|
@@ -562,22 +569,22 @@ const pt = (e) => {
|
|
|
562
569
|
color: "var(--twd-text)"
|
|
563
570
|
},
|
|
564
571
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ d("div", { style: {
|
|
566
573
|
color: "var(--twd-error)",
|
|
567
574
|
fontWeight: "var(--twd-font-weight-bold)",
|
|
568
575
|
marginBottom: "var(--twd-spacing-xs)"
|
|
569
576
|
}, children: "❌ Assertion failed" }),
|
|
570
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ d("div", { style: {
|
|
571
578
|
marginTop: "var(--twd-spacing-xs)",
|
|
572
579
|
paddingLeft: "var(--twd-spacing-sm)",
|
|
573
580
|
borderLeft: "2px solid var(--twd-success)"
|
|
574
581
|
}, children: [
|
|
575
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ d("div", { style: {
|
|
576
583
|
color: "var(--twd-success)",
|
|
577
584
|
fontWeight: "var(--twd-font-weight-medium)",
|
|
578
585
|
marginBottom: "var(--twd-spacing-xs)"
|
|
579
586
|
}, children: "Expected:" }),
|
|
580
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ d("pre", { style: {
|
|
581
588
|
margin: 0,
|
|
582
589
|
padding: "var(--twd-spacing-xs)",
|
|
583
590
|
background: "var(--twd-background)",
|
|
@@ -586,19 +593,19 @@ const pt = (e) => {
|
|
|
586
593
|
overflowX: "auto",
|
|
587
594
|
whiteSpace: "pre-wrap",
|
|
588
595
|
wordBreak: "break-word"
|
|
589
|
-
}, children:
|
|
596
|
+
}, children: Re(r.expected) })
|
|
590
597
|
] }),
|
|
591
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ d("div", { style: {
|
|
592
599
|
marginTop: "var(--twd-spacing-xs)",
|
|
593
600
|
paddingLeft: "var(--twd-spacing-sm)",
|
|
594
601
|
borderLeft: "2px solid var(--twd-error)"
|
|
595
602
|
}, children: [
|
|
596
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ d("div", { style: {
|
|
597
604
|
color: "var(--twd-error)",
|
|
598
605
|
fontWeight: "var(--twd-font-weight-medium)",
|
|
599
606
|
marginBottom: "var(--twd-spacing-xs)"
|
|
600
607
|
}, children: "Actual:" }),
|
|
601
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ d("pre", { style: {
|
|
602
609
|
margin: 0,
|
|
603
610
|
padding: "var(--twd-spacing-xs)",
|
|
604
611
|
background: "var(--twd-background)",
|
|
@@ -607,14 +614,14 @@ const pt = (e) => {
|
|
|
607
614
|
overflowX: "auto",
|
|
608
615
|
whiteSpace: "pre-wrap",
|
|
609
616
|
wordBreak: "break-word"
|
|
610
|
-
}, children:
|
|
617
|
+
}, children: Re(r.actual) })
|
|
611
618
|
] })
|
|
612
619
|
]
|
|
613
620
|
},
|
|
614
621
|
t
|
|
615
622
|
);
|
|
616
|
-
const n =
|
|
617
|
-
return /* @__PURE__ */
|
|
623
|
+
const n = bt(e, r);
|
|
624
|
+
return /* @__PURE__ */ d(
|
|
618
625
|
"li",
|
|
619
626
|
{
|
|
620
627
|
style: {
|
|
@@ -622,13 +629,54 @@ const pt = (e) => {
|
|
|
622
629
|
padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
|
|
623
630
|
borderBottom: "1px solid var(--twd-border-light)",
|
|
624
631
|
color: "var(--twd-text)",
|
|
625
|
-
...
|
|
632
|
+
...wt(n)
|
|
626
633
|
},
|
|
627
634
|
children: n
|
|
628
635
|
},
|
|
629
636
|
t
|
|
630
637
|
);
|
|
631
|
-
},
|
|
638
|
+
}, W = {
|
|
639
|
+
container: {
|
|
640
|
+
marginBottom: "var(--twd-spacing-xs)"
|
|
641
|
+
},
|
|
642
|
+
item: {
|
|
643
|
+
display: "flex",
|
|
644
|
+
alignItems: "left",
|
|
645
|
+
justifyContent: "space-between",
|
|
646
|
+
padding: "var(--twd-spacing-sm) var(--twd-spacing-sm)",
|
|
647
|
+
borderRadius: "var(--twd-border-radius)"
|
|
648
|
+
},
|
|
649
|
+
nameSpan: {
|
|
650
|
+
fontWeight: "var(--twd-font-weight-medium)",
|
|
651
|
+
fontSize: "var(--twd-font-size-md)",
|
|
652
|
+
color: "var(--twd-text)",
|
|
653
|
+
maxWidth: "220px"
|
|
654
|
+
},
|
|
655
|
+
button: {
|
|
656
|
+
background: "transparent",
|
|
657
|
+
border: "1px solid var(--twd-border-light)",
|
|
658
|
+
borderRadius: "var(--twd-border-radius)",
|
|
659
|
+
padding: "0",
|
|
660
|
+
cursor: "pointer",
|
|
661
|
+
verticalAlign: "middle",
|
|
662
|
+
fontSize: "var(--twd-font-size-sm)",
|
|
663
|
+
width: "24px",
|
|
664
|
+
height: "24px",
|
|
665
|
+
display: "flex",
|
|
666
|
+
alignItems: "center",
|
|
667
|
+
justifyContent: "center"
|
|
668
|
+
},
|
|
669
|
+
logsList: {
|
|
670
|
+
borderRadius: "var(--twd-border-radius)",
|
|
671
|
+
maxHeight: "260px",
|
|
672
|
+
overflowY: "auto",
|
|
673
|
+
padding: 0,
|
|
674
|
+
background: "var(--twd-background-secondary)",
|
|
675
|
+
listStyle: "none",
|
|
676
|
+
marginTop: "var(--twd-spacing-xs)",
|
|
677
|
+
textAlign: "left"
|
|
678
|
+
}
|
|
679
|
+
}, St = (e) => {
|
|
632
680
|
switch (e.status) {
|
|
633
681
|
case "pass":
|
|
634
682
|
return {
|
|
@@ -667,22 +715,38 @@ const pt = (e) => {
|
|
|
667
715
|
}
|
|
668
716
|
};
|
|
669
717
|
}
|
|
670
|
-
},
|
|
718
|
+
}, xt = ({
|
|
671
719
|
node: e,
|
|
672
720
|
depth: t,
|
|
673
721
|
id: r,
|
|
674
722
|
runTest: n
|
|
675
723
|
}) => {
|
|
676
|
-
const
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
724
|
+
const s = H(null), o = H(e.status), l = H(e.logs?.length || 0), c = V(() => St(e), [e.status]), f = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name, a = V(
|
|
725
|
+
() => ({
|
|
726
|
+
...W.container,
|
|
727
|
+
marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
|
|
728
|
+
...c.container || {}
|
|
729
|
+
}),
|
|
730
|
+
[t, c]
|
|
731
|
+
), h = V(
|
|
732
|
+
() => ({
|
|
733
|
+
...W.item,
|
|
734
|
+
...c.item,
|
|
735
|
+
...f && {
|
|
736
|
+
border: "1px dashed var(--twd-border)"
|
|
737
|
+
}
|
|
738
|
+
}),
|
|
739
|
+
[c, f]
|
|
740
|
+
);
|
|
741
|
+
_e(() => {
|
|
742
|
+
const u = s.current;
|
|
743
|
+
if (!u || !e.logs || e.logs.length === 0) return;
|
|
744
|
+
const p = o.current === "running" && (e.status === "pass" || e.status === "fail"), _ = e.logs.length > l.current;
|
|
745
|
+
(p || _) && setTimeout(() => {
|
|
746
|
+
u.scrollTop = u.scrollHeight;
|
|
747
|
+
}, 0), o.current = e.status, l.current = e.logs.length;
|
|
684
748
|
}, [e.status, e.logs]);
|
|
685
|
-
const
|
|
749
|
+
const i = () => {
|
|
686
750
|
switch (e.status) {
|
|
687
751
|
case "pass":
|
|
688
752
|
return "passed";
|
|
@@ -696,115 +760,56 @@ const pt = (e) => {
|
|
|
696
760
|
return "not run";
|
|
697
761
|
}
|
|
698
762
|
};
|
|
699
|
-
return /* @__PURE__ */
|
|
763
|
+
return /* @__PURE__ */ d(
|
|
700
764
|
"li",
|
|
701
765
|
{
|
|
702
|
-
style:
|
|
703
|
-
marginBottom: "var(--twd-spacing-xs)",
|
|
704
|
-
marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
|
|
705
|
-
...i.container
|
|
706
|
-
},
|
|
766
|
+
style: a,
|
|
707
767
|
"data-testid": `test-list-item-${r}`,
|
|
708
768
|
"data-test-name": e.name,
|
|
709
769
|
role: "listitem",
|
|
710
|
-
"aria-label": `Test ${e.name}, status: ${
|
|
770
|
+
"aria-label": `Test ${e.name}, status: ${i()}`,
|
|
711
771
|
children: [
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
"
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
children: /* @__PURE__ */ _(
|
|
736
|
-
Oe,
|
|
737
|
-
{
|
|
738
|
-
id: r,
|
|
739
|
-
name: e.name,
|
|
740
|
-
skip: e.skip,
|
|
741
|
-
only: e.only
|
|
742
|
-
}
|
|
743
|
-
)
|
|
744
|
-
}
|
|
745
|
-
),
|
|
746
|
-
/* @__PURE__ */ _(
|
|
747
|
-
"button",
|
|
748
|
-
{
|
|
749
|
-
onClick: () => n(r),
|
|
750
|
-
"aria-label": `Run ${e.name} test`,
|
|
751
|
-
style: {
|
|
752
|
-
background: "transparent",
|
|
753
|
-
border: "1px solid var(--twd-border-light)",
|
|
754
|
-
borderRadius: "var(--twd-border-radius)",
|
|
755
|
-
padding: "0",
|
|
756
|
-
cursor: "pointer",
|
|
757
|
-
verticalAlign: "middle",
|
|
758
|
-
fontSize: "var(--twd-font-size-sm)",
|
|
759
|
-
width: "24px",
|
|
760
|
-
height: "24px",
|
|
761
|
-
display: "flex",
|
|
762
|
-
alignItems: "center",
|
|
763
|
-
justifyContent: "center"
|
|
764
|
-
},
|
|
765
|
-
disabled: e.status === "running",
|
|
766
|
-
"data-testid": `run-test-button-${r}`,
|
|
767
|
-
children: e.status === "running" ? /* @__PURE__ */ _(_t, {}) : /* @__PURE__ */ _(ut, {})
|
|
768
|
-
}
|
|
769
|
-
)
|
|
770
|
-
]
|
|
771
|
-
}
|
|
772
|
-
),
|
|
773
|
-
e.logs && e.logs.length > 0 && /* @__PURE__ */ _(
|
|
774
|
-
"ul",
|
|
775
|
-
{
|
|
776
|
-
ref: o,
|
|
777
|
-
style: {
|
|
778
|
-
borderRadius: "var(--twd-border-radius)",
|
|
779
|
-
maxHeight: "260px",
|
|
780
|
-
overflowY: "auto",
|
|
781
|
-
padding: 0,
|
|
782
|
-
background: "var(--twd-background-secondary)",
|
|
783
|
-
listStyle: "none",
|
|
784
|
-
marginTop: "var(--twd-spacing-xs)",
|
|
785
|
-
textAlign: "left"
|
|
786
|
-
},
|
|
787
|
-
children: e.logs.map((p, s) => /* @__PURE__ */ _(mt, { log: p, index: s }, s))
|
|
788
|
-
}
|
|
789
|
-
)
|
|
772
|
+
/* @__PURE__ */ d("div", { style: h, children: [
|
|
773
|
+
/* @__PURE__ */ d("span", { style: W.nameSpan, children: /* @__PURE__ */ d(
|
|
774
|
+
Ve,
|
|
775
|
+
{
|
|
776
|
+
id: r,
|
|
777
|
+
name: e.name,
|
|
778
|
+
skip: e.skip,
|
|
779
|
+
only: e.only
|
|
780
|
+
}
|
|
781
|
+
) }),
|
|
782
|
+
/* @__PURE__ */ d(
|
|
783
|
+
"button",
|
|
784
|
+
{
|
|
785
|
+
onClick: () => n(r),
|
|
786
|
+
"aria-label": `Run ${e.name} test`,
|
|
787
|
+
style: W.button,
|
|
788
|
+
disabled: e.status === "running",
|
|
789
|
+
"data-testid": `run-test-button-${r}`,
|
|
790
|
+
children: e.status === "running" ? /* @__PURE__ */ d(gt, {}) : /* @__PURE__ */ d(mt, {})
|
|
791
|
+
}
|
|
792
|
+
)
|
|
793
|
+
] }),
|
|
794
|
+
e.logs && e.logs.length > 0 && /* @__PURE__ */ d("ul", { ref: s, style: W.logsList, children: e.logs.map((u, p) => /* @__PURE__ */ d(kt, { log: u, index: p }, p)) })
|
|
790
795
|
]
|
|
791
796
|
},
|
|
792
797
|
e.name
|
|
793
798
|
);
|
|
794
|
-
},
|
|
795
|
-
const [r, n] =
|
|
796
|
-
|
|
799
|
+
}, Tt = () => /* @__PURE__ */ d(Z, { className: "lucide-chevron-down-icon lucide-chevron-down", dataTestId: "chevron-down-icon", children: /* @__PURE__ */ d("path", { d: "m6 9 6 6 6-6" }) }), Et = () => /* @__PURE__ */ d(Z, { className: "lucide-chevron-right-icon lucide-chevron-right", dataTestId: "chevron-right-icon", children: /* @__PURE__ */ d("path", { d: "m9 18 6-6-6-6" }) }), Rt = ({ tests: e, runTest: t }) => {
|
|
800
|
+
const [r, n] = q({}), s = H(null), o = H(!1), l = (a) => n((h) => ({ ...h, [a]: !h[a] }));
|
|
801
|
+
_e(() => {
|
|
797
802
|
if (o.current) return;
|
|
798
803
|
const a = sessionStorage.getItem("twd-last-run-test-name");
|
|
799
804
|
if (!a) return;
|
|
800
|
-
const
|
|
801
|
-
const
|
|
802
|
-
if (
|
|
803
|
-
const
|
|
804
|
-
if (
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
top:
|
|
805
|
+
const h = setTimeout(() => {
|
|
806
|
+
const i = document.querySelector(`[data-test-name="${a}"]`);
|
|
807
|
+
if (i) {
|
|
808
|
+
const u = s.current?.closest('[data-testid="twd-sidebar"]');
|
|
809
|
+
if (u) {
|
|
810
|
+
const p = i.getBoundingClientRect(), _ = u.getBoundingClientRect(), g = u.scrollTop, v = p.top - _.top + g;
|
|
811
|
+
u.scrollTo({
|
|
812
|
+
top: v - 150,
|
|
808
813
|
// 150px offset from top
|
|
809
814
|
behavior: "smooth"
|
|
810
815
|
});
|
|
@@ -812,61 +817,75 @@ const pt = (e) => {
|
|
|
812
817
|
o.current = !0;
|
|
813
818
|
}
|
|
814
819
|
}, 100);
|
|
815
|
-
return () => clearTimeout(
|
|
820
|
+
return () => clearTimeout(h);
|
|
816
821
|
}, []);
|
|
817
|
-
const
|
|
822
|
+
const c = (a, h = 0) => {
|
|
818
823
|
if (a.type === "test")
|
|
819
|
-
return /* @__PURE__ */
|
|
820
|
-
|
|
824
|
+
return /* @__PURE__ */ d(
|
|
825
|
+
xt,
|
|
821
826
|
{
|
|
822
827
|
node: a,
|
|
823
|
-
depth:
|
|
828
|
+
depth: h,
|
|
824
829
|
id: a.id,
|
|
825
830
|
runTest: () => t(a.id)
|
|
826
831
|
},
|
|
827
832
|
a.id
|
|
828
833
|
);
|
|
829
|
-
const
|
|
830
|
-
return /* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
"
|
|
834
|
+
const i = r[a.id];
|
|
835
|
+
return /* @__PURE__ */ d("li", { style: { marginLeft: `calc(${h} * var(--twd-spacing-lg))` }, children: [
|
|
836
|
+
/* @__PURE__ */ d(
|
|
837
|
+
"div",
|
|
833
838
|
{
|
|
834
839
|
style: {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
justifyContent: "space-between",
|
|
841
|
-
marginBottom: "var(--twd-spacing-xs)",
|
|
842
|
-
gap: "var(--twd-spacing-sm)"
|
|
840
|
+
background: "var(--twd-describe-bg)",
|
|
841
|
+
borderLeft: "3px solid var(--twd-describe-border)",
|
|
842
|
+
borderRadius: "var(--twd-border-radius)",
|
|
843
|
+
padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
|
|
844
|
+
marginBottom: "var(--twd-spacing-sm)"
|
|
843
845
|
},
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
846
|
+
children: /* @__PURE__ */ d(
|
|
847
|
+
"span",
|
|
848
|
+
{
|
|
849
|
+
style: {
|
|
850
|
+
fontWeight: "var(--twd-font-weight-medium)",
|
|
851
|
+
fontSize: "var(--twd-font-size-sm)",
|
|
852
|
+
cursor: "pointer",
|
|
853
|
+
color: "var(--twd-describe-text)",
|
|
854
|
+
display: "flex",
|
|
855
|
+
alignItems: "center",
|
|
856
|
+
justifyContent: "space-between",
|
|
857
|
+
gap: "var(--twd-spacing-sm)",
|
|
858
|
+
textTransform: "uppercase",
|
|
859
|
+
letterSpacing: "0.05em"
|
|
860
|
+
},
|
|
861
|
+
"data-testid": `test-group-${a.name}`,
|
|
862
|
+
tabIndex: 0,
|
|
863
|
+
role: "button",
|
|
864
|
+
"aria-expanded": !i,
|
|
865
|
+
"aria-label": `${i ? "Expand" : "Collapse"} test suite ${a.name}`,
|
|
866
|
+
onClick: () => l(a.id),
|
|
867
|
+
children: [
|
|
868
|
+
/* @__PURE__ */ d(Ve, { id: a.id, name: a.name, skip: a.skip, only: a.only }),
|
|
869
|
+
i ? /* @__PURE__ */ d(Et, {}) : /* @__PURE__ */ d(Tt, {})
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
)
|
|
854
873
|
}
|
|
855
874
|
),
|
|
856
|
-
!
|
|
875
|
+
!i && a.childrenNodes && a.childrenNodes.length > 0 && /* @__PURE__ */ d("ul", { style: { listStyle: "none", padding: 0, margin: 0 }, children: a.childrenNodes.map((u) => c(u, h + 1)) })
|
|
857
876
|
] }, a.id);
|
|
858
|
-
}, f =
|
|
859
|
-
return /* @__PURE__ */
|
|
877
|
+
}, f = ft(e);
|
|
878
|
+
return /* @__PURE__ */ d(
|
|
860
879
|
"ul",
|
|
861
880
|
{
|
|
862
|
-
ref:
|
|
881
|
+
ref: s,
|
|
863
882
|
style: { listStyle: "none", padding: 0, margin: 0 },
|
|
864
883
|
role: "list",
|
|
865
884
|
"aria-label": "Test list",
|
|
866
|
-
children: f.map((a) =>
|
|
885
|
+
children: f.map((a) => c(a))
|
|
867
886
|
}
|
|
868
887
|
);
|
|
869
|
-
},
|
|
888
|
+
}, $t = {
|
|
870
889
|
left: {
|
|
871
890
|
left: 0,
|
|
872
891
|
borderTopRightRadius: "var(--twd-border-radius-lg)",
|
|
@@ -881,7 +900,7 @@ const pt = (e) => {
|
|
|
881
900
|
borderTopRightRadius: "0",
|
|
882
901
|
borderBottomRightRadius: "0"
|
|
883
902
|
}
|
|
884
|
-
},
|
|
903
|
+
}, Ct = ({ setOpen: e, position: t }) => /* @__PURE__ */ d(
|
|
885
904
|
"button",
|
|
886
905
|
{
|
|
887
906
|
"aria-label": "Open TWD sidebar",
|
|
@@ -894,19 +913,19 @@ const pt = (e) => {
|
|
|
894
913
|
padding: "var(--twd-spacing-sm) 10px",
|
|
895
914
|
cursor: "pointer",
|
|
896
915
|
fontSize: "var(--twd-font-size-sm)",
|
|
897
|
-
|
|
916
|
+
...$t[t]
|
|
898
917
|
},
|
|
899
918
|
onClick: () => e(!0),
|
|
900
919
|
children: "TWD"
|
|
901
920
|
}
|
|
902
|
-
),
|
|
903
|
-
|
|
921
|
+
), It = ({ isOpen: e, position: t }) => {
|
|
922
|
+
_e(() => {
|
|
904
923
|
const r = document.documentElement, n = getComputedStyle(document.documentElement).getPropertyValue("--twd-sidebar-width") || "280px";
|
|
905
924
|
return e ? t === "left" ? r.style.marginLeft = n : r.style.marginRight = n : (r.style.marginRight = "0", r.style.marginLeft = "0"), () => {
|
|
906
925
|
r.style.marginRight = "0", r.style.marginLeft = "0";
|
|
907
926
|
};
|
|
908
927
|
}, [e, t]);
|
|
909
|
-
},
|
|
928
|
+
}, At = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
|
|
910
929
|
handlers: /* @__PURE__ */ new Map(),
|
|
911
930
|
beforeEachHooks: /* @__PURE__ */ new Map(),
|
|
912
931
|
afterEachHooks: /* @__PURE__ */ new Map(),
|
|
@@ -916,74 +935,74 @@ const pt = (e) => {
|
|
|
916
935
|
beforeEachHooks: /* @__PURE__ */ new Map(),
|
|
917
936
|
afterEachHooks: /* @__PURE__ */ new Map(),
|
|
918
937
|
stack: []
|
|
919
|
-
},
|
|
938
|
+
}, ue = At(), S = ue.handlers, $e = ue.beforeEachHooks, Ce = ue.afterEachHooks, Lt = (e) => {
|
|
920
939
|
const t = [], r = [];
|
|
921
940
|
let n = e;
|
|
922
941
|
for (; n; )
|
|
923
|
-
|
|
942
|
+
$e.has(n) && t.unshift(...$e.get(n)), Ce.has(n) && r.push(...Ce.get(n)), n = S.get(n)?.parent;
|
|
924
943
|
return { before: t, after: r };
|
|
925
|
-
},
|
|
926
|
-
const t =
|
|
927
|
-
return t ? t.only ? !0 : t.children ? t.children.some((r) =>
|
|
928
|
-
},
|
|
929
|
-
let t =
|
|
944
|
+
}, se = (e) => {
|
|
945
|
+
const t = S.get(e);
|
|
946
|
+
return t ? t.only ? !0 : t.children ? t.children.some((r) => se(r)) : !1 : !1;
|
|
947
|
+
}, Mt = (e) => {
|
|
948
|
+
let t = S.get(e);
|
|
930
949
|
for (; t?.parent; ) {
|
|
931
|
-
const r =
|
|
950
|
+
const r = S.get(t.parent);
|
|
932
951
|
if (r?.only) return !0;
|
|
933
952
|
t = r;
|
|
934
953
|
}
|
|
935
954
|
return !1;
|
|
936
|
-
},
|
|
937
|
-
let t =
|
|
955
|
+
}, Ie = (e) => {
|
|
956
|
+
let t = S.get(e);
|
|
938
957
|
for (; t; ) {
|
|
939
958
|
if (t.skip) return !0;
|
|
940
959
|
if (!t.parent) break;
|
|
941
|
-
t =
|
|
960
|
+
t = S.get(t.parent);
|
|
942
961
|
}
|
|
943
962
|
return !1;
|
|
944
963
|
};
|
|
945
|
-
class
|
|
946
|
-
events;
|
|
964
|
+
class Je {
|
|
947
965
|
constructor(t) {
|
|
966
|
+
fe(this, "events");
|
|
948
967
|
this.events = t;
|
|
949
968
|
}
|
|
950
969
|
async runAll() {
|
|
951
|
-
const t = Array.from(
|
|
970
|
+
const t = Array.from(S.values()).filter(
|
|
952
971
|
(n) => !n.parent && n.type === "suite"
|
|
953
|
-
), r = Array.from(
|
|
972
|
+
), r = Array.from(S.values()).some((n) => n.only);
|
|
954
973
|
for (const n of t)
|
|
955
974
|
await this.runSuite(n, r);
|
|
956
|
-
return
|
|
975
|
+
return S;
|
|
957
976
|
}
|
|
958
977
|
async runSingle(t) {
|
|
959
|
-
const r =
|
|
978
|
+
const r = S.get(t);
|
|
960
979
|
if (!r || r.type !== "test") return;
|
|
961
980
|
await this.runTest(r, !1);
|
|
962
981
|
}
|
|
963
982
|
async runSuite(t, r) {
|
|
964
|
-
if (
|
|
983
|
+
if (Ie(t.id) && !se(t.id)) {
|
|
965
984
|
this.events.onSkip?.(t);
|
|
966
985
|
return;
|
|
967
986
|
}
|
|
968
|
-
if (r && !
|
|
987
|
+
if (r && !se(t.id)) return;
|
|
969
988
|
this.events.onSuiteStart?.(t);
|
|
970
|
-
const
|
|
971
|
-
for (const o of
|
|
989
|
+
const s = (t.children || []).map((o) => S.get(o));
|
|
990
|
+
for (const o of s)
|
|
972
991
|
o.type === "suite" ? await this.runSuite(o, r) : o.type === "test" && await this.runTest(o, r);
|
|
973
992
|
this.events.onSuiteEnd?.(t);
|
|
974
993
|
}
|
|
975
994
|
async runTest(t, r) {
|
|
976
|
-
if ((
|
|
995
|
+
if ((Ie(t.id) || t.skip) && !t.only) {
|
|
977
996
|
this.events.onSkip(t);
|
|
978
997
|
return;
|
|
979
998
|
}
|
|
980
|
-
const
|
|
981
|
-
if (r && !t.only && !
|
|
999
|
+
const s = Mt(t.id);
|
|
1000
|
+
if (r && !t.only && !s) {
|
|
982
1001
|
this.events.onSkip(t);
|
|
983
1002
|
return;
|
|
984
1003
|
}
|
|
985
1004
|
this.events.onStart?.(t);
|
|
986
|
-
const o =
|
|
1005
|
+
const o = Lt(t.parent);
|
|
987
1006
|
try {
|
|
988
1007
|
for (const l of o.before) await l();
|
|
989
1008
|
t.logs = [], await t.handler(), this.events.onPass(t);
|
|
@@ -994,31 +1013,38 @@ class Ue {
|
|
|
994
1013
|
}
|
|
995
1014
|
}
|
|
996
1015
|
}
|
|
997
|
-
window.__testRunner =
|
|
998
|
-
const
|
|
1016
|
+
window.__testRunner = Je;
|
|
1017
|
+
const Wt = "1.4.3", Ht = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
|
|
999
1018
|
rules: []
|
|
1000
1019
|
}), window.__TWD_MOCK_STATE__) : {
|
|
1001
1020
|
rules: []
|
|
1002
|
-
},
|
|
1021
|
+
}, zt = Ht(), Xe = zt.rules;
|
|
1022
|
+
let Ae = !1;
|
|
1023
|
+
const Nt = async (e) => {
|
|
1024
|
+
if (Ae) {
|
|
1025
|
+
console.warn("[TWD] Request mocking already initialized");
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1003
1028
|
if ("serviceWorker" in navigator) {
|
|
1029
|
+
Ae = !0;
|
|
1004
1030
|
const t = e ?? "/mock-sw.js";
|
|
1005
|
-
await navigator.serviceWorker.register(`${t}?v=${
|
|
1031
|
+
await navigator.serviceWorker.register(`${t}?v=${Wt}`), navigator.serviceWorker.controller || await new Promise((r) => {
|
|
1006
1032
|
navigator.serviceWorker.addEventListener("controllerchange", r, { once: !0 });
|
|
1007
1033
|
}), navigator.serviceWorker.addEventListener("message", (r) => {
|
|
1008
1034
|
if (r.data?.type === "EXECUTED") {
|
|
1009
|
-
const { alias: n, request:
|
|
1010
|
-
o && (o.executed = !0, o.request =
|
|
1035
|
+
const { alias: n, request: s } = r.data, o = Xe.find((l) => l.alias === n);
|
|
1036
|
+
o && (o.executed = !0, o.request = s);
|
|
1011
1037
|
}
|
|
1012
1038
|
});
|
|
1013
1039
|
}
|
|
1014
|
-
},
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
] }),
|
|
1020
|
-
const e =
|
|
1021
|
-
return /* @__PURE__ */
|
|
1040
|
+
}, Bt = () => Xe, Dt = () => /* @__PURE__ */ d(Z, { className: "lucide-wifi-pen-icon lucide-wifi-pen", dataTestId: "wifi-pen-icon", children: [
|
|
1041
|
+
/* @__PURE__ */ d("path", { d: "M2 8.82a15 15 0 0 1 20 0" }),
|
|
1042
|
+
/* @__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" }),
|
|
1043
|
+
/* @__PURE__ */ d("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
|
|
1044
|
+
/* @__PURE__ */ d("path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" })
|
|
1045
|
+
] }), Pt = () => {
|
|
1046
|
+
const e = Bt(), t = e.filter((n) => n.executed);
|
|
1047
|
+
return /* @__PURE__ */ d(
|
|
1022
1048
|
"button",
|
|
1023
1049
|
{
|
|
1024
1050
|
onClick: () => {
|
|
@@ -1043,15 +1069,15 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1043
1069
|
boxShadow: "var(--twd-shadow-sm)"
|
|
1044
1070
|
},
|
|
1045
1071
|
children: [
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ d(Dt, {}),
|
|
1073
|
+
/* @__PURE__ */ d("span", { style: { flex: 1 }, children: [
|
|
1048
1074
|
"Rules: ",
|
|
1049
1075
|
t.length,
|
|
1050
1076
|
"/",
|
|
1051
1077
|
e.length,
|
|
1052
1078
|
" triggered"
|
|
1053
1079
|
] }),
|
|
1054
|
-
/* @__PURE__ */
|
|
1080
|
+
/* @__PURE__ */ d("span", { style: {
|
|
1055
1081
|
fontSize: "var(--twd-font-size-xs)",
|
|
1056
1082
|
color: "var(--twd-text)",
|
|
1057
1083
|
fontWeight: "var(--twd-font-weight-medium)"
|
|
@@ -1059,7 +1085,7 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1059
1085
|
]
|
|
1060
1086
|
}
|
|
1061
1087
|
);
|
|
1062
|
-
},
|
|
1088
|
+
}, Ft = (e) => e instanceof Error && "actual" in e && "expected" in e, Ge = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
|
|
1063
1089
|
type: "diff",
|
|
1064
1090
|
actual: e.actual,
|
|
1065
1091
|
expected: e.expected,
|
|
@@ -1067,64 +1093,88 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1067
1093
|
} : {
|
|
1068
1094
|
type: "message",
|
|
1069
1095
|
message: e.message
|
|
1070
|
-
},
|
|
1071
|
-
const t =
|
|
1096
|
+
}, Ot = (e) => {
|
|
1097
|
+
const t = Ge(e);
|
|
1072
1098
|
if (t.type === "diff") {
|
|
1073
1099
|
const r = t.operator || "unknown";
|
|
1074
1100
|
console.error(`Assertion failed with operator: ${r}`), console.group("Expected:"), console.log(t.expected), console.groupEnd(), console.group("Actual:"), console.log(t.actual), console.groupEnd();
|
|
1075
1101
|
} else
|
|
1076
1102
|
console.error(t.message);
|
|
1077
|
-
},
|
|
1103
|
+
}, jt = (e) => {
|
|
1104
|
+
if (e.status === "pass")
|
|
1105
|
+
return `Test "${e.name}" passed.`;
|
|
1106
|
+
if (e.status === "fail") {
|
|
1107
|
+
if (!e.logs || e.logs.length === 0)
|
|
1108
|
+
return `Test "${e.name}" failed.`;
|
|
1109
|
+
const t = e.logs[e.logs.length - 1];
|
|
1110
|
+
try {
|
|
1111
|
+
const r = JSON.parse(t);
|
|
1112
|
+
return r.type === R.CHAI_MESSAGE || r.type === R.ERROR ? `Test "${e.name}" failed. ${r.message}` : r.type === R.CHAI_DIFF ? `Test "${e.name}" failed. Expected value does not match actual value.` : `Test "${e.name}" failed.`;
|
|
1113
|
+
} catch {
|
|
1114
|
+
return `Test "${e.name}" failed. ${t}`;
|
|
1115
|
+
}
|
|
1116
|
+
} else if (e.status === "skip")
|
|
1117
|
+
return `Test "${e.name}" skipped.`;
|
|
1118
|
+
return "";
|
|
1119
|
+
}, Ut = (e) => {
|
|
1120
|
+
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 = [];
|
|
1121
|
+
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(", ") + ".");
|
|
1122
|
+
}, qt = {
|
|
1078
1123
|
left: { left: 0, borderRight: "1px solid var(--twd-border)" },
|
|
1079
1124
|
right: { right: 0, borderLeft: "1px solid var(--twd-border)" }
|
|
1080
|
-
},
|
|
1081
|
-
const [r, n] =
|
|
1082
|
-
|
|
1083
|
-
const l = new
|
|
1084
|
-
onStart: (
|
|
1085
|
-
|
|
1125
|
+
}, Vt = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Jt = (e) => sessionStorage.getItem("twd-sidebar-open") ? sessionStorage.getItem("twd-sidebar-open") === "true" : e, Xt = ({ open: e, position: t = "left" }) => {
|
|
1126
|
+
const [r, n] = q(0), [s, o] = q(Jt(e));
|
|
1127
|
+
It({ isOpen: s, position: t });
|
|
1128
|
+
const [l, c] = q(""), f = new Je({
|
|
1129
|
+
onStart: (_) => {
|
|
1130
|
+
_.status = "running", n((g) => g + 1);
|
|
1086
1131
|
},
|
|
1087
|
-
onPass: (
|
|
1088
|
-
|
|
1132
|
+
onPass: (_) => {
|
|
1133
|
+
_.status = "pass", n((g) => g + 1);
|
|
1089
1134
|
},
|
|
1090
|
-
onFail: (
|
|
1091
|
-
if (
|
|
1092
|
-
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
type:
|
|
1096
|
-
expected:
|
|
1097
|
-
actual:
|
|
1098
|
-
})) :
|
|
1099
|
-
type:
|
|
1100
|
-
message: `Test failed: ${
|
|
1135
|
+
onFail: (_, g) => {
|
|
1136
|
+
if (_.status = "fail", console.group(`%c❌ Test failed: ${_.name}`, "color: red; font-weight: bold;"), Ft(g)) {
|
|
1137
|
+
Ot(g);
|
|
1138
|
+
const v = Ge(g);
|
|
1139
|
+
v.type === "diff" ? _.logs.push(JSON.stringify({
|
|
1140
|
+
type: R.CHAI_DIFF,
|
|
1141
|
+
expected: v.expected,
|
|
1142
|
+
actual: v.actual
|
|
1143
|
+
})) : _.logs.push(JSON.stringify({
|
|
1144
|
+
type: R.CHAI_MESSAGE,
|
|
1145
|
+
message: `Test failed: ${v.message}`
|
|
1101
1146
|
}));
|
|
1102
1147
|
} else
|
|
1103
|
-
console.error(
|
|
1104
|
-
type:
|
|
1105
|
-
message: `Test failed: ${
|
|
1148
|
+
console.error(g.message), _.logs.push(JSON.stringify({
|
|
1149
|
+
type: R.ERROR,
|
|
1150
|
+
message: `Test failed: ${g.message}`
|
|
1106
1151
|
}));
|
|
1107
|
-
console.groupEnd(), n((
|
|
1152
|
+
console.groupEnd(), n((v) => v + 1);
|
|
1108
1153
|
},
|
|
1109
|
-
onSkip: (
|
|
1110
|
-
|
|
1154
|
+
onSkip: (_) => {
|
|
1155
|
+
_.status = "skip", n((g) => g + 1);
|
|
1111
1156
|
}
|
|
1112
|
-
}),
|
|
1113
|
-
o(
|
|
1114
|
-
},
|
|
1115
|
-
sessionStorage.removeItem("twd-last-run-test-name"), await
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1157
|
+
}), a = (_) => {
|
|
1158
|
+
o(_), sessionStorage.setItem("twd-sidebar-open", _.toString());
|
|
1159
|
+
}, h = async () => {
|
|
1160
|
+
c(""), sessionStorage.removeItem("twd-last-run-test-name"), await f.runAll();
|
|
1161
|
+
const _ = Ut(u);
|
|
1162
|
+
c(_);
|
|
1163
|
+
}, i = async (_) => {
|
|
1164
|
+
const g = Array.from(S.values()).filter((m) => m.type === "test").find((m) => m.id === _);
|
|
1165
|
+
if (!g) return;
|
|
1166
|
+
c(""), sessionStorage.setItem("twd-last-run-test-name", g.name), await f.runSingle(g.id);
|
|
1167
|
+
const v = jt(g);
|
|
1168
|
+
c(v);
|
|
1169
|
+
}, u = Array.from(S.values());
|
|
1170
|
+
if (!s)
|
|
1171
|
+
return /* @__PURE__ */ d(Ct, { position: t, setOpen: a });
|
|
1172
|
+
const p = u.filter((_) => _.type === "test").length;
|
|
1173
|
+
return /* @__PURE__ */ d(
|
|
1124
1174
|
"div",
|
|
1125
1175
|
{
|
|
1126
1176
|
style: {
|
|
1127
|
-
fontFamily:
|
|
1177
|
+
fontFamily: Vt,
|
|
1128
1178
|
position: "fixed",
|
|
1129
1179
|
top: 0,
|
|
1130
1180
|
bottom: 0,
|
|
@@ -1135,13 +1185,16 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1135
1185
|
boxShadow: "var(--twd-shadow)",
|
|
1136
1186
|
textAlign: "left",
|
|
1137
1187
|
zIndex: "var(--twd-z-index-sidebar)",
|
|
1138
|
-
|
|
1188
|
+
pointerEvents: "all",
|
|
1189
|
+
isolation: "isolate",
|
|
1190
|
+
...qt[t]
|
|
1139
1191
|
},
|
|
1140
1192
|
"data-testid": "twd-sidebar",
|
|
1141
1193
|
role: "complementary",
|
|
1142
1194
|
"aria-label": "Test While Developing sidebar",
|
|
1143
1195
|
children: [
|
|
1144
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ d("div", { "aria-live": "polite", "aria-atomic": "true", style: { position: "absolute", width: "1px", height: "1px", margin: "-1px", border: "0", padding: "0", overflow: "hidden", clip: "rect(0 0 0 0)" }, children: l }),
|
|
1197
|
+
/* @__PURE__ */ d("div", { style: {
|
|
1145
1198
|
padding: "var(--twd-spacing-md)",
|
|
1146
1199
|
background: "var(--twd-background)",
|
|
1147
1200
|
position: "sticky",
|
|
@@ -1149,16 +1202,16 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1149
1202
|
zIndex: "var(--twd-z-index-sticky)",
|
|
1150
1203
|
borderBottom: "1px solid var(--twd-border)"
|
|
1151
1204
|
}, children: [
|
|
1152
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ d("div", { style: {
|
|
1153
1206
|
display: "flex",
|
|
1154
1207
|
justifyContent: "space-between",
|
|
1155
1208
|
alignItems: "center",
|
|
1156
1209
|
marginBottom: "var(--twd-spacing-xl)"
|
|
1157
1210
|
}, children: [
|
|
1158
|
-
/* @__PURE__ */
|
|
1211
|
+
/* @__PURE__ */ d(
|
|
1159
1212
|
"button",
|
|
1160
1213
|
{
|
|
1161
|
-
onClick:
|
|
1214
|
+
onClick: h,
|
|
1162
1215
|
style: {
|
|
1163
1216
|
background: "var(--twd-button-primary)",
|
|
1164
1217
|
color: "var(--twd-button-primary-text)",
|
|
@@ -1170,7 +1223,7 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1170
1223
|
children: "Run All"
|
|
1171
1224
|
}
|
|
1172
1225
|
),
|
|
1173
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ d(
|
|
1174
1227
|
"button",
|
|
1175
1228
|
{
|
|
1176
1229
|
"aria-label": "Close sidebar",
|
|
@@ -1182,12 +1235,12 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1182
1235
|
paddingRight: "0",
|
|
1183
1236
|
paddingLeft: "0"
|
|
1184
1237
|
},
|
|
1185
|
-
onClick: () =>
|
|
1238
|
+
onClick: () => a(!1),
|
|
1186
1239
|
children: "✖"
|
|
1187
1240
|
}
|
|
1188
1241
|
)
|
|
1189
1242
|
] }),
|
|
1190
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ d("div", { style: {
|
|
1191
1244
|
display: "flex",
|
|
1192
1245
|
justifyContent: "space-between",
|
|
1193
1246
|
alignItems: "center",
|
|
@@ -1195,55 +1248,55 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
|
|
|
1195
1248
|
color: "var(--twd-text-secondary)",
|
|
1196
1249
|
marginBottom: "10px"
|
|
1197
1250
|
}, children: [
|
|
1198
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ d("span", { style: { color: "var(--twd-text)" }, children: [
|
|
1199
1252
|
"Total: ",
|
|
1200
|
-
|
|
1253
|
+
p
|
|
1201
1254
|
] }),
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
/* @__PURE__ */
|
|
1255
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", gap: "var(--twd-spacing-xs)" }, children: [
|
|
1256
|
+
/* @__PURE__ */ d("span", { style: { color: "var(--twd-success)" }, children: [
|
|
1204
1257
|
"✓ ",
|
|
1205
|
-
|
|
1258
|
+
u.filter((_) => _.status === "pass").length
|
|
1206
1259
|
] }),
|
|
1207
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ d("span", { style: { color: "var(--twd-error)" }, children: [
|
|
1208
1261
|
"✗ ",
|
|
1209
|
-
|
|
1262
|
+
u.filter((_) => _.status === "fail").length
|
|
1210
1263
|
] })
|
|
1211
1264
|
] })
|
|
1212
1265
|
] }),
|
|
1213
|
-
/* @__PURE__ */
|
|
1266
|
+
/* @__PURE__ */ d(Pt, {})
|
|
1214
1267
|
] }),
|
|
1215
|
-
/* @__PURE__ */
|
|
1216
|
-
|
|
1268
|
+
/* @__PURE__ */ d("div", { style: { padding: "var(--twd-spacing-md)" }, children: /* @__PURE__ */ d(
|
|
1269
|
+
Rt,
|
|
1217
1270
|
{
|
|
1218
|
-
tests:
|
|
1219
|
-
name:
|
|
1220
|
-
depth:
|
|
1221
|
-
status:
|
|
1222
|
-
logs:
|
|
1223
|
-
id:
|
|
1224
|
-
parent:
|
|
1225
|
-
type:
|
|
1226
|
-
only:
|
|
1227
|
-
skip:
|
|
1271
|
+
tests: u.map((_) => ({
|
|
1272
|
+
name: _.name,
|
|
1273
|
+
depth: _.depth,
|
|
1274
|
+
status: _.status,
|
|
1275
|
+
logs: _.logs,
|
|
1276
|
+
id: _.id,
|
|
1277
|
+
parent: _.parent,
|
|
1278
|
+
type: _.type,
|
|
1279
|
+
only: _.only,
|
|
1280
|
+
skip: _.skip
|
|
1228
1281
|
})),
|
|
1229
|
-
runTest:
|
|
1282
|
+
runTest: i
|
|
1230
1283
|
}
|
|
1231
1284
|
) })
|
|
1232
1285
|
]
|
|
1233
1286
|
}
|
|
1234
1287
|
);
|
|
1235
|
-
},
|
|
1288
|
+
}, Gt = (e) => ({
|
|
1236
1289
|
render: (t) => {
|
|
1237
|
-
|
|
1290
|
+
ot(t, e);
|
|
1238
1291
|
}
|
|
1239
|
-
}),
|
|
1240
|
-
const { open: r = !0, position: n = "left", serviceWorker:
|
|
1241
|
-
|
|
1292
|
+
}), Kt = (e, t) => {
|
|
1293
|
+
const { open: r = !0, position: n = "left", serviceWorker: s = !0, serviceWorkerUrl: o = "/mock-sw.js", theme: l } = t || {};
|
|
1294
|
+
dt(e, /* @__PURE__ */ d(Xt, { open: r, position: n }), Gt, l), s && Nt(o).then(() => {
|
|
1242
1295
|
console.log("Request mocking initialized");
|
|
1243
|
-
}).catch((
|
|
1244
|
-
console.error("Error initializing request mocking:",
|
|
1296
|
+
}).catch((c) => {
|
|
1297
|
+
console.error("Error initializing request mocking:", c);
|
|
1245
1298
|
});
|
|
1246
1299
|
};
|
|
1247
1300
|
export {
|
|
1248
|
-
|
|
1301
|
+
Kt as initTWD
|
|
1249
1302
|
};
|