teodor-new-chat-ui 3.0.147 → 3.0.148
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.esm.js +325 -325
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -133,18 +133,18 @@ function gm() {
|
|
|
133
133
|
}
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
|
-
var _ = Object.assign, Y = 0, U, oe, O,
|
|
137
|
-
function
|
|
136
|
+
var _ = Object.assign, Y = 0, U, oe, O, L, K, W, ee;
|
|
137
|
+
function M() {
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
M.__reactDisabledLog = !0;
|
|
140
140
|
function Z() {
|
|
141
141
|
{
|
|
142
142
|
if (Y === 0) {
|
|
143
|
-
U = console.log, oe = console.info, O = console.warn,
|
|
143
|
+
U = console.log, oe = console.info, O = console.warn, L = console.error, K = console.group, W = console.groupCollapsed, ee = console.groupEnd;
|
|
144
144
|
var T = {
|
|
145
145
|
configurable: !0,
|
|
146
146
|
enumerable: !0,
|
|
147
|
-
value:
|
|
147
|
+
value: M,
|
|
148
148
|
writable: !0
|
|
149
149
|
};
|
|
150
150
|
Object.defineProperties(console, {
|
|
@@ -179,7 +179,7 @@ function gm() {
|
|
|
179
179
|
value: O
|
|
180
180
|
}),
|
|
181
181
|
error: _({}, T, {
|
|
182
|
-
value:
|
|
182
|
+
value: L
|
|
183
183
|
}),
|
|
184
184
|
group: _({}, T, {
|
|
185
185
|
value: K
|
|
@@ -1879,11 +1879,11 @@ const Vl = (e) => {
|
|
|
1879
1879
|
duplex: "half"
|
|
1880
1880
|
}), ee;
|
|
1881
1881
|
if (k.isFormData(g) && (ee = W.headers.get("content-type")) && N.setContentType(ee), W.body) {
|
|
1882
|
-
const [
|
|
1882
|
+
const [M, Z] = sc(
|
|
1883
1883
|
Y,
|
|
1884
1884
|
Mo(ic(C))
|
|
1885
1885
|
);
|
|
1886
|
-
g = cc(W.body, lc,
|
|
1886
|
+
g = cc(W.body, lc, M, Z);
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
1889
|
k.isString(I) || (I = I ? "include" : "omit");
|
|
@@ -1898,18 +1898,18 @@ const Vl = (e) => {
|
|
|
1898
1898
|
};
|
|
1899
1899
|
G = s && new n(v, oe);
|
|
1900
1900
|
let O = await (s ? P(G, j) : P(v, oe));
|
|
1901
|
-
const
|
|
1902
|
-
if (d && (S ||
|
|
1901
|
+
const L = d && (E === "stream" || E === "response");
|
|
1902
|
+
if (d && (S || L && _)) {
|
|
1903
1903
|
const W = {};
|
|
1904
1904
|
["status", "statusText", "headers"].forEach((pe) => {
|
|
1905
1905
|
W[pe] = O[pe];
|
|
1906
1906
|
});
|
|
1907
|
-
const ee = k.toFiniteNumber(O.headers.get("content-length")), [
|
|
1907
|
+
const ee = k.toFiniteNumber(O.headers.get("content-length")), [M, Z] = S && sc(
|
|
1908
1908
|
ee,
|
|
1909
1909
|
Mo(ic(S), !0)
|
|
1910
1910
|
) || [];
|
|
1911
1911
|
O = new r(
|
|
1912
|
-
cc(O.body, lc,
|
|
1912
|
+
cc(O.body, lc, M, () => {
|
|
1913
1913
|
Z && Z(), _ && _();
|
|
1914
1914
|
}),
|
|
1915
1915
|
W
|
|
@@ -1917,7 +1917,7 @@ const Vl = (e) => {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
E = E || "text";
|
|
1919
1919
|
let K = await h[k.findKey(h, E) || "text"](O, x);
|
|
1920
|
-
return !
|
|
1920
|
+
return !L && _ && _(), await new Promise((W, ee) => {
|
|
1921
1921
|
Ul(W, ee, {
|
|
1922
1922
|
data: K,
|
|
1923
1923
|
headers: yt.from(O.headers),
|
|
@@ -2531,7 +2531,7 @@ function Jg(e = {}) {
|
|
|
2531
2531
|
b.current && (b.current.abort(), b.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
|
|
2532
2532
|
const P = new AbortController();
|
|
2533
2533
|
return b.current = P, (async () => {
|
|
2534
|
-
var _, Y, U, oe, O,
|
|
2534
|
+
var _, Y, U, oe, O, L;
|
|
2535
2535
|
const B = (() => {
|
|
2536
2536
|
var K;
|
|
2537
2537
|
try {
|
|
@@ -2543,9 +2543,9 @@ function Jg(e = {}) {
|
|
|
2543
2543
|
var W;
|
|
2544
2544
|
try {
|
|
2545
2545
|
const ee = JSON.parse(JSON.stringify(K));
|
|
2546
|
-
return (W = ee == null ? void 0 : ee.payload) != null && W.files_info && Array.isArray(ee.payload.files_info) && (ee.payload.files_info = ee.payload.files_info.map((
|
|
2547
|
-
...
|
|
2548
|
-
data:
|
|
2546
|
+
return (W = ee == null ? void 0 : ee.payload) != null && W.files_info && Array.isArray(ee.payload.files_info) && (ee.payload.files_info = ee.payload.files_info.map((M) => ({
|
|
2547
|
+
...M,
|
|
2548
|
+
data: M != null && M.data ? `<base64 ${String(M.data).length} chars>` : M == null ? void 0 : M.data
|
|
2549
2549
|
}))), ee;
|
|
2550
2550
|
} catch {
|
|
2551
2551
|
return K;
|
|
@@ -2586,15 +2586,15 @@ function Jg(e = {}) {
|
|
|
2586
2586
|
throw B && console.debug("[use-chat] non-OK response", W.status, pe == null ? void 0 : pe.slice(0, 500)), new Error(`stream ${W.status}${pe ? ": " + pe : ""}`);
|
|
2587
2587
|
}
|
|
2588
2588
|
g(!0);
|
|
2589
|
-
let ee = null,
|
|
2589
|
+
let ee = null, M = null, Z = null;
|
|
2590
2590
|
try {
|
|
2591
2591
|
const pe = W.headers.get("X-Thread-Id") || W.headers.get("x-thread-id"), he = W.headers.get("X-Thread-Created") || W.headers.get("x-thread-created"), F = pe ?? null, A = String(he ?? "").toLowerCase() === "true";
|
|
2592
|
-
(oe = j == null ? void 0 : j.onOpen) == null || oe.call(j, { threadId: F, created: A }), ee = W.body.getReader(),
|
|
2592
|
+
(oe = j == null ? void 0 : j.onOpen) == null || oe.call(j, { threadId: F, created: A }), ee = W.body.getReader(), M = new TextDecoder();
|
|
2593
2593
|
let H = "", J = "", ce = y.current;
|
|
2594
2594
|
for (; ; ) {
|
|
2595
2595
|
const { value: se, done: Ae } = await ee.read();
|
|
2596
2596
|
if (Ae) break;
|
|
2597
|
-
H +=
|
|
2597
|
+
H += M.decode(se, { stream: !0 });
|
|
2598
2598
|
let _e;
|
|
2599
2599
|
for (; (_e = H.indexOf(`
|
|
2600
2600
|
|
|
@@ -2645,7 +2645,7 @@ function Jg(e = {}) {
|
|
|
2645
2645
|
} catch (K) {
|
|
2646
2646
|
if ((K == null ? void 0 : K.name) === "AbortError") return;
|
|
2647
2647
|
const W = (K == null ? void 0 : K.message) || String(K);
|
|
2648
|
-
B && console.debug("[use-chat] connection error:", W), u(W), (
|
|
2648
|
+
B && console.debug("[use-chat] connection error:", W), u(W), (L = j == null ? void 0 : j.onError) == null || L.call(j, W);
|
|
2649
2649
|
} finally {
|
|
2650
2650
|
a(!1), g(!1), b.current = null;
|
|
2651
2651
|
}
|
|
@@ -2961,9 +2961,9 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2961
2961
|
}, [l, w]);
|
|
2962
2962
|
const p = Ue((V) => {
|
|
2963
2963
|
l.setAuthToken(V);
|
|
2964
|
-
}, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O,
|
|
2964
|
+
}, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O, L] = ue(!1), K = We(!1), W = We([]), ee = Ue((V) => {
|
|
2965
2965
|
V.cursor !== void 0 && G(V.cursor), V.hasMore !== void 0 && I(V.hasMore), V.checkpointId !== void 0 && Y(V.checkpointId), V.checkpointNs !== void 0 && oe(V.checkpointNs);
|
|
2966
|
-
}, []),
|
|
2966
|
+
}, []), M = Ue((V, ae) => new Promise(($e, rt) => {
|
|
2967
2967
|
const we = async () => {
|
|
2968
2968
|
if (K.current) {
|
|
2969
2969
|
console.warn(`[ChatProvider] Operation "${ae}" queued - another operation in progress`), W.current.push(we);
|
|
@@ -3075,7 +3075,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3075
3075
|
}, [o, s, l.baseUrl, J]);
|
|
3076
3076
|
const _e = We(null), je = We(null), ie = Ue(
|
|
3077
3077
|
async (V, ae, $e) => {
|
|
3078
|
-
await
|
|
3078
|
+
await M(async () => {
|
|
3079
3079
|
if (!l.baseUrl) {
|
|
3080
3080
|
console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
|
|
3081
3081
|
return;
|
|
@@ -3084,22 +3084,20 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3084
3084
|
console.warn(`[ChatProvider] Thread load cancelled - another thread (${_e.current}) is loading`);
|
|
3085
3085
|
return;
|
|
3086
3086
|
}
|
|
3087
|
-
je.current !== null && je.current !== V && console.log(`[ChatProvider] Thread switch detected: ${je.current} -> ${V}`), _e.current = V, je.current = V;
|
|
3087
|
+
je.current !== null && je.current !== V && (console.log(`[ChatProvider] Thread switch detected: ${je.current} -> ${V}`), b([], { checkpointId: null, checkpointNs: null })), _e.current = V, je.current = V;
|
|
3088
3088
|
try {
|
|
3089
3089
|
ee({
|
|
3090
3090
|
cursor: null,
|
|
3091
3091
|
hasMore: !1,
|
|
3092
3092
|
checkpointId: void 0,
|
|
3093
3093
|
checkpointNs: void 0
|
|
3094
|
-
});
|
|
3094
|
+
}), A(V);
|
|
3095
3095
|
const we = await l.getMessages({
|
|
3096
3096
|
threadId: V,
|
|
3097
3097
|
checkpointId: ae,
|
|
3098
3098
|
checkpointNs: $e,
|
|
3099
3099
|
limit: E
|
|
3100
|
-
});
|
|
3101
|
-
A(V);
|
|
3102
|
-
const qe = Array.isArray(we == null ? void 0 : we.messages) ? we.messages : [];
|
|
3100
|
+
}), qe = Array.isArray(we == null ? void 0 : we.messages) ? we.messages : [];
|
|
3103
3101
|
console.log("[ChatProvider] Loading thread with", qe.length, "messages"), b(qe, {
|
|
3104
3102
|
checkpointId: (we == null ? void 0 : we.checkpointId) ?? null,
|
|
3105
3103
|
checkpointNs: (we == null ? void 0 : we.checkpointNs) ?? null
|
|
@@ -3109,12 +3107,12 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3109
3107
|
}
|
|
3110
3108
|
}, `loadThread-${V}`);
|
|
3111
3109
|
},
|
|
3112
|
-
[l,
|
|
3110
|
+
[l, M, ee, b]
|
|
3113
3111
|
), Ne = Ue(async (V) => {
|
|
3114
3112
|
const ae = await l.listCheckpoints(V);
|
|
3115
3113
|
return cv(ae, V);
|
|
3116
3114
|
}, [l]), Ce = Ue(async (V, ae) => {
|
|
3117
|
-
await
|
|
3115
|
+
await M(async () => {
|
|
3118
3116
|
if (!F) throw new Error("No active thread");
|
|
3119
3117
|
ee({
|
|
3120
3118
|
cursor: null,
|
|
@@ -3130,20 +3128,20 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3130
3128
|
});
|
|
3131
3129
|
Z($e, "replace");
|
|
3132
3130
|
}, `navigateToCheckpoint-${V}`);
|
|
3133
|
-
}, [l, F, Z,
|
|
3131
|
+
}, [l, F, Z, M, ee]), fe = Ue(async () => {
|
|
3134
3132
|
if (!F) throw new Error("No active thread");
|
|
3135
3133
|
await ie(F);
|
|
3136
3134
|
}, [F, ie]), Te = We(!1);
|
|
3137
3135
|
Xe(() => {
|
|
3138
3136
|
const V = Te.current;
|
|
3139
|
-
Te.current = u, V && !u && F &&
|
|
3137
|
+
Te.current = u, V && !u && F && M(async () => {
|
|
3140
3138
|
try {
|
|
3141
3139
|
await H();
|
|
3142
3140
|
} catch (ae) {
|
|
3143
3141
|
console.warn("[ChatProvider] Post-streaming thread refresh failed:", ae);
|
|
3144
3142
|
}
|
|
3145
3143
|
}, "postStreamingRefresh");
|
|
3146
|
-
}, [u, F, l, Z, H,
|
|
3144
|
+
}, [u, F, l, Z, H, M]);
|
|
3147
3145
|
const Be = Ue(async (V) => {
|
|
3148
3146
|
const ae = await l.createThread(V);
|
|
3149
3147
|
return await H(), await ie(ae.threadId), ae.threadId;
|
|
@@ -3152,56 +3150,58 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3152
3150
|
}, [l, H, F, C]), et = Ue(async (V, ae) => {
|
|
3153
3151
|
await l.updateThread(V, ae), await H();
|
|
3154
3152
|
}, [l, H]), xt = Ue(async (V, ae) => {
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
...
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3153
|
+
await M(async () => {
|
|
3154
|
+
var fn;
|
|
3155
|
+
const $e = (ae == null ? void 0 : ae.attachments) || [], { contentParts: rt, filesInfo: we } = await uv(
|
|
3156
|
+
l,
|
|
3157
|
+
$e,
|
|
3158
|
+
t == null ? void 0 : t.uploadPath
|
|
3159
|
+
), qe = [];
|
|
3160
|
+
V && V.trim() && qe.push({ type: "text", text: V.trim() });
|
|
3161
|
+
const jt = {
|
|
3162
|
+
id: ((fn = crypto.randomUUID) == null ? void 0 : fn.call(crypto)) || `user-${Date.now()}`,
|
|
3163
|
+
role: "user",
|
|
3164
|
+
content: qe,
|
|
3165
|
+
// ← No empty text parts
|
|
3166
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3167
|
+
checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
|
|
3168
|
+
checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0
|
|
3169
|
+
};
|
|
3170
|
+
R(jt);
|
|
3171
|
+
const En = {
|
|
3172
|
+
...jt,
|
|
3173
|
+
// No need to filter - messageContent already only contains text
|
|
3174
|
+
content: qe
|
|
3175
|
+
// ← Clean content without empty parts
|
|
3176
|
+
}, ut = { ...(ae == null ? void 0 : ae.payloadExtras) ?? {} }, Tt = !!ut.edit, ct = ut.originalMessageId, pt = typeof ct == "string" ? ct : void 0, cn = $e && $e.length > 0, Yt = {
|
|
3177
|
+
...F ? { threadId: F } : {},
|
|
3178
|
+
payload: {
|
|
3179
|
+
messages: [En],
|
|
3180
|
+
// Remove attachments array since we're not including file parts in message content
|
|
3181
|
+
files_info: we,
|
|
3182
|
+
...i && cn && a ? { active_agent: a } : {},
|
|
3183
|
+
...ut
|
|
3184
|
+
},
|
|
3185
|
+
checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
|
|
3186
|
+
checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0,
|
|
3187
|
+
nodeFilter: ae == null ? void 0 : ae.nodeFilter,
|
|
3188
|
+
config: ae == null ? void 0 : ae.config,
|
|
3189
|
+
edit: Tt,
|
|
3190
|
+
originalMessageId: pt
|
|
3191
|
+
};
|
|
3192
|
+
h(
|
|
3193
|
+
Yt,
|
|
3194
|
+
(te) => S(te),
|
|
3195
|
+
{
|
|
3196
|
+
onError: (te) => console.warn("stream error", te),
|
|
3197
|
+
onOpen: ({ threadId: te, created: le }) => {
|
|
3198
|
+
!F && te && (A(te), le && H().catch(() => {
|
|
3199
|
+
}));
|
|
3200
|
+
}
|
|
3201
3201
|
}
|
|
3202
|
-
|
|
3203
|
-
);
|
|
3204
|
-
}, [F, R, h, S, g.lastCheckpointId, g.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, H, A, i, a]), at = Ue(
|
|
3202
|
+
);
|
|
3203
|
+
}, "send");
|
|
3204
|
+
}, [F, R, h, S, g.lastCheckpointId, g.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, H, A, i, a, M]), at = Ue(
|
|
3205
3205
|
async (V) => {
|
|
3206
3206
|
if (!F) throw new Error("No active thread");
|
|
3207
3207
|
if (j || !N) return;
|
|
@@ -3261,7 +3261,7 @@ function Yi() {
|
|
|
3261
3261
|
if (!e) throw new Error("useChat must be used within ChatProvider");
|
|
3262
3262
|
return e;
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3264
|
+
function D(...e) {
|
|
3265
3265
|
return pm(hm(e));
|
|
3266
3266
|
}
|
|
3267
3267
|
const dv = Wr(
|
|
@@ -3294,7 +3294,7 @@ const dv = Wr(
|
|
|
3294
3294
|
return /* @__PURE__ */ c.jsx(
|
|
3295
3295
|
i,
|
|
3296
3296
|
{
|
|
3297
|
-
className:
|
|
3297
|
+
className: D(dv({ variant: t, size: n, className: e })),
|
|
3298
3298
|
ref: s,
|
|
3299
3299
|
...o
|
|
3300
3300
|
}
|
|
@@ -3306,7 +3306,7 @@ const Zl = f.forwardRef(
|
|
|
3306
3306
|
({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
3307
3307
|
"textarea",
|
|
3308
3308
|
{
|
|
3309
|
-
className:
|
|
3309
|
+
className: D(
|
|
3310
3310
|
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3311
3311
|
e
|
|
3312
3312
|
),
|
|
@@ -4459,18 +4459,18 @@ const qr = Me(
|
|
|
4459
4459
|
G,
|
|
4460
4460
|
_
|
|
4461
4461
|
]) => {
|
|
4462
|
-
const Y = hu(R), { align: U, behavior: oe, offset: O } = Y,
|
|
4462
|
+
const Y = hu(R), { align: U, behavior: oe, offset: O } = Y, L = E - 1, K = du(Y, S, L);
|
|
4463
4463
|
let W = Dr(K, S.offsetTree, B) + I;
|
|
4464
|
-
U === "end" ? (W += G + zt(S.sizeTree, K)[1] - C + _, K ===
|
|
4465
|
-
const ee = (
|
|
4466
|
-
y(),
|
|
4464
|
+
U === "end" ? (W += G + zt(S.sizeTree, K)[1] - C + _, K === L && (W += j)) : U === "center" ? W += (G + zt(S.sizeTree, K)[1] - C + _) / 2 : W -= N, O && (W += O);
|
|
4465
|
+
const ee = (M) => {
|
|
4466
|
+
y(), M ? (P("retrying to scroll to", { location: R }, St.DEBUG), Se(w, R)) : (Se(x, !0), P("list did not change, scroll successful", {}, St.DEBUG));
|
|
4467
4467
|
};
|
|
4468
4468
|
if (y(), oe === "smooth") {
|
|
4469
|
-
let
|
|
4469
|
+
let M = !1;
|
|
4470
4470
|
b = Fe(t, (Z) => {
|
|
4471
|
-
|
|
4471
|
+
M = M || Z;
|
|
4472
4472
|
}), p = $t(d, () => {
|
|
4473
|
-
ee(
|
|
4473
|
+
ee(M);
|
|
4474
4474
|
});
|
|
4475
4475
|
} else
|
|
4476
4476
|
p = $t($(t, $v(150)), ee);
|
|
@@ -4889,13 +4889,13 @@ const zn = Me(
|
|
|
4889
4889
|
_,
|
|
4890
4890
|
Y
|
|
4891
4891
|
]) => {
|
|
4892
|
-
const U = I, { offsetTree: oe, sizeTree: O } = U,
|
|
4892
|
+
const U = I, { offsetTree: oe, sizeTree: O } = U, L = Ze(p);
|
|
4893
4893
|
if (N === 0)
|
|
4894
4894
|
return { ...zs, totalCount: N };
|
|
4895
4895
|
if (C === 0 && E === 0)
|
|
4896
|
-
return
|
|
4896
|
+
return L === 0 ? { ...zs, totalCount: N } : mu(L, j, I, G, _, Y || []);
|
|
4897
4897
|
if (ze(O))
|
|
4898
|
-
return
|
|
4898
|
+
return L > 0 ? null : So(
|
|
4899
4899
|
Wv(ta(j, N), U, Y),
|
|
4900
4900
|
[],
|
|
4901
4901
|
N,
|
|
@@ -4918,7 +4918,7 @@ const zn = Me(
|
|
|
4918
4918
|
const W = B.length > 0 ? B[B.length - 1] + 1 : 0, ee = Pv(oe, C, E, W);
|
|
4919
4919
|
if (ee.length === 0)
|
|
4920
4920
|
return null;
|
|
4921
|
-
const
|
|
4921
|
+
const M = N - 1, Z = ss([], (pe) => {
|
|
4922
4922
|
for (const he of ee) {
|
|
4923
4923
|
const F = he.value;
|
|
4924
4924
|
let A = F.offset, H = he.start;
|
|
@@ -4929,7 +4929,7 @@ const zn = Me(
|
|
|
4929
4929
|
A += se * J + se * _;
|
|
4930
4930
|
}
|
|
4931
4931
|
H < W && (A += (W - H) * J, H = W);
|
|
4932
|
-
const ce = Math.min(he.end,
|
|
4932
|
+
const ce = Math.min(he.end, M);
|
|
4933
4933
|
for (let se = H; se <= ce && !(A >= E); se++)
|
|
4934
4934
|
pe.push({ data: Y == null ? void 0 : Y[se], index: se, offset: A, size: J }), A += J + _;
|
|
4935
4935
|
}
|
|
@@ -6096,11 +6096,11 @@ const Ix = /* @__PURE__ */ Me(
|
|
|
6096
6096
|
{ customScrollParent: p, useWindowScroll: g, windowScrollContainerState: b, windowScrollTo: y, windowViewportRect: R },
|
|
6097
6097
|
S
|
|
6098
6098
|
]) => {
|
|
6099
|
-
const C = X(0), E = X(0), N = X(_c), I = X({ height: 0, width: 0 }), j = X({ height: 0, width: 0 }), P = ke(), B = ke(), G = X(0), _ = X(null), Y = X({ column: 0, row: 0 }), U = ke(), oe = ke(), O = X(!1),
|
|
6099
|
+
const C = X(0), E = X(0), N = X(_c), I = X({ height: 0, width: 0 }), j = X({ height: 0, width: 0 }), P = ke(), B = ke(), G = X(0), _ = X(null), Y = X({ column: 0, row: 0 }), U = ke(), oe = ke(), O = X(!1), L = X(0), K = X(!0), W = X(!1), ee = X(!1);
|
|
6100
6100
|
Fe(
|
|
6101
6101
|
$(
|
|
6102
6102
|
x,
|
|
6103
|
-
Re(
|
|
6103
|
+
Re(L),
|
|
6104
6104
|
ge(([A, H]) => !!H)
|
|
6105
6105
|
),
|
|
6106
6106
|
() => {
|
|
@@ -6108,7 +6108,7 @@ const Ix = /* @__PURE__ */ Me(
|
|
|
6108
6108
|
}
|
|
6109
6109
|
), Fe(
|
|
6110
6110
|
$(
|
|
6111
|
-
nt(x, K, j, I,
|
|
6111
|
+
nt(x, K, j, I, L, W),
|
|
6112
6112
|
ge(([A, H, J, ce, , se]) => A && !H && J.height !== 0 && ce.height !== 0 && !se)
|
|
6113
6113
|
),
|
|
6114
6114
|
([, , , , A]) => {
|
|
@@ -6170,7 +6170,7 @@ const Ix = /* @__PURE__ */ Me(
|
|
|
6170
6170
|
me(E),
|
|
6171
6171
|
me(O),
|
|
6172
6172
|
me(K),
|
|
6173
|
-
me(
|
|
6173
|
+
me(L)
|
|
6174
6174
|
),
|
|
6175
6175
|
ge(([, , , , , , , A]) => !A),
|
|
6176
6176
|
re(
|
|
@@ -6221,20 +6221,20 @@ const Ix = /* @__PURE__ */ Me(
|
|
|
6221
6221
|
),
|
|
6222
6222
|
t
|
|
6223
6223
|
);
|
|
6224
|
-
const
|
|
6224
|
+
const M = X(!1);
|
|
6225
6225
|
de(
|
|
6226
6226
|
$(
|
|
6227
6227
|
u,
|
|
6228
|
-
Re(
|
|
6228
|
+
Re(M),
|
|
6229
6229
|
re(([A, H]) => H || A !== 0)
|
|
6230
6230
|
),
|
|
6231
|
-
|
|
6231
|
+
M
|
|
6232
6232
|
);
|
|
6233
6233
|
const Z = Nt(
|
|
6234
6234
|
$(
|
|
6235
6235
|
nt(N, C),
|
|
6236
6236
|
ge(([{ items: A }]) => A.length > 0),
|
|
6237
|
-
Re(
|
|
6237
|
+
Re(M),
|
|
6238
6238
|
ge(([[A, H], J]) => {
|
|
6239
6239
|
const ce = A.items[A.items.length - 1].index === H - 1;
|
|
6240
6240
|
return (J || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === H) && ce;
|
|
@@ -6319,7 +6319,7 @@ const Ix = /* @__PURE__ */ Me(
|
|
|
6319
6319
|
// output
|
|
6320
6320
|
gridState: N,
|
|
6321
6321
|
horizontalDirection: ee,
|
|
6322
|
-
initialTopMostItemIndex:
|
|
6322
|
+
initialTopMostItemIndex: L,
|
|
6323
6323
|
totalListHeight: F,
|
|
6324
6324
|
...m,
|
|
6325
6325
|
endReached: Z,
|
|
@@ -6548,7 +6548,7 @@ const Bx = Wr(
|
|
|
6548
6548
|
}
|
|
6549
6549
|
);
|
|
6550
6550
|
function Pu({ className: e, variant: t, ...n }) {
|
|
6551
|
-
return /* @__PURE__ */ c.jsx("div", { className:
|
|
6551
|
+
return /* @__PURE__ */ c.jsx("div", { className: D(Bx({ variant: t }), e), ...n });
|
|
6552
6552
|
}
|
|
6553
6553
|
function Q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
6554
6554
|
return function(o) {
|
|
@@ -7185,7 +7185,7 @@ function Ks({
|
|
|
7185
7185
|
return v.forEach((R) => y.observe(R)), () => {
|
|
7186
7186
|
g = !0, y.disconnect();
|
|
7187
7187
|
};
|
|
7188
|
-
}, [u]), u ? /* @__PURE__ */ c.jsx("div", { ref: w, className:
|
|
7188
|
+
}, [u]), u ? /* @__PURE__ */ c.jsx("div", { ref: w, className: D("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: u } }) : r && o ? null : /* @__PURE__ */ c.jsx("div", { className: D("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
|
|
7189
7189
|
}
|
|
7190
7190
|
async function Bu(e, t) {
|
|
7191
7191
|
return await Ft(e, {
|
|
@@ -8339,7 +8339,7 @@ const Iw = hd, jw = pd, gd = f.forwardRef(({ className: e, ...t }, n) => /* @__P
|
|
|
8339
8339
|
ms,
|
|
8340
8340
|
{
|
|
8341
8341
|
ref: n,
|
|
8342
|
-
className:
|
|
8342
|
+
className: D(
|
|
8343
8343
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
8344
8344
|
e
|
|
8345
8345
|
),
|
|
@@ -8369,7 +8369,7 @@ const vd = f.forwardRef(({ className: e, children: t, ...n }, r) => {
|
|
|
8369
8369
|
gs,
|
|
8370
8370
|
{
|
|
8371
8371
|
ref: r,
|
|
8372
|
-
className:
|
|
8372
|
+
className: D(
|
|
8373
8373
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
8374
8374
|
e
|
|
8375
8375
|
),
|
|
@@ -8393,7 +8393,7 @@ const xd = ({
|
|
|
8393
8393
|
}) => /* @__PURE__ */ c.jsx(
|
|
8394
8394
|
"div",
|
|
8395
8395
|
{
|
|
8396
|
-
className:
|
|
8396
|
+
className: D(
|
|
8397
8397
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
8398
8398
|
e
|
|
8399
8399
|
),
|
|
@@ -8405,7 +8405,7 @@ const bd = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
8405
8405
|
_n,
|
|
8406
8406
|
{
|
|
8407
8407
|
ref: n,
|
|
8408
|
-
className:
|
|
8408
|
+
className: D(
|
|
8409
8409
|
"text-lg font-semibold leading-none tracking-tight",
|
|
8410
8410
|
e
|
|
8411
8411
|
),
|
|
@@ -8417,7 +8417,7 @@ const kw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
8417
8417
|
vs,
|
|
8418
8418
|
{
|
|
8419
8419
|
ref: n,
|
|
8420
|
-
className:
|
|
8420
|
+
className: D("text-sm text-muted-foreground", e),
|
|
8421
8421
|
...t
|
|
8422
8422
|
}
|
|
8423
8423
|
));
|
|
@@ -8540,7 +8540,7 @@ function Pw({ className: e }) {
|
|
|
8540
8540
|
"span",
|
|
8541
8541
|
{
|
|
8542
8542
|
"aria-live": "polite",
|
|
8543
|
-
className:
|
|
8543
|
+
className: D("inline-block text-xs opacity-70 ml-1", e),
|
|
8544
8544
|
children: [
|
|
8545
8545
|
"Is thinking",
|
|
8546
8546
|
".".repeat(t)
|
|
@@ -8571,8 +8571,8 @@ const _w = q.memo(function({
|
|
|
8571
8571
|
}) {
|
|
8572
8572
|
const [y, R] = ue(!1), [S, C] = ue(!1), [E, N] = ue(!1), [I, j] = ue(!1), { currentThreadId: P } = Yi();
|
|
8573
8573
|
ha();
|
|
8574
|
-
const [B, G] = ue({}), [_, Y] = ue(!1), [U, oe] = ue(null), O = u === "phone" || u === "half-screen",
|
|
8575
|
-
switch (
|
|
8574
|
+
const [B, G] = ue({}), [_, Y] = ue(!1), [U, oe] = ue(null), O = u === "phone" || u === "half-screen", L = t.role, K = L === "tool", W = q.useMemo(() => {
|
|
8575
|
+
switch (L) {
|
|
8576
8576
|
case "user":
|
|
8577
8577
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
8578
8578
|
case "assistant":
|
|
@@ -8584,7 +8584,7 @@ const _w = q.memo(function({
|
|
|
8584
8584
|
default:
|
|
8585
8585
|
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
8586
8586
|
}
|
|
8587
|
-
}, [
|
|
8587
|
+
}, [L]), ee = mn(() => Ow(t.content), [t.content]), M = mn(() => Bw(t.content), [t.content]), Z = mn(() => t.content.filter((ie) => ie.type === "image_url"), [t.content]), pe = mn(() => t.content.filter((ie) => ie.type === "file"), [t.content]), he = Hw(ee, r);
|
|
8588
8588
|
q.useEffect(() => {
|
|
8589
8589
|
r && ee !== he && console.log("[MessageComponent] Streaming update:", {
|
|
8590
8590
|
messageId: t.id,
|
|
@@ -8607,8 +8607,8 @@ const _w = q.memo(function({
|
|
|
8607
8607
|
const ie = K ? Zn(t.content) : ee;
|
|
8608
8608
|
v(t.id, ie);
|
|
8609
8609
|
}, H = () => p == null ? void 0 : p(n), J = () => {
|
|
8610
|
-
const Ne =
|
|
8611
|
-
switch (
|
|
8610
|
+
const Ne = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", W);
|
|
8611
|
+
switch (L) {
|
|
8612
8612
|
case "user":
|
|
8613
8613
|
return /* @__PURE__ */ c.jsx(Yp, { className: Ne });
|
|
8614
8614
|
case "assistant":
|
|
@@ -8620,42 +8620,42 @@ const _w = q.memo(function({
|
|
|
8620
8620
|
}
|
|
8621
8621
|
}, ce = () => {
|
|
8622
8622
|
const ie = "group relative mb-4 flex w-full";
|
|
8623
|
-
switch (
|
|
8623
|
+
switch (L) {
|
|
8624
8624
|
case "user":
|
|
8625
|
-
return
|
|
8625
|
+
return D(ie, "justify-end");
|
|
8626
8626
|
case "assistant":
|
|
8627
8627
|
case "tool":
|
|
8628
8628
|
case "system":
|
|
8629
|
-
return
|
|
8629
|
+
return D(ie, "justify-start");
|
|
8630
8630
|
default:
|
|
8631
8631
|
return ie;
|
|
8632
8632
|
}
|
|
8633
8633
|
}, se = () => {
|
|
8634
|
-
const ie =
|
|
8634
|
+
const ie = D(
|
|
8635
8635
|
"rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
|
|
8636
8636
|
O && "px-3 py-2 text-sm"
|
|
8637
8637
|
);
|
|
8638
|
-
switch (
|
|
8638
|
+
switch (L) {
|
|
8639
8639
|
case "user":
|
|
8640
|
-
return
|
|
8640
|
+
return D(
|
|
8641
8641
|
ie,
|
|
8642
8642
|
"w-full md:max-w-[95%]",
|
|
8643
8643
|
"bg-[hsl(var(--chat-bubble-user))] text-[hsl(var(--chat-bubble-user-text))]",
|
|
8644
8644
|
"border border-transparent"
|
|
8645
8645
|
);
|
|
8646
8646
|
case "assistant":
|
|
8647
|
-
return
|
|
8647
|
+
return D(
|
|
8648
8648
|
ie,
|
|
8649
8649
|
"w-full md:max-w-[95%]",
|
|
8650
8650
|
"bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
|
|
8651
8651
|
"border border-border/60 dark:border-border/40"
|
|
8652
8652
|
);
|
|
8653
8653
|
case "tool":
|
|
8654
|
-
return
|
|
8654
|
+
return D(ie, "w-full md:max-w-[95%] bg-secondary/50 text-secondary-foreground border border-dashed");
|
|
8655
8655
|
case "system":
|
|
8656
|
-
return
|
|
8656
|
+
return D(ie, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
|
|
8657
8657
|
default:
|
|
8658
|
-
return
|
|
8658
|
+
return D(
|
|
8659
8659
|
ie,
|
|
8660
8660
|
"w-full md:max-w-[95%]",
|
|
8661
8661
|
"bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
|
|
@@ -8680,13 +8680,13 @@ const _w = q.memo(function({
|
|
|
8680
8680
|
if (Te && typeof Te == "object")
|
|
8681
8681
|
return /* @__PURE__ */ c.jsx(zw, { data: Te });
|
|
8682
8682
|
}
|
|
8683
|
-
if (K &&
|
|
8683
|
+
if (K && M.name === "get_issues") {
|
|
8684
8684
|
const fe = t.content.find((st) => st.type === "tool_result"), Te = (fe == null ? void 0 : fe.output) ?? Zn(t.content), Be = yd(Te);
|
|
8685
8685
|
if (Be) return /* @__PURE__ */ c.jsx(Uw, { issues: Be });
|
|
8686
8686
|
}
|
|
8687
8687
|
if (K && !E) {
|
|
8688
8688
|
const fe = Zn(t.content).slice(0, 80).replace(/\s+/g, " ");
|
|
8689
|
-
return /* @__PURE__ */ c.jsx("div", { className:
|
|
8689
|
+
return /* @__PURE__ */ c.jsx("div", { className: D("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", O && "text-[10px]"), children: /* @__PURE__ */ c.jsxs("span", { className: "truncate max-w-full text-current", children: [
|
|
8690
8690
|
fe,
|
|
8691
8691
|
fe.length >= 80 ? "…" : ""
|
|
8692
8692
|
] }) });
|
|
@@ -8694,7 +8694,7 @@ const _w = q.memo(function({
|
|
|
8694
8694
|
if (K && d) {
|
|
8695
8695
|
const fe = Zn(t.content), Te = fe.length > h;
|
|
8696
8696
|
return /* @__PURE__ */ c.jsx($c, { open: S, onOpenChange: C, children: /* @__PURE__ */ c.jsxs("div", { className: "font-mono text-sm text-current", children: [
|
|
8697
|
-
/* @__PURE__ */ c.jsx("pre", { className:
|
|
8697
|
+
/* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te && !S ? fe.substring(0, h) + "..." : fe }),
|
|
8698
8698
|
Te && /* @__PURE__ */ c.jsx(Hc, { asChild: !0, children: /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
8699
8699
|
/* @__PURE__ */ c.jsx(Cr, { className: "h-3 w-3 mr-1" }),
|
|
8700
8700
|
"Show less"
|
|
@@ -8711,9 +8711,9 @@ const _w = q.memo(function({
|
|
|
8711
8711
|
if (fe && Mw(fe))
|
|
8712
8712
|
return /* @__PURE__ */ c.jsx(Ks, { content: fe.trim(), hideFallbackDuringStreaming: !0 });
|
|
8713
8713
|
const Te = Zn(t.content);
|
|
8714
|
-
return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className:
|
|
8714
|
+
return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te }) });
|
|
8715
8715
|
}
|
|
8716
|
-
const Ne = Z.length > 0 &&
|
|
8716
|
+
const Ne = Z.length > 0 && L !== "tool", Ce = pe.length > 0 && L !== "tool" && !1;
|
|
8717
8717
|
return /* @__PURE__ */ c.jsxs("div", { children: [
|
|
8718
8718
|
r ? (
|
|
8719
8719
|
// Streaming container: reserve space and show a skeleton until we have text,
|
|
@@ -8721,7 +8721,7 @@ const _w = q.memo(function({
|
|
|
8721
8721
|
/* @__PURE__ */ c.jsxs(
|
|
8722
8722
|
"div",
|
|
8723
8723
|
{
|
|
8724
|
-
className:
|
|
8724
|
+
className: D(
|
|
8725
8725
|
"relative transition-all duration-200 ease-out",
|
|
8726
8726
|
O ? "text-xs" : "text-sm"
|
|
8727
8727
|
),
|
|
@@ -8741,7 +8741,7 @@ const _w = q.memo(function({
|
|
|
8741
8741
|
] }) }) : /* @__PURE__ */ c.jsx(
|
|
8742
8742
|
"pre",
|
|
8743
8743
|
{
|
|
8744
|
-
className:
|
|
8744
|
+
className: D(
|
|
8745
8745
|
"whitespace-pre-wrap break-words font-sans leading-relaxed transition-opacity duration-200",
|
|
8746
8746
|
O && "text-xs"
|
|
8747
8747
|
),
|
|
@@ -8749,18 +8749,18 @@ const _w = q.memo(function({
|
|
|
8749
8749
|
}
|
|
8750
8750
|
) });
|
|
8751
8751
|
})(),
|
|
8752
|
-
/* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(Pw, { className:
|
|
8752
|
+
/* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(Pw, { className: D(W, O ? "text-xs" : "text-sm") }) })
|
|
8753
8753
|
]
|
|
8754
8754
|
}
|
|
8755
8755
|
)
|
|
8756
8756
|
) : (() => {
|
|
8757
8757
|
const fe = ri(ee.trim());
|
|
8758
8758
|
if (fe !== null) return /* @__PURE__ */ c.jsx(ol, { data: fe });
|
|
8759
|
-
if (
|
|
8759
|
+
if (L === "user" && m) {
|
|
8760
8760
|
const Te = ee.trim();
|
|
8761
8761
|
if (Te.length > w)
|
|
8762
8762
|
return /* @__PURE__ */ c.jsxs($c, { open: I, onOpenChange: j, children: [
|
|
8763
|
-
/* @__PURE__ */ c.jsx("div", { className:
|
|
8763
|
+
/* @__PURE__ */ c.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Ks, { content: Te, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
|
|
8764
8764
|
Te.substring(0, w),
|
|
8765
8765
|
"..."
|
|
8766
8766
|
] }) }),
|
|
@@ -8825,11 +8825,11 @@ const _w = q.memo(function({
|
|
|
8825
8825
|
] });
|
|
8826
8826
|
}, je = mn(() => $w(t), [t]);
|
|
8827
8827
|
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
8828
|
-
/* @__PURE__ */ c.jsx("div", { className:
|
|
8828
|
+
/* @__PURE__ */ c.jsx("div", { className: D(ce(), x.container), children: /* @__PURE__ */ c.jsxs("div", { className: D(se(), x.content), children: [
|
|
8829
8829
|
(a || l || K) && /* @__PURE__ */ c.jsxs(
|
|
8830
8830
|
"div",
|
|
8831
8831
|
{
|
|
8832
|
-
className:
|
|
8832
|
+
className: D(
|
|
8833
8833
|
"flex items-center justify-between mb-2 pb-2 border-b border-current/10",
|
|
8834
8834
|
O && "mb-1 pb-1",
|
|
8835
8835
|
W,
|
|
@@ -8838,12 +8838,12 @@ const _w = q.memo(function({
|
|
|
8838
8838
|
children: [
|
|
8839
8839
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8840
8840
|
J(),
|
|
8841
|
-
l && je && /* @__PURE__ */ c.jsx("span", { className:
|
|
8842
|
-
K &&
|
|
8841
|
+
l && je && /* @__PURE__ */ c.jsx("span", { className: D("font-medium", O ? "text-xs" : "text-sm"), children: je }),
|
|
8842
|
+
K && M.name && /* @__PURE__ */ c.jsxs(
|
|
8843
8843
|
Pu,
|
|
8844
8844
|
{
|
|
8845
8845
|
variant: "outline",
|
|
8846
|
-
className:
|
|
8846
|
+
className: D(
|
|
8847
8847
|
"text-xs flex items-center gap-1 cursor-pointer",
|
|
8848
8848
|
W,
|
|
8849
8849
|
"border border-current/40",
|
|
@@ -8851,17 +8851,17 @@ const _w = q.memo(function({
|
|
|
8851
8851
|
),
|
|
8852
8852
|
onClick: () => N((ie) => !ie),
|
|
8853
8853
|
children: [
|
|
8854
|
-
/* @__PURE__ */ c.jsx("span", { children:
|
|
8854
|
+
/* @__PURE__ */ c.jsx("span", { children: M.name }),
|
|
8855
8855
|
/* @__PURE__ */ c.jsx("span", { className: "inline-flex items-center", children: E ? /* @__PURE__ */ c.jsx(Cr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(Qn, { className: "h-3 w-3" }) })
|
|
8856
8856
|
]
|
|
8857
8857
|
}
|
|
8858
8858
|
),
|
|
8859
|
-
K && !
|
|
8859
|
+
K && !M.name && /* @__PURE__ */ c.jsx(
|
|
8860
8860
|
De,
|
|
8861
8861
|
{
|
|
8862
8862
|
variant: "ghost",
|
|
8863
8863
|
size: "sm",
|
|
8864
|
-
className:
|
|
8864
|
+
className: D("h-6 px-1", W, "hover:bg-foreground/10"),
|
|
8865
8865
|
onClick: () => N((ie) => !ie),
|
|
8866
8866
|
children: /* @__PURE__ */ c.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
|
|
8867
8867
|
"Tool Output ",
|
|
@@ -8871,11 +8871,11 @@ const _w = q.memo(function({
|
|
|
8871
8871
|
)
|
|
8872
8872
|
] }),
|
|
8873
8873
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8874
|
-
a && /* @__PURE__ */ c.jsx("span", { className:
|
|
8874
|
+
a && /* @__PURE__ */ c.jsx("span", { className: D("text-xs opacity-60", W, O && "text-xs"), children: Ae(t.createdAt) }),
|
|
8875
8875
|
i && !s && /* @__PURE__ */ c.jsxs(
|
|
8876
8876
|
"div",
|
|
8877
8877
|
{
|
|
8878
|
-
className:
|
|
8878
|
+
className: D(
|
|
8879
8879
|
"opacity-0 group-hover:opacity-100 transition-opacity",
|
|
8880
8880
|
"flex items-center gap-1",
|
|
8881
8881
|
x.actions
|
|
@@ -8887,11 +8887,11 @@ const _w = q.memo(function({
|
|
|
8887
8887
|
variant: "ghost",
|
|
8888
8888
|
size: "sm",
|
|
8889
8889
|
onClick: F,
|
|
8890
|
-
className:
|
|
8890
|
+
className: D("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
|
|
8891
8891
|
children: /* @__PURE__ */ c.jsx(
|
|
8892
8892
|
qa,
|
|
8893
8893
|
{
|
|
8894
|
-
className:
|
|
8894
|
+
className: D(
|
|
8895
8895
|
y ? "text-success" : W,
|
|
8896
8896
|
O ? "h-3 w-3" : "h-4 w-4"
|
|
8897
8897
|
)
|
|
@@ -8899,24 +8899,24 @@ const _w = q.memo(function({
|
|
|
8899
8899
|
)
|
|
8900
8900
|
}
|
|
8901
8901
|
),
|
|
8902
|
-
|
|
8902
|
+
L === "user" && v && /* @__PURE__ */ c.jsx(
|
|
8903
8903
|
De,
|
|
8904
8904
|
{
|
|
8905
8905
|
variant: "ghost",
|
|
8906
8906
|
size: "sm",
|
|
8907
8907
|
onClick: A,
|
|
8908
|
-
className:
|
|
8909
|
-
children: /* @__PURE__ */ c.jsx(Xa, { className:
|
|
8908
|
+
className: D("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
|
|
8909
|
+
children: /* @__PURE__ */ c.jsx(Xa, { className: D(W, O ? "h-3 w-3" : "h-4 w-4") })
|
|
8910
8910
|
}
|
|
8911
8911
|
),
|
|
8912
|
-
|
|
8912
|
+
L === "assistant" && p && /* @__PURE__ */ c.jsx(
|
|
8913
8913
|
De,
|
|
8914
8914
|
{
|
|
8915
8915
|
variant: "ghost",
|
|
8916
8916
|
size: "sm",
|
|
8917
8917
|
onClick: H,
|
|
8918
|
-
className:
|
|
8919
|
-
children: /* @__PURE__ */ c.jsx(ci, { className:
|
|
8918
|
+
className: D("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
|
|
8919
|
+
children: /* @__PURE__ */ c.jsx(ci, { className: D(W, O ? "h-3 w-3" : "h-4 w-4") })
|
|
8920
8920
|
}
|
|
8921
8921
|
)
|
|
8922
8922
|
]
|
|
@@ -8927,20 +8927,20 @@ const _w = q.memo(function({
|
|
|
8927
8927
|
}
|
|
8928
8928
|
),
|
|
8929
8929
|
/* @__PURE__ */ c.jsx("div", { className: "relative", children: _e() }),
|
|
8930
|
-
K && E && (
|
|
8931
|
-
|
|
8930
|
+
K && E && (M.toolCallId || M.name) && /* @__PURE__ */ c.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
|
|
8931
|
+
M.name && /* @__PURE__ */ c.jsxs("div", { children: [
|
|
8932
8932
|
"Function: ",
|
|
8933
|
-
|
|
8933
|
+
M.name
|
|
8934
8934
|
] }),
|
|
8935
|
-
|
|
8935
|
+
M.toolCallId && /* @__PURE__ */ c.jsxs("div", { children: [
|
|
8936
8936
|
"Call ID: ",
|
|
8937
|
-
|
|
8937
|
+
M.toolCallId
|
|
8938
8938
|
] })
|
|
8939
8939
|
] }),
|
|
8940
8940
|
!(a || l || K) && i && !s && /* @__PURE__ */ c.jsxs(
|
|
8941
8941
|
"div",
|
|
8942
8942
|
{
|
|
8943
|
-
className:
|
|
8943
|
+
className: D(
|
|
8944
8944
|
"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
8945
8945
|
"flex items-center gap-1",
|
|
8946
8946
|
x.actions
|
|
@@ -8952,28 +8952,28 @@ const _w = q.memo(function({
|
|
|
8952
8952
|
variant: "ghost",
|
|
8953
8953
|
size: "sm",
|
|
8954
8954
|
onClick: F,
|
|
8955
|
-
className:
|
|
8956
|
-
children: /* @__PURE__ */ c.jsx(qa, { className:
|
|
8955
|
+
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8956
|
+
children: /* @__PURE__ */ c.jsx(qa, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8957
8957
|
}
|
|
8958
8958
|
),
|
|
8959
|
-
|
|
8959
|
+
L === "user" && v && /* @__PURE__ */ c.jsx(
|
|
8960
8960
|
De,
|
|
8961
8961
|
{
|
|
8962
8962
|
variant: "ghost",
|
|
8963
8963
|
size: "sm",
|
|
8964
8964
|
onClick: A,
|
|
8965
|
-
className:
|
|
8966
|
-
children: /* @__PURE__ */ c.jsx(Xa, { className:
|
|
8965
|
+
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8966
|
+
children: /* @__PURE__ */ c.jsx(Xa, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8967
8967
|
}
|
|
8968
8968
|
),
|
|
8969
|
-
|
|
8969
|
+
L === "assistant" && p && /* @__PURE__ */ c.jsx(
|
|
8970
8970
|
De,
|
|
8971
8971
|
{
|
|
8972
8972
|
variant: "ghost",
|
|
8973
8973
|
size: "sm",
|
|
8974
8974
|
onClick: H,
|
|
8975
|
-
className:
|
|
8976
|
-
children: /* @__PURE__ */ c.jsx(ci, { className:
|
|
8975
|
+
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8976
|
+
children: /* @__PURE__ */ c.jsx(ci, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8977
8977
|
}
|
|
8978
8978
|
)
|
|
8979
8979
|
]
|
|
@@ -9763,13 +9763,13 @@ const ay = (e) => ({
|
|
|
9763
9763
|
var G;
|
|
9764
9764
|
const oe = (G = j.filter((O) => {
|
|
9765
9765
|
if (C) {
|
|
9766
|
-
const
|
|
9767
|
-
return
|
|
9766
|
+
const L = en(O.placement);
|
|
9767
|
+
return L === b || // Create a bias to the `y` side axis due to horizontal
|
|
9768
9768
|
// reading directions favoring greater width.
|
|
9769
|
-
|
|
9769
|
+
L === "y";
|
|
9770
9770
|
}
|
|
9771
9771
|
return !0;
|
|
9772
|
-
}).map((O) => [O.placement, O.overflows.filter((
|
|
9772
|
+
}).map((O) => [O.placement, O.overflows.filter((L) => L > 0).reduce((L, K) => L + K, 0)]).sort((O, L) => O[1] - L[1])[0]) == null ? void 0 : G[0];
|
|
9773
9773
|
oe && (U = oe);
|
|
9774
9774
|
break;
|
|
9775
9775
|
}
|
|
@@ -10607,9 +10607,9 @@ function Xy(e) {
|
|
|
10607
10607
|
strategy: n,
|
|
10608
10608
|
middleware: m
|
|
10609
10609
|
};
|
|
10610
|
-
P.current && (O.platform = P.current), Ky(C.current, E.current, O).then((
|
|
10610
|
+
P.current && (O.platform = P.current), Ky(C.current, E.current, O).then((L) => {
|
|
10611
10611
|
const K = {
|
|
10612
|
-
...
|
|
10612
|
+
...L,
|
|
10613
10613
|
// The floating element's position may be recomputed while it's closed
|
|
10614
10614
|
// but still mounted (such as when transitioning out). To ensure
|
|
10615
10615
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
@@ -10653,16 +10653,16 @@ function Xy(e) {
|
|
|
10653
10653
|
};
|
|
10654
10654
|
if (!U.floating)
|
|
10655
10655
|
return O;
|
|
10656
|
-
const
|
|
10656
|
+
const L = ml(U.floating, d.x), K = ml(U.floating, d.y);
|
|
10657
10657
|
return a ? {
|
|
10658
10658
|
...O,
|
|
10659
|
-
transform: "translate(" +
|
|
10659
|
+
transform: "translate(" + L + "px, " + K + "px)",
|
|
10660
10660
|
..._d(U.floating) >= 1.5 && {
|
|
10661
10661
|
willChange: "transform"
|
|
10662
10662
|
}
|
|
10663
10663
|
} : {
|
|
10664
10664
|
position: n,
|
|
10665
|
-
left:
|
|
10665
|
+
left: L,
|
|
10666
10666
|
top: K
|
|
10667
10667
|
};
|
|
10668
10668
|
}, [n, a, U.floating, d.x, d.y]);
|
|
@@ -10824,11 +10824,11 @@ var Ia = "PopperContent", [c0, l0] = Dd(Ia), Hd = f.forwardRef(
|
|
|
10824
10824
|
f0({ arrowWidth: E, arrowHeight: N }),
|
|
10825
10825
|
m && r0({ strategy: "referenceHidden", ...G })
|
|
10826
10826
|
]
|
|
10827
|
-
}), [
|
|
10827
|
+
}), [L, K] = Wd(U), W = lt(x);
|
|
10828
10828
|
it(() => {
|
|
10829
10829
|
oe && (W == null || W());
|
|
10830
10830
|
}, [oe, W]);
|
|
10831
|
-
const ee = (F = O.arrow) == null ? void 0 : F.x,
|
|
10831
|
+
const ee = (F = O.arrow) == null ? void 0 : F.x, M = (A = O.arrow) == null ? void 0 : A.y, Z = ((H = O.arrow) == null ? void 0 : H.centerOffset) !== 0, [pe, he] = f.useState();
|
|
10832
10832
|
return it(() => {
|
|
10833
10833
|
g && he(window.getComputedStyle(g).zIndex);
|
|
10834
10834
|
}, [g]), /* @__PURE__ */ c.jsx(
|
|
@@ -10859,15 +10859,15 @@ var Ia = "PopperContent", [c0, l0] = Dd(Ia), Hd = f.forwardRef(
|
|
|
10859
10859
|
c0,
|
|
10860
10860
|
{
|
|
10861
10861
|
scope: n,
|
|
10862
|
-
placedSide:
|
|
10862
|
+
placedSide: L,
|
|
10863
10863
|
onArrowChange: S,
|
|
10864
10864
|
arrowX: ee,
|
|
10865
|
-
arrowY:
|
|
10865
|
+
arrowY: M,
|
|
10866
10866
|
shouldHideArrow: Z,
|
|
10867
10867
|
children: /* @__PURE__ */ c.jsx(
|
|
10868
10868
|
ve.div,
|
|
10869
10869
|
{
|
|
10870
|
-
"data-side":
|
|
10870
|
+
"data-side": L,
|
|
10871
10871
|
"data-align": K,
|
|
10872
10872
|
...v,
|
|
10873
10873
|
ref: y,
|
|
@@ -11232,17 +11232,17 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
|
|
|
11232
11232
|
onDismiss: w,
|
|
11233
11233
|
disableOutsideScroll: x,
|
|
11234
11234
|
...v
|
|
11235
|
-
} = e, p = Wn(Mt, n), g = no(Mt, n), b = Ss(n), y = Qd(n), R = j0(n), [S, C] = f.useState(null), E = f.useRef(null), N = Ee(t, E, p.onContentChange), I = f.useRef(0), j = f.useRef(""), P = f.useRef(0), B = f.useRef(null), G = f.useRef("right"), _ = f.useRef(0), Y = x ? hs : f.Fragment, U = x ? { as: F0, allowPinchZoom: !0 } : void 0, oe = (
|
|
11235
|
+
} = e, p = Wn(Mt, n), g = no(Mt, n), b = Ss(n), y = Qd(n), R = j0(n), [S, C] = f.useState(null), E = f.useRef(null), N = Ee(t, E, p.onContentChange), I = f.useRef(0), j = f.useRef(""), P = f.useRef(0), B = f.useRef(null), G = f.useRef("right"), _ = f.useRef(0), Y = x ? hs : f.Fragment, U = x ? { as: F0, allowPinchZoom: !0 } : void 0, oe = (L) => {
|
|
11236
11236
|
var F, A;
|
|
11237
|
-
const K = j.current +
|
|
11237
|
+
const K = j.current + L, W = R().filter((H) => !H.disabled), ee = document.activeElement, M = (F = W.find((H) => H.ref.current === ee)) == null ? void 0 : F.textValue, Z = W.map((H) => H.textValue), pe = X0(Z, K, M), he = (A = W.find((H) => H.textValue === pe)) == null ? void 0 : A.ref.current;
|
|
11238
11238
|
(function H(J) {
|
|
11239
11239
|
j.current = J, window.clearTimeout(I.current), J !== "" && (I.current = window.setTimeout(() => H(""), 1e3));
|
|
11240
11240
|
})(K), he && setTimeout(() => he.focus());
|
|
11241
11241
|
};
|
|
11242
11242
|
f.useEffect(() => () => window.clearTimeout(I.current), []), pa();
|
|
11243
|
-
const O = f.useCallback((
|
|
11243
|
+
const O = f.useCallback((L) => {
|
|
11244
11244
|
var W, ee;
|
|
11245
|
-
return G.current === ((W = B.current) == null ? void 0 : W.side) && Z0(
|
|
11245
|
+
return G.current === ((W = B.current) == null ? void 0 : W.side) && Z0(L, (ee = B.current) == null ? void 0 : ee.area);
|
|
11246
11246
|
}, []);
|
|
11247
11247
|
return /* @__PURE__ */ c.jsx(
|
|
11248
11248
|
M0,
|
|
@@ -11250,36 +11250,36 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
|
|
|
11250
11250
|
scope: n,
|
|
11251
11251
|
searchRef: j,
|
|
11252
11252
|
onItemEnter: f.useCallback(
|
|
11253
|
-
(
|
|
11254
|
-
O(
|
|
11253
|
+
(L) => {
|
|
11254
|
+
O(L) && L.preventDefault();
|
|
11255
11255
|
},
|
|
11256
11256
|
[O]
|
|
11257
11257
|
),
|
|
11258
11258
|
onItemLeave: f.useCallback(
|
|
11259
|
-
(
|
|
11259
|
+
(L) => {
|
|
11260
11260
|
var K;
|
|
11261
|
-
O(
|
|
11261
|
+
O(L) || ((K = E.current) == null || K.focus(), C(null));
|
|
11262
11262
|
},
|
|
11263
11263
|
[O]
|
|
11264
11264
|
),
|
|
11265
11265
|
onTriggerLeave: f.useCallback(
|
|
11266
|
-
(
|
|
11267
|
-
O(
|
|
11266
|
+
(L) => {
|
|
11267
|
+
O(L) && L.preventDefault();
|
|
11268
11268
|
},
|
|
11269
11269
|
[O]
|
|
11270
11270
|
),
|
|
11271
11271
|
pointerGraceTimerRef: P,
|
|
11272
|
-
onPointerGraceIntentChange: f.useCallback((
|
|
11273
|
-
B.current =
|
|
11272
|
+
onPointerGraceIntentChange: f.useCallback((L) => {
|
|
11273
|
+
B.current = L;
|
|
11274
11274
|
}, []),
|
|
11275
11275
|
children: /* @__PURE__ */ c.jsx(Y, { ...U, children: /* @__PURE__ */ c.jsx(
|
|
11276
11276
|
us,
|
|
11277
11277
|
{
|
|
11278
11278
|
asChild: !0,
|
|
11279
11279
|
trapped: o,
|
|
11280
|
-
onMountAutoFocus: Q(s, (
|
|
11280
|
+
onMountAutoFocus: Q(s, (L) => {
|
|
11281
11281
|
var K;
|
|
11282
|
-
|
|
11282
|
+
L.preventDefault(), (K = E.current) == null || K.focus({ preventScroll: !0 });
|
|
11283
11283
|
}),
|
|
11284
11284
|
onUnmountAutoFocus: i,
|
|
11285
11285
|
children: /* @__PURE__ */ c.jsx(
|
|
@@ -11302,8 +11302,8 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
|
|
|
11302
11302
|
loop: r,
|
|
11303
11303
|
currentTabStopId: S,
|
|
11304
11304
|
onCurrentTabStopIdChange: C,
|
|
11305
|
-
onEntryFocus: Q(l, (
|
|
11306
|
-
g.isUsingKeyboardRef.current ||
|
|
11305
|
+
onEntryFocus: Q(l, (L) => {
|
|
11306
|
+
g.isUsingKeyboardRef.current || L.preventDefault();
|
|
11307
11307
|
}),
|
|
11308
11308
|
preventScrollOnEntryFocus: !0,
|
|
11309
11309
|
children: /* @__PURE__ */ c.jsx(
|
|
@@ -11318,25 +11318,25 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
|
|
|
11318
11318
|
...v,
|
|
11319
11319
|
ref: N,
|
|
11320
11320
|
style: { outline: "none", ...v.style },
|
|
11321
|
-
onKeyDown: Q(v.onKeyDown, (
|
|
11322
|
-
const W =
|
|
11323
|
-
W && (
|
|
11321
|
+
onKeyDown: Q(v.onKeyDown, (L) => {
|
|
11322
|
+
const W = L.target.closest("[data-radix-menu-content]") === L.currentTarget, ee = L.ctrlKey || L.altKey || L.metaKey, M = L.key.length === 1;
|
|
11323
|
+
W && (L.key === "Tab" && L.preventDefault(), !ee && M && oe(L.key));
|
|
11324
11324
|
const Z = E.current;
|
|
11325
|
-
if (
|
|
11326
|
-
|
|
11325
|
+
if (L.target !== Z || !E0.includes(L.key)) return;
|
|
11326
|
+
L.preventDefault();
|
|
11327
11327
|
const he = R().filter((F) => !F.disabled).map((F) => F.ref.current);
|
|
11328
|
-
Jd.includes(
|
|
11328
|
+
Jd.includes(L.key) && he.reverse(), Y0(he);
|
|
11329
11329
|
}),
|
|
11330
|
-
onBlur: Q(e.onBlur, (
|
|
11331
|
-
|
|
11330
|
+
onBlur: Q(e.onBlur, (L) => {
|
|
11331
|
+
L.currentTarget.contains(L.target) || (window.clearTimeout(I.current), j.current = "");
|
|
11332
11332
|
}),
|
|
11333
11333
|
onPointerMove: Q(
|
|
11334
11334
|
e.onPointerMove,
|
|
11335
|
-
Hr((
|
|
11336
|
-
const K =
|
|
11337
|
-
if (
|
|
11338
|
-
const ee =
|
|
11339
|
-
G.current = ee, _.current =
|
|
11335
|
+
Hr((L) => {
|
|
11336
|
+
const K = L.target, W = _.current !== L.clientX;
|
|
11337
|
+
if (L.currentTarget.contains(K) && W) {
|
|
11338
|
+
const ee = L.clientX > _.current ? "right" : "left";
|
|
11339
|
+
G.current = ee, _.current = L.clientX;
|
|
11340
11340
|
}
|
|
11341
11341
|
})
|
|
11342
11342
|
)
|
|
@@ -11870,7 +11870,7 @@ const OS = AS, MS = PS, DS = f.forwardRef(({ className: e, inset: t, children: n
|
|
|
11870
11870
|
Uf,
|
|
11871
11871
|
{
|
|
11872
11872
|
ref: o,
|
|
11873
|
-
className:
|
|
11873
|
+
className: D(
|
|
11874
11874
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
11875
11875
|
t && "pl-8",
|
|
11876
11876
|
e
|
|
@@ -11887,7 +11887,7 @@ const LS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
11887
11887
|
Wf,
|
|
11888
11888
|
{
|
|
11889
11889
|
ref: n,
|
|
11890
|
-
className:
|
|
11890
|
+
className: D(
|
|
11891
11891
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
11892
11892
|
e
|
|
11893
11893
|
),
|
|
@@ -11900,7 +11900,7 @@ const Vf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
11900
11900
|
{
|
|
11901
11901
|
ref: r,
|
|
11902
11902
|
sideOffset: t,
|
|
11903
|
-
className:
|
|
11903
|
+
className: D(
|
|
11904
11904
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
11905
11905
|
e
|
|
11906
11906
|
),
|
|
@@ -11912,7 +11912,7 @@ const Pi = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
11912
11912
|
Ff,
|
|
11913
11913
|
{
|
|
11914
11914
|
ref: r,
|
|
11915
|
-
className:
|
|
11915
|
+
className: D(
|
|
11916
11916
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
11917
11917
|
t && "pl-8",
|
|
11918
11918
|
e
|
|
@@ -11925,7 +11925,7 @@ const FS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
|
|
|
11925
11925
|
Bf,
|
|
11926
11926
|
{
|
|
11927
11927
|
ref: o,
|
|
11928
|
-
className:
|
|
11928
|
+
className: D(
|
|
11929
11929
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
11930
11930
|
e
|
|
11931
11931
|
),
|
|
@@ -11942,7 +11942,7 @@ const BS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
11942
11942
|
$f,
|
|
11943
11943
|
{
|
|
11944
11944
|
ref: r,
|
|
11945
|
-
className:
|
|
11945
|
+
className: D(
|
|
11946
11946
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
11947
11947
|
e
|
|
11948
11948
|
),
|
|
@@ -11958,7 +11958,7 @@ const $S = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
11958
11958
|
Lf,
|
|
11959
11959
|
{
|
|
11960
11960
|
ref: r,
|
|
11961
|
-
className:
|
|
11961
|
+
className: D(
|
|
11962
11962
|
"px-2 py-1.5 text-sm font-semibold",
|
|
11963
11963
|
t && "pl-8",
|
|
11964
11964
|
e
|
|
@@ -11971,7 +11971,7 @@ const HS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
11971
11971
|
zf,
|
|
11972
11972
|
{
|
|
11973
11973
|
ref: n,
|
|
11974
|
-
className:
|
|
11974
|
+
className: D("-mx-1 my-1 h-px bg-muted", e),
|
|
11975
11975
|
...t
|
|
11976
11976
|
}
|
|
11977
11977
|
));
|
|
@@ -12010,7 +12010,7 @@ function ko({
|
|
|
12010
12010
|
loadOlderMessages: B,
|
|
12011
12011
|
isPostStreamFetch: G,
|
|
12012
12012
|
api: _
|
|
12013
|
-
} = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [
|
|
12013
|
+
} = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [L, K] = ue(null), [W, ee] = ue([]), [M, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Ce] = ue(null), [fe, Te] = ue(!1), Be = We(null), st = We(null), et = We(null), [xt, at] = ue("desktop");
|
|
12014
12014
|
Xe(() => {
|
|
12015
12015
|
const te = () => {
|
|
12016
12016
|
const le = window.innerWidth;
|
|
@@ -12279,15 +12279,15 @@ function ko({
|
|
|
12279
12279
|
className: "hidden"
|
|
12280
12280
|
}
|
|
12281
12281
|
),
|
|
12282
|
-
|
|
12282
|
+
M && /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
12283
12283
|
/* @__PURE__ */ c.jsx(Jp, { className: "h-4 w-4 animate-spin" }),
|
|
12284
12284
|
" Uploading Excel file..."
|
|
12285
12285
|
] }),
|
|
12286
|
-
F && !
|
|
12287
|
-
pe && !
|
|
12286
|
+
F && !M && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: F }),
|
|
12287
|
+
pe && !M && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: pe })
|
|
12288
12288
|
] })
|
|
12289
12289
|
] }),
|
|
12290
|
-
|
|
12290
|
+
L && /* @__PURE__ */ c.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: L }),
|
|
12291
12291
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
12292
12292
|
(a || l) && /* @__PURE__ */ c.jsxs(OS, { children: [
|
|
12293
12293
|
/* @__PURE__ */ c.jsx(MS, { asChild: !0, children: /* @__PURE__ */ c.jsx(
|
|
@@ -12315,9 +12315,9 @@ function ko({
|
|
|
12315
12315
|
{
|
|
12316
12316
|
onClick: () => {
|
|
12317
12317
|
var te;
|
|
12318
|
-
|
|
12318
|
+
M || (te = st.current) == null || te.click();
|
|
12319
12319
|
},
|
|
12320
|
-
className: `cursor-pointer ${
|
|
12320
|
+
className: `cursor-pointer ${M ? "opacity-60 pointer-events-none" : ""}`,
|
|
12321
12321
|
children: [
|
|
12322
12322
|
/* @__PURE__ */ c.jsx(Qp, { className: "h-4 w-4 mr-2" }),
|
|
12323
12323
|
" Upload Excel file"
|
|
@@ -12339,7 +12339,7 @@ function ko({
|
|
|
12339
12339
|
onCancelEdit: we,
|
|
12340
12340
|
onStop: R,
|
|
12341
12341
|
allowEmptySend: W.length > 0,
|
|
12342
|
-
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${Y ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${
|
|
12342
|
+
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${Y ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${L ? "border-red-400" : ""} ${d.textarea || ""}`
|
|
12343
12343
|
}
|
|
12344
12344
|
) })
|
|
12345
12345
|
] })
|
|
@@ -12351,7 +12351,7 @@ const zr = f.forwardRef(
|
|
|
12351
12351
|
"input",
|
|
12352
12352
|
{
|
|
12353
12353
|
type: t,
|
|
12354
|
-
className:
|
|
12354
|
+
className: D(
|
|
12355
12355
|
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12356
12356
|
e
|
|
12357
12357
|
),
|
|
@@ -12879,7 +12879,7 @@ const sh = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
12879
12879
|
oh,
|
|
12880
12880
|
{
|
|
12881
12881
|
ref: r,
|
|
12882
|
-
className:
|
|
12882
|
+
className: D("relative overflow-hidden", e),
|
|
12883
12883
|
...n,
|
|
12884
12884
|
children: [
|
|
12885
12885
|
/* @__PURE__ */ c.jsx(QS, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
|
|
@@ -12894,7 +12894,7 @@ const ih = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r)
|
|
|
12894
12894
|
{
|
|
12895
12895
|
ref: r,
|
|
12896
12896
|
orientation: t,
|
|
12897
|
-
className:
|
|
12897
|
+
className: D(
|
|
12898
12898
|
"flex touch-none select-none transition-colors",
|
|
12899
12899
|
t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
12900
12900
|
t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
@@ -12930,51 +12930,51 @@ function Oi({
|
|
|
12930
12930
|
Xe(() => {
|
|
12931
12931
|
y(m ?? []);
|
|
12932
12932
|
}, [m]);
|
|
12933
|
-
const _ = async (
|
|
12933
|
+
const _ = async (M) => {
|
|
12934
12934
|
try {
|
|
12935
|
-
await h(
|
|
12935
|
+
await h(M), a == null || a(M), l == null || l(M);
|
|
12936
12936
|
} catch (Z) {
|
|
12937
12937
|
console.error("Failed to select thread:", Z);
|
|
12938
12938
|
}
|
|
12939
12939
|
}, Y = async () => {
|
|
12940
12940
|
try {
|
|
12941
12941
|
G(!0);
|
|
12942
|
-
const
|
|
12943
|
-
u == null || u(
|
|
12944
|
-
} catch (
|
|
12945
|
-
console.error("Failed to create thread:",
|
|
12942
|
+
const M = await v();
|
|
12943
|
+
u == null || u(M), a == null || a(M);
|
|
12944
|
+
} catch (M) {
|
|
12945
|
+
console.error("Failed to create thread:", M);
|
|
12946
12946
|
} finally {
|
|
12947
12947
|
G(!1);
|
|
12948
12948
|
}
|
|
12949
|
-
}, U = async (
|
|
12949
|
+
}, U = async (M, Z) => {
|
|
12950
12950
|
if (Z.stopPropagation(), !!confirm("Delete this thread?"))
|
|
12951
12951
|
try {
|
|
12952
|
-
await p(
|
|
12952
|
+
await p(M), d == null || d(M);
|
|
12953
12953
|
} catch (pe) {
|
|
12954
12954
|
console.error("Failed to delete thread:", pe);
|
|
12955
12955
|
}
|
|
12956
|
-
}, oe = (
|
|
12957
|
-
Z.stopPropagation(), I(
|
|
12958
|
-
}, O = async (
|
|
12956
|
+
}, oe = (M, Z) => {
|
|
12957
|
+
Z.stopPropagation(), I(M.threadId), P(M.title || `Thread ${M.threadId.slice(0, 8)}`);
|
|
12958
|
+
}, O = async (M) => {
|
|
12959
12959
|
if (j.trim())
|
|
12960
12960
|
try {
|
|
12961
|
-
await g(
|
|
12961
|
+
await g(M, j.trim()), I(null), P("");
|
|
12962
12962
|
} catch (Z) {
|
|
12963
12963
|
console.error("Failed to update title:", Z);
|
|
12964
12964
|
}
|
|
12965
|
-
},
|
|
12965
|
+
}, L = () => {
|
|
12966
12966
|
I(null), P("");
|
|
12967
|
-
}, K = (
|
|
12968
|
-
|
|
12969
|
-
}, W = (
|
|
12970
|
-
if (!
|
|
12967
|
+
}, K = (M, Z) => {
|
|
12968
|
+
M.key === "Enter" ? O(Z) : M.key === "Escape" && L();
|
|
12969
|
+
}, W = (M) => {
|
|
12970
|
+
if (!M) return "";
|
|
12971
12971
|
try {
|
|
12972
|
-
const Z = new Date(
|
|
12972
|
+
const Z = new Date(M), he = (/* @__PURE__ */ new Date()).getTime() - Z.getTime(), F = Math.floor(he / (1e3 * 60 * 60 * 24));
|
|
12973
12973
|
return F === 0 ? Z.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : F === 1 ? "Yesterday" : F < 7 ? `${F} days ago` : Z.toLocaleDateString();
|
|
12974
12974
|
} catch {
|
|
12975
12975
|
return "";
|
|
12976
12976
|
}
|
|
12977
|
-
}, ee = (
|
|
12977
|
+
}, ee = (M) => M.title || `Thread ${M.threadId.slice(0, 8)}`;
|
|
12978
12978
|
return /* @__PURE__ */ c.jsxs("div", { className: `flex flex-col h-full ${e} ${s.container || ""}`, children: [
|
|
12979
12979
|
t && /* @__PURE__ */ c.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ c.jsx(
|
|
12980
12980
|
De,
|
|
@@ -12996,32 +12996,32 @@ function Oi({
|
|
|
12996
12996
|
children: /* @__PURE__ */ c.jsx("div", { className: "p-2 space-y-1 pb-4", children: R ? /* @__PURE__ */ c.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : b.length === 0 ? /* @__PURE__ */ c.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
|
|
12997
12997
|
/* @__PURE__ */ c.jsx(tm, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
|
|
12998
12998
|
/* @__PURE__ */ c.jsx("p", { className: "text-sm text-slate-500", children: "No conversations yet" })
|
|
12999
|
-
] }) : b.slice().sort((
|
|
12999
|
+
] }) : b.slice().sort((M, Z) => new Date(Z.updatedAt || Z.createdAt || "").getTime() - new Date(M.updatedAt || M.createdAt || "").getTime()).map((M) => /* @__PURE__ */ c.jsxs(
|
|
13000
13000
|
"div",
|
|
13001
13001
|
{
|
|
13002
|
-
onClick: () => _(
|
|
13003
|
-
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? x) ===
|
|
13002
|
+
onClick: () => _(M.threadId),
|
|
13003
|
+
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? x) === M.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
|
|
13004
13004
|
children: [
|
|
13005
13005
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
13006
|
-
/* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: N ===
|
|
13007
|
-
/* @__PURE__ */ c.jsx(zr, { value: j, onChange: (Z) => P(Z.target.value), onKeyDown: (Z) => K(Z,
|
|
13008
|
-
/* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: () => O(
|
|
13009
|
-
/* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick:
|
|
13006
|
+
/* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: N === M.threadId ? /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
|
|
13007
|
+
/* @__PURE__ */ c.jsx(zr, { value: j, onChange: (Z) => P(Z.target.value), onKeyDown: (Z) => K(Z, M.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
13008
|
+
/* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: () => O(M.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Wi, { size: 12 }) }),
|
|
13009
|
+
/* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: L, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(er, { size: 12 }) })
|
|
13010
13010
|
] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
13011
|
-
/* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: ee(
|
|
13011
|
+
/* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: ee(M) }),
|
|
13012
13012
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
|
|
13013
13013
|
/* @__PURE__ */ c.jsx(nm, { size: 10 }),
|
|
13014
|
-
/* @__PURE__ */ c.jsx("span", { children: W(
|
|
13014
|
+
/* @__PURE__ */ c.jsx("span", { children: W(M.updatedAt || M.createdAt) })
|
|
13015
13015
|
] })
|
|
13016
13016
|
] }) }),
|
|
13017
13017
|
/* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
13018
|
-
r && N !==
|
|
13018
|
+
r && N !== M.threadId && /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: (Z) => oe(M, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c.jsx(Rl, { size: 12 }) }),
|
|
13019
13019
|
n && /* @__PURE__ */ c.jsx(
|
|
13020
13020
|
De,
|
|
13021
13021
|
{
|
|
13022
13022
|
variant: "ghost",
|
|
13023
13023
|
size: "sm",
|
|
13024
|
-
onClick: (Z) => U(
|
|
13024
|
+
onClick: (Z) => U(M.threadId, Z),
|
|
13025
13025
|
className: "h-6 w-6 p-0 text-red-400 hover:text-red-300 hover:bg-red-900/20",
|
|
13026
13026
|
title: "Delete thread",
|
|
13027
13027
|
children: /* @__PURE__ */ c.jsx(rm, { size: 12 })
|
|
@@ -13029,10 +13029,10 @@ function Oi({
|
|
|
13029
13029
|
)
|
|
13030
13030
|
] })
|
|
13031
13031
|
] }),
|
|
13032
|
-
i ===
|
|
13032
|
+
i === M.threadId && /* @__PURE__ */ c.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-blue-400 rounded-r" })
|
|
13033
13033
|
]
|
|
13034
13034
|
},
|
|
13035
|
-
|
|
13035
|
+
M.threadId
|
|
13036
13036
|
)) })
|
|
13037
13037
|
}
|
|
13038
13038
|
)
|
|
@@ -13172,7 +13172,7 @@ const Wa = f.forwardRef(
|
|
|
13172
13172
|
ref: o,
|
|
13173
13173
|
decorative: n,
|
|
13174
13174
|
orientation: t,
|
|
13175
|
-
className:
|
|
13175
|
+
className: D(
|
|
13176
13176
|
"shrink-0 bg-border",
|
|
13177
13177
|
t === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
13178
13178
|
e
|
|
@@ -13185,7 +13185,7 @@ Wa.displayName = fh.displayName;
|
|
|
13185
13185
|
const hh = hd, uC = Nw, dC = pd, ph = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
13186
13186
|
ms,
|
|
13187
13187
|
{
|
|
13188
|
-
className:
|
|
13188
|
+
className: D(
|
|
13189
13189
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
13190
13190
|
e
|
|
13191
13191
|
),
|
|
@@ -13215,7 +13215,7 @@ const fC = Wr(
|
|
|
13215
13215
|
gs,
|
|
13216
13216
|
{
|
|
13217
13217
|
ref: o,
|
|
13218
|
-
className:
|
|
13218
|
+
className: D(fC({ side: e }), t),
|
|
13219
13219
|
...r,
|
|
13220
13220
|
children: [
|
|
13221
13221
|
n,
|
|
@@ -13234,7 +13234,7 @@ const mh = ({
|
|
|
13234
13234
|
}) => /* @__PURE__ */ c.jsx(
|
|
13235
13235
|
"div",
|
|
13236
13236
|
{
|
|
13237
|
-
className:
|
|
13237
|
+
className: D(
|
|
13238
13238
|
"flex flex-col space-y-2 text-center sm:text-left",
|
|
13239
13239
|
e
|
|
13240
13240
|
),
|
|
@@ -13246,7 +13246,7 @@ const gh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13246
13246
|
_n,
|
|
13247
13247
|
{
|
|
13248
13248
|
ref: n,
|
|
13249
|
-
className:
|
|
13249
|
+
className: D("text-lg font-semibold text-foreground", e),
|
|
13250
13250
|
...t
|
|
13251
13251
|
}
|
|
13252
13252
|
));
|
|
@@ -13255,7 +13255,7 @@ const vh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13255
13255
|
vs,
|
|
13256
13256
|
{
|
|
13257
13257
|
ref: n,
|
|
13258
|
-
className:
|
|
13258
|
+
className: D("text-sm text-muted-foreground", e),
|
|
13259
13259
|
...t
|
|
13260
13260
|
}
|
|
13261
13261
|
));
|
|
@@ -13267,7 +13267,7 @@ function bl({
|
|
|
13267
13267
|
return /* @__PURE__ */ c.jsx(
|
|
13268
13268
|
"div",
|
|
13269
13269
|
{
|
|
13270
|
-
className:
|
|
13270
|
+
className: D("animate-pulse rounded-md bg-muted", e),
|
|
13271
13271
|
...t
|
|
13272
13272
|
}
|
|
13273
13273
|
);
|
|
@@ -13606,7 +13606,7 @@ const OC = AC, MC = PC, DC = _C, Ih = f.forwardRef(({ className: e, sideOffset:
|
|
|
13606
13606
|
{
|
|
13607
13607
|
ref: r,
|
|
13608
13608
|
sideOffset: t,
|
|
13609
|
-
className:
|
|
13609
|
+
className: D(
|
|
13610
13610
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
13611
13611
|
e
|
|
13612
13612
|
),
|
|
@@ -13664,7 +13664,7 @@ const kh = f.forwardRef(
|
|
|
13664
13664
|
"--sidebar-width-icon": HC,
|
|
13665
13665
|
...o
|
|
13666
13666
|
},
|
|
13667
|
-
className:
|
|
13667
|
+
className: D(
|
|
13668
13668
|
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
13669
13669
|
r
|
|
13670
13670
|
),
|
|
@@ -13689,7 +13689,7 @@ const Ah = f.forwardRef(
|
|
|
13689
13689
|
return n === "none" ? /* @__PURE__ */ c.jsx(
|
|
13690
13690
|
"div",
|
|
13691
13691
|
{
|
|
13692
|
-
className:
|
|
13692
|
+
className: D(
|
|
13693
13693
|
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
13694
13694
|
r
|
|
13695
13695
|
),
|
|
@@ -13722,7 +13722,7 @@ const Ah = f.forwardRef(
|
|
|
13722
13722
|
/* @__PURE__ */ c.jsx(
|
|
13723
13723
|
"div",
|
|
13724
13724
|
{
|
|
13725
|
-
className:
|
|
13725
|
+
className: D(
|
|
13726
13726
|
"duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
|
|
13727
13727
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
13728
13728
|
"group-data-[side=right]:rotate-180",
|
|
@@ -13733,7 +13733,7 @@ const Ah = f.forwardRef(
|
|
|
13733
13733
|
/* @__PURE__ */ c.jsx(
|
|
13734
13734
|
"div",
|
|
13735
13735
|
{
|
|
13736
|
-
className:
|
|
13736
|
+
className: D(
|
|
13737
13737
|
"duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
|
|
13738
13738
|
e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
13739
13739
|
// Adjust the padding for floating and inset variants.
|
|
@@ -13766,7 +13766,7 @@ const Ph = f.forwardRef(({ className: e, onClick: t, ...n }, r) => {
|
|
|
13766
13766
|
"data-sidebar": "trigger",
|
|
13767
13767
|
variant: "ghost",
|
|
13768
13768
|
size: "icon",
|
|
13769
|
-
className:
|
|
13769
|
+
className: D("h-7 w-7", e),
|
|
13770
13770
|
onClick: (s) => {
|
|
13771
13771
|
t == null || t(s), o();
|
|
13772
13772
|
},
|
|
@@ -13790,7 +13790,7 @@ const UC = f.forwardRef(({ className: e, ...t }, n) => {
|
|
|
13790
13790
|
tabIndex: -1,
|
|
13791
13791
|
onClick: r,
|
|
13792
13792
|
title: "Toggle Sidebar",
|
|
13793
|
-
className:
|
|
13793
|
+
className: D(
|
|
13794
13794
|
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
13795
13795
|
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
13796
13796
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -13808,7 +13808,7 @@ const _h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13808
13808
|
"main",
|
|
13809
13809
|
{
|
|
13810
13810
|
ref: n,
|
|
13811
|
-
className:
|
|
13811
|
+
className: D(
|
|
13812
13812
|
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
13813
13813
|
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
13814
13814
|
e
|
|
@@ -13822,7 +13822,7 @@ const WC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13822
13822
|
{
|
|
13823
13823
|
ref: n,
|
|
13824
13824
|
"data-sidebar": "input",
|
|
13825
|
-
className:
|
|
13825
|
+
className: D(
|
|
13826
13826
|
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
13827
13827
|
e
|
|
13828
13828
|
),
|
|
@@ -13835,7 +13835,7 @@ const Oh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13835
13835
|
{
|
|
13836
13836
|
ref: n,
|
|
13837
13837
|
"data-sidebar": "header",
|
|
13838
|
-
className:
|
|
13838
|
+
className: D("flex flex-col gap-2 p-2", e),
|
|
13839
13839
|
...t
|
|
13840
13840
|
}
|
|
13841
13841
|
));
|
|
@@ -13845,7 +13845,7 @@ const VC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13845
13845
|
{
|
|
13846
13846
|
ref: n,
|
|
13847
13847
|
"data-sidebar": "footer",
|
|
13848
|
-
className:
|
|
13848
|
+
className: D("flex flex-col gap-2 p-2", e),
|
|
13849
13849
|
...t
|
|
13850
13850
|
}
|
|
13851
13851
|
));
|
|
@@ -13855,7 +13855,7 @@ const GC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13855
13855
|
{
|
|
13856
13856
|
ref: n,
|
|
13857
13857
|
"data-sidebar": "separator",
|
|
13858
|
-
className:
|
|
13858
|
+
className: D("mx-2 w-auto bg-sidebar-border", e),
|
|
13859
13859
|
...t
|
|
13860
13860
|
}
|
|
13861
13861
|
));
|
|
@@ -13865,7 +13865,7 @@ const Mh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13865
13865
|
{
|
|
13866
13866
|
ref: n,
|
|
13867
13867
|
"data-sidebar": "content",
|
|
13868
|
-
className:
|
|
13868
|
+
className: D(
|
|
13869
13869
|
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
13870
13870
|
e
|
|
13871
13871
|
),
|
|
@@ -13878,7 +13878,7 @@ const Dh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13878
13878
|
{
|
|
13879
13879
|
ref: n,
|
|
13880
13880
|
"data-sidebar": "group",
|
|
13881
|
-
className:
|
|
13881
|
+
className: D("relative flex w-full min-w-0 flex-col p-2", e),
|
|
13882
13882
|
...t
|
|
13883
13883
|
}
|
|
13884
13884
|
));
|
|
@@ -13890,7 +13890,7 @@ const Lh = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
|
|
|
13890
13890
|
{
|
|
13891
13891
|
ref: r,
|
|
13892
13892
|
"data-sidebar": "group-label",
|
|
13893
|
-
className:
|
|
13893
|
+
className: D(
|
|
13894
13894
|
"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
13895
13895
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
13896
13896
|
e
|
|
@@ -13907,7 +13907,7 @@ const KC = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
|
|
|
13907
13907
|
{
|
|
13908
13908
|
ref: r,
|
|
13909
13909
|
"data-sidebar": "group-action",
|
|
13910
|
-
className:
|
|
13910
|
+
className: D(
|
|
13911
13911
|
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
13912
13912
|
// Increases the hit area of the button on mobile.
|
|
13913
13913
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
@@ -13924,7 +13924,7 @@ const Fh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13924
13924
|
{
|
|
13925
13925
|
ref: n,
|
|
13926
13926
|
"data-sidebar": "group-content",
|
|
13927
|
-
className:
|
|
13927
|
+
className: D("w-full text-sm", e),
|
|
13928
13928
|
...t
|
|
13929
13929
|
}
|
|
13930
13930
|
));
|
|
@@ -13934,7 +13934,7 @@ const Bh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13934
13934
|
{
|
|
13935
13935
|
ref: n,
|
|
13936
13936
|
"data-sidebar": "menu",
|
|
13937
|
-
className:
|
|
13937
|
+
className: D("flex w-full min-w-0 flex-col gap-1", e),
|
|
13938
13938
|
...t
|
|
13939
13939
|
}
|
|
13940
13940
|
));
|
|
@@ -13944,7 +13944,7 @@ const $h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
13944
13944
|
{
|
|
13945
13945
|
ref: n,
|
|
13946
13946
|
"data-sidebar": "menu-item",
|
|
13947
|
-
className:
|
|
13947
|
+
className: D("group/menu-item relative", e),
|
|
13948
13948
|
...t
|
|
13949
13949
|
}
|
|
13950
13950
|
));
|
|
@@ -13985,7 +13985,7 @@ const YC = Wr(
|
|
|
13985
13985
|
"data-sidebar": "menu-button",
|
|
13986
13986
|
"data-size": r,
|
|
13987
13987
|
"data-active": t,
|
|
13988
|
-
className:
|
|
13988
|
+
className: D(YC({ variant: n, size: r }), s),
|
|
13989
13989
|
...i
|
|
13990
13990
|
}
|
|
13991
13991
|
);
|
|
@@ -14013,7 +14013,7 @@ const qC = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, .
|
|
|
14013
14013
|
{
|
|
14014
14014
|
ref: o,
|
|
14015
14015
|
"data-sidebar": "menu-action",
|
|
14016
|
-
className:
|
|
14016
|
+
className: D(
|
|
14017
14017
|
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
14018
14018
|
// Increases the hit area of the button on mobile.
|
|
14019
14019
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
@@ -14034,7 +14034,7 @@ const XC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
14034
14034
|
{
|
|
14035
14035
|
ref: n,
|
|
14036
14036
|
"data-sidebar": "menu-badge",
|
|
14037
|
-
className:
|
|
14037
|
+
className: D(
|
|
14038
14038
|
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
|
|
14039
14039
|
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
14040
14040
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
@@ -14054,7 +14054,7 @@ const JC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
|
|
|
14054
14054
|
{
|
|
14055
14055
|
ref: r,
|
|
14056
14056
|
"data-sidebar": "menu-skeleton",
|
|
14057
|
-
className:
|
|
14057
|
+
className: D("rounded-md h-8 flex gap-2 px-2 items-center", e),
|
|
14058
14058
|
...n,
|
|
14059
14059
|
children: [
|
|
14060
14060
|
t && /* @__PURE__ */ c.jsx(
|
|
@@ -14084,7 +14084,7 @@ const ZC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
14084
14084
|
{
|
|
14085
14085
|
ref: n,
|
|
14086
14086
|
"data-sidebar": "menu-sub",
|
|
14087
|
-
className:
|
|
14087
|
+
className: D(
|
|
14088
14088
|
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
14089
14089
|
"group-data-[collapsible=icon]:hidden",
|
|
14090
14090
|
e
|
|
@@ -14104,7 +14104,7 @@ const eT = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
|
|
|
14104
14104
|
"data-sidebar": "menu-sub-button",
|
|
14105
14105
|
"data-size": t,
|
|
14106
14106
|
"data-active": n,
|
|
14107
|
-
className:
|
|
14107
|
+
className: D(
|
|
14108
14108
|
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
14109
14109
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
14110
14110
|
t === "sm" && "text-xs",
|
|
@@ -14171,7 +14171,7 @@ const nT = Wr(
|
|
|
14171
14171
|
Uh,
|
|
14172
14172
|
{
|
|
14173
14173
|
ref: n,
|
|
14174
|
-
className:
|
|
14174
|
+
className: D(nT(), e),
|
|
14175
14175
|
...t
|
|
14176
14176
|
}
|
|
14177
14177
|
));
|
|
@@ -14300,7 +14300,7 @@ var Xh = Vh, aT = Kh;
|
|
|
14300
14300
|
const pn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
14301
14301
|
Xh,
|
|
14302
14302
|
{
|
|
14303
|
-
className:
|
|
14303
|
+
className: D(
|
|
14304
14304
|
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
14305
14305
|
e
|
|
14306
14306
|
),
|
|
@@ -14309,7 +14309,7 @@ const pn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
14309
14309
|
children: /* @__PURE__ */ c.jsx(
|
|
14310
14310
|
aT,
|
|
14311
14311
|
{
|
|
14312
|
-
className:
|
|
14312
|
+
className: D(
|
|
14313
14313
|
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
14314
14314
|
)
|
|
14315
14315
|
}
|
|
@@ -14535,24 +14535,24 @@ var Bt = 10, [sp, Rn] = xr($n), gT = "SelectContentImpl", vT = sr("SelectContent
|
|
|
14535
14535
|
f.useEffect(() => {
|
|
14536
14536
|
G && oe();
|
|
14537
14537
|
}, [G, oe]);
|
|
14538
|
-
const { onOpenChange: O, triggerPointerDownPosRef:
|
|
14538
|
+
const { onOpenChange: O, triggerPointerDownPosRef: L } = b;
|
|
14539
14539
|
f.useEffect(() => {
|
|
14540
14540
|
if (y) {
|
|
14541
14541
|
let F = { x: 0, y: 0 };
|
|
14542
14542
|
const A = (J) => {
|
|
14543
14543
|
var ce, se;
|
|
14544
14544
|
F = {
|
|
14545
|
-
x: Math.abs(Math.round(J.pageX) - (((ce =
|
|
14546
|
-
y: Math.abs(Math.round(J.pageY) - (((se =
|
|
14545
|
+
x: Math.abs(Math.round(J.pageX) - (((ce = L.current) == null ? void 0 : ce.x) ?? 0)),
|
|
14546
|
+
y: Math.abs(Math.round(J.pageY) - (((se = L.current) == null ? void 0 : se.y) ?? 0))
|
|
14547
14547
|
};
|
|
14548
14548
|
}, H = (J) => {
|
|
14549
|
-
F.x <= 10 && F.y <= 10 ? J.preventDefault() : y.contains(J.target) || O(!1), document.removeEventListener("pointermove", A),
|
|
14549
|
+
F.x <= 10 && F.y <= 10 ? J.preventDefault() : y.contains(J.target) || O(!1), document.removeEventListener("pointermove", A), L.current = null;
|
|
14550
14550
|
};
|
|
14551
|
-
return
|
|
14551
|
+
return L.current !== null && (document.addEventListener("pointermove", A), document.addEventListener("pointerup", H, { capture: !0, once: !0 })), () => {
|
|
14552
14552
|
document.removeEventListener("pointermove", A), document.removeEventListener("pointerup", H, { capture: !0 });
|
|
14553
14553
|
};
|
|
14554
14554
|
}
|
|
14555
|
-
}, [y, O,
|
|
14555
|
+
}, [y, O, L]), f.useEffect(() => {
|
|
14556
14556
|
const F = () => O(!1);
|
|
14557
14557
|
return window.addEventListener("blur", F), window.addEventListener("resize", F), () => {
|
|
14558
14558
|
window.removeEventListener("blur", F), window.removeEventListener("resize", F);
|
|
@@ -14567,7 +14567,7 @@ var Bt = 10, [sp, Rn] = xr($n), gT = "SelectContentImpl", vT = sr("SelectContent
|
|
|
14567
14567
|
(b.value !== void 0 && b.value === A || J) && (I(F), J && (Y.current = !0));
|
|
14568
14568
|
},
|
|
14569
14569
|
[b.value]
|
|
14570
|
-
),
|
|
14570
|
+
), M = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Z = f.useCallback(
|
|
14571
14571
|
(F, A, H) => {
|
|
14572
14572
|
const J = !Y.current && !H;
|
|
14573
14573
|
(b.value !== void 0 && b.value === A || J) && P(F);
|
|
@@ -14594,7 +14594,7 @@ var Bt = 10, [sp, Rn] = xr($n), gT = "SelectContentImpl", vT = sr("SelectContent
|
|
|
14594
14594
|
onViewportChange: C,
|
|
14595
14595
|
itemRefCallback: ee,
|
|
14596
14596
|
selectedItem: N,
|
|
14597
|
-
onItemLeave:
|
|
14597
|
+
onItemLeave: M,
|
|
14598
14598
|
itemTextRefCallback: Z,
|
|
14599
14599
|
focusSelectedItem: oe,
|
|
14600
14600
|
selectedItemText: j,
|
|
@@ -14686,14 +14686,14 @@ var xT = "SelectItemAlignedPosition", ap = f.forwardRef((e, t) => {
|
|
|
14686
14686
|
]);
|
|
14687
14687
|
a.style.minWidth = _e + "px", a.style.right = Ne + "px";
|
|
14688
14688
|
}
|
|
14689
|
-
const P = m(), B = window.innerHeight - Bt * 2, G = v.scrollHeight, _ = window.getComputedStyle(u), Y = parseInt(_.borderTopWidth, 10), U = parseInt(_.paddingTop, 10), oe = parseInt(_.borderBottomWidth, 10), O = parseInt(_.paddingBottom, 10),
|
|
14689
|
+
const P = m(), B = window.innerHeight - Bt * 2, G = v.scrollHeight, _ = window.getComputedStyle(u), Y = parseInt(_.borderTopWidth, 10), U = parseInt(_.paddingTop, 10), oe = parseInt(_.borderBottomWidth, 10), O = parseInt(_.paddingBottom, 10), L = Y + U + G + O + oe, K = Math.min(p.offsetHeight * 5, L), W = window.getComputedStyle(v), ee = parseInt(W.paddingTop, 10), M = parseInt(W.paddingBottom, 10), Z = E.top + E.height / 2 - Bt, pe = B - Z, he = p.offsetHeight / 2, F = p.offsetTop + he, A = Y + U + F, H = L - A;
|
|
14690
14690
|
if (A <= Z) {
|
|
14691
14691
|
const ce = P.length > 0 && p === P[P.length - 1].ref.current;
|
|
14692
14692
|
a.style.bottom = "0px";
|
|
14693
14693
|
const se = u.clientHeight - v.offsetTop - v.offsetHeight, Ae = Math.max(
|
|
14694
14694
|
pe,
|
|
14695
14695
|
he + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
14696
|
-
(ce ?
|
|
14696
|
+
(ce ? M : 0) + se + oe
|
|
14697
14697
|
), _e = A + Ae;
|
|
14698
14698
|
a.style.height = _e + "px";
|
|
14699
14699
|
} else {
|
|
@@ -15126,7 +15126,7 @@ const wl = jT, yl = kT, zi = f.forwardRef(({ className: e, children: t, ...n },
|
|
|
15126
15126
|
Rp,
|
|
15127
15127
|
{
|
|
15128
15128
|
ref: r,
|
|
15129
|
-
className:
|
|
15129
|
+
className: D(
|
|
15130
15130
|
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
15131
15131
|
e
|
|
15132
15132
|
),
|
|
@@ -15142,7 +15142,7 @@ const Pp = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15142
15142
|
jp,
|
|
15143
15143
|
{
|
|
15144
15144
|
ref: n,
|
|
15145
|
-
className:
|
|
15145
|
+
className: D(
|
|
15146
15146
|
"flex cursor-default items-center justify-center py-1",
|
|
15147
15147
|
e
|
|
15148
15148
|
),
|
|
@@ -15155,7 +15155,7 @@ const _p = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15155
15155
|
kp,
|
|
15156
15156
|
{
|
|
15157
15157
|
ref: n,
|
|
15158
|
-
className:
|
|
15158
|
+
className: D(
|
|
15159
15159
|
"flex cursor-default items-center justify-center py-1",
|
|
15160
15160
|
e
|
|
15161
15161
|
),
|
|
@@ -15168,7 +15168,7 @@ const Ui = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
15168
15168
|
Ep,
|
|
15169
15169
|
{
|
|
15170
15170
|
ref: o,
|
|
15171
|
-
className:
|
|
15171
|
+
className: D(
|
|
15172
15172
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
15173
15173
|
n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
15174
15174
|
e
|
|
@@ -15180,7 +15180,7 @@ const Ui = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
15180
15180
|
/* @__PURE__ */ c.jsx(
|
|
15181
15181
|
_T,
|
|
15182
15182
|
{
|
|
15183
|
-
className:
|
|
15183
|
+
className: D(
|
|
15184
15184
|
"p-1",
|
|
15185
15185
|
n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
15186
15186
|
),
|
|
@@ -15196,7 +15196,7 @@ const DT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15196
15196
|
Np,
|
|
15197
15197
|
{
|
|
15198
15198
|
ref: n,
|
|
15199
|
-
className:
|
|
15199
|
+
className: D("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
|
|
15200
15200
|
...t
|
|
15201
15201
|
}
|
|
15202
15202
|
));
|
|
@@ -15205,7 +15205,7 @@ const jn = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
15205
15205
|
Ip,
|
|
15206
15206
|
{
|
|
15207
15207
|
ref: r,
|
|
15208
|
-
className:
|
|
15208
|
+
className: D(
|
|
15209
15209
|
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
15210
15210
|
e
|
|
15211
15211
|
),
|
|
@@ -15221,7 +15221,7 @@ const LT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15221
15221
|
Ap,
|
|
15222
15222
|
{
|
|
15223
15223
|
ref: n,
|
|
15224
|
-
className:
|
|
15224
|
+
className: D("-mx-1 my-1 h-px bg-muted", e),
|
|
15225
15225
|
...t
|
|
15226
15226
|
}
|
|
15227
15227
|
));
|
|
@@ -15230,7 +15230,7 @@ const Ao = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15230
15230
|
"div",
|
|
15231
15231
|
{
|
|
15232
15232
|
ref: n,
|
|
15233
|
-
className:
|
|
15233
|
+
className: D(
|
|
15234
15234
|
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
15235
15235
|
e
|
|
15236
15236
|
),
|
|
@@ -15242,7 +15242,7 @@ const Po = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15242
15242
|
"div",
|
|
15243
15243
|
{
|
|
15244
15244
|
ref: n,
|
|
15245
|
-
className:
|
|
15245
|
+
className: D("flex flex-col space-y-1.5 p-6", e),
|
|
15246
15246
|
...t
|
|
15247
15247
|
}
|
|
15248
15248
|
));
|
|
@@ -15251,7 +15251,7 @@ const _o = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15251
15251
|
"h3",
|
|
15252
15252
|
{
|
|
15253
15253
|
ref: n,
|
|
15254
|
-
className:
|
|
15254
|
+
className: D(
|
|
15255
15255
|
"text-2xl font-semibold leading-none tracking-tight",
|
|
15256
15256
|
e
|
|
15257
15257
|
),
|
|
@@ -15263,18 +15263,18 @@ const FT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
|
15263
15263
|
"p",
|
|
15264
15264
|
{
|
|
15265
15265
|
ref: n,
|
|
15266
|
-
className:
|
|
15266
|
+
className: D("text-sm text-muted-foreground", e),
|
|
15267
15267
|
...t
|
|
15268
15268
|
}
|
|
15269
15269
|
));
|
|
15270
15270
|
FT.displayName = "CardDescription";
|
|
15271
|
-
const Oo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className:
|
|
15271
|
+
const Oo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: D("p-6 pt-0", e), ...t }));
|
|
15272
15272
|
Oo.displayName = "CardContent";
|
|
15273
15273
|
const BT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
15274
15274
|
"div",
|
|
15275
15275
|
{
|
|
15276
15276
|
ref: n,
|
|
15277
|
-
className:
|
|
15277
|
+
className: D("flex items-center p-6 pt-0", e),
|
|
15278
15278
|
...t
|
|
15279
15279
|
}
|
|
15280
15280
|
));
|