@ibiz-template-plugin/ai-chat 0.0.27 → 0.0.28

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.es.js CHANGED
@@ -4,7 +4,7 @@ var kn = (n, e, t) => e in n ? Sn(n, e, { enumerable: !0, configurable: !0, writ
4
4
  var x = (n, e, t) => (kn(n, typeof e != "symbol" ? e + "" : e, t), t);
5
5
  import Pe from "interactjs";
6
6
  import Vt from "cherry-markdown";
7
- var Le, w, qt, jt, ne, ct, Yt, Xe, Xt, re = {}, Zt = [], Nn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
7
+ var Le, b, qt, jt, ne, ct, Yt, Xe, Xt, re = {}, Zt = [], Nn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
8
8
  function G(n, e) {
9
9
  for (var t in e)
10
10
  n[t] = e[t];
@@ -25,7 +25,7 @@ function j(n, e, t) {
25
25
  }
26
26
  function Se(n, e, t, i, s) {
27
27
  var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++qt : s };
28
- return s == null && w.vnode != null && w.vnode(o), o;
28
+ return s == null && b.vnode != null && b.vnode(o), o;
29
29
  }
30
30
  function lt() {
31
31
  return { current: null };
@@ -56,7 +56,7 @@ function Jt(n) {
56
56
  }
57
57
  }
58
58
  function Ze(n) {
59
- (!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== w.debounceRendering) && ((ct = w.debounceRendering) || Yt)(Ee);
59
+ (!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) || Yt)(Ee);
60
60
  }
61
61
  function Ee() {
62
62
  var n, e, t, i, s, o, a, r, u;
@@ -65,9 +65,9 @@ function Ee() {
65
65
  Ee.__r = 0;
66
66
  }
67
67
  function Kt(n, e, t, i, s, o, a, r, u, h, p) {
68
- var l, v, _, d, f, m, b, g, T, C = 0, S = i && i.__k || Zt, O = S.length, L = O, U = e.length;
68
+ var l, v, _, d, f, m, w, g, T, C = 0, S = i && i.__k || Zt, O = S.length, L = O, U = e.length;
69
69
  for (t.__k = [], l = 0; l < U; l++)
70
- (d = t.__k[l] = (d = e[l]) == null || typeof d == "boolean" || typeof d == "function" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ? Se(null, d, null, null, d) : ze(d) ? Se(Y, { children: d }, null, null, null) : d.__b > 0 ? Se(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = En(d, S, b = l + C, L)) === -1 ? _ = re : (_ = S[g] || re, S[g] = void 0, L--), tt(n, d, _, s, o, a, r, u, h, p), f = d.__e, (v = d.ref) && _.ref != v && (_.ref && nt(_.ref, null, d), p.push(v, d.__c || f, d)), f != null && (m == null && (m = f), (T = _ === re || _.__v === null) ? g == -1 && C-- : g !== b && (g === b + 1 ? C++ : g > b ? L > U - b ? C += g - b : C-- : C = g < b && g == b - 1 ? g - b : 0), b = l + C, typeof d.type != "function" || g === b && _.__k !== d.__k ? typeof d.type == "function" || g === b && !T ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = en(n, f, u) : u = Qt(d, u, n), typeof t.type == "function" && (t.__d = u))) : (_ = S[l]) && _.key == null && _.__e && (_.__e == u && (_.__ = i, u = ge(_)), Ge(_, _, !1), S[l] = null);
70
+ (d = t.__k[l] = (d = e[l]) == null || typeof d == "boolean" || typeof d == "function" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ? Se(null, d, null, null, d) : ze(d) ? Se(Y, { children: d }, null, null, null) : d.__b > 0 ? Se(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = En(d, S, w = l + C, L)) === -1 ? _ = re : (_ = S[g] || re, S[g] = void 0, L--), tt(n, d, _, s, o, a, r, u, h, p), f = d.__e, (v = d.ref) && _.ref != v && (_.ref && nt(_.ref, null, d), p.push(v, d.__c || f, d)), f != null && (m == null && (m = f), (T = _ === re || _.__v === null) ? g == -1 && C-- : g !== w && (g === w + 1 ? C++ : g > w ? L > U - w ? C += g - w : C-- : C = g < w && g == w - 1 ? g - w : 0), w = l + C, typeof d.type != "function" || g === w && _.__k !== d.__k ? typeof d.type == "function" || g === w && !T ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = en(n, f, u) : u = Qt(d, u, n), typeof t.type == "function" && (t.__d = u))) : (_ = S[l]) && _.key == null && _.__e && (_.__e == u && (_.__ = i, u = ge(_)), Ge(_, _, !1), S[l] = null);
71
71
  for (t.__e = m, l = O; l--; )
72
72
  S[l] != null && (typeof t.type == "function" && S[l].__e != null && S[l].__e == t.__d && (t.__d = S[l].__e.nextSibling), Ge(S[l], S[l]));
73
73
  }
@@ -148,35 +148,35 @@ function dt(n) {
148
148
  return;
149
149
  } else
150
150
  n.t = Date.now();
151
- return e(w.event ? w.event(n) : n);
151
+ return e(b.event ? b.event(n) : n);
152
152
  }
153
153
  function ht(n) {
154
- return this.l[n.type + !0](w.event ? w.event(n) : n);
154
+ return this.l[n.type + !0](b.event ? b.event(n) : n);
155
155
  }
156
156
  function tt(n, e, t, i, s, o, a, r, u, h) {
157
- var p, l, v, _, d, f, m, b, g, T, C, S, O, L, U, z = e.type;
157
+ var p, l, v, _, d, f, m, w, g, T, C, S, O, L, U, z = e.type;
158
158
  if (e.constructor !== void 0)
159
159
  return null;
160
- t.__h != null && (u = t.__h, r = e.__e = t.__e, e.__h = null, o = [r]), (p = w.__b) && p(e);
160
+ t.__h != null && (u = t.__h, r = e.__e = t.__e, e.__h = null, o = [r]), (p = b.__b) && p(e);
161
161
  e:
162
162
  if (typeof z == "function")
163
163
  try {
164
- if (b = e.props, g = (p = z.contextType) && i[p.__c], T = p ? g ? g.props.value : p.__ : i, t.__c ? m = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(b, T) : (e.__c = l = new F(b, T), l.constructor = z, l.render = An), g && g.sub(l), l.props = b, l.state || (l.state = {}), l.context = T, l.__n = i, v = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = G({}, l.__s)), G(l.__s, z.getDerivedStateFromProps(b, l.__s))), _ = l.props, d = l.state, l.__v = e, v)
164
+ if (w = e.props, g = (p = z.contextType) && i[p.__c], T = p ? g ? g.props.value : p.__ : i, t.__c ? m = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(w, T) : (e.__c = l = new F(w, T), l.constructor = z, l.render = An), g && g.sub(l), l.props = w, l.state || (l.state = {}), l.context = T, l.__n = i, v = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = G({}, l.__s)), G(l.__s, z.getDerivedStateFromProps(w, l.__s))), _ = l.props, d = l.state, l.__v = e, v)
165
165
  z.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), l.componentDidMount != null && l.__h.push(l.componentDidMount);
