@deepagents/react-genai 7.37.3 → 7.37.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -3043,7 +3043,7 @@ var Ja = "x-upload-filename", Ya = z.strictObject({
|
|
|
3043
3043
|
if (i.sessionId !== o) throw Error("Zukhruf returned a different session ID");
|
|
3044
3044
|
let s = n?.signal;
|
|
3045
3045
|
return s?.addEventListener("abort", () => {
|
|
3046
|
-
t(`${a}/cancel`, { method: "POST" })
|
|
3046
|
+
t(`${a}/cancel`, { method: "POST" });
|
|
3047
3047
|
}, { once: !0 }), t(`${a}/stream`, {
|
|
3048
3048
|
headers: { accept: "text/event-stream" },
|
|
3049
3049
|
method: "GET",
|
|
@@ -3089,7 +3089,10 @@ function Za(e, t) {
|
|
|
3089
3089
|
return `${e}/${encodeURIComponent(t)}`;
|
|
3090
3090
|
}
|
|
3091
3091
|
async function Qa(e, t) {
|
|
3092
|
-
let n = `Uploading ${t.name} failed with HTTP ${e.status}`, r = $a(await e.json().catch(() =>
|
|
3092
|
+
let n = `Uploading ${t.name} failed with HTTP ${e.status}`, r = $a(await e.json().catch((e) => {
|
|
3093
|
+
if (e instanceof SyntaxError) return null;
|
|
3094
|
+
throw e;
|
|
3095
|
+
}));
|
|
3093
3096
|
return r ? `${n}: ${r}` : n;
|
|
3094
3097
|
}
|
|
3095
3098
|
function $a(e) {
|
|
@@ -4765,15 +4768,18 @@ var nc = "tips:history", rc = "tips:session";
|
|
|
4765
4768
|
function ic() {
|
|
4766
4769
|
try {
|
|
4767
4770
|
return JSON.parse(localStorage.getItem(nc) ?? "{}");
|
|
4768
|
-
} catch {
|
|
4769
|
-
return {};
|
|
4771
|
+
} catch (e) {
|
|
4772
|
+
if (sc(e)) return {};
|
|
4773
|
+
throw e;
|
|
4770
4774
|
}
|
|
4771
4775
|
}
|
|
4772
4776
|
function ac(e, t) {
|
|
4773
4777
|
try {
|
|
4774
4778
|
let n = ic();
|
|
4775
4779
|
n[e] = t, localStorage.setItem(nc, JSON.stringify(n));
|
|
4776
|
-
} catch {
|
|
4780
|
+
} catch (e) {
|
|
4781
|
+
if (!sc(e)) throw e;
|
|
4782
|
+
}
|
|
4777
4783
|
}
|
|
4778
4784
|
function oc(e) {
|
|
4779
4785
|
try {
|
|
@@ -4782,33 +4788,37 @@ function oc(e) {
|
|
|
4782
4788
|
n: 0
|
|
4783
4789
|
};
|
|
4784
4790
|
return n.id !== e && (n.id = e, n.n += 1, localStorage.setItem(rc, JSON.stringify(n))), n.n;
|
|
4785
|
-
} catch {
|
|
4786
|
-
return 0;
|
|
4791
|
+
} catch (e) {
|
|
4792
|
+
if (sc(e)) return 0;
|
|
4793
|
+
throw e;
|
|
4787
4794
|
}
|
|
4788
4795
|
}
|
|
4789
|
-
function sc(e
|
|
4796
|
+
function sc(e) {
|
|
4797
|
+
return e instanceof SyntaxError || e instanceof DOMException && (e.name === "QuotaExceededError" || e.name === "SecurityError");
|
|
4798
|
+
}
|
|
4799
|
+
function cc(e, t, n) {
|
|
4790
4800
|
let r = n[e];
|
|
4791
4801
|
return r == null ? Infinity : t - r;
|
|
4792
4802
|
}
|
|
4793
|
-
async function
|
|
4803
|
+
async function lc(e, t, n) {
|
|
4794
4804
|
let r = ic(), i = await Promise.all(e.map((e) => e.isRelevant(t))), a = e.filter((e, t) => i[t]);
|
|
4795
4805
|
if (a.length === 0) return null;
|
|
4796
|
-
let o = a.filter((e) =>
|
|
4797
|
-
s.sort((e, t) =>
|
|
4806
|
+
let o = a.filter((e) => cc(e.id, n, r) >= e.cooldownSessions), s = o.length > 0 ? o : a;
|
|
4807
|
+
s.sort((e, t) => cc(t.id, n, r) - cc(e.id, n, r));
|
|
4798
4808
|
let c = s[0], l = await c.content(t);
|
|
4799
4809
|
return {
|
|
4800
4810
|
id: c.id,
|
|
4801
4811
|
text: l
|
|
4802
4812
|
};
|
|
4803
4813
|
}
|
|
4804
|
-
function
|
|
4814
|
+
function uc(e) {
|
|
4805
4815
|
let t = O(13), { tips: n, streaming: r, chatId: i, context: a, children: o } = e, s;
|
|
4806
4816
|
t[0] === i ? s = t[1] : (s = () => oc(i), t[0] = i, t[1] = s);
|
|
4807
4817
|
let [c] = g(s), [l, u] = g(""), [p, m] = g(r), [_, v] = g(0);
|
|
4808
|
-
r !== p && (m(r), r && v(
|
|
4818
|
+
r !== p && (m(r), r && v(dc));
|
|
4809
4819
|
let y = h(!1), b;
|
|
4810
4820
|
t[2] !== a || t[3] !== c || t[4] !== n ? (b = () => {
|
|
4811
|
-
y.current || (y.current = !0,
|
|
4821
|
+
y.current || (y.current = !0, lc(n, a, c).then((e) => {
|
|
4812
4822
|
e && (u(e.text), ac(e.id, c));
|
|
4813
4823
|
}).finally(() => {
|
|
4814
4824
|
y.current = !1;
|
|
@@ -4826,12 +4836,12 @@ function lc(e) {
|
|
|
4826
4836
|
children: o
|
|
4827
4837
|
}), t[10] = o, t[11] = l, t[12] = w) : w = t[12], w;
|
|
4828
4838
|
}
|
|
4829
|
-
function
|
|
4839
|
+
function dc(e) {
|
|
4830
4840
|
return e + 1;
|
|
4831
4841
|
}
|
|
4832
|
-
function
|
|
4842
|
+
function fc(e) {
|
|
4833
4843
|
let t = O(6), { tips: n, context: r, children: i } = e, { chatId: a } = q(), { status: o } = mn(), s = o === "streaming" || o === "submitted", c = a ?? "", l;
|
|
4834
|
-
return t[0] !== i || t[1] !== r || t[2] !== s || t[3] !== c || t[4] !== n ? (l = /* @__PURE__ */ F(
|
|
4844
|
+
return t[0] !== i || t[1] !== r || t[2] !== s || t[3] !== c || t[4] !== n ? (l = /* @__PURE__ */ F(uc, {
|
|
4835
4845
|
tips: n,
|
|
4836
4846
|
streaming: s,
|
|
4837
4847
|
chatId: c,
|
|
@@ -4841,14 +4851,14 @@ function dc(e) {
|
|
|
4841
4851
|
}
|
|
4842
4852
|
//#endregion
|
|
4843
4853
|
//#region src/lib/components/Tip/TipLine.tsx
|
|
4844
|
-
var
|
|
4845
|
-
function
|
|
4854
|
+
var pc = 1.5;
|
|
4855
|
+
function mc(e) {
|
|
4846
4856
|
let t = O(13), { className: n } = e, r = Ft(), i = tc(), [a, o] = g(i), [s, c] = g(!1);
|
|
4847
4857
|
i !== a && (o(i), i && c(!0));
|
|
4848
4858
|
let l, u;
|
|
4849
4859
|
t[0] !== r || t[1] !== s ? (l = () => {
|
|
4850
4860
|
if (!s) return;
|
|
4851
|
-
let e = r.setTimeout(() => c(!1),
|
|
4861
|
+
let e = r.setTimeout(() => c(!1), pc * 1e3);
|
|
4852
4862
|
return () => r.clearTimeout(e);
|
|
4853
4863
|
}, u = [r, s], t[0] = r, t[1] = s, t[2] = l, t[3] = u) : (l = t[2], u = t[3]), d(l, u);
|
|
4854
4864
|
let f;
|
|
@@ -4859,7 +4869,7 @@ function pc(e) {
|
|
|
4859
4869
|
t[7] !== s || t[8] !== i ? (m = /* @__PURE__ */ I(Tn, {
|
|
4860
4870
|
as: "span",
|
|
4861
4871
|
enabled: s,
|
|
4862
|
-
duration:
|
|
4872
|
+
duration: pc,
|
|
4863
4873
|
children: ["Tip: ", i]
|
|
4864
4874
|
}), t[7] = s, t[8] = i, t[9] = m) : m = t[9];
|
|
4865
4875
|
let h;
|
|
@@ -4870,7 +4880,7 @@ function pc(e) {
|
|
|
4870
4880
|
}
|
|
4871
4881
|
//#endregion
|
|
4872
4882
|
//#region src/lib/dynamic-ui/error-boundary.tsx
|
|
4873
|
-
var
|
|
4883
|
+
var hc = class extends t.Component {
|
|
4874
4884
|
constructor(e) {
|
|
4875
4885
|
super(e), this.state = {
|
|
4876
4886
|
hasError: !1,
|
|
@@ -4891,14 +4901,14 @@ var mc = class extends t.Component {
|
|
|
4891
4901
|
}), this.props.onRetry?.(e);
|
|
4892
4902
|
};
|
|
4893
4903
|
render() {
|
|
4894
|
-
return this.state.hasError ? /* @__PURE__ */ F(
|
|
4904
|
+
return this.state.hasError ? /* @__PURE__ */ F(gc, {
|
|
4895
4905
|
error: this.state.error,
|
|
4896
4906
|
code: this.props.code,
|
|
4897
4907
|
onRetry: this.props.onRetry ? this.handleRetry : void 0
|
|
4898
4908
|
}) : this.props.children;
|
|
4899
4909
|
}
|
|
4900
4910
|
};
|
|
4901
|
-
function
|
|
4911
|
+
function gc(e) {
|
|
4902
4912
|
let t = O(16), { error: n, code: r, onRetry: i } = e, a;
|
|
4903
4913
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ F(H, { children: /* @__PURE__ */ I(me, {
|
|
4904
4914
|
className: "text-destructive flex items-center gap-2",
|
|
@@ -4952,24 +4962,24 @@ function hc(e) {
|
|
|
4952
4962
|
}
|
|
4953
4963
|
//#endregion
|
|
4954
4964
|
//#region src/lib/dynamic-ui/safe-scope.ts
|
|
4955
|
-
var
|
|
4965
|
+
var _c = {
|
|
4956
4966
|
useState: t.useState,
|
|
4957
4967
|
useEffect: t.useEffect,
|
|
4958
4968
|
useMemo: t.useMemo,
|
|
4959
4969
|
useCallback: t.useCallback,
|
|
4960
4970
|
useReducer: t.useReducer,
|
|
4961
4971
|
useId: t.useId
|
|
4962
|
-
},
|
|
4972
|
+
}, vc = {
|
|
4963
4973
|
Fragment: t.Fragment,
|
|
4964
4974
|
createElement: t.createElement
|
|
4965
4975
|
};
|
|
4966
|
-
function
|
|
4976
|
+
function yc() {
|
|
4967
4977
|
return {
|
|
4968
|
-
...gc,
|
|
4969
4978
|
..._c,
|
|
4979
|
+
...vc,
|
|
4970
4980
|
React: {
|
|
4971
|
-
...
|
|
4972
|
-
...
|
|
4981
|
+
..._c,
|
|
4982
|
+
...vc
|
|
4973
4983
|
},
|
|
4974
4984
|
...ne,
|
|
4975
4985
|
cn: k,
|
|
@@ -4994,22 +5004,22 @@ function vc() {
|
|
|
4994
5004
|
prompt: void 0
|
|
4995
5005
|
};
|
|
4996
5006
|
}
|
|
4997
|
-
function yc() {
|
|
4998
|
-
return Object.keys(vc());
|
|
4999
|
-
}
|
|
5000
5007
|
function bc() {
|
|
5001
|
-
return Object.
|
|
5008
|
+
return Object.keys(yc());
|
|
5009
|
+
}
|
|
5010
|
+
function xc() {
|
|
5011
|
+
return Object.values(yc());
|
|
5002
5012
|
}
|
|
5003
5013
|
//#endregion
|
|
5004
5014
|
//#region src/lib/dynamic-ui/transpiler.ts
|
|
5005
|
-
function
|
|
5015
|
+
function Sc(e) {
|
|
5006
5016
|
return e.replace(/^import\s+.*?from\s+['"][^'"]+['"];?\s*$/gm, "").replace(/^import\s+['"][^'"]+['"];?\s*$/gm, "").replace(/^export\s+default\s+\w+;?\s*$/gm, "").replace(/^export\s+default\s+/gm, "const Component = ").trim();
|
|
5007
5017
|
}
|
|
5008
|
-
function
|
|
5018
|
+
function Cc(e) {
|
|
5009
5019
|
try {
|
|
5010
5020
|
return {
|
|
5011
5021
|
success: !0,
|
|
5012
|
-
code: Gt(
|
|
5022
|
+
code: Gt(Sc(e), {
|
|
5013
5023
|
transforms: ["jsx", "typescript"],
|
|
5014
5024
|
jsxRuntime: "classic",
|
|
5015
5025
|
production: !0
|
|
@@ -5022,7 +5032,7 @@ function Sc(e) {
|
|
|
5022
5032
|
};
|
|
5023
5033
|
}
|
|
5024
5034
|
}
|
|
5025
|
-
function
|
|
5035
|
+
function wc(e) {
|
|
5026
5036
|
let t = [/(?:const|let|var)\s+([A-Z][a-zA-Z0-9]*)\s*=/g, /function\s+([A-Z][a-zA-Z0-9]*)\s*\(/g], n = /* @__PURE__ */ new Set();
|
|
5027
5037
|
for (let r of t) {
|
|
5028
5038
|
let t;
|
|
@@ -5030,25 +5040,25 @@ function Cc(e) {
|
|
|
5030
5040
|
}
|
|
5031
5041
|
return Array.from(n);
|
|
5032
5042
|
}
|
|
5033
|
-
function
|
|
5043
|
+
function Tc(e) {
|
|
5034
5044
|
return `
|
|
5035
5045
|
return (function() {
|
|
5036
5046
|
${e}
|
|
5037
|
-
${
|
|
5047
|
+
${wc(e).map((e) => `if (typeof ${e} !== 'undefined') return ${e};`).join("\n ")}
|
|
5038
5048
|
return null;
|
|
5039
5049
|
})();
|
|
5040
5050
|
`;
|
|
5041
5051
|
}
|
|
5042
5052
|
//#endregion
|
|
5043
5053
|
//#region src/lib/dynamic-ui/DynamicRenderer.tsx
|
|
5044
|
-
function
|
|
5054
|
+
function Ec(e) {
|
|
5045
5055
|
try {
|
|
5046
|
-
let t =
|
|
5056
|
+
let t = Cc(e);
|
|
5047
5057
|
if (!t.success) return {
|
|
5048
5058
|
success: !1,
|
|
5049
5059
|
error: `Transpilation failed: ${t.error}`
|
|
5050
5060
|
};
|
|
5051
|
-
let n =
|
|
5061
|
+
let n = Tc(t.code), r = bc(), i = xc(), a = Function(...r, n)(...i);
|
|
5052
5062
|
return a ? {
|
|
5053
5063
|
success: !0,
|
|
5054
5064
|
Component: a
|
|
@@ -5063,9 +5073,9 @@ function Tc(e) {
|
|
|
5063
5073
|
};
|
|
5064
5074
|
}
|
|
5065
5075
|
}
|
|
5066
|
-
function
|
|
5076
|
+
function Dc(e) {
|
|
5067
5077
|
let t = O(17), { code: n, onRetry: r } = e, i;
|
|
5068
|
-
t[0] === n ? i = t[1] : (i =
|
|
5078
|
+
t[0] === n ? i = t[1] : (i = Ec(n), t[0] = n, t[1] = i);
|
|
5069
5079
|
let a = i;
|
|
5070
5080
|
if (!a.success) {
|
|
5071
5081
|
let e;
|
|
@@ -5073,7 +5083,7 @@ function Ec(e) {
|
|
|
5073
5083
|
let i;
|
|
5074
5084
|
t[4] !== r || t[5] !== a.error ? (i = r ? () => r(a.error) : void 0, t[4] = r, t[5] = a.error, t[6] = i) : i = t[6];
|
|
5075
5085
|
let o;
|
|
5076
|
-
return t[7] !== n || t[8] !== e || t[9] !== i ? (o = /* @__PURE__ */ F(
|
|
5086
|
+
return t[7] !== n || t[8] !== e || t[9] !== i ? (o = /* @__PURE__ */ F(gc, {
|
|
5077
5087
|
error: e,
|
|
5078
5088
|
code: n,
|
|
5079
5089
|
onRetry: i
|
|
@@ -5082,7 +5092,7 @@ function Ec(e) {
|
|
|
5082
5092
|
let o = a.Component, s;
|
|
5083
5093
|
t[11] === o ? s = t[12] : (s = /* @__PURE__ */ F(o, {}), t[11] = o, t[12] = s);
|
|
5084
5094
|
let c;
|
|
5085
|
-
return t[13] !== n || t[14] !== r || t[15] !== s ? (c = /* @__PURE__ */ F(
|
|
5095
|
+
return t[13] !== n || t[14] !== r || t[15] !== s ? (c = /* @__PURE__ */ F(hc, {
|
|
5086
5096
|
code: n,
|
|
5087
5097
|
onRetry: r,
|
|
5088
5098
|
children: s
|
|
@@ -5090,24 +5100,24 @@ function Ec(e) {
|
|
|
5090
5100
|
}
|
|
5091
5101
|
//#endregion
|
|
5092
5102
|
//#region src/lib/elements/PromptInput.tsx
|
|
5093
|
-
var
|
|
5094
|
-
let e = l(
|
|
5103
|
+
var Oc = o(null), kc = o(null), Ac = () => {
|
|
5104
|
+
let e = l(Oc);
|
|
5095
5105
|
if (!e) throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");
|
|
5096
5106
|
return e;
|
|
5097
|
-
},
|
|
5098
|
-
let e = l(
|
|
5107
|
+
}, jc = () => l(Oc), Mc = () => {
|
|
5108
|
+
let e = l(kc);
|
|
5099
5109
|
if (!e) throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");
|
|
5100
5110
|
return e;
|
|
5101
|
-
},
|
|
5102
|
-
function
|
|
5111
|
+
}, Nc = () => l(kc);
|
|
5112
|
+
function Pc(e) {
|
|
5103
5113
|
let t = O(25), { initialInput: n, children: r } = e, [i, a] = g(n === void 0 ? "" : n), o;
|
|
5104
5114
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => a(""), t[0] = o) : o = t[0];
|
|
5105
5115
|
let s = o, c;
|
|
5106
5116
|
t[1] === Symbol.for("react.memo_cache_sentinel") ? (c = [], t[1] = c) : c = t[1];
|
|
5107
|
-
let [l, u] = g(c), p = h(null), m = h(
|
|
5117
|
+
let [l, u] = g(c), p = h(null), m = h(Lc), _;
|
|
5108
5118
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (_ = (e) => {
|
|
5109
5119
|
let t = Array.from(e);
|
|
5110
|
-
t.length !== 0 && u((e) => e.concat(t.map(
|
|
5120
|
+
t.length !== 0 && u((e) => e.concat(t.map(Ic)));
|
|
5111
5121
|
}, t[2] = _) : _ = t[2];
|
|
5112
5122
|
let v = _, y;
|
|
5113
5123
|
t[3] === Symbol.for("react.memo_cache_sentinel") ? (y = (e) => {
|
|
@@ -5118,7 +5128,7 @@ function Nc(e) {
|
|
|
5118
5128
|
}, t[3] = y) : y = t[3];
|
|
5119
5129
|
let b = y, x;
|
|
5120
5130
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (x = () => {
|
|
5121
|
-
u(
|
|
5131
|
+
u(Fc);
|
|
5122
5132
|
}, t[4] = x) : x = t[4];
|
|
5123
5133
|
let S = x, C;
|
|
5124
5134
|
t[5] === l ? C = t[6] : (C = () => {
|
|
@@ -5158,21 +5168,21 @@ function Nc(e) {
|
|
|
5158
5168
|
__registerFileInput: ee
|
|
5159
5169
|
}, t[16] = j, t[17] = N, t[18] = P) : P = t[18];
|
|
5160
5170
|
let I = P, L;
|
|
5161
|
-
t[19] !== j || t[20] !== r ? (L = /* @__PURE__ */ F(
|
|
5171
|
+
t[19] !== j || t[20] !== r ? (L = /* @__PURE__ */ F(kc, {
|
|
5162
5172
|
value: j,
|
|
5163
5173
|
children: r
|
|
5164
5174
|
}), t[19] = j, t[20] = r, t[21] = L) : L = t[21];
|
|
5165
5175
|
let R;
|
|
5166
|
-
return t[22] !== I || t[23] !== L ? (R = /* @__PURE__ */ F(
|
|
5176
|
+
return t[22] !== I || t[23] !== L ? (R = /* @__PURE__ */ F(Oc, {
|
|
5167
5177
|
value: I,
|
|
5168
5178
|
children: L
|
|
5169
5179
|
}), t[22] = I, t[23] = L, t[24] = R) : R = t[24], R;
|
|
5170
5180
|
}
|
|
5171
|
-
function
|
|
5181
|
+
function Fc(e) {
|
|
5172
5182
|
for (let t of e) t.url && URL.revokeObjectURL(t.url);
|
|
5173
5183
|
return [];
|
|
5174
5184
|
}
|
|
5175
|
-
function
|
|
5185
|
+
function Ic(e) {
|
|
5176
5186
|
return {
|
|
5177
5187
|
id: crypto.randomUUID(),
|
|
5178
5188
|
type: "file",
|
|
@@ -5181,16 +5191,16 @@ function Fc(e) {
|
|
|
5181
5191
|
filename: e.name
|
|
5182
5192
|
};
|
|
5183
5193
|
}
|
|
5184
|
-
function
|
|
5185
|
-
var
|
|
5186
|
-
let e =
|
|
5194
|
+
function Lc() {}
|
|
5195
|
+
var Rc = o(null), zc = () => {
|
|
5196
|
+
let e = Nc(), t = l(Rc), n = e ?? t;
|
|
5187
5197
|
if (!n) throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");
|
|
5188
5198
|
return n;
|
|
5189
5199
|
};
|
|
5190
|
-
function
|
|
5200
|
+
function Bc(e) {
|
|
5191
5201
|
let t = O(47), n, r, i;
|
|
5192
5202
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({data: r, className: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
5193
|
-
let a =
|
|
5203
|
+
let a = zc(), o = r.filename || "", s = (r.mediaType?.startsWith("image/") && r.url ? "image" : "file") == "image", c = o || (s ? "Image" : "Attachment"), l;
|
|
5194
5204
|
t[4] === n ? l = t[5] : (l = k("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none", n), t[4] = n, t[5] = l);
|
|
5195
5205
|
let u;
|
|
5196
5206
|
t[6] !== r.id || t[7] !== i || t[8] !== l ? (u = /* @__PURE__ */ F("div", {
|
|
@@ -5276,7 +5286,7 @@ function zc(e) {
|
|
|
5276
5286
|
})
|
|
5277
5287
|
}), t[38] = x, t[39] = S, t[40] = C) : C = t[40];
|
|
5278
5288
|
let w;
|
|
5279
|
-
t[41] !== y || t[42] !== C ? (w = /* @__PURE__ */ F(
|
|
5289
|
+
t[41] !== y || t[42] !== C ? (w = /* @__PURE__ */ F(cl, {
|
|
5280
5290
|
className: "w-auto p-2",
|
|
5281
5291
|
children: /* @__PURE__ */ I("div", {
|
|
5282
5292
|
className: "w-auto space-y-3",
|
|
@@ -5284,12 +5294,12 @@ function zc(e) {
|
|
|
5284
5294
|
})
|
|
5285
5295
|
}), t[41] = y, t[42] = C, t[43] = w) : w = t[43];
|
|
5286
5296
|
let T;
|
|
5287
|
-
return t[44] !== v || t[45] !== w ? (T = /* @__PURE__ */ I(
|
|
5297
|
+
return t[44] !== v || t[45] !== w ? (T = /* @__PURE__ */ I(ol, { children: [v, w] }), t[44] = v, t[45] = w, t[46] = T) : T = t[46], T;
|
|
5288
5298
|
}
|
|
5289
|
-
function
|
|
5299
|
+
function Vc(e) {
|
|
5290
5300
|
let t = O(15), n, r, i;
|
|
5291
5301
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({children: n, className: r, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
5292
|
-
let o =
|
|
5302
|
+
let o = zc();
|
|
5293
5303
|
if (!o.files.length) return null;
|
|
5294
5304
|
let s;
|
|
5295
5305
|
t[4] === r ? s = t[5] : (s = k("flex w-full flex-wrap items-center gap-2 p-3", r), t[4] = r, t[5] = s);
|
|
@@ -5305,10 +5315,10 @@ function Bc(e) {
|
|
|
5305
5315
|
children: c
|
|
5306
5316
|
}), t[11] = i, t[12] = s, t[13] = c, t[14] = l) : l = t[14], l;
|
|
5307
5317
|
}
|
|
5308
|
-
var
|
|
5318
|
+
var Hc = (e) => {
|
|
5309
5319
|
let t = O(10), n, r;
|
|
5310
5320
|
t[0] === e ? (n = t[1], r = t[2]) : ({label: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5311
|
-
let i = r === void 0 ? "Add photos or files" : r, a =
|
|
5321
|
+
let i = r === void 0 ? "Add photos or files" : r, a = zc(), o;
|
|
5312
5322
|
t[3] === a ? o = t[4] : (o = () => a.openFileDialog(), t[3] = a, t[4] = o);
|
|
5313
5323
|
let s;
|
|
5314
5324
|
t[5] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ F(it, { className: "mr-2 size-4" }), t[5] = s) : s = t[5];
|
|
@@ -5322,10 +5332,10 @@ var Vc = (e) => {
|
|
|
5322
5332
|
i
|
|
5323
5333
|
]
|
|
5324
5334
|
}), t[6] = i, t[7] = n, t[8] = o, t[9] = c) : c = t[9], c;
|
|
5325
|
-
},
|
|
5335
|
+
}, Uc = (e) => {
|
|
5326
5336
|
let t = O(77), n, r, i, a, o, s, c, l, u, p;
|
|
5327
5337
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9], p = t[10]) : ({className: i, accept: n, multiple: c, globalDrop: a, maxFiles: s, maxFileSize: o, onError: l, onSubmit: u, children: r, ...p} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u, t[10] = p);
|
|
5328
|
-
let m =
|
|
5338
|
+
let m = jc(), _ = !!m, v = h(null), y = h(null), b;
|
|
5329
5339
|
t[11] === Symbol.for("react.memo_cache_sentinel") ? (b = [], t[11] = b) : b = t[11];
|
|
5330
5340
|
let [x, S] = g(b), C = _ ? m.attachments.files : x, w;
|
|
5331
5341
|
t[12] === C ? w = t[13] : (w = () => {
|
|
@@ -5336,7 +5346,7 @@ var Vc = (e) => {
|
|
|
5336
5346
|
v.current?.click();
|
|
5337
5347
|
}, t[14] = E) : E = t[14];
|
|
5338
5348
|
let D = E, A;
|
|
5339
|
-
t[15] === n ? A = t[16] : (A = (e) => !n || n.trim() === "" || n.split(",").map(
|
|
5349
|
+
t[15] === n ? A = t[16] : (A = (e) => !n || n.trim() === "" || n.split(",").map(xl).filter(Boolean).some((t) => {
|
|
5340
5350
|
if (t.endsWith("/*")) {
|
|
5341
5351
|
let n = t.slice(0, -1);
|
|
5342
5352
|
return e.type.startsWith(n);
|
|
@@ -5384,7 +5394,7 @@ var Vc = (e) => {
|
|
|
5384
5394
|
return n?.url && URL.revokeObjectURL(n.url), t.filter((t) => t.id !== e);
|
|
5385
5395
|
}), t[22] = N) : N = t[22];
|
|
5386
5396
|
let L = N, R;
|
|
5387
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (R = () => S(
|
|
5397
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (R = () => S(Sl), t[23] = R) : R = t[23];
|
|
5388
5398
|
let te = R, z = _ ? m.attachments.add : ee, ne = _ ? m.attachments.remove : L, B = _ ? m.attachments.clear : te, re = _ ? m.attachments.openFileDialog : D, ie, ae;
|
|
5389
5399
|
t[24] !== m || t[25] !== _ ? (ie = () => {
|
|
5390
5400
|
_ && m.__registerFileInput(v, () => v.current?.click());
|
|
@@ -5393,7 +5403,7 @@ var Vc = (e) => {
|
|
|
5393
5403
|
t[28] !== z || t[29] !== a ? (oe = () => {
|
|
5394
5404
|
let e = y.current;
|
|
5395
5405
|
if (!e || a) return;
|
|
5396
|
-
let t =
|
|
5406
|
+
let t = Cl, n = (e) => {
|
|
5397
5407
|
e.dataTransfer?.types?.includes("Files") && e.preventDefault(), e.dataTransfer?.files && e.dataTransfer.files.length > 0 && z(e.dataTransfer.files);
|
|
5398
5408
|
};
|
|
5399
5409
|
return e.addEventListener("dragover", t), e.addEventListener("drop", n), () => {
|
|
@@ -5403,7 +5413,7 @@ var Vc = (e) => {
|
|
|
5403
5413
|
let ce, V;
|
|
5404
5414
|
t[32] !== z || t[33] !== a ? (ce = () => {
|
|
5405
5415
|
if (!a) return;
|
|
5406
|
-
let e =
|
|
5416
|
+
let e = wl, t = (e) => {
|
|
5407
5417
|
e.dataTransfer?.types?.includes("Files") && e.preventDefault(), e.dataTransfer?.files && e.dataTransfer.files.length > 0 && z(e.dataTransfer.files);
|
|
5408
5418
|
};
|
|
5409
5419
|
return document.addEventListener("dragover", e), document.addEventListener("drop", t), () => {
|
|
@@ -5420,8 +5430,8 @@ var Vc = (e) => {
|
|
|
5420
5430
|
t[41] === z ? de = t[42] : (de = (e) => {
|
|
5421
5431
|
e.currentTarget.files && z(e.currentTarget.files), e.currentTarget.value = "";
|
|
5422
5432
|
}, t[41] = z, t[42] = de);
|
|
5423
|
-
let fe = de, pe =
|
|
5424
|
-
t[43] === C ? H = t[44] : (H = C.map(
|
|
5433
|
+
let fe = de, pe = Tl, H;
|
|
5434
|
+
t[43] === C ? H = t[44] : (H = C.map(El), t[43] = C, t[44] = H);
|
|
5425
5435
|
let me;
|
|
5426
5436
|
t[45] !== z || t[46] !== B || t[47] !== re || t[48] !== ne || t[49] !== H ? (me = {
|
|
5427
5437
|
files: H,
|
|
@@ -5448,17 +5458,12 @@ var Vc = (e) => {
|
|
|
5448
5458
|
};
|
|
5449
5459
|
}
|
|
5450
5460
|
return n;
|
|
5451
|
-
})).then((t) => {
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
r instanceof Promise ? r.then(() => {
|
|
5458
|
-
B(), _ && m.textInput.clear();
|
|
5459
|
-
}).catch(El) : (B(), _ && m.textInput.clear());
|
|
5460
|
-
} catch {}
|
|
5461
|
-
}).catch(Dl);
|
|
5461
|
+
})).then(async (t) => {
|
|
5462
|
+
await u({
|
|
5463
|
+
text: n,
|
|
5464
|
+
files: t
|
|
5465
|
+
}, e), B(), _ && m.textInput.clear();
|
|
5466
|
+
});
|
|
5462
5467
|
}, t[51] = B, t[52] = m, t[53] = C, t[54] = u, t[55] = _, t[56] = ge) : ge = t[56];
|
|
5463
5468
|
let _e = ge, ve;
|
|
5464
5469
|
t[57] !== n || t[58] !== fe || t[59] !== c ? (ve = /* @__PURE__ */ F("input", {
|
|
@@ -5489,11 +5494,11 @@ var Vc = (e) => {
|
|
|
5489
5494
|
let ye;
|
|
5490
5495
|
t[70] !== ve || t[71] !== G ? (ye = /* @__PURE__ */ I(P, { children: [ve, G] }), t[70] = ve, t[71] = G, t[72] = ye) : ye = t[72];
|
|
5491
5496
|
let be = ye, xe;
|
|
5492
|
-
return t[73] !== he || t[74] !== be || t[75] !== _ ? (xe = _ ? be : /* @__PURE__ */ F(
|
|
5497
|
+
return t[73] !== he || t[74] !== be || t[75] !== _ ? (xe = _ ? be : /* @__PURE__ */ F(Rc, {
|
|
5493
5498
|
value: he,
|
|
5494
5499
|
children: be
|
|
5495
5500
|
}), t[73] = he, t[74] = be, t[75] = _, t[76] = xe) : xe = t[76], xe;
|
|
5496
|
-
},
|
|
5501
|
+
}, Wc = (e) => {
|
|
5497
5502
|
let t = O(8), n, r;
|
|
5498
5503
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5499
5504
|
let i;
|
|
@@ -5503,10 +5508,10 @@ var Vc = (e) => {
|
|
|
5503
5508
|
className: i,
|
|
5504
5509
|
...r
|
|
5505
5510
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5506
|
-
},
|
|
5511
|
+
}, Gc = (e) => {
|
|
5507
5512
|
let t = O(24), n, r, i, a;
|
|
5508
5513
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({onChange: r, className: n, placeholder: a, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
5509
|
-
let o = a === void 0 ? "What would you like to know?" : a, s =
|
|
5514
|
+
let o = a === void 0 ? "What would you like to know?" : a, s = jc(), c = zc(), [l, u] = g(!1), d;
|
|
5510
5515
|
t[5] !== c || t[6] !== l ? (d = (e) => {
|
|
5511
5516
|
if (e.key === "Enter") {
|
|
5512
5517
|
if (l || e.nativeEvent.isComposing || e.shiftKey) return;
|
|
@@ -5555,7 +5560,7 @@ var Vc = (e) => {
|
|
|
5555
5560
|
...i,
|
|
5556
5561
|
..._
|
|
5557
5562
|
}), t[17] = _, t[18] = f, t[19] = m, t[20] = o, t[21] = i, t[22] = v, t[23] = x) : x = t[23], x;
|
|
5558
|
-
},
|
|
5563
|
+
}, Kc = (e) => {
|
|
5559
5564
|
let t = O(8), n, r;
|
|
5560
5565
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5561
5566
|
let i;
|
|
@@ -5566,7 +5571,7 @@ var Vc = (e) => {
|
|
|
5566
5571
|
className: i,
|
|
5567
5572
|
...r
|
|
5568
5573
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5569
|
-
},
|
|
5574
|
+
}, qc = (e) => {
|
|
5570
5575
|
let t = O(8), n, r;
|
|
5571
5576
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5572
5577
|
let i;
|
|
@@ -5577,7 +5582,7 @@ var Vc = (e) => {
|
|
|
5577
5582
|
className: i,
|
|
5578
5583
|
...r
|
|
5579
5584
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5580
|
-
},
|
|
5585
|
+
}, Jc = (e) => {
|
|
5581
5586
|
let t = O(8), n, r;
|
|
5582
5587
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5583
5588
|
let i;
|
|
@@ -5587,7 +5592,7 @@ var Vc = (e) => {
|
|
|
5587
5592
|
className: i,
|
|
5588
5593
|
...r
|
|
5589
5594
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5590
|
-
},
|
|
5595
|
+
}, Yc = (e) => {
|
|
5591
5596
|
let t = O(12), n, r, a, o;
|
|
5592
5597
|
if (t[0] !== e) {
|
|
5593
5598
|
let { variant: s, className: c, size: l, ...u } = e;
|
|
@@ -5603,14 +5608,14 @@ var Vc = (e) => {
|
|
|
5603
5608
|
variant: o,
|
|
5604
5609
|
...r
|
|
5605
5610
|
}), t[7] = s, t[8] = r, t[9] = c, t[10] = o, t[11] = l) : l = t[11], l;
|
|
5606
|
-
},
|
|
5611
|
+
}, Xc = (e) => {
|
|
5607
5612
|
let t = O(2), n;
|
|
5608
5613
|
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ F(Ee, { ...e }), t[0] = e, t[1] = n), n;
|
|
5609
|
-
},
|
|
5614
|
+
}, Zc = (e) => {
|
|
5610
5615
|
let t = O(12), n, r, i;
|
|
5611
5616
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
5612
5617
|
let a;
|
|
5613
|
-
t[4] !== r || t[5] !== i ? (a = /* @__PURE__ */ F(
|
|
5618
|
+
t[4] !== r || t[5] !== i ? (a = /* @__PURE__ */ F(Yc, {
|
|
5614
5619
|
className: r,
|
|
5615
5620
|
...i
|
|
5616
5621
|
}), t[4] = r, t[5] = i, t[6] = a) : a = t[6];
|
|
@@ -5621,7 +5626,7 @@ var Vc = (e) => {
|
|
|
5621
5626
|
render: a,
|
|
5622
5627
|
children: o
|
|
5623
5628
|
}), t[9] = a, t[10] = o, t[11] = s) : s = t[11], s;
|
|
5624
|
-
},
|
|
5629
|
+
}, Qc = (e) => {
|
|
5625
5630
|
let t = O(8), n, r;
|
|
5626
5631
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5627
5632
|
let i;
|
|
@@ -5632,7 +5637,7 @@ var Vc = (e) => {
|
|
|
5632
5637
|
className: i,
|
|
5633
5638
|
...r
|
|
5634
5639
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5635
|
-
},
|
|
5640
|
+
}, $c = (e) => {
|
|
5636
5641
|
let t = O(8), n, r;
|
|
5637
5642
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5638
5643
|
let i;
|
|
@@ -5642,7 +5647,7 @@ var Vc = (e) => {
|
|
|
5642
5647
|
className: i,
|
|
5643
5648
|
...r
|
|
5644
5649
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5645
|
-
},
|
|
5650
|
+
}, el = (e) => {
|
|
5646
5651
|
let t = O(19), n, r, i, a, o, s;
|
|
5647
5652
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6]) : ({className: r, variant: o, size: s, status: a, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s);
|
|
5648
5653
|
let c = o === void 0 ? "default" : o, l = s === void 0 ? "icon-sm" : s, u;
|
|
@@ -5670,10 +5675,10 @@ var Vc = (e) => {
|
|
|
5670
5675
|
...i,
|
|
5671
5676
|
children: p
|
|
5672
5677
|
}), t[13] = i, t[14] = l, t[15] = f, t[16] = p, t[17] = c, t[18] = m) : m = t[18], m;
|
|
5673
|
-
},
|
|
5678
|
+
}, tl = (e) => {
|
|
5674
5679
|
let t = O(2), n;
|
|
5675
5680
|
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ F(Le, { ...e }), t[0] = e, t[1] = n), n;
|
|
5676
|
-
},
|
|
5681
|
+
}, nl = (e) => {
|
|
5677
5682
|
let t = O(8), n, r;
|
|
5678
5683
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5679
5684
|
let i;
|
|
@@ -5683,7 +5688,7 @@ var Vc = (e) => {
|
|
|
5683
5688
|
className: i,
|
|
5684
5689
|
...r
|
|
5685
5690
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5686
|
-
},
|
|
5691
|
+
}, rl = (e) => {
|
|
5687
5692
|
let t = O(8), n, r;
|
|
5688
5693
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5689
5694
|
let i;
|
|
@@ -5693,7 +5698,7 @@ var Vc = (e) => {
|
|
|
5693
5698
|
className: i,
|
|
5694
5699
|
...r
|
|
5695
5700
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5696
|
-
},
|
|
5701
|
+
}, il = (e) => {
|
|
5697
5702
|
let t = O(8), n, r;
|
|
5698
5703
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5699
5704
|
let i;
|
|
@@ -5703,7 +5708,7 @@ var Vc = (e) => {
|
|
|
5703
5708
|
className: i,
|
|
5704
5709
|
...r
|
|
5705
5710
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5706
|
-
},
|
|
5711
|
+
}, al = (e) => {
|
|
5707
5712
|
let t = O(8), n, r;
|
|
5708
5713
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5709
5714
|
let i;
|
|
@@ -5713,10 +5718,10 @@ var Vc = (e) => {
|
|
|
5713
5718
|
className: i,
|
|
5714
5719
|
...r
|
|
5715
5720
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5716
|
-
},
|
|
5721
|
+
}, ol = (e) => {
|
|
5717
5722
|
let t = O(2), n;
|
|
5718
5723
|
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ F(Ae, { ...e }), t[0] = e, t[1] = n), n;
|
|
5719
|
-
},
|
|
5724
|
+
}, sl = (e) => {
|
|
5720
5725
|
let t = O(8), n, r, i;
|
|
5721
5726
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({delay: r, closeDelay: i, ...n} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
5722
5727
|
let a = r === void 0 ? 0 : r, o = i === void 0 ? 0 : i, s;
|
|
@@ -5725,7 +5730,7 @@ var Vc = (e) => {
|
|
|
5725
5730
|
closeDelay: o,
|
|
5726
5731
|
...n
|
|
5727
5732
|
}), t[4] = o, t[5] = a, t[6] = n, t[7] = s) : s = t[7], s;
|
|
5728
|
-
},
|
|
5733
|
+
}, cl = (e) => {
|
|
5729
5734
|
let t = O(6), n, r;
|
|
5730
5735
|
t[0] === e ? (n = t[1], r = t[2]) : ({align: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5731
5736
|
let i = r === void 0 ? "start" : r, a;
|
|
@@ -5733,7 +5738,7 @@ var Vc = (e) => {
|
|
|
5733
5738
|
align: i,
|
|
5734
5739
|
...n
|
|
5735
5740
|
}), t[3] = i, t[4] = n, t[5] = a) : a = t[5], a;
|
|
5736
|
-
},
|
|
5741
|
+
}, ll = (e) => {
|
|
5737
5742
|
let t = O(8), n, r;
|
|
5738
5743
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5739
5744
|
let i;
|
|
@@ -5743,7 +5748,7 @@ var Vc = (e) => {
|
|
|
5743
5748
|
className: i,
|
|
5744
5749
|
...r
|
|
5745
5750
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5746
|
-
},
|
|
5751
|
+
}, ul = (e) => {
|
|
5747
5752
|
let t = O(8), n, r;
|
|
5748
5753
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5749
5754
|
let i;
|
|
@@ -5753,7 +5758,7 @@ var Vc = (e) => {
|
|
|
5753
5758
|
className: i,
|
|
5754
5759
|
...r
|
|
5755
5760
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5756
|
-
},
|
|
5761
|
+
}, dl = (e) => {
|
|
5757
5762
|
let t = O(10), n, r, i;
|
|
5758
5763
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
5759
5764
|
let a;
|
|
@@ -5764,7 +5769,7 @@ var Vc = (e) => {
|
|
|
5764
5769
|
...i,
|
|
5765
5770
|
children: n
|
|
5766
5771
|
}), t[6] = n, t[7] = i, t[8] = a, t[9] = o) : o = t[9], o;
|
|
5767
|
-
},
|
|
5772
|
+
}, fl = (e) => {
|
|
5768
5773
|
let t = O(8), n, r;
|
|
5769
5774
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5770
5775
|
let i;
|
|
@@ -5774,7 +5779,7 @@ var Vc = (e) => {
|
|
|
5774
5779
|
className: i,
|
|
5775
5780
|
...r
|
|
5776
5781
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5777
|
-
},
|
|
5782
|
+
}, pl = (e) => {
|
|
5778
5783
|
let t = O(8), n, r;
|
|
5779
5784
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5780
5785
|
let i;
|
|
@@ -5784,7 +5789,7 @@ var Vc = (e) => {
|
|
|
5784
5789
|
className: i,
|
|
5785
5790
|
...r
|
|
5786
5791
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5787
|
-
},
|
|
5792
|
+
}, ml = (e) => {
|
|
5788
5793
|
let t = O(8), n, r;
|
|
5789
5794
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5790
5795
|
let i;
|
|
@@ -5794,7 +5799,7 @@ var Vc = (e) => {
|
|
|
5794
5799
|
className: i,
|
|
5795
5800
|
...r
|
|
5796
5801
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5797
|
-
},
|
|
5802
|
+
}, hl = (e) => {
|
|
5798
5803
|
let t = O(8), n, r;
|
|
5799
5804
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5800
5805
|
let i;
|
|
@@ -5804,7 +5809,7 @@ var Vc = (e) => {
|
|
|
5804
5809
|
className: i,
|
|
5805
5810
|
...r
|
|
5806
5811
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5807
|
-
},
|
|
5812
|
+
}, gl = (e) => {
|
|
5808
5813
|
let t = O(8), n, r;
|
|
5809
5814
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5810
5815
|
let i;
|
|
@@ -5814,7 +5819,7 @@ var Vc = (e) => {
|
|
|
5814
5819
|
className: i,
|
|
5815
5820
|
...r
|
|
5816
5821
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5817
|
-
},
|
|
5822
|
+
}, _l = (e) => {
|
|
5818
5823
|
let t = O(8), n, r;
|
|
5819
5824
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5820
5825
|
let i;
|
|
@@ -5824,7 +5829,7 @@ var Vc = (e) => {
|
|
|
5824
5829
|
className: i,
|
|
5825
5830
|
...r
|
|
5826
5831
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5827
|
-
},
|
|
5832
|
+
}, vl = (e) => {
|
|
5828
5833
|
let t = O(8), n, r;
|
|
5829
5834
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5830
5835
|
let i;
|
|
@@ -5834,7 +5839,7 @@ var Vc = (e) => {
|
|
|
5834
5839
|
className: i,
|
|
5835
5840
|
...r
|
|
5836
5841
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5837
|
-
},
|
|
5842
|
+
}, yl = (e) => {
|
|
5838
5843
|
let t = O(8), n, r;
|
|
5839
5844
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5840
5845
|
let i;
|
|
@@ -5844,7 +5849,7 @@ var Vc = (e) => {
|
|
|
5844
5849
|
className: i,
|
|
5845
5850
|
...r
|
|
5846
5851
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5847
|
-
},
|
|
5852
|
+
}, bl = (e) => {
|
|
5848
5853
|
let t = O(8), n, r;
|
|
5849
5854
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
5850
5855
|
let i;
|
|
@@ -5855,20 +5860,20 @@ var Vc = (e) => {
|
|
|
5855
5860
|
...r
|
|
5856
5861
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
5857
5862
|
};
|
|
5858
|
-
function
|
|
5863
|
+
function xl(e) {
|
|
5859
5864
|
return e.trim();
|
|
5860
5865
|
}
|
|
5861
|
-
function
|
|
5866
|
+
function Sl(e) {
|
|
5862
5867
|
for (let t of e) t.url && URL.revokeObjectURL(t.url);
|
|
5863
5868
|
return [];
|
|
5864
5869
|
}
|
|
5865
|
-
function
|
|
5870
|
+
function Cl(e) {
|
|
5866
5871
|
e.dataTransfer?.types?.includes("Files") && e.preventDefault();
|
|
5867
5872
|
}
|
|
5868
|
-
function
|
|
5873
|
+
function wl(e) {
|
|
5869
5874
|
e.dataTransfer?.types?.includes("Files") && e.preventDefault();
|
|
5870
5875
|
}
|
|
5871
|
-
async function
|
|
5876
|
+
async function Tl(e) {
|
|
5872
5877
|
try {
|
|
5873
5878
|
let t = await (await fetch(e)).blob();
|
|
5874
5879
|
return await new Promise((e) => {
|
|
@@ -5879,17 +5884,15 @@ async function wl(e) {
|
|
|
5879
5884
|
return null;
|
|
5880
5885
|
}
|
|
5881
5886
|
}
|
|
5882
|
-
function
|
|
5887
|
+
function El(e) {
|
|
5883
5888
|
return {
|
|
5884
5889
|
...e,
|
|
5885
5890
|
id: e.id
|
|
5886
5891
|
};
|
|
5887
5892
|
}
|
|
5888
|
-
function El() {}
|
|
5889
|
-
function Dl() {}
|
|
5890
5893
|
//#endregion
|
|
5891
5894
|
//#region src/lib/hooks/use-async-generator.ts
|
|
5892
|
-
function
|
|
5895
|
+
function Dl() {
|
|
5893
5896
|
let [e, t] = g({
|
|
5894
5897
|
loading: !1,
|
|
5895
5898
|
error: null
|
|
@@ -5919,7 +5922,7 @@ function Ol() {
|
|
|
5919
5922
|
}
|
|
5920
5923
|
//#endregion
|
|
5921
5924
|
//#region src/lib/hooks/use-auto-resize-textarea.ts
|
|
5922
|
-
function
|
|
5925
|
+
function Ol(e) {
|
|
5923
5926
|
let t = O(16), { minHeight: n, maxHeight: r, value: i } = e, a = h(null), o;
|
|
5924
5927
|
t[0] !== r || t[1] !== n ? (o = (e) => {
|
|
5925
5928
|
let t = a.current;
|
|
@@ -5956,22 +5959,22 @@ function kl(e) {
|
|
|
5956
5959
|
}
|
|
5957
5960
|
//#endregion
|
|
5958
5961
|
//#region src/lib/hooks/use-keyboard.ts
|
|
5959
|
-
function
|
|
5962
|
+
function kl(e) {
|
|
5960
5963
|
let t = [];
|
|
5961
5964
|
return e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), t.push(e.key.toLowerCase()), t.join("+");
|
|
5962
5965
|
}
|
|
5963
|
-
function
|
|
5966
|
+
function Al(e) {
|
|
5964
5967
|
let t = O(4), { enabled: n, handlers: r } = e, i = n === void 0 || n, a, o;
|
|
5965
5968
|
t[0] !== i || t[1] !== r ? (a = () => {
|
|
5966
5969
|
if (!i) return;
|
|
5967
5970
|
let e = (e) => {
|
|
5968
|
-
let t =
|
|
5971
|
+
let t = kl(e), n = r[t];
|
|
5969
5972
|
n ||= r[e.key], n && (e.preventDefault(), e.stopPropagation(), n(e));
|
|
5970
5973
|
};
|
|
5971
5974
|
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
5972
5975
|
}, o = [i, r], t[0] = i, t[1] = r, t[2] = a, t[3] = o) : (a = t[2], o = t[3]), d(a, o);
|
|
5973
5976
|
}
|
|
5974
5977
|
//#endregion
|
|
5975
|
-
export { sn as AgentHeader, pn as AgentProvider, tn as AgentScrollArea, Ei as AssistantSnapshot, pi as COPY_EXCLUSION_ATTRIBUTE, mi as COPY_EXCLUSION_MODES, $ as ChatActionButton, en as ChatBot, Fs as ChatComposer, Xt as ChatManager, Is as ChatTextarea, hr as CitationPill, ti as CodeBlock, ni as CodeBlockCopyButton, as as CompactMessages, rs as CompactTrajectory, Sa as CopyAction, wa as CopyDebugJsonAction,
|
|
5978
|
+
export { sn as AgentHeader, pn as AgentProvider, tn as AgentScrollArea, Ei as AssistantSnapshot, pi as COPY_EXCLUSION_ATTRIBUTE, mi as COPY_EXCLUSION_MODES, $ as ChatActionButton, en as ChatBot, Fs as ChatComposer, Xt as ChatManager, Is as ChatTextarea, hr as CitationPill, ti as CodeBlock, ni as CodeBlockCopyButton, as as CompactMessages, rs as CompactTrajectory, Sa as CopyAction, wa as CopyDebugJsonAction, Dc as DynamicRenderer, gc as DynamicUIError, hc as DynamicUIErrorBoundary, fr as IndexProgress, Ii as InteractiveResponse, mr as MessageItemContext, ro as MessageMetadata, Hs as MessageQueue, hs as Messages, xa as MessagesActions, pr as MessagesContext, Ea as MessagesError, ka as MessagesItem, Oa as MessagesList, Da as MessagesRoot, _o as MessagesUserBubble, ya as NestedTrajectory, Ma as PendingToolInput, Uc as PromptInput, Hc as PromptInputActionAddAttachments, Xc as PromptInputActionMenu, Qc as PromptInputActionMenuContent, $c as PromptInputActionMenuItem, Zc as PromptInputActionMenuTrigger, Bc as PromptInputAttachment, Vc as PromptInputAttachments, Wc as PromptInputBody, Yc as PromptInputButton, ml as PromptInputCommand, _l as PromptInputCommandEmpty, vl as PromptInputCommandGroup, hl as PromptInputCommandInput, yl as PromptInputCommandItem, gl as PromptInputCommandList, bl as PromptInputCommandSeparator, qc as PromptInputFooter, Kc as PromptInputHeader, ol as PromptInputHoverCard, cl as PromptInputHoverCardContent, sl as PromptInputHoverCardTrigger, Pc as PromptInputProvider, tl as PromptInputSelect, rl as PromptInputSelectContent, il as PromptInputSelectItem, nl as PromptInputSelectTrigger, al as PromptInputSelectValue, el as PromptInputSubmit, ul as PromptInputTab, fl as PromptInputTabBody, pl as PromptInputTabItem, dl as PromptInputTabLabel, ll as PromptInputTabsList, Gc as PromptInputTextarea, Jc as PromptInputTools, bn as ReadOnlyChatTransport, Ca as RegenerateAction, Z as Response, Q as Segment, xi as SnapshotRenderPortal, Js as SubmitButton, Tn as TextShimmer, Ss as TimelinedMessages, mc as TipLine, uc as TipProvider, ec as TipValueContext, fc as Tips, Yi as ToolArg, Qs as ToolError, go as UserMessageContent, Xa as ZukhrufChatTransport, yn as citationIndexOf, Yt as clearPrefill, yc as createSafeScope, R as defineElements, wi as extractAssistantRawText, vn as extractSourcesFromMessages, qa as formatUsageBreakdown, Ka as formatUsageValue, jn as getIndexProgressEvents, bc as getScopeKeys, xc as getScopeValues, ma as getSegmentKey, gi as hasCopyExclusion, Ai as isActiveClientInputTool, Qi as isCommentaryTextPart, Di as isSubagentPart, Sn as isToolAborted, xn as isToolStateAborted, Va as parseMetadataUsage, Ba as parseUsage, qt as readPrefill, vi as resolveCopyToClipboardStrategy, ki as resolveToolEntry, wn as serializeToolsRegistry, _i as shouldIncludeInCopyImage, Oi as subagentDisplayName, Cc as transpileJSX, Aa as useActivePendingToolInput, q as useAgent, Qt as useAgentChatSetup, gn as useAgentMessages, hn as useAgentMeta, mn as useAgentStatus, Dl as useAsyncGenerator, Ol as useAutoResizeTextarea, _n as useChatManager, qo as useCompactGroup, Ci as useCopyElementAsImage, Ti as useIsAssistantSnapshotRender, Cn as useIsToolAborted, Al as useKeyboard, X as useMessageItem, J as useMessagesContext, Y as useMessagesStatus, Ga as useNormalizedUsageTracking, zc as usePromptInputAttachments, Ac as usePromptInputController, Mc as useProviderAttachments, tc as useTipValue, oa as useToolSegment, Go as useTrajectoryItems, bi as waitForNextPaint, Tc as wrapAsComponent, Jt as writePrefill };
|
|
5976
5979
|
|
|
5977
5980
|
//# sourceMappingURL=index.js.map
|