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