@ibiz-template-plugin/ai-chat 0.0.29 → 0.0.30
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 +1118 -893
- package/dist/index.legacy.js +1 -1
- package/dist/polyfills.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chat-tool-call/chat-tool-call.d.ts +10 -0
- package/dist/types/components/chat-tool-call-item/chat-tool-call-item.d.ts +10 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +7 -0
- package/dist/types/entity/chat-message/chat-message.d.ts +6 -0
- package/dist/types/interface/i-chat-message/i-chat-message.d.ts +7 -0
- package/dist/types/interface/i-chat-tool-call/i-chat-tool-call.d.ts +39 -0
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/util/chat-tool-call-parser.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4,8 +4,8 @@ var In = (n, e, t) => e in n ? An(n, e, { enumerable: !0, configurable: !0, writ
|
|
|
4
4
|
var S = (n, e, t) => (In(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
5
|
import Pe from "interactjs";
|
|
6
6
|
import qt from "cherry-markdown";
|
|
7
|
-
var Le, b, Yt, Xt, ne, ct, Zt, Xe,
|
|
8
|
-
function
|
|
7
|
+
var Le, b, Yt, Xt, ne, ct, Zt, Xe, Jt, re = {}, Gt = [], Dn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
|
|
8
|
+
function J(n, e) {
|
|
9
9
|
for (var t in e)
|
|
10
10
|
n[t] = e[t];
|
|
11
11
|
return n;
|
|
@@ -56,49 +56,49 @@ function Qt(n) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function Ze(n) {
|
|
59
|
-
(!n.__d && (n.__d = !0) && ne.push(n) && !
|
|
59
|
+
(!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) || Zt)(Ee);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
var n, e, t, i, s, o, a,
|
|
61
|
+
function Ee() {
|
|
62
|
+
var n, e, t, i, s, o, a, c, u;
|
|
63
63
|
for (ne.sort(Xe); n = ne.shift(); )
|
|
64
|
-
n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0,
|
|
65
|
-
|
|
64
|
+
n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0, c = (a = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = J({}, a)).__v = a.__v + 1, tt(u, a, o, t.__n, u.ownerSVGElement !== void 0, a.__h != null ? [c] : null, i, c == null ? we(a) : c, a.__h, s), sn(i, a, s), a.__e != c && Qt(a)), ne.length > e && ne.sort(Xe));
|
|
65
|
+
Ee.__r = 0;
|
|
66
66
|
}
|
|
67
|
-
function en(n, e, t, i, s, o, a,
|
|
68
|
-
var l,
|
|
67
|
+
function en(n, e, t, i, s, o, a, c, u, h, p) {
|
|
68
|
+
var l, m, _, d, f, v, w, g, C, T = 0, x = i && i.__k || Gt, O = x.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" ? ke(null, d, null, null, d) : ze(d) ? ke(Y, { children: d }, null, null, null) : d.__b > 0 ? ke(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = Ln(d, x, w = l +
|
|
71
|
-
for (t.__e =
|
|
72
|
-
x[l] != null && (typeof t.type == "function" && x[l].__e != null && x[l].__e == t.__d && (t.__d = x[l].__e.nextSibling),
|
|
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" ? ke(null, d, null, null, d) : ze(d) ? ke(Y, { children: d }, null, null, null) : d.__b > 0 ? ke(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = Ln(d, x, w = l + T, L)) === -1 ? _ = re : (_ = x[g] || re, x[g] = void 0, L--), tt(n, d, _, s, o, a, c, u, h, p), f = d.__e, (m = d.ref) && _.ref != m && (_.ref && nt(_.ref, null, d), p.push(m, d.__c || f, d)), f != null && (v == null && (v = f), (C = _ === re || _.__v === null) ? g == -1 && T-- : g !== w && (g === w + 1 ? T++ : g > w ? L > U - w ? T += g - w : T-- : T = g < w && g == w - 1 ? g - w : 0), w = l + T, typeof d.type != "function" || g === w && _.__k !== d.__k ? typeof d.type == "function" || g === w && !C ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = nn(n, f, u) : u = tn(d, u, n), typeof t.type == "function" && (t.__d = u))) : (_ = x[l]) && _.key == null && _.__e && (_.__e == u && (_.__ = i, u = we(_)), Je(_, _, !1), x[l] = null);
|
|
71
|
+
for (t.__e = v, l = O; l--; )
|
|
72
|
+
x[l] != null && (typeof t.type == "function" && x[l].__e != null && x[l].__e == t.__d && (t.__d = x[l].__e.nextSibling), Je(x[l], x[l]));
|
|
73
73
|
}
|
|
74
74
|
function tn(n, e, t) {
|
|
75
75
|
for (var i, s = n.__k, o = 0; s && o < s.length; o++)
|
|
76
76
|
(i = s[o]) && (i.__ = n, e = typeof i.type == "function" ? tn(i, e, t) : nn(t, i.__e, e));
|
|
77
77
|
return e;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Me(n, e) {
|
|
80
80
|
return e = e || [], n == null || typeof n == "boolean" || (ze(n) ? n.some(function(t) {
|
|
81
|
-
|
|
81
|
+
Me(t, e);
|
|
82
82
|
}) : e.push(n)), e;
|
|
83
83
|
}
|
|
84
84
|
function nn(n, e, t) {
|
|
85
85
|
return t == null || t.parentNode !== n ? n.insertBefore(e, null) : e == t && e.parentNode != null || n.insertBefore(e, t), e.nextSibling;
|
|
86
86
|
}
|
|
87
87
|
function Ln(n, e, t, i) {
|
|
88
|
-
var s = n.key, o = n.type, a = t - 1,
|
|
88
|
+
var s = n.key, o = n.type, a = t - 1, c = t + 1, u = e[t];
|
|
89
89
|
if (u === null || u && s == u.key && o === u.type)
|
|
90
90
|
return t;
|
|
91
91
|
if (i > (u != null ? 1 : 0))
|
|
92
|
-
for (; a >= 0 ||
|
|
92
|
+
for (; a >= 0 || c < e.length; ) {
|
|
93
93
|
if (a >= 0) {
|
|
94
94
|
if ((u = e[a]) && s == u.key && o === u.type)
|
|
95
95
|
return a;
|
|
96
96
|
a--;
|
|
97
97
|
}
|
|
98
|
-
if (
|
|
99
|
-
if ((u = e[
|
|
100
|
-
return
|
|
101
|
-
|
|
98
|
+
if (c < e.length) {
|
|
99
|
+
if ((u = e[c]) && s == u.key && o === u.type)
|
|
100
|
+
return c;
|
|
101
|
+
c++;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
return -1;
|
|
@@ -153,30 +153,30 @@ function dt(n) {
|
|
|
153
153
|
function ht(n) {
|
|
154
154
|
return this.l[n.type + !0](b.event ? b.event(n) : n);
|
|
155
155
|
}
|
|
156
|
-
function tt(n, e, t, i, s, o, a,
|
|
157
|
-
var p, l,
|
|
156
|
+
function tt(n, e, t, i, s, o, a, c, u, h) {
|
|
157
|
+
var p, l, m, _, d, f, v, w, g, C, T, x, O, L, U, z = e.type;
|
|
158
158
|
if (e.constructor !== void 0)
|
|
159
159
|
return null;
|
|
160
|
-
t.__h != null && (u = t.__h,
|
|
160
|
+
t.__h != null && (u = t.__h, c = e.__e = t.__e, e.__h = null, o = [c]), (p = b.__b) && p(e);
|
|
161
161
|
e:
|
|
162
162
|
if (typeof z == "function")
|
|
163
163
|
try {
|
|
164
|
-
if (w = e.props, g = (p = z.contextType) && i[p.__c],
|
|
164
|
+
if (w = e.props, g = (p = z.contextType) && i[p.__c], C = p ? g ? g.props.value : p.__ : i, t.__c ? v = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(w, C) : (e.__c = l = new F(w, C), l.constructor = z, l.render = On), g && g.sub(l), l.props = w, l.state || (l.state = {}), l.context = C, l.__n = i, m = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = J({}, l.__s)), J(l.__s, z.getDerivedStateFromProps(w, l.__s))), _ = l.props, d = l.state, l.__v = e, m)
|
|
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 && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w,
|
|
167
|
+
if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, C), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, C) === !1 || e.__v === t.__v)) {
|
|
168
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(Ce) {
|
|
169
169
|
Ce && (Ce.__ = e);
|
|
170
|
-
}),
|
|
171
|
-
l.__h.push(l._sb[
|
|
170
|
+
}), T = 0; T < l._sb.length; T++)
|
|
171
|
+
l.__h.push(l._sb[T]);
|
|
172
172
|
l._sb = [], l.__h.length && a.push(l);
|
|
173
173
|
break e;
|
|
174
174
|
}
|
|
175
|
-
l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s,
|
|
175
|
+
l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s, C), l.componentDidUpdate != null && l.__h.push(function() {
|
|
176
176
|
l.componentDidUpdate(_, d, f);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
if (l.context =
|
|
179
|
+
if (l.context = C, l.props = w, l.__P = n, l.__e = !1, x = b.__r, O = 0, "prototype" in z && z.prototype.render) {
|
|
180
180
|
for (l.state = l.__s, l.__d = !1, x && x(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 = [];
|
|
@@ -184,9 +184,9 @@ function tt(n, e, t, i, s, o, a, r, u, h) {
|
|
|
184
184
|
do
|
|
185
185
|
l.__d = !1, x && x(e), p = l.render(l.props, l.state, l.context), l.state = l.__s;
|
|
186
186
|
while (l.__d && ++O < 25);
|
|
187
|
-
l.state = l.__s, l.getChildContext != null && (i =
|
|
187
|
+
l.state = l.__s, l.getChildContext != null && (i = J(J({}, i), l.getChildContext())), m || l.getSnapshotBeforeUpdate == null || (f = l.getSnapshotBeforeUpdate(_, d)), en(n, ze(U = p != null && p.type === Y && p.key == null ? p.props.children : p) ? U : [U], e, t, i, s, o, a, c, u, h), l.base = e.__e, e.__h = null, l.__h.length && a.push(l), v && (l.__E = l.__ = null);
|
|
188
188
|
} catch (Ce) {
|
|
189
|
-
e.__v = null, (u || o != null) && (e.__e =
|
|
189
|
+
e.__v = null, (u || o != null) && (e.__e = c, e.__h = !!u, o[o.indexOf(c)] = null), b.__e(Ce, 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 = Hn(t.__e, e, t, i, s, o, a, u, h);
|
|
@@ -205,8 +205,8 @@ function sn(n, e, t) {
|
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
function Hn(n, e, t, i, s, o, a,
|
|
209
|
-
var h, p, l,
|
|
208
|
+
function Hn(n, e, t, i, s, o, a, c, u) {
|
|
209
|
+
var h, p, l, m = t.props, _ = e.props, d = e.type, f = 0;
|
|
210
210
|
if (d === "svg" && (s = !0), o != null) {
|
|
211
211
|
for (; f < o.length; f++)
|
|
212
212
|
if ((h = o[f]) && "setAttribute" in h == !!d && (d ? h.localName === d : h.nodeType === 3)) {
|
|
@@ -217,23 +217,23 @@ function Hn(n, e, t, i, s, o, a, r, u) {
|
|
|
217
217
|
if (n == null) {
|
|
218
218
|
if (d === null)
|
|
219
219
|
return document.createTextNode(_);
|
|
220
|
-
n = s ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, _.is && _), o = null,
|
|
220
|
+
n = s ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, _.is && _), o = null, c = !1;
|
|
221
221
|
}
|
|
222
222
|
if (d === null)
|
|
223
|
-
|
|
223
|
+
m === _ || c && n.data === _ || (n.data = _);
|
|
224
224
|
else {
|
|
225
|
-
if (o = o && Le.call(n.childNodes), p = (
|
|
225
|
+
if (o = o && Le.call(n.childNodes), p = (m = t.props || re).dangerouslySetInnerHTML, l = _.dangerouslySetInnerHTML, !c) {
|
|
226
226
|
if (o != null)
|
|
227
|
-
for (
|
|
228
|
-
|
|
227
|
+
for (m = {}, f = 0; f < n.attributes.length; f++)
|
|
228
|
+
m[n.attributes[f].name] = n.attributes[f].value;
|
|
229
229
|
(l || p) && (l && (p && l.__html == p.__html || l.__html === n.innerHTML) || (n.innerHTML = l && l.__html || ""));
|
|
230
230
|
}
|
|
231
|
-
if (zn(n, _,
|
|
231
|
+
if (zn(n, _, m, s, c), l)
|
|
232
232
|
e.__k = [];
|
|
233
|
-
else if (en(n, ze(f = e.props.children) ? f : [f], e, t, i, s && d !== "foreignObject", o, a, o ? o[0] : t.__k && we(t, 0),
|
|
233
|
+
else if (en(n, ze(f = e.props.children) ? f : [f], e, t, i, s && d !== "foreignObject", o, a, o ? o[0] : t.__k && we(t, 0), c, u), o != null)
|
|
234
234
|
for (f = o.length; f--; )
|
|
235
235
|
o[f] != null && Kt(o[f]);
|
|
236
|
-
|
|
236
|
+
c || ("value" in _ && (f = _.value) !== void 0 && (f !== n.value || d === "progress" && !f || d === "option" && f !== m.value) && Ae(n, "value", f, m.value, !1), "checked" in _ && (f = _.checked) !== void 0 && f !== n.checked && Ae(n, "checked", f, m.checked, !1));
|
|
237
237
|
}
|
|
238
238
|
return n;
|
|
239
239
|
}
|
|
@@ -244,7 +244,7 @@ function nt(n, e, t) {
|
|
|
244
244
|
b.__e(i, t);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function Je(n, e, t) {
|
|
248
248
|
var i, s;
|
|
249
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)
|
|
@@ -257,7 +257,7 @@ function Ge(n, e, t) {
|
|
|
257
257
|
}
|
|
258
258
|
if (i = n.__k)
|
|
259
259
|
for (s = 0; s < i.length; s++)
|
|
260
|
-
i[s] &&
|
|
260
|
+
i[s] && Je(i[s], e, t || typeof n.type != "function");
|
|
261
261
|
t || n.__e == null || Kt(n.__e), n.__ = n.__e = n.__d = void 0;
|
|
262
262
|
}
|
|
263
263
|
function On(n, e, t) {
|
|
@@ -268,52 +268,52 @@ function ae(n, e, t) {
|
|
|
268
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 = q(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), sn(o, n, a);
|
|
269
269
|
}
|
|
270
270
|
function Bn(n, e) {
|
|
271
|
-
var t = { __c: e = "__cC" +
|
|
271
|
+
var t = { __c: e = "__cC" + Jt++, __: n, Consumer: function(i, s) {
|
|
272
272
|
return i.children(s);
|
|
273
273
|
}, Provider: function(i) {
|
|
274
274
|
var s, o;
|
|
275
275
|
return this.getChildContext || (s = [], (o = {})[e] = this, this.getChildContext = function() {
|
|
276
276
|
return o;
|
|
277
277
|
}, this.shouldComponentUpdate = function(a) {
|
|
278
|
-
this.props.value !== a.value && s.some(function(
|
|
279
|
-
|
|
278
|
+
this.props.value !== a.value && s.some(function(c) {
|
|
279
|
+
c.__e = !0, Ze(c);
|
|
280
280
|
});
|
|
281
281
|
}, this.sub = function(a) {
|
|
282
282
|
s.push(a);
|
|
283
|
-
var
|
|
283
|
+
var c = a.componentWillUnmount;
|
|
284
284
|
a.componentWillUnmount = function() {
|
|
285
|
-
s.splice(s.indexOf(a), 1),
|
|
285
|
+
s.splice(s.indexOf(a), 1), c && c.call(a);
|
|
286
286
|
};
|
|
287
287
|
}), i.children;
|
|
288
288
|
} };
|
|
289
289
|
return t.Provider.__ = t.Consumer.contextType = t;
|
|
290
290
|
}
|
|
291
|
-
Le =
|
|
291
|
+
Le = Gt.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 {
|
|
295
295
|
if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(n)), a = s.__d), s.componentDidCatch != null && (s.componentDidCatch(n, i || {}), a = s.__d), a)
|
|
296
296
|
return s.__E = s;
|
|
297
|
-
} catch (
|
|
298
|
-
n =
|
|
297
|
+
} catch (c) {
|
|
298
|
+
n = c;
|
|
299
299
|
}
|
|
300
300
|
throw n;
|
|
301
301
|
} }, Yt = 0, Xt = function(n) {
|
|
302
302
|
return n != null && n.constructor === void 0;
|
|
303
303
|
}, F.prototype.setState = function(n, e) {
|
|
304
304
|
var t;
|
|
305
|
-
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s =
|
|
305
|
+
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = J({}, this.state), typeof n == "function" && (n = n(J({}, t), this.props)), n && J(t, n), n != null && this.__v && (e && this._sb.push(e), Ze(this));
|
|
306
306
|
}, F.prototype.forceUpdate = function(n) {
|
|
307
307
|
this.__v && (this.__e = !0, n && this.__h.push(n), Ze(this));
|
|
308
308
|
}, F.prototype.render = Y, ne = [], Zt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Xe = function(n, e) {
|
|
309
309
|
return n.__v.__b - e.__v.__b;
|
|
310
|
-
},
|
|
310
|
+
}, Ee.__r = 0, Jt = 0;
|
|
311
311
|
const Pn = "ibiz", Rn = "is-";
|
|
312
312
|
function ee(n, e, t, i, s) {
|
|
313
313
|
let o = "".concat(n, "-").concat(e);
|
|
314
314
|
return t && (o += "-".concat(t)), i && (o += "__".concat(i)), s && (o += "--".concat(s)), o;
|
|
315
315
|
}
|
|
316
|
-
class
|
|
316
|
+
class k {
|
|
317
317
|
/**
|
|
318
318
|
* Creates an instance of Namespace.
|
|
319
319
|
*
|
|
@@ -487,33 +487,33 @@ function W(n) {
|
|
|
487
487
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
488
488
|
}
|
|
489
489
|
function pt(n, e) {
|
|
490
|
-
for (var t = "", i = 0, s = -1, o = 0, a,
|
|
491
|
-
if (
|
|
492
|
-
a = n.charCodeAt(
|
|
490
|
+
for (var t = "", i = 0, s = -1, o = 0, a, c = 0; c <= n.length; ++c) {
|
|
491
|
+
if (c < n.length)
|
|
492
|
+
a = n.charCodeAt(c);
|
|
493
493
|
else {
|
|
494
494
|
if (a === 47)
|
|
495
495
|
break;
|
|
496
496
|
a = 47;
|
|
497
497
|
}
|
|
498
498
|
if (a === 47) {
|
|
499
|
-
if (!(s ===
|
|
500
|
-
if (s !==
|
|
499
|
+
if (!(s === c - 1 || o === 1))
|
|
500
|
+
if (s !== c - 1 && o === 2) {
|
|
501
501
|
if (t.length < 2 || i !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
|
|
502
502
|
if (t.length > 2) {
|
|
503
503
|
var u = t.lastIndexOf("/");
|
|
504
504
|
if (u !== t.length - 1) {
|
|
505
|
-
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s =
|
|
505
|
+
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = c, o = 0;
|
|
506
506
|
continue;
|
|
507
507
|
}
|
|
508
508
|
} else if (t.length === 2 || t.length === 1) {
|
|
509
|
-
t = "", i = 0, s =
|
|
509
|
+
t = "", i = 0, s = c, o = 0;
|
|
510
510
|
continue;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
e && (t.length > 0 ? t += "/.." : t = "..", i = 2);
|
|
514
514
|
} else
|
|
515
|
-
t.length > 0 ? t += "/" + n.slice(s + 1,
|
|
516
|
-
s =
|
|
515
|
+
t.length > 0 ? t += "/" + n.slice(s + 1, c) : t = n.slice(s + 1, c), i = c - s - 1;
|
|
516
|
+
s = c, o = 0;
|
|
517
517
|
} else
|
|
518
518
|
a === 46 && o !== -1 ? ++o : o = -1;
|
|
519
519
|
}
|
|
@@ -557,7 +557,7 @@ var ve = {
|
|
|
557
557
|
;
|
|
558
558
|
for (var s = e.length, o = s - i, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
|
|
559
559
|
;
|
|
560
|
-
for (var
|
|
560
|
+
for (var c = t.length, u = c - a, h = o < u ? o : u, p = -1, l = 0; l <= h; ++l) {
|
|
561
561
|
if (l === h) {
|
|
562
562
|
if (u > h) {
|
|
563
563
|
if (t.charCodeAt(a + l) === 47)
|
|
@@ -568,10 +568,10 @@ var ve = {
|
|
|
568
568
|
o > h && (e.charCodeAt(i + l) === 47 ? p = l : l === 0 && (p = 0));
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
if (
|
|
571
|
+
var m = e.charCodeAt(i + l), _ = t.charCodeAt(a + l);
|
|
572
|
+
if (m !== _)
|
|
573
573
|
break;
|
|
574
|
-
|
|
574
|
+
m === 47 && (p = l);
|
|
575
575
|
}
|
|
576
576
|
var d = "";
|
|
577
577
|
for (l = i + p + 1; l <= s; ++l)
|
|
@@ -602,7 +602,7 @@ var ve = {
|
|
|
602
602
|
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
603
603
|
if (t.length === e.length && t === e)
|
|
604
604
|
return "";
|
|
605
|
-
var
|
|
605
|
+
var c = t.length - 1, u = -1;
|
|
606
606
|
for (a = e.length - 1; a >= 0; --a) {
|
|
607
607
|
var h = e.charCodeAt(a);
|
|
608
608
|
if (h === 47) {
|
|
@@ -611,7 +611,7 @@ var ve = {
|
|
|
611
611
|
break;
|
|
612
612
|
}
|
|
613
613
|
} else
|
|
614
|
-
u === -1 && (o = !1, u = a + 1),
|
|
614
|
+
u === -1 && (o = !1, u = a + 1), c >= 0 && (h === t.charCodeAt(c) ? --c === -1 && (s = a) : (c = -1, s = u));
|
|
615
615
|
}
|
|
616
616
|
return i === s ? s = u : s === -1 && (s = e.length), e.slice(i, s);
|
|
617
617
|
} else {
|
|
@@ -628,16 +628,16 @@ var ve = {
|
|
|
628
628
|
},
|
|
629
629
|
extname: function(e) {
|
|
630
630
|
W(e);
|
|
631
|
-
for (var t = -1, i = 0, s = -1, o = !0, a = 0,
|
|
632
|
-
var u = e.charCodeAt(
|
|
631
|
+
for (var t = -1, i = 0, s = -1, o = !0, a = 0, c = e.length - 1; c >= 0; --c) {
|
|
632
|
+
var u = e.charCodeAt(c);
|
|
633
633
|
if (u === 47) {
|
|
634
634
|
if (!o) {
|
|
635
|
-
i =
|
|
635
|
+
i = c + 1;
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
continue;
|
|
639
639
|
}
|
|
640
|
-
s === -1 && (o = !1, s =
|
|
640
|
+
s === -1 && (o = !1, s = c + 1), u === 46 ? t === -1 ? t = c : a !== 1 && (a = 1) : t !== -1 && (a = -1);
|
|
641
641
|
}
|
|
642
642
|
return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
|
|
643
643
|
a === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
@@ -655,10 +655,10 @@ var ve = {
|
|
|
655
655
|
return t;
|
|
656
656
|
var i = e.charCodeAt(0), s = i === 47, o;
|
|
657
657
|
s ? (t.root = "/", o = 1) : o = 0;
|
|
658
|
-
for (var a = -1,
|
|
658
|
+
for (var a = -1, c = 0, u = -1, h = !0, p = e.length - 1, l = 0; p >= o; --p) {
|
|
659
659
|
if (i = e.charCodeAt(p), i === 47) {
|
|
660
660
|
if (!h) {
|
|
661
|
-
|
|
661
|
+
c = p + 1;
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
664
664
|
continue;
|
|
@@ -667,7 +667,7 @@ var ve = {
|
|
|
667
667
|
}
|
|
668
668
|
return a === -1 || u === -1 || // We saw a non-dot character immediately before the dot
|
|
669
669
|
l === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
670
|
-
l === 1 && a === u - 1 && a ===
|
|
670
|
+
l === 1 && a === u - 1 && a === c + 1 ? u !== -1 && (c === 0 && s ? t.base = t.name = e.slice(1, u) : t.base = t.name = e.slice(c, u)) : (c === 0 && s ? (t.name = e.slice(1, a), t.base = e.slice(1, u)) : (t.name = e.slice(c, a), t.base = e.slice(c, u)), t.ext = e.slice(a, u)), c > 0 ? t.dir = e.slice(0, c - 1) : s && (t.dir = "/"), t;
|
|
671
671
|
},
|
|
672
672
|
sep: "/",
|
|
673
673
|
delimiter: ":",
|
|
@@ -678,7 +678,7 @@ ve.posix = ve;
|
|
|
678
678
|
function Z() {
|
|
679
679
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function ce() {
|
|
682
682
|
return "".concat(Z() + Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z()).concat(Z()).concat(Z());
|
|
683
683
|
}
|
|
684
684
|
const Un = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
@@ -752,14 +752,14 @@ const y = class y {
|
|
|
752
752
|
static async checkTableExists(e, t) {
|
|
753
753
|
return await y.checkDataBaseExists(e) ? new Promise((s, o) => {
|
|
754
754
|
const a = indexedDB.open(e);
|
|
755
|
-
a.onupgradeneeded = (
|
|
756
|
-
y.db =
|
|
757
|
-
}, a.onsuccess = (
|
|
758
|
-
y.db =
|
|
755
|
+
a.onupgradeneeded = (c) => {
|
|
756
|
+
y.db = c.target.result, y.version = y.db.version;
|
|
757
|
+
}, a.onsuccess = (c) => {
|
|
758
|
+
y.db = c.target.result, y.lastLink = a.result;
|
|
759
759
|
const u = y.db.objectStoreNames.contains(t);
|
|
760
760
|
a.result.close(), s(u);
|
|
761
|
-
}, a.onerror = (
|
|
762
|
-
o(
|
|
761
|
+
}, a.onerror = (c) => {
|
|
762
|
+
o(c.target.error);
|
|
763
763
|
};
|
|
764
764
|
}) : !1;
|
|
765
765
|
}
|
|
@@ -774,8 +774,8 @@ const y = class y {
|
|
|
774
774
|
*/
|
|
775
775
|
static async createTable(e, t, i, s = !1) {
|
|
776
776
|
return new Promise((o) => {
|
|
777
|
-
var
|
|
778
|
-
y.version += 1, y.lastLink && ((u = (
|
|
777
|
+
var c, u;
|
|
778
|
+
y.version += 1, y.lastLink && ((u = (c = y.lastLink).close) == null || u.call(c));
|
|
779
779
|
const a = indexedDB.open(e, y.version);
|
|
780
780
|
a.onupgradeneeded = (h) => {
|
|
781
781
|
if (y.db = h.target.result, !y.db.objectStoreNames.contains(t)) {
|
|
@@ -801,10 +801,10 @@ const y = class y {
|
|
|
801
801
|
var o, a;
|
|
802
802
|
y.version += 1, y.lastLink && ((a = (o = y.lastLink).close) == null || a.call(o));
|
|
803
803
|
const s = indexedDB.open(e, y.version);
|
|
804
|
-
s.onupgradeneeded = (
|
|
805
|
-
y.db =
|
|
806
|
-
}, s.onsuccess = (
|
|
807
|
-
y.db =
|
|
804
|
+
s.onupgradeneeded = (c) => {
|
|
805
|
+
y.db = c.target.result, y.lastLink = s.result, y.db.objectStoreNames.contains(t) && y.db.deleteObjectStore(t);
|
|
806
|
+
}, s.onsuccess = (c) => {
|
|
807
|
+
y.db = c.target.result, y.lastLink = s.result, s.result.close(), i(!0);
|
|
808
808
|
}, s.onerror = () => {
|
|
809
809
|
s.result.close(), i(!1);
|
|
810
810
|
};
|
|
@@ -821,8 +821,8 @@ const y = class y {
|
|
|
821
821
|
static async addData(e, t, i) {
|
|
822
822
|
return new Promise((s, o) => {
|
|
823
823
|
const a = indexedDB.open(e);
|
|
824
|
-
a.onsuccess = (
|
|
825
|
-
if (y.db =
|
|
824
|
+
a.onsuccess = (c) => {
|
|
825
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
826
826
|
const p = y.db.transaction([t], "readwrite").objectStore(t).add(i);
|
|
827
827
|
p.onsuccess = (l) => {
|
|
828
828
|
s(i);
|
|
@@ -847,8 +847,8 @@ const y = class y {
|
|
|
847
847
|
static async deleteData(e, t, i) {
|
|
848
848
|
return new Promise((s, o) => {
|
|
849
849
|
const a = indexedDB.open(e);
|
|
850
|
-
a.onsuccess = (
|
|
851
|
-
if (y.db =
|
|
850
|
+
a.onsuccess = (c) => {
|
|
851
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
852
852
|
const p = y.db.transaction([t], "readwrite").objectStore(t).delete(i);
|
|
853
853
|
p.onsuccess = (l) => {
|
|
854
854
|
s(!0);
|
|
@@ -873,8 +873,8 @@ const y = class y {
|
|
|
873
873
|
static async updateData(e, t, i) {
|
|
874
874
|
return new Promise((s, o) => {
|
|
875
875
|
const a = indexedDB.open(e);
|
|
876
|
-
a.onsuccess = (
|
|
877
|
-
if (y.db =
|
|
876
|
+
a.onsuccess = (c) => {
|
|
877
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
878
878
|
const p = y.db.transaction([t], "readwrite").objectStore(t).put(i);
|
|
879
879
|
p.onsuccess = (l) => {
|
|
880
880
|
s(i);
|
|
@@ -899,8 +899,8 @@ const y = class y {
|
|
|
899
899
|
static async getData(e, t, i) {
|
|
900
900
|
return new Promise((s, o) => {
|
|
901
901
|
const a = indexedDB.open(e);
|
|
902
|
-
a.onsuccess = (
|
|
903
|
-
if (y.db =
|
|
902
|
+
a.onsuccess = (c) => {
|
|
903
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
904
904
|
const p = y.db.transaction([t], "readonly").objectStore(t).get(i);
|
|
905
905
|
p.onsuccess = (l) => {
|
|
906
906
|
s(p.result);
|
|
@@ -944,7 +944,7 @@ const y = class y {
|
|
|
944
944
|
S(y, "version", 1), // 数据库连接句柄
|
|
945
945
|
S(y, "db", null), // 上一个连接
|
|
946
946
|
S(y, "lastLink");
|
|
947
|
-
let
|
|
947
|
+
let V = y;
|
|
948
948
|
class Wn {
|
|
949
949
|
/**
|
|
950
950
|
* Creates an instance of FileUploader.
|
|
@@ -979,8 +979,8 @@ class Wn {
|
|
|
979
979
|
if (e.length === 0)
|
|
980
980
|
return;
|
|
981
981
|
const t = e.filter((o) => {
|
|
982
|
-
var a,
|
|
983
|
-
return this.options.maxSize && o.size > this.options.maxSize ? ((
|
|
982
|
+
var a, c;
|
|
983
|
+
return this.options.maxSize && o.size > this.options.maxSize ? ((c = (a = this.options).onError) == null || c.call(a, new Error("文件大小超过限制 (".concat(this.formatSize(o.size), " > ").concat(this.formatSize(this.options.maxSize), ")")), o), !1) : !0;
|
|
984
984
|
});
|
|
985
985
|
(s = (i = this.options).onSelect) == null || s.call(i, t), await Promise.all(t.map((o) => this.processFile(o)));
|
|
986
986
|
}
|
|
@@ -988,15 +988,15 @@ class Wn {
|
|
|
988
988
|
* 处理单个文件上传
|
|
989
989
|
*/
|
|
990
990
|
async processFile(e) {
|
|
991
|
-
var t, i, s, o, a,
|
|
991
|
+
var t, i, s, o, a, c;
|
|
992
992
|
try {
|
|
993
993
|
const u = (p) => {
|
|
994
|
-
var l,
|
|
995
|
-
(
|
|
994
|
+
var l, m;
|
|
995
|
+
(m = (l = this.options).onProgress) == null || m.call(l, e, p);
|
|
996
996
|
}, h = await this.options.onUpload(e, u);
|
|
997
997
|
(i = (t = this.options).onProgress) == null || i.call(t, e, 100), (o = (s = this.options).onSuccess) == null || o.call(s, h, e);
|
|
998
998
|
} catch (u) {
|
|
999
|
-
(
|
|
999
|
+
(c = (a = this.options).onError) == null || c.call(a, u instanceof Error ? u : new Error("上传失败"), e);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
/**
|
|
@@ -1038,14 +1038,14 @@ class an {
|
|
|
1038
1038
|
static parse(e) {
|
|
1039
1039
|
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1040
1040
|
return Array.from(i.querySelectorAll("resource")).map((o) => {
|
|
1041
|
-
const a = o.getAttribute("type") || "",
|
|
1041
|
+
const a = o.getAttribute("type") || "", c = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1042
1042
|
try {
|
|
1043
|
-
const h = this.getCdataContent(
|
|
1043
|
+
const h = this.getCdataContent(c), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, m = p ? JSON.parse(p) : {};
|
|
1044
1044
|
return {
|
|
1045
1045
|
id: l.id,
|
|
1046
1046
|
type: a,
|
|
1047
1047
|
data: l,
|
|
1048
|
-
metadata:
|
|
1048
|
+
metadata: m
|
|
1049
1049
|
};
|
|
1050
1050
|
} catch (h) {
|
|
1051
1051
|
throw new Error("XML 解析错误: ".concat(h.message));
|
|
@@ -1074,17 +1074,17 @@ class an {
|
|
|
1074
1074
|
remainingText: e,
|
|
1075
1075
|
hasResources: !1
|
|
1076
1076
|
};
|
|
1077
|
-
const [s] = i, o = i.index, a = o + s.length,
|
|
1077
|
+
const [s] = i, o = i.index, a = o + s.length, c = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
|
|
1078
1078
|
try {
|
|
1079
1079
|
return {
|
|
1080
1080
|
resources: this.parse(s),
|
|
1081
|
-
remainingText:
|
|
1081
|
+
remainingText: c,
|
|
1082
1082
|
hasResources: !0
|
|
1083
1083
|
};
|
|
1084
1084
|
} catch (u) {
|
|
1085
1085
|
return {
|
|
1086
1086
|
resources: [],
|
|
1087
|
-
remainingText:
|
|
1087
|
+
remainingText: c,
|
|
1088
1088
|
hasResources: !0,
|
|
1089
1089
|
error: "资源解析失败: ".concat(u.message)
|
|
1090
1090
|
};
|
|
@@ -1105,19 +1105,19 @@ class an {
|
|
|
1105
1105
|
const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
|
|
1106
1106
|
return e.forEach((a) => {
|
|
1107
1107
|
i.appendChild(t.createTextNode(s(o)));
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1108
|
+
const c = t.createElement("resource");
|
|
1109
|
+
c.setAttribute("type", a.type), c.setAttribute("version", "1.0");
|
|
1110
1110
|
const u = (h, p) => {
|
|
1111
1111
|
const l = t.createElement(h);
|
|
1112
1112
|
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1113
|
-
const
|
|
1114
|
-
return l.appendChild(
|
|
1113
|
+
const m = t.createCDATASection(JSON.stringify(p));
|
|
1114
|
+
return l.appendChild(m), l.appendChild(t.createTextNode(s(o))), l;
|
|
1115
1115
|
};
|
|
1116
|
-
|
|
1116
|
+
c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("data", a.data)), c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("metadata", a.metadata)), c.appendChild(t.createTextNode(s(o))), i.appendChild(c);
|
|
1117
1117
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
class
|
|
1120
|
+
class jn {
|
|
1121
1121
|
/**
|
|
1122
1122
|
* 从XML元素中提取CDATA内容
|
|
1123
1123
|
*
|
|
@@ -1146,13 +1146,13 @@ class Vn {
|
|
|
1146
1146
|
static parse(e) {
|
|
1147
1147
|
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1148
1148
|
return Array.from(i.querySelectorAll("suggestion")).map((o) => {
|
|
1149
|
-
const a = o.getAttribute("type") || "",
|
|
1149
|
+
const a = o.getAttribute("type") || "", c = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1150
1150
|
try {
|
|
1151
|
-
const h = this.getCdataContent(
|
|
1151
|
+
const h = this.getCdataContent(c), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, m = p ? JSON.parse(p) : {};
|
|
1152
1152
|
return {
|
|
1153
1153
|
type: a,
|
|
1154
1154
|
data: l,
|
|
1155
|
-
metadata:
|
|
1155
|
+
metadata: m
|
|
1156
1156
|
};
|
|
1157
1157
|
} catch (h) {
|
|
1158
1158
|
throw new Error("XML 解析错误: ".concat(h.message));
|
|
@@ -1181,17 +1181,17 @@ class Vn {
|
|
|
1181
1181
|
remainingText: e,
|
|
1182
1182
|
hasSuggestions: !1
|
|
1183
1183
|
};
|
|
1184
|
-
const [s] = i, o = i.index, a = o + s.length,
|
|
1184
|
+
const [s] = i, o = i.index, a = o + s.length, c = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
|
|
1185
1185
|
try {
|
|
1186
1186
|
return {
|
|
1187
1187
|
suggestions: this.parse(s),
|
|
1188
|
-
remainingText:
|
|
1188
|
+
remainingText: c,
|
|
1189
1189
|
hasSuggestions: !0
|
|
1190
1190
|
};
|
|
1191
1191
|
} catch (u) {
|
|
1192
1192
|
return {
|
|
1193
1193
|
suggestions: [],
|
|
1194
|
-
remainingText:
|
|
1194
|
+
remainingText: c,
|
|
1195
1195
|
hasSuggestions: !0,
|
|
1196
1196
|
error: "资源解析失败: ".concat(u.message)
|
|
1197
1197
|
};
|
|
@@ -1212,26 +1212,26 @@ class Vn {
|
|
|
1212
1212
|
const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
|
|
1213
1213
|
return e.forEach((a) => {
|
|
1214
1214
|
i.appendChild(t.createTextNode(s(o)));
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1215
|
+
const c = t.createElement("suggestion");
|
|
1216
|
+
c.setAttribute("type", a.type), c.setAttribute("version", "1.0");
|
|
1217
1217
|
const u = (h, p) => {
|
|
1218
1218
|
const l = t.createElement(h);
|
|
1219
1219
|
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1220
|
-
const
|
|
1221
|
-
return l.appendChild(
|
|
1220
|
+
const m = t.createCDATASection(JSON.stringify(p));
|
|
1221
|
+
return l.appendChild(m), l.appendChild(t.createTextNode(s(o))), l;
|
|
1222
1222
|
};
|
|
1223
|
-
|
|
1223
|
+
c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("data", a.data)), c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("metadata", a.metadata)), c.appendChild(t.createTextNode(s(o))), i.appendChild(c);
|
|
1224
1224
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function Ge(n) {
|
|
1228
1228
|
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1229
1229
|
}
|
|
1230
1230
|
function rn(n, e, t, i) {
|
|
1231
|
-
const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)),
|
|
1231
|
+
const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)), c = Math.max(0, Math.min(o, 1 - i));
|
|
1232
1232
|
return {
|
|
1233
1233
|
x: a,
|
|
1234
|
-
y:
|
|
1234
|
+
y: c
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
1237
|
function cn(n) {
|
|
@@ -1254,12 +1254,12 @@ function un(n) {
|
|
|
1254
1254
|
e = (e << 5) + e + n.charCodeAt(t);
|
|
1255
1255
|
return Math.abs(e).toString(36).toUpperCase();
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Vn(n) {
|
|
1258
1258
|
const e = cn(n), t = ln(n), i = un(n), s = e + t + i;
|
|
1259
1259
|
let o = "";
|
|
1260
1260
|
for (let a = 0; a < n.length % 10 + 10; a++) {
|
|
1261
|
-
const
|
|
1262
|
-
o += s.charAt(
|
|
1261
|
+
const c = a * 7 % s.length;
|
|
1262
|
+
o += s.charAt(c);
|
|
1263
1263
|
}
|
|
1264
1264
|
return o.toUpperCase();
|
|
1265
1265
|
}
|
|
@@ -1273,7 +1273,7 @@ function dn(n, e) {
|
|
|
1273
1273
|
case "djb2":
|
|
1274
1274
|
return un(n);
|
|
1275
1275
|
case "combined":
|
|
1276
|
-
return
|
|
1276
|
+
return Vn(n);
|
|
1277
1277
|
case "simple":
|
|
1278
1278
|
default:
|
|
1279
1279
|
return cn(n);
|
|
@@ -1288,58 +1288,84 @@ function qn(n, e = 36) {
|
|
|
1288
1288
|
i += ft(dn(i, "combined"));
|
|
1289
1289
|
return i.substring(0, e);
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function mt(n, e = 36) {
|
|
1292
1292
|
const t = dn(n, "combined");
|
|
1293
1293
|
return qn(t, e);
|
|
1294
1294
|
}
|
|
1295
|
-
|
|
1295
|
+
class Yn {
|
|
1296
|
+
/**
|
|
1297
|
+
* @description 解析工具调用
|
|
1298
|
+
* @static
|
|
1299
|
+
* @param {string} toolCallString
|
|
1300
|
+
* @returns {*} {IChatToolCall[]}
|
|
1301
|
+
* @memberof ChatToolCallParser
|
|
1302
|
+
*/
|
|
1303
|
+
static parse(e) {
|
|
1304
|
+
const t = new RegExp("<tool_call>\\s*({[\\s\\S]*?})\\s*</tool_call>", "g"), i = e.matchAll(t), s = [];
|
|
1305
|
+
for (const o of i)
|
|
1306
|
+
try {
|
|
1307
|
+
const a = JSON.parse(o[1]), c = {
|
|
1308
|
+
name: a.name,
|
|
1309
|
+
parameters: a.parameters,
|
|
1310
|
+
error: a.error || !1
|
|
1311
|
+
};
|
|
1312
|
+
a.result && Object.assign(c, {
|
|
1313
|
+
result: a.result
|
|
1314
|
+
}), s.push(c);
|
|
1315
|
+
} catch (a) {
|
|
1316
|
+
console.error("解析工具调用失败:", a);
|
|
1317
|
+
}
|
|
1318
|
+
return s;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
var ue, N, Re, vt, be = 0, hn = [], Ne = [], _t = b.__b, gt = b.__r, wt = b.diffed, bt = b.__c, yt = b.unmount;
|
|
1296
1322
|
function He(n, e) {
|
|
1297
|
-
b.__h && b.__h(
|
|
1298
|
-
var t =
|
|
1323
|
+
b.__h && b.__h(N, n, be || e), be = 0;
|
|
1324
|
+
var t = N.__H || (N.__H = { __: [], __h: [] });
|
|
1299
1325
|
return n >= t.__.length && t.__.push({ __V: Ne }), t.__[n];
|
|
1300
1326
|
}
|
|
1301
1327
|
function K(n) {
|
|
1302
|
-
return be = 1,
|
|
1328
|
+
return be = 1, Xn(mn, n);
|
|
1303
1329
|
}
|
|
1304
|
-
function
|
|
1305
|
-
var i = He(
|
|
1306
|
-
if (i.t = n, !i.__c && (i.__ = [t ? t(e) :
|
|
1307
|
-
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u,
|
|
1330
|
+
function Xn(n, e, t) {
|
|
1331
|
+
var i = He(ue++, 2);
|
|
1332
|
+
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : mn(void 0, e), function(c) {
|
|
1333
|
+
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, c);
|
|
1308
1334
|
u !== h && (i.__N = [h, i.__[1]], i.__c.setState({}));
|
|
1309
|
-
}], i.__c =
|
|
1310
|
-
var s = function(
|
|
1335
|
+
}], i.__c = N, !N.u)) {
|
|
1336
|
+
var s = function(c, u, h) {
|
|
1311
1337
|
if (!i.__c.__H)
|
|
1312
1338
|
return !0;
|
|
1313
|
-
var p = i.__c.__H.__.filter(function(
|
|
1314
|
-
return
|
|
1339
|
+
var p = i.__c.__H.__.filter(function(m) {
|
|
1340
|
+
return m.__c;
|
|
1315
1341
|
});
|
|
1316
|
-
if (p.every(function(
|
|
1317
|
-
return !
|
|
1342
|
+
if (p.every(function(m) {
|
|
1343
|
+
return !m.__N;
|
|
1318
1344
|
}))
|
|
1319
|
-
return !o || o.call(this,
|
|
1345
|
+
return !o || o.call(this, c, u, h);
|
|
1320
1346
|
var l = !1;
|
|
1321
|
-
return p.forEach(function(
|
|
1322
|
-
if (
|
|
1323
|
-
var _ =
|
|
1324
|
-
|
|
1347
|
+
return p.forEach(function(m) {
|
|
1348
|
+
if (m.__N) {
|
|
1349
|
+
var _ = m.__[0];
|
|
1350
|
+
m.__ = m.__N, m.__N = void 0, _ !== m.__[0] && (l = !0);
|
|
1325
1351
|
}
|
|
1326
|
-
}), !(!l && i.__c.props ===
|
|
1352
|
+
}), !(!l && i.__c.props === c) && (!o || o.call(this, c, u, h));
|
|
1327
1353
|
};
|
|
1328
|
-
|
|
1329
|
-
var o =
|
|
1330
|
-
|
|
1354
|
+
N.u = !0;
|
|
1355
|
+
var o = N.shouldComponentUpdate, a = N.componentWillUpdate;
|
|
1356
|
+
N.componentWillUpdate = function(c, u, h) {
|
|
1331
1357
|
if (this.__e) {
|
|
1332
1358
|
var p = o;
|
|
1333
|
-
o = void 0, s(
|
|
1359
|
+
o = void 0, s(c, u, h), o = p;
|
|
1334
1360
|
}
|
|
1335
|
-
a && a.call(this,
|
|
1336
|
-
},
|
|
1361
|
+
a && a.call(this, c, u, h);
|
|
1362
|
+
}, N.shouldComponentUpdate = s;
|
|
1337
1363
|
}
|
|
1338
1364
|
return i.__N || i.__;
|
|
1339
1365
|
}
|
|
1340
|
-
function
|
|
1341
|
-
var t = He(
|
|
1342
|
-
!b.__s && fn(t.__H, e) && (t.__ = n, t.i = e,
|
|
1366
|
+
function I(n, e) {
|
|
1367
|
+
var t = He(ue++, 3);
|
|
1368
|
+
!b.__s && fn(t.__H, e) && (t.__ = n, t.i = e, N.__H.__h.push(t));
|
|
1343
1369
|
}
|
|
1344
1370
|
function P(n) {
|
|
1345
1371
|
return be = 5, X(function() {
|
|
@@ -1347,7 +1373,7 @@ function P(n) {
|
|
|
1347
1373
|
}, []);
|
|
1348
1374
|
}
|
|
1349
1375
|
function X(n, e) {
|
|
1350
|
-
var t = He(
|
|
1376
|
+
var t = He(ue++, 7);
|
|
1351
1377
|
return fn(t.__H, e) ? (t.__V = n(), t.i = e, t.__h = n, t.__V) : t.__;
|
|
1352
1378
|
}
|
|
1353
1379
|
function Fe(n, e) {
|
|
@@ -1356,36 +1382,36 @@ function Fe(n, e) {
|
|
|
1356
1382
|
}, e);
|
|
1357
1383
|
}
|
|
1358
1384
|
function pn(n) {
|
|
1359
|
-
var e =
|
|
1360
|
-
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(
|
|
1385
|
+
var e = N.context[n.__c], t = He(ue++, 9);
|
|
1386
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(N)), e.props.value) : n.__;
|
|
1361
1387
|
}
|
|
1362
|
-
function
|
|
1388
|
+
function Zn() {
|
|
1363
1389
|
for (var n; n = hn.shift(); )
|
|
1364
1390
|
if (n.__P && n.__H)
|
|
1365
1391
|
try {
|
|
1366
|
-
n.__H.__h.forEach(
|
|
1392
|
+
n.__H.__h.forEach($e), n.__H.__h.forEach(Ke), n.__H.__h = [];
|
|
1367
1393
|
} catch (e) {
|
|
1368
1394
|
n.__H.__h = [], b.__e(e, n.__v);
|
|
1369
1395
|
}
|
|
1370
1396
|
}
|
|
1371
1397
|
b.__b = function(n) {
|
|
1372
|
-
|
|
1398
|
+
N = null, _t && _t(n);
|
|
1373
1399
|
}, b.__r = function(n) {
|
|
1374
|
-
gt && gt(n),
|
|
1375
|
-
var e = (
|
|
1376
|
-
e && (Re ===
|
|
1400
|
+
gt && gt(n), ue = 0;
|
|
1401
|
+
var e = (N = n.__c).__H;
|
|
1402
|
+
e && (Re === N ? (e.__h = [], N.__h = [], e.__.forEach(function(t) {
|
|
1377
1403
|
t.__N && (t.__ = t.__N), t.__V = Ne, t.__N = t.i = void 0;
|
|
1378
|
-
})) : (e.__h.forEach(
|
|
1404
|
+
})) : (e.__h.forEach($e), e.__h.forEach(Ke), e.__h = [], ue = 0)), Re = N;
|
|
1379
1405
|
}, b.diffed = function(n) {
|
|
1380
1406
|
wt && wt(n);
|
|
1381
1407
|
var e = n.__c;
|
|
1382
|
-
e && e.__H && (e.__H.__h.length && (hn.push(e) !== 1 &&
|
|
1408
|
+
e && e.__H && (e.__H.__h.length && (hn.push(e) !== 1 && vt === b.requestAnimationFrame || ((vt = b.requestAnimationFrame) || Jn)(Zn)), e.__H.__.forEach(function(t) {
|
|
1383
1409
|
t.i && (t.__H = t.i), t.__V !== Ne && (t.__ = t.__V), t.i = void 0, t.__V = Ne;
|
|
1384
|
-
})), Re =
|
|
1410
|
+
})), Re = N = null;
|
|
1385
1411
|
}, b.__c = function(n, e) {
|
|
1386
1412
|
e.some(function(t) {
|
|
1387
1413
|
try {
|
|
1388
|
-
t.__h.forEach(
|
|
1414
|
+
t.__h.forEach($e), t.__h = t.__h.filter(function(i) {
|
|
1389
1415
|
return !i.__ || Ke(i);
|
|
1390
1416
|
});
|
|
1391
1417
|
} catch (i) {
|
|
@@ -1399,33 +1425,33 @@ b.__b = function(n) {
|
|
|
1399
1425
|
var e, t = n.__c;
|
|
1400
1426
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
1401
1427
|
try {
|
|
1402
|
-
|
|
1428
|
+
$e(i);
|
|
1403
1429
|
} catch (s) {
|
|
1404
1430
|
e = s;
|
|
1405
1431
|
}
|
|
1406
1432
|
}), t.__H = void 0, e && b.__e(e, t.__v));
|
|
1407
1433
|
};
|
|
1408
1434
|
var Ct = typeof requestAnimationFrame == "function";
|
|
1409
|
-
function
|
|
1435
|
+
function Jn(n) {
|
|
1410
1436
|
var e, t = function() {
|
|
1411
1437
|
clearTimeout(i), Ct && cancelAnimationFrame(e), setTimeout(n);
|
|
1412
1438
|
}, i = setTimeout(t, 100);
|
|
1413
1439
|
Ct && (e = requestAnimationFrame(t));
|
|
1414
1440
|
}
|
|
1415
|
-
function
|
|
1416
|
-
var e =
|
|
1417
|
-
typeof t == "function" && (n.__c = void 0, t()),
|
|
1441
|
+
function $e(n) {
|
|
1442
|
+
var e = N, t = n.__c;
|
|
1443
|
+
typeof t == "function" && (n.__c = void 0, t()), N = e;
|
|
1418
1444
|
}
|
|
1419
1445
|
function Ke(n) {
|
|
1420
|
-
var e =
|
|
1421
|
-
n.__c = n.__(),
|
|
1446
|
+
var e = N;
|
|
1447
|
+
n.__c = n.__(), N = e;
|
|
1422
1448
|
}
|
|
1423
1449
|
function fn(n, e) {
|
|
1424
1450
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
1425
1451
|
return t !== n[i];
|
|
1426
1452
|
});
|
|
1427
1453
|
}
|
|
1428
|
-
function
|
|
1454
|
+
function mn(n, e) {
|
|
1429
1455
|
return typeof e == "function" ? e(n) : e;
|
|
1430
1456
|
}
|
|
1431
1457
|
function Oe() {
|
|
@@ -1433,8 +1459,8 @@ function Oe() {
|
|
|
1433
1459
|
}
|
|
1434
1460
|
var Gn = Symbol.for("preact-signals");
|
|
1435
1461
|
function st() {
|
|
1436
|
-
if (
|
|
1437
|
-
|
|
1462
|
+
if (le > 1)
|
|
1463
|
+
le--;
|
|
1438
1464
|
else {
|
|
1439
1465
|
for (var n, e = !1; _e !== void 0; ) {
|
|
1440
1466
|
var t = _e;
|
|
@@ -1449,37 +1475,37 @@ function st() {
|
|
|
1449
1475
|
t = i;
|
|
1450
1476
|
}
|
|
1451
1477
|
}
|
|
1452
|
-
if (Qe = 0,
|
|
1478
|
+
if (Qe = 0, le--, e)
|
|
1453
1479
|
throw n;
|
|
1454
1480
|
}
|
|
1455
1481
|
}
|
|
1456
|
-
var
|
|
1457
|
-
function
|
|
1458
|
-
if (
|
|
1482
|
+
var $ = void 0, _e = void 0, le = 0, Qe = 0, Ie = 0;
|
|
1483
|
+
function vn(n) {
|
|
1484
|
+
if ($ !== void 0) {
|
|
1459
1485
|
var e = n.n;
|
|
1460
|
-
if (e === void 0 || e.t !==
|
|
1461
|
-
return e = { i: 0, S: n, p:
|
|
1486
|
+
if (e === void 0 || e.t !== $)
|
|
1487
|
+
return e = { i: 0, S: n, p: $.s, n: void 0, t: $, e: void 0, x: void 0, r: e }, $.s !== void 0 && ($.s.n = e), $.s = e, n.n = e, 32 & $.f && n.S(e), e;
|
|
1462
1488
|
if (e.i === -1)
|
|
1463
|
-
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p =
|
|
1489
|
+
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = $.s, e.n = void 0, $.s.n = e, $.s = e), e;
|
|
1464
1490
|
}
|
|
1465
1491
|
}
|
|
1466
|
-
function
|
|
1492
|
+
function D(n) {
|
|
1467
1493
|
this.v = n, this.i = 0, this.n = void 0, this.t = void 0;
|
|
1468
1494
|
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1495
|
+
D.prototype.brand = Gn;
|
|
1496
|
+
D.prototype.h = function() {
|
|
1471
1497
|
return !0;
|
|
1472
1498
|
};
|
|
1473
|
-
|
|
1499
|
+
D.prototype.S = function(n) {
|
|
1474
1500
|
this.t !== n && n.e === void 0 && (n.x = this.t, this.t !== void 0 && (this.t.e = n), this.t = n);
|
|
1475
1501
|
};
|
|
1476
|
-
|
|
1502
|
+
D.prototype.U = function(n) {
|
|
1477
1503
|
if (this.t !== void 0) {
|
|
1478
1504
|
var e = n.e, t = n.x;
|
|
1479
1505
|
e !== void 0 && (e.x = t, n.e = void 0), t !== void 0 && (t.e = e, n.x = void 0), n === this.t && (this.t = t);
|
|
1480
1506
|
}
|
|
1481
1507
|
};
|
|
1482
|
-
|
|
1508
|
+
D.prototype.subscribe = function(n) {
|
|
1483
1509
|
var e = this;
|
|
1484
1510
|
return at(function() {
|
|
1485
1511
|
var t = e.value, i = 32 & this.f;
|
|
@@ -1491,26 +1517,26 @@ A.prototype.subscribe = function(n) {
|
|
|
1491
1517
|
}
|
|
1492
1518
|
});
|
|
1493
1519
|
};
|
|
1494
|
-
|
|
1520
|
+
D.prototype.valueOf = function() {
|
|
1495
1521
|
return this.value;
|
|
1496
1522
|
};
|
|
1497
|
-
|
|
1523
|
+
D.prototype.toString = function() {
|
|
1498
1524
|
return this.value + "";
|
|
1499
1525
|
};
|
|
1500
|
-
|
|
1526
|
+
D.prototype.toJSON = function() {
|
|
1501
1527
|
return this.value;
|
|
1502
1528
|
};
|
|
1503
|
-
|
|
1529
|
+
D.prototype.peek = function() {
|
|
1504
1530
|
return this.v;
|
|
1505
1531
|
};
|
|
1506
|
-
Object.defineProperty(
|
|
1507
|
-
var n =
|
|
1532
|
+
Object.defineProperty(D.prototype, "value", { get: function() {
|
|
1533
|
+
var n = vn(this);
|
|
1508
1534
|
return n !== void 0 && (n.i = this.i), this.v;
|
|
1509
1535
|
}, set: function(n) {
|
|
1510
|
-
if (
|
|
1536
|
+
if ($ instanceof Q && function() {
|
|
1511
1537
|
throw new Error("Computed cannot have side-effects");
|
|
1512
1538
|
}(), n !== this.v) {
|
|
1513
|
-
Qe > 100 && Oe(), this.v = n, this.i++, Ie++,
|
|
1539
|
+
Qe > 100 && Oe(), this.v = n, this.i++, Ie++, le++;
|
|
1514
1540
|
try {
|
|
1515
1541
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
1516
1542
|
e.t.N();
|
|
@@ -1519,8 +1545,8 @@ Object.defineProperty(A.prototype, "value", { get: function() {
|
|
|
1519
1545
|
}
|
|
1520
1546
|
}
|
|
1521
1547
|
} });
|
|
1522
|
-
function
|
|
1523
|
-
return new
|
|
1548
|
+
function G(n) {
|
|
1549
|
+
return new D(n);
|
|
1524
1550
|
}
|
|
1525
1551
|
function _n(n) {
|
|
1526
1552
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
@@ -1545,24 +1571,24 @@ function wn(n) {
|
|
|
1545
1571
|
n.s = t;
|
|
1546
1572
|
}
|
|
1547
1573
|
function Q(n) {
|
|
1548
|
-
|
|
1574
|
+
D.call(this, void 0), this.x = n, this.s = void 0, this.g = Ie - 1, this.f = 4;
|
|
1549
1575
|
}
|
|
1550
|
-
(Q.prototype = new
|
|
1576
|
+
(Q.prototype = new D()).h = function() {
|
|
1551
1577
|
if (this.f &= -3, 1 & this.f)
|
|
1552
1578
|
return !1;
|
|
1553
1579
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ie))
|
|
1554
1580
|
return !0;
|
|
1555
1581
|
if (this.g = Ie, this.f |= 1, this.i > 0 && !_n(this))
|
|
1556
1582
|
return this.f &= -2, !0;
|
|
1557
|
-
var n =
|
|
1583
|
+
var n = $;
|
|
1558
1584
|
try {
|
|
1559
|
-
gn(this),
|
|
1585
|
+
gn(this), $ = this;
|
|
1560
1586
|
var e = this.x();
|
|
1561
1587
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
1562
1588
|
} catch (t) {
|
|
1563
1589
|
this.v = t, this.f |= 16, this.i++;
|
|
1564
1590
|
}
|
|
1565
|
-
return
|
|
1591
|
+
return $ = n, wn(this), this.f &= -2, !0;
|
|
1566
1592
|
};
|
|
1567
1593
|
Q.prototype.S = function(n) {
|
|
1568
1594
|
if (this.t === void 0) {
|
|
@@ -1570,10 +1596,10 @@ Q.prototype.S = function(n) {
|
|
|
1570
1596
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1571
1597
|
e.S.S(e);
|
|
1572
1598
|
}
|
|
1573
|
-
|
|
1599
|
+
D.prototype.S.call(this, n);
|
|
1574
1600
|
};
|
|
1575
1601
|
Q.prototype.U = function(n) {
|
|
1576
|
-
if (this.t !== void 0 && (
|
|
1602
|
+
if (this.t !== void 0 && (D.prototype.U.call(this, n), this.t === void 0)) {
|
|
1577
1603
|
this.f &= -33;
|
|
1578
1604
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1579
1605
|
e.S.U(e);
|
|
@@ -1593,7 +1619,7 @@ Q.prototype.peek = function() {
|
|
|
1593
1619
|
};
|
|
1594
1620
|
Object.defineProperty(Q.prototype, "value", { get: function() {
|
|
1595
1621
|
1 & this.f && Oe();
|
|
1596
|
-
var n =
|
|
1622
|
+
var n = vn(this);
|
|
1597
1623
|
if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f)
|
|
1598
1624
|
throw this.v;
|
|
1599
1625
|
return this.v;
|
|
@@ -1604,15 +1630,15 @@ function bn(n) {
|
|
|
1604
1630
|
function yn(n) {
|
|
1605
1631
|
var e = n.u;
|
|
1606
1632
|
if (n.u = void 0, typeof e == "function") {
|
|
1607
|
-
|
|
1608
|
-
var t =
|
|
1609
|
-
|
|
1633
|
+
le++;
|
|
1634
|
+
var t = $;
|
|
1635
|
+
$ = void 0;
|
|
1610
1636
|
try {
|
|
1611
1637
|
e();
|
|
1612
1638
|
} catch (i) {
|
|
1613
1639
|
throw n.f &= -2, n.f |= 8, ot(n), i;
|
|
1614
1640
|
} finally {
|
|
1615
|
-
|
|
1641
|
+
$ = t, st();
|
|
1616
1642
|
}
|
|
1617
1643
|
}
|
|
1618
1644
|
}
|
|
@@ -1621,10 +1647,10 @@ function ot(n) {
|
|
|
1621
1647
|
e.S.U(e);
|
|
1622
1648
|
n.x = void 0, n.s = void 0, yn(n);
|
|
1623
1649
|
}
|
|
1624
|
-
function
|
|
1625
|
-
if (
|
|
1650
|
+
function Kn(n) {
|
|
1651
|
+
if ($ !== this)
|
|
1626
1652
|
throw new Error("Out-of-order effect");
|
|
1627
|
-
wn(this),
|
|
1653
|
+
wn(this), $ = n, this.f &= -2, 8 & this.f && ot(this), st();
|
|
1628
1654
|
}
|
|
1629
1655
|
function ye(n) {
|
|
1630
1656
|
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
@@ -1641,9 +1667,9 @@ ye.prototype.c = function() {
|
|
|
1641
1667
|
}
|
|
1642
1668
|
};
|
|
1643
1669
|
ye.prototype.S = function() {
|
|
1644
|
-
1 & this.f && Oe(), this.f |= 1, this.f &= -9, yn(this), gn(this),
|
|
1645
|
-
var n =
|
|
1646
|
-
return
|
|
1670
|
+
1 & this.f && Oe(), this.f |= 1, this.f &= -9, yn(this), gn(this), le++;
|
|
1671
|
+
var n = $;
|
|
1672
|
+
return $ = this, Kn.bind(this, n);
|
|
1647
1673
|
};
|
|
1648
1674
|
ye.prototype.N = function() {
|
|
1649
1675
|
2 & this.f || (this.f |= 2, this.o = _e, _e = this);
|
|
@@ -1661,7 +1687,7 @@ function at(n) {
|
|
|
1661
1687
|
return e.d.bind(e);
|
|
1662
1688
|
}
|
|
1663
1689
|
var Be, Ue;
|
|
1664
|
-
function
|
|
1690
|
+
function de(n, e) {
|
|
1665
1691
|
b[n] = e.bind(null, b[n] || function() {
|
|
1666
1692
|
});
|
|
1667
1693
|
}
|
|
@@ -1669,7 +1695,7 @@ function De(n) {
|
|
|
1669
1695
|
Ue && Ue(), Ue = n && n.S();
|
|
1670
1696
|
}
|
|
1671
1697
|
function Cn(n) {
|
|
1672
|
-
var e = this, t = n.data, i =
|
|
1698
|
+
var e = this, t = n.data, i = M(t);
|
|
1673
1699
|
i.value = t;
|
|
1674
1700
|
var s = X(function() {
|
|
1675
1701
|
for (var o = e.__v; o = o.__; )
|
|
@@ -1688,21 +1714,21 @@ function Cn(n) {
|
|
|
1688
1714
|
return s.value;
|
|
1689
1715
|
}
|
|
1690
1716
|
Cn.displayName = "_st";
|
|
1691
|
-
Object.defineProperties(
|
|
1717
|
+
Object.defineProperties(D.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Cn }, props: { configurable: !0, get: function() {
|
|
1692
1718
|
return { data: this };
|
|
1693
1719
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1694
|
-
|
|
1720
|
+
de("__b", function(n, e) {
|
|
1695
1721
|
if (typeof e.type == "string") {
|
|
1696
1722
|
var t, i = e.props;
|
|
1697
1723
|
for (var s in i)
|
|
1698
1724
|
if (s !== "children") {
|
|
1699
1725
|
var o = i[s];
|
|
1700
|
-
o instanceof
|
|
1726
|
+
o instanceof D && (t || (e.__np = t = {}), t[s] = o, i[s] = o.peek());
|
|
1701
1727
|
}
|
|
1702
1728
|
}
|
|
1703
1729
|
n(e);
|
|
1704
1730
|
});
|
|
1705
|
-
|
|
1731
|
+
de("__r", function(n, e) {
|
|
1706
1732
|
De();
|
|
1707
1733
|
var t, i = e.__c;
|
|
1708
1734
|
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(s) {
|
|
@@ -1714,10 +1740,10 @@ ue("__r", function(n, e) {
|
|
|
1714
1740
|
}, o;
|
|
1715
1741
|
}())), Be = i, De(t), n(e);
|
|
1716
1742
|
});
|
|
1717
|
-
|
|
1743
|
+
de("__e", function(n, e, t, i) {
|
|
1718
1744
|
De(), Be = void 0, n(e, t, i);
|
|
1719
1745
|
});
|
|
1720
|
-
|
|
1746
|
+
de("diffed", function(n, e) {
|
|
1721
1747
|
De(), Be = void 0;
|
|
1722
1748
|
var t;
|
|
1723
1749
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
@@ -1726,29 +1752,29 @@ ue("diffed", function(n, e) {
|
|
|
1726
1752
|
var o = t.U;
|
|
1727
1753
|
if (o)
|
|
1728
1754
|
for (var a in o) {
|
|
1729
|
-
var
|
|
1730
|
-
|
|
1755
|
+
var c = o[a];
|
|
1756
|
+
c !== void 0 && !(a in i) && (c.d(), o[a] = void 0);
|
|
1731
1757
|
}
|
|
1732
1758
|
else
|
|
1733
1759
|
t.U = o = {};
|
|
1734
1760
|
for (var u in i) {
|
|
1735
1761
|
var h = o[u], p = i[u];
|
|
1736
|
-
h === void 0 ? (h =
|
|
1762
|
+
h === void 0 ? (h = Qn(t, u, p, s), o[u] = h) : h.o(p, s);
|
|
1737
1763
|
}
|
|
1738
1764
|
}
|
|
1739
1765
|
}
|
|
1740
1766
|
n(e);
|
|
1741
1767
|
});
|
|
1742
|
-
function
|
|
1743
|
-
var s = e in n && n.ownerSVGElement === void 0, o =
|
|
1744
|
-
return { o: function(a,
|
|
1745
|
-
o.value = a, i =
|
|
1768
|
+
function Qn(n, e, t, i) {
|
|
1769
|
+
var s = e in n && n.ownerSVGElement === void 0, o = G(t);
|
|
1770
|
+
return { o: function(a, c) {
|
|
1771
|
+
o.value = a, i = c;
|
|
1746
1772
|
}, d: at(function() {
|
|
1747
1773
|
var a = o.value.value;
|
|
1748
1774
|
i[e] !== a && (i[e] = a, s ? n[e] = a : a ? n.setAttribute(e, a) : n.removeAttribute(e));
|
|
1749
1775
|
}) };
|
|
1750
1776
|
}
|
|
1751
|
-
|
|
1777
|
+
de("unmount", function(n, e) {
|
|
1752
1778
|
if (typeof e.type == "string") {
|
|
1753
1779
|
var t = e.__e;
|
|
1754
1780
|
if (t) {
|
|
@@ -1764,13 +1790,13 @@ ue("unmount", function(n, e) {
|
|
|
1764
1790
|
} else {
|
|
1765
1791
|
var a = e.__c;
|
|
1766
1792
|
if (a) {
|
|
1767
|
-
var
|
|
1768
|
-
|
|
1793
|
+
var c = a.__$u;
|
|
1794
|
+
c && (a.__$u = void 0, c.d());
|
|
1769
1795
|
}
|
|
1770
1796
|
}
|
|
1771
1797
|
n(e);
|
|
1772
1798
|
});
|
|
1773
|
-
|
|
1799
|
+
de("__h", function(n, e, t, i) {
|
|
1774
1800
|
(i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
|
|
1775
1801
|
});
|
|
1776
1802
|
F.prototype.shouldComponentUpdate = function(n, e) {
|
|
@@ -1787,9 +1813,9 @@ F.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
1787
1813
|
return !0;
|
|
1788
1814
|
return !1;
|
|
1789
1815
|
};
|
|
1790
|
-
function
|
|
1816
|
+
function M(n) {
|
|
1791
1817
|
return X(function() {
|
|
1792
|
-
return
|
|
1818
|
+
return G(n);
|
|
1793
1819
|
}, []);
|
|
1794
1820
|
}
|
|
1795
1821
|
function B(n) {
|
|
@@ -1800,134 +1826,134 @@ function B(n) {
|
|
|
1800
1826
|
});
|
|
1801
1827
|
}, []);
|
|
1802
1828
|
}
|
|
1803
|
-
var
|
|
1804
|
-
function
|
|
1805
|
-
var a,
|
|
1806
|
-
for (
|
|
1807
|
-
|
|
1808
|
-
var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --
|
|
1829
|
+
var ei = 0;
|
|
1830
|
+
function r(n, e, t, i, s, o) {
|
|
1831
|
+
var a, c, u = {};
|
|
1832
|
+
for (c in e)
|
|
1833
|
+
c == "ref" ? a = e[c] : u[c] = e[c];
|
|
1834
|
+
var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --ei, __source: s, __self: o };
|
|
1809
1835
|
if (typeof n == "function" && (a = n.defaultProps))
|
|
1810
|
-
for (
|
|
1811
|
-
u[
|
|
1836
|
+
for (c in a)
|
|
1837
|
+
u[c] === void 0 && (u[c] = a[c]);
|
|
1812
1838
|
return b.vnode && b.vnode(h), h;
|
|
1813
1839
|
}
|
|
1814
|
-
const
|
|
1840
|
+
const ti = () => r("svg", {
|
|
1815
1841
|
viewBox: "0 0 1024 1024",
|
|
1816
1842
|
version: "1.1",
|
|
1817
1843
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1818
|
-
children:
|
|
1844
|
+
children: r("path", {
|
|
1819
1845
|
d: "M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z"
|
|
1820
1846
|
})
|
|
1821
|
-
}),
|
|
1847
|
+
}), ni = () => r("svg", {
|
|
1822
1848
|
className: "icon",
|
|
1823
1849
|
viewBox: "0 0 1024 1024",
|
|
1824
1850
|
version: "1.1",
|
|
1825
1851
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1826
|
-
children:
|
|
1852
|
+
children: r("path", {
|
|
1827
1853
|
d: "M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"
|
|
1828
1854
|
})
|
|
1829
|
-
}),
|
|
1855
|
+
}), ii = (n) => r("svg", {
|
|
1830
1856
|
viewBox: "0 0 1024 1024",
|
|
1831
1857
|
id: "send",
|
|
1832
1858
|
className: n.className,
|
|
1833
1859
|
version: "1.1",
|
|
1834
1860
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1835
|
-
children:
|
|
1861
|
+
children: r("path", {
|
|
1836
1862
|
d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"
|
|
1837
1863
|
})
|
|
1838
|
-
}),
|
|
1864
|
+
}), si = () => r("svg", {
|
|
1839
1865
|
viewBox: "0 0 1024 1024",
|
|
1840
1866
|
version: "1.1",
|
|
1841
1867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1842
|
-
children:
|
|
1868
|
+
children: r("path", {
|
|
1843
1869
|
d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z"
|
|
1844
1870
|
})
|
|
1845
|
-
}), Tt = () =>
|
|
1871
|
+
}), Tt = () => r("svg", {
|
|
1846
1872
|
viewBox: "0 0 1024 1024",
|
|
1847
1873
|
version: "1.1",
|
|
1848
1874
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1849
|
-
children:
|
|
1875
|
+
children: r("path", {
|
|
1850
1876
|
d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"
|
|
1851
1877
|
})
|
|
1852
|
-
}),
|
|
1878
|
+
}), oi = () => r("svg", {
|
|
1853
1879
|
viewBox: "0 0 1024 1024",
|
|
1854
1880
|
version: "1.1",
|
|
1855
1881
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1856
|
-
children:
|
|
1882
|
+
children: r("path", {
|
|
1857
1883
|
d: "M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z"
|
|
1858
1884
|
})
|
|
1859
|
-
}),
|
|
1885
|
+
}), ai = () => r("svg", {
|
|
1860
1886
|
viewBox: "0 0 1024 1024",
|
|
1861
1887
|
version: "1.1",
|
|
1862
1888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1863
|
-
children:
|
|
1889
|
+
children: r("path", {
|
|
1864
1890
|
d: "M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z"
|
|
1865
1891
|
})
|
|
1866
|
-
}),
|
|
1892
|
+
}), ri = () => r("svg", {
|
|
1867
1893
|
viewBox: "0 0 1024 1024",
|
|
1868
1894
|
version: "1.1",
|
|
1869
1895
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1870
|
-
children:
|
|
1896
|
+
children: r("path", {
|
|
1871
1897
|
d: "M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z"
|
|
1872
1898
|
})
|
|
1873
|
-
}),
|
|
1899
|
+
}), ci = () => r("svg", {
|
|
1874
1900
|
viewBox: "0 0 1024 1024",
|
|
1875
1901
|
version: "1.1",
|
|
1876
1902
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1877
|
-
children:
|
|
1903
|
+
children: r("path", {
|
|
1878
1904
|
d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64"
|
|
1879
1905
|
})
|
|
1880
|
-
}),
|
|
1906
|
+
}), li = () => r("svg", {
|
|
1881
1907
|
viewBox: "0 0 1024 1024",
|
|
1882
1908
|
version: "1.1",
|
|
1883
1909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1884
|
-
children: [
|
|
1910
|
+
children: [r("path", {
|
|
1885
1911
|
d: "M481.0752 263.3728l50.9952 1.024 1.8432-105.8816-50.9952-0.8192z"
|
|
1886
|
-
}),
|
|
1912
|
+
}), r("path", {
|
|
1887
1913
|
d: "M486.441426 180.895362a66.56 66.56 0 1 0 42.091944-126.290153 66.56 66.56 0 1 0-42.091944 126.290153Z"
|
|
1888
|
-
}),
|
|
1914
|
+
}), r("path", {
|
|
1889
1915
|
d: "M138.8544 664.3712c-52.8384 0-95.8464-43.008-95.8464-95.8464s43.008-95.8464 95.8464-95.8464M880.0256 472.6784c52.8384 0 95.8464 43.008 95.8464 95.8464s-43.008 95.8464-95.8464 95.8464"
|
|
1890
|
-
}),
|
|
1916
|
+
}), r("path", {
|
|
1891
1917
|
d: "M507.4944 220.5696c-220.16 0-398.7456 162.816-398.7456 363.7248s178.5856 363.7248 398.7456 363.7248 398.7456-162.816 398.7456-363.7248-178.5856-363.7248-398.7456-363.7248z m0 559.9232c-166.2976 0-301.2608-100.5568-301.2608-224.4608s134.9632-224.4608 301.2608-224.4608S808.7552 432.128 808.7552 556.032 673.792 780.4928 507.4944 780.4928z"
|
|
1892
|
-
}),
|
|
1918
|
+
}), r("path", {
|
|
1893
1919
|
d: "M319.6928 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
|
|
1894
|
-
}),
|
|
1920
|
+
}), r("path", {
|
|
1895
1921
|
d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
|
|
1896
1922
|
})]
|
|
1897
|
-
}),
|
|
1923
|
+
}), ui = () => r("svg", {
|
|
1898
1924
|
viewBox: "0 0 18 18",
|
|
1899
1925
|
fill: "none",
|
|
1900
1926
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1901
|
-
children: [
|
|
1927
|
+
children: [r("path", {
|
|
1902
1928
|
d: "M5.856 17.121a.979.979 0 0 1-.327-.06.839.839 0 0 1-.283-.177.739.739 0 0 1-.187-.255.724.724 0 0 1-.07-.303l-.02-1.609a4.663 4.663 0 0 1-1.446-.455 4.252 4.252 0 0 1-.637-.401c-.199-.146-.385-.31-.553-.492a4.442 4.442 0 0 1-.45-.577 4.303 4.303 0 0 1-.327-.637 3.823 3.823 0 0 1-.206-.686 3.729 3.729 0 0 1-.064-.704V6.478c0-.261.025-.516.077-.771a4.43 4.43 0 0 1 .244-.747 4.062 4.062 0 0 1 .932-1.28c.2-.183.418-.347.65-.493.23-.145.482-.267.739-.364a4.21 4.21 0 0 1 .81-.225c.27-.054.553-.078.835-.078H8.55c.103 0 .2.018.29.054a.7.7 0 0 1 .411.376.667.667 0 0 1-.161.766.736.736 0 0 1-.25.151.764.764 0 0 1-.29.055H5.573c-.186 0-.366.012-.54.049-.18.03-.353.079-.52.145-.167.061-.328.14-.482.237-.148.091-.29.2-.418.316a2.897 2.897 0 0 0-.347.388c-.097.14-.187.286-.257.444a2.473 2.473 0 0 0-.206.977v4.287c0 .17.013.333.051.503a2.549 2.549 0 0 0 .772 1.33 2.721 2.721 0 0 0 .913.559c.167.066.347.115.527.152.18.03.36.048.546.048a.904.904 0 0 1 .61.23.848.848 0 0 1 .194.262.84.84 0 0 1 .07.303l.007.99 1.915-1.293a2.877 2.877 0 0 1 1.64-.492h2.372c.186 0 .366-.018.54-.048.18-.03.353-.08.52-.146.168-.067.329-.146.483-.237.148-.091.29-.2.418-.316.128-.121.244-.249.347-.388a2.8 2.8 0 0 0 .257-.444 2.47 2.47 0 0 0 .206-.977V8.585a.646.646 0 0 1 .225-.492.679.679 0 0 1 .244-.152.814.814 0 0 1 .585 0c.09.03.174.085.244.152a.657.657 0 0 1 .225.492V10.8c0 .261-.032.516-.083.771a4.192 4.192 0 0 1-.245.74c-.109.244-.244.468-.398.687a3.735 3.735 0 0 1-.534.6c-.2.183-.418.347-.65.493a4.134 4.134 0 0 1-.738.364 4.7 4.7 0 0 1-.81.225c-.27.054-.553.079-.836.079h-1.877c-.604 0-1.144.164-1.633.491l-2.54 1.713a.913.913 0 0 1-.514.157z",
|
|
1903
1929
|
fill: "currentColor"
|
|
1904
|
-
}),
|
|
1930
|
+
}), r("path", {
|
|
1905
1931
|
d: "M15.866 4.125h-4.174c-.41 0-.741.313-.741.7 0 .387.332.7.741.7h4.174c.41 0 .742-.313.742-.7 0-.387-.332-.7-.742-.7z",
|
|
1906
1932
|
fill: "currentColor"
|
|
1907
|
-
}),
|
|
1933
|
+
}), r("path", {
|
|
1908
1934
|
d: "M14.537 2.932c0-.396-.34-.717-.759-.717s-.758.32-.758.717v3.786c0 .396.34.717.758.717.42 0 .76-.321.76-.717V2.932z",
|
|
1909
1935
|
fill: "currentColor"
|
|
1910
1936
|
})]
|
|
1911
|
-
}),
|
|
1937
|
+
}), di = () => r("svg", {
|
|
1912
1938
|
viewBox: "64 64 896 896",
|
|
1913
1939
|
focusable: "false",
|
|
1914
1940
|
width: "1em",
|
|
1915
1941
|
height: "1em",
|
|
1916
1942
|
fill: "currentColor",
|
|
1917
1943
|
"aria-hidden": "true",
|
|
1918
|
-
children:
|
|
1944
|
+
children: r("path", {
|
|
1919
1945
|
d: "M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"
|
|
1920
1946
|
})
|
|
1921
|
-
}),
|
|
1947
|
+
}), hi = () => r("svg", {
|
|
1922
1948
|
fill: "currentColor",
|
|
1923
1949
|
viewBox: "0 0 1000 1000",
|
|
1924
1950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1925
1951
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1926
1952
|
children: Array.from({
|
|
1927
1953
|
length: 4
|
|
1928
|
-
}).map((
|
|
1929
|
-
const p = u * (146.66666666666666 + 140), l = 1e3 / 2 - 250 / 2,
|
|
1930
|
-
return
|
|
1954
|
+
}).map((c, u) => {
|
|
1955
|
+
const p = u * (146.66666666666666 + 140), l = 1e3 / 2 - 250 / 2, m = 1e3 / 2 - 500 / 2;
|
|
1956
|
+
return r("rect", {
|
|
1931
1957
|
fill: "currentColor",
|
|
1932
1958
|
rx: 70,
|
|
1933
1959
|
ry: 70,
|
|
@@ -1935,16 +1961,16 @@ const ei = () => c("svg", {
|
|
|
1935
1961
|
width: 140,
|
|
1936
1962
|
x: p,
|
|
1937
1963
|
y: l,
|
|
1938
|
-
children: [
|
|
1964
|
+
children: [r("animate", {
|
|
1939
1965
|
attributeName: "height",
|
|
1940
1966
|
values: "250; 500; 250",
|
|
1941
1967
|
keyTimes: "0; 0.5; 1",
|
|
1942
1968
|
dur: "".concat(0.8, "s"),
|
|
1943
1969
|
begin: "".concat(0.8 / 4 * u, "s"),
|
|
1944
1970
|
repeatCount: "indefinite"
|
|
1945
|
-
}),
|
|
1971
|
+
}), r("animate", {
|
|
1946
1972
|
attributeName: "y",
|
|
1947
|
-
values: "".concat(l, "; ").concat(
|
|
1973
|
+
values: "".concat(l, "; ").concat(m, "; ").concat(l),
|
|
1948
1974
|
keyTimes: "0; 0.5; 1",
|
|
1949
1975
|
dur: "".concat(0.8, "s"),
|
|
1950
1976
|
begin: "".concat(0.8 / 4 * u, "s"),
|
|
@@ -1952,36 +1978,36 @@ const ei = () => c("svg", {
|
|
|
1952
1978
|
})]
|
|
1953
1979
|
}, u);
|
|
1954
1980
|
})
|
|
1955
|
-
}),
|
|
1981
|
+
}), pi = (n) => r("svg", {
|
|
1956
1982
|
className: n.className,
|
|
1957
1983
|
onClick: n.onClick,
|
|
1958
1984
|
viewBox: "0 0 1024 1024",
|
|
1959
1985
|
version: "1.1",
|
|
1960
1986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1961
|
-
children:
|
|
1987
|
+
children: r("path", {
|
|
1962
1988
|
d: "M128 384a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m768 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m-372.4288 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z"
|
|
1963
1989
|
})
|
|
1964
|
-
}),
|
|
1990
|
+
}), fi = (n) => r("svg", {
|
|
1965
1991
|
className: n.className,
|
|
1966
1992
|
viewBox: "0 0 1024 1024",
|
|
1967
1993
|
version: "1.1",
|
|
1968
1994
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1969
|
-
children:
|
|
1995
|
+
children: r("path", {
|
|
1970
1996
|
d: "M498.33984 607.8464c-10.99776-32.9728-50.09408-73.5232-82.6368-85.74976L150.9376 422.8096c-38.54336-14.4384-36.98688-69.46816 2.27328-81.73568L844.92288 124.90752c33.30048-10.40384 64.57344 20.8896 54.1696 54.1696L682.92608 870.78912a43.2128 43.2128 0 0 1-81.36704 3.25632 121682.5344 121682.5344 0 0 1-103.2192-266.19904z"
|
|
1971
1997
|
})
|
|
1972
|
-
}), Tn = () =>
|
|
1998
|
+
}), Tn = () => r("svg", {
|
|
1973
1999
|
className: "icon",
|
|
1974
2000
|
viewBox: "0 0 1024 1024",
|
|
1975
2001
|
version: "1.1",
|
|
1976
2002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1977
|
-
children:
|
|
2003
|
+
children: r("path", {
|
|
1978
2004
|
d: "M972.657609 209.348408C987.158609 209.36839 998.930114 197.571202 998.949999 182.99865 998.969882 168.426097 987.230618 156.59651 972.729617 156.576528L32.457975 155.280806C17.956974 155.260823 6.18547 167.058012 6.165585 181.630564 6.1457 196.203116 17.884965 208.032703 32.385966 208.052686L972.657609 209.348408ZM180.466902 992.356169 180.466902 1019.014859 206.993296 1018.74074 833.361858 1012.267947 859.348284 1011.999407 859.348284 985.883377 859.348284 289.397297C859.348284 274.824732 847.59289 263.011332 833.091874 263.011332 818.590859 263.011332 806.835465 274.824732 806.835465 289.397297L806.835465 985.883377 832.82189 959.498805 206.453329 965.971599 232.979723 992.356169 232.979723 282.67005C232.979723 268.097483 221.224329 256.284085 206.723313 256.284085 192.222298 256.284085 180.466902 268.097483 180.466902 282.67005L180.466902 992.356169ZM656.410257 847.079027C656.410257 861.651593 668.165651 873.464992 682.666667 873.464992 697.167682 873.464992 708.923076 861.651593 708.923076 847.079027L708.923076 372.131659C708.923076 357.559091 697.167682 345.745694 682.666667 345.745694 668.165651 345.745694 656.410257 357.559091 656.410257 372.131659L656.410257 847.079027ZM341.333333 847.079027C341.333333 861.651593 353.08873 873.464992 367.589743 873.464992 382.090758 873.464992 393.846155 861.651593 393.846155 847.079027L393.846155 372.131659C393.846155 357.559091 382.090758 345.745694 367.589743 345.745694 353.08873 345.745694 341.333333 357.559091 341.333333 372.131659L341.333333 847.079027ZM498.871795 847.079027C498.871795 861.651593 510.627189 873.464992 525.128205 873.464992 539.62922 873.464992 551.384614 861.651593 551.384614 847.079027L551.384614 372.131659C551.384614 357.559091 539.62922 345.745694 525.128205 345.745694 510.627189 345.745694 498.871795 357.559091 498.871795 372.131659L498.871795 847.079027ZM392.147755 116.721777C392.147755 102.063669 403.758665 90.363507 418.40134 90.363507L622.925796 90.363507C637.408947 90.363507 649.179381 102.1619 649.179381 116.549585L649.179381 171.644875 701.692203 171.644875 701.692203 116.549585C701.692203 72.986607 666.38105 37.591577 622.925796 37.591577L418.40134 37.591577C374.724427 37.591577 339.634933 72.950804 339.634933 116.721777L339.634933 165.310801 392.147755 165.310801 392.147755 116.721777Z"
|
|
1979
2005
|
})
|
|
1980
|
-
}),
|
|
2006
|
+
}), mi = (n) => r("svg", {
|
|
1981
2007
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1982
2008
|
className: n.className,
|
|
1983
2009
|
viewBox: "0 0 512 512",
|
|
1984
|
-
children:
|
|
2010
|
+
children: r("path", {
|
|
1985
2011
|
fill: "none",
|
|
1986
2012
|
stroke: "currentColor",
|
|
1987
2013
|
strokeLinecap: "round",
|
|
@@ -1989,20 +2015,20 @@ const ei = () => c("svg", {
|
|
|
1989
2015
|
strokeWidth: "48",
|
|
1990
2016
|
d: "M112 184l144 144 144-144"
|
|
1991
2017
|
})
|
|
1992
|
-
}), We = (n) =>
|
|
2018
|
+
}), We = (n) => r("svg", {
|
|
1993
2019
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1994
2020
|
className: "".concat(n.className, " icon"),
|
|
1995
2021
|
viewBox: "0 0 512 512",
|
|
1996
|
-
children:
|
|
2022
|
+
children: r("path", {
|
|
1997
2023
|
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 01-12 5.71h-.27a16 16 0 01-11.89-5.3l-57.6-64a16 16 0 1123.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0124.5 20.58z"
|
|
1998
2024
|
})
|
|
1999
|
-
}),
|
|
2025
|
+
}), je = (n) => r("svg", {
|
|
2000
2026
|
className: n.className,
|
|
2001
2027
|
width: "16",
|
|
2002
2028
|
height: "16",
|
|
2003
2029
|
viewBox: "0 0 50 50",
|
|
2004
2030
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2005
|
-
children:
|
|
2031
|
+
children: r("circle", {
|
|
2006
2032
|
cx: "25",
|
|
2007
2033
|
cy: "25",
|
|
2008
2034
|
r: "20",
|
|
@@ -2011,7 +2037,7 @@ const ei = () => c("svg", {
|
|
|
2011
2037
|
fill: "none",
|
|
2012
2038
|
strokeDasharray: "31.415, 31.415",
|
|
2013
2039
|
strokeLinecap: "round",
|
|
2014
|
-
children:
|
|
2040
|
+
children: r("animateTransform", {
|
|
2015
2041
|
attributeName: "transform",
|
|
2016
2042
|
type: "rotate",
|
|
2017
2043
|
from: "0 25 25",
|
|
@@ -2020,52 +2046,52 @@ const ei = () => c("svg", {
|
|
|
2020
2046
|
repeatCount: "indefinite"
|
|
2021
2047
|
})
|
|
2022
2048
|
})
|
|
2023
|
-
}), vi = () =>
|
|
2049
|
+
}), vi = () => r("svg", {
|
|
2024
2050
|
className: "icon",
|
|
2025
2051
|
viewBox: "0 0 1024 1024",
|
|
2026
2052
|
version: "1.1",
|
|
2027
2053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2028
2054
|
width: "18",
|
|
2029
2055
|
height: "18",
|
|
2030
|
-
children:
|
|
2056
|
+
children: r("path", {
|
|
2031
2057
|
d: "M704 256v490.666667a170.666667 170.666667 0 0 1-170.666667 170.666666 170.666667 170.666667 0 0 1-170.666666-170.666666V213.333333A106.666667 106.666667 0 0 1 469.333333 106.666667 106.666667 106.666667 0 0 1 576 213.333333v448a42.666667 42.666667 0 0 1-42.666667 42.666667 42.666667 42.666667 0 0 1-42.666666-42.666667V256H426.666667v405.333333a106.666667 106.666667 0 0 0 106.666666 106.666667 106.666667 106.666667 0 0 0 106.666667-106.666667V213.333333a170.666667 170.666667 0 0 0-170.666667-170.666666 170.666667 170.666667 0 0 0-170.666666 170.666666v533.333334a234.666667 234.666667 0 0 0 234.666666 234.666666 234.666667 234.666667 0 0 0 234.666667-234.666666V256h-64z"
|
|
2032
2058
|
})
|
|
2033
|
-
}),
|
|
2059
|
+
}), xn = () => r("svg", {
|
|
2034
2060
|
className: "icon",
|
|
2035
2061
|
viewBox: "0 0 1024 1024",
|
|
2036
2062
|
version: "1.1",
|
|
2037
2063
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2038
2064
|
width: "18",
|
|
2039
2065
|
height: "18",
|
|
2040
|
-
children: [
|
|
2066
|
+
children: [r("path", {
|
|
2041
2067
|
d: "M842.666667 285.866667l-187.733334-187.733334c-14.933333-14.933333-32-21.333333-53.333333-21.333333H234.666667C194.133333 74.666667 160 108.8 160 149.333333v725.333334c0 40.533333 34.133333 74.666667 74.666667 74.666666h554.666666c40.533333 0 74.666667-34.133333 74.666667-74.666666V337.066667c0-19.2-8.533333-38.4-21.333333-51.2z m-44.8 44.8c-2.133333 2.133333-4.266667 0-8.533334 0h-170.666666c-6.4 0-10.666667-4.266667-10.666667-10.666667V149.333333c0-2.133333 0-6.4-2.133333-8.533333 0 0 2.133333 0 2.133333 2.133333l189.866667 187.733334z m-8.533334 554.666666H234.666667c-6.4 0-10.666667-4.266667-10.666667-10.666666V149.333333c0-6.4 4.266667-10.666667 10.666667-10.666666h311.466666c-2.133333 4.266667-2.133333 6.4-2.133333 10.666666v170.666667c0 40.533333 34.133333 74.666667 74.666667 74.666667h170.666666c4.266667 0 6.4 0 10.666667-2.133334V874.666667c0 6.4-4.266667 10.666667-10.666667 10.666666z",
|
|
2042
2068
|
fill: "currentColor"
|
|
2043
|
-
}),
|
|
2069
|
+
}), r("path", {
|
|
2044
2070
|
d: "M640 693.333333H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM640 522.666667H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM341.333333 416h85.333334c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-85.333334c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32z",
|
|
2045
2071
|
fill: "currentColor"
|
|
2046
2072
|
})]
|
|
2047
|
-
}),
|
|
2073
|
+
}), _i = () => r("svg", {
|
|
2048
2074
|
className: "icon",
|
|
2049
2075
|
viewBox: "0 0 1024 1024",
|
|
2050
2076
|
version: "1.1",
|
|
2051
2077
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2052
2078
|
width: "18",
|
|
2053
2079
|
height: "18",
|
|
2054
|
-
children:
|
|
2080
|
+
children: r("path", {
|
|
2055
2081
|
d: "M557.248 511.68l135.776-135.744-45.248-45.28L512 466.432l-135.776-135.776-45.248 45.28 135.776 135.744-135.776 135.776 45.248 45.248L512 556.928l135.776 135.776 45.248-45.248-135.776-135.776zM512 64c247.136 0 448 200.864 448 448s-200.864 448-448 448S64 759.136 64 512 264.864 64 512 64z",
|
|
2056
2082
|
fill: "currentColor"
|
|
2057
2083
|
})
|
|
2058
|
-
}),
|
|
2084
|
+
}), gi = () => r("svg", {
|
|
2059
2085
|
className: "icon",
|
|
2060
2086
|
viewBox: "0 0 1024 1024",
|
|
2061
2087
|
version: "1.1",
|
|
2062
2088
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2063
2089
|
width: "18",
|
|
2064
2090
|
height: "18",
|
|
2065
|
-
children:
|
|
2091
|
+
children: r("path", {
|
|
2066
2092
|
d: "M512.43945313 904.51953125c-6.06445313 0-12.12890625-1.58203125-17.57812501-4.74609375L136.70703125 689.71484375c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867188-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l76.37695313-44.91210938L136.97070312 540.125c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867187-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l73.38867187-43.15429688-73.125-42.890625C126.51171875 387.81054687 120.0078125 376.38476562 120.0078125 364.08007812c0-12.3046875 6.50390625-23.73046875 17.13867188-29.97070312L495.828125 122.99609375c10.8984375-6.41601563 24.34570313-6.41601563 35.24414063 0l358.15429687 210.05859375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-73.38867188 43.15429688 73.12500001 42.890625c10.63476563 6.24023438 17.13867188 17.66601563 17.13867187 29.97070312s-6.50390625 23.73046875-17.13867187 29.97070313L812.5859375 583.89453125l76.11328125 44.6484375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-358.59375 211.2890625c-5.44921875 3.1640625-11.6015625 4.74609375-17.66601563 4.74609375zM223.015625 659.65625l289.42382813 169.8046875 290.12695312-170.77148438-58.44726563-34.27734374L530.28125 750.18359375a34.67285156 34.67285156 0 0 1-35.24414063 0L281.7265625 625.02734375 223.015625 659.65625z m76.90429688-104.58984375l212.69531249 124.8046875 290.12695313-170.77148438-55.546875-32.60742187-216.65039063 127.6171875a34.67285156 34.67285156 0 0 1-35.24414062 0L279.00195312 477.28320312l-55.81054687 32.78320313 75.49804688 44.296875c0.43945313 0.26367188 0.79101563 0.52734375 1.23046874 0.703125z m-2.81250001-147.83203125l215.68359376 126.5625 216.12304687-127.17773438c0.3515625-0.26367188 0.703125-0.43945313 1.0546875-0.61523437l72.86132813-42.890625-289.33593751-169.8046875-290.12695312 170.68359375 72.59765625 42.62695313c0.43945313 0.17578125 0.79101563 0.43945313 1.14257813 0.61523437z"
|
|
2067
2093
|
})
|
|
2068
|
-
}),
|
|
2094
|
+
}), wi = (n) => r("svg", {
|
|
2069
2095
|
className: n.className,
|
|
2070
2096
|
id: "stop",
|
|
2071
2097
|
viewBox: "0 0 1025 1024",
|
|
@@ -2073,18 +2099,18 @@ const ei = () => c("svg", {
|
|
|
2073
2099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2074
2100
|
width: "18",
|
|
2075
2101
|
height: "18",
|
|
2076
|
-
children: [
|
|
2102
|
+
children: [r("path", {
|
|
2077
2103
|
d: "M512.268258 1022.835842c-68.658678 0-135.399619-13.564433-198.369591-40.316509-60.752236-25.809077-115.373446-62.712976-162.346233-109.685763-46.971763-46.971763-83.875662-101.592974-109.685763-162.346233C15.115619 647.517366 1.551186 580.777449 1.551186 512.118771S15.115619 376.719151 41.866671 313.74918c25.810101-60.752236 62.714-115.373446 109.685763-162.346233 46.972787-46.971763 101.593997-83.875662 162.346233-109.685763 62.969971-26.751052 129.710912-40.315485 198.369591-40.315485s135.398595 13.564433 198.368567 40.315485c60.752236 25.810101 115.373446 62.714 162.346233 109.685763 46.971763 46.972787 83.875662 101.593997 109.685763 162.346233 26.752076 62.969971 40.316509 129.710912 40.316509 198.369591s-13.564433 135.398595-40.316509 198.368567c-25.809077 60.75326-62.712976 115.37447-109.685763 162.346233-46.971763 46.972787-101.592974 83.876686-162.346233 109.685763C647.666853 1009.27141 580.925912 1022.835842 512.268258 1022.835842zM512.268258 50.548195c-62.018782 0-122.293887 12.247716-179.152287 36.403219-54.923257 23.333323-104.317532 56.709936-146.810821 99.204249s-75.870926 91.888588-99.204249 146.810821c-24.155503 56.8584-36.403219 117.133505-36.403219 179.152287 0 62.017758 12.247716 122.292863 36.403219 179.152287 23.333323 54.923257 56.709936 104.317532 99.204249 146.811845 42.493289 42.493289 91.888588 75.870926 146.810821 99.204249 56.8584 24.155503 117.133505 36.403219 179.152287 36.403219 62.017758 0 122.292863-12.247716 179.152287-36.403219 54.923257-23.333323 104.317532-56.71096 146.811845-99.204249 42.493289-42.494313 75.870926-91.888588 99.204249-146.811845 24.155503-56.8584 36.403219-117.133505 36.403219-179.152287s-12.247716-122.293887-36.403219-179.152287c-23.334347-54.923257-56.71096-104.317532-99.205273-146.810821-42.493289-42.493289-91.887565-75.870926-146.810821-99.204249C634.561121 62.795911 574.286016 50.548195 512.268258 50.548195z",
|
|
2078
2104
|
fill: "currentColor"
|
|
2079
|
-
}),
|
|
2105
|
+
}), r("path", {
|
|
2080
2106
|
d: "M655.434047 694.244421 367.12637 694.244421c-21.046987 0-38.170445-17.123458-38.170445-38.170445L328.955925 367.766298c0-21.046987 17.123458-38.170445 38.170445-38.170445l288.307678 0c21.048011 0 38.170445 17.123458 38.170445 38.170445l0 288.307678C693.604492 677.120962 676.482058 694.244421 655.434047 694.244421zM380.150191 643.050154l262.260035 0L642.410226 380.79012 380.150191 380.79012 380.150191 643.050154z",
|
|
2081
2107
|
fill: "currentColor"
|
|
2082
2108
|
})]
|
|
2083
|
-
}),
|
|
2109
|
+
}), bi = (n) => r("svg", {
|
|
2084
2110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2085
2111
|
className: n.className,
|
|
2086
2112
|
viewBox: "0 0 512 512",
|
|
2087
|
-
children:
|
|
2113
|
+
children: r("path", {
|
|
2088
2114
|
fill: "none",
|
|
2089
2115
|
stroke: "currentColor",
|
|
2090
2116
|
strokeLinecap: "round",
|
|
@@ -2092,41 +2118,41 @@ const ei = () => c("svg", {
|
|
|
2092
2118
|
strokeWidth: "48",
|
|
2093
2119
|
d: "M112 268l144 144 144-144M256 392V100"
|
|
2094
2120
|
})
|
|
2095
|
-
}),
|
|
2121
|
+
}), yi = () => r("svg", {
|
|
2096
2122
|
viewBox: "0 0 1024 1024",
|
|
2097
2123
|
version: "1.1",
|
|
2098
2124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2099
2125
|
width: "18",
|
|
2100
2126
|
height: "18",
|
|
2101
|
-
children: [
|
|
2127
|
+
children: [r("path", {
|
|
2102
2128
|
d: "M394.688 126.208a32 32 0 0 1 32-32h170.688a32 32 0 0 1 32 32v138.624h288a32 32 0 0 1 32 32v170.688a32 32 0 0 1-32 32H106.688a32 32 0 0 1-32-32V296.832a32 32 0 0 1 32-32h288V126.208z m64 32v138.624a32 32 0 0 1-32 32h-288v106.688h746.688V328.832h-288a32 32 0 0 1-32-32V158.208H458.688z"
|
|
2103
|
-
}),
|
|
2129
|
+
}), r("path", {
|
|
2104
2130
|
d: "M138.688 469.376a32 32 0 0 1 32-32h682.688a32 32 0 0 1 32 32v384a32 32 0 0 1-32 32H170.688a32 32 0 0 1-32-32v-384z m64 32v320h618.688v-320H202.688z"
|
|
2105
|
-
}),
|
|
2131
|
+
}), r("path", {
|
|
2106
2132
|
d: "M341.376 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32zM512 691.2a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0v-128a32 32 0 0 1 32-32zM682.688 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32z"
|
|
2107
2133
|
})]
|
|
2108
|
-
}),
|
|
2134
|
+
}), Ci = () => r("svg", {
|
|
2109
2135
|
viewBox: "0 0 1024 1024",
|
|
2110
2136
|
version: "1.1",
|
|
2111
2137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2112
2138
|
width: "18",
|
|
2113
2139
|
height: "18",
|
|
2114
|
-
children:
|
|
2140
|
+
children: r("path", {
|
|
2115
2141
|
d: "M843.251 424.407l43.828-74.898c10.194-17.946 32.596-22.158 48.956-11.598 16.298 10.499 23.44 32.658 14.223 49.566l-113.11 195.212-61.164-40.044-126.418-82.285c-16.115-11.598-20.632-34.428-10.194-51.702 9.705-17.397 31.009-23.501 47.857-13.734l89.67 59.028C748.576 295.547 615.81 180.667 461.008 180.667c-177.387 0-320.042 148.758-320.042 331.335 0 183.613 143.692 331.334 319.981 331.334 107.861 0.184 208.58-56.158 268.034-149.858 1.099-1.038 1.099-2.075 2.075-2.075 6.348-9.949 17.092-15.871 28.568-15.81 19.35 0 35.648 16.848 35.648 36.93 0 7.508-2.137 14.833-6.104 21.059-72.823 114.698-196.066 183.675-328.099 183.614-216.088 0-391.4-181.478-391.4-405.195 0-223.718 175.312-405.195 391.339-405.195 183.125-0.427 342.016 131.606 382.243 317.601z"
|
|
2116
2142
|
})
|
|
2117
|
-
}),
|
|
2143
|
+
}), Ti = () => r("svg", {
|
|
2118
2144
|
version: "1.1",
|
|
2119
2145
|
className: "icon",
|
|
2120
2146
|
viewBox: "0 0 1024 1024",
|
|
2121
2147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2122
|
-
children:
|
|
2148
|
+
children: r("path", {
|
|
2123
2149
|
d: "M627.498667 55.168l170.666666 170.666667a42.624 42.624 0 0 1 0 60.330666l-469.333333 469.333334A42.538667 42.538667 0 0 1 298.666667 768H128a42.666667 42.666667 0 0 1-42.666667-42.666667v-170.666666c0-11.306667 4.48-22.186667 12.501334-30.165334l469.333333-469.333333a42.624 42.624 0 0 1 60.330667 0zM896 896a42.666667 42.666667 0 0 1 0 85.333333H128a42.666667 42.666667 0 0 1 0-85.333333h768zM597.333333 145.664l-426.666666 426.666667V682.666667h110.336l426.666666-426.666667L597.333333 145.664z"
|
|
2124
2150
|
})
|
|
2125
|
-
}),
|
|
2151
|
+
}), xi = (n) => r("svg", {
|
|
2126
2152
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2127
2153
|
className: n.className,
|
|
2128
2154
|
viewBox: "0 0 512 512",
|
|
2129
|
-
children:
|
|
2155
|
+
children: r("path", {
|
|
2130
2156
|
fill: "none",
|
|
2131
2157
|
stroke: "currentColor",
|
|
2132
2158
|
strokeLinecap: "round",
|
|
@@ -2134,137 +2160,311 @@ const ei = () => c("svg", {
|
|
|
2134
2160
|
strokeWidth: "48",
|
|
2135
2161
|
d: "M184 112l144 144-144 144"
|
|
2136
2162
|
})
|
|
2137
|
-
}), Si = () =>
|
|
2163
|
+
}), Si = () => r("svg", {
|
|
2138
2164
|
className: "icon",
|
|
2139
2165
|
viewBox: "0 0 1024 1024",
|
|
2140
2166
|
version: "1.1",
|
|
2141
2167
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2142
|
-
children:
|
|
2168
|
+
children: r("path", {
|
|
2143
2169
|
d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z"
|
|
2144
2170
|
})
|
|
2145
2171
|
});
|
|
2146
|
-
const
|
|
2172
|
+
const ki = (n) => {
|
|
2147
2173
|
const {
|
|
2148
2174
|
items: e
|
|
2149
|
-
} = n, t =
|
|
2150
|
-
|
|
2151
|
-
s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a,
|
|
2152
|
-
a.done && (t.value = [...t.value,
|
|
2175
|
+
} = n, t = M([]), i = new k("chat-thought-chain"), s = M([]);
|
|
2176
|
+
I(() => {
|
|
2177
|
+
s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a, c) => {
|
|
2178
|
+
a.done && (t.value = [...t.value, c]);
|
|
2153
2179
|
});
|
|
2154
2180
|
}, [e]);
|
|
2155
2181
|
const o = (a) => {
|
|
2156
|
-
t.value.includes(a) ? t.value = t.value.filter((
|
|
2182
|
+
t.value.includes(a) ? t.value = t.value.filter((c) => c !== a) : t.value = [...t.value, a];
|
|
2157
2183
|
};
|
|
2158
|
-
return s.value.length === 0 ? null :
|
|
2184
|
+
return s.value.length === 0 ? null : r("div", {
|
|
2159
2185
|
className: "".concat(i.b(), " ").concat(i.is("single", s.value.length === 1)),
|
|
2160
|
-
children: s.value.map((a,
|
|
2186
|
+
children: s.value.map((a, c) => {
|
|
2161
2187
|
if (!a.description)
|
|
2162
2188
|
return;
|
|
2163
|
-
const u = t.value.includes(
|
|
2164
|
-
return
|
|
2189
|
+
const u = t.value.includes(c);
|
|
2190
|
+
return r("div", {
|
|
2165
2191
|
className: "".concat(i.e("item"), " ").concat(i.is("collapsed", u)),
|
|
2166
|
-
children: [
|
|
2192
|
+
children: [r("div", {
|
|
2167
2193
|
className: i.e("item-icon"),
|
|
2168
|
-
children: a.icon ||
|
|
2169
|
-
children:
|
|
2194
|
+
children: a.icon || r("span", {
|
|
2195
|
+
children: c
|
|
2170
2196
|
})
|
|
2171
|
-
}),
|
|
2197
|
+
}), r("div", {
|
|
2172
2198
|
className: i.e("item-content"),
|
|
2173
|
-
children: [
|
|
2199
|
+
children: [r("div", {
|
|
2174
2200
|
className: i.e("item-title"),
|
|
2175
|
-
onClick: () => o(
|
|
2176
|
-
children: [a.title,
|
|
2201
|
+
onClick: () => o(c),
|
|
2202
|
+
children: [a.title, r(mi, {
|
|
2177
2203
|
className: i.e("icon")
|
|
2178
2204
|
})]
|
|
2179
|
-
}),
|
|
2205
|
+
}), r("div", {
|
|
2180
2206
|
className: i.e("item-description"),
|
|
2181
2207
|
children: a.description
|
|
2182
2208
|
})]
|
|
2183
2209
|
})]
|
|
2184
|
-
},
|
|
2210
|
+
}, c);
|
|
2185
2211
|
})
|
|
2186
2212
|
});
|
|
2187
2213
|
};
|
|
2188
|
-
const
|
|
2214
|
+
const Ni = (n) => {
|
|
2189
2215
|
const {
|
|
2190
2216
|
items: e,
|
|
2191
2217
|
onItemClick: t
|
|
2192
2218
|
} = n, i = (o, a) => {
|
|
2193
2219
|
t == null || t(o, a);
|
|
2194
|
-
}, s = new
|
|
2195
|
-
return
|
|
2220
|
+
}, s = new k("chat-suggestions");
|
|
2221
|
+
return r("div", {
|
|
2196
2222
|
className: "".concat(s.b()),
|
|
2197
|
-
children: e.map((o, a) =>
|
|
2223
|
+
children: e.map((o, a) => r("div", {
|
|
2198
2224
|
className: "".concat(s.e("item"), " ").concat(s.is("action", o.type === "action")),
|
|
2199
|
-
onClick: (
|
|
2225
|
+
onClick: (c) => i(o, c),
|
|
2200
2226
|
title: o.metadata.content_name,
|
|
2201
|
-
children: [o.metadata.content_name,
|
|
2227
|
+
children: [o.metadata.content_name, r(xi, {
|
|
2202
2228
|
className: "".concat(s.e("item-icon"))
|
|
2203
2229
|
})]
|
|
2204
2230
|
}, a))
|
|
2205
2231
|
});
|
|
2206
2232
|
};
|
|
2207
|
-
const
|
|
2233
|
+
const $i = (n) => {
|
|
2234
|
+
const e = new k("chat-tool-call-item"), t = M(!1), i = M(!1);
|
|
2235
|
+
let s;
|
|
2236
|
+
const o = ce(), a = () => {
|
|
2237
|
+
t.value = !t.value, u("code-block-".concat(o), n.item);
|
|
2238
|
+
}, c = (l) => {
|
|
2239
|
+
l.stopPropagation(), s && clearTimeout(s), i.value = !0, navigator.clipboard.writeText(JSON.stringify(n.item, void 0, 2)), window.ibiz.message.success("已复制"), s = setTimeout(() => {
|
|
2240
|
+
i.value = !1;
|
|
2241
|
+
}, 2e3);
|
|
2242
|
+
};
|
|
2243
|
+
I(() => () => {
|
|
2244
|
+
s && clearTimeout(s);
|
|
2245
|
+
}, []);
|
|
2246
|
+
const u = (l, m, _ = 0) => {
|
|
2247
|
+
const d = document.getElementById(l);
|
|
2248
|
+
if (!d || (d.innerHTML = "", !t.value))
|
|
2249
|
+
return;
|
|
2250
|
+
h(m, _).forEach((v, w) => {
|
|
2251
|
+
const g = document.createElement("div");
|
|
2252
|
+
g.className = "code-line";
|
|
2253
|
+
const C = document.createElement("span");
|
|
2254
|
+
C && (C.className = "line-number", C.textContent = (w + 1).toString(), g.appendChild(C), g.innerHTML += v, d.appendChild(g));
|
|
2255
|
+
});
|
|
2256
|
+
}, h = (l, m = 0) => {
|
|
2257
|
+
const _ = " ".repeat(m), d = [];
|
|
2258
|
+
if (Array.isArray(l)) {
|
|
2259
|
+
if (l.length === 0)
|
|
2260
|
+
return ["".concat(_, '<span class="array">[]</span>')];
|
|
2261
|
+
d.push("".concat(_, '<span class="array">[</span>')), l.forEach((f, v) => {
|
|
2262
|
+
const w = h(f, m + 1), g = v < l.length - 1 ? "," : "";
|
|
2263
|
+
typeof f == "object" && f !== null ? (d.push(...w.slice(0, -1)), d.push("".concat(w[w.length - 1]).concat(g))) : d.push("".concat(w[0]).concat(g));
|
|
2264
|
+
}), d.push("".concat(_, '<span class="array">]</span>'));
|
|
2265
|
+
} else if (typeof l == "object" && l !== null) {
|
|
2266
|
+
const f = Object.keys(l);
|
|
2267
|
+
if (f.length === 0)
|
|
2268
|
+
return ["".concat(_, '<span class="property">{}</span>')];
|
|
2269
|
+
d.push("".concat(_, '<span class="property">{</span>')), f.forEach((v, w) => {
|
|
2270
|
+
const g = l[v], C = w < f.length - 1 ? "," : "", T = '<span class="json-key">"'.concat(v, '":</span>');
|
|
2271
|
+
if (typeof g == "object" && g !== null) {
|
|
2272
|
+
const x = h(g, m + 1);
|
|
2273
|
+
d.push("".concat(_, " ").concat(T, " ").concat(x[0].trim())), x.length > 1 && (d.push(...x.slice(1, -1)), d.push("".concat(x[x.length - 1]).concat(C)));
|
|
2274
|
+
} else {
|
|
2275
|
+
const x = p(g);
|
|
2276
|
+
d.push("".concat(_, " ").concat(T, " ").concat(x).concat(C));
|
|
2277
|
+
}
|
|
2278
|
+
}), d.push("".concat(_, '<span class="property">}</span>'));
|
|
2279
|
+
} else
|
|
2280
|
+
d.push("".concat(_).concat(p(l)));
|
|
2281
|
+
return d;
|
|
2282
|
+
}, p = (l) => typeof l == "string" ? l.includes("Failed") || l.includes("Error") || l.includes("ERR_") ? '<span class="error">"'.concat(l, '"</span>') : '<span class="string">"'.concat(l, '"</span>') : typeof l == "number" ? '<span class="number">'.concat(l, "</span>") : typeof l == "boolean" ? '<span class="boolean">'.concat(l, "</span>") : l === null ? '<span class="null">null</span>' : "";
|
|
2283
|
+
return r("div", {
|
|
2284
|
+
className: "".concat(e.b()),
|
|
2285
|
+
children: [r("div", {
|
|
2286
|
+
className: e.e("header"),
|
|
2287
|
+
onClick: () => a(),
|
|
2288
|
+
children: [r("div", {
|
|
2289
|
+
className: e.e("header-left"),
|
|
2290
|
+
children: r("div", {
|
|
2291
|
+
children: n.item.name
|
|
2292
|
+
})
|
|
2293
|
+
}), r("div", {
|
|
2294
|
+
className: e.e("header-right"),
|
|
2295
|
+
children: [n.item.error && r("span", {
|
|
2296
|
+
style: "color: red;",
|
|
2297
|
+
children: "发生错误"
|
|
2298
|
+
}), n.item.error && r("svg", {
|
|
2299
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2300
|
+
width: "13",
|
|
2301
|
+
height: "13",
|
|
2302
|
+
viewBox: "0 0 24 24",
|
|
2303
|
+
fill: "none",
|
|
2304
|
+
stroke: "red",
|
|
2305
|
+
strokeWidth: "2",
|
|
2306
|
+
strokeLinecap: "round",
|
|
2307
|
+
strokeLinejoin: "round",
|
|
2308
|
+
"aria-hidden": "true",
|
|
2309
|
+
style: "margin-left: 6px;",
|
|
2310
|
+
children: [r("path", {
|
|
2311
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"
|
|
2312
|
+
}), r("path", {
|
|
2313
|
+
d: "M12 9v4"
|
|
2314
|
+
}), r("path", {
|
|
2315
|
+
d: "M12 17h.01"
|
|
2316
|
+
})]
|
|
2317
|
+
}), r("span", {
|
|
2318
|
+
title: "复制",
|
|
2319
|
+
children: i.value ? r("svg", {
|
|
2320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2321
|
+
width: "14",
|
|
2322
|
+
height: "14",
|
|
2323
|
+
viewBox: "0 0 24 24",
|
|
2324
|
+
fill: "none",
|
|
2325
|
+
stroke: "rgb(0, 185, 107)",
|
|
2326
|
+
strokeWidth: "2",
|
|
2327
|
+
strokeLinecap: "round",
|
|
2328
|
+
strokeLinejoin: "round",
|
|
2329
|
+
className: "lucide lucide-check",
|
|
2330
|
+
"aria-hidden": "true",
|
|
2331
|
+
style: "margin-left: 6px;",
|
|
2332
|
+
onClick: (l) => l.stopPropagation(),
|
|
2333
|
+
children: r("path", {
|
|
2334
|
+
d: "M20 6 9 17l-5-5"
|
|
2335
|
+
})
|
|
2336
|
+
}) : r("svg", {
|
|
2337
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2338
|
+
width: "14",
|
|
2339
|
+
height: "14",
|
|
2340
|
+
viewBox: "0 0 24 24",
|
|
2341
|
+
fill: "none",
|
|
2342
|
+
stroke: "currentColor",
|
|
2343
|
+
strokeWidth: "2",
|
|
2344
|
+
strokeLinecap: "round",
|
|
2345
|
+
strokeLinejoin: "round",
|
|
2346
|
+
"aria-hidden": "true",
|
|
2347
|
+
style: "margin-left: 6px;",
|
|
2348
|
+
onClick: (l) => c(l),
|
|
2349
|
+
children: [r("rect", {
|
|
2350
|
+
width: "14",
|
|
2351
|
+
height: "14",
|
|
2352
|
+
x: "8",
|
|
2353
|
+
y: "8",
|
|
2354
|
+
rx: "2",
|
|
2355
|
+
ry: "2"
|
|
2356
|
+
}), r("path", {
|
|
2357
|
+
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
|
|
2358
|
+
})]
|
|
2359
|
+
})
|
|
2360
|
+
}), r("svg", {
|
|
2361
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2362
|
+
width: "18",
|
|
2363
|
+
height: "18",
|
|
2364
|
+
viewBox: "0 0 24 24",
|
|
2365
|
+
fill: "none",
|
|
2366
|
+
stroke: "currentColor",
|
|
2367
|
+
strokeWidth: "1.5",
|
|
2368
|
+
strokeLinecap: "round",
|
|
2369
|
+
strokeLinejoin: "round",
|
|
2370
|
+
"aria-hidden": "true",
|
|
2371
|
+
style: {
|
|
2372
|
+
"margin-left": " 6px",
|
|
2373
|
+
transform: t.value ? "rotate(90deg)" : "rotate(0deg)"
|
|
2374
|
+
},
|
|
2375
|
+
children: r("path", {
|
|
2376
|
+
d: "m9 18 6-6-6-6"
|
|
2377
|
+
})
|
|
2378
|
+
})]
|
|
2379
|
+
})]
|
|
2380
|
+
}), r("div", {
|
|
2381
|
+
className: e.e("content"),
|
|
2382
|
+
id: "code-block-".concat(o)
|
|
2383
|
+
})]
|
|
2384
|
+
});
|
|
2385
|
+
};
|
|
2386
|
+
const Ei = (n) => {
|
|
2387
|
+
const {
|
|
2388
|
+
items: e
|
|
2389
|
+
} = n, t = new k("chat-tool-call"), i = M([]), s = M(!1), o = M(!1);
|
|
2390
|
+
I(() => {
|
|
2391
|
+
i.value = e.filter((u) => u), o.value = e.length > 4;
|
|
2392
|
+
}, [e]);
|
|
2393
|
+
const a = B(() => o.value && !s.value ? i.value.slice(0, 4) : i.value), c = () => {
|
|
2394
|
+
s.value = !s.value;
|
|
2395
|
+
};
|
|
2396
|
+
return r("div", {
|
|
2397
|
+
className: "".concat(t.b()),
|
|
2398
|
+
children: [a.value.map((u, h) => r($i, {
|
|
2399
|
+
item: u
|
|
2400
|
+
}, h)), o.value && r("div", {
|
|
2401
|
+
className: t.e("toggle"),
|
|
2402
|
+
onClick: c,
|
|
2403
|
+
children: s.value ? "收起工具调用" : "展开全部 ".concat(i.value.length, " 个工具调用")
|
|
2404
|
+
})]
|
|
2405
|
+
});
|
|
2406
|
+
};
|
|
2407
|
+
const te = new k("markdown-message"), Mi = (n) => {
|
|
2208
2408
|
const {
|
|
2209
2409
|
message: e,
|
|
2210
2410
|
size: t
|
|
2211
|
-
} = n, i =
|
|
2411
|
+
} = n, i = M(ce()), s = M(null), o = X(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), a = X(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), c = M({
|
|
2212
2412
|
title: "",
|
|
2213
2413
|
description: "",
|
|
2214
|
-
icon:
|
|
2215
|
-
}), u =
|
|
2414
|
+
icon: r(je, {})
|
|
2415
|
+
}), u = M({
|
|
2216
2416
|
hasSuggestions: !1,
|
|
2217
2417
|
suggestions: []
|
|
2218
|
-
}), h = (
|
|
2219
|
-
|
|
2418
|
+
}), h = (m) => {
|
|
2419
|
+
m && m.length > 0 ? u.value = {
|
|
2220
2420
|
hasSuggestions: !0,
|
|
2221
|
-
suggestions:
|
|
2421
|
+
suggestions: m
|
|
2222
2422
|
} : u.value = {
|
|
2223
2423
|
hasSuggestions: !1,
|
|
2224
2424
|
suggestions: []
|
|
2225
2425
|
};
|
|
2226
|
-
}, p = (
|
|
2227
|
-
n.controller.handleSuggestionClick(n.message,
|
|
2228
|
-
}, l = (
|
|
2229
|
-
const _ =
|
|
2230
|
-
let f = "",
|
|
2231
|
-
return d === -1 ? (w = !1, f =
|
|
2426
|
+
}, p = (m, _) => {
|
|
2427
|
+
n.controller.handleSuggestionClick(n.message, m, _);
|
|
2428
|
+
}, l = (m) => {
|
|
2429
|
+
const _ = m.indexOf("<think>"), d = m.indexOf("</think>");
|
|
2430
|
+
let f = "", v = "", w = !1;
|
|
2431
|
+
return d === -1 ? (w = !1, f = m.slice(_ + 7), v = "") : (w = !0, f = m.slice(_ + 7, d), v = m.slice(d + 8)), {
|
|
2232
2432
|
isThoughtCompleted: w,
|
|
2233
2433
|
thoughtContent: f,
|
|
2234
|
-
answerContent:
|
|
2434
|
+
answerContent: v
|
|
2235
2435
|
};
|
|
2236
2436
|
};
|
|
2237
|
-
return
|
|
2437
|
+
return I(() => {
|
|
2238
2438
|
if (t >= 0 && s.value) {
|
|
2239
2439
|
if (e.content.indexOf("<think>") !== -1) {
|
|
2240
2440
|
const {
|
|
2241
|
-
isThoughtCompleted:
|
|
2441
|
+
isThoughtCompleted: m,
|
|
2242
2442
|
thoughtContent: _,
|
|
2243
2443
|
answerContent: d
|
|
2244
2444
|
} = l(e.content);
|
|
2245
|
-
|
|
2445
|
+
m ? (c.value.icon = r(We, {}), c.value.title = "思考完成") : e.completed === !0 ? (c.value.icon = r(We, {}), c.value.title = "思考已停止") : (c.value.icon = r(je, {}), c.value.title = "思考中..."), c.value.description = _ || "", s.value.setMarkdown(d || "");
|
|
2246
2446
|
} else
|
|
2247
|
-
s.value.setMarkdown(e.content || "");
|
|
2447
|
+
e.content.indexOf("<tool_call>") !== -1 ? s.value.setMarkdown("") : s.value.setMarkdown(e.content || "");
|
|
2248
2448
|
h(e.suggestions);
|
|
2249
2449
|
}
|
|
2250
|
-
}, [e, t]),
|
|
2251
|
-
let
|
|
2450
|
+
}, [e, t]), I(() => {
|
|
2451
|
+
let m = "";
|
|
2252
2452
|
if (e.content.indexOf("<think>") !== -1) {
|
|
2253
2453
|
const {
|
|
2254
2454
|
isThoughtCompleted: _,
|
|
2255
2455
|
thoughtContent: d,
|
|
2256
2456
|
answerContent: f
|
|
2257
2457
|
} = l(e.content);
|
|
2258
|
-
|
|
2458
|
+
c.value = {
|
|
2259
2459
|
title: _ ? "思考完成" : e.completed === !0 ? "思考已停止" : "思考中...",
|
|
2260
2460
|
description: d || "",
|
|
2261
|
-
icon: _ || e.completed === !0 ?
|
|
2262
|
-
}, f && (
|
|
2461
|
+
icon: _ || e.completed === !0 ? r(We, {}) : r(je, {})
|
|
2462
|
+
}, f && (m = f);
|
|
2263
2463
|
} else
|
|
2264
|
-
|
|
2464
|
+
e.content.indexOf("<tool_call>") !== -1 ? m = "" : m = e.content;
|
|
2265
2465
|
h(e.suggestions), s.value = new qt({
|
|
2266
2466
|
id: i,
|
|
2267
|
-
value:
|
|
2467
|
+
value: m || "",
|
|
2268
2468
|
editor: {
|
|
2269
2469
|
defaultModel: "previewOnly"
|
|
2270
2470
|
},
|
|
@@ -2286,36 +2486,38 @@ const te = new M("markdown-message"), Ni = (n) => {
|
|
|
2286
2486
|
}
|
|
2287
2487
|
}
|
|
2288
2488
|
});
|
|
2289
|
-
}, []),
|
|
2489
|
+
}, []), r("div", {
|
|
2290
2490
|
className: "".concat(te.b(), " ").concat(te.is("loading", o)),
|
|
2291
|
-
children: [
|
|
2491
|
+
children: [r("div", {
|
|
2292
2492
|
className: te.b("header"),
|
|
2293
|
-
children: [
|
|
2493
|
+
children: [r("div", {
|
|
2294
2494
|
className: te.be("header", "caption"),
|
|
2295
2495
|
children: "AI "
|
|
2296
|
-
}), n.children, a ?
|
|
2496
|
+
}), n.children, a ? r("div", {
|
|
2297
2497
|
className: te.be("header", "timeout"),
|
|
2298
2498
|
children: "请求超时"
|
|
2299
2499
|
}) : null]
|
|
2300
|
-
}),
|
|
2500
|
+
}), r("div", {
|
|
2301
2501
|
className: "".concat(te.b("content"), " pre-wrap-container"),
|
|
2302
|
-
children: [
|
|
2303
|
-
items: [
|
|
2304
|
-
}),
|
|
2502
|
+
children: [r(ki, {
|
|
2503
|
+
items: [c.value]
|
|
2504
|
+
}), e.toolcalls && e.toolcalls.length > 0 ? r(Ei, {
|
|
2505
|
+
items: e.toolcalls || []
|
|
2506
|
+
}) : null, r("div", {
|
|
2305
2507
|
id: i
|
|
2306
2508
|
})]
|
|
2307
|
-
}),
|
|
2509
|
+
}), r("div", {
|
|
2308
2510
|
className: te.b("footer"),
|
|
2309
|
-
children: u.value.hasSuggestions ?
|
|
2511
|
+
children: u.value.hasSuggestions ? r(Ni, {
|
|
2310
2512
|
items: u.value.suggestions,
|
|
2311
|
-
onItemClick: (
|
|
2312
|
-
p(
|
|
2513
|
+
onItemClick: (m, _) => {
|
|
2514
|
+
p(m, _);
|
|
2313
2515
|
}
|
|
2314
2516
|
}) : null
|
|
2315
2517
|
})]
|
|
2316
2518
|
});
|
|
2317
2519
|
};
|
|
2318
|
-
const
|
|
2520
|
+
const he = new k("ossfile-material"), Ai = (n) => {
|
|
2319
2521
|
const e = B(() => n.material.data.name), t = B(() => n.material.metadata.size), i = B(() => {
|
|
2320
2522
|
const o = n.material.metadata.state;
|
|
2321
2523
|
return o === "successed" ? "上传成功" : o === "uploading" ? "上传中" : o === "failed" ? "上传失败" : "未知状态";
|
|
@@ -2331,22 +2533,22 @@ const de = new M("ossfile-material"), Ei = (n) => {
|
|
|
2331
2533
|
return "#ff4d4f";
|
|
2332
2534
|
}
|
|
2333
2535
|
});
|
|
2334
|
-
return
|
|
2335
|
-
className:
|
|
2336
|
-
children: [
|
|
2337
|
-
className:
|
|
2338
|
-
children:
|
|
2339
|
-
}),
|
|
2340
|
-
className:
|
|
2341
|
-
children: [
|
|
2342
|
-
className:
|
|
2536
|
+
return r("div", {
|
|
2537
|
+
className: he.b(),
|
|
2538
|
+
children: [r("div", {
|
|
2539
|
+
className: he.b("left"),
|
|
2540
|
+
children: r(xn, {})
|
|
2541
|
+
}), r("div", {
|
|
2542
|
+
className: he.b("right"),
|
|
2543
|
+
children: [r("div", {
|
|
2544
|
+
className: he.e("name"),
|
|
2343
2545
|
title: e,
|
|
2344
2546
|
children: e
|
|
2345
|
-
}),
|
|
2346
|
-
className:
|
|
2347
|
-
children: [
|
|
2547
|
+
}), r("div", {
|
|
2548
|
+
className: he.e("metadata"),
|
|
2549
|
+
children: [r("div", {
|
|
2348
2550
|
children: [t, "B"]
|
|
2349
|
-
}),
|
|
2551
|
+
}), r("div", {
|
|
2350
2552
|
style: {
|
|
2351
2553
|
color: s.value
|
|
2352
2554
|
},
|
|
@@ -2356,69 +2558,69 @@ const de = new M("ossfile-material"), Ei = (n) => {
|
|
|
2356
2558
|
})]
|
|
2357
2559
|
});
|
|
2358
2560
|
};
|
|
2359
|
-
const
|
|
2561
|
+
const pe = new k("common-material"), Ii = (n) => {
|
|
2360
2562
|
var i, s, o, a;
|
|
2361
|
-
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((
|
|
2362
|
-
return
|
|
2363
|
-
className:
|
|
2364
|
-
children: [
|
|
2365
|
-
className:
|
|
2366
|
-
children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) &&
|
|
2367
|
-
children: (o = e.icon) != null && o.cssClass ?
|
|
2563
|
+
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((c) => c.id === n.material.metadata.actionId), t = B(() => n.material.metadata.name);
|
|
2564
|
+
return r("div", {
|
|
2565
|
+
className: pe.b(),
|
|
2566
|
+
children: [r("div", {
|
|
2567
|
+
className: pe.b("left"),
|
|
2568
|
+
children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && r(Y, {
|
|
2569
|
+
children: (o = e.icon) != null && o.cssClass ? r("i", {
|
|
2368
2570
|
className: e.icon.cssClass
|
|
2369
|
-
}) : (a = e.icon) != null && a.imagePath ? it(e.icon.imagePath) ?
|
|
2571
|
+
}) : (a = e.icon) != null && a.imagePath ? it(e.icon.imagePath) ? r("div", {
|
|
2370
2572
|
dangerouslySetInnerHTML: {
|
|
2371
2573
|
__html: e.icon.imagePath
|
|
2372
2574
|
}
|
|
2373
|
-
}) :
|
|
2575
|
+
}) : r("img", {
|
|
2374
2576
|
src: e.icon.imagePath
|
|
2375
2577
|
}) : null
|
|
2376
|
-
}) :
|
|
2377
|
-
}),
|
|
2378
|
-
className:
|
|
2379
|
-
children: [
|
|
2380
|
-
className:
|
|
2578
|
+
}) : r(gi, {})
|
|
2579
|
+
}), r("div", {
|
|
2580
|
+
className: pe.b("right"),
|
|
2581
|
+
children: [r("div", {
|
|
2582
|
+
className: pe.e("name"),
|
|
2381
2583
|
title: t,
|
|
2382
2584
|
children: t
|
|
2383
|
-
}),
|
|
2384
|
-
className:
|
|
2385
|
-
children:
|
|
2585
|
+
}), r("div", {
|
|
2586
|
+
className: pe.e("metadata"),
|
|
2587
|
+
children: r("div", {
|
|
2386
2588
|
children: (e == null ? void 0 : e.label) || "素材资源"
|
|
2387
2589
|
})
|
|
2388
2590
|
})]
|
|
2389
2591
|
})]
|
|
2390
2592
|
});
|
|
2391
2593
|
};
|
|
2392
|
-
const
|
|
2594
|
+
const Ve = new k("chat-input-material-item"), Sn = (n) => {
|
|
2393
2595
|
const {
|
|
2394
2596
|
material: e
|
|
2395
2597
|
} = n;
|
|
2396
2598
|
let t = null;
|
|
2397
2599
|
switch (e.type) {
|
|
2398
2600
|
case "ossfile":
|
|
2399
|
-
t =
|
|
2601
|
+
t = Ai;
|
|
2400
2602
|
break;
|
|
2401
2603
|
default:
|
|
2402
|
-
t =
|
|
2604
|
+
t = Ii;
|
|
2403
2605
|
}
|
|
2404
2606
|
const i = () => {
|
|
2405
2607
|
n.controller.deleteMaterial(e);
|
|
2406
2608
|
};
|
|
2407
|
-
return
|
|
2408
|
-
className: "".concat(
|
|
2409
|
-
children: [
|
|
2410
|
-
className:
|
|
2609
|
+
return r("div", {
|
|
2610
|
+
className: "".concat(Ve.b(), " ").concat(Ve.is("disabled", n.disabled)),
|
|
2611
|
+
children: [r("div", {
|
|
2612
|
+
className: Ve.e("icon"),
|
|
2411
2613
|
onClick: i,
|
|
2412
|
-
children:
|
|
2614
|
+
children: r(_i, {})
|
|
2413
2615
|
}), q(t, {
|
|
2414
2616
|
material: e,
|
|
2415
2617
|
controller: n.controller
|
|
2416
2618
|
})]
|
|
2417
2619
|
});
|
|
2418
2620
|
};
|
|
2419
|
-
const ie = new
|
|
2420
|
-
const e =
|
|
2421
|
-
return
|
|
2621
|
+
const ie = new k("user-message-question"), Di = (n) => {
|
|
2622
|
+
const e = M(ce()), t = M(null), i = B(() => n.message.content), s = B(() => an.parseMixedContent(i.value));
|
|
2623
|
+
return I(() => {
|
|
2422
2624
|
t.value = new qt({
|
|
2423
2625
|
id: e,
|
|
2424
2626
|
value: s.value.remainingText || "",
|
|
@@ -2443,28 +2645,28 @@ const ie = new M("user-message-question"), $i = (n) => {
|
|
|
2443
2645
|
}
|
|
2444
2646
|
}
|
|
2445
2647
|
});
|
|
2446
|
-
}, [s.value.remainingText]),
|
|
2648
|
+
}, [s.value.remainingText]), r("div", {
|
|
2447
2649
|
className: ie.b(),
|
|
2448
|
-
children: [
|
|
2650
|
+
children: [r("div", {
|
|
2449
2651
|
className: ie.e("user-header"),
|
|
2450
|
-
children: [n.children,
|
|
2652
|
+
children: [n.children, r("div", {
|
|
2451
2653
|
className: ie.e("user"),
|
|
2452
2654
|
children: "我"
|
|
2453
2655
|
})]
|
|
2454
|
-
}),
|
|
2656
|
+
}), r("div", {
|
|
2455
2657
|
className: ie.e("content"),
|
|
2456
|
-
children:
|
|
2658
|
+
children: r("div", {
|
|
2457
2659
|
className: ie.em("content", "body"),
|
|
2458
|
-
children: [s.value.hasResources &&
|
|
2660
|
+
children: [s.value.hasResources && r("div", {
|
|
2459
2661
|
className: ie.em("content", "material"),
|
|
2460
|
-
children: s.value.resources.map((o) =>
|
|
2662
|
+
children: s.value.resources.map((o) => r(Sn, {
|
|
2461
2663
|
material: o,
|
|
2462
2664
|
disabled: !0,
|
|
2463
2665
|
controller: n.controller
|
|
2464
2666
|
}, o.id))
|
|
2465
|
-
}),
|
|
2667
|
+
}), r("div", {
|
|
2466
2668
|
className: "pre-wrap-container",
|
|
2467
|
-
children:
|
|
2669
|
+
children: r("div", {
|
|
2468
2670
|
id: e
|
|
2469
2671
|
})
|
|
2470
2672
|
})]
|
|
@@ -2472,32 +2674,32 @@ const ie = new M("user-message-question"), $i = (n) => {
|
|
|
2472
2674
|
})]
|
|
2473
2675
|
});
|
|
2474
2676
|
};
|
|
2475
|
-
const Te = new
|
|
2677
|
+
const Te = new k("error-message"), Li = (n) => {
|
|
2476
2678
|
const e = B(() => n.message.content);
|
|
2477
|
-
return
|
|
2679
|
+
return r("div", {
|
|
2478
2680
|
className: Te.b(),
|
|
2479
|
-
children: [
|
|
2681
|
+
children: [r("div", {
|
|
2480
2682
|
className: Te.b("header"),
|
|
2481
|
-
children: [
|
|
2683
|
+
children: [r("div", {
|
|
2482
2684
|
className: Te.be("header", "caption"),
|
|
2483
2685
|
children: "AI "
|
|
2484
2686
|
}), n.children]
|
|
2485
|
-
}),
|
|
2687
|
+
}), r("div", {
|
|
2486
2688
|
className: "".concat(Te.e("content"), " pre-wrap-container"),
|
|
2487
|
-
children:
|
|
2689
|
+
children: r("span", {
|
|
2488
2690
|
children: e
|
|
2489
2691
|
})
|
|
2490
2692
|
})]
|
|
2491
2693
|
});
|
|
2492
2694
|
};
|
|
2493
|
-
const
|
|
2494
|
-
className:
|
|
2495
|
-
children:
|
|
2496
|
-
className: "".concat(
|
|
2695
|
+
const xt = new k("unknown-message"), zi = (n) => r("div", {
|
|
2696
|
+
className: xt.b(),
|
|
2697
|
+
children: r("div", {
|
|
2698
|
+
className: "".concat(xt.e("content"), " pre-wrap-container"),
|
|
2497
2699
|
children: ["暂未支持的消息类型: ", n.message.type]
|
|
2498
2700
|
})
|
|
2499
2701
|
});
|
|
2500
|
-
const
|
|
2702
|
+
const Hi = new k("chat-message-item"), Oi = (n) => {
|
|
2501
2703
|
const {
|
|
2502
2704
|
message: e,
|
|
2503
2705
|
size: t
|
|
@@ -2505,16 +2707,16 @@ const Di = new M("chat-message-item"), Li = (n) => {
|
|
|
2505
2707
|
let i = null;
|
|
2506
2708
|
switch (e.type) {
|
|
2507
2709
|
case "DEFAULT":
|
|
2508
|
-
i = e.role === "ASSISTANT" ?
|
|
2710
|
+
i = e.role === "ASSISTANT" ? Mi : Di;
|
|
2509
2711
|
break;
|
|
2510
2712
|
case "ERROR":
|
|
2511
|
-
i =
|
|
2713
|
+
i = Li;
|
|
2512
2714
|
break;
|
|
2513
2715
|
default:
|
|
2514
|
-
i =
|
|
2716
|
+
i = zi;
|
|
2515
2717
|
}
|
|
2516
|
-
return
|
|
2517
|
-
className:
|
|
2718
|
+
return r("div", {
|
|
2719
|
+
className: Hi.b(),
|
|
2518
2720
|
children: q(i, {
|
|
2519
2721
|
size: t,
|
|
2520
2722
|
message: e,
|
|
@@ -2523,9 +2725,10 @@ const Di = new M("chat-message-item"), Li = (n) => {
|
|
|
2523
2725
|
})
|
|
2524
2726
|
});
|
|
2525
2727
|
};
|
|
2526
|
-
class
|
|
2728
|
+
class j {
|
|
2527
2729
|
constructor(e) {
|
|
2528
|
-
this
|
|
2730
|
+
S(this, "toolcalls", []);
|
|
2731
|
+
this.msg = e, this.computeToolCalls();
|
|
2529
2732
|
}
|
|
2530
2733
|
get messageid() {
|
|
2531
2734
|
return this.msg.messageid;
|
|
@@ -2541,7 +2744,7 @@ class V {
|
|
|
2541
2744
|
}
|
|
2542
2745
|
get realcontent() {
|
|
2543
2746
|
let e = this.msg.content;
|
|
2544
|
-
if (e.indexOf("<think>") !== -1 && e.indexOf("</think>") === -1 || (e = e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>", "gs"), "").trim(), e.indexOf("<resources>") !== -1 && e.indexOf("</resources>") === -1))
|
|
2747
|
+
if (e.indexOf("<think>") !== -1 && e.indexOf("</think>") === -1 || (e = e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>", "gs"), "").trim(), e.indexOf("<tool_call>") !== -1 && e.indexOf("</tool_call>") === -1) || (e = e.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim(), e.indexOf("<resources>") !== -1 && e.indexOf("</resources>") === -1))
|
|
2545
2748
|
return "";
|
|
2546
2749
|
e = e.replace(new RegExp("\\<resources\\>[^]*?\\<\\/resources\\>", "gs"), "").trim();
|
|
2547
2750
|
const t = e.indexOf("<suggestions>");
|
|
@@ -2567,7 +2770,7 @@ class V {
|
|
|
2567
2770
|
* @param {IChatMessage} msg
|
|
2568
2771
|
*/
|
|
2569
2772
|
update(e) {
|
|
2570
|
-
e.content || (e.content = ""), e.content.indexOf("<think>") !== -1 && this.msg.content && (this.msg.content = ""), this.msg.content += e.content;
|
|
2773
|
+
e.content || (e.content = ""), e.content.indexOf("<think>") !== -1 && this.msg.content && (this.msg.content = ""), this.msg.content += e.content, this.computeToolCalls();
|
|
2571
2774
|
}
|
|
2572
2775
|
/**
|
|
2573
2776
|
* 更新消息完成状态
|
|
@@ -2577,10 +2780,17 @@ class V {
|
|
|
2577
2780
|
* @param {boolean} completed
|
|
2578
2781
|
*/
|
|
2579
2782
|
updateCompleted(e) {
|
|
2580
|
-
this.msg.completed = e;
|
|
2783
|
+
this.msg.completed = e, this.computeToolCalls();
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* @description 计算工具调用
|
|
2787
|
+
* @memberof ChatMessage
|
|
2788
|
+
*/
|
|
2789
|
+
computeToolCalls() {
|
|
2790
|
+
this.toolcalls = Yn.parse(this.msg.content);
|
|
2581
2791
|
}
|
|
2582
2792
|
}
|
|
2583
|
-
class
|
|
2793
|
+
class fe {
|
|
2584
2794
|
constructor(e) {
|
|
2585
2795
|
this.data = e;
|
|
2586
2796
|
}
|
|
@@ -2623,8 +2833,8 @@ class qe {
|
|
|
2623
2833
|
return this.material.data;
|
|
2624
2834
|
}
|
|
2625
2835
|
}
|
|
2626
|
-
const H = new
|
|
2627
|
-
var f,
|
|
2836
|
+
const H = new k("chat-toolbar-item"), Bi = (n) => {
|
|
2837
|
+
var f, v, w;
|
|
2628
2838
|
const {
|
|
2629
2839
|
model: e,
|
|
2630
2840
|
data: t,
|
|
@@ -2632,80 +2842,80 @@ const H = new M("chat-toolbar-item"), zi = (n) => {
|
|
|
2632
2842
|
disabled: s = !1,
|
|
2633
2843
|
buttonType: o = "default",
|
|
2634
2844
|
onClick: a
|
|
2635
|
-
} = n, [
|
|
2845
|
+
} = n, [c, u] = K(!1), h = P(null), p = (g) => typeof g.hidden == "function" ? g.hidden(t) : g.hidden === !0;
|
|
2636
2846
|
if (p(e))
|
|
2637
|
-
return
|
|
2638
|
-
const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0,
|
|
2639
|
-
var
|
|
2847
|
+
return r(Y, {});
|
|
2848
|
+
const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0, m = (g) => {
|
|
2849
|
+
var C, T, x, O;
|
|
2640
2850
|
if (typeof g.icon == "function")
|
|
2641
2851
|
return g.icon();
|
|
2642
|
-
if ((
|
|
2643
|
-
return
|
|
2852
|
+
if ((C = g.icon) != null && C.showIcon && ((T = g.icon) != null && T.cssClass))
|
|
2853
|
+
return r("i", {
|
|
2644
2854
|
className: g.icon.cssClass
|
|
2645
2855
|
});
|
|
2646
2856
|
if ((x = g.icon) != null && x.showIcon && ((O = g.icon) != null && O.imagePath))
|
|
2647
|
-
return it(g.icon.imagePath) ?
|
|
2857
|
+
return it(g.icon.imagePath) ? r("div", {
|
|
2648
2858
|
dangerouslySetInnerHTML: {
|
|
2649
2859
|
__html: g.icon.imagePath
|
|
2650
2860
|
}
|
|
2651
|
-
}) :
|
|
2861
|
+
}) : r("img", {
|
|
2652
2862
|
src: g.icon.imagePath
|
|
2653
2863
|
});
|
|
2654
2864
|
}, _ = (g) => {
|
|
2655
2865
|
l(e) || u(!0);
|
|
2656
|
-
}, d = (g,
|
|
2657
|
-
l(
|
|
2866
|
+
}, d = (g, C) => {
|
|
2867
|
+
l(C) || (u(!1), a(g, C));
|
|
2658
2868
|
};
|
|
2659
|
-
return
|
|
2660
|
-
const g = (
|
|
2661
|
-
h.current && h.current.contains(
|
|
2869
|
+
return I(() => {
|
|
2870
|
+
const g = (C) => {
|
|
2871
|
+
h.current && h.current.contains(C.target) || u(!1);
|
|
2662
2872
|
};
|
|
2663
|
-
return
|
|
2873
|
+
return c && document.addEventListener("mousedown", g), () => {
|
|
2664
2874
|
document.removeEventListener("mousedown", g);
|
|
2665
2875
|
};
|
|
2666
|
-
}, [
|
|
2876
|
+
}, [c]), r("div", {
|
|
2667
2877
|
className: "".concat(H.b(), " ").concat(H.b(o), " ").concat(e.customClass || "", " ").concat(i || "", " ").concat(H.is("disabled", l(e)), " ").concat(H.is("more", !!((f = e.children) != null && f.length))),
|
|
2668
|
-
children: [
|
|
2878
|
+
children: [r("div", {
|
|
2669
2879
|
title: e.title,
|
|
2670
2880
|
className: H.e("content"),
|
|
2671
2881
|
onClick: (g) => d(g, e),
|
|
2672
|
-
children: [
|
|
2882
|
+
children: [r("div", {
|
|
2673
2883
|
className: H.em("content", "icon"),
|
|
2674
|
-
children:
|
|
2675
|
-
}),
|
|
2884
|
+
children: m(e)
|
|
2885
|
+
}), r("div", {
|
|
2676
2886
|
className: H.em("content", "label"),
|
|
2677
2887
|
children: e.label
|
|
2678
2888
|
})]
|
|
2679
|
-
}), ((
|
|
2889
|
+
}), ((v = e.children) == null ? void 0 : v.length) && r("div", {
|
|
2680
2890
|
title: "更多",
|
|
2681
2891
|
className: H.e("more"),
|
|
2682
2892
|
onClick: _,
|
|
2683
|
-
children:
|
|
2893
|
+
children: r("i", {
|
|
2684
2894
|
"aria-hidden": "true",
|
|
2685
2895
|
className: "fa fa-angle-down ".concat(H.em("more", "icon"))
|
|
2686
2896
|
})
|
|
2687
|
-
}),
|
|
2897
|
+
}), c && r("div", {
|
|
2688
2898
|
ref: h,
|
|
2689
2899
|
className: H.b("dropdown"),
|
|
2690
|
-
children: (w = e.children) == null ? void 0 : w.map((g,
|
|
2900
|
+
children: (w = e.children) == null ? void 0 : w.map((g, C) => {
|
|
2691
2901
|
if (!p(g))
|
|
2692
|
-
return
|
|
2902
|
+
return r("div", {
|
|
2693
2903
|
title: g.title,
|
|
2694
|
-
onClick: (
|
|
2904
|
+
onClick: (T) => d(T, g),
|
|
2695
2905
|
className: "".concat(H.be("dropdown", "item"), " ").concat(g.customClass || "", " ").concat(H.is("disabled", l(g))),
|
|
2696
|
-
children: [
|
|
2906
|
+
children: [r("div", {
|
|
2697
2907
|
className: H.bem("dropdown", "item", "icon"),
|
|
2698
|
-
children:
|
|
2699
|
-
}),
|
|
2908
|
+
children: m(g)
|
|
2909
|
+
}), r("div", {
|
|
2700
2910
|
className: H.bem("dropdown", "item", "label"),
|
|
2701
2911
|
children: g.label
|
|
2702
2912
|
})]
|
|
2703
|
-
},
|
|
2913
|
+
}, C);
|
|
2704
2914
|
})
|
|
2705
2915
|
})]
|
|
2706
2916
|
});
|
|
2707
2917
|
};
|
|
2708
|
-
const
|
|
2918
|
+
const Pi = new k("chat-toolbar"), et = (n) => {
|
|
2709
2919
|
const {
|
|
2710
2920
|
controller: e,
|
|
2711
2921
|
items: t = [],
|
|
@@ -2713,19 +2923,19 @@ const Hi = new M("chat-toolbar"), et = (n) => {
|
|
|
2713
2923
|
type: s,
|
|
2714
2924
|
className: o,
|
|
2715
2925
|
mode: a
|
|
2716
|
-
} = n,
|
|
2926
|
+
} = n, c = pn(rt);
|
|
2717
2927
|
let u = [];
|
|
2718
2928
|
const h = [{
|
|
2719
2929
|
label: "重置对话",
|
|
2720
2930
|
title: "重置对话",
|
|
2721
|
-
icon: () =>
|
|
2931
|
+
icon: () => r(Ci, {}),
|
|
2722
2932
|
onClick: () => {
|
|
2723
2933
|
e.resetTopic();
|
|
2724
2934
|
},
|
|
2725
2935
|
children: [{
|
|
2726
2936
|
label: "清空对话",
|
|
2727
2937
|
title: "清空对话",
|
|
2728
|
-
icon: () =>
|
|
2938
|
+
icon: () => r(yi, {}),
|
|
2729
2939
|
onClick: () => {
|
|
2730
2940
|
e.clearTopic();
|
|
2731
2941
|
}
|
|
@@ -2733,37 +2943,37 @@ const Hi = new M("chat-toolbar"), et = (n) => {
|
|
|
2733
2943
|
label: "新建对话",
|
|
2734
2944
|
title: "新建对话",
|
|
2735
2945
|
hidden: a !== "TOPIC",
|
|
2736
|
-
icon: () =>
|
|
2946
|
+
icon: () => r(ui, {}),
|
|
2737
2947
|
onClick: () => {
|
|
2738
|
-
|
|
2948
|
+
c.newTopic && c.newTopic();
|
|
2739
2949
|
}
|
|
2740
2950
|
}]
|
|
2741
2951
|
}], p = [{
|
|
2742
2952
|
label: "刷新",
|
|
2743
2953
|
title: "刷新",
|
|
2744
|
-
icon: () =>
|
|
2954
|
+
icon: () => r(Tt, {}),
|
|
2745
2955
|
onClick: () => {
|
|
2746
2956
|
e.refreshMessage(i);
|
|
2747
2957
|
}
|
|
2748
2958
|
}, {
|
|
2749
2959
|
label: "删除",
|
|
2750
2960
|
title: "删除",
|
|
2751
|
-
icon: () =>
|
|
2961
|
+
icon: () => r(si, {}),
|
|
2752
2962
|
onClick: () => {
|
|
2753
2963
|
e.deleteMessage(i);
|
|
2754
2964
|
}
|
|
2755
2965
|
}, {
|
|
2756
2966
|
label: "复制",
|
|
2757
2967
|
title: "复制",
|
|
2758
|
-
icon: () =>
|
|
2968
|
+
icon: () => r(oi, {}),
|
|
2759
2969
|
onClick: () => {
|
|
2760
2970
|
e.copyMessage(i);
|
|
2761
2971
|
}
|
|
2762
2972
|
}];
|
|
2763
|
-
|
|
2973
|
+
c.enableBackFill && p.unshift({
|
|
2764
2974
|
label: "回填",
|
|
2765
2975
|
title: "回填",
|
|
2766
|
-
icon: () =>
|
|
2976
|
+
icon: () => r(ni, {}),
|
|
2767
2977
|
onClick: () => {
|
|
2768
2978
|
e.backfill(i);
|
|
2769
2979
|
}
|
|
@@ -2771,7 +2981,7 @@ const Hi = new M("chat-toolbar"), et = (n) => {
|
|
|
2771
2981
|
const l = [{
|
|
2772
2982
|
label: "刷新",
|
|
2773
2983
|
title: "刷新",
|
|
2774
|
-
icon: () =>
|
|
2984
|
+
icon: () => r(Tt, {}),
|
|
2775
2985
|
onClick: () => {
|
|
2776
2986
|
e.refreshMessage(i, !0);
|
|
2777
2987
|
}
|
|
@@ -2787,33 +2997,33 @@ const Hi = new M("chat-toolbar"), et = (n) => {
|
|
|
2787
2997
|
}
|
|
2788
2998
|
else
|
|
2789
2999
|
u = [...h, ...t];
|
|
2790
|
-
const
|
|
2791
|
-
const
|
|
3000
|
+
const m = (d, f) => {
|
|
3001
|
+
const v = {
|
|
2792
3002
|
...i
|
|
2793
3003
|
};
|
|
2794
|
-
if (i instanceof
|
|
3004
|
+
if (i instanceof j ? (Object.assign(v, {
|
|
2795
3005
|
topic: e.topic
|
|
2796
|
-
}),
|
|
3006
|
+
}), v.msg.realcontent = i.realcontent) : (v.data || (v.data = {}), Object.assign(v.data, {
|
|
2797
3007
|
messages: e.messages.value
|
|
2798
3008
|
})), f.onClick && typeof f.onClick == "function")
|
|
2799
|
-
f.onClick(d, f, e.context, e.params,
|
|
3009
|
+
f.onClick(d, f, e.context, e.params, v);
|
|
2800
3010
|
else {
|
|
2801
3011
|
const w = n.controller.opts.extendToolbarClick;
|
|
2802
|
-
w && typeof w == "function" && w(d, f, e.context, e.params,
|
|
3012
|
+
w && typeof w == "function" && w(d, f, e.context, e.params, v);
|
|
2803
3013
|
}
|
|
2804
3014
|
}, _ = 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]);
|
|
2805
|
-
return
|
|
2806
|
-
className: "".concat(
|
|
2807
|
-
children: u.map((d, f) =>
|
|
3015
|
+
return r("div", {
|
|
3016
|
+
className: "".concat(Pi.b(), " ").concat(o || ""),
|
|
3017
|
+
children: u.map((d, f) => r(Bi, {
|
|
2808
3018
|
data: i,
|
|
2809
3019
|
model: d,
|
|
2810
3020
|
disabled: _,
|
|
2811
3021
|
buttonType: s === "content" ? "circle" : "default",
|
|
2812
|
-
onClick:
|
|
3022
|
+
onClick: m.bind(void 0)
|
|
2813
3023
|
}, f))
|
|
2814
3024
|
});
|
|
2815
3025
|
};
|
|
2816
|
-
function
|
|
3026
|
+
function Ri(n, e) {
|
|
2817
3027
|
let t = null;
|
|
2818
3028
|
return function(...i) {
|
|
2819
3029
|
t || (t = setTimeout(() => {
|
|
@@ -2821,8 +3031,8 @@ function Oi(n, e) {
|
|
|
2821
3031
|
}, e));
|
|
2822
3032
|
};
|
|
2823
3033
|
}
|
|
2824
|
-
const
|
|
2825
|
-
const e =
|
|
3034
|
+
const Fi = (n) => {
|
|
3035
|
+
const e = M(!1), t = M({}), i = new k("chat-back-bottom"), s = M(null), o = () => {
|
|
2826
3036
|
if (s.value) {
|
|
2827
3037
|
const u = n.visibilityHeight || 200, h = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
|
|
2828
3038
|
e.value = h >= u;
|
|
@@ -2833,28 +3043,28 @@ const Bi = (n) => {
|
|
|
2833
3043
|
top: s.value.scrollHeight,
|
|
2834
3044
|
behavior: "smooth"
|
|
2835
3045
|
}), (u = n.onClick) == null || u.call(n));
|
|
2836
|
-
},
|
|
3046
|
+
}, c = Ri(o, 300);
|
|
2837
3047
|
return X(() => {
|
|
2838
3048
|
t.value = {
|
|
2839
3049
|
right: "".concat(n.right, "px"),
|
|
2840
3050
|
bottom: "".concat(n.bottom, "px")
|
|
2841
3051
|
};
|
|
2842
|
-
}, [n.right, n.bottom]),
|
|
3052
|
+
}, [n.right, n.bottom]), I(() => {
|
|
2843
3053
|
var u;
|
|
2844
3054
|
if (n.target) {
|
|
2845
3055
|
const h = (u = document.querySelector(n.target)) != null ? u : void 0;
|
|
2846
|
-
h && (s.value = h, h.addEventListener("scroll",
|
|
3056
|
+
h && (s.value = h, h.addEventListener("scroll", c), o());
|
|
2847
3057
|
}
|
|
2848
|
-
}, []),
|
|
3058
|
+
}, []), r("div", {
|
|
2849
3059
|
className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
|
|
2850
3060
|
style: t.value,
|
|
2851
3061
|
onClick: a,
|
|
2852
|
-
children:
|
|
3062
|
+
children: r(bi, {
|
|
2853
3063
|
className: i.e("icon")
|
|
2854
3064
|
})
|
|
2855
3065
|
});
|
|
2856
3066
|
};
|
|
2857
|
-
const
|
|
3067
|
+
const St = new k("chat-messages"), kt = (n) => {
|
|
2858
3068
|
const e = P(null), [t, i] = K(!0), s = P(!1), o = n.controller.messages, a = () => {
|
|
2859
3069
|
const h = e.current;
|
|
2860
3070
|
h && (s.current = !0, h.scrollTo({
|
|
@@ -2864,48 +3074,48 @@ const xt = new M("chat-messages"), kt = (n) => {
|
|
|
2864
3074
|
s.current = !1;
|
|
2865
3075
|
}, 500));
|
|
2866
3076
|
};
|
|
2867
|
-
|
|
3077
|
+
I(() => {
|
|
2868
3078
|
t && a();
|
|
2869
3079
|
}, [o.value]);
|
|
2870
|
-
const
|
|
3080
|
+
const c = () => {
|
|
2871
3081
|
if (!s.current && e.current) {
|
|
2872
3082
|
const {
|
|
2873
3083
|
scrollTop: h,
|
|
2874
3084
|
scrollHeight: p,
|
|
2875
3085
|
clientHeight: l
|
|
2876
|
-
} = e.current,
|
|
2877
|
-
i(
|
|
3086
|
+
} = e.current, m = p - (h + l) < 50;
|
|
3087
|
+
i(m);
|
|
2878
3088
|
}
|
|
2879
3089
|
}, u = () => {
|
|
2880
3090
|
s.current = !0, i(!0);
|
|
2881
3091
|
};
|
|
2882
|
-
return
|
|
3092
|
+
return r("div", {
|
|
2883
3093
|
ref: e,
|
|
2884
|
-
className:
|
|
2885
|
-
onScroll:
|
|
3094
|
+
className: St.b(),
|
|
3095
|
+
onScroll: c,
|
|
2886
3096
|
children: [o.value.map((h) => {
|
|
2887
3097
|
var l;
|
|
2888
3098
|
const p = ((l = h.content) == null ? void 0 : l.length) || 0;
|
|
2889
|
-
return h.role !== "SYSTEM" ?
|
|
3099
|
+
return h.role !== "SYSTEM" ? r(Oi, {
|
|
2890
3100
|
size: p,
|
|
2891
3101
|
message: h,
|
|
2892
3102
|
controller: n.controller,
|
|
2893
|
-
children:
|
|
3103
|
+
children: r(et, {
|
|
2894
3104
|
data: h,
|
|
2895
3105
|
type: "content",
|
|
2896
3106
|
items: n.toolbarItems,
|
|
2897
3107
|
controller: n.controller
|
|
2898
3108
|
})
|
|
2899
3109
|
}, h.messageid) : null;
|
|
2900
|
-
}),
|
|
3110
|
+
}), r(Fi, {
|
|
2901
3111
|
right: 20,
|
|
2902
3112
|
bottom: 14,
|
|
2903
|
-
target: ".".concat(
|
|
3113
|
+
target: ".".concat(St.b()),
|
|
2904
3114
|
onClick: u
|
|
2905
3115
|
})]
|
|
2906
3116
|
});
|
|
2907
3117
|
};
|
|
2908
|
-
function
|
|
3118
|
+
function Ui(n, e) {
|
|
2909
3119
|
for (var t in e)
|
|
2910
3120
|
n[t] = e[t];
|
|
2911
3121
|
return n;
|
|
@@ -2919,30 +3129,30 @@ function Nt(n, e) {
|
|
|
2919
3129
|
return !0;
|
|
2920
3130
|
return !1;
|
|
2921
3131
|
}
|
|
2922
|
-
function
|
|
3132
|
+
function $t(n) {
|
|
2923
3133
|
this.props = n;
|
|
2924
3134
|
}
|
|
2925
|
-
(
|
|
3135
|
+
($t.prototype = new F()).isPureReactComponent = !0, $t.prototype.shouldComponentUpdate = function(n, e) {
|
|
2926
3136
|
return Nt(this.props, n) || Nt(this.state, e);
|
|
2927
3137
|
};
|
|
2928
|
-
var
|
|
3138
|
+
var Et = b.__b;
|
|
2929
3139
|
b.__b = function(n) {
|
|
2930
|
-
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null),
|
|
3140
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Et && Et(n);
|
|
2931
3141
|
};
|
|
2932
|
-
var
|
|
3142
|
+
var Wi = b.__e;
|
|
2933
3143
|
b.__e = function(n, e, t, i) {
|
|
2934
3144
|
if (n.then) {
|
|
2935
3145
|
for (var s, o = e; o = o.__; )
|
|
2936
3146
|
if ((s = o.__c) && s.__c)
|
|
2937
3147
|
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
2938
3148
|
}
|
|
2939
|
-
|
|
3149
|
+
Wi(n, e, t, i);
|
|
2940
3150
|
};
|
|
2941
|
-
var
|
|
3151
|
+
var Mt = b.unmount;
|
|
2942
3152
|
function kn(n, e, t) {
|
|
2943
3153
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
2944
3154
|
typeof i.__c == "function" && i.__c();
|
|
2945
|
-
}), n.__c.__H = null), (n =
|
|
3155
|
+
}), n.__c.__H = null), (n = Ui({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
|
|
2946
3156
|
return kn(i, e, t);
|
|
2947
3157
|
})), n;
|
|
2948
3158
|
}
|
|
@@ -2954,24 +3164,24 @@ function Nn(n, e, t) {
|
|
|
2954
3164
|
function Ye() {
|
|
2955
3165
|
this.__u = 0, this.t = null, this.__b = null;
|
|
2956
3166
|
}
|
|
2957
|
-
function
|
|
3167
|
+
function $n(n) {
|
|
2958
3168
|
var e = n.__.__c;
|
|
2959
3169
|
return e && e.__a && e.__a(n);
|
|
2960
3170
|
}
|
|
2961
|
-
function
|
|
3171
|
+
function xe() {
|
|
2962
3172
|
this.u = null, this.o = null;
|
|
2963
3173
|
}
|
|
2964
3174
|
b.unmount = function(n) {
|
|
2965
3175
|
var e = n.__c;
|
|
2966
|
-
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null),
|
|
3176
|
+
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), Mt && Mt(n);
|
|
2967
3177
|
}, (Ye.prototype = new F()).__c = function(n, e) {
|
|
2968
3178
|
var t = e.__c, i = this;
|
|
2969
3179
|
i.t == null && (i.t = []), i.t.push(t);
|
|
2970
|
-
var s =
|
|
2971
|
-
o || (o = !0, t.__R = null, s ? s(
|
|
3180
|
+
var s = $n(i.__v), o = !1, a = function() {
|
|
3181
|
+
o || (o = !0, t.__R = null, s ? s(c) : c());
|
|
2972
3182
|
};
|
|
2973
3183
|
t.__R = a;
|
|
2974
|
-
var
|
|
3184
|
+
var c = function() {
|
|
2975
3185
|
if (!--i.__u) {
|
|
2976
3186
|
if (i.state.__a) {
|
|
2977
3187
|
var h = i.state.__a;
|
|
@@ -3006,12 +3216,12 @@ var At = function(n, e, t) {
|
|
|
3006
3216
|
n.u = t = t[2];
|
|
3007
3217
|
}
|
|
3008
3218
|
};
|
|
3009
|
-
function
|
|
3219
|
+
function ji(n) {
|
|
3010
3220
|
return this.getChildContext = function() {
|
|
3011
3221
|
return n.context;
|
|
3012
3222
|
}, n.children;
|
|
3013
3223
|
}
|
|
3014
|
-
function
|
|
3224
|
+
function Vi(n) {
|
|
3015
3225
|
var e = this, t = n.i;
|
|
3016
3226
|
e.componentWillUnmount = function() {
|
|
3017
3227
|
ae(null, e.l), e.l = null, e.i = null;
|
|
@@ -3021,34 +3231,34 @@ function Ui(n) {
|
|
|
3021
3231
|
this.childNodes.push(i), e.i.appendChild(i);
|
|
3022
3232
|
}, removeChild: function(i) {
|
|
3023
3233
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
|
|
3024
|
-
} }), ae(q(
|
|
3234
|
+
} }), ae(q(ji, { context: e.context }, n.__v), e.l);
|
|
3025
3235
|
}
|
|
3026
|
-
function
|
|
3027
|
-
var t = q(
|
|
3236
|
+
function qi(n, e) {
|
|
3237
|
+
var t = q(Vi, { __v: n, i: e });
|
|
3028
3238
|
return t.containerInfo = e, t;
|
|
3029
3239
|
}
|
|
3030
|
-
(
|
|
3031
|
-
var e = this, t =
|
|
3240
|
+
(xe.prototype = new F()).__a = function(n) {
|
|
3241
|
+
var e = this, t = $n(e.__v), i = e.o.get(n);
|
|
3032
3242
|
return i[0]++, function(s) {
|
|
3033
3243
|
var o = function() {
|
|
3034
3244
|
e.props.revealOrder ? (i.push(s), At(e, n, i)) : s();
|
|
3035
3245
|
};
|
|
3036
3246
|
t ? t(o) : o();
|
|
3037
3247
|
};
|
|
3038
|
-
},
|
|
3248
|
+
}, xe.prototype.render = function(n) {
|
|
3039
3249
|
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
3040
|
-
var e =
|
|
3250
|
+
var e = Me(n.children);
|
|
3041
3251
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
3042
3252
|
for (var t = e.length; t--; )
|
|
3043
3253
|
this.o.set(e[t], this.u = [1, 0, this.u]);
|
|
3044
3254
|
return n.children;
|
|
3045
|
-
},
|
|
3255
|
+
}, xe.prototype.componentDidUpdate = xe.prototype.componentDidMount = function() {
|
|
3046
3256
|
var n = this;
|
|
3047
3257
|
this.o.forEach(function(e, t) {
|
|
3048
3258
|
At(n, t, e);
|
|
3049
3259
|
});
|
|
3050
3260
|
};
|
|
3051
|
-
var
|
|
3261
|
+
var Yi = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Xi = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Zi = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Ji = /[A-Z0-9]/g, Gi = typeof document < "u", Ki = function(n) {
|
|
3052
3262
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
3053
3263
|
};
|
|
3054
3264
|
F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
@@ -3059,18 +3269,18 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
3059
3269
|
} });
|
|
3060
3270
|
});
|
|
3061
3271
|
var It = b.event;
|
|
3062
|
-
function
|
|
3272
|
+
function Qi() {
|
|
3063
3273
|
}
|
|
3064
|
-
function
|
|
3274
|
+
function es() {
|
|
3065
3275
|
return this.cancelBubble;
|
|
3066
3276
|
}
|
|
3067
|
-
function
|
|
3277
|
+
function ts() {
|
|
3068
3278
|
return this.defaultPrevented;
|
|
3069
3279
|
}
|
|
3070
3280
|
b.event = function(n) {
|
|
3071
|
-
return It && (n = It(n)), n.persist =
|
|
3281
|
+
return It && (n = It(n)), n.persist = Qi, n.isPropagationStopped = es, n.isDefaultPrevented = ts, n.nativeEvent = n;
|
|
3072
3282
|
};
|
|
3073
|
-
var
|
|
3283
|
+
var ns = { enumerable: !1, configurable: !0, get: function() {
|
|
3074
3284
|
return this.class;
|
|
3075
3285
|
} }, Dt = b.vnode;
|
|
3076
3286
|
b.vnode = function(n) {
|
|
@@ -3078,17 +3288,17 @@ b.vnode = function(n) {
|
|
|
3078
3288
|
var t = e.props, i = e.type, s = {};
|
|
3079
3289
|
for (var o in t) {
|
|
3080
3290
|
var a = t[o];
|
|
3081
|
-
if (!(o === "value" && "defaultValue" in t && a == null ||
|
|
3082
|
-
var
|
|
3083
|
-
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" :
|
|
3291
|
+
if (!(o === "value" && "defaultValue" in t && a == null || Gi && o === "children" && i === "noscript" || o === "class" || o === "className")) {
|
|
3292
|
+
var c = o.toLowerCase();
|
|
3293
|
+
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : c === "ondoubleclick" ? o = "ondblclick" : c !== "onchange" || i !== "input" && i !== "textarea" || Ki(t.type) ? c === "onfocus" ? o = "onfocusin" : c === "onblur" ? o = "onfocusout" : Zi.test(o) ? o = c : i.indexOf("-") === -1 && Xi.test(o) ? o = o.replace(Ji, "-$&").toLowerCase() : a === null && (a = void 0) : c = o = "oninput", c === "oninput" && s[o = c] && (o = "oninputCapture"), s[o] = a;
|
|
3084
3294
|
}
|
|
3085
3295
|
}
|
|
3086
|
-
i == "select" && s.multiple && Array.isArray(s.value) && (s.value =
|
|
3296
|
+
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = Me(t.children).forEach(function(u) {
|
|
3087
3297
|
u.props.selected = s.value.indexOf(u.props.value) != -1;
|
|
3088
|
-
})), i == "select" && s.defaultValue != null && (s.value =
|
|
3298
|
+
})), i == "select" && s.defaultValue != null && (s.value = Me(t.children).forEach(function(u) {
|
|
3089
3299
|
u.props.selected = s.multiple ? s.defaultValue.indexOf(u.props.value) != -1 : s.defaultValue == u.props.value;
|
|
3090
|
-
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className",
|
|
3091
|
-
}(n), n.$$typeof =
|
|
3300
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", ns)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
3301
|
+
}(n), n.$$typeof = Yi, Dt && Dt(n);
|
|
3092
3302
|
};
|
|
3093
3303
|
var Lt = b.__r;
|
|
3094
3304
|
b.__r = function(n) {
|
|
@@ -3101,48 +3311,48 @@ b.diffed = function(n) {
|
|
|
3101
3311
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
3102
3312
|
};
|
|
3103
3313
|
var ge = /* @__PURE__ */ new Map();
|
|
3104
|
-
function
|
|
3314
|
+
function is(n) {
|
|
3105
3315
|
var e = ge.get(n);
|
|
3106
3316
|
e && e.destroy();
|
|
3107
3317
|
}
|
|
3108
|
-
function
|
|
3318
|
+
function ss(n) {
|
|
3109
3319
|
var e = ge.get(n);
|
|
3110
3320
|
e && e.update();
|
|
3111
3321
|
}
|
|
3112
|
-
var
|
|
3113
|
-
typeof window > "u" ? ((
|
|
3322
|
+
var me = null;
|
|
3323
|
+
typeof window > "u" ? ((me = function(n) {
|
|
3114
3324
|
return n;
|
|
3115
3325
|
}).destroy = function(n) {
|
|
3116
3326
|
return n;
|
|
3117
|
-
},
|
|
3327
|
+
}, me.update = function(n) {
|
|
3118
3328
|
return n;
|
|
3119
|
-
}) : ((
|
|
3329
|
+
}) : ((me = function(n, e) {
|
|
3120
3330
|
return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
|
|
3121
3331
|
return function(i) {
|
|
3122
3332
|
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !ge.has(i)) {
|
|
3123
|
-
var s, o = null, a = window.getComputedStyle(i),
|
|
3333
|
+
var s, o = null, a = window.getComputedStyle(i), c = (s = i.value, function() {
|
|
3124
3334
|
h({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
3125
3335
|
}), u = (function(l) {
|
|
3126
|
-
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input",
|
|
3127
|
-
return i.style[
|
|
3336
|
+
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input", c), window.removeEventListener("resize", p), Object.keys(l).forEach(function(m) {
|
|
3337
|
+
return i.style[m] = l[m];
|
|
3128
3338
|
}), ge.delete(i);
|
|
3129
3339
|
}).bind(i, { height: i.style.height, resize: i.style.resize, textAlign: i.style.textAlign, overflowY: i.style.overflowY, overflowX: i.style.overflowX, wordWrap: i.style.wordWrap });
|
|
3130
|
-
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input",
|
|
3340
|
+
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", c), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", ge.set(i, { destroy: u, update: p }), p();
|
|
3131
3341
|
}
|
|
3132
3342
|
function h(l) {
|
|
3133
|
-
var
|
|
3134
|
-
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (
|
|
3135
|
-
for (var x = [];
|
|
3136
|
-
|
|
3343
|
+
var m, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, v = l.testForHeightReduction, w = v === void 0 || v, g = a.overflowY;
|
|
3344
|
+
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (m = function(T) {
|
|
3345
|
+
for (var x = []; T && T.parentNode && T.parentNode instanceof Element; )
|
|
3346
|
+
T.parentNode.scrollTop && x.push([T.parentNode, T.parentNode.scrollTop]), T = T.parentNode;
|
|
3137
3347
|
return function() {
|
|
3138
3348
|
return x.forEach(function(O) {
|
|
3139
3349
|
var L = O[0], U = O[1];
|
|
3140
3350
|
L.style.scrollBehavior = "auto", L.scrollTop = U, L.style.scrollBehavior = null;
|
|
3141
3351
|
});
|
|
3142
3352
|
};
|
|
3143
|
-
}(i), i.style.height = ""), _ = a.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(a.paddingTop) + parseFloat(a.paddingBottom)) : i.scrollHeight + parseFloat(a.borderTopWidth) + parseFloat(a.borderBottomWidth), a.maxHeight !== "none" && _ > parseFloat(a.maxHeight) ? (a.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(a.maxHeight)) : a.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", f && (i.style.textAlign = f),
|
|
3144
|
-
var
|
|
3145
|
-
a.overflow === "hidden" && (i.style.textAlign =
|
|
3353
|
+
}(i), i.style.height = ""), _ = a.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(a.paddingTop) + parseFloat(a.paddingBottom)) : i.scrollHeight + parseFloat(a.borderTopWidth) + parseFloat(a.borderBottomWidth), a.maxHeight !== "none" && _ > parseFloat(a.maxHeight) ? (a.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(a.maxHeight)) : a.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", f && (i.style.textAlign = f), m && m(), o !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), o = _), g !== a.overflow && !f)) {
|
|
3354
|
+
var C = a.textAlign;
|
|
3355
|
+
a.overflow === "hidden" && (i.style.textAlign = C === "start" ? "end" : "start"), h({ restoreTextAlign: C, testForHeightReduction: !0 });
|
|
3146
3356
|
}
|
|
3147
3357
|
}
|
|
3148
3358
|
function p() {
|
|
@@ -3151,11 +3361,11 @@ typeof window > "u" ? ((fe = function(n) {
|
|
|
3151
3361
|
}(t);
|
|
3152
3362
|
}), n;
|
|
3153
3363
|
}).destroy = function(n) {
|
|
3154
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3155
|
-
},
|
|
3156
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3364
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], is), n;
|
|
3365
|
+
}, me.update = function(n) {
|
|
3366
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], ss), n;
|
|
3157
3367
|
});
|
|
3158
|
-
var Ht =
|
|
3368
|
+
var Ht = me, E = /* @__PURE__ */ ((n) => (n.STYLE_CACHE = "ai-chat-style-cache", n.MINIMIZE_STYLY_CHCHE = "ai-chat-minimize-style-cache", n.DATA_BASE_NAME = "ibiz-chat", n.DATA_TABLE_NAME = "history-message", n.DATA_TABLE_KEY_NAME = "id", n))(E || {});
|
|
3159
3369
|
class Ot {
|
|
3160
3370
|
/**
|
|
3161
3371
|
* 聊天窗触发提问回调
|
|
@@ -3182,7 +3392,7 @@ class Ot {
|
|
|
3182
3392
|
* @date 2023-10-16 16:10:29
|
|
3183
3393
|
* @type {Signal<ChatMessage[]>}
|
|
3184
3394
|
*/
|
|
3185
|
-
S(this, "messages",
|
|
3395
|
+
S(this, "messages", G([]));
|
|
3186
3396
|
/**
|
|
3187
3397
|
* 素材列表
|
|
3188
3398
|
*
|
|
@@ -3190,7 +3400,7 @@ class Ot {
|
|
|
3190
3400
|
* @date 2025-02-27 18:02:46
|
|
3191
3401
|
* @type {Signal<IMaterial[]>}
|
|
3192
3402
|
*/
|
|
3193
|
-
S(this, "materials",
|
|
3403
|
+
S(this, "materials", G([]));
|
|
3194
3404
|
/**
|
|
3195
3405
|
* 聊天框输入值
|
|
3196
3406
|
*
|
|
@@ -3198,7 +3408,7 @@ class Ot {
|
|
|
3198
3408
|
* @date 2023-10-16 15:10:43
|
|
3199
3409
|
* @type {Signal<string>}
|
|
3200
3410
|
*/
|
|
3201
|
-
S(this, "input",
|
|
3411
|
+
S(this, "input", G(""));
|
|
3202
3412
|
/**
|
|
3203
3413
|
* 是否加载中
|
|
3204
3414
|
*
|
|
@@ -3206,7 +3416,7 @@ class Ot {
|
|
|
3206
3416
|
* @date 2025-03-10 18:03:42
|
|
3207
3417
|
* @type {Signal<boolean>}
|
|
3208
3418
|
*/
|
|
3209
|
-
S(this, "isLoading",
|
|
3419
|
+
S(this, "isLoading", G(!1));
|
|
3210
3420
|
/**
|
|
3211
3421
|
* 视图参数
|
|
3212
3422
|
*
|
|
@@ -3253,7 +3463,7 @@ class Ot {
|
|
|
3253
3463
|
* @memberof AiChatController
|
|
3254
3464
|
*/
|
|
3255
3465
|
S(this, "chatSessionid", "");
|
|
3256
|
-
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.topicId ? this.chatSessionid =
|
|
3466
|
+
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.topicId ? this.chatSessionid = mt(this.topicId) : this.chatSessionid = mt(ce()), this.fecthHistory();
|
|
3257
3467
|
}
|
|
3258
3468
|
/**
|
|
3259
3469
|
* 获取历史记录
|
|
@@ -3264,7 +3474,7 @@ class Ot {
|
|
|
3264
3474
|
*/
|
|
3265
3475
|
async fecthHistory() {
|
|
3266
3476
|
if (this.topicId) {
|
|
3267
|
-
const t = await
|
|
3477
|
+
const t = await V.getData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId);
|
|
3268
3478
|
if (t && t.data && t.data.length > 0)
|
|
3269
3479
|
return t.data.forEach((i) => {
|
|
3270
3480
|
const s = {
|
|
@@ -3285,7 +3495,7 @@ class Ot {
|
|
|
3285
3495
|
sessionid: this.chatSessionid
|
|
3286
3496
|
}) && this.opts.appendCurContent && this.addMessage({
|
|
3287
3497
|
state: 30,
|
|
3288
|
-
messageid:
|
|
3498
|
+
messageid: ce(),
|
|
3289
3499
|
role: "USER",
|
|
3290
3500
|
type: "DEFAULT",
|
|
3291
3501
|
content: this.opts.appendCurContent,
|
|
@@ -3304,10 +3514,13 @@ class Ot {
|
|
|
3304
3514
|
return;
|
|
3305
3515
|
const e = {
|
|
3306
3516
|
id: this.topicId,
|
|
3307
|
-
data: this.messages.value.map((t) =>
|
|
3517
|
+
data: this.messages.value.map((t) => ({
|
|
3518
|
+
...t._origin,
|
|
3519
|
+
toolcalls: t.toolcalls
|
|
3520
|
+
})),
|
|
3308
3521
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
3309
3522
|
};
|
|
3310
|
-
await
|
|
3523
|
+
await V.updateData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, e);
|
|
3311
3524
|
}
|
|
3312
3525
|
/**
|
|
3313
3526
|
* 设置聊天框值
|
|
@@ -3328,7 +3541,7 @@ class Ot {
|
|
|
3328
3541
|
*/
|
|
3329
3542
|
addMessage(e) {
|
|
3330
3543
|
const t = this.messages.value.find((i) => i.messageid === e.messageid);
|
|
3331
|
-
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
3544
|
+
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB();
|
|
3332
3545
|
}
|
|
3333
3546
|
/**
|
|
3334
3547
|
* 更新消息完成状态
|
|
@@ -3351,7 +3564,7 @@ class Ot {
|
|
|
3351
3564
|
*/
|
|
3352
3565
|
replaceMessage(e) {
|
|
3353
3566
|
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
3354
|
-
t !== -1 ? (this.messages.value[t] = new
|
|
3567
|
+
t !== -1 ? (this.messages.value[t] = new j(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
|
|
3355
3568
|
appDataEntityId: this.appDataEntityId,
|
|
3356
3569
|
message: {
|
|
3357
3570
|
messages: [e],
|
|
@@ -3372,9 +3585,9 @@ class Ot {
|
|
|
3372
3585
|
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
3373
3586
|
if (t !== -1) {
|
|
3374
3587
|
const i = this.messages.value[t];
|
|
3375
|
-
e.content = i.content, this.messages.value[t] = new
|
|
3588
|
+
e.content = i.content, this.messages.value[t] = new j(e), this.messages.value = [...this.messages.value];
|
|
3376
3589
|
} else
|
|
3377
|
-
this.messages.value = [...this.messages.value, new
|
|
3590
|
+
this.messages.value = [...this.messages.value, new j(e)];
|
|
3378
3591
|
await this.asyncToIndexDB();
|
|
3379
3592
|
}
|
|
3380
3593
|
/**
|
|
@@ -3395,6 +3608,18 @@ class Ot {
|
|
|
3395
3608
|
t.push(i);
|
|
3396
3609
|
}), this.materials.value = []), t && t.length > 0 && (e = an.stringify(t)), e;
|
|
3397
3610
|
}
|
|
3611
|
+
/**
|
|
3612
|
+
* @description 获取当前会话的消息集合
|
|
3613
|
+
* @private
|
|
3614
|
+
* @returns {*} {IChatMessage[]}
|
|
3615
|
+
* @memberof AiChatController
|
|
3616
|
+
*/
|
|
3617
|
+
getMessages() {
|
|
3618
|
+
const e = this.messages.value.filter((t) => t.type !== "ERROR").map((t) => t._origin);
|
|
3619
|
+
return e.forEach((t) => {
|
|
3620
|
+
t.content = t.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim();
|
|
3621
|
+
}), e;
|
|
3622
|
+
}
|
|
3398
3623
|
/**
|
|
3399
3624
|
* 提问
|
|
3400
3625
|
*
|
|
@@ -3406,18 +3631,18 @@ class Ot {
|
|
|
3406
3631
|
try {
|
|
3407
3632
|
this.isLoading.value = !0, this.messages.value.forEach((i, s) => {
|
|
3408
3633
|
const o = i._origin;
|
|
3409
|
-
o.suggestions && (o.suggestions = void 0, this.messages.value[s] = new
|
|
3634
|
+
o.suggestions && (o.suggestions = void 0, this.messages.value[s] = new j(o));
|
|
3410
3635
|
}), this.messages.value = [...this.messages.value], this.asyncToIndexDB();
|
|
3411
3636
|
let t = this.stringlyMaterialResource();
|
|
3412
3637
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
3413
3638
|
state: 30,
|
|
3414
|
-
messageid:
|
|
3639
|
+
messageid: ce(),
|
|
3415
3640
|
role: "USER",
|
|
3416
3641
|
type: "DEFAULT",
|
|
3417
3642
|
content: t
|
|
3418
3643
|
}), await this.opts.question(this, this.context, this.params, {
|
|
3419
3644
|
appDataEntityId: this.appDataEntityId
|
|
3420
|
-
}, this.
|
|
3645
|
+
}, this.getMessages(), this.chatSessionid), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
3421
3646
|
} finally {
|
|
3422
3647
|
this.isLoading.value = !1;
|
|
3423
3648
|
}
|
|
@@ -3468,11 +3693,11 @@ class Ot {
|
|
|
3468
3693
|
if (t)
|
|
3469
3694
|
this.messages.value.splice(i + 1, this.messages.value.length - i - 1), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3470
3695
|
appDataEntityId: this.appDataEntityId
|
|
3471
|
-
}, this.
|
|
3696
|
+
}, this.getMessages(), this.chatSessionid);
|
|
3472
3697
|
else if (i === this.messages.value.length - 1)
|
|
3473
3698
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3474
3699
|
appDataEntityId: this.appDataEntityId
|
|
3475
|
-
}, this.
|
|
3700
|
+
}, this.getMessages(), this.chatSessionid);
|
|
3476
3701
|
else {
|
|
3477
3702
|
const s = this.messages.value[i - 1].content;
|
|
3478
3703
|
this.messages.value.splice(i - 1, 2), this.question(s);
|
|
@@ -3498,7 +3723,7 @@ class Ot {
|
|
|
3498
3723
|
* @memberof AiChatController
|
|
3499
3724
|
*/
|
|
3500
3725
|
async resetTopic() {
|
|
3501
|
-
await this.abortQuestion(), this.topicId && await
|
|
3726
|
+
await this.abortQuestion(), this.topicId && await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [], this.opts.history(this.context, this.params, {
|
|
3502
3727
|
appDataEntityId: this.appDataEntityId,
|
|
3503
3728
|
appendCurData: this.opts.appendCurData,
|
|
3504
3729
|
sessionid: this.chatSessionid
|
|
@@ -3511,7 +3736,7 @@ class Ot {
|
|
|
3511
3736
|
* @date 2025-03-18 17:03:57
|
|
3512
3737
|
*/
|
|
3513
3738
|
async clearTopic() {
|
|
3514
|
-
await this.abortQuestion(), this.topicId && await
|
|
3739
|
+
await this.abortQuestion(), this.topicId && await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [];
|
|
3515
3740
|
}
|
|
3516
3741
|
/**
|
|
3517
3742
|
* 新增素材资源
|
|
@@ -3559,8 +3784,8 @@ class Ot {
|
|
|
3559
3784
|
return;
|
|
3560
3785
|
const i = this.messages.value.findIndex((o) => o.messageid === e.messageid), {
|
|
3561
3786
|
suggestions: s
|
|
3562
|
-
} =
|
|
3563
|
-
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new
|
|
3787
|
+
} = jn.parseMixedContent(t);
|
|
3788
|
+
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new j(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB());
|
|
3564
3789
|
}
|
|
3565
3790
|
/**
|
|
3566
3791
|
* 处理建议点击
|
|
@@ -3576,7 +3801,7 @@ class Ot {
|
|
|
3576
3801
|
const s = this.messages.value.findIndex((a) => a.messageid === e.messageid);
|
|
3577
3802
|
if (s !== -1) {
|
|
3578
3803
|
const a = this.messages.value[s]._origin;
|
|
3579
|
-
a.suggestions = void 0, this.messages.value[s] = new
|
|
3804
|
+
a.suggestions = void 0, this.messages.value[s] = new j(a), this.messages.value = [...this.messages.value];
|
|
3580
3805
|
}
|
|
3581
3806
|
this.asyncToIndexDB();
|
|
3582
3807
|
const {
|
|
@@ -3588,15 +3813,15 @@ class Ot {
|
|
|
3588
3813
|
const a = t.data.actionid;
|
|
3589
3814
|
if (!a)
|
|
3590
3815
|
throw new Error("actionid不能为空");
|
|
3591
|
-
const
|
|
3816
|
+
const c = {
|
|
3592
3817
|
...e
|
|
3593
3818
|
};
|
|
3594
|
-
Object.assign(
|
|
3819
|
+
Object.assign(c, {
|
|
3595
3820
|
topic: this.topic
|
|
3596
|
-
}),
|
|
3821
|
+
}), c.msg.realcontent = e.realcontent, await this.opts.extendToolbarClick(i, {
|
|
3597
3822
|
id: a,
|
|
3598
3823
|
appId: this.context.srfappid
|
|
3599
|
-
}, this.context, this.params,
|
|
3824
|
+
}, this.context, this.params, c);
|
|
3600
3825
|
}
|
|
3601
3826
|
break;
|
|
3602
3827
|
case "raw":
|
|
@@ -3607,7 +3832,7 @@ class Ot {
|
|
|
3607
3832
|
}
|
|
3608
3833
|
}
|
|
3609
3834
|
}
|
|
3610
|
-
class
|
|
3835
|
+
class os {
|
|
3611
3836
|
/**
|
|
3612
3837
|
* Creates an instance of AiTopicController.
|
|
3613
3838
|
* @author tony001
|
|
@@ -3622,7 +3847,7 @@ class ns {
|
|
|
3622
3847
|
* @date 2025-02-20 16:02:38
|
|
3623
3848
|
* @type {Signal<ChatTopic[]>}
|
|
3624
3849
|
*/
|
|
3625
|
-
S(this, "topics",
|
|
3850
|
+
S(this, "topics", G([]));
|
|
3626
3851
|
/**
|
|
3627
3852
|
* 激活话题
|
|
3628
3853
|
*
|
|
@@ -3630,7 +3855,7 @@ class ns {
|
|
|
3630
3855
|
* @date 2025-02-24 16:02:44
|
|
3631
3856
|
* @type {(Signal<ITopic | undefined>)}
|
|
3632
3857
|
*/
|
|
3633
|
-
S(this, "activedTopic",
|
|
3858
|
+
S(this, "activedTopic", G(void 0));
|
|
3634
3859
|
/**
|
|
3635
3860
|
* 当前话题配置备份
|
|
3636
3861
|
*
|
|
@@ -3652,7 +3877,7 @@ class ns {
|
|
|
3652
3877
|
async fetchHistory(e) {
|
|
3653
3878
|
const i = await e.configService(e.appid, "aitopics", e.type).load();
|
|
3654
3879
|
i && i.length > 0 && i.forEach((s) => {
|
|
3655
|
-
this.topics.value = [...this.topics.value, new
|
|
3880
|
+
this.topics.value = [...this.topics.value, new fe(s)];
|
|
3656
3881
|
});
|
|
3657
3882
|
}
|
|
3658
3883
|
/**
|
|
@@ -3665,8 +3890,8 @@ class ns {
|
|
|
3665
3890
|
*/
|
|
3666
3891
|
async updateCurrentTopic(e) {
|
|
3667
3892
|
this.currentTopicOptions = e;
|
|
3668
|
-
const t = this.topics.value.findIndex((a) => a.id === e.id), i = new
|
|
3669
|
-
t !== -1 ? this.topics.value.splice(t, 1, new
|
|
3893
|
+
const t = this.topics.value.findIndex((a) => a.id === e.id), i = new fe(e);
|
|
3894
|
+
t !== -1 ? this.topics.value.splice(t, 1, new fe(e)) : this.topics.value = [...this.topics.value, new fe(e)];
|
|
3670
3895
|
const s = this.topics.value.map((a) => ({
|
|
3671
3896
|
appid: a.appid,
|
|
3672
3897
|
id: a.id,
|
|
@@ -3695,8 +3920,8 @@ class ns {
|
|
|
3695
3920
|
let a = !0;
|
|
3696
3921
|
if (e.beforeDelete && (a = await e.beforeDelete(t, i, s, o)), !a)
|
|
3697
3922
|
return;
|
|
3698
|
-
const
|
|
3699
|
-
|
|
3923
|
+
const c = this.topics.value.findIndex((l) => l.id === s.id);
|
|
3924
|
+
c !== -1 && (this.topics.value.splice(c, 1), this.topics.value = [...this.topics.value]);
|
|
3700
3925
|
const u = this.topics.value.map((l) => ({
|
|
3701
3926
|
appid: l.appid,
|
|
3702
3927
|
id: l.id,
|
|
@@ -3706,7 +3931,7 @@ class ns {
|
|
|
3706
3931
|
url: l.url,
|
|
3707
3932
|
aiChat: l.aiChat
|
|
3708
3933
|
})), h = e.configService(e.appid, "aitopics", e.type);
|
|
3709
|
-
await (h == null ? void 0 : h.save(u)), await
|
|
3934
|
+
await (h == null ? void 0 : h.save(u)), await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, s.id), this.topics.value.length > 0 && s.id === ((p = this.activedTopic.value) == null ? void 0 : p.id) && this.handleTopicChange(this.topics.value[0]);
|
|
3710
3935
|
}
|
|
3711
3936
|
/**
|
|
3712
3937
|
* 更新话题数据
|
|
@@ -3751,13 +3976,13 @@ class ns {
|
|
|
3751
3976
|
*/
|
|
3752
3977
|
async handleTopicAction(e, t, i) {
|
|
3753
3978
|
var o, a;
|
|
3754
|
-
const s = this.topics.value.find((
|
|
3979
|
+
const s = this.topics.value.find((c) => c.id === t.id);
|
|
3755
3980
|
if (this.currentTopicOptions && s && s.aiChat) {
|
|
3756
3981
|
const {
|
|
3757
|
-
context:
|
|
3982
|
+
context: c,
|
|
3758
3983
|
params: u
|
|
3759
3984
|
} = s.aiChat;
|
|
3760
|
-
e === "DELETE" ? await this.removeTopic(this.currentTopicOptions,
|
|
3985
|
+
e === "DELETE" ? await this.removeTopic(this.currentTopicOptions, c, u, s, i) : e === "RENAME" && await this.updateTopic(this.currentTopicOptions, t), (a = (o = this.currentTopicOptions).action) == null || a.call(o, e, c, u, t, i);
|
|
3761
3986
|
}
|
|
3762
3987
|
}
|
|
3763
3988
|
/**
|
|
@@ -3782,7 +4007,7 @@ class ns {
|
|
|
3782
4007
|
sourceCaption: e.sourceCaption,
|
|
3783
4008
|
url: e.url,
|
|
3784
4009
|
aiChat: e.aiChat
|
|
3785
|
-
}, o = new
|
|
4010
|
+
}, o = new fe(s);
|
|
3786
4011
|
this.topics.value = [...this.topics.value, o];
|
|
3787
4012
|
const a = this.topics.value.map((p) => ({
|
|
3788
4013
|
appid: p.appid,
|
|
@@ -3792,8 +4017,8 @@ class ns {
|
|
|
3792
4017
|
sourceCaption: p.sourceCaption,
|
|
3793
4018
|
url: p.url,
|
|
3794
4019
|
aiChat: p.aiChat
|
|
3795
|
-
})),
|
|
3796
|
-
await (
|
|
4020
|
+
})), c = (h = this.currentTopicOptions) == null ? void 0 : h.configService(s.appid, "aitopics", s.type);
|
|
4021
|
+
await (c == null ? void 0 : c.save(a)), this.handleTopicChange(o);
|
|
3797
4022
|
}
|
|
3798
4023
|
/**
|
|
3799
4024
|
* 清空话题
|
|
@@ -3804,8 +4029,8 @@ class ns {
|
|
|
3804
4029
|
async clearTopic() {
|
|
3805
4030
|
var o;
|
|
3806
4031
|
const e = this.topics.value.find((a) => {
|
|
3807
|
-
var
|
|
3808
|
-
return a.id === ((
|
|
4032
|
+
var c;
|
|
4033
|
+
return a.id === ((c = this.activedTopic.value) == null ? void 0 : c.id);
|
|
3809
4034
|
});
|
|
3810
4035
|
if (!this.currentTopicOptions || !e)
|
|
3811
4036
|
return;
|
|
@@ -3814,7 +4039,7 @@ class ns {
|
|
|
3814
4039
|
return;
|
|
3815
4040
|
await Promise.all(this.topics.value.map((a) => {
|
|
3816
4041
|
if (a.id !== (e == null ? void 0 : e.id))
|
|
3817
|
-
return
|
|
4042
|
+
return V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, a.id);
|
|
3818
4043
|
})), this.topics.value = e ? [e] : [];
|
|
3819
4044
|
const i = (o = this.currentTopicOptions) == null ? void 0 : o.configService(this.currentTopicOptions.appid, "aitopics", this.currentTopicOptions.type), s = this.topics.value.map((a) => ({
|
|
3820
4045
|
appid: a.appid,
|
|
@@ -3828,12 +4053,12 @@ class ns {
|
|
|
3828
4053
|
await (i == null ? void 0 : i.save(s));
|
|
3829
4054
|
}
|
|
3830
4055
|
}
|
|
3831
|
-
class
|
|
4056
|
+
class En {
|
|
3832
4057
|
constructor(e) {
|
|
3833
4058
|
this.aiChat = e;
|
|
3834
4059
|
}
|
|
3835
4060
|
}
|
|
3836
|
-
class
|
|
4061
|
+
class as extends En {
|
|
3837
4062
|
/**
|
|
3838
4063
|
* 执行操作
|
|
3839
4064
|
*
|
|
@@ -3862,7 +4087,7 @@ class is extends Mn {
|
|
|
3862
4087
|
}
|
|
3863
4088
|
}
|
|
3864
4089
|
}
|
|
3865
|
-
class
|
|
4090
|
+
class rs extends En {
|
|
3866
4091
|
/**
|
|
3867
4092
|
* 执行操作
|
|
3868
4093
|
*
|
|
@@ -3875,21 +4100,21 @@ class ss extends Mn {
|
|
|
3875
4100
|
multiple: s,
|
|
3876
4101
|
accept: o,
|
|
3877
4102
|
maxSize: a,
|
|
3878
|
-
onSelect:
|
|
4103
|
+
onSelect: c,
|
|
3879
4104
|
onUpload: u,
|
|
3880
4105
|
onSuccess: h,
|
|
3881
4106
|
onError: p,
|
|
3882
4107
|
onProgress: l
|
|
3883
|
-
} = i,
|
|
4108
|
+
} = i, m = {
|
|
3884
4109
|
multiple: s || !0,
|
|
3885
4110
|
accept: o || "*/*",
|
|
3886
4111
|
maxSize: a || 5 * 1024 * 1024,
|
|
3887
4112
|
onSelect: (d) => {
|
|
3888
|
-
|
|
3889
|
-
const
|
|
3890
|
-
Object.assign(
|
|
4113
|
+
c == null || c(d), d.length > 0 && d.forEach((f) => {
|
|
4114
|
+
const v = this.buildMaterialObject(f);
|
|
4115
|
+
Object.assign(v.metadata, {
|
|
3891
4116
|
state: "uploading"
|
|
3892
|
-
}), this.aiChat.addMaterial(
|
|
4117
|
+
}), this.aiChat.addMaterial(v);
|
|
3893
4118
|
});
|
|
3894
4119
|
},
|
|
3895
4120
|
onUpload: async (d, f) => u(d, f, {
|
|
@@ -3898,7 +4123,7 @@ class ss extends Mn {
|
|
|
3898
4123
|
}),
|
|
3899
4124
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3900
4125
|
onSuccess: (d, f) => {
|
|
3901
|
-
const
|
|
4126
|
+
const v = {
|
|
3902
4127
|
id: d.id,
|
|
3903
4128
|
type: "ossfile",
|
|
3904
4129
|
data: {
|
|
@@ -3915,19 +4140,19 @@ class ss extends Mn {
|
|
|
3915
4140
|
state: "successed"
|
|
3916
4141
|
}
|
|
3917
4142
|
};
|
|
3918
|
-
this.aiChat.replaceMaterial(f.name,
|
|
4143
|
+
this.aiChat.replaceMaterial(f.name, v), h == null || h(d, f);
|
|
3919
4144
|
},
|
|
3920
4145
|
onError: (d, f) => {
|
|
3921
|
-
const
|
|
3922
|
-
Object.assign(
|
|
4146
|
+
const v = this.buildMaterialObject(f);
|
|
4147
|
+
Object.assign(v.metadata, {
|
|
3923
4148
|
state: "failed"
|
|
3924
|
-
}), this.aiChat.replaceMaterial(f.name,
|
|
4149
|
+
}), this.aiChat.replaceMaterial(f.name, v), p == null || p(d, f);
|
|
3925
4150
|
},
|
|
3926
4151
|
onProgress: (d, f) => {
|
|
3927
4152
|
l == null || l(d, f);
|
|
3928
4153
|
}
|
|
3929
4154
|
};
|
|
3930
|
-
new Wn(
|
|
4155
|
+
new Wn(m).openFilePicker();
|
|
3931
4156
|
}
|
|
3932
4157
|
/**
|
|
3933
4158
|
* 构建素材对象
|
|
@@ -3957,13 +4182,13 @@ class Bt {
|
|
|
3957
4182
|
static getMaterialHelper(e, t) {
|
|
3958
4183
|
switch (e) {
|
|
3959
4184
|
case "ossfile":
|
|
3960
|
-
return new
|
|
4185
|
+
return new rs(t);
|
|
3961
4186
|
default:
|
|
3962
|
-
return new
|
|
4187
|
+
return new as(t);
|
|
3963
4188
|
}
|
|
3964
4189
|
}
|
|
3965
4190
|
}
|
|
3966
|
-
class
|
|
4191
|
+
class cs {
|
|
3967
4192
|
/**
|
|
3968
4193
|
* Creates an instance of ChatController.
|
|
3969
4194
|
* @author tony001
|
|
@@ -4023,7 +4248,7 @@ class os {
|
|
|
4023
4248
|
* @memberof ChatController
|
|
4024
4249
|
*/
|
|
4025
4250
|
S(this, "aiTopicMap", /* @__PURE__ */ new Map());
|
|
4026
|
-
this.aiTopic = new
|
|
4251
|
+
this.aiTopic = new os(this);
|
|
4027
4252
|
}
|
|
4028
4253
|
/**
|
|
4029
4254
|
* 聊天控制器
|
|
@@ -4044,7 +4269,7 @@ class os {
|
|
|
4044
4269
|
* @return {*} {Promise<void>}
|
|
4045
4270
|
*/
|
|
4046
4271
|
async initIndexDB() {
|
|
4047
|
-
await
|
|
4272
|
+
await V.checkTableExists(E.DATA_BASE_NAME, E.DATA_TABLE_NAME) || await V.createTable(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, E.DATA_TABLE_KEY_NAME, !1);
|
|
4048
4273
|
}
|
|
4049
4274
|
/**
|
|
4050
4275
|
* 创建聊天窗口(会同时显示出来)
|
|
@@ -4106,7 +4331,7 @@ class os {
|
|
|
4106
4331
|
* @param {ChatTopic} topic
|
|
4107
4332
|
*/
|
|
4108
4333
|
switchAiChatController(e) {
|
|
4109
|
-
var s, o, a,
|
|
4334
|
+
var s, o, a, c, u;
|
|
4110
4335
|
const t = {
|
|
4111
4336
|
...this.backupChatOptions.chatOptions
|
|
4112
4337
|
};
|
|
@@ -4133,7 +4358,7 @@ class os {
|
|
|
4133
4358
|
mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
4134
4359
|
containerOptions: (o = this.backupChatOptions) == null ? void 0 : o.containerOptions,
|
|
4135
4360
|
caption: (a = this.backupChatOptions) != null && a.mode && this.backupChatOptions.mode === "TOPIC" ? "AI助手" : t.caption,
|
|
4136
|
-
enableBackFill: (u = (
|
|
4361
|
+
enableBackFill: (u = (c = this.backupChatOptions) == null ? void 0 : c.containerOptions) == null ? void 0 : u.enableBackFill,
|
|
4137
4362
|
contentToolbarItems: t.contentToolbarItems,
|
|
4138
4363
|
footerToolbarItems: t.footerToolbarItems,
|
|
4139
4364
|
questionToolbarItems: t.questionToolbarItems,
|
|
@@ -4176,19 +4401,19 @@ class os {
|
|
|
4176
4401
|
this.container && (ae(null, this.container), this.container.remove(), this.container = void 0);
|
|
4177
4402
|
}
|
|
4178
4403
|
}
|
|
4179
|
-
const
|
|
4180
|
-
const
|
|
4404
|
+
const gs = new cs();
|
|
4405
|
+
const ls = new k("chat-input-material"), us = (n) => {
|
|
4181
4406
|
const e = n.controller.materials;
|
|
4182
|
-
return
|
|
4183
|
-
className:
|
|
4184
|
-
children: e.value.map((t) =>
|
|
4407
|
+
return r("div", {
|
|
4408
|
+
className: ls.b(),
|
|
4409
|
+
children: e.value.map((t) => r(Sn, {
|
|
4185
4410
|
material: t,
|
|
4186
4411
|
disabled: !1,
|
|
4187
4412
|
controller: n.controller
|
|
4188
4413
|
}, t.id))
|
|
4189
4414
|
});
|
|
4190
4415
|
};
|
|
4191
|
-
const
|
|
4416
|
+
const Mn = ({
|
|
4192
4417
|
children: n,
|
|
4193
4418
|
actions: e,
|
|
4194
4419
|
// 接收行为数据
|
|
@@ -4199,14 +4424,14 @@ const $n = ({
|
|
|
4199
4424
|
onAction: a
|
|
4200
4425
|
// 接收行为事件回调
|
|
4201
4426
|
}) => {
|
|
4202
|
-
const
|
|
4203
|
-
|
|
4427
|
+
const c = new k("pop"), u = pn(rt), [h, p] = K(s || !1), l = P(null), m = P(null);
|
|
4428
|
+
I(() => {
|
|
4204
4429
|
s !== void 0 && p(s);
|
|
4205
|
-
}, [s]),
|
|
4206
|
-
|
|
4207
|
-
}), []),
|
|
4430
|
+
}, [s]), I(() => (m.current || (m.current = document.createElement("div"), m.current.className = c.b("content-container"), document.body.appendChild(m.current)), () => {
|
|
4431
|
+
m.current && document.body.removeChild(m.current);
|
|
4432
|
+
}), []), I(() => {
|
|
4208
4433
|
const d = (f) => {
|
|
4209
|
-
l.current && !l.current.contains(f.target) && !f.target.closest(".".concat(
|
|
4434
|
+
l.current && !l.current.contains(f.target) && !f.target.closest(".".concat(c.b())) && !f.target.closest(".ibiz-quick-edit") && !f.target.closest(".ibiz-picker__transfer") && (p(!1), o == null || o(!1));
|
|
4210
4435
|
};
|
|
4211
4436
|
return h && document.addEventListener("mousedown", d), () => {
|
|
4212
4437
|
document.removeEventListener("mousedown", d);
|
|
@@ -4218,7 +4443,7 @@ const $n = ({
|
|
|
4218
4443
|
const d = l.current.getBoundingClientRect(), f = {
|
|
4219
4444
|
position: "absolute",
|
|
4220
4445
|
zIndex: u.zIndex + 1
|
|
4221
|
-
},
|
|
4446
|
+
}, v = {
|
|
4222
4447
|
bottom: {
|
|
4223
4448
|
top: d.bottom + window.scrollY,
|
|
4224
4449
|
left: d.left + window.scrollX
|
|
@@ -4242,13 +4467,13 @@ const $n = ({
|
|
|
4242
4467
|
};
|
|
4243
4468
|
return {
|
|
4244
4469
|
...f,
|
|
4245
|
-
...
|
|
4470
|
+
...v[i]
|
|
4246
4471
|
};
|
|
4247
4472
|
};
|
|
4248
|
-
return
|
|
4249
|
-
className: "".concat(
|
|
4250
|
-
children: [
|
|
4251
|
-
className: "".concat(
|
|
4473
|
+
return r("span", {
|
|
4474
|
+
className: "".concat(c.b("trigger-container")),
|
|
4475
|
+
children: [r("span", {
|
|
4476
|
+
className: "".concat(c.b("trigger-element")),
|
|
4252
4477
|
ref: l,
|
|
4253
4478
|
onClick: (d) => {
|
|
4254
4479
|
d.stopPropagation();
|
|
@@ -4256,77 +4481,77 @@ const $n = ({
|
|
|
4256
4481
|
p(f), o == null || o(f);
|
|
4257
4482
|
},
|
|
4258
4483
|
children: n
|
|
4259
|
-
}), h &&
|
|
4260
|
-
className: "".concat(
|
|
4484
|
+
}), h && m.current && qi(r("div", {
|
|
4485
|
+
className: "".concat(c.b(), " pop-").concat(i),
|
|
4261
4486
|
style: _(),
|
|
4262
|
-
children: t || (e == null ? void 0 : e.map((d) =>
|
|
4487
|
+
children: t || (e == null ? void 0 : e.map((d) => r("div", {
|
|
4263
4488
|
title: d.caption,
|
|
4264
|
-
className:
|
|
4489
|
+
className: c.e("item"),
|
|
4265
4490
|
onMouseDown: (f) => {
|
|
4266
4491
|
f.stopPropagation(), a == null || a(d.id, f);
|
|
4267
4492
|
},
|
|
4268
|
-
children: [d.icon,
|
|
4269
|
-
className:
|
|
4493
|
+
children: [d.icon, r("div", {
|
|
4494
|
+
className: c.em("item", "caption"),
|
|
4270
4495
|
children: d.caption
|
|
4271
4496
|
})]
|
|
4272
4497
|
}, d.id)))
|
|
4273
|
-
}),
|
|
4498
|
+
}), m.current)]
|
|
4274
4499
|
});
|
|
4275
4500
|
};
|
|
4276
|
-
const
|
|
4501
|
+
const A = new k("chat-input"), Pt = window.SpeechRecognition || window.webkitSpeechRecognition, Rt = (n) => {
|
|
4277
4502
|
var f;
|
|
4278
|
-
const [e, t] = K(!1), i = P(null), s = n.controller.input, o =
|
|
4503
|
+
const [e, t] = K(!1), i = P(null), s = n.controller.input, o = M(!1), a = P();
|
|
4279
4504
|
Pt && !a.current && (a.current = new Pt(), a.current.onstart = () => {
|
|
4280
4505
|
o.value = !0;
|
|
4281
4506
|
}, a.current.onend = () => {
|
|
4282
4507
|
o.value = !1;
|
|
4283
|
-
}, a.current.onresult = (
|
|
4284
|
-
var g,
|
|
4285
|
-
const w = (
|
|
4508
|
+
}, a.current.onresult = (v) => {
|
|
4509
|
+
var g, C, T;
|
|
4510
|
+
const w = (T = (C = (g = v.results) == null ? void 0 : g[0]) == null ? void 0 : C[0]) == null ? void 0 : T.transcript;
|
|
4286
4511
|
w && (s.value = "".concat(s.value).concat(w));
|
|
4287
4512
|
});
|
|
4288
|
-
const
|
|
4513
|
+
const c = () => {
|
|
4289
4514
|
a.current && !o.value && a.current.start();
|
|
4290
|
-
}, u = Fe((
|
|
4291
|
-
s.value =
|
|
4515
|
+
}, u = Fe((v) => {
|
|
4516
|
+
s.value = v.target.value;
|
|
4292
4517
|
}, [s]), h = B(() => s.value.length <= 0);
|
|
4293
|
-
|
|
4518
|
+
I(() => (i.current && Ht(i.current), () => {
|
|
4294
4519
|
i.current && Ht.destroy(i.current);
|
|
4295
4520
|
}), [i]);
|
|
4296
4521
|
const p = Fe(async () => {
|
|
4297
|
-
var
|
|
4522
|
+
var v;
|
|
4298
4523
|
try {
|
|
4299
4524
|
const w = s.value;
|
|
4300
4525
|
s.value = "", await n.controller.question(w);
|
|
4301
4526
|
} catch (w) {
|
|
4302
4527
|
console.error(w);
|
|
4303
4528
|
} finally {
|
|
4304
|
-
(
|
|
4529
|
+
(v = i.current) == null || v.focus();
|
|
4305
4530
|
}
|
|
4306
4531
|
}, [s]), l = Fe(async () => {
|
|
4307
4532
|
try {
|
|
4308
4533
|
n.controller.abortQuestion();
|
|
4309
|
-
} catch (
|
|
4310
|
-
console.error(
|
|
4534
|
+
} catch (v) {
|
|
4535
|
+
console.error(v);
|
|
4311
4536
|
}
|
|
4312
|
-
}, [s]),
|
|
4313
|
-
|
|
4314
|
-
}, _ = async (
|
|
4315
|
-
await Bt.getMaterialHelper("ossfile", n.controller).excuteAction(
|
|
4316
|
-
}, d = async (
|
|
4317
|
-
await Bt.getMaterialHelper("common", n.controller).excuteAction(
|
|
4537
|
+
}, [s]), m = (v) => {
|
|
4538
|
+
v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 && p());
|
|
4539
|
+
}, _ = async (v) => {
|
|
4540
|
+
await Bt.getMaterialHelper("ossfile", n.controller).excuteAction(v), t(!1);
|
|
4541
|
+
}, d = async (v, w) => {
|
|
4542
|
+
await Bt.getMaterialHelper("common", n.controller).excuteAction(v, w), t(!1);
|
|
4318
4543
|
};
|
|
4319
|
-
return
|
|
4320
|
-
className:
|
|
4321
|
-
children: [
|
|
4322
|
-
className:
|
|
4323
|
-
children:
|
|
4544
|
+
return r("div", {
|
|
4545
|
+
className: A.b("wrapper"),
|
|
4546
|
+
children: [r("div", {
|
|
4547
|
+
className: A.b("material-wrapper"),
|
|
4548
|
+
children: r(us, {
|
|
4324
4549
|
controller: n.controller
|
|
4325
4550
|
})
|
|
4326
|
-
}),
|
|
4327
|
-
className:
|
|
4328
|
-
children: [
|
|
4329
|
-
className:
|
|
4551
|
+
}), r("div", {
|
|
4552
|
+
className: A.b("main-wrapper"),
|
|
4553
|
+
children: [r("textarea", {
|
|
4554
|
+
className: A.e("textarea"),
|
|
4330
4555
|
type: "text",
|
|
4331
4556
|
rows: 6,
|
|
4332
4557
|
autoCorrect: "off",
|
|
@@ -4334,150 +4559,150 @@ const $ = new M("chat-input"), Pt = window.SpeechRecognition || window.webkitSpe
|
|
|
4334
4559
|
autoComplete: "off",
|
|
4335
4560
|
value: s,
|
|
4336
4561
|
onInput: u,
|
|
4337
|
-
onKeyDown:
|
|
4562
|
+
onKeyDown: m,
|
|
4338
4563
|
ref: i,
|
|
4339
4564
|
disabled: n.controller.isLoading.value
|
|
4340
|
-
}),
|
|
4341
|
-
className:
|
|
4342
|
-
children: [
|
|
4343
|
-
className: "".concat(
|
|
4565
|
+
}), r("div", {
|
|
4566
|
+
className: A.b("action-wrapper"),
|
|
4567
|
+
children: [r("div", {
|
|
4568
|
+
className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", n.controller.isLoading.value)),
|
|
4344
4569
|
title: "上传资料",
|
|
4345
|
-
children:
|
|
4346
|
-
content:
|
|
4347
|
-
className:
|
|
4348
|
-
children: [
|
|
4349
|
-
className:
|
|
4350
|
-
onClick: (
|
|
4351
|
-
_(
|
|
4570
|
+
children: r(Mn, {
|
|
4571
|
+
content: r("div", {
|
|
4572
|
+
className: A.b("pop-actions"),
|
|
4573
|
+
children: [r("div", {
|
|
4574
|
+
className: A.b("pop-action-item"),
|
|
4575
|
+
onClick: (v) => {
|
|
4576
|
+
_(v);
|
|
4352
4577
|
},
|
|
4353
|
-
children: [
|
|
4354
|
-
className:
|
|
4355
|
-
children:
|
|
4356
|
-
}),
|
|
4357
|
-
className:
|
|
4578
|
+
children: [r("span", {
|
|
4579
|
+
className: A.b("pop-action-item-icon"),
|
|
4580
|
+
children: r(xn, {})
|
|
4581
|
+
}), r("span", {
|
|
4582
|
+
className: A.b("pop-action-item-title"),
|
|
4358
4583
|
children: "文件资料"
|
|
4359
4584
|
})]
|
|
4360
|
-
}), (f = n.questionToolbarItems) == null ? void 0 : f.map((
|
|
4361
|
-
var w, g,
|
|
4362
|
-
return
|
|
4363
|
-
className:
|
|
4364
|
-
onClick: (
|
|
4365
|
-
d(
|
|
4585
|
+
}), (f = n.questionToolbarItems) == null ? void 0 : f.map((v) => {
|
|
4586
|
+
var w, g, C;
|
|
4587
|
+
return r("div", {
|
|
4588
|
+
className: A.b("pop-action-item"),
|
|
4589
|
+
onClick: (T) => {
|
|
4590
|
+
d(T, v);
|
|
4366
4591
|
},
|
|
4367
|
-
children: [
|
|
4368
|
-
className:
|
|
4369
|
-
children: typeof
|
|
4370
|
-
children: (g =
|
|
4371
|
-
className:
|
|
4372
|
-
}) : (
|
|
4592
|
+
children: [r("span", {
|
|
4593
|
+
className: A.b("pop-action-item-icon"),
|
|
4594
|
+
children: typeof v.icon == "function" ? v.icon() : ((w = v.icon) == null ? void 0 : w.showIcon) && r(Y, {
|
|
4595
|
+
children: (g = v.icon) != null && g.cssClass ? r("i", {
|
|
4596
|
+
className: v.icon.cssClass
|
|
4597
|
+
}) : (C = v.icon) != null && C.imagePath ? it(v.icon.imagePath) ? r("div", {
|
|
4373
4598
|
dangerouslySetInnerHTML: {
|
|
4374
|
-
__html:
|
|
4599
|
+
__html: v.icon.imagePath
|
|
4375
4600
|
}
|
|
4376
|
-
}) :
|
|
4377
|
-
src:
|
|
4601
|
+
}) : r("img", {
|
|
4602
|
+
src: v.icon.imagePath
|
|
4378
4603
|
}) : null
|
|
4379
4604
|
})
|
|
4380
|
-
}),
|
|
4381
|
-
className:
|
|
4382
|
-
children:
|
|
4605
|
+
}), r("span", {
|
|
4606
|
+
className: A.b("pop-action-item-title"),
|
|
4607
|
+
children: v.label
|
|
4383
4608
|
})]
|
|
4384
|
-
},
|
|
4609
|
+
}, v.id);
|
|
4385
4610
|
})]
|
|
4386
4611
|
}),
|
|
4387
4612
|
position: "top-left",
|
|
4388
4613
|
isOpen: e,
|
|
4389
4614
|
onToggleOpen: t,
|
|
4390
|
-
children:
|
|
4615
|
+
children: r(vi, {})
|
|
4391
4616
|
})
|
|
4392
|
-
}),
|
|
4617
|
+
}), r("div", {
|
|
4393
4618
|
title: o.value ? "语音输入中..." : "语音输入",
|
|
4394
|
-
className: "".concat(
|
|
4395
|
-
onClick:
|
|
4396
|
-
children: o.value ?
|
|
4397
|
-
}), n.controller.isLoading.value ?
|
|
4619
|
+
className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", n.controller.isLoading.value)),
|
|
4620
|
+
onClick: c,
|
|
4621
|
+
children: o.value ? r(hi, {}) : r(di, {})
|
|
4622
|
+
}), n.controller.isLoading.value ? r("div", {
|
|
4398
4623
|
title: "停止生成",
|
|
4399
|
-
className: "".concat(
|
|
4624
|
+
className: "".concat(A.be("action-wrapper", "action-item")),
|
|
4400
4625
|
onClick: l,
|
|
4401
|
-
children:
|
|
4402
|
-
}) :
|
|
4626
|
+
children: r(wi, {})
|
|
4627
|
+
}) : r("div", {
|
|
4403
4628
|
title: "发送消息",
|
|
4404
|
-
className: "".concat(
|
|
4629
|
+
className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", h.value)),
|
|
4405
4630
|
onClick: p,
|
|
4406
|
-
children:
|
|
4631
|
+
children: r(ii, {})
|
|
4407
4632
|
})]
|
|
4408
4633
|
})]
|
|
4409
4634
|
})]
|
|
4410
4635
|
});
|
|
4411
4636
|
};
|
|
4412
|
-
const R = new
|
|
4637
|
+
const R = new k("chat-topic-item"), ds = (n) => {
|
|
4413
4638
|
const {
|
|
4414
4639
|
controller: e,
|
|
4415
4640
|
topic: t,
|
|
4416
4641
|
onClick: i,
|
|
4417
4642
|
onAction: s
|
|
4418
4643
|
} = n, o = P(null), a = B(() => {
|
|
4419
|
-
var
|
|
4420
|
-
return ((
|
|
4421
|
-
}), [
|
|
4644
|
+
var v;
|
|
4645
|
+
return ((v = e.activedTopic.value) == null ? void 0 : v.id) === t.id;
|
|
4646
|
+
}), [c, u] = K(!1), h = M(!1), p = (f) => {
|
|
4422
4647
|
f.stopPropagation(), s("LINK", f);
|
|
4423
|
-
}, l = (f,
|
|
4424
|
-
f === "DELETE" ? s("DELETE",
|
|
4648
|
+
}, l = (f, v) => {
|
|
4649
|
+
f === "DELETE" ? s("DELETE", v) : f === "RENAME" && (h.value = !0, setTimeout(() => {
|
|
4425
4650
|
var w;
|
|
4426
4651
|
(w = o.current) == null || w.focus();
|
|
4427
4652
|
}, 100)), u(!1);
|
|
4428
|
-
},
|
|
4429
|
-
var
|
|
4430
|
-
f.stopPropagation(), t.data.caption = (
|
|
4653
|
+
}, m = (f) => {
|
|
4654
|
+
var v;
|
|
4655
|
+
f.stopPropagation(), t.data.caption = (v = f.target) == null ? void 0 : v.value;
|
|
4431
4656
|
}, _ = (f) => {
|
|
4432
4657
|
f.stopPropagation(), h.value = !1, s("RENAME", f);
|
|
4433
4658
|
}, d = (f) => {
|
|
4434
4659
|
f.stopPropagation(), f.key === "Enter" && (h.value = !1);
|
|
4435
4660
|
};
|
|
4436
|
-
return
|
|
4661
|
+
return r("div", {
|
|
4437
4662
|
className: "".concat(R.b(), " ").concat(R.is("active", a.value), " ").concat(R.is("edit", h.value)),
|
|
4438
4663
|
onClick: i.bind(void 0),
|
|
4439
|
-
children: [
|
|
4664
|
+
children: [r("div", {
|
|
4440
4665
|
className: R.e("caption"),
|
|
4441
4666
|
title: t.caption,
|
|
4442
|
-
children: h.value ?
|
|
4667
|
+
children: h.value ? r("input", {
|
|
4443
4668
|
ref: o,
|
|
4444
4669
|
value: t.caption,
|
|
4445
4670
|
onBlur: _,
|
|
4446
4671
|
onKeyDown: d,
|
|
4447
4672
|
onClick: (f) => f.stopPropagation(),
|
|
4448
|
-
onChange: (f) =>
|
|
4673
|
+
onChange: (f) => m(f),
|
|
4449
4674
|
className: R.em("caption", "editor")
|
|
4450
|
-
}) :
|
|
4675
|
+
}) : r("span", {
|
|
4451
4676
|
className: R.em("caption", "text"),
|
|
4452
4677
|
children: t.caption
|
|
4453
4678
|
})
|
|
4454
|
-
}), !h.value &&
|
|
4679
|
+
}), !h.value && r("div", {
|
|
4455
4680
|
className: R.e("icon"),
|
|
4456
|
-
children: [
|
|
4681
|
+
children: [r("span", {
|
|
4457
4682
|
title: "跳转主视图",
|
|
4458
4683
|
className: R.em("icon", "item"),
|
|
4459
4684
|
onClick: p.bind(void 0),
|
|
4460
|
-
children:
|
|
4685
|
+
children: r(fi, {
|
|
4461
4686
|
className: R.b("link-icon")
|
|
4462
4687
|
})
|
|
4463
|
-
}), a.value ? null :
|
|
4688
|
+
}), a.value ? null : r(Mn, {
|
|
4464
4689
|
actions: [{
|
|
4465
4690
|
id: "RENAME",
|
|
4466
4691
|
caption: "重命名",
|
|
4467
|
-
icon:
|
|
4692
|
+
icon: r(Ti, {})
|
|
4468
4693
|
}, {
|
|
4469
4694
|
id: "DELETE",
|
|
4470
4695
|
caption: "删除话题",
|
|
4471
|
-
icon:
|
|
4696
|
+
icon: r(Tn, {})
|
|
4472
4697
|
}],
|
|
4473
4698
|
position: "bottom",
|
|
4474
|
-
isOpen:
|
|
4699
|
+
isOpen: c,
|
|
4475
4700
|
onToggleOpen: u,
|
|
4476
4701
|
onAction: l.bind(void 0),
|
|
4477
|
-
children:
|
|
4702
|
+
children: r("span", {
|
|
4478
4703
|
className: R.em("icon", "item"),
|
|
4479
4704
|
title: "更多",
|
|
4480
|
-
children:
|
|
4705
|
+
children: r(pi, {
|
|
4481
4706
|
className: R.e("more-icon")
|
|
4482
4707
|
})
|
|
4483
4708
|
})
|
|
@@ -4485,103 +4710,103 @@ const R = new M("chat-topic-item"), cs = (n) => {
|
|
|
4485
4710
|
})]
|
|
4486
4711
|
});
|
|
4487
4712
|
};
|
|
4488
|
-
const
|
|
4713
|
+
const Se = new k("chat-search"), hs = (n) => {
|
|
4489
4714
|
const {
|
|
4490
4715
|
className: e,
|
|
4491
4716
|
value: t,
|
|
4492
4717
|
placeholder: i,
|
|
4493
4718
|
onChange: s
|
|
4494
|
-
} = n, [o, a] = K(!1),
|
|
4719
|
+
} = n, [o, a] = K(!1), c = (u) => {
|
|
4495
4720
|
var h;
|
|
4496
4721
|
u.stopPropagation(), s == null || s((h = u.target) == null ? void 0 : h.value);
|
|
4497
4722
|
};
|
|
4498
|
-
return
|
|
4499
|
-
className: "".concat(
|
|
4500
|
-
children: [
|
|
4501
|
-
className:
|
|
4502
|
-
children:
|
|
4503
|
-
}),
|
|
4723
|
+
return r("div", {
|
|
4724
|
+
className: "".concat(Se.b(), " ").concat(Se.is("focus", o), " ").concat(e || ""),
|
|
4725
|
+
children: [r("div", {
|
|
4726
|
+
className: Se.e("prefix"),
|
|
4727
|
+
children: r(Si, {})
|
|
4728
|
+
}), r("input", {
|
|
4504
4729
|
value: t,
|
|
4505
|
-
className:
|
|
4730
|
+
className: Se.e("inner"),
|
|
4506
4731
|
placeholder: i,
|
|
4507
4732
|
onFocus: () => a(!0),
|
|
4508
4733
|
onBlur: () => a(!1),
|
|
4509
|
-
onChange: (u) =>
|
|
4734
|
+
onChange: (u) => c(u)
|
|
4510
4735
|
})]
|
|
4511
4736
|
});
|
|
4512
4737
|
};
|
|
4513
|
-
const se = new
|
|
4514
|
-
const e = P(null), t =
|
|
4515
|
-
|
|
4516
|
-
i.value = n.controller.topics.value.filter((
|
|
4738
|
+
const se = new k("chat-topics"), ps = (n) => {
|
|
4739
|
+
const e = P(null), t = M(void 0), i = M([]);
|
|
4740
|
+
I(() => {
|
|
4741
|
+
i.value = n.controller.topics.value.filter((c) => {
|
|
4517
4742
|
var u, h;
|
|
4518
|
-
return (h =
|
|
4743
|
+
return (h = c.caption) == null ? void 0 : h.toLowerCase().includes(((u = t.value) == null ? void 0 : u.trim().toLowerCase()) || "");
|
|
4519
4744
|
});
|
|
4520
4745
|
}, [n.controller.topics.value]);
|
|
4521
|
-
const s = (
|
|
4522
|
-
n.controller.handleTopicChange(
|
|
4523
|
-
}, o = (
|
|
4524
|
-
n.controller.handleTopicAction(
|
|
4525
|
-
}, a = (
|
|
4526
|
-
t.value =
|
|
4746
|
+
const s = (c) => {
|
|
4747
|
+
n.controller.handleTopicChange(c);
|
|
4748
|
+
}, o = (c, u, h) => {
|
|
4749
|
+
n.controller.handleTopicAction(c, u, h);
|
|
4750
|
+
}, a = (c) => {
|
|
4751
|
+
t.value = c, i.value = n.controller.topics.value.filter((u) => {
|
|
4527
4752
|
var h, p;
|
|
4528
4753
|
return (p = u.caption) == null ? void 0 : p.toLowerCase().includes(((h = t.value) == null ? void 0 : h.trim().toLowerCase()) || "");
|
|
4529
4754
|
});
|
|
4530
4755
|
};
|
|
4531
|
-
return
|
|
4532
|
-
const
|
|
4533
|
-
if (!
|
|
4756
|
+
return I(() => {
|
|
4757
|
+
const c = e.current;
|
|
4758
|
+
if (!c)
|
|
4534
4759
|
return;
|
|
4535
|
-
const u =
|
|
4760
|
+
const u = c.querySelector(".ibiz-chat-topic-item.is-active");
|
|
4536
4761
|
u == null || u.scrollIntoView({
|
|
4537
4762
|
behavior: "smooth",
|
|
4538
4763
|
block: "nearest"
|
|
4539
4764
|
});
|
|
4540
|
-
}, [n.controller.activedTopic.value]),
|
|
4765
|
+
}, [n.controller.activedTopic.value]), r("div", {
|
|
4541
4766
|
className: se.b(),
|
|
4542
|
-
children: [
|
|
4767
|
+
children: [r("div", {
|
|
4543
4768
|
className: se.e("header"),
|
|
4544
|
-
children:
|
|
4769
|
+
children: r(hs, {
|
|
4545
4770
|
value: t.value,
|
|
4546
4771
|
placeholder: "搜索话题",
|
|
4547
4772
|
onChange: a.bind(void 0)
|
|
4548
4773
|
})
|
|
4549
|
-
}),
|
|
4774
|
+
}), r("div", {
|
|
4550
4775
|
ref: e,
|
|
4551
4776
|
className: se.e("main"),
|
|
4552
|
-
children: i.value && i.value.length > 0 ? i.value.map((
|
|
4553
|
-
topic:
|
|
4777
|
+
children: i.value && i.value.length > 0 ? i.value.map((c) => r(ds, {
|
|
4778
|
+
topic: c,
|
|
4554
4779
|
controller: n.controller,
|
|
4555
|
-
onClick: () => s(
|
|
4556
|
-
onAction: (u, h) => o(u,
|
|
4557
|
-
},
|
|
4780
|
+
onClick: () => s(c),
|
|
4781
|
+
onAction: (u, h) => o(u, c, h)
|
|
4782
|
+
}, c.id)) : r("div", {
|
|
4558
4783
|
className: se.e("empty"),
|
|
4559
4784
|
children: "暂无话题"
|
|
4560
4785
|
})
|
|
4561
|
-
}),
|
|
4786
|
+
}), r("div", {
|
|
4562
4787
|
className: se.e("footer"),
|
|
4563
|
-
children:
|
|
4788
|
+
children: r("div", {
|
|
4564
4789
|
title: "清空会话",
|
|
4565
4790
|
className: se.e("action"),
|
|
4566
4791
|
onClick: () => n.controller.clearTopic(),
|
|
4567
|
-
children: [
|
|
4792
|
+
children: [r(Tn, {}), r("span", {
|
|
4568
4793
|
children: "清空会话"
|
|
4569
4794
|
})]
|
|
4570
4795
|
})
|
|
4571
4796
|
})]
|
|
4572
4797
|
});
|
|
4573
4798
|
};
|
|
4574
|
-
const oe = new
|
|
4575
|
-
const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1),
|
|
4799
|
+
const oe = new k("chat-minimize"), fs = (n) => {
|
|
4800
|
+
const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1), c = {
|
|
4576
4801
|
x: (window.innerWidth - 86) / window.innerWidth,
|
|
4577
4802
|
y: (window.innerHeight - 86) / window.innerHeight
|
|
4578
4803
|
}, u = B(() => {
|
|
4579
4804
|
const d = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
4580
4805
|
return d ? d.role === "ASSISTANT" && d.state === 20 && d.completed !== !0 : !1;
|
|
4581
4806
|
}), h = (d) => {
|
|
4582
|
-
const f = d.indexOf("<think>"),
|
|
4807
|
+
const f = d.indexOf("<think>"), v = d.indexOf("</think>");
|
|
4583
4808
|
let w = "", g = "";
|
|
4584
|
-
return
|
|
4809
|
+
return v === -1 ? (w = d.slice(f + 7), g = "") : (w = d.slice(f + 7, v), g = d.slice(v + 8)), {
|
|
4585
4810
|
thoughtContent: w,
|
|
4586
4811
|
answerContent: g
|
|
4587
4812
|
};
|
|
@@ -4592,69 +4817,69 @@ const oe = new M("chat-minimize"), ds = (n) => {
|
|
|
4592
4817
|
const f = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
4593
4818
|
if (d = f.content, f.content.indexOf("<think>") !== -1) {
|
|
4594
4819
|
const {
|
|
4595
|
-
thoughtContent:
|
|
4820
|
+
thoughtContent: v,
|
|
4596
4821
|
answerContent: w
|
|
4597
4822
|
} = h(f.content);
|
|
4598
|
-
d =
|
|
4823
|
+
d = v + w;
|
|
4599
4824
|
}
|
|
4600
4825
|
return d;
|
|
4601
4826
|
}), l = () => {
|
|
4602
4827
|
Object.assign(e.current.style, {
|
|
4603
|
-
left: "".concat(
|
|
4604
|
-
top: "".concat(
|
|
4605
|
-
}), localStorage.setItem(E.MINIMIZE_STYLY_CHCHE, JSON.stringify(
|
|
4606
|
-
},
|
|
4828
|
+
left: "".concat(c.x * 100, "%"),
|
|
4829
|
+
top: "".concat(c.y * 100, "%")
|
|
4830
|
+
}), localStorage.setItem(E.MINIMIZE_STYLY_CHCHE, JSON.stringify(c));
|
|
4831
|
+
}, m = () => {
|
|
4607
4832
|
const d = e.current;
|
|
4608
4833
|
d && (d.onmousedown = (f) => {
|
|
4609
4834
|
document.body.style.userSelect = "none";
|
|
4610
|
-
const
|
|
4835
|
+
const v = f.clientX - d.offsetLeft, w = f.clientY - d.offsetTop, g = Date.now(), C = (x) => {
|
|
4611
4836
|
const O = 56 / window.innerWidth, L = 56 / window.innerHeight, {
|
|
4612
4837
|
x: U,
|
|
4613
4838
|
y: z
|
|
4614
|
-
} = rn(x.clientX -
|
|
4615
|
-
Object.assign(
|
|
4839
|
+
} = rn(x.clientX - v, x.clientY - w, O, L);
|
|
4840
|
+
Object.assign(c, {
|
|
4616
4841
|
x: U,
|
|
4617
4842
|
y: z
|
|
4618
4843
|
}), requestAnimationFrame(() => {
|
|
4619
4844
|
l();
|
|
4620
4845
|
});
|
|
4621
|
-
},
|
|
4846
|
+
}, T = () => {
|
|
4622
4847
|
const x = Date.now();
|
|
4623
|
-
a.current = x - g > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove",
|
|
4848
|
+
a.current = x - g > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", T);
|
|
4624
4849
|
};
|
|
4625
|
-
document.addEventListener("mousemove",
|
|
4850
|
+
document.addEventListener("mousemove", C), document.addEventListener("mouseup", T);
|
|
4626
4851
|
});
|
|
4627
4852
|
}, _ = () => {
|
|
4628
4853
|
a.current || n.onClick();
|
|
4629
4854
|
};
|
|
4630
|
-
return
|
|
4855
|
+
return I(() => {
|
|
4631
4856
|
const d = localStorage.getItem(E.MINIMIZE_STYLY_CHCHE);
|
|
4632
4857
|
if (d) {
|
|
4633
4858
|
const f = JSON.parse(d);
|
|
4634
|
-
|
|
4859
|
+
Ge(f) && Object.assign(c, f);
|
|
4635
4860
|
}
|
|
4636
|
-
l(),
|
|
4637
|
-
}, []),
|
|
4861
|
+
l(), m();
|
|
4862
|
+
}, []), I(() => {
|
|
4638
4863
|
if (s < p.value.length) {
|
|
4639
4864
|
const d = setTimeout(() => {
|
|
4640
4865
|
i((f) => f + p.value[s]), o((f) => f + 1);
|
|
4641
4866
|
}, 100);
|
|
4642
4867
|
return () => clearTimeout(d);
|
|
4643
4868
|
}
|
|
4644
|
-
}, [s, p.value]),
|
|
4869
|
+
}, [s, p.value]), r("div", {
|
|
4645
4870
|
ref: e,
|
|
4646
4871
|
title: n.title,
|
|
4647
4872
|
className: "".concat(oe.b(), " ").concat(oe.is("hidden", !n.isMinimize), " ").concat(oe.is("show-halo", u.value)),
|
|
4648
4873
|
onClick: _,
|
|
4649
|
-
children:
|
|
4874
|
+
children: r("div", {
|
|
4650
4875
|
className: "".concat(oe.e("content"), " ").concat(oe.is("show-border", !u.value)),
|
|
4651
|
-
children: [t &&
|
|
4876
|
+
children: [t && r("div", {
|
|
4652
4877
|
className: "".concat(oe.em("content", "popover")),
|
|
4653
|
-
children:
|
|
4878
|
+
children: r("div", {
|
|
4654
4879
|
className: "typewriter",
|
|
4655
4880
|
children: t
|
|
4656
4881
|
})
|
|
4657
|
-
}),
|
|
4882
|
+
}), r(li, {})]
|
|
4658
4883
|
})
|
|
4659
4884
|
});
|
|
4660
4885
|
};
|
|
@@ -4664,11 +4889,11 @@ const rt = Bn({
|
|
|
4664
4889
|
newTopic: () => {
|
|
4665
4890
|
}
|
|
4666
4891
|
});
|
|
4667
|
-
var Ut, Wt,
|
|
4892
|
+
var Ut, Wt, jt, Vt;
|
|
4668
4893
|
class Ft extends F {
|
|
4669
4894
|
constructor(t) {
|
|
4670
4895
|
super(t);
|
|
4671
|
-
S(this, "ns", new
|
|
4896
|
+
S(this, "ns", new k("chat-container"));
|
|
4672
4897
|
S(this, "containerRef", lt());
|
|
4673
4898
|
S(this, "dragHandle", lt());
|
|
4674
4899
|
/**
|
|
@@ -4716,7 +4941,7 @@ class Ft extends F {
|
|
|
4716
4941
|
*/
|
|
4717
4942
|
S(this, "containerContext", {
|
|
4718
4943
|
zIndex: ((Ut = this.props.containerOptions) == null ? void 0 : Ut.zIndex) || 10,
|
|
4719
|
-
enableBackFill: ((Wt = this.props) == null ? void 0 : Wt.enableBackFill) !== void 0 && ((
|
|
4944
|
+
enableBackFill: ((Wt = this.props) == null ? void 0 : Wt.enableBackFill) !== void 0 && ((jt = this.props) == null ? void 0 : jt.enableBackFill) !== null ? (Vt = this.props) == null ? void 0 : Vt.enableBackFill : !0,
|
|
4720
4945
|
newTopic: () => {
|
|
4721
4946
|
this.props.aiTopic.newTopic();
|
|
4722
4947
|
}
|
|
@@ -4781,9 +5006,9 @@ class Ft extends F {
|
|
|
4781
5006
|
x: s,
|
|
4782
5007
|
y: o,
|
|
4783
5008
|
width: a,
|
|
4784
|
-
height:
|
|
5009
|
+
height: c
|
|
4785
5010
|
} = this.data.window;
|
|
4786
|
-
s < t || s + a > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o +
|
|
5011
|
+
s < t || s + a > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o + c > 1 - i && (this.data.window.y = 1 - c)), this.setStyle();
|
|
4787
5012
|
}
|
|
4788
5013
|
/**
|
|
4789
5014
|
* 注册对话框拖拽
|
|
@@ -4795,14 +5020,14 @@ class Ft extends F {
|
|
|
4795
5020
|
if (this.state.isFullScreen)
|
|
4796
5021
|
return;
|
|
4797
5022
|
document.body.style.userSelect = "none";
|
|
4798
|
-
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (
|
|
5023
|
+
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (c) => {
|
|
4799
5024
|
if (this.disabled)
|
|
4800
5025
|
return;
|
|
4801
5026
|
this.data.showMode = "window";
|
|
4802
5027
|
const {
|
|
4803
5028
|
x: u,
|
|
4804
5029
|
y: h
|
|
4805
|
-
} = rn(
|
|
5030
|
+
} = rn(c.clientX - i, c.clientY - s, this.data.window.width, this.data.window.height);
|
|
4806
5031
|
Object.assign(this.data.window, {
|
|
4807
5032
|
x: u,
|
|
4808
5033
|
y: h
|
|
@@ -4873,7 +5098,7 @@ class Ft extends F {
|
|
|
4873
5098
|
const t = localStorage.getItem(E.STYLE_CACHE);
|
|
4874
5099
|
if (t) {
|
|
4875
5100
|
const i = JSON.parse(t);
|
|
4876
|
-
i.side &&
|
|
5101
|
+
i.side && Ge(i.side) && i.window && Ge(i.window) && Object.assign(this.data, i);
|
|
4877
5102
|
}
|
|
4878
5103
|
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
4879
5104
|
}
|
|
@@ -4938,101 +5163,101 @@ class Ft extends F {
|
|
|
4938
5163
|
t.stopPropagation();
|
|
4939
5164
|
}
|
|
4940
5165
|
render() {
|
|
4941
|
-
return
|
|
5166
|
+
return r(rt.Provider, {
|
|
4942
5167
|
value: this.containerContext,
|
|
4943
|
-
children:
|
|
5168
|
+
children: r("div", {
|
|
4944
5169
|
className: "".concat(this.ns.b()),
|
|
4945
|
-
children: [
|
|
5170
|
+
children: [r("div", {
|
|
4946
5171
|
className: "".concat(this.ns.e("dialog"), " ").concat(this.ns.is("full-screen", this.state.isFullScreen), " ").concat(this.ns.is("hidden", this.state.isMinimize)),
|
|
4947
5172
|
ref: this.containerRef,
|
|
4948
|
-
children: [
|
|
5173
|
+
children: [r("div", {
|
|
4949
5174
|
ref: this.dragHandle,
|
|
4950
5175
|
className: this.ns.b("header"),
|
|
4951
|
-
children: [
|
|
5176
|
+
children: [r("div", {
|
|
4952
5177
|
className: this.ns.b("header-caption"),
|
|
4953
5178
|
children: this.props.caption || "AI助手"
|
|
4954
|
-
}),
|
|
5179
|
+
}), r("div", {
|
|
4955
5180
|
className: this.ns.b("header-action-wrapper"),
|
|
4956
|
-
children: [
|
|
5181
|
+
children: [r("div", {
|
|
4957
5182
|
title: "最小化",
|
|
4958
5183
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
|
|
4959
5184
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4960
5185
|
onClick: this.minimize.bind(this),
|
|
4961
|
-
children:
|
|
4962
|
-
}), this.state.isFullScreen ?
|
|
5186
|
+
children: r(ci, {})
|
|
5187
|
+
}), this.state.isFullScreen ? r("div", {
|
|
4963
5188
|
title: "退出全屏",
|
|
4964
5189
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "close-full-screen")),
|
|
4965
5190
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4966
5191
|
onClick: this.closeFullScreen.bind(this),
|
|
4967
|
-
children:
|
|
4968
|
-
}) :
|
|
5192
|
+
children: r(ri, {})
|
|
5193
|
+
}) : r("div", {
|
|
4969
5194
|
title: "全屏",
|
|
4970
5195
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
|
|
4971
5196
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4972
5197
|
onClick: this.fullScreen.bind(this),
|
|
4973
|
-
children:
|
|
4974
|
-
}),
|
|
5198
|
+
children: r(ai, {})
|
|
5199
|
+
}), r("div", {
|
|
4975
5200
|
title: "关闭",
|
|
4976
5201
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
|
|
4977
5202
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4978
5203
|
onClick: this.close.bind(this),
|
|
4979
|
-
children:
|
|
5204
|
+
children: r(ti, {})
|
|
4980
5205
|
})]
|
|
4981
5206
|
})]
|
|
4982
|
-
}), this.props.mode === "TOPIC" ?
|
|
5207
|
+
}), this.props.mode === "TOPIC" ? r("div", {
|
|
4983
5208
|
className: "".concat(this.ns.b("main")),
|
|
4984
|
-
children: [
|
|
5209
|
+
children: [r("div", {
|
|
4985
5210
|
className: "".concat(this.ns.be("main", "left")),
|
|
4986
|
-
children:
|
|
5211
|
+
children: r(ps, {
|
|
4987
5212
|
controller: this.props.aiTopic
|
|
4988
5213
|
})
|
|
4989
|
-
}),
|
|
5214
|
+
}), r("div", {
|
|
4990
5215
|
className: "".concat(this.ns.be("main", "right")),
|
|
4991
|
-
children: [
|
|
5216
|
+
children: [r("div", {
|
|
4992
5217
|
className: this.ns.b("content"),
|
|
4993
|
-
children:
|
|
5218
|
+
children: r(kt, {
|
|
4994
5219
|
controller: this.props.aiChat,
|
|
4995
5220
|
toolbarItems: this.props.contentToolbarItems
|
|
4996
5221
|
})
|
|
4997
|
-
}),
|
|
5222
|
+
}), r(et, {
|
|
4998
5223
|
type: "footer",
|
|
4999
5224
|
mode: this.props.mode,
|
|
5000
5225
|
data: this.props.aiTopic.activedTopic.value,
|
|
5001
5226
|
className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is("has-materials", this.props.aiChat.materials.value.length > 0)),
|
|
5002
5227
|
controller: this.props.aiChat,
|
|
5003
5228
|
items: this.props.footerToolbarItems
|
|
5004
|
-
}),
|
|
5229
|
+
}), r("div", {
|
|
5005
5230
|
className: this.ns.b("footer"),
|
|
5006
|
-
children:
|
|
5231
|
+
children: r(Rt, {
|
|
5007
5232
|
controller: this.props.aiChat,
|
|
5008
5233
|
questionToolbarItems: this.props.questionToolbarItems
|
|
5009
5234
|
})
|
|
5010
5235
|
})]
|
|
5011
5236
|
})]
|
|
5012
|
-
}) :
|
|
5237
|
+
}) : r("div", {
|
|
5013
5238
|
className: "".concat(this.ns.be("main", "default")),
|
|
5014
|
-
children: [
|
|
5239
|
+
children: [r("div", {
|
|
5015
5240
|
className: this.ns.b("content"),
|
|
5016
|
-
children:
|
|
5241
|
+
children: r(kt, {
|
|
5017
5242
|
controller: this.props.aiChat,
|
|
5018
5243
|
toolbarItems: this.props.contentToolbarItems
|
|
5019
5244
|
})
|
|
5020
|
-
}),
|
|
5245
|
+
}), r(et, {
|
|
5021
5246
|
type: "footer",
|
|
5022
5247
|
mode: this.props.mode,
|
|
5023
5248
|
data: this.props.aiTopic.activedTopic.value,
|
|
5024
5249
|
className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is("has-materials", this.props.aiChat.materials.value.length > 0)),
|
|
5025
5250
|
controller: this.props.aiChat,
|
|
5026
5251
|
items: this.props.footerToolbarItems
|
|
5027
|
-
}),
|
|
5252
|
+
}), r("div", {
|
|
5028
5253
|
className: this.ns.b("footer"),
|
|
5029
|
-
children:
|
|
5254
|
+
children: r(Rt, {
|
|
5030
5255
|
controller: this.props.aiChat,
|
|
5031
5256
|
questionToolbarItems: this.props.questionToolbarItems
|
|
5032
5257
|
})
|
|
5033
5258
|
})]
|
|
5034
5259
|
})]
|
|
5035
|
-
}),
|
|
5260
|
+
}), r(fs, {
|
|
5036
5261
|
title: this.props.caption || "AI助手",
|
|
5037
5262
|
controller: this.props.aiChat,
|
|
5038
5263
|
isMinimize: this.state.isMinimize,
|
|
@@ -5044,5 +5269,5 @@ class Ft extends F {
|
|
|
5044
5269
|
}
|
|
5045
5270
|
export {
|
|
5046
5271
|
Ft as ChatContainer,
|
|
5047
|
-
|
|
5272
|
+
gs as chat
|
|
5048
5273
|
};
|