166
166
  else {
167
- if (z.getDerivedStateFromProps == null && b !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(b, T), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(b, l.__s, T) === !1 || e.__v === t.__v)) {
168
- for (e.__v !== t.__v && (l.props = b, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(ye) {
167
+ if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, T), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, T) === !1 || e.__v === t.__v)) {
168
+ for (e.__v !== t.__v && (l.props = w, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(ye) {
169
169
  ye && (ye.__ = e);
170
170
  }), C = 0; C < l._sb.length; C++)
171
171
  l.__h.push(l._sb[C]);
172
172
  l._sb = [], l.__h.length && a.push(l);
173
173
  break e;
174
174
  }
175
- l.componentWillUpdate != null && l.componentWillUpdate(b, l.__s, T), l.componentDidUpdate != null && l.__h.push(function() {
175
+ l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s, T), l.componentDidUpdate != null && l.__h.push(function() {
176
176
  l.componentDidUpdate(_, d, f);
177
177
  });
178
178
  }
179
- if (l.context = T, l.props = b, l.__P = n, l.__e = !1, S = w.__r, O = 0, "prototype" in z && z.prototype.render) {
179
+ if (l.context = T, l.props = w, l.__P = n, l.__e = !1, S = b.__r, O = 0, "prototype" in z && z.prototype.render) {
180
180
  for (l.state = l.__s, l.__d = !1, S && S(e), p = l.render(l.props, l.state, l.context), L = 0; L < l._sb.length; L++)
181
181
  l.__h.push(l._sb[L]);
182
182
  l._sb = [];
@@ -186,22 +186,22 @@ function tt(n, e, t, i, s, o, a, r, u, h) {
186
186
  while (l.__d && ++O < 25);
187
187
  l.state = l.__s, l.getChildContext != null && (i = G(G({}, i), l.getChildContext())), v || l.getSnapshotBeforeUpdate == null || (f = l.getSnapshotBeforeUpdate(_, d)), Kt(n, ze(U = p != null && p.type === Y && p.key == null ? p.props.children : p) ? U : [U], e, t, i, s, o, a, r, u, h), l.base = e.__e, e.__h = null, l.__h.length && a.push(l), m && (l.__E = l.__ = null);
188
188
  } catch (ye) {
189
- e.__v = null, (u || o != null) && (e.__e = r, e.__h = !!u, o[o.indexOf(r)] = null), w.__e(ye, e, t);
189
+ e.__v = null, (u || o != null) && (e.__e = r, e.__h = !!u, o[o.indexOf(r)] = null), b.__e(ye, e, t);
190
190
  }
191
191
  else
192
192
  o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = $n(t.__e, e, t, i, s, o, a, u, h);
193
- (p = w.diffed) && p(e);
193
+ (p = b.diffed) && p(e);
194
194
  }
195
195
  function tn(n, e, t) {
196
196
  for (var i = 0; i < t.length; i++)
197
197
  nt(t[i], t[++i], t[++i]);
198
- w.__c && w.__c(e, n), n.some(function(s) {
198
+ b.__c && b.__c(e, n), n.some(function(s) {
199
199
  try {
200
200
  n = s.__h, s.__h = [], n.some(function(o) {
201
201
  o.call(s);
202
202
  });
203
203
  } catch (o) {
204
- w.__e(o, s.__v);
204
+ b.__e(o, s.__v);
205
205
  }
206
206
  });
207
207
  }
@@ -241,17 +241,17 @@ function nt(n, e, t) {
241
241
  try {
242
242
  typeof n == "function" ? n(e) : n.current = e;
243
243
  } catch (i) {
244
- w.__e(i, t);
244
+ b.__e(i, t);
245
245
  }
246
246
  }
247
247
  function Ge(n, e, t) {
248
248
  var i, s;
249
- if (w.unmount && w.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || nt(i, null, e)), (i = n.__c) != null) {
249
+ if (b.unmount && b.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || nt(i, null, e)), (i = n.__c) != null) {
250
250
  if (i.componentWillUnmount)
251
251
  try {
252
252
  i.componentWillUnmount();
253
253
  } catch (o) {
254
- w.__e(o, e);
254
+ b.__e(o, e);
255
255
  }
256
256
  i.base = i.__P = null, n.__c = void 0;
257
257
  }
@@ -265,7 +265,7 @@ function An(n, e, t) {
265
265
  }
266
266
  function ae(n, e, t) {
267
267
  var i, s, o, a;
268
- w.__ && w.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], tt(e, n = (!i && t || e).__k = j(Y, null, [n]), s || re, re, e.ownerSVGElement !== void 0, !i && t ? [t] : s ? null : e.firstChild ? Le.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, a), tn(o, n, a);
268
+ b.__ && b.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], tt(e, n = (!i && t || e).__k = j(Y, null, [n]), s || re, re, e.ownerSVGElement !== void 0, !i && t ? [t] : s ? null : e.firstChild ? Le.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, a), tn(o, n, a);
269
269
  }
270
270
  function In(n, e) {
271
271
  var t = { __c: e = "__cC" + Xt++, __: n, Consumer: function(i, s) {
@@ -288,7 +288,7 @@ function In(n, e) {
288
288
  } };
289
289
  return t.Provider.__ = t.Consumer.contextType = t;
290
290
  }
291
- Le = Zt.slice, w = { __e: function(n, e, t, i) {
291
+ Le = Zt.slice, b = { __e: function(n, e, t, i) {
292
292
  for (var s, o, a; e = e.__; )
293
293
  if ((s = e.__c) && !s.__)
294
294
  try {
@@ -1234,9 +1234,9 @@ function on(n, e, t, i) {
1234
1234
  y: r
1235
1235
  };
1236
1236
  }
1237
- var le, k, Re, ft, we = 0, an = [], ke = [], vt = w.__b, mt = w.__r, _t = w.diffed, gt = w.__c, wt = w.unmount;
1237
+ var le, k, Re, ft, we = 0, an = [], ke = [], vt = b.__b, mt = b.__r, _t = b.diffed, gt = b.__c, wt = b.unmount;
1238
1238
  function He(n, e) {
1239
- w.__h && w.__h(k, n, we || e), we = 0;
1239
+ b.__h && b.__h(k, n, we || e), we = 0;
1240
1240
  var t = k.__H || (k.__H = { __: [], __h: [] });
1241
1241
  return n >= t.__.length && t.__.push({ __V: ke }), t.__[n];
1242
1242
  }
@@ -1281,7 +1281,7 @@ function Pn(n, e, t) {
1281
1281
  }
1282
1282
  function D(n, e) {
1283
1283
  var t = He(le++, 3);
1284
- !w.__s && cn(t.__H, e) && (t.__ = n, t.i = e, k.__H.__h.push(t));
1284
+ !b.__s && cn(t.__H, e) && (t.__ = n, t.i = e, k.__H.__h.push(t));
1285
1285
  }
1286
1286
  function P(n) {
1287
1287
  return we = 5, X(function() {
@@ -1307,24 +1307,24 @@ function Rn() {
1307
1307
  try {
1308
1308
  n.__H.__h.forEach(Ne), n.__H.__h.forEach(Ke), n.__H.__h = [];
1309
1309
  } catch (e) {
1310
- n.__H.__h = [], w.__e(e, n.__v);
1310
+ n.__H.__h = [], b.__e(e, n.__v);
1311
1311
  }
1312
1312
  }
1313
- w.__b = function(n) {
1313
+ b.__b = function(n) {
1314
1314
  k = null, vt && vt(n);
1315
- }, w.__r = function(n) {
1315
+ }, b.__r = function(n) {
1316
1316
  mt && mt(n), le = 0;
1317
1317
  var e = (k = n.__c).__H;
1318
1318
  e && (Re === k ? (e.__h = [], k.__h = [], e.__.forEach(function(t) {
1319
1319
  t.__N && (t.__ = t.__N), t.__V = ke, t.__N = t.i = void 0;
1320
1320
  })) : (e.__h.forEach(Ne), e.__h.forEach(Ke), e.__h = [], le = 0)), Re = k;
1321
- }, w.diffed = function(n) {
1321
+ }, b.diffed = function(n) {
1322
1322
  _t && _t(n);
1323
1323
  var e = n.__c;
1324
- e && e.__H && (e.__H.__h.length && (an.push(e) !== 1 && ft === w.requestAnimationFrame || ((ft = w.requestAnimationFrame) || Fn)(Rn)), e.__H.__.forEach(function(t) {
1324
+ e && e.__H && (e.__H.__h.length && (an.push(e) !== 1 && ft === b.requestAnimationFrame || ((ft = b.requestAnimationFrame) || Fn)(Rn)), e.__H.__.forEach(function(t) {
1325
1325
  t.i && (t.__H = t.i), t.__V !== ke && (t.__ = t.__V), t.i = void 0, t.__V = ke;
1326
1326
  })), Re = k = null;
1327
- }, w.__c = function(n, e) {
1327
+ }, b.__c = function(n, e) {
1328
1328
  e.some(function(t) {
1329
1329
  try {
1330
1330
  t.__h.forEach(Ne), t.__h = t.__h.filter(function(i) {
@@ -1333,10 +1333,10 @@ w.__b = function(n) {
1333
1333
  } catch (i) {
1334
1334
  e.some(function(s) {
1335
1335
  s.__h && (s.__h = []);
1336
- }), e = [], w.__e(i, t.__v);
1336
+ }), e = [], b.__e(i, t.__v);
1337
1337
  }
1338
1338
  }), gt && gt(n, e);
1339
- }, w.unmount = function(n) {
1339
+ }, b.unmount = function(n) {
1340
1340
  wt && wt(n);
1341
1341
  var e, t = n.__c;
1342
1342
  t && t.__H && (t.__H.__.forEach(function(i) {
@@ -1345,7 +1345,7 @@ w.__b = function(n) {
1345
1345
  } catch (s) {
1346
1346
  e = s;
1347
1347
  }
1348
- }), t.__H = void 0, e && w.__e(e, t.__v));
1348
+ }), t.__H = void 0, e && b.__e(e, t.__v));
1349
1349
  };
1350
1350
  var bt = typeof requestAnimationFrame == "function";
1351
1351
  function Fn(n) {
@@ -1604,7 +1604,7 @@ function at(n) {
1604
1604
  }
1605
1605
  var Be, Ue;
1606
1606
  function ue(n, e) {
1607
- w[n] = e.bind(null, w[n] || function() {
1607
+ b[n] = e.bind(null, b[n] || function() {
1608
1608
  });
1609
1609
  }
1610
1610
  function De(n) {
@@ -1751,7 +1751,7 @@ function c(n, e, t, i, s, o) {
1751
1751
  if (typeof n == "function" && (a = n.defaultProps))
1752
1752
  for (r in a)
1753
1753
  u[r] === void 0 && (u[r] = a[r]);
1754
- return w.vnode && w.vnode(h), h;
1754
+ return b.vnode && b.vnode(h), h;
1755
1755
  }
1756
1756
  const jn = () => c("svg", {
1757
1757
  viewBox: "0 0 1024 1024",
@@ -2169,9 +2169,9 @@ const te = new M("markdown-message"), wi = (n) => {
2169
2169
  n.controller.handleSuggestionClick(n.message, v, _);
2170
2170
  }, l = (v) => {
2171
2171
  const _ = v.indexOf("<think>"), d = v.indexOf("</think>");
2172
- let f = "", m = "", b = !1;
2173
- return d === -1 ? (b = !1, f = v.slice(_ + 7), m = "") : (b = !0, f = v.slice(_ + 7, d), m = v.slice(d + 8)), {
2174
- isThoughtCompleted: b,
2172
+ let f = "", m = "", w = !1;
2173
+ return d === -1 ? (w = !1, f = v.slice(_ + 7), m = "") : (w = !0, f = v.slice(_ + 7, d), m = v.slice(d + 8)), {
2174
+ isThoughtCompleted: w,
2175
2175
  thoughtContent: f,
2176
2176
  answerContent: m
2177
2177
  };
@@ -2566,7 +2566,7 @@ class je {
2566
2566
  }
2567
2567
  }
2568
2568
  const H = new M("chat-toolbar-item"), Ni = (n) => {
2569
- var f, m, b;
2569
+ var f, m, w;
2570
2570
  const {
2571
2571
  model: e,
2572
2572
  data: t,
@@ -2629,7 +2629,7 @@ const H = new M("chat-toolbar-item"), Ni = (n) => {
2629
2629
  }), r && c("div", {
2630
2630
  ref: h,
2631
2631
  className: H.b("dropdown"),
2632
- children: (b = e.children) == null ? void 0 : b.map((g, T) => {
2632
+ children: (w = e.children) == null ? void 0 : w.map((g, T) => {
2633
2633
  if (!p(g))
2634
2634
  return c("div", {
2635
2635
  title: g.title,
@@ -2740,8 +2740,8 @@ const Ei = new M("chat-toolbar"), et = (n) => {
2740
2740
  })), f.onClick && typeof f.onClick == "function")
2741
2741
  f.onClick(d, f, e.context, e.params, m);
2742
2742
  else {
2743
- const b = n.controller.opts.extendToolbarClick;
2744
- b && typeof b == "function" && b(d, f, e.context, e.params, m);
2743
+ const w = n.controller.opts.extendToolbarClick;
2744
+ w && typeof w == "function" && w(d, f, e.context, e.params, m);
2745
2745
  }
2746
2746
  }, _ = X(() => s === "content" && (i == null ? void 0 : i.state) === 20 && (i == null ? void 0 : i.completed) !== !0, [i == null ? void 0 : i.state, i == null ? void 0 : i.completed]);
2747
2747
  return c("div", {
@@ -2867,12 +2867,12 @@ function kt(n) {
2867
2867
  (kt.prototype = new F()).isPureReactComponent = !0, kt.prototype.shouldComponentUpdate = function(n, e) {
2868
2868
  return St(this.props, n) || St(this.state, e);
2869
2869
  };
2870
- var Nt = w.__b;
2871
- w.__b = function(n) {
2870
+ var Nt = b.__b;
2871
+ b.__b = function(n) {
2872
2872
  n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Nt && Nt(n);
2873
2873
  };
2874
- var Ii = w.__e;
2875
- w.__e = function(n, e, t, i) {
2874
+ var Ii = b.__e;
2875
+ b.__e = function(n, e, t, i) {
2876
2876
  if (n.then) {
2877
2877
  for (var s, o = e; o = o.__; )
2878
2878
  if ((s = o.__c) && s.__c)
@@ -2880,7 +2880,7 @@ w.__e = function(n, e, t, i) {
2880
2880
  }
2881
2881
  Ii(n, e, t, i);
2882
2882
  };
2883
- var Et = w.unmount;
2883
+ var Et = b.unmount;
2884
2884
  function bn(n, e, t) {
2885
2885
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
2886
2886
  typeof i.__c == "function" && i.__c();
@@ -2903,7 +2903,7 @@ function Cn(n) {
2903
2903
  function Te() {
2904
2904
  this.u = null, this.o = null;
2905
2905
  }
2906
- w.unmount = function(n) {
2906
+ b.unmount = function(n) {
2907
2907
  var e = n.__c;
2908
2908
  e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), Et && Et(n);
2909
2909
  }, (Ye.prototype = new F()).__c = function(n, e) {
@@ -3000,7 +3000,7 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
3000
3000
  Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
3001
3001
  } });
3002
3002
  });
3003
- var $t = w.event;
3003
+ var $t = b.event;
3004
3004
  function Ui() {
3005
3005
  }
3006
3006
  function Wi() {
@@ -3009,13 +3009,13 @@ function Wi() {
3009
3009
  function Vi() {
3010
3010
  return this.defaultPrevented;
3011
3011
  }
3012
- w.event = function(n) {
3012
+ b.event = function(n) {
3013
3013
  return $t && (n = $t(n)), n.persist = Ui, n.isPropagationStopped = Wi, n.isDefaultPrevented = Vi, n.nativeEvent = n;
3014
3014
  };
3015
3015
  var qi = { enumerable: !1, configurable: !0, get: function() {
3016
3016
  return this.class;
3017
- } }, At = w.vnode;
3018
- w.vnode = function(n) {
3017
+ } }, At = b.vnode;
3018
+ b.vnode = function(n) {
3019
3019
  typeof n.type == "string" && function(e) {
3020
3020
  var t = e.props, i = e.type, s = {};
3021
3021
  for (var o in t) {
@@ -3032,12 +3032,12 @@ w.vnode = function(n) {
3032
3032
  })), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", qi)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
3033
3033
  }(n), n.$$typeof = Hi, At && At(n);
3034
3034
  };
3035
- var It = w.__r;
3036
- w.__r = function(n) {
3035
+ var It = b.__r;
3036
+ b.__r = function(n) {
3037
3037
  It && It(n), n.__c;
3038
3038
  };
3039
- var Dt = w.diffed;
3040
- w.diffed = function(n) {
3039
+ var Dt = b.diffed;
3040
+ b.diffed = function(n) {
3041
3041
  Dt && Dt(n);
3042
3042
  var e = n.props, t = n.__e;
3043
3043
  t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
@@ -3072,8 +3072,8 @@ typeof window > "u" ? ((fe = function(n) {
3072
3072
  i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", r), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", _e.set(i, { destroy: u, update: p }), p();
3073
3073
  }
3074
3074
  function h(l) {
3075
- var v, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, m = l.testForHeightReduction, b = m === void 0 || m, g = a.overflowY;
3076
- if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), b && (v = function(C) {
3075
+ var v, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, m = l.testForHeightReduction, w = m === void 0 || m, g = a.overflowY;
3076
+ if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (v = function(C) {
3077
3077
  for (var S = []; C && C.parentNode && C.parentNode instanceof Element; )
3078
3078
  C.parentNode.scrollTop && S.push([C.parentNode, C.parentNode.scrollTop]), C = C.parentNode;
3079
3079
  return function() {
@@ -4205,7 +4205,8 @@ const xn = ({
4205
4205
  }, d.id)))
4206
4206
  }), v.current)]
4207
4207
  });
4208
- }, $ = new M("chat-input"), Ot = window.SpeechRecognition || window.webkitSpeechRecognition, Bt = (n) => {
4208
+ };
4209
+ const $ = new M("chat-input"), Ot = window.SpeechRecognition || window.webkitSpeechRecognition, Bt = (n) => {
4209
4210
  var f;
4210
4211
  const [e, t] = K(!1), i = P(null), s = n.controller.input, o = I(!1), a = P();
4211
4212
  Ot && !a.current && (a.current = new Ot(), a.current.onstart = () => {
@@ -4214,8 +4215,8 @@ const xn = ({
4214
4215
  o.value = !1;
4215
4216
  }, a.current.onresult = (m) => {
4216
4217
  var g, T, C;
4217
- const b = (C = (T = (g = m.results) == null ? void 0 : g[0]) == null ? void 0 : T[0]) == null ? void 0 : C.transcript;
4218
- b && (s.value = "".concat(s.value).concat(b));
4218
+ const w = (C = (T = (g = m.results) == null ? void 0 : g[0]) == null ? void 0 : T[0]) == null ? void 0 : C.transcript;
4219
+ w && (s.value = "".concat(s.value).concat(w));
4219
4220
  });
4220
4221
  const r = () => {
4221
4222
  a.current && !o.value && a.current.start();
@@ -4226,11 +4227,14 @@ const xn = ({
4226
4227
  i.current && Lt.destroy(i.current);
4227
4228
  }), [i]);
4228
4229
  const p = Fe(async () => {
4230
+ var m;
4229
4231
  try {
4230
- const m = s.value;
4231
- s.value = "", await n.controller.question(m);
4232
- } catch (m) {
4233
- console.error(m);
4232
+ const w = s.value;
4233
+ s.value = "", await n.controller.question(w);
4234
+ } catch (w) {
4235
+ console.error(w);
4236
+ } finally {
4237
+ (m = i.current) == null || m.focus();
4234
4238
  }
4235
4239
  }, [s]), l = Fe(async () => {
4236
4240
  try {
@@ -4242,8 +4246,8 @@ const xn = ({
4242
4246
  m.code === "Enter" && !m.isComposing && (m.stopPropagation(), m.shiftKey === !1 && p());
4243
4247
  }, _ = async (m) => {
4244
4248
  await Ht.getMaterialHelper("ossfile", n.controller).excuteAction(m), t(!1);
4245
- }, d = async (m, b) => {
4246
- await Ht.getMaterialHelper("common", n.controller).excuteAction(m, b), t(!1);
4249
+ }, d = async (m, w) => {
4250
+ await Ht.getMaterialHelper("common", n.controller).excuteAction(m, w), t(!1);
4247
4251
  };
4248
4252
  return c("div", {
4249
4253
  className: $.b("wrapper"),
@@ -4287,7 +4291,7 @@ const xn = ({
4287
4291
  children: "文件资料"
4288
4292
  })]
4289
4293
  }), (f = n.questionToolbarItems) == null ? void 0 : f.map((m) => {
4290
- var b, g, T;
4294
+ var w, g, T;
4291
4295
  return c("div", {
4292
4296
  className: $.b("pop-action-item"),
4293
4297
  onClick: (C) => {
@@ -4295,7 +4299,7 @@ const xn = ({
4295
4299
  },
4296
4300
  children: [c("span", {
4297
4301
  className: $.b("pop-action-item-icon"),
4298
- children: typeof m.icon == "function" ? m.icon() : ((b = m.icon) == null ? void 0 : b.showIcon) && c(Y, {
4302
+ children: typeof m.icon == "function" ? m.icon() : ((w = m.icon) == null ? void 0 : w.showIcon) && c(Y, {
4299
4303
  children: (g = m.icon) != null && g.cssClass ? c("i", {
4300
4304
  className: m.icon.cssClass
4301
4305
  }) : (T = m.icon) != null && T.imagePath ? it(m.icon.imagePath) ? c("div", {
@@ -4351,8 +4355,8 @@ const R = new M("chat-topic-item"), es = (n) => {
4351
4355
  f.stopPropagation(), s("LINK", f);
4352
4356
  }, l = (f, m) => {
4353
4357
  f === "DELETE" ? s("DELETE", m) : f === "RENAME" && (h.value = !0, setTimeout(() => {
4354
- var b;
4355
- (b = o.current) == null || b.focus();
4358
+ var w;
4359
+ (w = o.current) == null || w.focus();
4356
4360
  }, 100)), u(!1);
4357
4361
  }, v = (f) => {
4358
4362
  var m;
@@ -4509,9 +4513,9 @@ const oe = new M("chat-minimize"), is = (n) => {
4509
4513
  return d ? d.role === "ASSISTANT" && d.state === 20 && d.completed !== !0 : !1;
4510
4514
  }), h = (d) => {
4511
4515
  const f = d.indexOf("<think>"), m = d.indexOf("</think>");
4512
- let b = "", g = "";
4513
- return m === -1 ? (b = d.slice(f + 7), g = "") : (b = d.slice(f + 7, m), g = d.slice(m + 8)), {
4514
- thoughtContent: b,
4516
+ let w = "", g = "";
4517
+ return m === -1 ? (w = d.slice(f + 7), g = "") : (w = d.slice(f + 7, m), g = d.slice(m + 8)), {
4518
+ thoughtContent: w,
4515
4519
  answerContent: g
4516
4520
  };
4517
4521
  }, p = B(() => {
@@ -4522,9 +4526,9 @@ const oe = new M("chat-minimize"), is = (n) => {
4522
4526
  if (d = f.content, f.content.indexOf("<think>") !== -1) {
4523
4527
  const {
4524
4528
  thoughtContent: m,
4525
- answerContent: b
4529
+ answerContent: w
4526
4530
  } = h(f.content);
4527
- d = m + b;
4531
+ d = m + w;
4528
4532
  }
4529
4533
  return d;
4530
4534
  }), l = () => {
@@ -4536,11 +4540,11 @@ const oe = new M("chat-minimize"), is = (n) => {
4536
4540
  const d = e.current;
4537
4541
  d && (d.onmousedown = (f) => {
4538
4542
  document.body.style.userSelect = "none";
4539
- const m = f.clientX - d.offsetLeft, b = f.clientY - d.offsetTop, g = Date.now(), T = (S) => {
4543
+ const m = f.clientX - d.offsetLeft, w = f.clientY - d.offsetTop, g = Date.now(), T = (S) => {
4540
4544
  const O = 56 / window.innerWidth, L = 56 / window.innerHeight, {
4541
4545
  x: U,
4542
4546
  y: z
4543
- } = on(S.clientX - m, S.clientY - b, O, L);
4547
+ } = on(S.clientX - m, S.clientY - w, O, L);
4544
4548
  Object.assign(r, {
4545
4549
  x: U,
4546
4550
  y: z