@devqubit/ui 0.1.11-beta.4 → 0.1.12

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/index.js CHANGED
@@ -1,106 +1,106 @@
1
- import Ds, { useContext as ss, createContext as ts, useState as P, useEffect as ne, useCallback as pe, useRef as Cs, forwardRef as rs } from "react";
2
- import { useLocation as pt, Link as Y, useSearchParams as Ie, useParams as ns, useNavigate as gt, Navigate as vt, createBrowserRouter as bt, RouterProvider as Nt } from "react-router-dom";
3
- var $e = { exports: {} }, Ne = {};
4
- var Ts;
5
- function yt() {
6
- if (Ts) return Ne;
7
- Ts = 1;
8
- var s = Ds, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
9
- function u(i, x, h) {
10
- var m, p = {}, y = null, M = null;
11
- h !== void 0 && (y = "" + h), x.key !== void 0 && (y = "" + x.key), x.ref !== void 0 && (M = x.ref);
12
- for (m in x) n.call(x, m) && !d.hasOwnProperty(m) && (p[m] = x[m]);
13
- if (i && i.defaultProps) for (m in x = i.defaultProps, x) p[m] === void 0 && (p[m] = x[m]);
14
- return { $$typeof: r, type: i, key: y, ref: M, props: p, _owner: o.current };
1
+ import Bt, { useContext as dt, createContext as ut, useState as T, useEffect as de, useCallback as me, useRef as De, forwardRef as ht, useMemo as ke } from "react";
2
+ import { useLocation as Rs, Link as se, useSearchParams as He, useParams as xt, useNavigate as Es, Navigate as ks, createBrowserRouter as Cs, RouterProvider as Ts } from "react-router-dom";
3
+ var Ge = { exports: {} }, Te = {};
4
+ var Ft;
5
+ function Ss() {
6
+ if (Ft) return Te;
7
+ Ft = 1;
8
+ var t = Bt, s = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
9
+ function c(i, u, h) {
10
+ var m, p = {}, b = null, D = null;
11
+ h !== void 0 && (b = "" + h), u.key !== void 0 && (b = "" + u.key), u.ref !== void 0 && (D = u.ref);
12
+ for (m in u) n.call(u, m) && !o.hasOwnProperty(m) && (p[m] = u[m]);
13
+ if (i && i.defaultProps) for (m in u = i.defaultProps, u) p[m] === void 0 && (p[m] = u[m]);
14
+ return { $$typeof: s, type: i, key: b, ref: D, props: p, _owner: l.current };
15
15
  }
16
- return Ne.Fragment = a, Ne.jsx = u, Ne.jsxs = u, Ne;
17
- }
18
- var ye = {};
19
- var ks;
20
- function _t() {
21
- return ks || (ks = 1, process.env.NODE_ENV !== "production" && (function() {
22
- var s = Ds, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), u = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), x = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), m = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), M = /* @__PURE__ */ Symbol.for("react.offscreen"), _ = Symbol.iterator, H = "@@iterator";
23
- function T(t) {
24
- if (t === null || typeof t != "object")
16
+ return Te.Fragment = a, Te.jsx = c, Te.jsxs = c, Te;
17
+ }
18
+ var Se = {};
19
+ var $t;
20
+ function Ps() {
21
+ return $t || ($t = 1, process.env.NODE_ENV !== "production" && (function() {
22
+ var t = Bt, s = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), l = /* @__PURE__ */ Symbol.for("react.strict_mode"), o = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), m = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), b = /* @__PURE__ */ Symbol.for("react.lazy"), D = /* @__PURE__ */ Symbol.for("react.offscreen"), g = Symbol.iterator, I = "@@iterator";
23
+ function E(r) {
24
+ if (r === null || typeof r != "object")
25
25
  return null;
26
- var l = _ && t[_] || t[H];
27
- return typeof l == "function" ? l : null;
26
+ var x = g && r[g] || r[I];
27
+ return typeof x == "function" ? x : null;
28
28
  }
29
- var I = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
- function k(t) {
29
+ var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
+ function S(r) {
31
31
  {
32
- for (var l = arguments.length, f = new Array(l > 1 ? l - 1 : 0), g = 1; g < l; g++)
33
- f[g - 1] = arguments[g];
34
- te("error", t, f);
32
+ for (var x = arguments.length, f = new Array(x > 1 ? x - 1 : 0), v = 1; v < x; v++)
33
+ f[v - 1] = arguments[v];
34
+ ie("error", r, f);
35
35
  }
36
36
  }
37
- function te(t, l, f) {
37
+ function ie(r, x, f) {
38
38
  {
39
- var g = I.ReactDebugCurrentFrame, E = g.getStackAddendum();
40
- E !== "" && (l += "%s", f = f.concat([E]));
41
- var C = f.map(function(R) {
39
+ var v = A.ReactDebugCurrentFrame, k = v.getStackAddendum();
40
+ k !== "" && (x += "%s", f = f.concat([k]));
41
+ var P = f.map(function(R) {
42
42
  return String(R);
43
43
  });
44
- C.unshift("Warning: " + l), Function.prototype.apply.call(console[t], console, C);
44
+ P.unshift("Warning: " + x), Function.prototype.apply.call(console[r], console, P);
45
45
  }
46
46
  }
47
- var ae = !1, J = !1, Z = !1, xe = !1, me = !1, ge;
48
- ge = /* @__PURE__ */ Symbol.for("react.module.reference");
49
- function Me(t) {
50
- return !!(typeof t == "string" || typeof t == "function" || t === n || t === d || me || t === o || t === h || t === m || xe || t === M || ae || J || Z || typeof t == "object" && t !== null && (t.$$typeof === y || t.$$typeof === p || t.$$typeof === u || t.$$typeof === i || t.$$typeof === x || // This needs to include all possible module reference object
47
+ var ce = !1, Z = !1, J = !1, y = !1, W = !1, ue;
48
+ ue = /* @__PURE__ */ Symbol.for("react.module.reference");
49
+ function V(r) {
50
+ return !!(typeof r == "string" || typeof r == "function" || r === n || r === o || W || r === l || r === h || r === m || y || r === D || ce || Z || J || typeof r == "object" && r !== null && (r.$$typeof === b || r.$$typeof === p || r.$$typeof === c || r.$$typeof === i || r.$$typeof === u || // This needs to include all possible module reference object
51
51
  // types supported by any Flight configuration anywhere since
52
52
  // we don't know which Flight build this will end up being used
53
53
  // with.
54
- t.$$typeof === ge || t.getModuleId !== void 0));
54
+ r.$$typeof === ue || r.getModuleId !== void 0));
55
55
  }
56
- function Ue(t, l, f) {
57
- var g = t.displayName;
58
- if (g)
59
- return g;
60
- var E = l.displayName || l.name || "";
61
- return E !== "" ? f + "(" + E + ")" : f;
56
+ function ee(r, x, f) {
57
+ var v = r.displayName;
58
+ if (v)
59
+ return v;
60
+ var k = x.displayName || x.name || "";
61
+ return k !== "" ? f + "(" + k + ")" : f;
62
62
  }
63
- function Te(t) {
64
- return t.displayName || "Context";
63
+ function je(r) {
64
+ return r.displayName || "Context";
65
65
  }
66
- function ee(t) {
67
- if (t == null)
66
+ function ne(r) {
67
+ if (r == null)
68
68
  return null;
69
- if (typeof t.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
70
- return t.displayName || t.name || null;
71
- if (typeof t == "string")
72
- return t;
73
- switch (t) {
69
+ if (typeof r.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
70
+ return r.displayName || r.name || null;
71
+ if (typeof r == "string")
72
+ return r;
73
+ switch (r) {
74
74
  case n:
75
75
  return "Fragment";
76
76
  case a:
77
77
  return "Portal";
78
- case d:
79
- return "Profiler";
80
78
  case o:
79
+ return "Profiler";
80
+ case l:
81
81
  return "StrictMode";
82
82
  case h:
83
83
  return "Suspense";
84
84
  case m:
85
85
  return "SuspenseList";
86
86
  }
87
- if (typeof t == "object")
88
- switch (t.$$typeof) {
87
+ if (typeof r == "object")
88
+ switch (r.$$typeof) {
89
89
  case i:
90
- var l = t;
91
- return Te(l) + ".Consumer";
90
+ var x = r;
91
+ return je(x) + ".Consumer";
92
+ case c:
93
+ var f = r;
94
+ return je(f._context) + ".Provider";
92
95
  case u:
93
- var f = t;
94
- return Te(f._context) + ".Provider";
95
- case x:
96
- return Ue(t, t.render, "ForwardRef");
96
+ return ee(r, r.render, "ForwardRef");
97
97
  case p:
98
- var g = t.displayName || null;
99
- return g !== null ? g : ee(t.type) || "Memo";
100
- case y: {
101
- var E = t, C = E._payload, R = E._init;
98
+ var v = r.displayName || null;
99
+ return v !== null ? v : ne(r.type) || "Memo";
100
+ case b: {
101
+ var k = r, P = k._payload, R = k._init;
102
102
  try {
103
- return ee(R(C));
103
+ return ne(R(P));
104
104
  } catch {
105
105
  return null;
106
106
  }
@@ -108,103 +108,103 @@ function _t() {
108
108
  }
109
109
  return null;
110
110
  }
111
- var w = Object.assign, S = 0, ke, ve, Pe, le, ls, os, ds;
112
- function us() {
111
+ var te = Object.assign, le = 0, C, L, pe, he, Le, ye, qe;
112
+ function gt() {
113
113
  }
114
- us.__reactDisabledLog = !0;
115
- function Ws() {
114
+ gt.__reactDisabledLog = !0;
115
+ function Qt() {
116
116
  {
117
- if (S === 0) {
118
- ke = console.log, ve = console.info, Pe = console.warn, le = console.error, ls = console.group, os = console.groupCollapsed, ds = console.groupEnd;
119
- var t = {
117
+ if (le === 0) {
118
+ C = console.log, L = console.info, pe = console.warn, he = console.error, Le = console.group, ye = console.groupCollapsed, qe = console.groupEnd;
119
+ var r = {
120
120
  configurable: !0,
121
121
  enumerable: !0,
122
- value: us,
122
+ value: gt,
123
123
  writable: !0
124
124
  };
125
125
  Object.defineProperties(console, {
126
- info: t,
127
- log: t,
128
- warn: t,
129
- error: t,
130
- group: t,
131
- groupCollapsed: t,
132
- groupEnd: t
126
+ info: r,
127
+ log: r,
128
+ warn: r,
129
+ error: r,
130
+ group: r,
131
+ groupCollapsed: r,
132
+ groupEnd: r
133
133
  });
134
134
  }
135
- S++;
135
+ le++;
136
136
  }
137
137
  }
138
- function Vs() {
138
+ function Zt() {
139
139
  {
140
- if (S--, S === 0) {
141
- var t = {
140
+ if (le--, le === 0) {
141
+ var r = {
142
142
  configurable: !0,
143
143
  enumerable: !0,
144
144
  writable: !0
145
145
  };
146
146
  Object.defineProperties(console, {
147
- log: w({}, t, {
148
- value: ke
147
+ log: te({}, r, {
148
+ value: C
149
149
  }),
150
- info: w({}, t, {
151
- value: ve
150
+ info: te({}, r, {
151
+ value: L
152
152
  }),
153
- warn: w({}, t, {
154
- value: Pe
153
+ warn: te({}, r, {
154
+ value: pe
155
155
  }),
156
- error: w({}, t, {
157
- value: le
156
+ error: te({}, r, {
157
+ value: he
158
158
  }),
159
- group: w({}, t, {
160
- value: ls
159
+ group: te({}, r, {
160
+ value: Le
161
161
  }),
162
- groupCollapsed: w({}, t, {
163
- value: os
162
+ groupCollapsed: te({}, r, {
163
+ value: ye
164
164
  }),
165
- groupEnd: w({}, t, {
166
- value: ds
165
+ groupEnd: te({}, r, {
166
+ value: qe
167
167
  })
168
168
  });
169
169
  }
170
- S < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
170
+ le < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
171
171
  }
172
172
  }
173
- var Ge = I.ReactCurrentDispatcher, We;
174
- function Se(t, l, f) {
173
+ var Je = A.ReactCurrentDispatcher, Xe;
174
+ function Ie(r, x, f) {
175
175
  {
176
- if (We === void 0)
176
+ if (Xe === void 0)
177
177
  try {
178
178
  throw Error();
179
- } catch (E) {
180
- var g = E.stack.trim().match(/\n( *(at )?)/);
181
- We = g && g[1] || "";
179
+ } catch (k) {
180
+ var v = k.stack.trim().match(/\n( *(at )?)/);
181
+ Xe = v && v[1] || "";
182
182
  }
183
183
  return `
184
- ` + We + t;
184
+ ` + Xe + r;
185
185
  }
186
186
  }
187
- var Ve = !1, De;
187
+ var Qe = !1, Be;
188
188
  {
189
- var zs = typeof WeakMap == "function" ? WeakMap : Map;
190
- De = new zs();
189
+ var es = typeof WeakMap == "function" ? WeakMap : Map;
190
+ Be = new es();
191
191
  }
192
- function hs(t, l) {
193
- if (!t || Ve)
192
+ function vt(r, x) {
193
+ if (!r || Qe)
194
194
  return "";
195
195
  {
196
- var f = De.get(t);
196
+ var f = Be.get(r);
197
197
  if (f !== void 0)
198
198
  return f;
199
199
  }
200
- var g;
201
- Ve = !0;
202
- var E = Error.prepareStackTrace;
200
+ var v;
201
+ Qe = !0;
202
+ var k = Error.prepareStackTrace;
203
203
  Error.prepareStackTrace = void 0;
204
- var C;
205
- C = Ge.current, Ge.current = null, Ws();
204
+ var P;
205
+ P = Je.current, Je.current = null, Qt();
206
206
  try {
207
- if (l) {
207
+ if (x) {
208
208
  var R = function() {
209
209
  throw Error();
210
210
  };
@@ -215,554 +215,557 @@ function _t() {
215
215
  }), typeof Reflect == "object" && Reflect.construct) {
216
216
  try {
217
217
  Reflect.construct(R, []);
218
- } catch (U) {
219
- g = U;
218
+ } catch (X) {
219
+ v = X;
220
220
  }
221
- Reflect.construct(t, [], R);
221
+ Reflect.construct(r, [], R);
222
222
  } else {
223
223
  try {
224
224
  R.call();
225
- } catch (U) {
226
- g = U;
225
+ } catch (X) {
226
+ v = X;
227
227
  }
228
- t.call(R.prototype);
228
+ r.call(R.prototype);
229
229
  }
230
230
  } else {
231
231
  try {
232
232
  throw Error();
233
- } catch (U) {
234
- g = U;
233
+ } catch (X) {
234
+ v = X;
235
235
  }
236
- t();
236
+ r();
237
237
  }
238
- } catch (U) {
239
- if (U && g && typeof U.stack == "string") {
240
- for (var v = U.stack.split(`
241
- `), q = g.stack.split(`
242
- `), A = v.length - 1, F = q.length - 1; A >= 1 && F >= 0 && v[A] !== q[F]; )
243
- F--;
244
- for (; A >= 1 && F >= 0; A--, F--)
245
- if (v[A] !== q[F]) {
246
- if (A !== 1 || F !== 1)
238
+ } catch (X) {
239
+ if (X && v && typeof X.stack == "string") {
240
+ for (var _ = X.stack.split(`
241
+ `), z = v.stack.split(`
242
+ `), O = _.length - 1, M = z.length - 1; O >= 1 && M >= 0 && _[O] !== z[M]; )
243
+ M--;
244
+ for (; O >= 1 && M >= 0; O--, M--)
245
+ if (_[O] !== z[M]) {
246
+ if (O !== 1 || M !== 1)
247
247
  do
248
- if (A--, F--, F < 0 || v[A] !== q[F]) {
249
- var X = `
250
- ` + v[A].replace(" at new ", " at ");
251
- return t.displayName && X.includes("<anonymous>") && (X = X.replace("<anonymous>", t.displayName)), typeof t == "function" && De.set(t, X), X;
248
+ if (O--, M--, M < 0 || _[O] !== z[M]) {
249
+ var ae = `
250
+ ` + _[O].replace(" at new ", " at ");
251
+ return r.displayName && ae.includes("<anonymous>") && (ae = ae.replace("<anonymous>", r.displayName)), typeof r == "function" && Be.set(r, ae), ae;
252
252
  }
253
- while (A >= 1 && F >= 0);
253
+ while (O >= 1 && M >= 0);
254
254
  break;
255
255
  }
256
256
  }
257
257
  } finally {
258
- Ve = !1, Ge.current = C, Vs(), Error.prepareStackTrace = E;
258
+ Qe = !1, Je.current = P, Zt(), Error.prepareStackTrace = k;
259
259
  }
260
- var je = t ? t.displayName || t.name : "", oe = je ? Se(je) : "";
261
- return typeof t == "function" && De.set(t, oe), oe;
260
+ var Ee = r ? r.displayName || r.name : "", Ne = Ee ? Ie(Ee) : "";
261
+ return typeof r == "function" && Be.set(r, Ne), Ne;
262
262
  }
263
- function Ys(t, l, f) {
264
- return hs(t, !1);
263
+ function ts(r, x, f) {
264
+ return vt(r, !1);
265
265
  }
266
- function Ks(t) {
267
- var l = t.prototype;
268
- return !!(l && l.isReactComponent);
266
+ function ss(r) {
267
+ var x = r.prototype;
268
+ return !!(x && x.isReactComponent);
269
269
  }
270
- function Ae(t, l, f) {
271
- if (t == null)
270
+ function Ue(r, x, f) {
271
+ if (r == null)
272
272
  return "";
273
- if (typeof t == "function")
274
- return hs(t, Ks(t));
275
- if (typeof t == "string")
276
- return Se(t);
277
- switch (t) {
273
+ if (typeof r == "function")
274
+ return vt(r, ss(r));
275
+ if (typeof r == "string")
276
+ return Ie(r);
277
+ switch (r) {
278
278
  case h:
279
- return Se("Suspense");
279
+ return Ie("Suspense");
280
280
  case m:
281
- return Se("SuspenseList");
281
+ return Ie("SuspenseList");
282
282
  }
283
- if (typeof t == "object")
284
- switch (t.$$typeof) {
285
- case x:
286
- return Ys(t.render);
283
+ if (typeof r == "object")
284
+ switch (r.$$typeof) {
285
+ case u:
286
+ return ts(r.render);
287
287
  case p:
288
- return Ae(t.type, l, f);
289
- case y: {
290
- var g = t, E = g._payload, C = g._init;
288
+ return Ue(r.type, x, f);
289
+ case b: {
290
+ var v = r, k = v._payload, P = v._init;
291
291
  try {
292
- return Ae(C(E), l, f);
292
+ return Ue(P(k), x, f);
293
293
  } catch {
294
294
  }
295
295
  }
296
296
  }
297
297
  return "";
298
298
  }
299
- var be = Object.prototype.hasOwnProperty, xs = {}, ms = I.ReactDebugCurrentFrame;
300
- function Fe(t) {
301
- if (t) {
302
- var l = t._owner, f = Ae(t.type, t._source, l ? l.type : null);
303
- ms.setExtraStackFrame(f);
299
+ var Ce = Object.prototype.hasOwnProperty, bt = {}, yt = A.ReactDebugCurrentFrame;
300
+ function We(r) {
301
+ if (r) {
302
+ var x = r._owner, f = Ue(r.type, r._source, x ? x.type : null);
303
+ yt.setExtraStackFrame(f);
304
304
  } else
305
- ms.setExtraStackFrame(null);
305
+ yt.setExtraStackFrame(null);
306
306
  }
307
- function Hs(t, l, f, g, E) {
307
+ function rs(r, x, f, v, k) {
308
308
  {
309
- var C = Function.call.bind(be);
310
- for (var R in t)
311
- if (C(t, R)) {
312
- var v = void 0;
309
+ var P = Function.call.bind(Ce);
310
+ for (var R in r)
311
+ if (P(r, R)) {
312
+ var _ = void 0;
313
313
  try {
314
- if (typeof t[R] != "function") {
315
- var q = Error((g || "React class") + ": " + f + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
316
- throw q.name = "Invariant Violation", q;
314
+ if (typeof r[R] != "function") {
315
+ var z = Error((v || "React class") + ": " + f + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
316
+ throw z.name = "Invariant Violation", z;
317
317
  }
318
- v = t[R](l, R, g, f, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
319
- } catch (A) {
320
- v = A;
318
+ _ = r[R](x, R, v, f, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
319
+ } catch (O) {
320
+ _ = O;
321
321
  }
322
- v && !(v instanceof Error) && (Fe(E), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", f, R, typeof v), Fe(null)), v instanceof Error && !(v.message in xs) && (xs[v.message] = !0, Fe(E), k("Failed %s type: %s", f, v.message), Fe(null));
322
+ _ && !(_ instanceof Error) && (We(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", f, R, typeof _), We(null)), _ instanceof Error && !(_.message in bt) && (bt[_.message] = !0, We(k), S("Failed %s type: %s", f, _.message), We(null));
323
323
  }
324
324
  }
325
325
  }
326
- var Js = Array.isArray;
327
- function ze(t) {
328
- return Js(t);
326
+ var ns = Array.isArray;
327
+ function Ze(r) {
328
+ return ns(r);
329
329
  }
330
- function Xs(t) {
330
+ function as(r) {
331
331
  {
332
- var l = typeof Symbol == "function" && Symbol.toStringTag, f = l && t[Symbol.toStringTag] || t.constructor.name || "Object";
332
+ var x = typeof Symbol == "function" && Symbol.toStringTag, f = x && r[Symbol.toStringTag] || r.constructor.name || "Object";
333
333
  return f;
334
334
  }
335
335
  }
336
- function Qs(t) {
336
+ function is(r) {
337
337
  try {
338
- return fs(t), !1;
338
+ return Nt(r), !1;
339
339
  } catch {
340
340
  return !0;
341
341
  }
342
342
  }
343
- function fs(t) {
344
- return "" + t;
343
+ function Nt(r) {
344
+ return "" + r;
345
345
  }
346
- function js(t) {
347
- if (Qs(t))
348
- return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xs(t)), fs(t);
346
+ function _t(r) {
347
+ if (is(r))
348
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", as(r)), Nt(r);
349
349
  }
350
- var ps = I.ReactCurrentOwner, Zs = {
350
+ var wt = A.ReactCurrentOwner, cs = {
351
351
  key: !0,
352
352
  ref: !0,
353
353
  __self: !0,
354
354
  __source: !0
355
- }, gs, vs;
356
- function et(t) {
357
- if (be.call(t, "ref")) {
358
- var l = Object.getOwnPropertyDescriptor(t, "ref").get;
359
- if (l && l.isReactWarning)
355
+ }, Rt, Et;
356
+ function ls(r) {
357
+ if (Ce.call(r, "ref")) {
358
+ var x = Object.getOwnPropertyDescriptor(r, "ref").get;
359
+ if (x && x.isReactWarning)
360
360
  return !1;
361
361
  }
362
- return t.ref !== void 0;
362
+ return r.ref !== void 0;
363
363
  }
364
- function st(t) {
365
- if (be.call(t, "key")) {
366
- var l = Object.getOwnPropertyDescriptor(t, "key").get;
367
- if (l && l.isReactWarning)
364
+ function os(r) {
365
+ if (Ce.call(r, "key")) {
366
+ var x = Object.getOwnPropertyDescriptor(r, "key").get;
367
+ if (x && x.isReactWarning)
368
368
  return !1;
369
369
  }
370
- return t.key !== void 0;
370
+ return r.key !== void 0;
371
371
  }
372
- function tt(t, l) {
373
- typeof t.ref == "string" && ps.current;
372
+ function ds(r, x) {
373
+ typeof r.ref == "string" && wt.current;
374
374
  }
375
- function rt(t, l) {
375
+ function us(r, x) {
376
376
  {
377
377
  var f = function() {
378
- gs || (gs = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
378
+ Rt || (Rt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
379
379
  };
380
- f.isReactWarning = !0, Object.defineProperty(t, "key", {
380
+ f.isReactWarning = !0, Object.defineProperty(r, "key", {
381
381
  get: f,
382
382
  configurable: !0
383
383
  });
384
384
  }
385
385
  }
386
- function nt(t, l) {
386
+ function hs(r, x) {
387
387
  {
388
388
  var f = function() {
389
- vs || (vs = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
389
+ Et || (Et = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
390
390
  };
391
- f.isReactWarning = !0, Object.defineProperty(t, "ref", {
391
+ f.isReactWarning = !0, Object.defineProperty(r, "ref", {
392
392
  get: f,
393
393
  configurable: !0
394
394
  });
395
395
  }
396
396
  }
397
- var at = function(t, l, f, g, E, C, R) {
398
- var v = {
397
+ var xs = function(r, x, f, v, k, P, R) {
398
+ var _ = {
399
399
  // This tag allows us to uniquely identify this as a React Element
400
- $$typeof: r,
400
+ $$typeof: s,
401
401
  // Built-in properties that belong on the element
402
- type: t,
403
- key: l,
402
+ type: r,
403
+ key: x,
404
404
  ref: f,
405
405
  props: R,
406
406
  // Record the component responsible for creating this element.
407
- _owner: C
407
+ _owner: P
408
408
  };
409
- return v._store = {}, Object.defineProperty(v._store, "validated", {
409
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
410
410
  configurable: !1,
411
411
  enumerable: !1,
412
412
  writable: !0,
413
413
  value: !1
414
- }), Object.defineProperty(v, "_self", {
414
+ }), Object.defineProperty(_, "_self", {
415
415
  configurable: !1,
416
416
  enumerable: !1,
417
417
  writable: !1,
418
- value: g
419
- }), Object.defineProperty(v, "_source", {
418
+ value: v
419
+ }), Object.defineProperty(_, "_source", {
420
420
  configurable: !1,
421
421
  enumerable: !1,
422
422
  writable: !1,
423
- value: E
424
- }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
423
+ value: k
424
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
425
425
  };
426
- function it(t, l, f, g, E) {
426
+ function ms(r, x, f, v, k) {
427
427
  {
428
- var C, R = {}, v = null, q = null;
429
- f !== void 0 && (js(f), v = "" + f), st(l) && (js(l.key), v = "" + l.key), et(l) && (q = l.ref, tt(l, E));
430
- for (C in l)
431
- be.call(l, C) && !Zs.hasOwnProperty(C) && (R[C] = l[C]);
432
- if (t && t.defaultProps) {
433
- var A = t.defaultProps;
434
- for (C in A)
435
- R[C] === void 0 && (R[C] = A[C]);
428
+ var P, R = {}, _ = null, z = null;
429
+ f !== void 0 && (_t(f), _ = "" + f), os(x) && (_t(x.key), _ = "" + x.key), ls(x) && (z = x.ref, ds(x, k));
430
+ for (P in x)
431
+ Ce.call(x, P) && !cs.hasOwnProperty(P) && (R[P] = x[P]);
432
+ if (r && r.defaultProps) {
433
+ var O = r.defaultProps;
434
+ for (P in O)
435
+ R[P] === void 0 && (R[P] = O[P]);
436
436
  }
437
- if (v || q) {
438
- var F = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
439
- v && rt(R, F), q && nt(R, F);
437
+ if (_ || z) {
438
+ var M = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
439
+ _ && us(R, M), z && hs(R, M);
440
440
  }
441
- return at(t, v, q, E, g, ps.current, R);
441
+ return xs(r, _, z, k, v, wt.current, R);
442
442
  }
443
443
  }
444
- var Ye = I.ReactCurrentOwner, bs = I.ReactDebugCurrentFrame;
445
- function fe(t) {
446
- if (t) {
447
- var l = t._owner, f = Ae(t.type, t._source, l ? l.type : null);
448
- bs.setExtraStackFrame(f);
444
+ var et = A.ReactCurrentOwner, kt = A.ReactDebugCurrentFrame;
445
+ function Re(r) {
446
+ if (r) {
447
+ var x = r._owner, f = Ue(r.type, r._source, x ? x.type : null);
448
+ kt.setExtraStackFrame(f);
449
449
  } else
450
- bs.setExtraStackFrame(null);
450
+ kt.setExtraStackFrame(null);
451
451
  }
452
- var Ke;
453
- Ke = !1;
454
- function He(t) {
455
- return typeof t == "object" && t !== null && t.$$typeof === r;
452
+ var tt;
453
+ tt = !1;
454
+ function st(r) {
455
+ return typeof r == "object" && r !== null && r.$$typeof === s;
456
456
  }
457
- function Ns() {
457
+ function Ct() {
458
458
  {
459
- if (Ye.current) {
460
- var t = ee(Ye.current.type);
461
- if (t)
459
+ if (et.current) {
460
+ var r = ne(et.current.type);
461
+ if (r)
462
462
  return `
463
463
 
464
- Check the render method of \`` + t + "`.";
464
+ Check the render method of \`` + r + "`.";
465
465
  }
466
466
  return "";
467
467
  }
468
468
  }
469
- function ct(t) {
469
+ function fs(r) {
470
470
  return "";
471
471
  }
472
- var ys = {};
473
- function lt(t) {
472
+ var Tt = {};
473
+ function js(r) {
474
474
  {
475
- var l = Ns();
476
- if (!l) {
477
- var f = typeof t == "string" ? t : t.displayName || t.name;
478
- f && (l = `
475
+ var x = Ct();
476
+ if (!x) {
477
+ var f = typeof r == "string" ? r : r.displayName || r.name;
478
+ f && (x = `
479
479
 
480
480
  Check the top-level render call using <` + f + ">.");
481
481
  }
482
- return l;
482
+ return x;
483
483
  }
484
484
  }
485
- function _s(t, l) {
485
+ function St(r, x) {
486
486
  {
487
- if (!t._store || t._store.validated || t.key != null)
487
+ if (!r._store || r._store.validated || r.key != null)
488
488
  return;
489
- t._store.validated = !0;
490
- var f = lt(l);
491
- if (ys[f])
489
+ r._store.validated = !0;
490
+ var f = js(x);
491
+ if (Tt[f])
492
492
  return;
493
- ys[f] = !0;
494
- var g = "";
495
- t && t._owner && t._owner !== Ye.current && (g = " It was passed a child from " + ee(t._owner.type) + "."), fe(t), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, g), fe(null);
493
+ Tt[f] = !0;
494
+ var v = "";
495
+ r && r._owner && r._owner !== et.current && (v = " It was passed a child from " + ne(r._owner.type) + "."), Re(r), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, v), Re(null);
496
496
  }
497
497
  }
498
- function ws(t, l) {
498
+ function Pt(r, x) {
499
499
  {
500
- if (typeof t != "object")
500
+ if (typeof r != "object")
501
501
  return;
502
- if (ze(t))
503
- for (var f = 0; f < t.length; f++) {
504
- var g = t[f];
505
- He(g) && _s(g, l);
502
+ if (Ze(r))
503
+ for (var f = 0; f < r.length; f++) {
504
+ var v = r[f];
505
+ st(v) && St(v, x);
506
506
  }
507
- else if (He(t))
508
- t._store && (t._store.validated = !0);
509
- else if (t) {
510
- var E = T(t);
511
- if (typeof E == "function" && E !== t.entries)
512
- for (var C = E.call(t), R; !(R = C.next()).done; )
513
- He(R.value) && _s(R.value, l);
507
+ else if (st(r))
508
+ r._store && (r._store.validated = !0);
509
+ else if (r) {
510
+ var k = E(r);
511
+ if (typeof k == "function" && k !== r.entries)
512
+ for (var P = k.call(r), R; !(R = P.next()).done; )
513
+ st(R.value) && St(R.value, x);
514
514
  }
515
515
  }
516
516
  }
517
- function ot(t) {
517
+ function ps(r) {
518
518
  {
519
- var l = t.type;
520
- if (l == null || typeof l == "string")
519
+ var x = r.type;
520
+ if (x == null || typeof x == "string")
521
521
  return;
522
522
  var f;
523
- if (typeof l == "function")
524
- f = l.propTypes;
525
- else if (typeof l == "object" && (l.$$typeof === x || // Note: Memo only checks outer props here.
523
+ if (typeof x == "function")
524
+ f = x.propTypes;
525
+ else if (typeof x == "object" && (x.$$typeof === u || // Note: Memo only checks outer props here.
526
526
  // Inner props are checked in the reconciler.
527
- l.$$typeof === p))
528
- f = l.propTypes;
527
+ x.$$typeof === p))
528
+ f = x.propTypes;
529
529
  else
530
530
  return;
531
531
  if (f) {
532
- var g = ee(l);
533
- Hs(f, t.props, "prop", g, t);
534
- } else if (l.PropTypes !== void 0 && !Ke) {
535
- Ke = !0;
536
- var E = ee(l);
537
- k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
532
+ var v = ne(x);
533
+ rs(f, r.props, "prop", v, r);
534
+ } else if (x.PropTypes !== void 0 && !tt) {
535
+ tt = !0;
536
+ var k = ne(x);
537
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
538
538
  }
539
- typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
539
+ typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
540
540
  }
541
541
  }
542
- function dt(t) {
542
+ function gs(r) {
543
543
  {
544
- for (var l = Object.keys(t.props), f = 0; f < l.length; f++) {
545
- var g = l[f];
546
- if (g !== "children" && g !== "key") {
547
- fe(t), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), fe(null);
544
+ for (var x = Object.keys(r.props), f = 0; f < x.length; f++) {
545
+ var v = x[f];
546
+ if (v !== "children" && v !== "key") {
547
+ Re(r), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), Re(null);
548
548
  break;
549
549
  }
550
550
  }
551
- t.ref !== null && (fe(t), k("Invalid attribute `ref` supplied to `React.Fragment`."), fe(null));
551
+ r.ref !== null && (Re(r), S("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
552
552
  }
553
553
  }
554
- var Rs = {};
555
- function Es(t, l, f, g, E, C) {
554
+ var Dt = {};
555
+ function At(r, x, f, v, k, P) {
556
556
  {
557
- var R = Me(t);
557
+ var R = V(r);
558
558
  if (!R) {
559
- var v = "";
560
- (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
561
- var q = ct();
562
- q ? v += q : v += Ns();
563
- var A;
564
- t === null ? A = "null" : ze(t) ? A = "array" : t !== void 0 && t.$$typeof === r ? (A = "<" + (ee(t.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : A = typeof t, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, v);
559
+ var _ = "";
560
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
561
+ var z = fs();
562
+ z ? _ += z : _ += Ct();
563
+ var O;
564
+ r === null ? O = "null" : Ze(r) ? O = "array" : r !== void 0 && r.$$typeof === s ? (O = "<" + (ne(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : O = typeof r, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, _);
565
565
  }
566
- var F = it(t, l, f, E, C);
567
- if (F == null)
568
- return F;
566
+ var M = ms(r, x, f, k, P);
567
+ if (M == null)
568
+ return M;
569
569
  if (R) {
570
- var X = l.children;
571
- if (X !== void 0)
572
- if (g)
573
- if (ze(X)) {
574
- for (var je = 0; je < X.length; je++)
575
- ws(X[je], t);
576
- Object.freeze && Object.freeze(X);
570
+ var ae = x.children;
571
+ if (ae !== void 0)
572
+ if (v)
573
+ if (Ze(ae)) {
574
+ for (var Ee = 0; Ee < ae.length; Ee++)
575
+ Pt(ae[Ee], r);
576
+ Object.freeze && Object.freeze(ae);
577
577
  } else
578
- k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
578
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
579
579
  else
580
- ws(X, t);
580
+ Pt(ae, r);
581
581
  }
582
- if (be.call(l, "key")) {
583
- var oe = ee(t), U = Object.keys(l).filter(function(jt) {
584
- return jt !== "key";
585
- }), Je = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
586
- if (!Rs[oe + Je]) {
587
- var ft = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
588
- k(`A props object containing a "key" prop is being spread into JSX:
582
+ if (Ce.call(x, "key")) {
583
+ var Ne = ne(r), X = Object.keys(x).filter(function(ws) {
584
+ return ws !== "key";
585
+ }), rt = X.length > 0 ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}";
586
+ if (!Dt[Ne + rt]) {
587
+ var _s = X.length > 0 ? "{" + X.join(": ..., ") + ": ...}" : "{}";
588
+ S(`A props object containing a "key" prop is being spread into JSX:
589
589
  let props = %s;
590
590
  <%s {...props} />
591
591
  React keys must be passed directly to JSX without using spread:
592
592
  let props = %s;
593
- <%s key={someKey} {...props} />`, Je, oe, ft, oe), Rs[oe + Je] = !0;
593
+ <%s key={someKey} {...props} />`, rt, Ne, _s, Ne), Dt[Ne + rt] = !0;
594
594
  }
595
595
  }
596
- return t === n ? dt(F) : ot(F), F;
596
+ return r === n ? gs(M) : ps(M), M;
597
597
  }
598
598
  }
599
- function ut(t, l, f) {
600
- return Es(t, l, f, !0);
599
+ function vs(r, x, f) {
600
+ return At(r, x, f, !0);
601
601
  }
602
- function ht(t, l, f) {
603
- return Es(t, l, f, !1);
602
+ function bs(r, x, f) {
603
+ return At(r, x, f, !1);
604
604
  }
605
- var xt = ht, mt = ut;
606
- ye.Fragment = n, ye.jsx = xt, ye.jsxs = mt;
607
- })()), ye;
605
+ var ys = bs, Ns = vs;
606
+ Se.Fragment = n, Se.jsx = ys, Se.jsxs = Ns;
607
+ })()), Se;
608
608
  }
609
- var Ps;
610
- function wt() {
611
- return Ps || (Ps = 1, process.env.NODE_ENV === "production" ? $e.exports = yt() : $e.exports = _t()), $e.exports;
609
+ var Ot;
610
+ function Ds() {
611
+ return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Ge.exports = Ss() : Ge.exports = Ps()), Ge.exports;
612
612
  }
613
- var e = wt();
614
- class we extends Error {
615
- constructor(r, a) {
616
- super(a), this.status = r, this.name = "ApiError";
613
+ var e = Ds();
614
+ class Ae extends Error {
615
+ constructor(s, a) {
616
+ super(a), this.status = s, this.name = "ApiError";
617
617
  }
618
618
  }
619
- class Rt {
619
+ class As {
620
620
  baseUrl;
621
621
  headers;
622
- constructor(r = {}) {
623
- this.baseUrl = r.baseUrl ?? "", this.headers = {
622
+ constructor(s = {}) {
623
+ this.baseUrl = s.baseUrl ?? "", this.headers = {
624
624
  "Content-Type": "application/json",
625
- ...r.headers
625
+ ...s.headers
626
626
  };
627
627
  }
628
- async request(r, a, n = {}) {
629
- let o = `${this.baseUrl}${a}`;
628
+ async request(s, a, n = {}) {
629
+ let l = `${this.baseUrl}${a}`;
630
630
  if (n.params) {
631
- const u = new URLSearchParams();
632
- Object.entries(n.params).forEach(([x, h]) => {
633
- h != null && h !== "" && u.set(x, String(h));
631
+ const c = new URLSearchParams();
632
+ Object.entries(n.params).forEach(([u, h]) => {
633
+ h != null && h !== "" && c.set(u, String(h));
634
634
  });
635
- const i = u.toString();
636
- i && (o += `?${i}`);
635
+ const i = c.toString();
636
+ i && (l += `?${i}`);
637
637
  }
638
- const d = await fetch(o, {
639
- method: r,
638
+ const o = await fetch(l, {
639
+ method: s,
640
640
  headers: { ...this.headers, ...n.headers },
641
641
  body: n.body ? JSON.stringify(n.body) : void 0,
642
642
  credentials: n.credentials,
643
643
  cache: "no-store"
644
644
  });
645
- if (!d.ok) {
646
- const u = await d.json().catch(() => ({ detail: "Unknown error" }));
647
- throw new we(d.status, u.detail || d.statusText);
645
+ if (!o.ok) {
646
+ const c = await o.json().catch(() => ({ detail: "Unknown error" }));
647
+ throw new Ae(o.status, c.detail || o.statusText);
648
648
  }
649
- if (!(d.status === 204 || d.headers.get("content-length") === "0"))
650
- return d.json();
649
+ if (!(o.status === 204 || o.headers.get("content-length") === "0"))
650
+ return o.json();
651
651
  }
652
652
  async getCapabilities() {
653
653
  return this.request("GET", "/api/v1/capabilities");
654
654
  }
655
- async listRuns(r) {
656
- return this.request("GET", "/api/runs", { params: r });
655
+ async listRuns(s) {
656
+ return this.request("GET", "/api/runs", { params: s });
657
657
  }
658
- async getRun(r) {
659
- return this.request("GET", `/api/runs/${r}`);
658
+ async getRun(s) {
659
+ return this.request("GET", `/api/runs/${s}`);
660
660
  }
661
- async deleteRun(r) {
662
- await this.request("DELETE", `/api/runs/${r}`);
661
+ async deleteRun(s) {
662
+ await this.request("DELETE", `/api/runs/${s}`);
663
663
  }
664
- async setBaseline(r, a) {
665
- return this.request("POST", `/api/projects/${r}/baseline/${a}`, {
664
+ async setBaseline(s, a) {
665
+ return this.request("POST", `/api/projects/${s}/baseline/${a}`, {
666
666
  params: { redirect: "false" }
667
667
  });
668
668
  }
669
- async listProjects(r) {
670
- return this.request("GET", "/api/projects", { params: r });
669
+ async listProjects(s) {
670
+ return this.request("GET", "/api/projects", { params: s });
671
671
  }
672
- async listGroups(r) {
673
- return this.request("GET", "/api/groups", { params: r });
672
+ async listGroups(s) {
673
+ return this.request("GET", "/api/groups", { params: s });
674
674
  }
675
- async getGroup(r) {
676
- return this.request("GET", `/api/groups/${r}`);
675
+ async getGroup(s) {
676
+ return this.request("GET", `/api/groups/${s}`);
677
677
  }
678
- async getDiff(r, a) {
678
+ async getDiff(s, a) {
679
679
  return this.request("GET", "/api/diff", {
680
- params: { a: r, b: a }
680
+ params: { a: s, b: a }
681
681
  });
682
682
  }
683
- async getArtifact(r, a) {
684
- return this.request("GET", `/api/runs/${r}/artifacts/${a}`);
683
+ async getArtifact(s, a) {
684
+ return this.request("GET", `/api/runs/${s}/artifacts/${a}`);
685
685
  }
686
- getArtifactDownloadUrl(r, a) {
687
- return `${this.baseUrl}/api/runs/${r}/artifacts/${a}/raw`;
686
+ getArtifactDownloadUrl(s, a) {
687
+ return `${this.baseUrl}/api/runs/${s}/artifacts/${a}/raw`;
688
688
  }
689
- async createExport(r) {
690
- return this.request("POST", `/api/runs/${r}/export`);
689
+ async createExport(s) {
690
+ return this.request("POST", `/api/runs/${s}/export`);
691
691
  }
692
- async getExportInfo(r) {
693
- return this.request("GET", `/api/runs/${r}/export/info`);
692
+ async getExportInfo(s) {
693
+ return this.request("GET", `/api/runs/${s}/export/info`);
694
694
  }
695
- getExportDownloadUrl(r) {
696
- return `${this.baseUrl}/api/runs/${r}/export/download`;
695
+ getExportDownloadUrl(s) {
696
+ return `${this.baseUrl}/api/runs/${s}/export/download`;
697
+ }
698
+ async getMetricSeries(s) {
699
+ return this.request("GET", `/api/runs/${s}/metric_series`);
697
700
  }
698
701
  }
699
- const Et = new Rt();
700
- function Q(s) {
701
- return s?.slice(0, 8) ?? "";
702
+ const Fs = new As();
703
+ function oe(t) {
704
+ return t?.slice(0, 8) ?? "";
702
705
  }
703
- function Ze(s) {
704
- return s?.slice(0, 12) ?? "N/A";
706
+ function ct(t) {
707
+ return t?.slice(0, 12) ?? "N/A";
705
708
  }
706
- function Le(s) {
707
- const r = new Date(s), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - r.getTime()) / 1e3);
709
+ function Ye(t) {
710
+ const s = new Date(t), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - s.getTime()) / 1e3);
708
711
  if (n < 60) return "just now";
709
712
  if (n < 3600) {
710
- const d = Math.floor(n / 60);
711
- return `${d} minute${d !== 1 ? "s" : ""} ago`;
713
+ const o = Math.floor(n / 60);
714
+ return `${o} minute${o !== 1 ? "s" : ""} ago`;
712
715
  }
713
716
  if (n < 86400) {
714
- const d = Math.floor(n / 3600);
715
- return `${d} hour${d !== 1 ? "s" : ""} ago`;
717
+ const o = Math.floor(n / 3600);
718
+ return `${o} hour${o !== 1 ? "s" : ""} ago`;
716
719
  }
717
720
  if (n < 2592e3) {
718
- const d = Math.floor(n / 86400);
719
- return `${d} day${d !== 1 ? "s" : ""} ago`;
721
+ const o = Math.floor(n / 86400);
722
+ return `${o} day${o !== 1 ? "s" : ""} ago`;
720
723
  }
721
724
  if (n < 31536e3) {
722
- const d = Math.floor(n / 2592e3);
723
- return `${d} month${d !== 1 ? "s" : ""} ago`;
725
+ const o = Math.floor(n / 2592e3);
726
+ return `${o} month${o !== 1 ? "s" : ""} ago`;
724
727
  }
725
- const o = Math.floor(n / 31536e3);
726
- return `${o} year${o !== 1 ? "s" : ""} ago`;
728
+ const l = Math.floor(n / 31536e3);
729
+ return `${l} year${l !== 1 ? "s" : ""} ago`;
727
730
  }
728
- function Ct(s, r = 6) {
729
- return typeof s != "number" || isNaN(s) ? String(s) : Number(s.toPrecision(r)).toString();
731
+ function lt(t, s = 6) {
732
+ return typeof t != "number" || isNaN(t) ? String(t) : Number(t.toPrecision(s)).toString();
730
733
  }
731
- function Oe(s) {
732
- return s < 1024 ? `${s} bytes` : s < 1048576 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1048576).toFixed(1)} MB`;
734
+ function Ve(t) {
735
+ return t < 1024 ? `${t} bytes` : t < 1048576 ? `${(t / 1024).toFixed(1)} KB` : `${(t / 1048576).toFixed(1)} MB`;
733
736
  }
734
- function Tt(s) {
735
- return JSON.stringify(s, null, 2);
737
+ function $s(t) {
738
+ return JSON.stringify(t, null, 2);
736
739
  }
737
- function kt(s, r = 60) {
738
- return s ? s.length <= r ? s : s.slice(0, r - 3) + "..." : "";
740
+ function Os(t, s = 60) {
741
+ return t ? t.length <= s ? t : t.slice(0, s - 3) + "..." : "";
739
742
  }
740
- function hr(s, r) {
743
+ function kr(t, s) {
741
744
  const a = new URLSearchParams();
742
- Object.entries(r).forEach(([o, d]) => {
743
- d != null && d !== "" && a.set(o, String(d));
745
+ Object.entries(s).forEach(([l, o]) => {
746
+ o != null && o !== "" && a.set(l, String(o));
744
747
  });
745
748
  const n = a.toString();
746
- return n ? `${s}?${n}` : s;
749
+ return n ? `${t}?${n}` : t;
747
750
  }
748
- function $(...s) {
749
- return s.filter(Boolean).join(" ");
751
+ function q(...t) {
752
+ return t.filter(Boolean).join(" ");
750
753
  }
751
- function As(s, r) {
752
- const a = new Date(s).getTime(), n = r ? new Date(r).getTime() : Date.now();
754
+ function Ut(t, s) {
755
+ const a = new Date(t).getTime(), n = s ? new Date(s).getTime() : Date.now();
753
756
  return Math.max(0, Math.floor((n - a) / 1e3));
754
757
  }
755
- function Fs(s) {
756
- if (s < 60) return `${s}s`;
757
- const r = Math.floor(s / 86400), a = Math.floor(s % 86400 / 3600), n = Math.floor(s % 3600 / 60), o = s % 60;
758
- return r > 0 ? `${r}d ${a}h ${n}m` : a > 0 ? `${a}h ${n}m ${o}s` : `${n}m ${o}s`;
758
+ function Wt(t) {
759
+ if (t < 60) return `${t}s`;
760
+ const s = Math.floor(t / 86400), a = Math.floor(t % 86400 / 3600), n = Math.floor(t % 3600 / 60), l = t % 60;
761
+ return s > 0 ? `${s}d ${a}h ${n}m` : a > 0 ? `${a}h ${n}m ${l}s` : `${n}m ${l}s`;
759
762
  }
760
- function Be(s) {
761
- return s === "FINISHED" || s === "FAILED" || s === "KILLED";
763
+ function $e(t) {
764
+ return t === "FINISHED" || t === "FAILED" || t === "KILLED";
762
765
  }
763
- const $s = ts(null);
764
- function xr({ children: s }) {
765
- const r = {
766
+ const Gt = ut(null);
767
+ function Cr({ children: t }) {
768
+ const s = {
766
769
  theme: "light",
767
770
  resolvedTheme: "light",
768
771
  setTheme: () => {
@@ -770,11 +773,11 @@ function xr({ children: s }) {
770
773
  toggleTheme: () => {
771
774
  }
772
775
  };
773
- return /* @__PURE__ */ e.jsx($s.Provider, { value: r, children: s });
776
+ return /* @__PURE__ */ e.jsx(Gt.Provider, { value: s, children: t });
774
777
  }
775
- function Pt() {
776
- const s = ss($s);
777
- return s || {
778
+ function Ms() {
779
+ const t = dt(Gt);
780
+ return t || {
778
781
  theme: "light",
779
782
  resolvedTheme: "light",
780
783
  setTheme: () => {
@@ -783,475 +786,491 @@ function Pt() {
783
786
  }
784
787
  };
785
788
  }
786
- function mr() {
787
- return Pt();
788
- }
789
- const Xe = 1e3, St = {
790
- runsActive: Xe,
791
- runsIdle: Xe,
792
- runDetail: Xe
793
- }, Os = ts(null);
794
- function Dt({
795
- children: s,
796
- api: r = Et,
789
+ function Tr() {
790
+ return Ms();
791
+ }
792
+ const nt = 1e3, Ls = {
793
+ runsActive: nt,
794
+ runsIdle: nt,
795
+ runDetail: nt
796
+ }, Vt = ut(null);
797
+ function qs({
798
+ children: t,
799
+ api: s = Fs,
797
800
  initialWorkspace: a = null,
798
801
  pollingConfig: n
799
802
  }) {
800
- const [o, d] = P(null), [u, i] = P(a), x = {
801
- ...St,
803
+ const [l, o] = T(null), [c, i] = T(a), u = {
804
+ ...Ls,
802
805
  ...n
803
806
  };
804
- return ne(() => {
805
- r.getCapabilities().then(d).catch(console.error);
806
- }, [r]), /* @__PURE__ */ e.jsx(Os.Provider, { value: { api: r, capabilities: o, currentWorkspace: u, setCurrentWorkspace: i, pollingConfig: x }, children: s });
807
+ return de(() => {
808
+ s.getCapabilities().then(o).catch(console.error);
809
+ }, [s]), /* @__PURE__ */ e.jsx(Vt.Provider, { value: { api: s, capabilities: l, currentWorkspace: c, setCurrentWorkspace: i, pollingConfig: u }, children: t });
807
810
  }
808
- function z() {
809
- const s = ss(Os);
810
- if (!s) throw new Error("useApp must be used within AppProvider");
811
- return s;
811
+ function K() {
812
+ const t = dt(Vt);
813
+ if (!t) throw new Error("useApp must be used within AppProvider");
814
+ return t;
812
815
  }
813
- function ue(s, r = []) {
814
- const [a, n] = P({
816
+ function be(t, s = []) {
817
+ const [a, n] = T({
815
818
  data: null,
816
819
  loading: !0,
817
820
  error: null
818
- }), o = Cs(!0), d = Cs(s);
819
- d.current = s;
820
- const u = pe(async (x) => {
821
- x || n((h) => ({ ...h, loading: !0, error: null }));
821
+ }), l = De(!0), o = De(t);
822
+ o.current = t;
823
+ const c = me(async (u) => {
824
+ u || n((h) => ({ ...h, loading: !0, error: null }));
822
825
  try {
823
- const h = await d.current();
824
- o.current && n({ data: h, loading: !1, error: null });
826
+ const h = await o.current();
827
+ l.current && n({ data: h, loading: !1, error: null });
825
828
  } catch (h) {
826
- if (o.current) {
827
- const m = h instanceof we ? h : new we(500, String(h));
829
+ if (l.current) {
830
+ const m = h instanceof Ae ? h : new Ae(500, String(h));
828
831
  n((p) => ({
829
- data: x ? p.data : null,
832
+ data: u ? p.data : null,
830
833
  loading: !1,
831
834
  error: m
832
835
  }));
833
836
  }
834
837
  }
835
838
  }, []);
836
- ne(() => (o.current = !0, u(!1), () => {
837
- o.current = !1;
838
- }), r);
839
- const i = pe(() => u(!0), [u]);
839
+ de(() => (l.current = !0, c(!1), () => {
840
+ l.current = !1;
841
+ }), s);
842
+ const i = me(() => c(!0), [c]);
840
843
  return { ...a, refetch: i };
841
844
  }
842
- function Ls(s, r, a) {
843
- ne(() => {
845
+ function mt(t, s, a) {
846
+ de(() => {
844
847
  if (!a) return;
845
- let n, o = !1;
846
- const d = () => {
847
- if (o) return;
848
- const x = r * 0.1 * (Math.random() * 2 - 1);
849
- n = setTimeout(u, Math.max(500, r + x));
850
- }, u = async () => {
851
- if (!o && document.visibilityState !== "hidden") {
848
+ let n, l = !1;
849
+ const o = () => {
850
+ if (l) return;
851
+ const u = s * 0.1 * (Math.random() * 2 - 1);
852
+ n = setTimeout(c, Math.max(500, s + u));
853
+ }, c = async () => {
854
+ if (!l && document.visibilityState !== "hidden") {
852
855
  try {
853
- await s();
856
+ await t();
854
857
  } catch {
855
858
  }
856
- d();
859
+ o();
857
860
  }
858
861
  };
859
- d();
862
+ o();
860
863
  const i = () => {
861
- o || document.visibilityState !== "visible" || (clearTimeout(n), Promise.resolve(s()).catch(() => {
862
- }).finally(d));
864
+ l || document.visibilityState !== "visible" || (clearTimeout(n), Promise.resolve(t()).catch(() => {
865
+ }).finally(o));
863
866
  };
864
867
  return document.addEventListener("visibilitychange", i), () => {
865
- o = !0, clearTimeout(n), document.removeEventListener("visibilitychange", i);
868
+ l = !0, clearTimeout(n), document.removeEventListener("visibilitychange", i);
866
869
  };
867
- }, [s, r, a]);
870
+ }, [t, s, a]);
868
871
  }
869
- function Is(s) {
870
- const { api: r, currentWorkspace: a, pollingConfig: n } = z(), o = ue(
871
- () => r.listRuns({ ...s, workspace: a?.id }),
872
- [r, a?.id, s?.project, s?.status, s?.q, s?.limit]
873
- ), u = o.data?.runs.some((i) => !Be(i.status)) ?? !1 ? n.runsActive : n.runsIdle;
874
- return Ls(o.refetch, u, !0), o;
872
+ function zt(t) {
873
+ const { api: s, currentWorkspace: a, pollingConfig: n } = K(), l = be(
874
+ () => s.listRuns({ ...t, workspace: a?.id }),
875
+ [s, a?.id, t?.project, t?.status, t?.q, t?.limit]
876
+ ), c = l.data?.runs.some((i) => !$e(i.status)) ?? !1 ? n.runsActive : n.runsIdle;
877
+ return mt(l.refetch, c, !0), l;
875
878
  }
876
- function Bs(s) {
877
- const { api: r, pollingConfig: a } = z(), n = ue(
879
+ function Yt(t) {
880
+ const { api: s, pollingConfig: a } = K(), n = be(
878
881
  async () => {
879
- const { run: d } = await r.getRun(s);
880
- return d;
882
+ const { run: o } = await s.getRun(t);
883
+ return o;
881
884
  },
882
- [r, s]
883
- ), o = n.data ? !Be(n.data.status) : !1;
884
- return Ls(n.refetch, a.runDetail, o), n;
885
+ [s, t]
886
+ ), l = n.data ? !$e(n.data.status) : !1;
887
+ return mt(n.refetch, a.runDetail, l), n;
885
888
  }
886
- function qe() {
887
- const { api: s, currentWorkspace: r } = z();
888
- return ue(
889
+ function Ke() {
890
+ const { api: t, currentWorkspace: s } = K();
891
+ return be(
889
892
  async () => {
890
- const { projects: a } = await s.listProjects({ workspace: r?.id });
893
+ const { projects: a } = await t.listProjects({ workspace: s?.id });
891
894
  return a;
892
895
  },
893
- [s, r?.id]
896
+ [t, s?.id]
894
897
  );
895
898
  }
896
- function At(s) {
897
- const { api: r, currentWorkspace: a } = z();
898
- return ue(
899
+ function Is(t) {
900
+ const { api: s, currentWorkspace: a } = K();
901
+ return be(
899
902
  async () => {
900
- const { groups: n } = await r.listGroups({ ...s, workspace: a?.id });
903
+ const { groups: n } = await s.listGroups({ ...t, workspace: a?.id });
901
904
  return n;
902
905
  },
903
- [r, a?.id, s?.project]
906
+ [s, a?.id, t?.project]
904
907
  );
905
908
  }
906
- function Ft(s) {
907
- const { api: r } = z();
908
- return ue(
909
- () => r.getGroup(s),
910
- [r, s]
909
+ function Bs(t) {
910
+ const { api: s } = K();
911
+ return be(
912
+ () => s.getGroup(t),
913
+ [s, t]
911
914
  );
912
915
  }
913
- function $t(s, r) {
914
- const { api: a } = z();
915
- return ue(
916
- () => a.getDiff(s, r),
917
- [a, s, r]
916
+ function Us(t, s) {
917
+ const { api: a } = K();
918
+ return be(
919
+ () => a.getDiff(t, s),
920
+ [a, t, s]
918
921
  );
919
922
  }
920
- function Ot(s, r) {
921
- const { api: a } = z();
922
- return ue(
923
- () => a.getArtifact(s, r),
924
- [a, s, r]
923
+ function Ws(t, s) {
924
+ const { api: a } = K();
925
+ return be(
926
+ () => a.getArtifact(t, s),
927
+ [a, t, s]
925
928
  );
926
929
  }
927
- function Re(s) {
928
- const [r, a] = P(!1), [n, o] = P(null);
929
- return { mutate: pe(async (...u) => {
930
- a(!0), o(null);
930
+ function Fe(t) {
931
+ const [s, a] = T(!1), [n, l] = T(null);
932
+ return { mutate: me(async (...c) => {
933
+ a(!0), l(null);
931
934
  try {
932
- return await s(...u);
935
+ return await t(...c);
933
936
  } catch (i) {
934
- const x = i instanceof we ? i : new we(500, String(i));
935
- throw o(x), x;
937
+ const u = i instanceof Ae ? i : new Ae(500, String(i));
938
+ throw l(u), u;
936
939
  } finally {
937
940
  a(!1);
938
941
  }
939
- }, [s]), loading: r, error: n };
942
+ }, [t]), loading: s, error: n };
943
+ }
944
+ function Gs(t, s) {
945
+ const { api: a, pollingConfig: n } = K(), l = be(
946
+ async () => {
947
+ try {
948
+ const { series: c } = await a.getMetricSeries(t);
949
+ return Object.values(c).some((u) => u.length > 0) ? c : null;
950
+ } catch {
951
+ return null;
952
+ }
953
+ },
954
+ [a, t]
955
+ ), o = De(s);
956
+ return de(() => {
957
+ o.current && !s && l.refetch(), o.current = s;
958
+ }, [s, l.refetch]), mt(l.refetch, n.runDetail, s), l;
940
959
  }
941
- const Lt = [
960
+ const Vs = [
942
961
  { href: "/runs", label: "Runs", matchPaths: ["/runs"] },
943
962
  { href: "/projects", label: "Projects", matchPaths: ["/projects"] },
944
963
  { href: "/groups", label: "Groups", matchPaths: ["/groups"] },
945
964
  { href: "/diff", label: "Compare", matchPaths: ["/diff"] },
946
965
  { href: "/search", label: "Search", matchPaths: ["/search"] }
947
- ], qs = ts(null);
948
- function fr({
949
- config: s,
950
- children: r
966
+ ], Ht = ut(null);
967
+ function Sr({
968
+ config: t,
969
+ children: s
951
970
  }) {
952
- return /* @__PURE__ */ e.jsx(qs.Provider, { value: s, children: r });
971
+ return /* @__PURE__ */ e.jsx(Ht.Provider, { value: t, children: s });
953
972
  }
954
- function It() {
955
- return ss(qs);
973
+ function zs() {
974
+ return dt(Ht);
956
975
  }
957
- function V({ children: s, config: r }) {
958
- const a = pt(), o = { ...It(), ...r }, d = o?.navLinks ?? Lt, u = [
959
- ...o?.prependNavLinks ?? [],
960
- ...d,
961
- ...o?.appendNavLinks ?? []
962
- ], i = o?.logo ?? { text: "devqubit", icon: "⚛" }, x = (h) => h.matchPaths ? h.matchPaths.some((m) => a.pathname.startsWith(m)) : a.pathname === h.href;
976
+ function Q({ children: t, config: s }) {
977
+ const a = Rs(), l = { ...zs(), ...s }, o = l?.navLinks ?? Vs, c = [
978
+ ...l?.prependNavLinks ?? [],
979
+ ...o,
980
+ ...l?.appendNavLinks ?? []
981
+ ], i = l?.logo ?? { text: "devqubit", icon: "⚛" }, u = (h) => h.matchPaths ? h.matchPaths.some((m) => a.pathname.startsWith(m)) : a.pathname === h.href;
963
982
  return /* @__PURE__ */ e.jsxs("div", { className: "dq-layout", children: [
964
983
  /* @__PURE__ */ e.jsx("header", { className: "dq-header", children: /* @__PURE__ */ e.jsxs("div", { className: "dq-header-inner", children: [
965
984
  /* @__PURE__ */ e.jsxs("div", { className: "dq-header-left", children: [
966
- /* @__PURE__ */ e.jsxs(Y, { to: "/", className: "dq-logo", children: [
985
+ /* @__PURE__ */ e.jsxs(se, { to: "/", className: "dq-logo", children: [
967
986
  i.icon && /* @__PURE__ */ e.jsx("span", { className: "dq-logo-icon", children: i.icon }),
968
987
  i.text
969
988
  ] }),
970
- /* @__PURE__ */ e.jsx("nav", { className: "dq-nav", children: u.map((h) => /* @__PURE__ */ e.jsx(
971
- Y,
989
+ /* @__PURE__ */ e.jsx("nav", { className: "dq-nav", children: c.map((h) => /* @__PURE__ */ e.jsx(
990
+ se,
972
991
  {
973
992
  to: h.href,
974
- className: $("dq-nav-link", x(h) && "active"),
993
+ className: q("dq-nav-link", u(h) && "active"),
975
994
  children: h.label
976
995
  },
977
996
  h.href
978
997
  )) })
979
998
  ] }),
980
- /* @__PURE__ */ e.jsx("div", { className: "dq-header-right", children: o?.headerRight })
999
+ /* @__PURE__ */ e.jsx("div", { className: "dq-header-right", children: l?.headerRight })
981
1000
  ] }) }),
982
- /* @__PURE__ */ e.jsx("main", { className: "dq-main fade-in", children: s })
1001
+ /* @__PURE__ */ e.jsx("main", { className: "dq-main fade-in", children: t })
983
1002
  ] });
984
1003
  }
985
- function Ee({ title: s, subtitle: r, actions: a }) {
1004
+ function Oe({ title: t, subtitle: s, actions: a }) {
986
1005
  return /* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
987
1006
  /* @__PURE__ */ e.jsxs("div", { children: [
988
- /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: s }),
989
- r && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-1", children: r })
1007
+ /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: t }),
1008
+ s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-1", children: s })
990
1009
  ] }),
991
1010
  a && /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: a })
992
1011
  ] });
993
1012
  }
994
- function K({ variant: s = "gray", className: r, children: a, ...n }) {
995
- return /* @__PURE__ */ e.jsx("span", { className: $("badge", `badge-${s}`, r), ...n, children: a });
1013
+ function re({ variant: t = "gray", className: s, children: a, ...n }) {
1014
+ return /* @__PURE__ */ e.jsx("span", { className: q("badge", `badge-${t}`, s), ...n, children: a });
996
1015
  }
997
- const D = rs(
998
- ({ variant: s = "secondary", size: r = "default", loading: a, className: n, children: o, disabled: d, ...u }, i) => /* @__PURE__ */ e.jsxs(
1016
+ const $ = ht(
1017
+ ({ variant: t = "secondary", size: s = "default", loading: a, className: n, children: l, disabled: o, ...c }, i) => /* @__PURE__ */ e.jsxs(
999
1018
  "button",
1000
1019
  {
1001
1020
  ref: i,
1002
- className: $(
1021
+ className: q(
1003
1022
  "btn",
1004
- s === "ghost-danger" ? "btn-ghost-danger" : `btn-${s}`,
1005
- r === "sm" && "btn-sm",
1023
+ t === "ghost-danger" ? "btn-ghost-danger" : `btn-${t}`,
1024
+ s === "sm" && "btn-sm",
1006
1025
  n
1007
1026
  ),
1008
- disabled: d || a,
1009
- ...u,
1027
+ disabled: o || a,
1028
+ ...c,
1010
1029
  children: [
1011
- a && /* @__PURE__ */ e.jsx(B, {}),
1012
- o
1030
+ a && /* @__PURE__ */ e.jsx(G, {}),
1031
+ l
1013
1032
  ]
1014
1033
  }
1015
1034
  )
1016
1035
  );
1017
- D.displayName = "Button";
1018
- function b({ className: s, children: r, ...a }) {
1019
- return /* @__PURE__ */ e.jsx("div", { className: $("card", s), ...a, children: r });
1036
+ $.displayName = "Button";
1037
+ function N({ className: t, children: s, ...a }) {
1038
+ return /* @__PURE__ */ e.jsx("div", { className: q("card", t), ...a, children: s });
1020
1039
  }
1021
- function G({ className: s, children: r, ...a }) {
1022
- return /* @__PURE__ */ e.jsx("div", { className: $("card-header", s), ...a, children: r });
1040
+ function Y({ className: t, children: s, ...a }) {
1041
+ return /* @__PURE__ */ e.jsx("div", { className: q("card-header", t), ...a, children: s });
1023
1042
  }
1024
- function W({ className: s, children: r, ...a }) {
1025
- return /* @__PURE__ */ e.jsx("h3", { className: $("card-title", s), ...a, children: r });
1043
+ function H({ className: t, children: s, ...a }) {
1044
+ return /* @__PURE__ */ e.jsx("h3", { className: q("card-title", t), ...a, children: s });
1026
1045
  }
1027
- function jr({ variant: s = "info", className: r, children: a, ...n }) {
1028
- return /* @__PURE__ */ e.jsx("div", { className: $("alert", `alert-${s}`, r), ...n, children: a });
1046
+ function Pr({ variant: t = "info", className: s, children: a, ...n }) {
1047
+ return /* @__PURE__ */ e.jsx("div", { className: q("alert", `alert-${t}`, s), ...n, children: a });
1029
1048
  }
1030
- function B({ className: s, ...r }) {
1031
- return /* @__PURE__ */ e.jsx("span", { className: $("spinner", s), ...r });
1049
+ function G({ className: t, ...s }) {
1050
+ return /* @__PURE__ */ e.jsx("span", { className: q("spinner", t), ...s });
1032
1051
  }
1033
- function he({ message: s, hint: r, className: a, ...n }) {
1034
- return /* @__PURE__ */ e.jsxs("div", { className: $("empty-state", a), ...n, children: [
1035
- /* @__PURE__ */ e.jsx("p", { children: s }),
1036
- r && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: r })
1052
+ function we({ message: t, hint: s, className: a, ...n }) {
1053
+ return /* @__PURE__ */ e.jsxs("div", { className: q("empty-state", a), ...n, children: [
1054
+ /* @__PURE__ */ e.jsx("p", { children: t }),
1055
+ s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: s })
1037
1056
  ] });
1038
1057
  }
1039
- function es({ items: s, className: r, ...a }) {
1040
- return /* @__PURE__ */ e.jsx("dl", { className: $("kv-list", r), ...a, children: s.map(({ label: n, value: o }) => /* @__PURE__ */ e.jsxs("div", { className: "contents", children: [
1058
+ function ot({ items: t, className: s, ...a }) {
1059
+ return /* @__PURE__ */ e.jsx("dl", { className: q("kv-list", s), ...a, children: t.map(({ label: n, value: l }) => /* @__PURE__ */ e.jsxs("div", { className: "contents", children: [
1041
1060
  /* @__PURE__ */ e.jsx("dt", { children: n }),
1042
- /* @__PURE__ */ e.jsx("dd", { children: o })
1061
+ /* @__PURE__ */ e.jsx("dd", { children: l })
1043
1062
  ] }, n)) });
1044
1063
  }
1045
- function as({ open: s, onClose: r, title: a, children: n, actions: o }) {
1046
- return s ? /* @__PURE__ */ e.jsx(
1064
+ function ft({ open: t, onClose: s, title: a, children: n, actions: l }) {
1065
+ return t ? /* @__PURE__ */ e.jsx(
1047
1066
  "div",
1048
1067
  {
1049
- className: $("modal-backdrop", s && "active"),
1050
- onClick: (d) => d.target === d.currentTarget && r(),
1051
- children: /* @__PURE__ */ e.jsxs("div", { className: "modal", onClick: (d) => d.stopPropagation(), children: [
1068
+ className: q("modal-backdrop", "active"),
1069
+ onClick: (o) => o.target === o.currentTarget && s(),
1070
+ children: /* @__PURE__ */ e.jsxs("div", { className: "modal", onClick: (o) => o.stopPropagation(), children: [
1052
1071
  /* @__PURE__ */ e.jsx("h3", { className: "modal-title", children: a }),
1053
1072
  /* @__PURE__ */ e.jsx("div", { className: "modal-body", children: n }),
1054
- o && /* @__PURE__ */ e.jsx("div", { className: "modal-actions", children: o })
1073
+ l && /* @__PURE__ */ e.jsx("div", { className: "modal-actions", children: l })
1055
1074
  ] })
1056
1075
  }
1057
1076
  ) : null;
1058
1077
  }
1059
- function Ce({ message: s, variant: r = "info", visible: a, onClose: n }) {
1078
+ function Me({ message: t, variant: s = "info", visible: a, onClose: n }) {
1060
1079
  if (!a) return null;
1061
- const o = {
1080
+ const l = {
1062
1081
  success: "✓",
1063
1082
  error: "✕",
1064
1083
  info: "i"
1065
- }[r], d = {
1084
+ }[s], o = {
1066
1085
  success: "text-[#059669]",
1067
1086
  error: "text-[#DC4A4A]",
1068
1087
  info: "text-[#2563EB]"
1069
- }[r];
1088
+ }[s];
1070
1089
  return /* @__PURE__ */ e.jsxs("div", { className: "toast", onClick: n, children: [
1071
- /* @__PURE__ */ e.jsx("span", { className: $("mr-2 font-bold", d), children: o }),
1072
- s
1090
+ /* @__PURE__ */ e.jsx("span", { className: q("mr-2 font-bold", o), children: l }),
1091
+ t
1073
1092
  ] });
1074
1093
  }
1075
- function se({ children: s, className: r }) {
1076
- return /* @__PURE__ */ e.jsx("div", { className: $("form-group", r), children: s });
1094
+ function xe({ children: t, className: s }) {
1095
+ return /* @__PURE__ */ e.jsx("div", { className: q("form-group", s), children: t });
1077
1096
  }
1078
- function ce({ className: s, children: r, ...a }) {
1079
- return /* @__PURE__ */ e.jsx("label", { className: $("form-label", s), ...a, children: r });
1097
+ function ve({ className: t, children: s, ...a }) {
1098
+ return /* @__PURE__ */ e.jsx("label", { className: q("form-label", t), ...a, children: s });
1080
1099
  }
1081
- const is = rs(
1082
- ({ className: s, ...r }, a) => /* @__PURE__ */ e.jsx("input", { ref: a, className: $("form-input", s), ...r })
1100
+ const jt = ht(
1101
+ ({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx("input", { ref: a, className: q("form-input", t), ...s })
1083
1102
  );
1084
- is.displayName = "Input";
1085
- const de = rs(
1086
- ({ className: s, children: r, ...a }, n) => /* @__PURE__ */ e.jsx("select", { ref: n, className: $("form-input", s), ...a, children: r })
1103
+ jt.displayName = "Input";
1104
+ const _e = ht(
1105
+ ({ className: t, children: s, ...a }, n) => /* @__PURE__ */ e.jsx("select", { ref: n, className: q("form-input", t), ...a, children: s })
1087
1106
  );
1088
- de.displayName = "Select";
1089
- function Ms({ children: s, className: r }) {
1090
- return /* @__PURE__ */ e.jsx("div", { className: $("form-row", r), children: s });
1107
+ _e.displayName = "Select";
1108
+ function Kt({ children: t, className: s }) {
1109
+ return /* @__PURE__ */ e.jsx("div", { className: q("form-row", s), children: t });
1091
1110
  }
1092
- function O({ className: s, children: r, ...a }) {
1093
- return /* @__PURE__ */ e.jsx("table", { className: $("table", s), ...a, children: r });
1111
+ function B({ className: t, children: s, ...a }) {
1112
+ return /* @__PURE__ */ e.jsx("table", { className: q("table", t), ...a, children: s });
1094
1113
  }
1095
- function re({ className: s, children: r, ...a }) {
1096
- return /* @__PURE__ */ e.jsx("thead", { className: s, ...a, children: r });
1114
+ function fe({ className: t, children: s, ...a }) {
1115
+ return /* @__PURE__ */ e.jsx("thead", { className: t, ...a, children: s });
1097
1116
  }
1098
- function L({ className: s, children: r, ...a }) {
1099
- return /* @__PURE__ */ e.jsx("tbody", { className: s, ...a, children: r });
1117
+ function U({ className: t, children: s, ...a }) {
1118
+ return /* @__PURE__ */ e.jsx("tbody", { className: t, ...a, children: s });
1100
1119
  }
1101
- function j({ className: s, children: r, ...a }) {
1102
- return /* @__PURE__ */ e.jsx("tr", { className: s, ...a, children: r });
1120
+ function j({ className: t, children: s, ...a }) {
1121
+ return /* @__PURE__ */ e.jsx("tr", { className: t, ...a, children: s });
1103
1122
  }
1104
- function N({ className: s, children: r, ...a }) {
1105
- return /* @__PURE__ */ e.jsx("th", { className: s, ...a, children: r });
1123
+ function w({ className: t, children: s, ...a }) {
1124
+ return /* @__PURE__ */ e.jsx("th", { className: t, ...a, children: s });
1106
1125
  }
1107
- function c({ className: s, children: r, ...a }) {
1108
- return /* @__PURE__ */ e.jsx("td", { className: s, ...a, children: r });
1126
+ function d({ className: t, children: s, ...a }) {
1127
+ return /* @__PURE__ */ e.jsx("td", { className: t, ...a, children: s });
1109
1128
  }
1110
- function Us({ status: s }) {
1111
- const r = {
1129
+ function Jt({ status: t }) {
1130
+ const s = {
1112
1131
  FINISHED: "success",
1113
1132
  FAILED: "danger",
1114
1133
  KILLED: "gray",
1115
1134
  RUNNING: "warning",
1116
1135
  UNKNOWN: "gray"
1117
- }[s];
1118
- return /* @__PURE__ */ e.jsx(K, { variant: r, children: s });
1136
+ }[t];
1137
+ return /* @__PURE__ */ e.jsx(re, { variant: s, children: t });
1119
1138
  }
1120
- function Bt({ createdAt: s, endedAt: r, status: a }) {
1121
- const n = !Be(a), [o, d] = P(Date.now());
1122
- ne(() => {
1139
+ function Ys({ createdAt: t, endedAt: s, status: a }) {
1140
+ const n = !$e(a), [l, o] = T(Date.now());
1141
+ de(() => {
1123
1142
  if (!n) return;
1124
- const h = setInterval(() => d(Date.now()), 1e3);
1143
+ const h = setInterval(() => o(Date.now()), 1e3);
1125
1144
  return () => clearInterval(h);
1126
1145
  }, [n]);
1127
- const i = As(s, n ? void 0 : r), x = n ? Math.max(0, Math.floor((o - new Date(s).getTime()) / 1e3)) : i;
1128
- return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Fs(x) });
1146
+ const i = Ut(t, n ? void 0 : s), u = n ? Math.max(0, Math.floor((l - new Date(t).getTime()) / 1e3)) : i;
1147
+ return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Wt(u) });
1129
1148
  }
1130
- function cs({ runs: s, onDelete: r, loading: a, emptyHint: n, baselineRunId: o }) {
1131
- const [d, u] = P(null), i = () => {
1132
- d && r && (r(d.run_id), u(null));
1149
+ function pt({ runs: t, onDelete: s, loading: a, emptyHint: n, baselineRunId: l }) {
1150
+ const [o, c] = T(null), i = () => {
1151
+ o && s && (s(o.run_id), c(null));
1133
1152
  };
1134
- return s.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1135
- /* @__PURE__ */ e.jsxs(O, { children: [
1136
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1137
- /* @__PURE__ */ e.jsx(N, { children: "Run ID" }),
1138
- /* @__PURE__ */ e.jsx(N, { children: "Name" }),
1139
- /* @__PURE__ */ e.jsx(N, { children: "Project" }),
1140
- /* @__PURE__ */ e.jsx(N, { children: "Status" }),
1141
- /* @__PURE__ */ e.jsx(N, { children: "Duration" }),
1142
- /* @__PURE__ */ e.jsx(N, { children: "Created" }),
1143
- /* @__PURE__ */ e.jsx(N, { children: "Actions" })
1153
+ return t.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1154
+ /* @__PURE__ */ e.jsxs(B, { children: [
1155
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1156
+ /* @__PURE__ */ e.jsx(w, { children: "Run ID" }),
1157
+ /* @__PURE__ */ e.jsx(w, { children: "Name" }),
1158
+ /* @__PURE__ */ e.jsx(w, { children: "Project" }),
1159
+ /* @__PURE__ */ e.jsx(w, { children: "Status" }),
1160
+ /* @__PURE__ */ e.jsx(w, { children: "Duration" }),
1161
+ /* @__PURE__ */ e.jsx(w, { children: "Created" }),
1162
+ /* @__PURE__ */ e.jsx(w, { children: "Actions" })
1144
1163
  ] }) }),
1145
- /* @__PURE__ */ e.jsx(L, { children: s.map((x) => /* @__PURE__ */ e.jsxs(j, { children: [
1146
- /* @__PURE__ */ e.jsxs(c, { children: [
1147
- /* @__PURE__ */ e.jsx(Y, { to: `/runs/${x.run_id}`, className: "font-mono", children: Q(x.run_id) }),
1148
- x.run_id === o && /* @__PURE__ */ e.jsx(K, { variant: "info", className: "ml-2", children: "Baseline" })
1164
+ /* @__PURE__ */ e.jsx(U, { children: t.map((u) => /* @__PURE__ */ e.jsxs(j, { children: [
1165
+ /* @__PURE__ */ e.jsxs(d, { children: [
1166
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${u.run_id}`, className: "font-mono", children: oe(u.run_id) }),
1167
+ u.run_id === l && /* @__PURE__ */ e.jsx(re, { variant: "info", className: "ml-2", children: "Baseline" })
1149
1168
  ] }),
1150
- /* @__PURE__ */ e.jsx(c, { children: x.run_name || "—" }),
1151
- /* @__PURE__ */ e.jsx(c, { children: x.project }),
1152
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Us, { status: x.status }) }),
1153
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: /* @__PURE__ */ e.jsx(
1154
- Bt,
1169
+ /* @__PURE__ */ e.jsx(d, { children: u.run_name || "—" }),
1170
+ /* @__PURE__ */ e.jsx(d, { children: u.project }),
1171
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Jt, { status: u.status }) }),
1172
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: /* @__PURE__ */ e.jsx(
1173
+ Ys,
1155
1174
  {
1156
- createdAt: x.created_at,
1157
- endedAt: x.ended_at,
1158
- status: x.status
1175
+ createdAt: u.created_at,
1176
+ endedAt: u.ended_at,
1177
+ status: u.status
1159
1178
  }
1160
1179
  ) }),
1161
- /* @__PURE__ */ e.jsx(c, { className: "text-muted", children: Le(x.created_at) }),
1162
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1163
- /* @__PURE__ */ e.jsx(Y, { to: `/runs/${x.run_id}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View" }) }),
1164
- r && /* @__PURE__ */ e.jsx(
1165
- D,
1180
+ /* @__PURE__ */ e.jsx(d, { className: "text-muted", children: Ye(u.created_at) }),
1181
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1182
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${u.run_id}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View" }) }),
1183
+ s && /* @__PURE__ */ e.jsx(
1184
+ $,
1166
1185
  {
1167
1186
  variant: "ghost-danger",
1168
1187
  size: "sm",
1169
- onClick: () => u(x),
1188
+ onClick: () => c(u),
1170
1189
  disabled: a,
1171
1190
  children: "Delete"
1172
1191
  }
1173
1192
  )
1174
1193
  ] }) })
1175
- ] }, x.run_id)) })
1194
+ ] }, u.run_id)) })
1176
1195
  ] }),
1177
1196
  /* @__PURE__ */ e.jsxs(
1178
- as,
1197
+ ft,
1179
1198
  {
1180
- open: !!d,
1181
- onClose: () => u(null),
1199
+ open: !!o,
1200
+ onClose: () => c(null),
1182
1201
  title: "Delete Run",
1183
1202
  actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1184
- /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: () => u(null), children: "Cancel" }),
1185
- /* @__PURE__ */ e.jsxs(D, { variant: "danger", onClick: i, disabled: a, children: [
1186
- a && /* @__PURE__ */ e.jsx(B, {}),
1203
+ /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: () => c(null), children: "Cancel" }),
1204
+ /* @__PURE__ */ e.jsxs($, { variant: "danger", onClick: i, disabled: a, children: [
1205
+ a && /* @__PURE__ */ e.jsx(G, {}),
1187
1206
  "Delete"
1188
1207
  ] })
1189
1208
  ] }),
1190
1209
  children: [
1191
1210
  /* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
1192
- d && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: Q(d.run_id) }),
1211
+ o && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: oe(o.run_id) }),
1193
1212
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
1194
1213
  ]
1195
1214
  }
1196
1215
  )
1197
1216
  ] }) : /* @__PURE__ */ e.jsx(
1198
- he,
1217
+ we,
1199
1218
  {
1200
1219
  message: "No runs found",
1201
1220
  hint: n ?? "Try adjusting your filters"
1202
1221
  }
1203
1222
  );
1204
1223
  }
1205
- function qt() {
1206
- const [s, r] = Ie(), { api: a } = z(), { data: n } = qe(), [o, d] = P(null), [u, i] = P({
1207
- project: s.get("project") || "",
1208
- status: s.get("status") || "",
1209
- q: s.get("q") || "",
1210
- limit: parseInt(s.get("limit") || "25", 10)
1211
- }), { data: x, loading: h, refetch: m } = Is(u), p = Re((_) => a.deleteRun(_));
1212
- ne(() => {
1213
- if (o) {
1214
- const _ = setTimeout(() => d(null), 3e3);
1215
- return () => clearTimeout(_);
1216
- }
1217
- }, [o]);
1218
- const y = pe((_, H) => {
1219
- i((I) => ({ ...I, [_]: H }));
1220
- const T = new URLSearchParams(s);
1221
- H ? T.set(_, String(H)) : T.delete(_), r(T, { replace: !0 });
1222
- }, [s, r]), M = pe(async (_) => {
1224
+ function Hs() {
1225
+ const [t, s] = He(), { api: a } = K(), { data: n } = Ke(), [l, o] = T(null), [c, i] = T({
1226
+ project: t.get("project") || "",
1227
+ status: t.get("status") || "",
1228
+ q: t.get("q") || "",
1229
+ limit: parseInt(t.get("limit") || "25", 10)
1230
+ }), { data: u, loading: h, refetch: m } = zt(c), p = Fe((g) => a.deleteRun(g));
1231
+ de(() => {
1232
+ if (l) {
1233
+ const g = setTimeout(() => o(null), 3e3);
1234
+ return () => clearTimeout(g);
1235
+ }
1236
+ }, [l]);
1237
+ const b = me((g, I) => {
1238
+ i((A) => ({ ...A, [g]: I }));
1239
+ const E = new URLSearchParams(t);
1240
+ I ? E.set(g, String(I)) : E.delete(g), s(E, { replace: !0 });
1241
+ }, [t, s]), D = me(async (g) => {
1223
1242
  try {
1224
- await p.mutate(_), d({ message: "Run deleted", variant: "success" }), m();
1243
+ await p.mutate(g), o({ message: "Run deleted", variant: "success" }), m();
1225
1244
  } catch {
1226
- d({ message: "Failed to delete run", variant: "error" });
1245
+ o({ message: "Failed to delete run", variant: "error" });
1227
1246
  }
1228
1247
  }, [p, m]);
1229
- return /* @__PURE__ */ e.jsxs(V, { children: [
1230
- /* @__PURE__ */ e.jsx(Ee, { title: "Runs" }),
1231
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Ms, { children: [
1232
- /* @__PURE__ */ e.jsxs(se, { children: [
1233
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "project", children: "Project" }),
1248
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
1249
+ /* @__PURE__ */ e.jsx(Oe, { title: "Runs" }),
1250
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Kt, { children: [
1251
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1252
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "project", children: "Project" }),
1234
1253
  /* @__PURE__ */ e.jsxs(
1235
- de,
1254
+ _e,
1236
1255
  {
1237
1256
  id: "project",
1238
- value: u.project,
1239
- onChange: (_) => y("project", _.target.value),
1257
+ value: c.project,
1258
+ onChange: (g) => b("project", g.target.value),
1240
1259
  children: [
1241
1260
  /* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
1242
- n?.map((_) => /* @__PURE__ */ e.jsx("option", { value: _.name, children: _.name }, _.name))
1261
+ n?.map((g) => /* @__PURE__ */ e.jsx("option", { value: g.name, children: g.name }, g.name))
1243
1262
  ]
1244
1263
  }
1245
1264
  )
1246
1265
  ] }),
1247
- /* @__PURE__ */ e.jsxs(se, { children: [
1248
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "status", children: "Status" }),
1266
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1267
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "status", children: "Status" }),
1249
1268
  /* @__PURE__ */ e.jsxs(
1250
- de,
1269
+ _e,
1251
1270
  {
1252
1271
  id: "status",
1253
- value: u.status,
1254
- onChange: (_) => y("status", _.target.value),
1272
+ value: c.status,
1273
+ onChange: (g) => b("status", g.target.value),
1255
1274
  children: [
1256
1275
  /* @__PURE__ */ e.jsx("option", { value: "", children: "All" }),
1257
1276
  /* @__PURE__ */ e.jsx("option", { value: "FINISHED", children: "Finished" }),
@@ -1261,26 +1280,26 @@ function qt() {
1261
1280
  }
1262
1281
  )
1263
1282
  ] }),
1264
- /* @__PURE__ */ e.jsxs(se, { children: [
1265
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "q", children: "Query" }),
1283
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1284
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "q", children: "Query" }),
1266
1285
  /* @__PURE__ */ e.jsx(
1267
- is,
1286
+ jt,
1268
1287
  {
1269
1288
  id: "q",
1270
- value: u.q,
1271
- onChange: (_) => y("q", _.target.value),
1289
+ value: c.q,
1290
+ onChange: (g) => b("q", g.target.value),
1272
1291
  placeholder: "metric.fidelity > 0.9"
1273
1292
  }
1274
1293
  )
1275
1294
  ] }),
1276
- /* @__PURE__ */ e.jsxs(se, { children: [
1277
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "limit", children: "Limit" }),
1295
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1296
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "limit", children: "Limit" }),
1278
1297
  /* @__PURE__ */ e.jsxs(
1279
- de,
1298
+ _e,
1280
1299
  {
1281
1300
  id: "limit",
1282
- value: u.limit,
1283
- onChange: (_) => y("limit", parseInt(_.target.value, 10)),
1301
+ value: c.limit,
1302
+ onChange: (g) => b("limit", parseInt(g.target.value, 10)),
1284
1303
  children: [
1285
1304
  /* @__PURE__ */ e.jsx("option", { value: "25", children: "25" }),
1286
1305
  /* @__PURE__ */ e.jsx("option", { value: "50", children: "50" }),
@@ -1289,187 +1308,187 @@ function qt() {
1289
1308
  }
1290
1309
  )
1291
1310
  ] }),
1292
- /* @__PURE__ */ e.jsxs(se, { className: "flex items-end gap-2", children: [
1293
- /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: () => m(), children: "Filter" }),
1294
- h && /* @__PURE__ */ e.jsx(B, {})
1311
+ /* @__PURE__ */ e.jsxs(xe, { className: "flex items-end gap-2", children: [
1312
+ /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: () => m(), children: "Filter" }),
1313
+ h && /* @__PURE__ */ e.jsx(G, {})
1295
1314
  ] })
1296
1315
  ] }) }),
1297
- /* @__PURE__ */ e.jsx(b, { children: h && !x ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(B, {}) }) : /* @__PURE__ */ e.jsx(
1298
- cs,
1316
+ /* @__PURE__ */ e.jsx(N, { children: h && !u ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(
1317
+ pt,
1299
1318
  {
1300
- runs: x?.runs ?? [],
1301
- onDelete: M,
1319
+ runs: u?.runs ?? [],
1320
+ onDelete: D,
1302
1321
  loading: p.loading,
1303
- baselineRunId: u.project ? n?.find((_) => _.name === u.project)?.baseline?.run_id : void 0
1322
+ baselineRunId: c.project ? n?.find((g) => g.name === c.project)?.baseline?.run_id : void 0
1304
1323
  }
1305
1324
  ) }),
1306
- o && /* @__PURE__ */ e.jsx(
1307
- Ce,
1325
+ l && /* @__PURE__ */ e.jsx(
1326
+ Me,
1308
1327
  {
1309
- message: o.message,
1310
- variant: o.variant,
1311
- visible: !!o,
1312
- onClose: () => d(null)
1328
+ message: l.message,
1329
+ variant: l.variant,
1330
+ visible: !!l,
1331
+ onClose: () => o(null)
1313
1332
  }
1314
1333
  )
1315
1334
  ] });
1316
1335
  }
1317
- function Mt({ projects: s, currentWorkspace: r }) {
1318
- if (!s.length)
1336
+ function Ks({ projects: t, currentWorkspace: s }) {
1337
+ if (!t.length)
1319
1338
  return /* @__PURE__ */ e.jsx(
1320
- he,
1339
+ we,
1321
1340
  {
1322
1341
  message: "No projects yet",
1323
1342
  hint: "Projects are created automatically when you log runs"
1324
1343
  }
1325
1344
  );
1326
1345
  const a = (n) => {
1327
- const o = new URLSearchParams({ project: n });
1328
- return r && o.set("workspace", r.id), `/runs?${o}`;
1346
+ const l = new URLSearchParams({ project: n });
1347
+ return s && l.set("workspace", s.id), `/runs?${l}`;
1329
1348
  };
1330
- return /* @__PURE__ */ e.jsxs(O, { children: [
1331
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1332
- /* @__PURE__ */ e.jsx(N, { children: "Project" }),
1333
- /* @__PURE__ */ e.jsx(N, { children: "Runs" }),
1334
- /* @__PURE__ */ e.jsx(N, { children: "Baseline" }),
1335
- /* @__PURE__ */ e.jsx(N, {})
1349
+ return /* @__PURE__ */ e.jsxs(B, { children: [
1350
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1351
+ /* @__PURE__ */ e.jsx(w, { children: "Project" }),
1352
+ /* @__PURE__ */ e.jsx(w, { children: "Runs" }),
1353
+ /* @__PURE__ */ e.jsx(w, { children: "Baseline" }),
1354
+ /* @__PURE__ */ e.jsx(w, {})
1336
1355
  ] }) }),
1337
- /* @__PURE__ */ e.jsx(L, { children: s.map((n) => /* @__PURE__ */ e.jsxs(j, { children: [
1338
- /* @__PURE__ */ e.jsxs(c, { children: [
1356
+ /* @__PURE__ */ e.jsx(U, { children: t.map((n) => /* @__PURE__ */ e.jsxs(j, { children: [
1357
+ /* @__PURE__ */ e.jsxs(d, { children: [
1339
1358
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: n.name }),
1340
- n.description && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: kt(n.description) })
1359
+ n.description && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: Os(n.description) })
1341
1360
  ] }),
1342
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: n.run_count ?? 0 }) }),
1343
- /* @__PURE__ */ e.jsx(c, { children: n.baseline ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1344
- /* @__PURE__ */ e.jsx(Y, { to: `/runs/${n.baseline.run_id}`, className: "font-mono text-sm", children: Q(n.baseline.run_id) }),
1361
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: n.run_count ?? 0 }) }),
1362
+ /* @__PURE__ */ e.jsx(d, { children: n.baseline ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1363
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${n.baseline.run_id}`, className: "font-mono text-sm", children: oe(n.baseline.run_id) }),
1345
1364
  n.baseline.run_name && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: n.baseline.run_name })
1346
1365
  ] }) : /* @__PURE__ */ e.jsx("span", { className: "text-muted", children: "—" }) }),
1347
- /* @__PURE__ */ e.jsx(c, { className: "text-right", children: /* @__PURE__ */ e.jsx(Y, { to: a(n.name), children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1366
+ /* @__PURE__ */ e.jsx(d, { className: "text-right", children: /* @__PURE__ */ e.jsx(se, { to: a(n.name), children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1348
1367
  ] }, n.name)) })
1349
1368
  ] });
1350
1369
  }
1351
- function Ut({ groups: s }) {
1352
- return s.length ? /* @__PURE__ */ e.jsxs(O, { children: [
1353
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1354
- /* @__PURE__ */ e.jsx(N, { children: "Group ID" }),
1355
- /* @__PURE__ */ e.jsx(N, { children: "Name" }),
1356
- /* @__PURE__ */ e.jsx(N, { children: "Project" }),
1357
- /* @__PURE__ */ e.jsx(N, { children: "Runs" }),
1358
- /* @__PURE__ */ e.jsx(N, { children: "Actions" })
1370
+ function Js({ groups: t }) {
1371
+ return t.length ? /* @__PURE__ */ e.jsxs(B, { children: [
1372
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1373
+ /* @__PURE__ */ e.jsx(w, { children: "Group ID" }),
1374
+ /* @__PURE__ */ e.jsx(w, { children: "Name" }),
1375
+ /* @__PURE__ */ e.jsx(w, { children: "Project" }),
1376
+ /* @__PURE__ */ e.jsx(w, { children: "Runs" }),
1377
+ /* @__PURE__ */ e.jsx(w, { children: "Actions" })
1359
1378
  ] }) }),
1360
- /* @__PURE__ */ e.jsx(L, { children: s.map((r) => /* @__PURE__ */ e.jsxs(j, { children: [
1361
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: Q(r.group_id) }),
1362
- /* @__PURE__ */ e.jsx(c, { children: r.group_name || "—" }),
1363
- /* @__PURE__ */ e.jsx(c, { children: r.project }),
1364
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: r.run_count }) }),
1365
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Y, { to: `/groups/${r.group_id}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1366
- ] }, r.group_id)) })
1379
+ /* @__PURE__ */ e.jsx(U, { children: t.map((s) => /* @__PURE__ */ e.jsxs(j, { children: [
1380
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: oe(s.group_id) }),
1381
+ /* @__PURE__ */ e.jsx(d, { children: s.group_name || "—" }),
1382
+ /* @__PURE__ */ e.jsx(d, { children: s.project }),
1383
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: s.run_count }) }),
1384
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(se, { to: `/groups/${s.group_id}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1385
+ ] }, s.group_id)) })
1367
1386
  ] }) : /* @__PURE__ */ e.jsx(
1368
- he,
1387
+ we,
1369
1388
  {
1370
1389
  message: "No groups found",
1371
1390
  hint: "Groups are created when runs have a group_id set"
1372
1391
  }
1373
1392
  );
1374
1393
  }
1375
- function Gt({
1376
- runId: s,
1377
- runName: r,
1394
+ function Xs({
1395
+ runId: t,
1396
+ runName: s,
1378
1397
  variant: a = "secondary",
1379
1398
  size: n = "sm",
1380
- className: o = ""
1399
+ className: l = ""
1381
1400
  }) {
1382
- const { api: d } = z(), [u, i] = P({ status: "idle" }), [x, h] = P(!1), [m, p] = P(null), y = async () => {
1401
+ const { api: o } = K(), [c, i] = T({ status: "idle" }), [u, h] = T(!1), [m, p] = T(null), b = async () => {
1383
1402
  i({ status: "preparing", message: "Preparing bundle..." }), h(!0);
1384
1403
  try {
1385
- const T = await d.createExport(s);
1404
+ const E = await o.createExport(t);
1386
1405
  i({
1387
1406
  status: "packing",
1388
1407
  message: "Creating bundle...",
1389
- artifactCount: T.artifact_count,
1390
- objectCount: T.object_count
1391
- }), i((xe) => ({
1392
- ...xe,
1408
+ artifactCount: E.artifact_count,
1409
+ objectCount: E.object_count
1410
+ }), i((y) => ({
1411
+ ...y,
1393
1412
  status: "downloading",
1394
1413
  message: "Downloading bundle..."
1395
1414
  }));
1396
- const I = d.getExportDownloadUrl(s), k = await fetch(I, {
1415
+ const A = o.getExportDownloadUrl(t), S = await fetch(A, {
1397
1416
  credentials: "same-origin"
1398
1417
  });
1399
- if (!k.ok)
1418
+ if (!S.ok)
1400
1419
  throw new Error("Download failed");
1401
- const te = await k.blob(), ae = r ? `${r.replace(/[^a-zA-Z0-9_-]/g, "_")}_${s.slice(0, 8)}.zip` : `run_${s.slice(0, 8)}.zip`, J = URL.createObjectURL(te), Z = document.createElement("a");
1402
- Z.href = J, Z.download = ae, document.body.appendChild(Z), Z.click(), document.body.removeChild(Z), URL.revokeObjectURL(J), i({
1420
+ const ie = await S.blob(), ce = s ? `${s.replace(/[^a-zA-Z0-9_-]/g, "_")}_${t.slice(0, 8)}.zip` : `run_${t.slice(0, 8)}.zip`, Z = URL.createObjectURL(ie), J = document.createElement("a");
1421
+ J.href = Z, J.download = ce, document.body.appendChild(J), J.click(), document.body.removeChild(J), URL.revokeObjectURL(Z), i({
1403
1422
  status: "complete",
1404
1423
  message: "Export complete!",
1405
- bundleSize: te.size,
1406
- artifactCount: T.artifact_count,
1407
- objectCount: T.object_count
1424
+ bundleSize: ie.size,
1425
+ artifactCount: E.artifact_count,
1426
+ objectCount: E.object_count
1408
1427
  });
1409
- } catch (T) {
1410
- const I = T instanceof Error ? T.message : "Export failed";
1411
- i({ status: "error", message: I }), p({ message: I, variant: "error" });
1428
+ } catch (E) {
1429
+ const A = E instanceof Error ? E.message : "Export failed";
1430
+ i({ status: "error", message: A }), p({ message: A, variant: "error" });
1412
1431
  }
1413
- }, M = () => {
1414
- u.status !== "preparing" && u.status !== "packing" && u.status !== "downloading" && (h(!1), i({ status: "idle" }));
1415
- }, _ = (T) => T < 1024 ? `${T} B` : T < 1024 * 1024 ? `${(T / 1024).toFixed(1)} KB` : `${(T / (1024 * 1024)).toFixed(1)} MB`, H = ["preparing", "packing", "downloading"].includes(u.status);
1432
+ }, D = () => {
1433
+ c.status !== "preparing" && c.status !== "packing" && c.status !== "downloading" && (h(!1), i({ status: "idle" }));
1434
+ }, g = (E) => E < 1024 ? `${E} B` : E < 1024 * 1024 ? `${(E / 1024).toFixed(1)} KB` : `${(E / (1024 * 1024)).toFixed(1)} MB`, I = ["preparing", "packing", "downloading"].includes(c.status);
1416
1435
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1417
1436
  /* @__PURE__ */ e.jsxs(
1418
- D,
1437
+ $,
1419
1438
  {
1420
1439
  variant: a,
1421
1440
  size: n,
1422
- onClick: y,
1423
- disabled: H,
1424
- className: o,
1441
+ onClick: b,
1442
+ disabled: I,
1443
+ className: l,
1425
1444
  children: [
1426
- H && /* @__PURE__ */ e.jsx(B, {}),
1427
- /* @__PURE__ */ e.jsx(Wt, {}),
1445
+ I && /* @__PURE__ */ e.jsx(G, {}),
1446
+ /* @__PURE__ */ e.jsx(Qs, {}),
1428
1447
  "Export"
1429
1448
  ]
1430
1449
  }
1431
1450
  ),
1432
1451
  /* @__PURE__ */ e.jsx(
1433
- as,
1452
+ ft,
1434
1453
  {
1435
- open: x,
1436
- onClose: M,
1454
+ open: u,
1455
+ onClose: D,
1437
1456
  title: "Export Run",
1438
- actions: u.status === "error" || u.status === "complete" ? /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: M, children: "Close" }) : void 0,
1457
+ actions: c.status === "error" || c.status === "complete" ? /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: D, children: "Close" }) : void 0,
1439
1458
  children: /* @__PURE__ */ e.jsxs("div", { className: "py-4", children: [
1440
1459
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
1441
- u.status === "error" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-danger-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(zt, {}) }) : u.status === "complete" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-success-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Vt, {}) }) : /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-primary-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(B, {}) }),
1460
+ c.status === "error" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-danger-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(er, {}) }) : c.status === "complete" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-success-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Zs, {}) }) : /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-primary-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(G, {}) }),
1442
1461
  /* @__PURE__ */ e.jsxs("div", { children: [
1443
- /* @__PURE__ */ e.jsx("p", { className: "font-medium", children: u.message }),
1444
- u.status === "error" && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[var(--dq-text-muted)]", children: "Please try again or contact support." })
1462
+ /* @__PURE__ */ e.jsx("p", { className: "font-medium", children: c.message }),
1463
+ c.status === "error" && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[var(--dq-text-muted)]", children: "Please try again or contact support." })
1445
1464
  ] })
1446
1465
  ] }),
1447
- (u.artifactCount !== void 0 || u.objectCount !== void 0 || u.bundleSize !== void 0) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2 mt-4", children: [
1448
- u.artifactCount !== void 0 && /* @__PURE__ */ e.jsxs(K, { variant: "gray", children: [
1449
- u.artifactCount,
1466
+ (c.artifactCount !== void 0 || c.objectCount !== void 0 || c.bundleSize !== void 0) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2 mt-4", children: [
1467
+ c.artifactCount !== void 0 && /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
1468
+ c.artifactCount,
1450
1469
  " artifacts"
1451
1470
  ] }),
1452
- u.objectCount !== void 0 && /* @__PURE__ */ e.jsxs(K, { variant: "gray", children: [
1453
- u.objectCount,
1471
+ c.objectCount !== void 0 && /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
1472
+ c.objectCount,
1454
1473
  " objects"
1455
1474
  ] }),
1456
- u.bundleSize !== void 0 && /* @__PURE__ */ e.jsx(K, { variant: "info", children: _(u.bundleSize) })
1475
+ c.bundleSize !== void 0 && /* @__PURE__ */ e.jsx(re, { variant: "info", children: g(c.bundleSize) })
1457
1476
  ] }),
1458
1477
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 pt-4 border-t border-[var(--dq-border-light)]", children: [
1459
1478
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
1460
1479
  "Run ID: ",
1461
- /* @__PURE__ */ e.jsx("code", { className: "text-xs", children: s })
1480
+ /* @__PURE__ */ e.jsx("code", { className: "text-xs", children: t })
1462
1481
  ] }),
1463
- r && /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
1482
+ s && /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
1464
1483
  "Name: ",
1465
- r
1484
+ s
1466
1485
  ] })
1467
1486
  ] })
1468
1487
  ] })
1469
1488
  }
1470
1489
  ),
1471
1490
  m && /* @__PURE__ */ e.jsx(
1472
- Ce,
1491
+ Me,
1473
1492
  {
1474
1493
  message: m.message,
1475
1494
  variant: m.variant,
@@ -1479,7 +1498,7 @@ function Gt({
1479
1498
  )
1480
1499
  ] });
1481
1500
  }
1482
- function Wt() {
1501
+ function Qs() {
1483
1502
  return /* @__PURE__ */ e.jsxs(
1484
1503
  "svg",
1485
1504
  {
@@ -1499,7 +1518,7 @@ function Wt() {
1499
1518
  }
1500
1519
  );
1501
1520
  }
1502
- function Vt() {
1521
+ function Zs() {
1503
1522
  return /* @__PURE__ */ e.jsx(
1504
1523
  "svg",
1505
1524
  {
@@ -1515,7 +1534,7 @@ function Vt() {
1515
1534
  }
1516
1535
  );
1517
1536
  }
1518
- function zt() {
1537
+ function er() {
1519
1538
  return /* @__PURE__ */ e.jsxs(
1520
1539
  "svg",
1521
1540
  {
@@ -1535,78 +1554,392 @@ function zt() {
1535
1554
  }
1536
1555
  );
1537
1556
  }
1538
- function Yt({ createdAt: s, endedAt: r, status: a }) {
1539
- const n = !Be(a), [o, d] = P(Date.now());
1540
- ne(() => {
1557
+ const F = { top: 12, right: 16, bottom: 28, left: 56 }, at = 210, Mt = 5, Lt = [
1558
+ "var(--dq-primary)",
1559
+ "var(--dq-info)",
1560
+ "var(--dq-warning)",
1561
+ "var(--dq-danger)",
1562
+ "#8B5CF6",
1563
+ "#EC4899"
1564
+ ];
1565
+ function tr(t, s) {
1566
+ const a = t / s, n = Math.pow(10, Math.floor(Math.log10(a))), l = a / n;
1567
+ return (l < 1.5 ? 1 : l < 3 ? 2 : l < 7 ? 5 : 10) * n;
1568
+ }
1569
+ function qt(t, s, a) {
1570
+ if (t === s) return [t];
1571
+ const n = tr(s - t, a), l = Math.floor(t / n) * n, o = [];
1572
+ for (let c = l; c <= s + n * 0.01; c += n)
1573
+ o.push(c);
1574
+ return o;
1575
+ }
1576
+ function sr(t) {
1577
+ const s = Math.abs(t);
1578
+ return s === 0 ? "0" : s >= 1e6 ? (t / 1e6).toFixed(1) + "M" : s >= 1e3 ? (t / 1e3).toFixed(1) + "k" : s >= 1 ? t.toFixed(s >= 100 ? 0 : s >= 10 ? 1 : 2) : t.toPrecision(3);
1579
+ }
1580
+ function rr(t, s) {
1581
+ if (t.length <= s) return t;
1582
+ const a = t.length / s, n = [t[0]];
1583
+ for (let l = 1; l < s - 1; l++) {
1584
+ const o = Math.floor(l * a), c = Math.min(Math.floor((l + 1) * a), t.length);
1585
+ let i = t[o], u = t[o];
1586
+ for (let h = o; h < c; h++)
1587
+ t[h].value < i.value && (i = t[h]), t[h].value > u.value && (u = t[h]);
1588
+ i.step <= u.step ? (n.push(i), i !== u && n.push(u)) : (n.push(u), i !== u && n.push(i));
1589
+ }
1590
+ return n.push(t[t.length - 1]), n;
1591
+ }
1592
+ function nr(t) {
1593
+ const [s, a] = T(0);
1594
+ return de(() => {
1595
+ const n = t.current;
1541
1596
  if (!n) return;
1542
- const i = setInterval(() => d(Date.now()), 1e3);
1597
+ const l = new ResizeObserver((o) => {
1598
+ const c = o[0]?.contentRect.width;
1599
+ c && c > 0 && a(Math.floor(c));
1600
+ });
1601
+ return l.observe(n), a(Math.floor(n.getBoundingClientRect().width) || 0), () => l.disconnect();
1602
+ }, [t]), s;
1603
+ }
1604
+ function ar({ x: t, y: s, value: a, step: n, chartWidth: l }) {
1605
+ const c = `${a} step ${n}`.length * 6.2 + 16, i = 22, u = 8;
1606
+ let h = s - i - u;
1607
+ h < 2 && (h = s + u + 4);
1608
+ let m = t - c / 2;
1609
+ return m = Math.max(F.left, Math.min(m, l - F.right - c)), /* @__PURE__ */ e.jsxs("g", { pointerEvents: "none", children: [
1610
+ /* @__PURE__ */ e.jsx(
1611
+ "rect",
1612
+ {
1613
+ x: m,
1614
+ y: h,
1615
+ width: c,
1616
+ height: i,
1617
+ rx: 4,
1618
+ fill: "var(--dq-bg-primary)",
1619
+ stroke: "var(--dq-border-color)",
1620
+ strokeWidth: 1
1621
+ }
1622
+ ),
1623
+ /* @__PURE__ */ e.jsxs(
1624
+ "text",
1625
+ {
1626
+ x: m + 8,
1627
+ y: h + i / 2,
1628
+ dominantBaseline: "central",
1629
+ fontSize: 11,
1630
+ className: "fill-[var(--dq-text-primary)]",
1631
+ fontFamily: "ui-monospace, monospace",
1632
+ children: [
1633
+ /* @__PURE__ */ e.jsx("tspan", { children: a }),
1634
+ /* @__PURE__ */ e.jsxs("tspan", { dx: 8, className: "fill-[var(--dq-text-muted)]", children: [
1635
+ "step ",
1636
+ n
1637
+ ] })
1638
+ ]
1639
+ }
1640
+ )
1641
+ ] });
1642
+ }
1643
+ function ir({ metricKey: t, points: s, color: a }) {
1644
+ const n = De(null), l = De(null), o = nr(n), [c, i] = T(null), u = ke(
1645
+ () => [...s].sort((y, W) => y.step - W.step),
1646
+ [s]
1647
+ ), h = o - F.left - F.right, m = at - F.top - F.bottom, p = ke(
1648
+ () => h > 0 ? rr(u, h) : u,
1649
+ [u, h]
1650
+ ), { xMin: b, xMax: D, yMin: g, yMax: I } = ke(() => {
1651
+ let y = 1 / 0, W = -1 / 0;
1652
+ for (const V of u)
1653
+ V.value < y && (y = V.value), V.value > W && (W = V.value);
1654
+ const ue = (W - y) * 0.05 || 0.1;
1655
+ return {
1656
+ xMin: u[0]?.step ?? 0,
1657
+ xMax: u[u.length - 1]?.step ?? 1,
1658
+ yMin: y - ue,
1659
+ yMax: W + ue
1660
+ };
1661
+ }, [u]), E = me(
1662
+ (y) => F.left + (y - b) / (D - b || 1) * h,
1663
+ [b, D, h]
1664
+ ), A = me(
1665
+ (y) => F.top + m - (y - g) / (I - g || 1) * m,
1666
+ [g, I, m]
1667
+ ), S = ke(
1668
+ () => p.map((y, W) => `${W === 0 ? "M" : "L"}${E(y.step).toFixed(1)},${A(y.value).toFixed(1)}`).join(" "),
1669
+ [p, E, A]
1670
+ ), ie = ke(() => qt(g, I, Mt), [g, I]), ce = ke(() => qt(b, D, Mt).map(Math.round), [b, D]), Z = me(
1671
+ (y) => {
1672
+ const W = l.current?.getBoundingClientRect();
1673
+ if (!W || !u.length) return;
1674
+ const ue = y.clientX - W.left, V = b + (ue - F.left) / h * (D - b);
1675
+ let ee = 0, je = u.length - 1;
1676
+ for (; ee < je; ) {
1677
+ const le = ee + je >> 1;
1678
+ u[le].step < V ? ee = le + 1 : je = le;
1679
+ }
1680
+ const ne = ee > 0 && Math.abs(u[ee - 1].step - V) < Math.abs(u[ee].step - V) ? ee - 1 : ee, te = u[ne];
1681
+ i({ x: E(te.step), y: A(te.value), pt: te });
1682
+ },
1683
+ [u, b, D, h, E, A]
1684
+ ), J = u[u.length - 1];
1685
+ return o < 100 ? /* @__PURE__ */ e.jsx("div", { ref: n, className: "metric-chart" }) : /* @__PURE__ */ e.jsxs("div", { ref: n, className: "metric-chart", children: [
1686
+ /* @__PURE__ */ e.jsxs("div", { className: "metric-chart-header", children: [
1687
+ /* @__PURE__ */ e.jsx("span", { className: "metric-chart-label", style: { color: a }, children: t }),
1688
+ J && /* @__PURE__ */ e.jsxs("span", { className: "metric-chart-latest", children: [
1689
+ "latest: ",
1690
+ lt(J.value),
1691
+ " @ step ",
1692
+ J.step
1693
+ ] })
1694
+ ] }),
1695
+ /* @__PURE__ */ e.jsxs(
1696
+ "svg",
1697
+ {
1698
+ ref: l,
1699
+ width: o,
1700
+ height: at,
1701
+ className: "metric-chart-svg",
1702
+ onMouseMove: Z,
1703
+ onMouseLeave: () => i(null),
1704
+ children: [
1705
+ ie.map((y) => /* @__PURE__ */ e.jsx(
1706
+ "line",
1707
+ {
1708
+ x1: F.left,
1709
+ x2: o - F.right,
1710
+ y1: A(y),
1711
+ y2: A(y),
1712
+ stroke: "var(--dq-border-color)",
1713
+ strokeWidth: 0.5,
1714
+ strokeDasharray: "3,3"
1715
+ },
1716
+ `gy-${y}`
1717
+ )),
1718
+ ce.map((y) => /* @__PURE__ */ e.jsx(
1719
+ "line",
1720
+ {
1721
+ x1: E(y),
1722
+ x2: E(y),
1723
+ y1: F.top,
1724
+ y2: F.top + m,
1725
+ stroke: "var(--dq-border-color)",
1726
+ strokeWidth: 0.5,
1727
+ strokeDasharray: "3,3"
1728
+ },
1729
+ `gx-${y}`
1730
+ )),
1731
+ /* @__PURE__ */ e.jsx(
1732
+ "line",
1733
+ {
1734
+ x1: F.left,
1735
+ y1: F.top,
1736
+ x2: F.left,
1737
+ y2: F.top + m,
1738
+ stroke: "var(--dq-border-color)",
1739
+ strokeWidth: 1
1740
+ }
1741
+ ),
1742
+ /* @__PURE__ */ e.jsx(
1743
+ "line",
1744
+ {
1745
+ x1: F.left,
1746
+ y1: F.top + m,
1747
+ x2: o - F.right,
1748
+ y2: F.top + m,
1749
+ stroke: "var(--dq-border-color)",
1750
+ strokeWidth: 1
1751
+ }
1752
+ ),
1753
+ ie.map((y) => /* @__PURE__ */ e.jsx(
1754
+ "text",
1755
+ {
1756
+ x: F.left - 6,
1757
+ y: A(y),
1758
+ textAnchor: "end",
1759
+ dominantBaseline: "middle",
1760
+ className: "fill-[var(--dq-text-muted)]",
1761
+ fontSize: 10,
1762
+ children: sr(y)
1763
+ },
1764
+ y
1765
+ )),
1766
+ ce.map((y) => /* @__PURE__ */ e.jsx(
1767
+ "text",
1768
+ {
1769
+ x: E(y),
1770
+ y: at - 4,
1771
+ textAnchor: "middle",
1772
+ className: "fill-[var(--dq-text-muted)]",
1773
+ fontSize: 10,
1774
+ children: y
1775
+ },
1776
+ y
1777
+ )),
1778
+ /* @__PURE__ */ e.jsx(
1779
+ "path",
1780
+ {
1781
+ d: S,
1782
+ fill: "none",
1783
+ stroke: a,
1784
+ strokeWidth: 1.5,
1785
+ strokeLinejoin: "round",
1786
+ strokeLinecap: "round"
1787
+ }
1788
+ ),
1789
+ c && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1790
+ /* @__PURE__ */ e.jsx(
1791
+ "line",
1792
+ {
1793
+ x1: c.x,
1794
+ x2: c.x,
1795
+ y1: F.top,
1796
+ y2: F.top + m,
1797
+ stroke: "var(--dq-text-muted)",
1798
+ strokeWidth: 1,
1799
+ strokeDasharray: "3,3",
1800
+ opacity: 0.4
1801
+ }
1802
+ ),
1803
+ /* @__PURE__ */ e.jsx("circle", { cx: c.x, cy: c.y, r: 3.5, fill: a }),
1804
+ /* @__PURE__ */ e.jsx(
1805
+ ar,
1806
+ {
1807
+ x: c.x,
1808
+ y: c.y,
1809
+ value: lt(c.pt.value),
1810
+ step: c.pt.step,
1811
+ chartWidth: o
1812
+ }
1813
+ )
1814
+ ] })
1815
+ ]
1816
+ }
1817
+ )
1818
+ ] });
1819
+ }
1820
+ const ze = 6;
1821
+ function cr({ series: t }) {
1822
+ const s = Object.keys(t).sort(), [a, n] = T(0);
1823
+ if (!s.length) return null;
1824
+ const l = Math.ceil(s.length / ze), o = s.slice(a * ze, (a + 1) * ze);
1825
+ return /* @__PURE__ */ e.jsxs("div", { children: [
1826
+ /* @__PURE__ */ e.jsx("div", { className: "metric-charts-grid", children: o.map((c, i) => /* @__PURE__ */ e.jsx(
1827
+ ir,
1828
+ {
1829
+ metricKey: c,
1830
+ points: t[c],
1831
+ color: Lt[(a * ze + i) % Lt.length]
1832
+ },
1833
+ c
1834
+ )) }),
1835
+ l > 1 && /* @__PURE__ */ e.jsxs("div", { className: "metric-charts-pagination", children: [
1836
+ /* @__PURE__ */ e.jsx(
1837
+ "button",
1838
+ {
1839
+ className: "metric-charts-page-btn",
1840
+ onClick: () => n((c) => c - 1),
1841
+ disabled: a === 0,
1842
+ children: "‹ Prev"
1843
+ }
1844
+ ),
1845
+ /* @__PURE__ */ e.jsxs("span", { className: "metric-charts-page-info", children: [
1846
+ a + 1,
1847
+ " / ",
1848
+ l
1849
+ ] }),
1850
+ /* @__PURE__ */ e.jsx(
1851
+ "button",
1852
+ {
1853
+ className: "metric-charts-page-btn",
1854
+ onClick: () => n((c) => c + 1),
1855
+ disabled: a >= l - 1,
1856
+ children: "Next ›"
1857
+ }
1858
+ )
1859
+ ] })
1860
+ ] });
1861
+ }
1862
+ function lr({ createdAt: t, endedAt: s, status: a }) {
1863
+ const n = !$e(a), [l, o] = T(Date.now());
1864
+ de(() => {
1865
+ if (!n) return;
1866
+ const i = setInterval(() => o(Date.now()), 1e3);
1543
1867
  return () => clearInterval(i);
1544
1868
  }, [n]);
1545
- const u = n ? Math.max(0, Math.floor((o - new Date(s).getTime()) / 1e3)) : As(s, r);
1546
- return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Fs(u) });
1869
+ const c = n ? Math.max(0, Math.floor((l - new Date(t).getTime()) / 1e3)) : Ut(t, s);
1870
+ return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Wt(c) });
1547
1871
  }
1548
- function Kt() {
1549
- const { runId: s } = ns(), r = gt(), { api: a } = z(), { data: n, loading: o, error: d, refetch: u } = Bs(s), { data: i, refetch: x } = qe(), [h, m] = P(!1), [p, y] = P(null), { mutate: M, loading: _ } = Re(
1872
+ function or() {
1873
+ const { runId: t } = xt(), s = Es(), { api: a } = K(), { data: n, loading: l, error: o, refetch: c } = Yt(t), { data: i, refetch: u } = Ke(), h = n ? !$e(n.status) : !1, { data: m } = Gs(t, h), [p, b] = T(!1), [D, g] = T(null), { mutate: I, loading: E } = Fe(
1550
1874
  () => a.setBaseline(n.project, n.run_id)
1551
- ), { mutate: H, loading: T } = Re(
1552
- () => a.deleteRun(s)
1553
- ), k = i?.find((w) => w.name === n?.project)?.baseline?.run_id === s;
1554
- if (ne(() => {
1555
- if (p) {
1556
- const w = setTimeout(() => y(null), 3e3);
1557
- return () => clearTimeout(w);
1558
- }
1559
- }, [p]), o)
1560
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(B, {}) }) });
1561
- if (d || !n)
1562
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(
1563
- he,
1875
+ ), { mutate: A, loading: S } = Fe(
1876
+ () => a.deleteRun(t)
1877
+ ), ce = i?.find((C) => C.name === n?.project)?.baseline?.run_id === t;
1878
+ if (de(() => {
1879
+ if (D) {
1880
+ const C = setTimeout(() => g(null), 3e3);
1881
+ return () => clearTimeout(C);
1882
+ }
1883
+ }, [D]), l)
1884
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) });
1885
+ if (o || !n)
1886
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(
1887
+ we,
1564
1888
  {
1565
1889
  message: "Run not found",
1566
- hint: d?.message || `Run ${s} does not exist`
1890
+ hint: o?.message || `Run ${t} does not exist`
1567
1891
  }
1568
1892
  ) }) });
1569
- const te = n.backend || {}, ae = n.fingerprints || {}, J = n.data?.params || {}, Z = n.data?.metrics || {}, xe = n.data?.tags || {}, me = n.artifacts || [], ge = n.errors || [], Me = async () => {
1893
+ const Z = n.backend || {}, J = n.fingerprints || {}, y = n.data?.params || {}, W = n.data?.metrics || {}, ue = n.data?.tags || {}, V = n.artifacts || [], ee = n.errors || [], je = async () => {
1570
1894
  try {
1571
- await M(), await x(), u(), y({ message: "Baseline updated", variant: "success" });
1895
+ await I(), await u(), c(), g({ message: "Baseline updated", variant: "success" });
1572
1896
  } catch {
1573
- y({ message: "Failed to set baseline", variant: "error" });
1897
+ g({ message: "Failed to set baseline", variant: "error" });
1574
1898
  }
1575
- }, Ue = async () => {
1899
+ }, ne = async () => {
1576
1900
  try {
1577
- await H(), m(!1), y({ message: "Run deleted", variant: "success" }), setTimeout(() => r("/runs"), 1e3);
1901
+ await A(), b(!1), g({ message: "Run deleted", variant: "success" }), setTimeout(() => s("/runs"), 1e3);
1578
1902
  } catch {
1579
- y({ message: "Failed to delete run", variant: "error" }), m(!1);
1903
+ g({ message: "Failed to delete run", variant: "error" }), b(!1);
1580
1904
  }
1581
- }, Te = async (w) => {
1582
- const S = me[w];
1905
+ }, te = async (C) => {
1906
+ const L = V[C];
1583
1907
  try {
1584
- const ke = a.getArtifactDownloadUrl(n.run_id, w), ve = await fetch(ke);
1585
- if (!ve.ok) throw new Error("Download failed");
1586
- const Pe = await ve.blob(), le = document.createElement("a");
1587
- le.href = URL.createObjectURL(Pe), le.download = S?.kind || `artifact-${w}`, le.click(), URL.revokeObjectURL(le.href), y({ message: "Download complete", variant: "success" });
1588
- } catch {
1589
- y({ message: "Download failed", variant: "error" });
1590
- }
1591
- }, ee = [
1592
- { label: "Project", value: /* @__PURE__ */ e.jsx(Y, { to: `/runs?project=${n.project}`, children: n.project }) },
1908
+ const pe = a.getArtifactDownloadUrl(n.run_id, C), he = await fetch(pe);
1909
+ if (!he.ok) {
1910
+ const qe = {
1911
+ 404: "Artifact not found",
1912
+ 403: "Permission denied"
1913
+ };
1914
+ throw new Error(
1915
+ qe[he.status] ?? (he.status >= 500 ? "Server error" : `Download failed (${he.status})`)
1916
+ );
1917
+ }
1918
+ const Le = await he.blob(), ye = document.createElement("a");
1919
+ ye.href = URL.createObjectURL(Le), ye.download = L?.kind || `artifact-${C}`, ye.click(), URL.revokeObjectURL(ye.href), g({ message: "Download complete", variant: "success" });
1920
+ } catch (pe) {
1921
+ const he = pe instanceof Error && pe.message ? pe.message : "Download failed";
1922
+ g({ message: he, variant: "error" });
1923
+ }
1924
+ }, le = [
1925
+ { label: "Project", value: /* @__PURE__ */ e.jsx(se, { to: `/runs?project=${n.project}`, children: n.project }) },
1593
1926
  { label: "Name", value: n.run_name || "—" },
1594
1927
  { label: "Adapter", value: n.adapter || "N/A" },
1595
- { label: "Status", value: /* @__PURE__ */ e.jsx(Us, { status: n.status }) },
1596
- { label: "Created", value: `${n.created_at} (${Le(n.created_at)})` },
1928
+ { label: "Status", value: /* @__PURE__ */ e.jsx(Jt, { status: n.status }) },
1929
+ { label: "Created", value: `${n.created_at} (${Ye(n.created_at)})` },
1597
1930
  {
1598
1931
  label: "Duration",
1599
- value: /* @__PURE__ */ e.jsx(Yt, { createdAt: n.created_at, endedAt: n.ended_at, status: n.status })
1932
+ value: /* @__PURE__ */ e.jsx(lr, { createdAt: n.created_at, endedAt: n.ended_at, status: n.status })
1600
1933
  },
1601
- ...n.ended_at ? [{ label: "Ended", value: `${n.ended_at} (${Le(n.ended_at)})` }] : [],
1602
- { label: "Backend", value: te.name || "N/A" },
1934
+ ...n.ended_at ? [{ label: "Ended", value: `${n.ended_at} (${Ye(n.ended_at)})` }] : [],
1935
+ { label: "Backend", value: Z.name || "N/A" },
1603
1936
  ...n.group_id ? [{
1604
1937
  label: "Group",
1605
- value: /* @__PURE__ */ e.jsx(Y, { to: `/groups/${n.group_id}`, children: n.group_name || Q(n.group_id) })
1938
+ value: /* @__PURE__ */ e.jsx(se, { to: `/groups/${n.group_id}`, children: n.group_name || oe(n.group_id) })
1606
1939
  }] : []
1607
1940
  ];
1608
- return /* @__PURE__ */ e.jsxs(V, { children: [
1609
- k && /* @__PURE__ */ e.jsxs("div", { className: "mb-4 px-4 py-3 bg-[#EFF6FF] border border-[#2563EB]/20 rounded-md text-[#2563EB] text-sm font-medium", children: [
1941
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
1942
+ ce && /* @__PURE__ */ e.jsxs("div", { className: "mb-4 px-4 py-3 bg-[#EFF6FF] border border-[#2563EB]/20 rounded-md text-[#2563EB] text-sm font-medium", children: [
1610
1943
  'This run is the current baseline for project "',
1611
1944
  n.project,
1612
1945
  '"'
@@ -1617,143 +1950,147 @@ function Kt() {
1617
1950
  /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children: n.run_id })
1618
1951
  ] }),
1619
1952
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1620
- /* @__PURE__ */ e.jsx(Gt, { runId: n.run_id, runName: n.run_name }),
1621
- !k && /* @__PURE__ */ e.jsxs(D, { variant: "secondary", size: "sm", onClick: Me, disabled: _, children: [
1622
- _ && /* @__PURE__ */ e.jsx(B, {}),
1953
+ /* @__PURE__ */ e.jsx(Xs, { runId: n.run_id, runName: n.run_name }),
1954
+ !ce && /* @__PURE__ */ e.jsxs($, { variant: "secondary", size: "sm", onClick: je, disabled: E, children: [
1955
+ E && /* @__PURE__ */ e.jsx(G, {}),
1623
1956
  "Set as Baseline"
1624
1957
  ] }),
1625
- /* @__PURE__ */ e.jsx(D, { variant: "ghost-danger", size: "sm", onClick: () => m(!0), children: "Delete" })
1958
+ /* @__PURE__ */ e.jsx($, { variant: "ghost-danger", size: "sm", onClick: () => b(!0), children: "Delete" })
1626
1959
  ] })
1627
1960
  ] }),
1628
1961
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
1629
- /* @__PURE__ */ e.jsxs(b, { children: [
1630
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Overview" }) }),
1631
- /* @__PURE__ */ e.jsx(es, { items: ee })
1962
+ /* @__PURE__ */ e.jsxs(N, { children: [
1963
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Overview" }) }),
1964
+ /* @__PURE__ */ e.jsx(ot, { items: le })
1632
1965
  ] }),
1633
- /* @__PURE__ */ e.jsxs(b, { children: [
1634
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Fingerprints" }) }),
1635
- /* @__PURE__ */ e.jsx(es, { items: [
1636
- { label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: ae.run || "N/A" }) },
1637
- { label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: ae.program || "N/A" }) }
1966
+ /* @__PURE__ */ e.jsxs(N, { children: [
1967
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Fingerprints" }) }),
1968
+ /* @__PURE__ */ e.jsx(ot, { items: [
1969
+ { label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: J.run || "N/A" }) },
1970
+ { label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: J.program || "N/A" }) }
1638
1971
  ] })
1639
1972
  ] })
1640
1973
  ] }),
1641
1974
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4 mb-4", children: [
1642
- /* @__PURE__ */ e.jsxs(b, { children: [
1643
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Parameters" }) }),
1644
- Object.keys(J).length ? /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx(L, { children: Object.entries(J).map(([w, S]) => /* @__PURE__ */ e.jsxs(j, { children: [
1645
- /* @__PURE__ */ e.jsx(c, { children: w }),
1646
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(S) })
1647
- ] }, w)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No parameters" })
1975
+ /* @__PURE__ */ e.jsxs(N, { children: [
1976
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Parameters" }) }),
1977
+ Object.keys(y).length ? /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(U, { children: Object.entries(y).map(([C, L]) => /* @__PURE__ */ e.jsxs(j, { children: [
1978
+ /* @__PURE__ */ e.jsx(d, { children: C }),
1979
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(L) })
1980
+ ] }, C)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No parameters" })
1648
1981
  ] }),
1649
- /* @__PURE__ */ e.jsxs(b, { children: [
1650
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Metrics" }) }),
1651
- Object.keys(Z).length ? /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx(L, { children: Object.entries(Z).map(([w, S]) => /* @__PURE__ */ e.jsxs(j, { children: [
1652
- /* @__PURE__ */ e.jsx(c, { children: w }),
1653
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: typeof S == "number" ? Ct(S) : String(S) })
1654
- ] }, w)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No metrics" })
1982
+ /* @__PURE__ */ e.jsxs(N, { children: [
1983
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Metrics" }) }),
1984
+ Object.keys(W).length ? /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(U, { children: Object.entries(W).map(([C, L]) => /* @__PURE__ */ e.jsxs(j, { children: [
1985
+ /* @__PURE__ */ e.jsx(d, { children: C }),
1986
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: typeof L == "number" ? lt(L) : String(L) })
1987
+ ] }, C)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No metrics" })
1655
1988
  ] }),
1656
- /* @__PURE__ */ e.jsxs(b, { children: [
1657
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Tags" }) }),
1658
- Object.keys(xe).length ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: Object.entries(xe).map(([w, S]) => /* @__PURE__ */ e.jsxs(K, { variant: "gray", children: [
1659
- w,
1989
+ /* @__PURE__ */ e.jsxs(N, { children: [
1990
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Tags" }) }),
1991
+ Object.keys(ue).length ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: Object.entries(ue).map(([C, L]) => /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
1992
+ C,
1660
1993
  ": ",
1661
- String(S)
1662
- ] }, w)) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No tags" })
1994
+ String(L)
1995
+ ] }, C)) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No tags" })
1663
1996
  ] })
1664
1997
  ] }),
1665
- /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
1666
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsxs(W, { children: [
1998
+ m && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
1999
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Metric History" }) }),
2000
+ /* @__PURE__ */ e.jsx("div", { className: "p-4", children: /* @__PURE__ */ e.jsx(cr, { series: m }) })
2001
+ ] }),
2002
+ /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2003
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(H, { children: [
1667
2004
  "Artifacts (",
1668
- me.length,
2005
+ V.length,
1669
2006
  ")"
1670
2007
  ] }) }),
1671
- me.length ? /* @__PURE__ */ e.jsxs(O, { children: [
1672
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1673
- /* @__PURE__ */ e.jsx(N, { children: "#" }),
1674
- /* @__PURE__ */ e.jsx(N, { children: "Kind" }),
1675
- /* @__PURE__ */ e.jsx(N, { children: "Role" }),
1676
- /* @__PURE__ */ e.jsx(N, { children: "Media Type" }),
1677
- /* @__PURE__ */ e.jsx(N, { children: "Digest" }),
1678
- /* @__PURE__ */ e.jsx(N, { children: "Actions" })
2008
+ V.length ? /* @__PURE__ */ e.jsxs(B, { children: [
2009
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2010
+ /* @__PURE__ */ e.jsx(w, { children: "#" }),
2011
+ /* @__PURE__ */ e.jsx(w, { children: "Kind" }),
2012
+ /* @__PURE__ */ e.jsx(w, { children: "Role" }),
2013
+ /* @__PURE__ */ e.jsx(w, { children: "Media Type" }),
2014
+ /* @__PURE__ */ e.jsx(w, { children: "Digest" }),
2015
+ /* @__PURE__ */ e.jsx(w, { children: "Actions" })
1679
2016
  ] }) }),
1680
- /* @__PURE__ */ e.jsx(L, { children: me.map((w, S) => /* @__PURE__ */ e.jsxs(j, { children: [
1681
- /* @__PURE__ */ e.jsx(c, { children: S }),
1682
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: w.kind }),
1683
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: w.role }) }),
1684
- /* @__PURE__ */ e.jsx(c, { className: "text-muted text-sm", children: w.media_type }),
1685
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: Ze(w.digest) }),
1686
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1687
- /* @__PURE__ */ e.jsx(Y, { to: `/runs/${n.run_id}/artifacts/${S}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View" }) }),
1688
- /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", onClick: () => Te(S), children: "Download" })
2017
+ /* @__PURE__ */ e.jsx(U, { children: V.map((C, L) => /* @__PURE__ */ e.jsxs(j, { children: [
2018
+ /* @__PURE__ */ e.jsx(d, { children: L }),
2019
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: C.kind }),
2020
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: C.role }) }),
2021
+ /* @__PURE__ */ e.jsx(d, { className: "text-muted text-sm", children: C.media_type }),
2022
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(C.digest) }),
2023
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
2024
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${n.run_id}/artifacts/${L}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View" }) }),
2025
+ /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", onClick: () => te(L), children: "Download" })
1689
2026
  ] }) })
1690
- ] }, S)) })
2027
+ ] }, L)) })
1691
2028
  ] }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No artifacts" })
1692
2029
  ] }),
1693
- ge.length > 0 && /* @__PURE__ */ e.jsxs(b, { children: [
1694
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { className: "text-danger", children: "Errors" }) }),
1695
- ge.map((w, S) => /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
1696
- /* @__PURE__ */ e.jsx("strong", { children: w.type }),
2030
+ ee.length > 0 && /* @__PURE__ */ e.jsxs(N, { children: [
2031
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { className: "text-danger", children: "Errors" }) }),
2032
+ ee.map((C, L) => /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
2033
+ /* @__PURE__ */ e.jsx("strong", { children: C.type }),
1697
2034
  ": ",
1698
- w.message,
1699
- w.traceback && /* @__PURE__ */ e.jsx("pre", { className: "mt-2", children: w.traceback })
1700
- ] }, S))
2035
+ C.message,
2036
+ C.traceback && /* @__PURE__ */ e.jsx("pre", { className: "mt-2", children: C.traceback })
2037
+ ] }, L))
1701
2038
  ] }),
1702
2039
  /* @__PURE__ */ e.jsxs(
1703
- as,
2040
+ ft,
1704
2041
  {
1705
- open: h,
1706
- onClose: () => m(!1),
2042
+ open: p,
2043
+ onClose: () => b(!1),
1707
2044
  title: "Delete Run",
1708
2045
  actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1709
- /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: () => m(!1), children: "Cancel" }),
1710
- /* @__PURE__ */ e.jsxs(D, { variant: "danger", onClick: Ue, disabled: T, children: [
1711
- T && /* @__PURE__ */ e.jsx(B, {}),
2046
+ /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: () => b(!1), children: "Cancel" }),
2047
+ /* @__PURE__ */ e.jsxs($, { variant: "danger", onClick: ne, disabled: S, children: [
2048
+ S && /* @__PURE__ */ e.jsx(G, {}),
1712
2049
  "Delete"
1713
2050
  ] })
1714
2051
  ] }),
1715
2052
  children: [
1716
2053
  /* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
1717
- /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: Q(n.run_id) }),
2054
+ /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: oe(n.run_id) }),
1718
2055
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
1719
2056
  ]
1720
2057
  }
1721
2058
  ),
1722
- p && /* @__PURE__ */ e.jsx(
1723
- Ce,
2059
+ D && /* @__PURE__ */ e.jsx(
2060
+ Me,
1724
2061
  {
1725
- message: p.message,
1726
- variant: p.variant,
1727
- visible: !!p,
1728
- onClose: () => y(null)
2062
+ message: D.message,
2063
+ variant: D.variant,
2064
+ visible: !!D,
2065
+ onClose: () => g(null)
1729
2066
  }
1730
2067
  )
1731
2068
  ] });
1732
2069
  }
1733
- function Ht() {
1734
- const { currentWorkspace: s } = z(), { data: r, loading: a } = qe();
1735
- return /* @__PURE__ */ e.jsxs(V, { children: [
1736
- /* @__PURE__ */ e.jsx(Ee, { title: "Projects" }),
1737
- /* @__PURE__ */ e.jsx(b, { children: a ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(B, {}) }) : /* @__PURE__ */ e.jsx(Mt, { projects: r ?? [], currentWorkspace: s }) })
2070
+ function dr() {
2071
+ const { currentWorkspace: t } = K(), { data: s, loading: a } = Ke();
2072
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2073
+ /* @__PURE__ */ e.jsx(Oe, { title: "Projects" }),
2074
+ /* @__PURE__ */ e.jsx(N, { children: a ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(Ks, { projects: s ?? [], currentWorkspace: t }) })
1738
2075
  ] });
1739
2076
  }
1740
- function Jt() {
1741
- const [s, r] = Ie(), { data: a } = qe(), [n, o] = P(s.get("project") || ""), { data: d, loading: u, refetch: i } = At({ project: n || void 0 }), x = pe((h) => {
1742
- o(h);
1743
- const m = new URLSearchParams(s);
1744
- h ? m.set("project", h) : m.delete("project"), r(m, { replace: !0 });
1745
- }, [s, r]);
1746
- return /* @__PURE__ */ e.jsxs(V, { children: [
1747
- /* @__PURE__ */ e.jsx(Ee, { title: "Run Groups" }),
1748
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Ms, { children: [
1749
- /* @__PURE__ */ e.jsxs(se, { children: [
1750
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "project", children: "Project" }),
2077
+ function ur() {
2078
+ const [t, s] = He(), { data: a } = Ke(), [n, l] = T(t.get("project") || ""), { data: o, loading: c, refetch: i } = Is({ project: n || void 0 }), u = me((h) => {
2079
+ l(h);
2080
+ const m = new URLSearchParams(t);
2081
+ h ? m.set("project", h) : m.delete("project"), s(m, { replace: !0 });
2082
+ }, [t, s]);
2083
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2084
+ /* @__PURE__ */ e.jsx(Oe, { title: "Run Groups" }),
2085
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Kt, { children: [
2086
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2087
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "project", children: "Project" }),
1751
2088
  /* @__PURE__ */ e.jsxs(
1752
- de,
2089
+ _e,
1753
2090
  {
1754
2091
  id: "project",
1755
2092
  value: n,
1756
- onChange: (h) => x(h.target.value),
2093
+ onChange: (h) => u(h.target.value),
1757
2094
  children: [
1758
2095
  /* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
1759
2096
  a?.map((h) => /* @__PURE__ */ e.jsx("option", { value: h.name, children: h.name }, h.name))
@@ -1761,143 +2098,143 @@ function Jt() {
1761
2098
  }
1762
2099
  )
1763
2100
  ] }),
1764
- /* @__PURE__ */ e.jsxs(se, { className: "flex items-end gap-2", children: [
1765
- /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: () => i(), children: "Filter" }),
1766
- u && /* @__PURE__ */ e.jsx(B, {})
2101
+ /* @__PURE__ */ e.jsxs(xe, { className: "flex items-end gap-2", children: [
2102
+ /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: () => i(), children: "Filter" }),
2103
+ c && /* @__PURE__ */ e.jsx(G, {})
1767
2104
  ] })
1768
2105
  ] }) }),
1769
- /* @__PURE__ */ e.jsx(b, { children: u && !d ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(B, {}) }) : /* @__PURE__ */ e.jsx(Ut, { groups: d ?? [] }) })
2106
+ /* @__PURE__ */ e.jsx(N, { children: c && !o ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(Js, { groups: o ?? [] }) })
1770
2107
  ] });
1771
2108
  }
1772
- function Xt() {
1773
- const { groupId: s } = ns(), { api: r } = z(), { data: a, loading: n, error: o, refetch: d } = Ft(s), [u, i] = P(null), x = Re((m) => r.deleteRun(m));
1774
- ne(() => {
1775
- if (u) {
2109
+ function hr() {
2110
+ const { groupId: t } = xt(), { api: s } = K(), { data: a, loading: n, error: l, refetch: o } = Bs(t), [c, i] = T(null), u = Fe((m) => s.deleteRun(m));
2111
+ de(() => {
2112
+ if (c) {
1776
2113
  const m = setTimeout(() => i(null), 3e3);
1777
2114
  return () => clearTimeout(m);
1778
2115
  }
1779
- }, [u]);
2116
+ }, [c]);
1780
2117
  const h = async (m) => {
1781
2118
  try {
1782
- await x.mutate(m), i({ message: "Run deleted", variant: "success" }), d();
2119
+ await u.mutate(m), i({ message: "Run deleted", variant: "success" }), o();
1783
2120
  } catch {
1784
2121
  i({ message: "Failed to delete run", variant: "error" });
1785
2122
  }
1786
2123
  };
1787
- return n ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(B, {}) }) }) : o || !a ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Group not found", hint: o?.message }) }) }) : /* @__PURE__ */ e.jsxs(V, { children: [
2124
+ return n ? /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) }) : l || !a ? /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Group not found", hint: l?.message }) }) }) : /* @__PURE__ */ e.jsxs(Q, { children: [
1788
2125
  /* @__PURE__ */ e.jsx(
1789
- Ee,
2126
+ Oe,
1790
2127
  {
1791
2128
  title: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1792
2129
  "Group ",
1793
- /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: Q(s) })
2130
+ /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: oe(t) })
1794
2131
  ] }),
1795
- subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children: s })
2132
+ subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children: t })
1796
2133
  }
1797
2134
  ),
1798
- /* @__PURE__ */ e.jsxs(b, { children: [
1799
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsxs(W, { children: [
2135
+ /* @__PURE__ */ e.jsxs(N, { children: [
2136
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(H, { children: [
1800
2137
  "Runs in Group (",
1801
2138
  a.runs.length,
1802
2139
  ")"
1803
2140
  ] }) }),
1804
2141
  /* @__PURE__ */ e.jsx(
1805
- cs,
2142
+ pt,
1806
2143
  {
1807
2144
  runs: a.runs,
1808
2145
  onDelete: h,
1809
- loading: x.loading
2146
+ loading: u.loading
1810
2147
  }
1811
2148
  )
1812
2149
  ] }),
1813
- u && /* @__PURE__ */ e.jsx(
1814
- Ce,
2150
+ c && /* @__PURE__ */ e.jsx(
2151
+ Me,
1815
2152
  {
1816
- message: u.message,
1817
- variant: u.variant,
1818
- visible: !!u,
2153
+ message: c.message,
2154
+ variant: c.variant,
2155
+ visible: !!c,
1819
2156
  onClose: () => i(null)
1820
2157
  }
1821
2158
  )
1822
2159
  ] });
1823
2160
  }
1824
- function Qt({ className: s = "" }) {
1825
- return /* @__PURE__ */ e.jsx("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) });
2161
+ function xr({ className: t = "" }) {
2162
+ return /* @__PURE__ */ e.jsx("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) });
1826
2163
  }
1827
- function Zt({ className: s = "" }) {
1828
- return /* @__PURE__ */ e.jsxs("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
2164
+ function mr({ className: t = "" }) {
2165
+ return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
1829
2166
  /* @__PURE__ */ e.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1830
2167
  /* @__PURE__ */ e.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1831
2168
  ] });
1832
2169
  }
1833
- function er({ className: s = "" }) {
1834
- return /* @__PURE__ */ e.jsxs("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2170
+ function fr({ className: t = "" }) {
2171
+ return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1835
2172
  /* @__PURE__ */ e.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
1836
2173
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
1837
2174
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
1838
2175
  ] });
1839
2176
  }
1840
- function Qe({ className: s = "" }) {
1841
- return /* @__PURE__ */ e.jsxs("svg", { className: s, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2177
+ function it({ className: t = "" }) {
2178
+ return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1842
2179
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1843
2180
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
1844
2181
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
1845
2182
  ] });
1846
2183
  }
1847
- function _e({ match: s }) {
1848
- return s ? /* @__PURE__ */ e.jsxs("span", { className: "diff-match inline-flex items-center gap-1.5", children: [
1849
- /* @__PURE__ */ e.jsx(Qt, { className: "flex-shrink-0" }),
2184
+ function Pe({ match: t }) {
2185
+ return t ? /* @__PURE__ */ e.jsxs("span", { className: "diff-match inline-flex items-center gap-1.5", children: [
2186
+ /* @__PURE__ */ e.jsx(xr, { className: "flex-shrink-0" }),
1850
2187
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Match" })
1851
2188
  ] }) : /* @__PURE__ */ e.jsxs("span", { className: "diff-mismatch inline-flex items-center gap-1.5", children: [
1852
- /* @__PURE__ */ e.jsx(Zt, { className: "flex-shrink-0" }),
2189
+ /* @__PURE__ */ e.jsx(mr, { className: "flex-shrink-0" }),
1853
2190
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Different" })
1854
2191
  ] });
1855
2192
  }
1856
- function sr({ warnings: s }) {
1857
- return !s || s.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "alert alert-warning mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
1858
- /* @__PURE__ */ e.jsx(er, { className: "flex-shrink-0 mt-0.5" }),
2193
+ function jr({ warnings: t }) {
2194
+ return !t || t.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "alert alert-warning mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
2195
+ /* @__PURE__ */ e.jsx(fr, { className: "flex-shrink-0 mt-0.5" }),
1859
2196
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
1860
- /* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children: s.length === 1 ? "Warning" : `${s.length} Warnings` }),
1861
- /* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children: s.map((r, a) => /* @__PURE__ */ e.jsx("li", { className: "text-sm", children: r }, a)) })
2197
+ /* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children: t.length === 1 ? "Warning" : `${t.length} Warnings` }),
2198
+ /* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children: t.map((s, a) => /* @__PURE__ */ e.jsx("li", { className: "text-sm", children: s }, a)) })
1862
2199
  ] })
1863
2200
  ] }) });
1864
2201
  }
1865
- function Ss({
1866
- label: s,
1867
- run: r,
2202
+ function It({
2203
+ label: t,
2204
+ run: s,
1868
2205
  variant: a
1869
2206
  }) {
1870
2207
  return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1871
2208
  /* @__PURE__ */ e.jsx("div", { className: `absolute top-0 left-0 w-1 h-full rounded-l ${a === "a" ? "bg-info" : "bg-primary"}` }),
1872
2209
  /* @__PURE__ */ e.jsxs("div", { className: "pl-4", children: [
1873
- /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${a === "a" ? "text-info" : "text-primary"}`, children: s }),
1874
- /* @__PURE__ */ e.jsx(Y, { to: `/runs/${r.run_id}`, className: "text-base font-medium hover:underline", children: r.run_name || "Unnamed Run" }),
1875
- /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children: Q(r.run_id) }),
2210
+ /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${a === "a" ? "text-info" : "text-primary"}`, children: t }),
2211
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${s.run_id}`, className: "text-base font-medium hover:underline", children: s.run_name || "Unnamed Run" }),
2212
+ /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children: oe(s.run_id) }),
1876
2213
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-1 text-muted", children: [
1877
- r.project,
2214
+ s.project,
1878
2215
  " · ",
1879
- Le(r.created_at)
2216
+ Ye(s.created_at)
1880
2217
  ] })
1881
2218
  ] })
1882
2219
  ] });
1883
2220
  }
1884
- function ie({
1885
- children: s,
1886
- badge: r
2221
+ function ge({
2222
+ children: t,
2223
+ badge: s
1887
2224
  }) {
1888
- return /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 flex-wrap", children: [
1889
- s,
1890
- r && /* @__PURE__ */ e.jsx(K, { variant: r.variant, children: r.label })
2225
+ return /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 flex-wrap", children: [
2226
+ t,
2227
+ s && /* @__PURE__ */ e.jsx(re, { variant: s.variant, children: s.label })
1891
2228
  ] }) }) });
1892
2229
  }
1893
- function tr({
1894
- tvd: s,
1895
- noiseContext: r
2230
+ function pr({
2231
+ tvd: t,
2232
+ noiseContext: s
1896
2233
  }) {
1897
- if (s === 0)
2234
+ if (t === 0)
1898
2235
  return /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Distributions are identical (TVD = 0)" });
1899
- if (!r) return null;
1900
- const { p_value: a, noise_ratio: n } = r;
2236
+ if (!s) return null;
2237
+ const { p_value: a, noise_ratio: n } = s;
1901
2238
  return a != null ? a >= 0.1 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Consistent with sampling noise — difference is not statistically significant" }) : a >= 0.05 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
1902
2239
  "⚠ Borderline (p=",
1903
2240
  a.toFixed(2),
@@ -1916,37 +2253,37 @@ function tr({
1916
2253
  "×) — results show meaningful differences"
1917
2254
  ] }) : null;
1918
2255
  }
1919
- function rr() {
1920
- const [s, r] = Ie(), { data: a } = Is({ limit: 100 }), n = a?.runs ?? [], [o, d] = P(s.get("a") || ""), [u, i] = P(s.get("b") || ""), [x, h] = P(""), m = (p) => {
1921
- if (p.preventDefault(), !o || !u) {
2256
+ function gr() {
2257
+ const [t, s] = He(), { data: a } = zt({ limit: 100 }), n = a?.runs ?? [], [l, o] = T(t.get("a") || ""), [c, i] = T(t.get("b") || ""), [u, h] = T(""), m = (p) => {
2258
+ if (p.preventDefault(), !l || !c) {
1922
2259
  h("Please select both runs to compare");
1923
2260
  return;
1924
2261
  }
1925
- if (o === u) {
2262
+ if (l === c) {
1926
2263
  h("Please select two different runs");
1927
2264
  return;
1928
2265
  }
1929
- h(""), r({ a: o, b: u });
2266
+ h(""), s({ a: l, b: c });
1930
2267
  };
1931
2268
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1932
- /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs("form", { onSubmit: m, children: [
2269
+ /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("form", { onSubmit: m, children: [
1933
2270
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
1934
- /* @__PURE__ */ e.jsxs(se, { children: [
1935
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "a", children: "Run A (Baseline)" }),
2271
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2272
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "a", children: "Run A (Baseline)" }),
1936
2273
  /* @__PURE__ */ e.jsxs(
1937
- de,
2274
+ _e,
1938
2275
  {
1939
2276
  id: "a",
1940
- value: o,
2277
+ value: l,
1941
2278
  onChange: (p) => {
1942
- d(p.target.value), h("");
2279
+ o(p.target.value), h("");
1943
2280
  },
1944
2281
  children: [
1945
2282
  /* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
1946
2283
  n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
1947
2284
  p.run_name || "Unnamed",
1948
2285
  " (",
1949
- Q(p.run_id),
2286
+ oe(p.run_id),
1950
2287
  ") — ",
1951
2288
  p.project
1952
2289
  ] }, p.run_id))
@@ -1954,13 +2291,13 @@ function rr() {
1954
2291
  }
1955
2292
  )
1956
2293
  ] }),
1957
- /* @__PURE__ */ e.jsxs(se, { children: [
1958
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "b", children: "Run B (Candidate)" }),
2294
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2295
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "b", children: "Run B (Candidate)" }),
1959
2296
  /* @__PURE__ */ e.jsxs(
1960
- de,
2297
+ _e,
1961
2298
  {
1962
2299
  id: "b",
1963
- value: u,
2300
+ value: c,
1964
2301
  onChange: (p) => {
1965
2302
  i(p.target.value), h("");
1966
2303
  },
@@ -1969,7 +2306,7 @@ function rr() {
1969
2306
  n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
1970
2307
  p.run_name || "Unnamed",
1971
2308
  " (",
1972
- Q(p.run_id),
2309
+ oe(p.run_id),
1973
2310
  ") — ",
1974
2311
  p.project
1975
2312
  ] }, p.run_id))
@@ -1978,100 +2315,100 @@ function rr() {
1978
2315
  )
1979
2316
  ] })
1980
2317
  ] }),
1981
- x && /* @__PURE__ */ e.jsx("p", { className: "text-sm mb-3 text-danger", children: x }),
1982
- /* @__PURE__ */ e.jsx(D, { type: "submit", variant: "primary", children: "Compare" })
2318
+ u && /* @__PURE__ */ e.jsx("p", { className: "text-sm mb-3 text-danger", children: u }),
2319
+ /* @__PURE__ */ e.jsx($, { type: "submit", variant: "primary", children: "Compare" })
1983
2320
  ] }) }),
1984
- /* @__PURE__ */ e.jsxs(b, { className: "mt-4", children: [
1985
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "How it works" }) }),
2321
+ /* @__PURE__ */ e.jsxs(N, { className: "mt-4", children: [
2322
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "How it works" }) }),
1986
2323
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2 text-sm text-muted", children: [
1987
2324
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1988
- /* @__PURE__ */ e.jsx(Qe, { className: "flex-shrink-0 mt-0.5" }),
2325
+ /* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
1989
2326
  /* @__PURE__ */ e.jsx("span", { children: "Select two runs to compare their parameters, metrics, and artifacts" })
1990
2327
  ] }),
1991
2328
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1992
- /* @__PURE__ */ e.jsx(Qe, { className: "flex-shrink-0 mt-0.5" }),
2329
+ /* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
1993
2330
  /* @__PURE__ */ e.jsx("span", { children: "The diff shows changed values and computes TVD for result distributions" })
1994
2331
  ] }),
1995
2332
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1996
- /* @__PURE__ */ e.jsx(Qe, { className: "flex-shrink-0 mt-0.5" }),
2333
+ /* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
1997
2334
  /* @__PURE__ */ e.jsx("span", { children: "You can also compare from the run detail page" })
1998
2335
  ] })
1999
2336
  ] })
2000
2337
  ] })
2001
2338
  ] });
2002
2339
  }
2003
- function nr({ runIdA: s, runIdB: r }) {
2004
- const { data: a, loading: n, error: o } = $t(s, r);
2340
+ function vr({ runIdA: t, runIdB: s }) {
2341
+ const { data: a, loading: n, error: l } = Us(t, s);
2005
2342
  if (n)
2006
- return /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3", children: [
2007
- /* @__PURE__ */ e.jsx(B, {}),
2343
+ return /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3", children: [
2344
+ /* @__PURE__ */ e.jsx(G, {}),
2008
2345
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted", children: "Comparing runs..." })
2009
2346
  ] }) });
2010
- if (o || !a)
2011
- return /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Failed to load diff", hint: o?.message }) });
2012
- const { run_a: d, run_b: u, report: i } = a, x = i.device_drift?.significant_drift ? { variant: "warning", label: "Drift Detected" } : i.device_drift?.has_calibration_data ? { variant: "success", label: "Stable" } : { variant: "gray", label: "No Data" };
2347
+ if (l || !a)
2348
+ return /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Failed to load diff", hint: l?.message }) });
2349
+ const { run_a: o, run_b: c, report: i } = a, u = i.device_drift?.significant_drift ? { variant: "warning", label: "Drift Detected" } : i.device_drift?.has_calibration_data ? { variant: "success", label: "Stable" } : { variant: "gray", label: "No Data" };
2013
2350
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2014
- /* @__PURE__ */ e.jsx(sr, { warnings: i.warnings || [] }),
2015
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
2016
- /* @__PURE__ */ e.jsx(Ss, { label: "Run A (Baseline)", run: d, variant: "a" }),
2017
- /* @__PURE__ */ e.jsx(Ss, { label: "Run B (Candidate)", run: u, variant: "b" })
2351
+ /* @__PURE__ */ e.jsx(jr, { warnings: i.warnings || [] }),
2352
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
2353
+ /* @__PURE__ */ e.jsx(It, { label: "Run A (Baseline)", run: o, variant: "a" }),
2354
+ /* @__PURE__ */ e.jsx(It, { label: "Run B (Candidate)", run: c, variant: "b" })
2018
2355
  ] }) }),
2019
2356
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
2020
- /* @__PURE__ */ e.jsxs(b, { children: [
2021
- /* @__PURE__ */ e.jsx(ie, { children: "Metadata" }),
2022
- /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
2357
+ /* @__PURE__ */ e.jsxs(N, { children: [
2358
+ /* @__PURE__ */ e.jsx(ge, { children: "Metadata" }),
2359
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2023
2360
  /* @__PURE__ */ e.jsxs(j, { children: [
2024
- /* @__PURE__ */ e.jsx(c, { children: "Project" }),
2025
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(_e, { match: i.metadata.project_match }) })
2361
+ /* @__PURE__ */ e.jsx(d, { children: "Project" }),
2362
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.metadata.project_match }) })
2026
2363
  ] }),
2027
2364
  /* @__PURE__ */ e.jsxs(j, { children: [
2028
- /* @__PURE__ */ e.jsx(c, { children: "Backend" }),
2029
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(_e, { match: i.metadata.backend_match }) })
2365
+ /* @__PURE__ */ e.jsx(d, { children: "Backend" }),
2366
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.metadata.backend_match }) })
2030
2367
  ] }),
2031
2368
  !i.metadata.project_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2032
2369
  /* @__PURE__ */ e.jsxs(j, { children: [
2033
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Project A" }),
2034
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.project_a || "N/A" })
2370
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Project A" }),
2371
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.project_a || "N/A" })
2035
2372
  ] }),
2036
2373
  /* @__PURE__ */ e.jsxs(j, { children: [
2037
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Project B" }),
2038
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.project_b || "N/A" })
2374
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Project B" }),
2375
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.project_b || "N/A" })
2039
2376
  ] })
2040
2377
  ] }),
2041
2378
  !i.metadata.backend_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2042
2379
  /* @__PURE__ */ e.jsxs(j, { children: [
2043
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Backend A" }),
2044
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.backend_a || "N/A" })
2380
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Backend A" }),
2381
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.backend_a || "N/A" })
2045
2382
  ] }),
2046
2383
  /* @__PURE__ */ e.jsxs(j, { children: [
2047
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Backend B" }),
2048
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.backend_b || "N/A" })
2384
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Backend B" }),
2385
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.backend_b || "N/A" })
2049
2386
  ] })
2050
2387
  ] })
2051
2388
  ] }) })
2052
2389
  ] }),
2053
- /* @__PURE__ */ e.jsxs(b, { children: [
2054
- /* @__PURE__ */ e.jsx(ie, { children: "Fingerprints" }),
2055
- /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
2390
+ /* @__PURE__ */ e.jsxs(N, { children: [
2391
+ /* @__PURE__ */ e.jsx(ge, { children: "Fingerprints" }),
2392
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2056
2393
  /* @__PURE__ */ e.jsxs(j, { children: [
2057
- /* @__PURE__ */ e.jsx(c, { children: "Run A" }),
2058
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: Ze(i.fingerprints.a) })
2394
+ /* @__PURE__ */ e.jsx(d, { children: "Run A" }),
2395
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(i.fingerprints.a) })
2059
2396
  ] }),
2060
2397
  /* @__PURE__ */ e.jsxs(j, { children: [
2061
- /* @__PURE__ */ e.jsx(c, { children: "Run B" }),
2062
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: Ze(i.fingerprints.b) })
2398
+ /* @__PURE__ */ e.jsx(d, { children: "Run B" }),
2399
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(i.fingerprints.b) })
2063
2400
  ] }),
2064
2401
  /* @__PURE__ */ e.jsxs(j, { children: [
2065
- /* @__PURE__ */ e.jsx(c, { children: "Match" }),
2066
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(_e, { match: i.fingerprints.a === i.fingerprints.b }) })
2402
+ /* @__PURE__ */ e.jsx(d, { children: "Match" }),
2403
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.fingerprints.a === i.fingerprints.b }) })
2067
2404
  ] })
2068
2405
  ] }) })
2069
2406
  ] })
2070
2407
  ] }),
2071
2408
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
2072
- /* @__PURE__ */ e.jsxs(b, { children: [
2409
+ /* @__PURE__ */ e.jsxs(N, { children: [
2073
2410
  /* @__PURE__ */ e.jsx(
2074
- ie,
2411
+ ge,
2075
2412
  {
2076
2413
  badge: {
2077
2414
  variant: i.program.exact_match ? "success" : i.program.structural_match ? "info" : "warning",
@@ -2080,69 +2417,69 @@ function nr({ runIdA: s, runIdB: r }) {
2080
2417
  children: "Program"
2081
2418
  }
2082
2419
  ),
2083
- /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
2420
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2084
2421
  /* @__PURE__ */ e.jsxs(j, { children: [
2085
- /* @__PURE__ */ e.jsx(c, { children: "Exact Match" }),
2086
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(_e, { match: i.program.exact_match }) })
2422
+ /* @__PURE__ */ e.jsx(d, { children: "Exact Match" }),
2423
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.program.exact_match }) })
2087
2424
  ] }),
2088
2425
  /* @__PURE__ */ e.jsxs(j, { children: [
2089
- /* @__PURE__ */ e.jsx(c, { children: "Structural Match" }),
2090
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(_e, { match: i.program.structural_match }) })
2426
+ /* @__PURE__ */ e.jsx(d, { children: "Structural Match" }),
2427
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.program.structural_match }) })
2091
2428
  ] })
2092
2429
  ] }) })
2093
2430
  ] }),
2094
- /* @__PURE__ */ e.jsxs(b, { children: [
2095
- /* @__PURE__ */ e.jsx(ie, { badge: x, children: "Device Calibration" }),
2431
+ /* @__PURE__ */ e.jsxs(N, { children: [
2432
+ /* @__PURE__ */ e.jsx(ge, { badge: u, children: "Device Calibration" }),
2096
2433
  i.device_drift?.significant_drift ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-warning", children: "Significant calibration drift detected between runs" }) : i.device_drift?.has_calibration_data ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Calibration within acceptable thresholds" }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No calibration data available" })
2097
2434
  ] })
2098
2435
  ] }),
2099
- /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2100
- /* @__PURE__ */ e.jsx(ie, { badge: { variant: i.params.match ? "success" : "warning", label: i.params.match ? "Match" : "Different" }, children: "Parameters" }),
2101
- i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(O, { children: [
2102
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2103
- /* @__PURE__ */ e.jsx(N, { children: "Parameter" }),
2104
- /* @__PURE__ */ e.jsx(N, { children: "Run A" }),
2105
- /* @__PURE__ */ e.jsx(N, { children: "Run B" })
2436
+ /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2437
+ /* @__PURE__ */ e.jsx(ge, { badge: { variant: i.params.match ? "success" : "warning", label: i.params.match ? "Match" : "Different" }, children: "Parameters" }),
2438
+ i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(B, { children: [
2439
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2440
+ /* @__PURE__ */ e.jsx(w, { children: "Parameter" }),
2441
+ /* @__PURE__ */ e.jsx(w, { children: "Run A" }),
2442
+ /* @__PURE__ */ e.jsx(w, { children: "Run B" })
2106
2443
  ] }) }),
2107
- /* @__PURE__ */ e.jsx(L, { children: Object.entries(i.params.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2108
- /* @__PURE__ */ e.jsx(c, { children: h }),
2109
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.a) }),
2110
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.b) })
2444
+ /* @__PURE__ */ e.jsx(U, { children: Object.entries(i.params.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2445
+ /* @__PURE__ */ e.jsx(d, { children: h }),
2446
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.a) }),
2447
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.b) })
2111
2448
  ] }, h)) })
2112
2449
  ] }) })
2113
2450
  ] }),
2114
- /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2115
- /* @__PURE__ */ e.jsx(ie, { badge: { variant: i.metrics.match ? "success" : "warning", label: i.metrics.match ? "Match" : "Different" }, children: "Metrics" }),
2116
- i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(O, { children: [
2117
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2118
- /* @__PURE__ */ e.jsx(N, { children: "Metric" }),
2119
- /* @__PURE__ */ e.jsx(N, { children: "Run A" }),
2120
- /* @__PURE__ */ e.jsx(N, { children: "Run B" })
2451
+ /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2452
+ /* @__PURE__ */ e.jsx(ge, { badge: { variant: i.metrics.match ? "success" : "warning", label: i.metrics.match ? "Match" : "Different" }, children: "Metrics" }),
2453
+ i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(B, { children: [
2454
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2455
+ /* @__PURE__ */ e.jsx(w, { children: "Metric" }),
2456
+ /* @__PURE__ */ e.jsx(w, { children: "Run A" }),
2457
+ /* @__PURE__ */ e.jsx(w, { children: "Run B" })
2121
2458
  ] }) }),
2122
- /* @__PURE__ */ e.jsx(L, { children: Object.entries(i.metrics.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2123
- /* @__PURE__ */ e.jsx(c, { children: h }),
2124
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.a }),
2125
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.b })
2459
+ /* @__PURE__ */ e.jsx(U, { children: Object.entries(i.metrics.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2460
+ /* @__PURE__ */ e.jsx(d, { children: h }),
2461
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.a }),
2462
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.b })
2126
2463
  ] }, h)) })
2127
2464
  ] }) })
2128
2465
  ] }),
2129
- i.circuit_diff && /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2130
- /* @__PURE__ */ e.jsx(ie, { badge: { variant: i.circuit_diff.match ? "success" : "warning", label: i.circuit_diff.match ? "Match" : "Different" }, children: "Circuit" }),
2466
+ i.circuit_diff && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2467
+ /* @__PURE__ */ e.jsx(ge, { badge: { variant: i.circuit_diff.match ? "success" : "warning", label: i.circuit_diff.match ? "Match" : "Different" }, children: "Circuit" }),
2131
2468
  i.circuit_diff.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Circuit structure matches" }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2132
2469
  i.circuit_diff.changed && Object.keys(i.circuit_diff.changed).length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
2133
2470
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Changed Properties" }),
2134
- /* @__PURE__ */ e.jsxs(O, { children: [
2135
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2136
- /* @__PURE__ */ e.jsx(N, { children: "Property" }),
2137
- /* @__PURE__ */ e.jsx(N, { children: "Run A" }),
2138
- /* @__PURE__ */ e.jsx(N, { children: "Run B" }),
2139
- /* @__PURE__ */ e.jsx(N, { children: "Delta" })
2471
+ /* @__PURE__ */ e.jsxs(B, { children: [
2472
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2473
+ /* @__PURE__ */ e.jsx(w, { children: "Property" }),
2474
+ /* @__PURE__ */ e.jsx(w, { children: "Run A" }),
2475
+ /* @__PURE__ */ e.jsx(w, { children: "Run B" }),
2476
+ /* @__PURE__ */ e.jsx(w, { children: "Delta" })
2140
2477
  ] }) }),
2141
- /* @__PURE__ */ e.jsx(L, { children: Object.entries(i.circuit_diff.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2142
- /* @__PURE__ */ e.jsx(c, { children: m.label || h }),
2143
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.a) }),
2144
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.b) }),
2145
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.delta != null && /* @__PURE__ */ e.jsxs("span", { className: m.delta > 0 ? "text-danger" : "text-success", children: [
2478
+ /* @__PURE__ */ e.jsx(U, { children: Object.entries(i.circuit_diff.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2479
+ /* @__PURE__ */ e.jsx(d, { children: m.label || h }),
2480
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.a) }),
2481
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.b) }),
2482
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.delta != null && /* @__PURE__ */ e.jsxs("span", { className: m.delta > 0 ? "text-danger" : "text-success", children: [
2146
2483
  m.delta > 0 ? "+" : "",
2147
2484
  m.delta,
2148
2485
  m.pct != null && ` (${m.pct > 0 ? "+" : ""}${m.pct.toFixed(1)}%)`
@@ -2152,89 +2489,89 @@ function nr({ runIdA: s, runIdB: r }) {
2152
2489
  ] }),
2153
2490
  i.circuit_diff.is_clifford_changed && /* @__PURE__ */ e.jsxs("div", { children: [
2154
2491
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Clifford Status" }),
2155
- /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
2492
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2156
2493
  /* @__PURE__ */ e.jsxs(j, { children: [
2157
- /* @__PURE__ */ e.jsx(c, { children: "Run A" }),
2158
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.circuit_diff.is_clifford_a != null ? String(i.circuit_diff.is_clifford_a) : "unknown" })
2494
+ /* @__PURE__ */ e.jsx(d, { children: "Run A" }),
2495
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.circuit_diff.is_clifford_a != null ? String(i.circuit_diff.is_clifford_a) : "unknown" })
2159
2496
  ] }),
2160
2497
  /* @__PURE__ */ e.jsxs(j, { children: [
2161
- /* @__PURE__ */ e.jsx(c, { children: "Run B" }),
2162
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.circuit_diff.is_clifford_b != null ? String(i.circuit_diff.is_clifford_b) : "unknown" })
2498
+ /* @__PURE__ */ e.jsx(d, { children: "Run B" }),
2499
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.circuit_diff.is_clifford_b != null ? String(i.circuit_diff.is_clifford_b) : "unknown" })
2163
2500
  ] })
2164
2501
  ] }) })
2165
2502
  ] }),
2166
2503
  i.circuit_diff.added_gates && i.circuit_diff.added_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
2167
2504
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "New Gate Types (in B)" }),
2168
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(K, { variant: "success", children: h }, h)) })
2505
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(re, { variant: "success", children: h }, h)) })
2169
2506
  ] }),
2170
2507
  i.circuit_diff.removed_gates && i.circuit_diff.removed_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
2171
2508
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Removed Gate Types (from A)" }),
2172
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(K, { variant: "danger", children: h }, h)) })
2509
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(re, { variant: "danger", children: h }, h)) })
2173
2510
  ] })
2174
2511
  ] })
2175
2512
  ] }),
2176
- i.tvd != null && /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2177
- /* @__PURE__ */ e.jsx(ie, { children: "Results Distribution" }),
2178
- /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
2513
+ i.tvd != null && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2514
+ /* @__PURE__ */ e.jsx(ge, { children: "Results Distribution" }),
2515
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2179
2516
  /* @__PURE__ */ e.jsxs(j, { children: [
2180
- /* @__PURE__ */ e.jsx(c, { children: "Total Variation Distance (TVD)" }),
2181
- /* @__PURE__ */ e.jsx(c, { className: "font-mono font-medium", children: i.tvd.toFixed(6) })
2517
+ /* @__PURE__ */ e.jsx(d, { children: "Total Variation Distance (TVD)" }),
2518
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono font-medium", children: i.tvd.toFixed(6) })
2182
2519
  ] }),
2183
2520
  i.shots && /* @__PURE__ */ e.jsxs(j, { children: [
2184
- /* @__PURE__ */ e.jsx(c, { children: "Total Shots (A / B)" }),
2185
- /* @__PURE__ */ e.jsxs(c, { className: "font-mono", children: [
2521
+ /* @__PURE__ */ e.jsx(d, { children: "Total Shots (A / B)" }),
2522
+ /* @__PURE__ */ e.jsxs(d, { className: "font-mono", children: [
2186
2523
  i.shots.a,
2187
2524
  " / ",
2188
2525
  i.shots.b
2189
2526
  ] })
2190
2527
  ] }),
2191
2528
  i.noise_context?.noise_p95 && /* @__PURE__ */ e.jsxs(j, { children: [
2192
- /* @__PURE__ */ e.jsx(c, { children: "Noise Threshold (p95)" }),
2193
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.noise_p95.toFixed(6) })
2529
+ /* @__PURE__ */ e.jsx(d, { children: "Noise Threshold (p95)" }),
2530
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.noise_context.noise_p95.toFixed(6) })
2194
2531
  ] }),
2195
2532
  i.noise_context?.p_value != null && /* @__PURE__ */ e.jsxs(j, { children: [
2196
- /* @__PURE__ */ e.jsx(c, { children: "p-value" }),
2197
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.p_value.toFixed(4) })
2533
+ /* @__PURE__ */ e.jsx(d, { children: "p-value" }),
2534
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.noise_context.p_value.toFixed(4) })
2198
2535
  ] })
2199
2536
  ] }) }),
2200
- /* @__PURE__ */ e.jsx(tr, { tvd: i.tvd, noiseContext: i.noise_context })
2537
+ /* @__PURE__ */ e.jsx(pr, { tvd: i.tvd, noiseContext: i.noise_context })
2201
2538
  ] })
2202
2539
  ] });
2203
2540
  }
2204
- function ar() {
2205
- const [s] = Ie(), r = s.get("a"), a = s.get("b"), n = r && a;
2206
- return /* @__PURE__ */ e.jsxs(V, { children: [
2541
+ function br() {
2542
+ const [t] = He(), s = t.get("a"), a = t.get("b"), n = s && a;
2543
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2207
2544
  /* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsxs("div", { children: [
2208
2545
  /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Compare Runs" }),
2209
- n && /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-muted", children: /* @__PURE__ */ e.jsx(Y, { to: "/diff", children: "← Select different runs" }) })
2546
+ n && /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-muted", children: /* @__PURE__ */ e.jsx(se, { to: "/diff", children: "← Select different runs" }) })
2210
2547
  ] }) }),
2211
- n ? /* @__PURE__ */ e.jsx(nr, { runIdA: r, runIdB: a }) : /* @__PURE__ */ e.jsx(rr, {})
2548
+ n ? /* @__PURE__ */ e.jsx(vr, { runIdA: s, runIdB: a }) : /* @__PURE__ */ e.jsx(gr, {})
2212
2549
  ] });
2213
2550
  }
2214
- function ir() {
2215
- const { api: s } = z(), [r, a] = P(""), [n, o] = P(null), [d, u] = P(!1), [i, x] = P(""), { mutate: h, loading: m } = Re(async () => {
2216
- const y = await s.listRuns({ q: r, limit: 100 });
2217
- return o(y.runs), u(!0), y;
2218
- }), p = (y) => {
2219
- if (y.preventDefault(), !r.trim()) {
2220
- x("Please enter a search query");
2551
+ function yr() {
2552
+ const { api: t } = K(), [s, a] = T(""), [n, l] = T(null), [o, c] = T(!1), [i, u] = T(""), { mutate: h, loading: m } = Fe(async () => {
2553
+ const b = await t.listRuns({ q: s, limit: 100 });
2554
+ return l(b.runs), c(!0), b;
2555
+ }), p = (b) => {
2556
+ if (b.preventDefault(), !s.trim()) {
2557
+ u("Please enter a search query");
2221
2558
  return;
2222
2559
  }
2223
- x(""), h();
2560
+ u(""), h();
2224
2561
  };
2225
- return /* @__PURE__ */ e.jsxs(V, { children: [
2562
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2226
2563
  /* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Search Runs" }) }),
2227
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: p, children: [
2228
- /* @__PURE__ */ e.jsxs(se, { children: [
2229
- /* @__PURE__ */ e.jsx(ce, { htmlFor: "q", children: "Query" }),
2564
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: p, children: [
2565
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2566
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "q", children: "Query" }),
2230
2567
  /* @__PURE__ */ e.jsx(
2231
- is,
2568
+ jt,
2232
2569
  {
2233
2570
  id: "q",
2234
2571
  type: "text",
2235
- value: r,
2236
- onChange: (y) => {
2237
- a(y.target.value), x("");
2572
+ value: s,
2573
+ onChange: (b) => {
2574
+ a(b.target.value), u("");
2238
2575
  },
2239
2576
  placeholder: "metric.fidelity > 0.95 and params.shots = 1000",
2240
2577
  className: "font-mono"
@@ -2243,293 +2580,293 @@ function ir() {
2243
2580
  ] }),
2244
2581
  i && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[#DC4A4A] mb-3", children: i }),
2245
2582
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
2246
- /* @__PURE__ */ e.jsxs(D, { type: "submit", variant: "primary", disabled: m, children: [
2247
- m && /* @__PURE__ */ e.jsx(B, {}),
2583
+ /* @__PURE__ */ e.jsxs($, { type: "submit", variant: "primary", disabled: m, children: [
2584
+ m && /* @__PURE__ */ e.jsx(G, {}),
2248
2585
  "Search"
2249
2586
  ] }),
2250
2587
  m && /* @__PURE__ */ e.jsx("span", { className: "text-muted text-sm", children: "Searching..." })
2251
2588
  ] })
2252
2589
  ] }) }),
2253
- d && n && /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: n.length > 0 ? /* @__PURE__ */ e.jsx(cs, { runs: n }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted text-center py-8", children: "No runs match your query" }) }),
2590
+ o && n && /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: n.length > 0 ? /* @__PURE__ */ e.jsx(pt, { runs: n }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted text-center py-8", children: "No runs match your query" }) }),
2254
2591
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
2255
- /* @__PURE__ */ e.jsxs(b, { children: [
2256
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Query Syntax" }) }),
2257
- /* @__PURE__ */ e.jsxs(O, { children: [
2258
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2259
- /* @__PURE__ */ e.jsx(N, { children: "Field" }),
2260
- /* @__PURE__ */ e.jsx(N, { children: "Description" })
2592
+ /* @__PURE__ */ e.jsxs(N, { children: [
2593
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Query Syntax" }) }),
2594
+ /* @__PURE__ */ e.jsxs(B, { children: [
2595
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2596
+ /* @__PURE__ */ e.jsx(w, { children: "Field" }),
2597
+ /* @__PURE__ */ e.jsx(w, { children: "Description" })
2261
2598
  ] }) }),
2262
- /* @__PURE__ */ e.jsxs(L, { children: [
2599
+ /* @__PURE__ */ e.jsxs(U, { children: [
2263
2600
  /* @__PURE__ */ e.jsxs(j, { children: [
2264
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "params.X" }),
2265
- /* @__PURE__ */ e.jsx(c, { children: "Parameter value" })
2601
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "params.X" }),
2602
+ /* @__PURE__ */ e.jsx(d, { children: "Parameter value" })
2266
2603
  ] }),
2267
2604
  /* @__PURE__ */ e.jsxs(j, { children: [
2268
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.X" }),
2269
- /* @__PURE__ */ e.jsx(c, { children: "Metric value" })
2605
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.X" }),
2606
+ /* @__PURE__ */ e.jsx(d, { children: "Metric value" })
2270
2607
  ] }),
2271
2608
  /* @__PURE__ */ e.jsxs(j, { children: [
2272
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "tags.X" }),
2273
- /* @__PURE__ */ e.jsx(c, { children: "Tag value" })
2609
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "tags.X" }),
2610
+ /* @__PURE__ */ e.jsx(d, { children: "Tag value" })
2274
2611
  ] }),
2275
2612
  /* @__PURE__ */ e.jsxs(j, { children: [
2276
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "status" }),
2277
- /* @__PURE__ */ e.jsx(c, { children: "Run status" })
2613
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "status" }),
2614
+ /* @__PURE__ */ e.jsx(d, { children: "Run status" })
2278
2615
  ] }),
2279
2616
  /* @__PURE__ */ e.jsxs(j, { children: [
2280
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "project" }),
2281
- /* @__PURE__ */ e.jsx(c, { children: "Project name" })
2617
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "project" }),
2618
+ /* @__PURE__ */ e.jsx(d, { children: "Project name" })
2282
2619
  ] }),
2283
2620
  /* @__PURE__ */ e.jsxs(j, { children: [
2284
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "backend" }),
2285
- /* @__PURE__ */ e.jsx(c, { children: "Backend name" })
2621
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "backend" }),
2622
+ /* @__PURE__ */ e.jsx(d, { children: "Backend name" })
2286
2623
  ] })
2287
2624
  ] })
2288
2625
  ] })
2289
2626
  ] }),
2290
- /* @__PURE__ */ e.jsxs(b, { children: [
2291
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Operators" }) }),
2292
- /* @__PURE__ */ e.jsxs(O, { children: [
2293
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2294
- /* @__PURE__ */ e.jsx(N, { children: "Operator" }),
2295
- /* @__PURE__ */ e.jsx(N, { children: "Description" })
2627
+ /* @__PURE__ */ e.jsxs(N, { children: [
2628
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Operators" }) }),
2629
+ /* @__PURE__ */ e.jsxs(B, { children: [
2630
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2631
+ /* @__PURE__ */ e.jsx(w, { children: "Operator" }),
2632
+ /* @__PURE__ */ e.jsx(w, { children: "Description" })
2296
2633
  ] }) }),
2297
- /* @__PURE__ */ e.jsxs(L, { children: [
2634
+ /* @__PURE__ */ e.jsxs(U, { children: [
2298
2635
  /* @__PURE__ */ e.jsxs(j, { children: [
2299
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "=" }),
2300
- /* @__PURE__ */ e.jsx(c, { children: "Equals" })
2636
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "=" }),
2637
+ /* @__PURE__ */ e.jsx(d, { children: "Equals" })
2301
2638
  ] }),
2302
2639
  /* @__PURE__ */ e.jsxs(j, { children: [
2303
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "!=" }),
2304
- /* @__PURE__ */ e.jsx(c, { children: "Not equals" })
2640
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "!=" }),
2641
+ /* @__PURE__ */ e.jsx(d, { children: "Not equals" })
2305
2642
  ] }),
2306
2643
  /* @__PURE__ */ e.jsxs(j, { children: [
2307
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: ">" }),
2308
- /* @__PURE__ */ e.jsx(c, { children: "Greater than" })
2644
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: ">" }),
2645
+ /* @__PURE__ */ e.jsx(d, { children: "Greater than" })
2309
2646
  ] }),
2310
2647
  /* @__PURE__ */ e.jsxs(j, { children: [
2311
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: ">=" }),
2312
- /* @__PURE__ */ e.jsx(c, { children: "Greater or equal" })
2648
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: ">=" }),
2649
+ /* @__PURE__ */ e.jsx(d, { children: "Greater or equal" })
2313
2650
  ] }),
2314
2651
  /* @__PURE__ */ e.jsxs(j, { children: [
2315
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "<" }),
2316
- /* @__PURE__ */ e.jsx(c, { children: "Less than" })
2652
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "<" }),
2653
+ /* @__PURE__ */ e.jsx(d, { children: "Less than" })
2317
2654
  ] }),
2318
2655
  /* @__PURE__ */ e.jsxs(j, { children: [
2319
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "<=" }),
2320
- /* @__PURE__ */ e.jsx(c, { children: "Less or equal" })
2656
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "<=" }),
2657
+ /* @__PURE__ */ e.jsx(d, { children: "Less or equal" })
2321
2658
  ] }),
2322
2659
  /* @__PURE__ */ e.jsxs(j, { children: [
2323
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "~" }),
2324
- /* @__PURE__ */ e.jsx(c, { children: "Contains" })
2660
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "~" }),
2661
+ /* @__PURE__ */ e.jsx(d, { children: "Contains" })
2325
2662
  ] }),
2326
2663
  /* @__PURE__ */ e.jsxs(j, { children: [
2327
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "and" }),
2328
- /* @__PURE__ */ e.jsx(c, { children: "Combine conditions" })
2664
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "and" }),
2665
+ /* @__PURE__ */ e.jsx(d, { children: "Combine conditions" })
2329
2666
  ] })
2330
2667
  ] })
2331
2668
  ] })
2332
2669
  ] })
2333
2670
  ] }),
2334
- /* @__PURE__ */ e.jsxs(b, { className: "mt-4", children: [
2335
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Examples" }) }),
2336
- /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsxs(L, { children: [
2671
+ /* @__PURE__ */ e.jsxs(N, { className: "mt-4", children: [
2672
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Examples" }) }),
2673
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2337
2674
  /* @__PURE__ */ e.jsxs(j, { children: [
2338
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.fidelity > 0.95" }),
2339
- /* @__PURE__ */ e.jsx(c, { children: "High fidelity runs" })
2675
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.fidelity > 0.95" }),
2676
+ /* @__PURE__ */ e.jsx(d, { children: "High fidelity runs" })
2340
2677
  ] }),
2341
2678
  /* @__PURE__ */ e.jsxs(j, { children: [
2342
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "params.shots = 1000 and status = FINISHED" }),
2343
- /* @__PURE__ */ e.jsx(c, { children: "Finished runs with 1000 shots" })
2679
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "params.shots = 1000 and status = FINISHED" }),
2680
+ /* @__PURE__ */ e.jsx(d, { children: "Finished runs with 1000 shots" })
2344
2681
  ] }),
2345
2682
  /* @__PURE__ */ e.jsxs(j, { children: [
2346
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "tags.backend ~ ibm" }),
2347
- /* @__PURE__ */ e.jsx(c, { children: "Runs with IBM backends" })
2683
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "tags.backend ~ ibm" }),
2684
+ /* @__PURE__ */ e.jsx(d, { children: "Runs with IBM backends" })
2348
2685
  ] }),
2349
2686
  /* @__PURE__ */ e.jsxs(j, { children: [
2350
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.error < 0.01" }),
2351
- /* @__PURE__ */ e.jsx(c, { children: "Low error runs" })
2687
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.error < 0.01" }),
2688
+ /* @__PURE__ */ e.jsx(d, { children: "Low error runs" })
2352
2689
  ] }),
2353
2690
  /* @__PURE__ */ e.jsxs(j, { children: [
2354
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "project = vqe and metric.energy < -2.0" }),
2355
- /* @__PURE__ */ e.jsx(c, { children: "VQE runs with low energy" })
2691
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "project = vqe and metric.energy < -2.0" }),
2692
+ /* @__PURE__ */ e.jsx(d, { children: "VQE runs with low energy" })
2356
2693
  ] })
2357
2694
  ] }) })
2358
2695
  ] })
2359
2696
  ] });
2360
2697
  }
2361
- function cr() {
2362
- const { runId: s, index: r } = ns(), a = parseInt(r, 10), { api: n } = z(), { data: o } = Bs(s), { data: d, loading: u, error: i } = Ot(s, a), [x, h] = P(null);
2363
- ne(() => {
2364
- if (x) {
2365
- const k = setTimeout(() => h(null), 3e3);
2366
- return () => clearTimeout(k);
2698
+ function Nr() {
2699
+ const { runId: t, index: s } = xt(), a = parseInt(s, 10), { api: n } = K(), { data: l } = Yt(t), { data: o, loading: c, error: i } = Ws(t, a), [u, h] = T(null);
2700
+ de(() => {
2701
+ if (u) {
2702
+ const S = setTimeout(() => h(null), 3e3);
2703
+ return () => clearTimeout(S);
2367
2704
  }
2368
- }, [x]);
2705
+ }, [u]);
2369
2706
  const m = async () => {
2370
2707
  try {
2371
- const k = n.getArtifactDownloadUrl(s, a), te = await fetch(k);
2372
- if (!te.ok) throw new Error("Download failed");
2373
- const ae = await te.blob(), J = document.createElement("a");
2374
- J.href = URL.createObjectURL(ae), J.download = p?.kind || `artifact-${a}`, J.click(), URL.revokeObjectURL(J.href), h({ message: "Download complete", variant: "success" });
2708
+ const S = n.getArtifactDownloadUrl(t, a), ie = await fetch(S);
2709
+ if (!ie.ok) throw new Error("Download failed");
2710
+ const ce = await ie.blob(), Z = document.createElement("a");
2711
+ Z.href = URL.createObjectURL(ce), Z.download = p?.kind || `artifact-${a}`, Z.click(), URL.revokeObjectURL(Z.href), h({ message: "Download complete", variant: "success" });
2375
2712
  } catch {
2376
2713
  h({ message: "Download failed", variant: "error" });
2377
2714
  }
2378
2715
  };
2379
- if (u)
2380
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(B, {}) }) });
2381
- if (i || !d)
2382
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Artifact not found", hint: i?.message }) }) });
2383
- const { artifact: p, size: y, content: M, content_json: _, preview_available: H, error: T } = d, I = 10 * 1024 * 1024;
2384
- return /* @__PURE__ */ e.jsxs(V, { children: [
2716
+ if (c)
2717
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) });
2718
+ if (i || !o)
2719
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Artifact not found", hint: i?.message }) }) });
2720
+ const { artifact: p, size: b, content: D, content_json: g, preview_available: I, error: E } = o, A = 10 * 1024 * 1024;
2721
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2385
2722
  /* @__PURE__ */ e.jsx(
2386
- Ee,
2723
+ Oe,
2387
2724
  {
2388
2725
  title: p.kind,
2389
2726
  subtitle: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2390
2727
  "← Back to run ",
2391
- /* @__PURE__ */ e.jsxs(Y, { to: `/runs/${s}`, children: [
2392
- Q(s),
2393
- o?.run_name && ` — ${o.run_name}`
2728
+ /* @__PURE__ */ e.jsxs(se, { to: `/runs/${t}`, children: [
2729
+ oe(t),
2730
+ l?.run_name && ` — ${l.run_name}`
2394
2731
  ] })
2395
2732
  ] }),
2396
- actions: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download" })
2733
+ actions: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download" })
2397
2734
  }
2398
2735
  ),
2399
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsx(es, { items: [
2736
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsx(ot, { items: [
2400
2737
  { label: "Kind", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: p.kind }) },
2401
- { label: "Role", value: /* @__PURE__ */ e.jsx(K, { variant: "gray", children: p.role }) },
2738
+ { label: "Role", value: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: p.role }) },
2402
2739
  { label: "Media Type", value: p.media_type },
2403
2740
  { label: "Digest", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: p.digest }) },
2404
- { label: "Size", value: Oe(y) }
2741
+ { label: "Size", value: Ve(b) }
2405
2742
  ] }) }),
2406
- /* @__PURE__ */ e.jsxs(b, { children: [
2407
- /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(W, { children: "Content" }) }),
2408
- T ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2743
+ /* @__PURE__ */ e.jsxs(N, { children: [
2744
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Content" }) }),
2745
+ E ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2409
2746
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-danger", children: [
2410
2747
  "Error loading artifact: ",
2411
- T
2748
+ E
2412
2749
  ] }),
2413
- /* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download to view" }) })
2414
- ] }) : H ? _ ? /* @__PURE__ */ e.jsx("pre", { children: Tt(_) }) : M ? /* @__PURE__ */ e.jsx("pre", { children: M }) : /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
2750
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download to view" }) })
2751
+ ] }) : I ? g ? /* @__PURE__ */ e.jsx("pre", { children: $s(g) }) : D ? /* @__PURE__ */ e.jsx("pre", { children: D }) : /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
2415
2752
  "Binary content (",
2416
- Oe(y),
2753
+ Ve(b),
2417
2754
  ") — download to view"
2418
2755
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2419
2756
  /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
2420
2757
  /* @__PURE__ */ e.jsx("strong", { children: "Artifact too large for preview" }),
2421
2758
  " (",
2422
- Oe(y),
2759
+ Ve(b),
2423
2760
  " exceeds ",
2424
- Oe(I),
2761
+ Ve(A),
2425
2762
  " limit)"
2426
2763
  ] }),
2427
2764
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: "Download the artifact to view its contents." }),
2428
- /* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download" }) })
2765
+ /* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download" }) })
2429
2766
  ] })
2430
2767
  ] }),
2431
- x && /* @__PURE__ */ e.jsx(
2432
- Ce,
2768
+ u && /* @__PURE__ */ e.jsx(
2769
+ Me,
2433
2770
  {
2434
- message: x.message,
2435
- variant: x.variant,
2436
- visible: !!x,
2771
+ message: u.message,
2772
+ variant: u.variant,
2773
+ visible: !!u,
2437
2774
  onClose: () => h(null)
2438
2775
  }
2439
2776
  )
2440
2777
  ] });
2441
2778
  }
2442
- const lr = [
2443
- { path: "/", element: /* @__PURE__ */ e.jsx(vt, { to: "/runs", replace: !0 }) },
2444
- { path: "/runs", element: /* @__PURE__ */ e.jsx(qt, {}) },
2445
- { path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(Kt, {}) },
2446
- { path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(cr, {}) },
2447
- { path: "/projects", element: /* @__PURE__ */ e.jsx(Ht, {}) },
2448
- { path: "/groups", element: /* @__PURE__ */ e.jsx(Jt, {}) },
2449
- { path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(Xt, {}) },
2450
- { path: "/diff", element: /* @__PURE__ */ e.jsx(ar, {}) },
2451
- { path: "/search", element: /* @__PURE__ */ e.jsx(ir, {}) }
2779
+ const _r = [
2780
+ { path: "/", element: /* @__PURE__ */ e.jsx(ks, { to: "/runs", replace: !0 }) },
2781
+ { path: "/runs", element: /* @__PURE__ */ e.jsx(Hs, {}) },
2782
+ { path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(or, {}) },
2783
+ { path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(Nr, {}) },
2784
+ { path: "/projects", element: /* @__PURE__ */ e.jsx(dr, {}) },
2785
+ { path: "/groups", element: /* @__PURE__ */ e.jsx(ur, {}) },
2786
+ { path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(hr, {}) },
2787
+ { path: "/diff", element: /* @__PURE__ */ e.jsx(br, {}) },
2788
+ { path: "/search", element: /* @__PURE__ */ e.jsx(yr, {}) }
2452
2789
  ];
2453
- function Gs(s = []) {
2454
- return bt([...lr, ...s]);
2790
+ function Xt(t = []) {
2791
+ return Cs([..._r, ...t]);
2455
2792
  }
2456
- const or = Gs();
2457
- function pr({ additionalRoutes: s, ...r }) {
2458
- const a = s?.length ? Gs(s) : or;
2459
- return /* @__PURE__ */ e.jsx(Dt, { ...r, children: /* @__PURE__ */ e.jsx(Nt, { router: a }) });
2793
+ const wr = Xt();
2794
+ function Dr({ additionalRoutes: t, ...s }) {
2795
+ const a = t?.length ? Xt(t) : wr;
2796
+ return /* @__PURE__ */ e.jsx(qs, { ...s, children: /* @__PURE__ */ e.jsx(Ts, { router: a }) });
2460
2797
  }
2461
2798
  export {
2462
- jr as Alert,
2463
- Rt as ApiClient,
2464
- we as ApiError,
2465
- pr as App,
2466
- Dt as AppProvider,
2467
- cr as ArtifactPage,
2468
- K as Badge,
2469
- D as Button,
2470
- b as Card,
2471
- G as CardHeader,
2472
- W as CardTitle,
2473
- ar as DiffPage,
2474
- he as EmptyState,
2475
- Gt as ExportRunButton,
2476
- se as FormGroup,
2477
- Ms as FormRow,
2478
- Xt as GroupDetailPage,
2479
- Jt as GroupsPage,
2480
- Ut as GroupsTable,
2481
- is as Input,
2482
- es as KVList,
2483
- ce as Label,
2484
- V as Layout,
2485
- fr as LayoutConfigProvider,
2486
- as as Modal,
2487
- Xe as POLL_INTERVAL,
2488
- Ee as PageHeader,
2489
- Ht as ProjectsPage,
2490
- Mt as ProjectsTable,
2491
- Kt as RunDetailPage,
2492
- qt as RunsPage,
2493
- cs as RunsTable,
2494
- ir as SearchPage,
2495
- de as Select,
2496
- B as Spinner,
2497
- Us as StatusBadge,
2498
- O as Table,
2499
- L as TableBody,
2500
- c as TableCell,
2501
- re as TableHead,
2502
- N as TableHeader,
2799
+ Pr as Alert,
2800
+ As as ApiClient,
2801
+ Ae as ApiError,
2802
+ Dr as App,
2803
+ qs as AppProvider,
2804
+ Nr as ArtifactPage,
2805
+ re as Badge,
2806
+ $ as Button,
2807
+ N as Card,
2808
+ Y as CardHeader,
2809
+ H as CardTitle,
2810
+ br as DiffPage,
2811
+ we as EmptyState,
2812
+ Xs as ExportRunButton,
2813
+ xe as FormGroup,
2814
+ Kt as FormRow,
2815
+ hr as GroupDetailPage,
2816
+ ur as GroupsPage,
2817
+ Js as GroupsTable,
2818
+ jt as Input,
2819
+ ot as KVList,
2820
+ ve as Label,
2821
+ Q as Layout,
2822
+ Sr as LayoutConfigProvider,
2823
+ ft as Modal,
2824
+ nt as POLL_INTERVAL,
2825
+ Oe as PageHeader,
2826
+ dr as ProjectsPage,
2827
+ Ks as ProjectsTable,
2828
+ or as RunDetailPage,
2829
+ Hs as RunsPage,
2830
+ pt as RunsTable,
2831
+ yr as SearchPage,
2832
+ _e as Select,
2833
+ G as Spinner,
2834
+ Jt as StatusBadge,
2835
+ B as Table,
2836
+ U as TableBody,
2837
+ d as TableCell,
2838
+ fe as TableHead,
2839
+ w as TableHeader,
2503
2840
  j as TableRow,
2504
- xr as ThemeProvider,
2505
- Ce as Toast,
2506
- Et as api,
2507
- hr as buildUrl,
2508
- $ as cn,
2509
- lr as coreRoutes,
2510
- Gs as createRouter,
2511
- As as elapsedSeconds,
2512
- Oe as formatBytes,
2513
- Fs as formatDuration,
2514
- Ct as formatNumber,
2515
- Be as isTerminalStatus,
2516
- Tt as jsonPretty,
2517
- or as router,
2518
- Ze as shortDigest,
2519
- Q as shortId,
2520
- Le as timeAgo,
2521
- kt as truncate,
2522
- z as useApp,
2523
- Ot as useArtifact,
2524
- $t as useDiff,
2525
- Ft as useGroup,
2526
- At as useGroups,
2527
- It as useLayoutConfig,
2528
- Re as useMutation,
2529
- Ls as usePolling,
2530
- qe as useProjects,
2531
- Bs as useRun,
2532
- Is as useRuns,
2533
- Pt as useTheme,
2534
- mr as useThemeOptional
2841
+ Cr as ThemeProvider,
2842
+ Me as Toast,
2843
+ Fs as api,
2844
+ kr as buildUrl,
2845
+ q as cn,
2846
+ _r as coreRoutes,
2847
+ Xt as createRouter,
2848
+ Ut as elapsedSeconds,
2849
+ Ve as formatBytes,
2850
+ Wt as formatDuration,
2851
+ lt as formatNumber,
2852
+ $e as isTerminalStatus,
2853
+ $s as jsonPretty,
2854
+ wr as router,
2855
+ ct as shortDigest,
2856
+ oe as shortId,
2857
+ Ye as timeAgo,
2858
+ Os as truncate,
2859
+ K as useApp,
2860
+ Ws as useArtifact,
2861
+ Us as useDiff,
2862
+ Bs as useGroup,
2863
+ Is as useGroups,
2864
+ zs as useLayoutConfig,
2865
+ Fe as useMutation,
2866
+ mt as usePolling,
2867
+ Ke as useProjects,
2868
+ Yt as useRun,
2869
+ zt as useRuns,
2870
+ Ms as useTheme,
2871
+ Tr as useThemeOptional
2535
2872
  };