@motiadev/plugin-observability 0.8.2-beta.140-364012 → 0.8.2-beta.140-709523
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.cjs +4 -74
- package/dist/index.js +359 -1139
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useStreamItem as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
1
|
+
import xe, { useState as C, useEffect as Z, memo as N, useMemo as F } from "react";
|
|
2
|
+
import { useStreamItem as pe, useStreamGroup as H } from "@motiadev/stream-client-react";
|
|
3
|
+
import { cn as D, LevelDot as he, Sidebar as je, Badge as Q, Button as P, Input as be } from "@motiadev/ui";
|
|
4
|
+
import { ScrollText as ve, MessageCircle as ge, Package as Te, Radio as Ne, X as K, Minus as Ee, Plus as we, Search as _e, Trash as ke, GanttChart as Re } from "lucide-react";
|
|
5
|
+
import { create as ye } from "zustand";
|
|
6
|
+
import { formatDistanceToNow as Se } from "date-fns";
|
|
7
|
+
var w = { exports: {} }, g = {};
|
|
5
8
|
/**
|
|
6
9
|
* @license React
|
|
7
10
|
* react-jsx-runtime.production.js
|
|
@@ -11,29 +14,29 @@ var A = { exports: {} }, E = {};
|
|
|
11
14
|
* This source code is licensed under the MIT license found in the
|
|
12
15
|
* LICENSE file in the root directory of this source tree.
|
|
13
16
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else
|
|
26
|
-
return o =
|
|
27
|
-
$$typeof:
|
|
17
|
+
var J;
|
|
18
|
+
function Oe() {
|
|
19
|
+
if (J) return g;
|
|
20
|
+
J = 1;
|
|
21
|
+
var r = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
22
|
+
function l(a, o, u) {
|
|
23
|
+
var x = null;
|
|
24
|
+
if (u !== void 0 && (x = "" + u), o.key !== void 0 && (x = "" + o.key), "key" in o) {
|
|
25
|
+
u = {};
|
|
26
|
+
for (var d in o)
|
|
27
|
+
d !== "key" && (u[d] = o[d]);
|
|
28
|
+
} else u = o;
|
|
29
|
+
return o = u.ref, {
|
|
30
|
+
$$typeof: r,
|
|
28
31
|
type: a,
|
|
29
|
-
key:
|
|
32
|
+
key: x,
|
|
30
33
|
ref: o !== void 0 ? o : null,
|
|
31
|
-
props:
|
|
34
|
+
props: u
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
|
-
return
|
|
37
|
+
return g.Fragment = s, g.jsx = l, g.jsxs = l, g;
|
|
35
38
|
}
|
|
36
|
-
var
|
|
39
|
+
var T = {};
|
|
37
40
|
/**
|
|
38
41
|
* @license React
|
|
39
42
|
* react-jsx-runtime.development.js
|
|
@@ -43,1260 +46,477 @@ var S = {};
|
|
|
43
46
|
* This source code is licensed under the MIT license found in the
|
|
44
47
|
* LICENSE file in the root directory of this source tree.
|
|
45
48
|
*/
|
|
46
|
-
var
|
|
49
|
+
var V;
|
|
47
50
|
function Ae() {
|
|
48
|
-
return
|
|
49
|
-
function
|
|
50
|
-
if (
|
|
51
|
-
if (typeof
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
switch (
|
|
55
|
-
case
|
|
51
|
+
return V || (V = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
+
function r(t) {
|
|
53
|
+
if (t == null) return null;
|
|
54
|
+
if (typeof t == "function")
|
|
55
|
+
return t.$$typeof === ue ? null : t.displayName || t.name || null;
|
|
56
|
+
if (typeof t == "string") return t;
|
|
57
|
+
switch (t) {
|
|
58
|
+
case R:
|
|
56
59
|
return "Fragment";
|
|
57
|
-
case
|
|
60
|
+
case se:
|
|
58
61
|
return "Profiler";
|
|
59
|
-
case
|
|
62
|
+
case te:
|
|
60
63
|
return "StrictMode";
|
|
61
|
-
case
|
|
64
|
+
case le:
|
|
62
65
|
return "Suspense";
|
|
63
|
-
case
|
|
66
|
+
case ie:
|
|
64
67
|
return "SuspenseList";
|
|
65
|
-
case
|
|
68
|
+
case de:
|
|
66
69
|
return "Activity";
|
|
67
70
|
}
|
|
68
|
-
if (typeof
|
|
69
|
-
switch (typeof
|
|
71
|
+
if (typeof t == "object")
|
|
72
|
+
switch (typeof t.tag == "number" && console.error(
|
|
70
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
|
-
),
|
|
72
|
-
case
|
|
74
|
+
), t.$$typeof) {
|
|
75
|
+
case re:
|
|
73
76
|
return "Portal";
|
|
74
|
-
case
|
|
75
|
-
return (
|
|
76
|
-
case
|
|
77
|
-
return (
|
|
78
|
-
case
|
|
79
|
-
var
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
|
|
77
|
+
case ne:
|
|
78
|
+
return (t.displayName || "Context") + ".Provider";
|
|
79
|
+
case ae:
|
|
80
|
+
return (t._context.displayName || "Context") + ".Consumer";
|
|
81
|
+
case oe:
|
|
82
|
+
var n = t.render;
|
|
83
|
+
return t = t.displayName, t || (t = n.displayName || n.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
84
|
+
case ce:
|
|
85
|
+
return n = t.displayName || null, n !== null ? n : r(t.type) || "Memo";
|
|
86
|
+
case L:
|
|
87
|
+
n = t._payload, t = t._init;
|
|
85
88
|
try {
|
|
86
|
-
return
|
|
89
|
+
return r(t(n));
|
|
87
90
|
} catch {
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
return null;
|
|
91
94
|
}
|
|
92
|
-
function t
|
|
93
|
-
return "" +
|
|
95
|
+
function s(t) {
|
|
96
|
+
return "" + t;
|
|
94
97
|
}
|
|
95
|
-
function
|
|
98
|
+
function l(t) {
|
|
96
99
|
try {
|
|
97
|
-
t
|
|
98
|
-
var
|
|
100
|
+
s(t);
|
|
101
|
+
var n = !1;
|
|
99
102
|
} catch {
|
|
100
|
-
|
|
103
|
+
n = !0;
|
|
101
104
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
105
|
+
if (n) {
|
|
106
|
+
n = console;
|
|
107
|
+
var c = n.error, m = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
108
|
+
return c.call(
|
|
109
|
+
n,
|
|
107
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
109
|
-
), t
|
|
111
|
+
m
|
|
112
|
+
), s(t);
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
|
-
function a(
|
|
113
|
-
if (
|
|
114
|
-
if (typeof
|
|
115
|
+
function a(t) {
|
|
116
|
+
if (t === R) return "<>";
|
|
117
|
+
if (typeof t == "object" && t !== null && t.$$typeof === L)
|
|
115
118
|
return "<...>";
|
|
116
119
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
120
|
+
var n = r(t);
|
|
121
|
+
return n ? "<" + n + ">" : "<...>";
|
|
119
122
|
} catch {
|
|
120
123
|
return "<...>";
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
function o() {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
127
|
+
var t = y.A;
|
|
128
|
+
return t === null ? null : t.getOwner();
|
|
126
129
|
}
|
|
127
|
-
function
|
|
130
|
+
function u() {
|
|
128
131
|
return Error("react-stack-top-frame");
|
|
129
132
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
133
|
+
function x(t) {
|
|
134
|
+
if (Y.call(t, "key")) {
|
|
135
|
+
var n = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
136
|
+
if (n && n.isReactWarning) return !1;
|
|
134
137
|
}
|
|
135
|
-
return
|
|
138
|
+
return t.key !== void 0;
|
|
136
139
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
+
function d(t, n) {
|
|
141
|
+
function c() {
|
|
142
|
+
z || (z = !0, console.error(
|
|
140
143
|
"%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://react.dev/link/special-props)",
|
|
141
|
-
|
|
144
|
+
n
|
|
142
145
|
));
|
|
143
146
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
147
|
+
c.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
148
|
+
get: c,
|
|
146
149
|
configurable: !0
|
|
147
150
|
});
|
|
148
151
|
}
|
|
149
|
-
function
|
|
150
|
-
var
|
|
151
|
-
return
|
|
152
|
+
function i() {
|
|
153
|
+
var t = r(this.type);
|
|
154
|
+
return W[t] || (W[t] = !0, console.error(
|
|
152
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
153
|
-
)),
|
|
156
|
+
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
154
157
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
157
|
-
$$typeof:
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
158
|
+
function k(t, n, c, m, j, h, O, A) {
|
|
159
|
+
return c = h.ref, t = {
|
|
160
|
+
$$typeof: G,
|
|
161
|
+
type: t,
|
|
162
|
+
key: n,
|
|
163
|
+
props: h,
|
|
164
|
+
_owner: j
|
|
165
|
+
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(t, "ref", {
|
|
163
166
|
enumerable: !1,
|
|
164
|
-
get:
|
|
165
|
-
}) : Object.defineProperty(
|
|
167
|
+
get: i
|
|
168
|
+
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
166
169
|
configurable: !1,
|
|
167
170
|
enumerable: !1,
|
|
168
171
|
writable: !0,
|
|
169
172
|
value: 0
|
|
170
|
-
}), Object.defineProperty(
|
|
173
|
+
}), Object.defineProperty(t, "_debugInfo", {
|
|
171
174
|
configurable: !1,
|
|
172
175
|
enumerable: !1,
|
|
173
176
|
writable: !0,
|
|
174
177
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(t, "_debugStack", {
|
|
176
179
|
configurable: !1,
|
|
177
180
|
enumerable: !1,
|
|
178
181
|
writable: !0,
|
|
179
|
-
value:
|
|
180
|
-
}), Object.defineProperty(
|
|
182
|
+
value: O
|
|
183
|
+
}), Object.defineProperty(t, "_debugTask", {
|
|
181
184
|
configurable: !1,
|
|
182
185
|
enumerable: !1,
|
|
183
186
|
writable: !0,
|
|
184
|
-
value:
|
|
185
|
-
}), Object.freeze && (Object.freeze(
|
|
187
|
+
value: A
|
|
188
|
+
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
186
189
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
190
|
+
function p(t, n, c, m, j, h, O, A) {
|
|
191
|
+
var f = n.children;
|
|
192
|
+
if (f !== void 0)
|
|
193
|
+
if (m)
|
|
194
|
+
if (me(f)) {
|
|
195
|
+
for (m = 0; m < f.length; m++)
|
|
196
|
+
M(f[m]);
|
|
197
|
+
Object.freeze && Object.freeze(f);
|
|
195
198
|
} else
|
|
196
199
|
console.error(
|
|
197
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
201
|
);
|
|
199
|
-
else
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
202
|
+
else M(f);
|
|
203
|
+
if (Y.call(n, "key")) {
|
|
204
|
+
f = r(t);
|
|
205
|
+
var v = Object.keys(n).filter(function(fe) {
|
|
206
|
+
return fe !== "key";
|
|
204
207
|
});
|
|
205
|
-
|
|
208
|
+
m = 0 < v.length ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}", q[f + m] || (v = 0 < v.length ? "{" + v.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
210
|
let props = %s;
|
|
208
211
|
<%s {...props} />
|
|
209
212
|
React keys must be passed directly to JSX without using spread:
|
|
210
213
|
let props = %s;
|
|
211
214
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
215
|
+
m,
|
|
216
|
+
f,
|
|
217
|
+
v,
|
|
218
|
+
f
|
|
219
|
+
), q[f + m] = !0);
|
|
217
220
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
221
|
+
if (f = null, c !== void 0 && (l(c), f = "" + c), x(n) && (l(n.key), f = "" + n.key), "key" in n) {
|
|
222
|
+
c = {};
|
|
223
|
+
for (var I in n)
|
|
224
|
+
I !== "key" && (c[I] = n[I]);
|
|
225
|
+
} else c = n;
|
|
226
|
+
return f && d(
|
|
227
|
+
c,
|
|
228
|
+
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
229
|
+
), k(
|
|
230
|
+
t,
|
|
224
231
|
f,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
s,
|
|
228
|
-
g,
|
|
229
|
-
w,
|
|
230
|
-
T,
|
|
232
|
+
h,
|
|
233
|
+
j,
|
|
231
234
|
o(),
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
+
c,
|
|
236
|
+
O,
|
|
237
|
+
A
|
|
235
238
|
);
|
|
236
239
|
}
|
|
237
|
-
function
|
|
238
|
-
typeof
|
|
240
|
+
function M(t) {
|
|
241
|
+
typeof t == "object" && t !== null && t.$$typeof === G && t._store && (t._store.validated = 1);
|
|
239
242
|
}
|
|
240
|
-
var
|
|
243
|
+
var E = xe, G = Symbol.for("react.transitional.element"), re = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), te = Symbol.for("react.strict_mode"), se = Symbol.for("react.profiler"), ae = Symbol.for("react.consumer"), ne = Symbol.for("react.context"), oe = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), ie = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), ue = Symbol.for("react.client.reference"), y = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, me = Array.isArray, S = console.createTask ? console.createTask : function() {
|
|
241
244
|
return null;
|
|
242
245
|
};
|
|
243
|
-
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
246
|
+
E = {
|
|
247
|
+
react_stack_bottom_frame: function(t) {
|
|
248
|
+
return t();
|
|
246
249
|
}
|
|
247
250
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
var z, W = {}, U = E.react_stack_bottom_frame.bind(
|
|
252
|
+
E,
|
|
253
|
+
u
|
|
254
|
+
)(), B = S(a(u)), q = {};
|
|
255
|
+
T.Fragment = R, T.jsx = function(t, n, c, m, j) {
|
|
256
|
+
var h = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return p(
|
|
258
|
+
t,
|
|
259
|
+
n,
|
|
260
|
+
c,
|
|
258
261
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
m,
|
|
263
|
+
j,
|
|
264
|
+
h ? Error("react-stack-top-frame") : U,
|
|
265
|
+
h ? S(a(t)) : B
|
|
263
266
|
);
|
|
264
|
-
},
|
|
265
|
-
var
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
}, T.jsxs = function(t, n, c, m, j) {
|
|
268
|
+
var h = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return p(
|
|
270
|
+
t,
|
|
271
|
+
n,
|
|
272
|
+
c,
|
|
270
273
|
!0,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
m,
|
|
275
|
+
j,
|
|
276
|
+
h ? Error("react-stack-top-frame") : U,
|
|
277
|
+
h ? S(a(t)) : B
|
|
275
278
|
);
|
|
276
279
|
};
|
|
277
|
-
}()),
|
|
280
|
+
}()), T;
|
|
278
281
|
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
281
|
-
return
|
|
282
|
+
var X;
|
|
283
|
+
function Ie() {
|
|
284
|
+
return X || (X = 1, process.env.NODE_ENV === "production" ? w.exports = Oe() : w.exports = Ae()), w.exports;
|
|
282
285
|
}
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
* @license lucide-react v0.545.0 - ISC
|
|
286
|
-
*
|
|
287
|
-
* This source code is licensed under the ISC license.
|
|
288
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
-
*/
|
|
290
|
-
const Ie = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Fe = (e) => e.replace(
|
|
291
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
292
|
-
(t, r, a) => a ? a.toUpperCase() : r.toLowerCase()
|
|
293
|
-
), oe = (e) => {
|
|
294
|
-
const t = Fe(e);
|
|
295
|
-
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
296
|
-
}, he = (...e) => e.filter((t, r, a) => !!t && t.trim() !== "" && a.indexOf(t) === r).join(" ").trim(), We = (e) => {
|
|
297
|
-
for (const t in e)
|
|
298
|
-
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
299
|
-
return !0;
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* @license lucide-react v0.545.0 - ISC
|
|
303
|
-
*
|
|
304
|
-
* This source code is licensed under the ISC license.
|
|
305
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/
|
|
307
|
-
var $e = {
|
|
308
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
309
|
-
width: 24,
|
|
310
|
-
height: 24,
|
|
311
|
-
viewBox: "0 0 24 24",
|
|
312
|
-
fill: "none",
|
|
313
|
-
stroke: "currentColor",
|
|
314
|
-
strokeWidth: 2,
|
|
315
|
-
strokeLinecap: "round",
|
|
316
|
-
strokeLinejoin: "round"
|
|
317
|
-
};
|
|
318
|
-
/**
|
|
319
|
-
* @license lucide-react v0.545.0 - ISC
|
|
320
|
-
*
|
|
321
|
-
* This source code is licensed under the ISC license.
|
|
322
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
-
*/
|
|
324
|
-
const Le = de(
|
|
325
|
-
({
|
|
326
|
-
color: e = "currentColor",
|
|
327
|
-
size: t = 24,
|
|
328
|
-
strokeWidth: r = 2,
|
|
329
|
-
absoluteStrokeWidth: a,
|
|
330
|
-
className: o = "",
|
|
331
|
-
children: c,
|
|
332
|
-
iconNode: l,
|
|
333
|
-
...i
|
|
334
|
-
}, u) => X(
|
|
335
|
-
"svg",
|
|
336
|
-
{
|
|
337
|
-
ref: u,
|
|
338
|
-
...$e,
|
|
339
|
-
width: t,
|
|
340
|
-
height: t,
|
|
341
|
-
stroke: e,
|
|
342
|
-
strokeWidth: a ? Number(r) * 24 / Number(t) : r,
|
|
343
|
-
className: he("lucide", o),
|
|
344
|
-
...!c && !We(i) && { "aria-hidden": "true" },
|
|
345
|
-
...i
|
|
346
|
-
},
|
|
347
|
-
[
|
|
348
|
-
...l.map(([m, x]) => X(m, x)),
|
|
349
|
-
...Array.isArray(c) ? c : [c]
|
|
350
|
-
]
|
|
351
|
-
)
|
|
352
|
-
);
|
|
353
|
-
/**
|
|
354
|
-
* @license lucide-react v0.545.0 - ISC
|
|
355
|
-
*
|
|
356
|
-
* This source code is licensed under the ISC license.
|
|
357
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
-
*/
|
|
359
|
-
const N = (e, t) => {
|
|
360
|
-
const r = de(
|
|
361
|
-
({ className: a, ...o }, c) => X(Le, {
|
|
362
|
-
ref: c,
|
|
363
|
-
iconNode: t,
|
|
364
|
-
className: he(
|
|
365
|
-
`lucide-${Ie(oe(e))}`,
|
|
366
|
-
`lucide-${e}`,
|
|
367
|
-
a
|
|
368
|
-
),
|
|
369
|
-
...o
|
|
370
|
-
})
|
|
371
|
-
);
|
|
372
|
-
return r.displayName = oe(e), r;
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* @license lucide-react v0.545.0 - ISC
|
|
376
|
-
*
|
|
377
|
-
* This source code is licensed under the ISC license.
|
|
378
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
-
*/
|
|
380
|
-
const Ye = [
|
|
381
|
-
["path", { d: "M6 5h12", key: "fvfigv" }],
|
|
382
|
-
["path", { d: "M4 12h10", key: "oujl3d" }],
|
|
383
|
-
["path", { d: "M12 19h8", key: "baeox8" }]
|
|
384
|
-
], Ve = N("chart-no-axes-gantt", Ye);
|
|
385
|
-
/**
|
|
386
|
-
* @license lucide-react v0.545.0 - ISC
|
|
387
|
-
*
|
|
388
|
-
* This source code is licensed under the ISC license.
|
|
389
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
-
*/
|
|
391
|
-
const ze = [
|
|
392
|
-
[
|
|
393
|
-
"path",
|
|
394
|
-
{
|
|
395
|
-
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
396
|
-
key: "1sd12s"
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
], Xe = N("message-circle", ze);
|
|
400
|
-
/**
|
|
401
|
-
* @license lucide-react v0.545.0 - ISC
|
|
402
|
-
*
|
|
403
|
-
* This source code is licensed under the ISC license.
|
|
404
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
-
*/
|
|
406
|
-
const qe = [["path", { d: "M5 12h14", key: "1ays0h" }]], Ge = N("minus", qe);
|
|
407
|
-
/**
|
|
408
|
-
* @license lucide-react v0.545.0 - ISC
|
|
409
|
-
*
|
|
410
|
-
* This source code is licensed under the ISC license.
|
|
411
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
412
|
-
*/
|
|
413
|
-
const Je = [
|
|
414
|
-
[
|
|
415
|
-
"path",
|
|
416
|
-
{
|
|
417
|
-
d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
|
|
418
|
-
key: "1a0edw"
|
|
419
|
-
}
|
|
420
|
-
],
|
|
421
|
-
["path", { d: "M12 22V12", key: "d0xqtd" }],
|
|
422
|
-
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
|
|
423
|
-
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
|
|
424
|
-
], Ue = N("package", Je);
|
|
425
|
-
/**
|
|
426
|
-
* @license lucide-react v0.545.0 - ISC
|
|
427
|
-
*
|
|
428
|
-
* This source code is licensed under the ISC license.
|
|
429
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
-
*/
|
|
431
|
-
const Be = [
|
|
432
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
433
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
434
|
-
], He = N("plus", Be);
|
|
435
|
-
/**
|
|
436
|
-
* @license lucide-react v0.545.0 - ISC
|
|
437
|
-
*
|
|
438
|
-
* This source code is licensed under the ISC license.
|
|
439
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
-
*/
|
|
441
|
-
const Qe = [
|
|
442
|
-
["path", { d: "M16.247 7.761a6 6 0 0 1 0 8.478", key: "1fwjs5" }],
|
|
443
|
-
["path", { d: "M19.075 4.933a10 10 0 0 1 0 14.134", key: "ehdyv1" }],
|
|
444
|
-
["path", { d: "M4.925 19.067a10 10 0 0 1 0-14.134", key: "1q22gi" }],
|
|
445
|
-
["path", { d: "M7.753 16.239a6 6 0 0 1 0-8.478", key: "r2q7qm" }],
|
|
446
|
-
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
|
|
447
|
-
], Ze = N("radio", Qe);
|
|
448
|
-
/**
|
|
449
|
-
* @license lucide-react v0.545.0 - ISC
|
|
450
|
-
*
|
|
451
|
-
* This source code is licensed under the ISC license.
|
|
452
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
453
|
-
*/
|
|
454
|
-
const Ke = [
|
|
455
|
-
["path", { d: "M15 12h-5", key: "r7krc0" }],
|
|
456
|
-
["path", { d: "M15 8h-5", key: "1khuty" }],
|
|
457
|
-
["path", { d: "M19 17V5a2 2 0 0 0-2-2H4", key: "zz82l3" }],
|
|
458
|
-
[
|
|
459
|
-
"path",
|
|
460
|
-
{
|
|
461
|
-
d: "M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",
|
|
462
|
-
key: "1ph1d7"
|
|
463
|
-
}
|
|
464
|
-
]
|
|
465
|
-
], et = N("scroll-text", Ke);
|
|
466
|
-
/**
|
|
467
|
-
* @license lucide-react v0.545.0 - ISC
|
|
468
|
-
*
|
|
469
|
-
* This source code is licensed under the ISC license.
|
|
470
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
471
|
-
*/
|
|
472
|
-
const tt = [
|
|
473
|
-
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
474
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
475
|
-
], nt = N("search", tt);
|
|
476
|
-
/**
|
|
477
|
-
* @license lucide-react v0.545.0 - ISC
|
|
478
|
-
*
|
|
479
|
-
* This source code is licensed under the ISC license.
|
|
480
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
481
|
-
*/
|
|
482
|
-
const rt = [
|
|
483
|
-
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
484
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
485
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
486
|
-
], at = N("trash", rt);
|
|
487
|
-
/**
|
|
488
|
-
* @license lucide-react v0.545.0 - ISC
|
|
489
|
-
*
|
|
490
|
-
* This source code is licensed under the ISC license.
|
|
491
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
492
|
-
*/
|
|
493
|
-
const st = [
|
|
494
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
495
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
496
|
-
], xe = N("x", st), ie = (e) => {
|
|
497
|
-
let t;
|
|
498
|
-
const r = /* @__PURE__ */ new Set(), a = (m, x) => {
|
|
499
|
-
const v = typeof m == "function" ? m(t) : m;
|
|
500
|
-
if (!Object.is(v, t)) {
|
|
501
|
-
const h = t;
|
|
502
|
-
t = x ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), r.forEach((y) => y(t, h));
|
|
503
|
-
}
|
|
504
|
-
}, o = () => t, i = { setState: a, getState: o, getInitialState: () => u, subscribe: (m) => (r.add(m), () => r.delete(m)) }, u = t = e(a, o, i);
|
|
505
|
-
return i;
|
|
506
|
-
}, ot = (e) => e ? ie(e) : ie, it = (e) => e;
|
|
507
|
-
function ct(e, t = it) {
|
|
508
|
-
const r = C.useSyncExternalStore(
|
|
509
|
-
e.subscribe,
|
|
510
|
-
C.useCallback(() => t(e.getState()), [e, t]),
|
|
511
|
-
C.useCallback(() => t(e.getInitialState()), [e, t])
|
|
512
|
-
);
|
|
513
|
-
return C.useDebugValue(r), r;
|
|
514
|
-
}
|
|
515
|
-
const lt = (e) => {
|
|
516
|
-
const t = ot(e), r = (a) => ct(t, a);
|
|
517
|
-
return Object.assign(r, t), r;
|
|
518
|
-
}, dt = (e) => lt, F = dt()((e) => ({
|
|
286
|
+
var e = Ie();
|
|
287
|
+
const _ = ye()((r) => ({
|
|
519
288
|
selectedTraceGroupId: void 0,
|
|
520
289
|
selectedTraceId: void 0,
|
|
521
|
-
selectTraceGroupId: (
|
|
522
|
-
selectTraceId: (
|
|
523
|
-
})),
|
|
524
|
-
const
|
|
525
|
-
return
|
|
526
|
-
if (
|
|
527
|
-
a(
|
|
290
|
+
selectTraceGroupId: (s) => r({ selectedTraceGroupId: s }),
|
|
291
|
+
selectTraceId: (s) => r({ selectedTraceId: s })
|
|
292
|
+
})), Pe = (r) => {
|
|
293
|
+
const s = r?.endTime, [l, a] = C(s || Date.now());
|
|
294
|
+
return Z(() => {
|
|
295
|
+
if (s)
|
|
296
|
+
a(s);
|
|
528
297
|
else {
|
|
529
298
|
const o = setInterval(() => a(Date.now()), 50);
|
|
530
299
|
return () => clearInterval(o);
|
|
531
300
|
}
|
|
532
|
-
}, [
|
|
533
|
-
},
|
|
301
|
+
}, [s]), l;
|
|
302
|
+
}, b = (r) => r == null ? "N/A" : r < 1e3 ? `${r}ms` : r < 6e4 ? `${(r / 1e3).toFixed(1)}s` : r < 36e5 ? `${(r / 6e4).toFixed(1)}min` : `${(r / 36e5).toFixed(1)}h`, Ce = ({ trace: r, group: s, groupEndTime: l, onExpand: a }) => /* @__PURE__ */ e.jsxs(
|
|
534
303
|
"div",
|
|
535
304
|
{
|
|
536
305
|
className: "flex hover:bg-muted-foreground/10 relative cursor-pointer",
|
|
537
|
-
onClick: () => a(
|
|
306
|
+
onClick: () => a(r.id),
|
|
538
307
|
"data-testid": "trace-timeline-item",
|
|
539
308
|
children: [
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center min-w-[200px] max-w-[200px] h-[32px] max-h-[32px] py-4 px-2 text-sm font-semibold text-foreground truncate sticky left-0 bg-card z-9", children: r.name }),
|
|
310
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-row items-center hover:bg-muted/50 rounded-md", children: /* @__PURE__ */ e.jsx("div", { className: "relative w-full h-[32px] flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
542
311
|
"div",
|
|
543
312
|
{
|
|
544
|
-
className:
|
|
545
|
-
"bg-[repeating-linear-gradient(140deg,#BEFE29,#BEFE29_8px,#ABE625_8px,#ABE625_16px)]":
|
|
546
|
-
"bg-[repeating-linear-gradient(140deg,#2862FE,#2862FE_8px,#2358E5_8px,#2358E5_16px)]":
|
|
547
|
-
"bg-[repeating-linear-gradient(140deg,#EA2069,#EA2069_8px,#D41E60_8px,#D41E60_16px)]":
|
|
313
|
+
className: D("h-[24px] rounded-[4px] hover:opacity-80 transition-all duration-200", {
|
|
314
|
+
"bg-[repeating-linear-gradient(140deg,#BEFE29,#BEFE29_8px,#ABE625_8px,#ABE625_16px)]": r.status === "running",
|
|
315
|
+
"bg-[repeating-linear-gradient(140deg,#2862FE,#2862FE_8px,#2358E5_8px,#2358E5_16px)]": r.status === "completed",
|
|
316
|
+
"bg-[repeating-linear-gradient(140deg,#EA2069,#EA2069_8px,#D41E60_8px,#D41E60_16px)]": r.status === "failed"
|
|
548
317
|
}),
|
|
549
318
|
style: {
|
|
550
|
-
marginLeft: `${(
|
|
551
|
-
width:
|
|
319
|
+
marginLeft: `${(r.startTime - s.startTime) / (l - s.startTime) * 100}%`,
|
|
320
|
+
width: r.endTime ? `${(r.endTime - r.startTime) / (l - s.startTime) * 100}%` : `${(Date.now() - r.startTime) / (l - s.startTime) * 100}%`
|
|
552
321
|
}
|
|
553
322
|
}
|
|
554
323
|
) }) })
|
|
555
324
|
]
|
|
556
325
|
}
|
|
557
|
-
),
|
|
558
|
-
if (
|
|
559
|
-
return /* @__PURE__ */
|
|
560
|
-
if (
|
|
561
|
-
return /* @__PURE__ */
|
|
562
|
-
if (
|
|
563
|
-
return /* @__PURE__ */
|
|
564
|
-
if (
|
|
565
|
-
return /* @__PURE__ */
|
|
566
|
-
},
|
|
567
|
-
if (typeof
|
|
568
|
-
return /* @__PURE__ */
|
|
326
|
+
), Fe = ({ event: r }) => {
|
|
327
|
+
if (r.type === "log")
|
|
328
|
+
return /* @__PURE__ */ e.jsx(ve, { className: "w-4 h-4 text-muted-foreground" });
|
|
329
|
+
if (r.type === "emit")
|
|
330
|
+
return /* @__PURE__ */ e.jsx(ge, { className: "w-4 h-4 text-muted-foreground" });
|
|
331
|
+
if (r.type === "state")
|
|
332
|
+
return /* @__PURE__ */ e.jsx(Te, { className: "w-4 h-4 text-muted-foreground" });
|
|
333
|
+
if (r.type === "stream")
|
|
334
|
+
return /* @__PURE__ */ e.jsx(Ne, { className: "w-4 h-4 text-muted-foreground" });
|
|
335
|
+
}, ee = ({ arg: r }) => {
|
|
336
|
+
if (typeof r == "string")
|
|
337
|
+
return /* @__PURE__ */ e.jsxs("span", { className: "font-mono text-blue-500", children: [
|
|
569
338
|
"'",
|
|
570
|
-
|
|
339
|
+
r,
|
|
571
340
|
"'"
|
|
572
341
|
] });
|
|
573
|
-
if (
|
|
574
|
-
return /* @__PURE__ */
|
|
575
|
-
const
|
|
576
|
-
return /* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
342
|
+
if (r === !1)
|
|
343
|
+
return /* @__PURE__ */ e.jsx("span", { className: "font-mono text-blue-100 font-bold bg-blue-500/50 px-2 rounded-md", children: "value" });
|
|
344
|
+
const s = Object.entries(r);
|
|
345
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
346
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-green-500", children: "{ " }),
|
|
347
|
+
s.map(([l, a], o) => /* @__PURE__ */ e.jsxs("span", { children: [
|
|
348
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-green-500", children: l }),
|
|
349
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted-foreground", children: ":" }),
|
|
581
350
|
" ",
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
o <
|
|
584
|
-
] },
|
|
585
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ e.jsx(ee, { arg: a }),
|
|
352
|
+
o < s.length - 1 && /* @__PURE__ */ e.jsx(e.Fragment, { children: ", " })
|
|
353
|
+
] }, l)),
|
|
354
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-green-500", children: " }" })
|
|
586
355
|
] });
|
|
587
|
-
},
|
|
588
|
-
const
|
|
589
|
-
return /* @__PURE__ */
|
|
590
|
-
|
|
591
|
-
/* @__PURE__ */
|
|
356
|
+
}, $ = ({ topLevelClassName: r, objectName: s, functionName: l, args: a, callsQuantity: o }) => {
|
|
357
|
+
const u = o && o > 1, x = a.filter((d) => d !== void 0);
|
|
358
|
+
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
359
|
+
r && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
360
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-pink-500", children: r }),
|
|
592
361
|
"."
|
|
593
362
|
] }),
|
|
594
|
-
|
|
595
|
-
/* @__PURE__ */
|
|
363
|
+
s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
364
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-pink-500", children: s }),
|
|
596
365
|
"."
|
|
597
366
|
] }),
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
-
|
|
603
|
-
] },
|
|
604
|
-
/* @__PURE__ */
|
|
605
|
-
|
|
367
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-pink-500", children: l }),
|
|
368
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-emerald-500", children: "(" }),
|
|
369
|
+
x.map((d, i) => /* @__PURE__ */ e.jsxs("span", { children: [
|
|
370
|
+
/* @__PURE__ */ e.jsx(ee, { arg: d }),
|
|
371
|
+
i < x.length - 1 && /* @__PURE__ */ e.jsx(e.Fragment, { children: ", " })
|
|
372
|
+
] }, i)),
|
|
373
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-mono text-emerald-500", children: ")" }),
|
|
374
|
+
u && /* @__PURE__ */ e.jsxs("span", { className: "font-mono text-muted-foreground", children: [
|
|
606
375
|
" x",
|
|
607
376
|
o
|
|
608
377
|
] })
|
|
609
378
|
] });
|
|
610
|
-
},
|
|
611
|
-
/* @__PURE__ */
|
|
379
|
+
}, De = ({ event: r }) => /* @__PURE__ */ e.jsx($, { functionName: "emit", args: [{ topic: r.topic, data: !1 }] }), $e = ({ event: r }) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
380
|
+
/* @__PURE__ */ e.jsx(he, { level: r.level }),
|
|
612
381
|
" ",
|
|
613
|
-
|
|
614
|
-
] }),
|
|
615
|
-
|
|
382
|
+
r.message
|
|
383
|
+
] }), Me = ({ event: r }) => /* @__PURE__ */ e.jsx(
|
|
384
|
+
$,
|
|
616
385
|
{
|
|
617
386
|
objectName: "state",
|
|
618
|
-
functionName:
|
|
619
|
-
args: [
|
|
387
|
+
functionName: r.operation,
|
|
388
|
+
args: [r.data.traceId, r.data.key, r.data.value ? !1 : void 0]
|
|
620
389
|
}
|
|
621
|
-
),
|
|
622
|
-
|
|
390
|
+
), Ge = ({ event: r }) => /* @__PURE__ */ e.jsx(
|
|
391
|
+
$,
|
|
623
392
|
{
|
|
624
393
|
topLevelClassName: "streams",
|
|
625
|
-
objectName:
|
|
626
|
-
functionName:
|
|
627
|
-
args: [
|
|
628
|
-
callsQuantity:
|
|
394
|
+
objectName: r.streamName,
|
|
395
|
+
functionName: r.operation,
|
|
396
|
+
args: [r.data.groupId, r.data.id, r.data.data ? !1 : void 0],
|
|
397
|
+
callsQuantity: r.calls
|
|
629
398
|
}
|
|
630
|
-
),
|
|
631
|
-
if (
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
if (
|
|
634
|
-
return /* @__PURE__ */
|
|
635
|
-
if (
|
|
636
|
-
return /* @__PURE__ */
|
|
637
|
-
if (
|
|
638
|
-
return /* @__PURE__ */
|
|
639
|
-
}),
|
|
640
|
-
|
|
399
|
+
), Le = N(({ event: r }) => {
|
|
400
|
+
if (r.type === "log")
|
|
401
|
+
return /* @__PURE__ */ e.jsx($e, { event: r });
|
|
402
|
+
if (r.type === "emit")
|
|
403
|
+
return /* @__PURE__ */ e.jsx(De, { event: r });
|
|
404
|
+
if (r.type === "state")
|
|
405
|
+
return /* @__PURE__ */ e.jsx(Me, { event: r });
|
|
406
|
+
if (r.type === "stream")
|
|
407
|
+
return /* @__PURE__ */ e.jsx(Ge, { event: r });
|
|
408
|
+
}), Ye = N(({ trace: r, onClose: s }) => /* @__PURE__ */ e.jsxs(
|
|
409
|
+
je,
|
|
641
410
|
{
|
|
642
|
-
onClose:
|
|
411
|
+
onClose: s,
|
|
643
412
|
title: "Trace Details",
|
|
644
|
-
subtitle: `Viewing details from step ${
|
|
645
|
-
actions: [{ icon: /* @__PURE__ */
|
|
413
|
+
subtitle: `Viewing details from step ${r.name}`,
|
|
414
|
+
actions: [{ icon: /* @__PURE__ */ e.jsx(K, {}), onClick: s, label: "Close" }],
|
|
646
415
|
children: [
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
649
|
-
|
|
416
|
+
/* @__PURE__ */ e.jsxs("div", { className: "px-2 w-[800px] overflow-auto", children: [
|
|
417
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4 text-sm text-muted-foreground mb-4", children: [
|
|
418
|
+
r.endTime && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
650
419
|
"Duration: ",
|
|
651
|
-
|
|
420
|
+
b(r.endTime - r.startTime)
|
|
652
421
|
] }),
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
|
|
422
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-blue-500 font-bold text-xs px-[4px] py-[2px] rounded-sm text-blue-100", children: r.entryPoint.type }),
|
|
423
|
+
r.correlationId && /* @__PURE__ */ e.jsxs(Q, { variant: "outline", children: [
|
|
655
424
|
"Correlated: ",
|
|
656
|
-
|
|
425
|
+
r.correlationId
|
|
657
426
|
] })
|
|
658
427
|
] }),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ e.jsx("div", { className: "pl-6 border-l-1 border-gray-500/40 font-mono text-xs flex flex-col gap-3", children: r.events.map((l, a) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
429
|
+
/* @__PURE__ */ e.jsx("div", { className: "absolute -left-[26px] top-[8px] w-1 h-1 rounded-full bg-emerald-500 outline outline-2 outline-emerald-500/50" }),
|
|
430
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
431
|
+
/* @__PURE__ */ e.jsx(Fe, { event: l }),
|
|
432
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm font-mono text-muted-foreground", children: [
|
|
664
433
|
"+",
|
|
665
|
-
|
|
434
|
+
b(Math.floor(l.timestamp - r.startTime))
|
|
666
435
|
] }),
|
|
667
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ e.jsx(Le, { event: l })
|
|
668
437
|
] })
|
|
669
438
|
] }, a)) })
|
|
670
439
|
] }),
|
|
671
|
-
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
440
|
+
r.error && /* @__PURE__ */ e.jsxs("div", { className: "p-4 bg-red-800/10", children: [
|
|
441
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-sm text-red-800 dark:text-red-400 font-semibold", children: r.error.message }),
|
|
442
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-sm text-red-800 dark:text-red-400 pl-4", children: r.error.stack })
|
|
674
443
|
] })
|
|
675
444
|
]
|
|
676
445
|
}
|
|
677
|
-
)),
|
|
678
|
-
const { data:
|
|
446
|
+
)), ze = N(({ groupId: r }) => {
|
|
447
|
+
const { data: s } = pe({
|
|
679
448
|
streamName: "motia-trace-group",
|
|
680
449
|
groupId: "default",
|
|
681
|
-
id:
|
|
682
|
-
}), { data:
|
|
683
|
-
o > 0.5 &&
|
|
450
|
+
id: r
|
|
451
|
+
}), { data: l } = H({ streamName: "motia-trace", groupId: r }), a = Pe(s), [o, u] = C(1), x = _((p) => p.selectedTraceId), d = _((p) => p.selectTraceId), i = F(() => l?.find((p) => p.id === x), [l, x]), k = () => {
|
|
452
|
+
o > 0.5 && u(o - 0.1);
|
|
684
453
|
};
|
|
685
|
-
return
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
454
|
+
return s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
455
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col flex-1 overflow-x-auto h-full relative", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center min-w-full sticky top-0", style: { width: `${o * 1e3}px` }, children: [
|
|
456
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 w-full sticky top-0 bg-background z-10", children: [
|
|
457
|
+
/* @__PURE__ */ e.jsxs("div", { className: "w-full min-h-[37px] h-[37px] min-w-[200px] max-w-[200px] flex items-center justify-center gap-2 sticky left-0 top-0 bg-card backdrop-blur-[4px] backdrop-filter", children: [
|
|
458
|
+
/* @__PURE__ */ e.jsx(P, { variant: "icon", size: "sm", className: "px-2", onClick: k, children: /* @__PURE__ */ e.jsx(Ee, { className: "w-4 h-4 cursor-pointer" }) }),
|
|
459
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm font-bold text-muted-foreground", children: [
|
|
691
460
|
Math.floor(o * 100),
|
|
692
461
|
"%"
|
|
693
462
|
] }),
|
|
694
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ e.jsx(P, { variant: "icon", size: "sm", className: "px-2", onClick: () => u(o + 0.1), children: /* @__PURE__ */ e.jsx(we, { className: "w-4 h-4 cursor-pointer" }) })
|
|
695
464
|
] }),
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between font-mono p-2 w-full text-xs text-muted-foreground bg-card", children: [
|
|
466
|
+
/* @__PURE__ */ e.jsx("span", { children: b(0) }),
|
|
467
|
+
/* @__PURE__ */ e.jsx("span", { children: b(Math.floor((a - s.startTime) * 0.25)) }),
|
|
468
|
+
/* @__PURE__ */ e.jsx("span", { children: b(Math.floor((a - s.startTime) * 0.5)) }),
|
|
469
|
+
/* @__PURE__ */ e.jsx("span", { children: b(Math.floor((a - s.startTime) * 0.75)) }),
|
|
470
|
+
/* @__PURE__ */ e.jsx("span", { children: b(Math.floor(a - s.startTime)) }),
|
|
471
|
+
/* @__PURE__ */ e.jsxs("div", { className: "absolute bottom-[-4px] w-full flex justify-between", children: [
|
|
472
|
+
/* @__PURE__ */ e.jsx("span", { className: "w-[1px] h-full bg-blue-500" }),
|
|
473
|
+
/* @__PURE__ */ e.jsx("span", { className: "w-[1px] h-full bg-blue-500" }),
|
|
474
|
+
/* @__PURE__ */ e.jsx("span", { className: "w-[1px] h-full bg-blue-500" }),
|
|
475
|
+
/* @__PURE__ */ e.jsx("span", { className: "w-[1px] h-full bg-blue-500" }),
|
|
476
|
+
/* @__PURE__ */ e.jsx("span", { className: "w-[1px] h-full bg-blue-500" })
|
|
708
477
|
] })
|
|
709
478
|
] })
|
|
710
479
|
] }),
|
|
711
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col w-full h-full", children: l?.map((p) => /* @__PURE__ */ e.jsx(Ce, { trace: p, group: s, groupEndTime: a, onExpand: d }, p.id)) })
|
|
712
481
|
] }) }),
|
|
713
|
-
|
|
482
|
+
i && /* @__PURE__ */ e.jsx(Ye, { trace: i, onClose: () => d(void 0) })
|
|
714
483
|
] }) : null;
|
|
715
|
-
})
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
function jt(e, t) {
|
|
721
|
-
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
722
|
-
}
|
|
723
|
-
const O = 43200, ce = 1440;
|
|
724
|
-
let wt = {};
|
|
725
|
-
function Nt() {
|
|
726
|
-
return wt;
|
|
727
|
-
}
|
|
728
|
-
function le(e) {
|
|
729
|
-
const t = p(e), r = new Date(
|
|
730
|
-
Date.UTC(
|
|
731
|
-
t.getFullYear(),
|
|
732
|
-
t.getMonth(),
|
|
733
|
-
t.getDate(),
|
|
734
|
-
t.getHours(),
|
|
735
|
-
t.getMinutes(),
|
|
736
|
-
t.getSeconds(),
|
|
737
|
-
t.getMilliseconds()
|
|
738
|
-
)
|
|
739
|
-
);
|
|
740
|
-
return r.setUTCFullYear(t.getFullYear()), +e - +r;
|
|
741
|
-
}
|
|
742
|
-
function I(e, t) {
|
|
743
|
-
const r = p(e), a = p(t), o = r.getTime() - a.getTime();
|
|
744
|
-
return o < 0 ? -1 : o > 0 ? 1 : o;
|
|
745
|
-
}
|
|
746
|
-
function Tt(e) {
|
|
747
|
-
return jt(e, Date.now());
|
|
748
|
-
}
|
|
749
|
-
function kt(e, t) {
|
|
750
|
-
const r = p(e), a = p(t), o = r.getFullYear() - a.getFullYear(), c = r.getMonth() - a.getMonth();
|
|
751
|
-
return o * 12 + c;
|
|
752
|
-
}
|
|
753
|
-
function Mt(e) {
|
|
754
|
-
return (t) => {
|
|
755
|
-
const r = Math.trunc, a = r(t);
|
|
756
|
-
return a === 0 ? 0 : a;
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
function _t(e, t) {
|
|
760
|
-
return +p(e) - +p(t);
|
|
761
|
-
}
|
|
762
|
-
function Et(e) {
|
|
763
|
-
const t = p(e);
|
|
764
|
-
return t.setHours(23, 59, 59, 999), t;
|
|
765
|
-
}
|
|
766
|
-
function St(e) {
|
|
767
|
-
const t = p(e), r = t.getMonth();
|
|
768
|
-
return t.setFullYear(t.getFullYear(), r + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
769
|
-
}
|
|
770
|
-
function Pt(e) {
|
|
771
|
-
const t = p(e);
|
|
772
|
-
return +Et(t) == +St(t);
|
|
773
|
-
}
|
|
774
|
-
function Rt(e, t) {
|
|
775
|
-
const r = p(e), a = p(t), o = I(r, a), c = Math.abs(
|
|
776
|
-
kt(r, a)
|
|
777
|
-
);
|
|
778
|
-
let l;
|
|
779
|
-
if (c < 1)
|
|
780
|
-
l = 0;
|
|
781
|
-
else {
|
|
782
|
-
r.getMonth() === 1 && r.getDate() > 27 && r.setDate(30), r.setMonth(r.getMonth() - o * c);
|
|
783
|
-
let i = I(r, a) === -o;
|
|
784
|
-
Pt(p(e)) && c === 1 && I(e, a) === 1 && (i = !1), l = o * (c - Number(i));
|
|
785
|
-
}
|
|
786
|
-
return l === 0 ? 0 : l;
|
|
787
|
-
}
|
|
788
|
-
function Ct(e, t, r) {
|
|
789
|
-
const a = _t(e, t) / 1e3;
|
|
790
|
-
return Mt()(a);
|
|
791
|
-
}
|
|
792
|
-
const Dt = {
|
|
793
|
-
lessThanXSeconds: {
|
|
794
|
-
one: "less than a second",
|
|
795
|
-
other: "less than {{count}} seconds"
|
|
796
|
-
},
|
|
797
|
-
xSeconds: {
|
|
798
|
-
one: "1 second",
|
|
799
|
-
other: "{{count}} seconds"
|
|
800
|
-
},
|
|
801
|
-
halfAMinute: "half a minute",
|
|
802
|
-
lessThanXMinutes: {
|
|
803
|
-
one: "less than a minute",
|
|
804
|
-
other: "less than {{count}} minutes"
|
|
805
|
-
},
|
|
806
|
-
xMinutes: {
|
|
807
|
-
one: "1 minute",
|
|
808
|
-
other: "{{count}} minutes"
|
|
809
|
-
},
|
|
810
|
-
aboutXHours: {
|
|
811
|
-
one: "about 1 hour",
|
|
812
|
-
other: "about {{count}} hours"
|
|
813
|
-
},
|
|
814
|
-
xHours: {
|
|
815
|
-
one: "1 hour",
|
|
816
|
-
other: "{{count}} hours"
|
|
817
|
-
},
|
|
818
|
-
xDays: {
|
|
819
|
-
one: "1 day",
|
|
820
|
-
other: "{{count}} days"
|
|
821
|
-
},
|
|
822
|
-
aboutXWeeks: {
|
|
823
|
-
one: "about 1 week",
|
|
824
|
-
other: "about {{count}} weeks"
|
|
825
|
-
},
|
|
826
|
-
xWeeks: {
|
|
827
|
-
one: "1 week",
|
|
828
|
-
other: "{{count}} weeks"
|
|
829
|
-
},
|
|
830
|
-
aboutXMonths: {
|
|
831
|
-
one: "about 1 month",
|
|
832
|
-
other: "about {{count}} months"
|
|
833
|
-
},
|
|
834
|
-
xMonths: {
|
|
835
|
-
one: "1 month",
|
|
836
|
-
other: "{{count}} months"
|
|
837
|
-
},
|
|
838
|
-
aboutXYears: {
|
|
839
|
-
one: "about 1 year",
|
|
840
|
-
other: "about {{count}} years"
|
|
841
|
-
},
|
|
842
|
-
xYears: {
|
|
843
|
-
one: "1 year",
|
|
844
|
-
other: "{{count}} years"
|
|
845
|
-
},
|
|
846
|
-
overXYears: {
|
|
847
|
-
one: "over 1 year",
|
|
848
|
-
other: "over {{count}} years"
|
|
849
|
-
},
|
|
850
|
-
almostXYears: {
|
|
851
|
-
one: "almost 1 year",
|
|
852
|
-
other: "almost {{count}} years"
|
|
853
|
-
}
|
|
854
|
-
}, At = (e, t, r) => {
|
|
855
|
-
let a;
|
|
856
|
-
const o = Dt[e];
|
|
857
|
-
return typeof o == "string" ? a = o : t === 1 ? a = o.one : a = o.other.replace("{{count}}", t.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + a : a + " ago" : a;
|
|
858
|
-
};
|
|
859
|
-
function z(e) {
|
|
860
|
-
return (t = {}) => {
|
|
861
|
-
const r = t.width ? String(t.width) : e.defaultWidth;
|
|
862
|
-
return e.formats[r] || e.formats[e.defaultWidth];
|
|
863
|
-
};
|
|
864
|
-
}
|
|
865
|
-
const Ot = {
|
|
866
|
-
full: "EEEE, MMMM do, y",
|
|
867
|
-
long: "MMMM do, y",
|
|
868
|
-
medium: "MMM d, y",
|
|
869
|
-
short: "MM/dd/yyyy"
|
|
870
|
-
}, It = {
|
|
871
|
-
full: "h:mm:ss a zzzz",
|
|
872
|
-
long: "h:mm:ss a z",
|
|
873
|
-
medium: "h:mm:ss a",
|
|
874
|
-
short: "h:mm a"
|
|
875
|
-
}, Ft = {
|
|
876
|
-
full: "{{date}} 'at' {{time}}",
|
|
877
|
-
long: "{{date}} 'at' {{time}}",
|
|
878
|
-
medium: "{{date}}, {{time}}",
|
|
879
|
-
short: "{{date}}, {{time}}"
|
|
880
|
-
}, Wt = {
|
|
881
|
-
date: z({
|
|
882
|
-
formats: Ot,
|
|
883
|
-
defaultWidth: "full"
|
|
884
|
-
}),
|
|
885
|
-
time: z({
|
|
886
|
-
formats: It,
|
|
887
|
-
defaultWidth: "full"
|
|
888
|
-
}),
|
|
889
|
-
dateTime: z({
|
|
890
|
-
formats: Ft,
|
|
891
|
-
defaultWidth: "full"
|
|
892
|
-
})
|
|
893
|
-
}, $t = {
|
|
894
|
-
lastWeek: "'last' eeee 'at' p",
|
|
895
|
-
yesterday: "'yesterday at' p",
|
|
896
|
-
today: "'today at' p",
|
|
897
|
-
tomorrow: "'tomorrow at' p",
|
|
898
|
-
nextWeek: "eeee 'at' p",
|
|
899
|
-
other: "P"
|
|
900
|
-
}, Lt = (e, t, r, a) => $t[e];
|
|
901
|
-
function P(e) {
|
|
902
|
-
return (t, r) => {
|
|
903
|
-
const a = r?.context ? String(r.context) : "standalone";
|
|
904
|
-
let o;
|
|
905
|
-
if (a === "formatting" && e.formattingValues) {
|
|
906
|
-
const l = e.defaultFormattingWidth || e.defaultWidth, i = r?.width ? String(r.width) : l;
|
|
907
|
-
o = e.formattingValues[i] || e.formattingValues[l];
|
|
908
|
-
} else {
|
|
909
|
-
const l = e.defaultWidth, i = r?.width ? String(r.width) : e.defaultWidth;
|
|
910
|
-
o = e.values[i] || e.values[l];
|
|
911
|
-
}
|
|
912
|
-
const c = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
913
|
-
return o[c];
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
const Yt = {
|
|
917
|
-
narrow: ["B", "A"],
|
|
918
|
-
abbreviated: ["BC", "AD"],
|
|
919
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
920
|
-
}, Vt = {
|
|
921
|
-
narrow: ["1", "2", "3", "4"],
|
|
922
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
923
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
924
|
-
}, zt = {
|
|
925
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
926
|
-
abbreviated: [
|
|
927
|
-
"Jan",
|
|
928
|
-
"Feb",
|
|
929
|
-
"Mar",
|
|
930
|
-
"Apr",
|
|
931
|
-
"May",
|
|
932
|
-
"Jun",
|
|
933
|
-
"Jul",
|
|
934
|
-
"Aug",
|
|
935
|
-
"Sep",
|
|
936
|
-
"Oct",
|
|
937
|
-
"Nov",
|
|
938
|
-
"Dec"
|
|
939
|
-
],
|
|
940
|
-
wide: [
|
|
941
|
-
"January",
|
|
942
|
-
"February",
|
|
943
|
-
"March",
|
|
944
|
-
"April",
|
|
945
|
-
"May",
|
|
946
|
-
"June",
|
|
947
|
-
"July",
|
|
948
|
-
"August",
|
|
949
|
-
"September",
|
|
950
|
-
"October",
|
|
951
|
-
"November",
|
|
952
|
-
"December"
|
|
953
|
-
]
|
|
954
|
-
}, Xt = {
|
|
955
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
956
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
957
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
958
|
-
wide: [
|
|
959
|
-
"Sunday",
|
|
960
|
-
"Monday",
|
|
961
|
-
"Tuesday",
|
|
962
|
-
"Wednesday",
|
|
963
|
-
"Thursday",
|
|
964
|
-
"Friday",
|
|
965
|
-
"Saturday"
|
|
966
|
-
]
|
|
967
|
-
}, qt = {
|
|
968
|
-
narrow: {
|
|
969
|
-
am: "a",
|
|
970
|
-
pm: "p",
|
|
971
|
-
midnight: "mi",
|
|
972
|
-
noon: "n",
|
|
973
|
-
morning: "morning",
|
|
974
|
-
afternoon: "afternoon",
|
|
975
|
-
evening: "evening",
|
|
976
|
-
night: "night"
|
|
977
|
-
},
|
|
978
|
-
abbreviated: {
|
|
979
|
-
am: "AM",
|
|
980
|
-
pm: "PM",
|
|
981
|
-
midnight: "midnight",
|
|
982
|
-
noon: "noon",
|
|
983
|
-
morning: "morning",
|
|
984
|
-
afternoon: "afternoon",
|
|
985
|
-
evening: "evening",
|
|
986
|
-
night: "night"
|
|
987
|
-
},
|
|
988
|
-
wide: {
|
|
989
|
-
am: "a.m.",
|
|
990
|
-
pm: "p.m.",
|
|
991
|
-
midnight: "midnight",
|
|
992
|
-
noon: "noon",
|
|
993
|
-
morning: "morning",
|
|
994
|
-
afternoon: "afternoon",
|
|
995
|
-
evening: "evening",
|
|
996
|
-
night: "night"
|
|
997
|
-
}
|
|
998
|
-
}, Gt = {
|
|
999
|
-
narrow: {
|
|
1000
|
-
am: "a",
|
|
1001
|
-
pm: "p",
|
|
1002
|
-
midnight: "mi",
|
|
1003
|
-
noon: "n",
|
|
1004
|
-
morning: "in the morning",
|
|
1005
|
-
afternoon: "in the afternoon",
|
|
1006
|
-
evening: "in the evening",
|
|
1007
|
-
night: "at night"
|
|
1008
|
-
},
|
|
1009
|
-
abbreviated: {
|
|
1010
|
-
am: "AM",
|
|
1011
|
-
pm: "PM",
|
|
1012
|
-
midnight: "midnight",
|
|
1013
|
-
noon: "noon",
|
|
1014
|
-
morning: "in the morning",
|
|
1015
|
-
afternoon: "in the afternoon",
|
|
1016
|
-
evening: "in the evening",
|
|
1017
|
-
night: "at night"
|
|
1018
|
-
},
|
|
1019
|
-
wide: {
|
|
1020
|
-
am: "a.m.",
|
|
1021
|
-
pm: "p.m.",
|
|
1022
|
-
midnight: "midnight",
|
|
1023
|
-
noon: "noon",
|
|
1024
|
-
morning: "in the morning",
|
|
1025
|
-
afternoon: "in the afternoon",
|
|
1026
|
-
evening: "in the evening",
|
|
1027
|
-
night: "at night"
|
|
1028
|
-
}
|
|
1029
|
-
}, Jt = (e, t) => {
|
|
1030
|
-
const r = Number(e), a = r % 100;
|
|
1031
|
-
if (a > 20 || a < 10)
|
|
1032
|
-
switch (a % 10) {
|
|
1033
|
-
case 1:
|
|
1034
|
-
return r + "st";
|
|
1035
|
-
case 2:
|
|
1036
|
-
return r + "nd";
|
|
1037
|
-
case 3:
|
|
1038
|
-
return r + "rd";
|
|
1039
|
-
}
|
|
1040
|
-
return r + "th";
|
|
1041
|
-
}, Ut = {
|
|
1042
|
-
ordinalNumber: Jt,
|
|
1043
|
-
era: P({
|
|
1044
|
-
values: Yt,
|
|
1045
|
-
defaultWidth: "wide"
|
|
1046
|
-
}),
|
|
1047
|
-
quarter: P({
|
|
1048
|
-
values: Vt,
|
|
1049
|
-
defaultWidth: "wide",
|
|
1050
|
-
argumentCallback: (e) => e - 1
|
|
1051
|
-
}),
|
|
1052
|
-
month: P({
|
|
1053
|
-
values: zt,
|
|
1054
|
-
defaultWidth: "wide"
|
|
1055
|
-
}),
|
|
1056
|
-
day: P({
|
|
1057
|
-
values: Xt,
|
|
1058
|
-
defaultWidth: "wide"
|
|
1059
|
-
}),
|
|
1060
|
-
dayPeriod: P({
|
|
1061
|
-
values: qt,
|
|
1062
|
-
defaultWidth: "wide",
|
|
1063
|
-
formattingValues: Gt,
|
|
1064
|
-
defaultFormattingWidth: "wide"
|
|
1065
|
-
})
|
|
1066
|
-
};
|
|
1067
|
-
function R(e) {
|
|
1068
|
-
return (t, r = {}) => {
|
|
1069
|
-
const a = r.width, o = a && e.matchPatterns[a] || e.matchPatterns[e.defaultMatchWidth], c = t.match(o);
|
|
1070
|
-
if (!c)
|
|
1071
|
-
return null;
|
|
1072
|
-
const l = c[0], i = a && e.parsePatterns[a] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(i) ? Ht(i, (v) => v.test(l)) : (
|
|
1073
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
1074
|
-
Bt(i, (v) => v.test(l))
|
|
1075
|
-
);
|
|
1076
|
-
let m;
|
|
1077
|
-
m = e.valueCallback ? e.valueCallback(u) : u, m = r.valueCallback ? (
|
|
1078
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
1079
|
-
r.valueCallback(m)
|
|
1080
|
-
) : m;
|
|
1081
|
-
const x = t.slice(l.length);
|
|
1082
|
-
return { value: m, rest: x };
|
|
1083
|
-
};
|
|
1084
|
-
}
|
|
1085
|
-
function Bt(e, t) {
|
|
1086
|
-
for (const r in e)
|
|
1087
|
-
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
1088
|
-
return r;
|
|
1089
|
-
}
|
|
1090
|
-
function Ht(e, t) {
|
|
1091
|
-
for (let r = 0; r < e.length; r++)
|
|
1092
|
-
if (t(e[r]))
|
|
1093
|
-
return r;
|
|
1094
|
-
}
|
|
1095
|
-
function Qt(e) {
|
|
1096
|
-
return (t, r = {}) => {
|
|
1097
|
-
const a = t.match(e.matchPattern);
|
|
1098
|
-
if (!a) return null;
|
|
1099
|
-
const o = a[0], c = t.match(e.parsePattern);
|
|
1100
|
-
if (!c) return null;
|
|
1101
|
-
let l = e.valueCallback ? e.valueCallback(c[0]) : c[0];
|
|
1102
|
-
l = r.valueCallback ? r.valueCallback(l) : l;
|
|
1103
|
-
const i = t.slice(o.length);
|
|
1104
|
-
return { value: l, rest: i };
|
|
1105
|
-
};
|
|
1106
|
-
}
|
|
1107
|
-
const Zt = /^(\d+)(th|st|nd|rd)?/i, Kt = /\d+/i, en = {
|
|
1108
|
-
narrow: /^(b|a)/i,
|
|
1109
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1110
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1111
|
-
}, tn = {
|
|
1112
|
-
any: [/^b/i, /^(a|c)/i]
|
|
1113
|
-
}, nn = {
|
|
1114
|
-
narrow: /^[1234]/i,
|
|
1115
|
-
abbreviated: /^q[1234]/i,
|
|
1116
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1117
|
-
}, rn = {
|
|
1118
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1119
|
-
}, an = {
|
|
1120
|
-
narrow: /^[jfmasond]/i,
|
|
1121
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1122
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1123
|
-
}, sn = {
|
|
1124
|
-
narrow: [
|
|
1125
|
-
/^j/i,
|
|
1126
|
-
/^f/i,
|
|
1127
|
-
/^m/i,
|
|
1128
|
-
/^a/i,
|
|
1129
|
-
/^m/i,
|
|
1130
|
-
/^j/i,
|
|
1131
|
-
/^j/i,
|
|
1132
|
-
/^a/i,
|
|
1133
|
-
/^s/i,
|
|
1134
|
-
/^o/i,
|
|
1135
|
-
/^n/i,
|
|
1136
|
-
/^d/i
|
|
1137
|
-
],
|
|
1138
|
-
any: [
|
|
1139
|
-
/^ja/i,
|
|
1140
|
-
/^f/i,
|
|
1141
|
-
/^mar/i,
|
|
1142
|
-
/^ap/i,
|
|
1143
|
-
/^may/i,
|
|
1144
|
-
/^jun/i,
|
|
1145
|
-
/^jul/i,
|
|
1146
|
-
/^au/i,
|
|
1147
|
-
/^s/i,
|
|
1148
|
-
/^o/i,
|
|
1149
|
-
/^n/i,
|
|
1150
|
-
/^d/i
|
|
1151
|
-
]
|
|
1152
|
-
}, on = {
|
|
1153
|
-
narrow: /^[smtwf]/i,
|
|
1154
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1155
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1156
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1157
|
-
}, cn = {
|
|
1158
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1159
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1160
|
-
}, ln = {
|
|
1161
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1162
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1163
|
-
}, dn = {
|
|
1164
|
-
any: {
|
|
1165
|
-
am: /^a/i,
|
|
1166
|
-
pm: /^p/i,
|
|
1167
|
-
midnight: /^mi/i,
|
|
1168
|
-
noon: /^no/i,
|
|
1169
|
-
morning: /morning/i,
|
|
1170
|
-
afternoon: /afternoon/i,
|
|
1171
|
-
evening: /evening/i,
|
|
1172
|
-
night: /night/i
|
|
1173
|
-
}
|
|
1174
|
-
}, un = {
|
|
1175
|
-
ordinalNumber: Qt({
|
|
1176
|
-
matchPattern: Zt,
|
|
1177
|
-
parsePattern: Kt,
|
|
1178
|
-
valueCallback: (e) => parseInt(e, 10)
|
|
1179
|
-
}),
|
|
1180
|
-
era: R({
|
|
1181
|
-
matchPatterns: en,
|
|
1182
|
-
defaultMatchWidth: "wide",
|
|
1183
|
-
parsePatterns: tn,
|
|
1184
|
-
defaultParseWidth: "any"
|
|
1185
|
-
}),
|
|
1186
|
-
quarter: R({
|
|
1187
|
-
matchPatterns: nn,
|
|
1188
|
-
defaultMatchWidth: "wide",
|
|
1189
|
-
parsePatterns: rn,
|
|
1190
|
-
defaultParseWidth: "any",
|
|
1191
|
-
valueCallback: (e) => e + 1
|
|
1192
|
-
}),
|
|
1193
|
-
month: R({
|
|
1194
|
-
matchPatterns: an,
|
|
1195
|
-
defaultMatchWidth: "wide",
|
|
1196
|
-
parsePatterns: sn,
|
|
1197
|
-
defaultParseWidth: "any"
|
|
1198
|
-
}),
|
|
1199
|
-
day: R({
|
|
1200
|
-
matchPatterns: on,
|
|
1201
|
-
defaultMatchWidth: "wide",
|
|
1202
|
-
parsePatterns: cn,
|
|
1203
|
-
defaultParseWidth: "any"
|
|
1204
|
-
}),
|
|
1205
|
-
dayPeriod: R({
|
|
1206
|
-
matchPatterns: ln,
|
|
1207
|
-
defaultMatchWidth: "any",
|
|
1208
|
-
parsePatterns: dn,
|
|
1209
|
-
defaultParseWidth: "any"
|
|
1210
|
-
})
|
|
1211
|
-
}, mn = {
|
|
1212
|
-
code: "en-US",
|
|
1213
|
-
formatDistance: At,
|
|
1214
|
-
formatLong: Wt,
|
|
1215
|
-
formatRelative: Lt,
|
|
1216
|
-
localize: Ut,
|
|
1217
|
-
match: un,
|
|
1218
|
-
options: {
|
|
1219
|
-
weekStartsOn: 0,
|
|
1220
|
-
firstWeekContainsDate: 1
|
|
1221
|
-
}
|
|
1222
|
-
};
|
|
1223
|
-
function fn(e, t, r) {
|
|
1224
|
-
const a = Nt(), o = r?.locale ?? a.locale ?? mn, c = 2520, l = I(e, t);
|
|
1225
|
-
if (isNaN(l))
|
|
1226
|
-
throw new RangeError("Invalid time value");
|
|
1227
|
-
const i = Object.assign({}, r, {
|
|
1228
|
-
addSuffix: r?.addSuffix,
|
|
1229
|
-
comparison: l
|
|
1230
|
-
});
|
|
1231
|
-
let u, m;
|
|
1232
|
-
l > 0 ? (u = p(t), m = p(e)) : (u = p(e), m = p(t));
|
|
1233
|
-
const x = Ct(m, u), v = (le(m) - le(u)) / 1e3, h = Math.round((x - v) / 60);
|
|
1234
|
-
let y;
|
|
1235
|
-
if (h < 2)
|
|
1236
|
-
return h === 0 ? o.formatDistance("lessThanXMinutes", 1, i) : o.formatDistance("xMinutes", h, i);
|
|
1237
|
-
if (h < 45)
|
|
1238
|
-
return o.formatDistance("xMinutes", h, i);
|
|
1239
|
-
if (h < 90)
|
|
1240
|
-
return o.formatDistance("aboutXHours", 1, i);
|
|
1241
|
-
if (h < ce) {
|
|
1242
|
-
const j = Math.round(h / 60);
|
|
1243
|
-
return o.formatDistance("aboutXHours", j, i);
|
|
1244
|
-
} else {
|
|
1245
|
-
if (h < c)
|
|
1246
|
-
return o.formatDistance("xDays", 1, i);
|
|
1247
|
-
if (h < O) {
|
|
1248
|
-
const j = Math.round(h / ce);
|
|
1249
|
-
return o.formatDistance("xDays", j, i);
|
|
1250
|
-
} else if (h < O * 2)
|
|
1251
|
-
return y = Math.round(h / O), o.formatDistance("aboutXMonths", y, i);
|
|
1252
|
-
}
|
|
1253
|
-
if (y = Rt(m, u), y < 12) {
|
|
1254
|
-
const j = Math.round(h / O);
|
|
1255
|
-
return o.formatDistance("xMonths", j, i);
|
|
1256
|
-
} else {
|
|
1257
|
-
const j = y % 12, M = Math.trunc(y / 12);
|
|
1258
|
-
return j < 3 ? o.formatDistance("aboutXYears", M, i) : j < 9 ? o.formatDistance("overXYears", M, i) : o.formatDistance("almostXYears", M + 1, i);
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
function hn(e, t) {
|
|
1262
|
-
return fn(e, Tt(e), t);
|
|
1263
|
-
}
|
|
1264
|
-
const xn = ({ status: e, duration: t }) => {
|
|
1265
|
-
const r = J(() => e === "running" ? "info" : e === "completed" ? "success" : e === "failed" ? "error" : "default", [e]);
|
|
1266
|
-
return /* @__PURE__ */ n.jsx(fe, { variant: r, children: t && e !== "failed" ? t : e });
|
|
1267
|
-
}, pn = D(({ groups: e, selectedGroupId: t, onGroupSelect: r }) => /* @__PURE__ */ n.jsx("div", { className: "overflow-auto", children: e.length > 0 && /* @__PURE__ */ n.jsx("div", { children: [...e].reverse().map((a) => /* @__PURE__ */ n.jsx(
|
|
484
|
+
}), We = ({ status: r, duration: s }) => {
|
|
485
|
+
const l = F(() => r === "running" ? "info" : r === "completed" ? "success" : r === "failed" ? "error" : "default", [r]);
|
|
486
|
+
return /* @__PURE__ */ e.jsx(Q, { variant: l, children: s && r !== "failed" ? s : r });
|
|
487
|
+
}, Ue = N(({ groups: r, selectedGroupId: s, onGroupSelect: l }) => /* @__PURE__ */ e.jsx("div", { className: "overflow-auto", children: r.length > 0 && /* @__PURE__ */ e.jsx("div", { children: [...r].reverse().map((a) => /* @__PURE__ */ e.jsx(
|
|
1268
488
|
"div",
|
|
1269
489
|
{
|
|
1270
490
|
"data-testid": `trace-${a.id}`,
|
|
1271
|
-
className:
|
|
491
|
+
className: D(
|
|
1272
492
|
"motia-trace-group cursor-pointer transition-colors",
|
|
1273
|
-
|
|
493
|
+
s === a.id ? "bg-muted-foreground/10" : "hover:bg-muted/70"
|
|
1274
494
|
),
|
|
1275
|
-
onClick: () =>
|
|
1276
|
-
children: /* @__PURE__ */
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
|
|
495
|
+
onClick: () => l(a),
|
|
496
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "p-3 flex flex-col gap-1", children: [
|
|
497
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
498
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-lg", children: a.name }),
|
|
499
|
+
/* @__PURE__ */ e.jsx(
|
|
500
|
+
We,
|
|
1281
501
|
{
|
|
1282
502
|
status: a.status,
|
|
1283
|
-
duration: a.endTime ?
|
|
503
|
+
duration: a.endTime ? b(a.endTime - a.startTime) : void 0
|
|
1284
504
|
}
|
|
1285
505
|
)
|
|
1286
506
|
] }),
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ e.jsxs("div", { className: "text-xs text-muted-foreground space-y-1", children: [
|
|
508
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
|
|
509
|
+
/* @__PURE__ */ e.jsx("div", { "data-testid": "trace-id", className: "text-xs text-muted-foreground font-mono tracking-[1px]", children: a.id }),
|
|
510
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
1291
511
|
a.metadata.totalSteps,
|
|
1292
512
|
" steps"
|
|
1293
513
|
] })
|
|
1294
514
|
] }),
|
|
1295
|
-
/* @__PURE__ */
|
|
1296
|
-
|
|
515
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
|
|
516
|
+
Se(a.startTime),
|
|
1297
517
|
" ago"
|
|
1298
518
|
] }),
|
|
1299
|
-
a.metadata.activeSteps > 0 && /* @__PURE__ */
|
|
519
|
+
a.metadata.activeSteps > 0 && /* @__PURE__ */ e.jsxs("div", { className: "text-blue-600", children: [
|
|
1300
520
|
a.metadata.activeSteps,
|
|
1301
521
|
" active"
|
|
1302
522
|
] })
|
|
@@ -1304,65 +524,65 @@ const xn = ({ status: e, duration: t }) => {
|
|
|
1304
524
|
] })
|
|
1305
525
|
},
|
|
1306
526
|
a.id
|
|
1307
|
-
)) }) })),
|
|
1308
|
-
const
|
|
1309
|
-
() =>
|
|
1310
|
-
(
|
|
527
|
+
)) }) })), Qe = () => {
|
|
528
|
+
const r = _((i) => i.selectedTraceGroupId), s = _((i) => i.selectTraceGroupId), { data: l } = H({ streamName: "motia-trace-group", groupId: "default" }), a = (i) => s(i.id), [o, u] = C(""), x = () => fetch("/__motia/trace/clear", { method: "POST" }), d = F(
|
|
529
|
+
() => l?.filter(
|
|
530
|
+
(i) => i.name.toLowerCase().includes(o.toLowerCase()) || i.id.toLowerCase().includes(o.toLowerCase())
|
|
1311
531
|
),
|
|
1312
|
-
[
|
|
532
|
+
[l, o]
|
|
1313
533
|
);
|
|
1314
|
-
return
|
|
1315
|
-
if (
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1318
|
-
} else
|
|
1319
|
-
}, [
|
|
1320
|
-
/* @__PURE__ */
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
|
|
534
|
+
return Z(() => {
|
|
535
|
+
if (d && d.length > 0) {
|
|
536
|
+
const i = d[d.length - 1];
|
|
537
|
+
i && i.status === "running" && i.id !== r && s(i.id);
|
|
538
|
+
} else r && s(void 0);
|
|
539
|
+
}, [d]), /* @__PURE__ */ e.jsxs("div", { className: "grid grid-rows-[auto_1fr] h-full", children: [
|
|
540
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex p-2 border-b gap-2", "data-testid": "logs-search-container", children: [
|
|
541
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 relative", children: [
|
|
542
|
+
/* @__PURE__ */ e.jsx(
|
|
543
|
+
be,
|
|
1324
544
|
{
|
|
1325
545
|
variant: "shade",
|
|
1326
546
|
value: o,
|
|
1327
|
-
onChange: (
|
|
547
|
+
onChange: (i) => u(i.target.value),
|
|
1328
548
|
className: "px-9 font-medium",
|
|
1329
549
|
placeholder: "Search by Trace ID or Step Name"
|
|
1330
550
|
}
|
|
1331
551
|
),
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */
|
|
1334
|
-
|
|
552
|
+
/* @__PURE__ */ e.jsx(_e, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
|
|
553
|
+
/* @__PURE__ */ e.jsx(
|
|
554
|
+
K,
|
|
1335
555
|
{
|
|
1336
|
-
className:
|
|
556
|
+
className: D(
|
|
1337
557
|
"cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",
|
|
1338
558
|
{
|
|
1339
559
|
visible: o !== "",
|
|
1340
560
|
invisible: o === ""
|
|
1341
561
|
}
|
|
1342
562
|
),
|
|
1343
|
-
onClick: () =>
|
|
563
|
+
onClick: () => u("")
|
|
1344
564
|
}
|
|
1345
565
|
)
|
|
1346
566
|
] }),
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ e.jsxs(P, { variant: "default", onClick: x, className: "h-[34px]", children: [
|
|
568
|
+
/* @__PURE__ */ e.jsx(ke, {}),
|
|
1349
569
|
" Clear"
|
|
1350
570
|
] })
|
|
1351
571
|
] }),
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
/* @__PURE__ */
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
|
|
1356
|
-
!
|
|
572
|
+
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[300px_1fr] overflow-hidden", children: [
|
|
573
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-[300px] border-r border-border overflow-auto h-full", "data-testid": "traces-container", children: /* @__PURE__ */ e.jsx(Ue, { groups: d, selectedGroupId: r, onGroupSelect: a }) }),
|
|
574
|
+
/* @__PURE__ */ e.jsxs("div", { className: "overflow-auto", "data-testid": "trace-details", children: [
|
|
575
|
+
r && /* @__PURE__ */ e.jsx(ze, { groupId: r }),
|
|
576
|
+
!r && /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center h-full text-muted-foreground", children: "Select a trace or trace group to view the timeline" })
|
|
1357
577
|
] })
|
|
1358
578
|
] })
|
|
1359
579
|
] });
|
|
1360
|
-
},
|
|
1361
|
-
/* @__PURE__ */
|
|
1362
|
-
/* @__PURE__ */
|
|
580
|
+
}, Be = N(() => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
581
|
+
/* @__PURE__ */ e.jsx(Re, { "aria-hidden": "true" }),
|
|
582
|
+
/* @__PURE__ */ e.jsx("span", { children: "Tracing" })
|
|
1363
583
|
] }));
|
|
1364
|
-
|
|
584
|
+
Be.displayName = "ObservabilityTabLabel";
|
|
1365
585
|
export {
|
|
1366
|
-
|
|
1367
|
-
|
|
586
|
+
Qe as ObservabilityPage,
|
|
587
|
+
Be as ObservabilityTabLabel
|
|
1368
588
|
};
|