@ibiz-template-plugin/ai-chat 0.0.27 → 0.0.29
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 +552 -481
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +6 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/util/text-hash-util.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
var An = Object.defineProperty;
|
|
3
|
+
var In = (n, e, t) => e in n ? An(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
+
var S = (n, e, t) => (In(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
5
|
import Pe from "interactjs";
|
|
6
|
-
import
|
|
7
|
-
var Le,
|
|
6
|
+
import qt from "cherry-markdown";
|
|
7
|
+
var Le, b, Yt, Xt, ne, ct, Zt, Xe, Gt, re = {}, Jt = [], Dn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
|
|
8
8
|
function G(n, e) {
|
|
9
9
|
for (var t in e)
|
|
10
10
|
n[t] = e[t];
|
|
11
11
|
return n;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Kt(n) {
|
|
14
14
|
var e = n.parentNode;
|
|
15
15
|
e && e.removeChild(n);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function q(n, e, t) {
|
|
18
18
|
var i, s, o, a = {};
|
|
19
19
|
for (o in e)
|
|
20
20
|
o == "key" ? i = e[o] : o == "ref" ? s = e[o] : a[o] = e[o];
|
|
21
21
|
if (arguments.length > 2 && (a.children = arguments.length > 3 ? Le.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
|
|
22
22
|
for (o in n.defaultProps)
|
|
23
23
|
a[o] === void 0 && (a[o] = n.defaultProps[o]);
|
|
24
|
-
return
|
|
24
|
+
return ke(n, a, i, s, null);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++
|
|
28
|
-
return s == null &&
|
|
26
|
+
function ke(n, e, t, i, s) {
|
|
27
|
+
var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++Yt : s };
|
|
28
|
+
return s == null && b.vnode != null && b.vnode(o), o;
|
|
29
29
|
}
|
|
30
30
|
function lt() {
|
|
31
31
|
return { current: null };
|
|
@@ -36,15 +36,15 @@ function Y(n) {
|
|
|
36
36
|
function F(n, e) {
|
|
37
37
|
this.props = n, this.context = e;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function we(n, e) {
|
|
40
40
|
if (e == null)
|
|
41
|
-
return n.__ ?
|
|
41
|
+
return n.__ ? we(n.__, n.__.__k.indexOf(n) + 1) : null;
|
|
42
42
|
for (var t; e < n.__k.length; e++)
|
|
43
43
|
if ((t = n.__k[e]) != null && t.__e != null)
|
|
44
44
|
return t.__d || t.__e;
|
|
45
|
-
return typeof n.type == "function" ?
|
|
45
|
+
return typeof n.type == "function" ? we(n) : null;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Qt(n) {
|
|
48
48
|
var e, t;
|
|
49
49
|
if ((n = n.__) != null && n.__c != null) {
|
|
50
50
|
for (n.__e = n.__c.base = null, e = 0; e < n.__k.length; e++)
|
|
@@ -52,39 +52,39 @@ function Jt(n) {
|
|
|
52
52
|
n.__e = n.__c.base = t.__e;
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return 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) && !Me.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) || Zt)(Me);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Me() {
|
|
62
62
|
var n, e, t, i, s, o, a, r, 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, r = (a = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = G({}, a)).__v = a.__v + 1, tt(u, a, o, t.__n, u.ownerSVGElement !== void 0, a.__h != null ? [r] : null, i, r == null ?
|
|
65
|
-
|
|
64
|
+
n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0, r = (a = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = G({}, a)).__v = a.__v + 1, tt(u, a, o, t.__n, u.ownerSVGElement !== void 0, a.__h != null ? [r] : null, i, r == null ? we(a) : r, a.__h, s), sn(i, a, s), a.__e != r && Qt(a)), ne.length > e && ne.sort(Xe));
|
|
65
|
+
Me.__r = 0;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
var l, v, _, d, f, m,
|
|
67
|
+
function en(n, e, t, i, s, o, a, r, u, h, p) {
|
|
68
|
+
var l, v, _, d, f, m, w, g, T, C = 0, x = i && i.__k || Jt, 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" ?
|
|
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 + C, L)) === -1 ? _ = re : (_ = x[g] || re, x[g] = void 0, L--), tt(n, d, _, s, o, a, r, u, h, p), f = d.__e, (v = d.ref) && _.ref != v && (_.ref && nt(_.ref, null, d), p.push(v, d.__c || f, d)), f != null && (m == null && (m = f), (T = _ === re || _.__v === null) ? g == -1 && C-- : g !== w && (g === w + 1 ? C++ : g > w ? L > U - w ? C += g - w : C-- : C = g < w && g == w - 1 ? g - w : 0), w = l + C, typeof d.type != "function" || g === w && _.__k !== d.__k ? typeof d.type == "function" || g === w && !T ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = 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(_)), Ge(_, _, !1), x[l] = null);
|
|
71
71
|
for (t.__e = m, l = O; l--; )
|
|
72
|
-
|
|
72
|
+
x[l] != null && (typeof t.type == "function" && x[l].__e != null && x[l].__e == t.__d && (t.__d = x[l].__e.nextSibling), Ge(x[l], x[l]));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function tn(n, e, t) {
|
|
75
75
|
for (var i, s = n.__k, o = 0; s && o < s.length; o++)
|
|
76
|
-
(i = s[o]) && (i.__ = n, e = typeof i.type == "function" ?
|
|
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 $e(n, e) {
|
|
80
80
|
return e = e || [], n == null || typeof n == "boolean" || (ze(n) ? n.some(function(t) {
|
|
81
|
-
|
|
81
|
+
$e(t, e);
|
|
82
82
|
}) : e.push(n)), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
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
|
-
function
|
|
87
|
+
function Ln(n, e, t, i) {
|
|
88
88
|
var s = n.key, o = n.type, a = t - 1, r = t + 1, u = e[t];
|
|
89
89
|
if (u === null || u && s == u.key && o === u.type)
|
|
90
90
|
return t;
|
|
@@ -103,17 +103,17 @@ function En(n, e, t, i) {
|
|
|
103
103
|
}
|
|
104
104
|
return -1;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function zn(n, e, t, i, s) {
|
|
107
107
|
var o;
|
|
108
108
|
for (o in t)
|
|
109
|
-
o === "children" || o === "key" || o in e ||
|
|
109
|
+
o === "children" || o === "key" || o in e || Ae(n, o, null, t[o], i);
|
|
110
110
|
for (o in e)
|
|
111
|
-
s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] ||
|
|
111
|
+
s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] || Ae(n, o, e[o], t[o], i);
|
|
112
112
|
}
|
|
113
113
|
function ut(n, e, t) {
|
|
114
|
-
e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" ||
|
|
114
|
+
e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Dn.test(e) ? t : t + "px";
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Ae(n, e, t, i, s) {
|
|
117
117
|
var o;
|
|
118
118
|
e:
|
|
119
119
|
if (e === "style")
|
|
@@ -148,64 +148,64 @@ function dt(n) {
|
|
|
148
148
|
return;
|
|
149
149
|
} else
|
|
150
150
|
n.t = Date.now();
|
|
151
|
-
return e(
|
|
151
|
+
return e(b.event ? b.event(n) : n);
|
|
152
152
|
}
|
|
153
153
|
function ht(n) {
|
|
154
|
-
return this.l[n.type + !0](
|
|
154
|
+
return this.l[n.type + !0](b.event ? b.event(n) : n);
|
|
155
155
|
}
|
|
156
156
|
function tt(n, e, t, i, s, o, a, r, u, h) {
|
|
157
|
-
var p, l, v, _, d, f, m,
|
|
157
|
+
var p, l, v, _, d, f, m, w, g, T, C, 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, r = e.__e = t.__e, e.__h = null, o = [r]), (p =
|
|
160
|
+
t.__h != null && (u = t.__h, r = e.__e = t.__e, e.__h = null, o = [r]), (p = b.__b) && p(e);
|
|
161
161
|
e:
|
|
162
162
|
if (typeof z == "function")
|
|
163
163
|
try {
|
|
164
|
-
if (
|
|
164
|
+
if (w = e.props, g = (p = z.contextType) && i[p.__c], T = p ? g ? g.props.value : p.__ : i, t.__c ? m = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(w, T) : (e.__c = l = new F(w, T), l.constructor = z, l.render = On), g && g.sub(l), l.props = w, l.state || (l.state = {}), l.context = T, l.__n = i, v = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = G({}, l.__s)), G(l.__s, z.getDerivedStateFromProps(w, l.__s))), _ = l.props, d = l.state, l.__v = e, v)
|
|
165
165
|
z.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), l.componentDidMount != null && l.__h.push(l.componentDidMount);
|
|
166
166
|
else {
|
|
167
|
-
if (z.getDerivedStateFromProps == null &&
|
|
168
|
-
for (e.__v !== t.__v && (l.props =
|
|
169
|
-
|
|
167
|
+
if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, T), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, T) === !1 || e.__v === t.__v)) {
|
|
168
|
+
for (e.__v !== t.__v && (l.props = w, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(Ce) {
|
|
169
|
+
Ce && (Ce.__ = e);
|
|
170
170
|
}), C = 0; C < l._sb.length; C++)
|
|
171
171
|
l.__h.push(l._sb[C]);
|
|
172
172
|
l._sb = [], l.__h.length && a.push(l);
|
|
173
173
|
break e;
|
|
174
174
|
}
|
|
175
|
-
l.componentWillUpdate != null && l.componentWillUpdate(
|
|
175
|
+
l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s, T), l.componentDidUpdate != null && l.__h.push(function() {
|
|
176
176
|
l.componentDidUpdate(_, d, f);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
if (l.context = T, l.props =
|
|
180
|
-
for (l.state = l.__s, l.__d = !1,
|
|
179
|
+
if (l.context = T, l.props = w, l.__P = n, l.__e = !1, x = b.__r, O = 0, "prototype" in z && z.prototype.render) {
|
|
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 = [];
|
|
183
183
|
} else
|
|
184
184
|
do
|
|
185
|
-
l.__d = !1,
|
|
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 = G(G({}, i), l.getChildContext())), v || l.getSnapshotBeforeUpdate == null || (f = l.getSnapshotBeforeUpdate(_, d)),
|
|
188
|
-
} catch (
|
|
189
|
-
e.__v = null, (u || o != null) && (e.__e = r, e.__h = !!u, o[o.indexOf(r)] = null),
|
|
187
|
+
l.state = l.__s, l.getChildContext != null && (i = G(G({}, i), l.getChildContext())), v || 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, r, u, h), l.base = e.__e, e.__h = null, l.__h.length && a.push(l), m && (l.__E = l.__ = null);
|
|
188
|
+
} catch (Ce) {
|
|
189
|
+
e.__v = null, (u || o != null) && (e.__e = r, e.__h = !!u, o[o.indexOf(r)] = null), b.__e(Ce, e, t);
|
|
190
190
|
}
|
|
191
191
|
else
|
|
192
|
-
o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e =
|
|
193
|
-
(p =
|
|
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);
|
|
193
|
+
(p = b.diffed) && p(e);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function sn(n, e, t) {
|
|
196
196
|
for (var i = 0; i < t.length; i++)
|
|
197
197
|
nt(t[i], t[++i], t[++i]);
|
|
198
|
-
|
|
198
|
+
b.__c && b.__c(e, n), n.some(function(s) {
|
|
199
199
|
try {
|
|
200
200
|
n = s.__h, s.__h = [], n.some(function(o) {
|
|
201
201
|
o.call(s);
|
|
202
202
|
});
|
|
203
203
|
} catch (o) {
|
|
204
|
-
|
|
204
|
+
b.__e(o, s.__v);
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Hn(n, e, t, i, s, o, a, r, u) {
|
|
209
209
|
var h, p, l, v = 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++)
|
|
@@ -228,12 +228,12 @@ function $n(n, e, t, i, s, o, a, r, u) {
|
|
|
228
228
|
v[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 (
|
|
231
|
+
if (zn(n, _, v, s, r), l)
|
|
232
232
|
e.__k = [];
|
|
233
|
-
else if (
|
|
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), r, u), o != null)
|
|
234
234
|
for (f = o.length; f--; )
|
|
235
|
-
o[f] != null &&
|
|
236
|
-
r || ("value" in _ && (f = _.value) !== void 0 && (f !== n.value || d === "progress" && !f || d === "option" && f !== v.value) &&
|
|
235
|
+
o[f] != null && Kt(o[f]);
|
|
236
|
+
r || ("value" in _ && (f = _.value) !== void 0 && (f !== n.value || d === "progress" && !f || d === "option" && f !== v.value) && Ae(n, "value", f, v.value, !1), "checked" in _ && (f = _.checked) !== void 0 && f !== n.checked && Ae(n, "checked", f, v.checked, !1));
|
|
237
237
|
}
|
|
238
238
|
return n;
|
|
239
239
|
}
|
|
@@ -241,34 +241,34 @@ function nt(n, e, t) {
|
|
|
241
241
|
try {
|
|
242
242
|
typeof n == "function" ? n(e) : n.current = e;
|
|
243
243
|
} catch (i) {
|
|
244
|
-
|
|
244
|
+
b.__e(i, t);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
function Ge(n, e, t) {
|
|
248
248
|
var i, s;
|
|
249
|
-
if (
|
|
249
|
+
if (b.unmount && b.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || nt(i, null, e)), (i = n.__c) != null) {
|
|
250
250
|
if (i.componentWillUnmount)
|
|
251
251
|
try {
|
|
252
252
|
i.componentWillUnmount();
|
|
253
253
|
} catch (o) {
|
|
254
|
-
|
|
254
|
+
b.__e(o, e);
|
|
255
255
|
}
|
|
256
256
|
i.base = i.__P = null, n.__c = void 0;
|
|
257
257
|
}
|
|
258
258
|
if (i = n.__k)
|
|
259
259
|
for (s = 0; s < i.length; s++)
|
|
260
260
|
i[s] && Ge(i[s], e, t || typeof n.type != "function");
|
|
261
|
-
t || n.__e == null ||
|
|
261
|
+
t || n.__e == null || Kt(n.__e), n.__ = n.__e = n.__d = void 0;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function On(n, e, t) {
|
|
264
264
|
return this.constructor(n, t);
|
|
265
265
|
}
|
|
266
266
|
function ae(n, e, t) {
|
|
267
267
|
var i, s, o, a;
|
|
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
|
-
function
|
|
271
|
-
var t = { __c: e = "__cC" +
|
|
270
|
+
function Bn(n, e) {
|
|
271
|
+
var t = { __c: e = "__cC" + Gt++, __: n, Consumer: function(i, s) {
|
|
272
272
|
return i.children(s);
|
|
273
273
|
}, Provider: function(i) {
|
|
274
274
|
var s, o;
|
|
@@ -288,7 +288,7 @@ function In(n, e) {
|
|
|
288
288
|
} };
|
|
289
289
|
return t.Provider.__ = t.Consumer.contextType = t;
|
|
290
290
|
}
|
|
291
|
-
Le =
|
|
291
|
+
Le = Jt.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 {
|
|
@@ -298,17 +298,17 @@ Le = Zt.slice, w = { __e: function(n, e, t, i) {
|
|
|
298
298
|
n = r;
|
|
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
305
|
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = G({}, this.state), typeof n == "function" && (n = n(G({}, t), this.props)), n && G(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
|
-
}, F.prototype.render = Y, ne = [],
|
|
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
|
-
},
|
|
311
|
-
const
|
|
310
|
+
}, Me.__r = 0, Gt = 0;
|
|
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;
|
|
@@ -330,8 +330,8 @@ class M {
|
|
|
330
330
|
* @date 2023-11-03 10:11:31
|
|
331
331
|
* @type {string}
|
|
332
332
|
*/
|
|
333
|
-
|
|
334
|
-
this.block = e, this.namespace = t ||
|
|
333
|
+
S(this, "namespace");
|
|
334
|
+
this.block = e, this.namespace = t || Pn;
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
337
337
|
* namespace-block
|
|
@@ -429,7 +429,7 @@ class M {
|
|
|
429
429
|
* @return {*} {string}
|
|
430
430
|
*/
|
|
431
431
|
is(e, t) {
|
|
432
|
-
return e && t ? "".concat(
|
|
432
|
+
return e && t ? "".concat(Rn).concat(e) : "";
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* 生成使用到的 css 变量 style 对象
|
|
@@ -519,7 +519,7 @@ function pt(n, e) {
|
|
|
519
519
|
}
|
|
520
520
|
return t;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Fn(n, e) {
|
|
523
523
|
var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
|
|
524
524
|
return t ? t === e.root ? t + i : t + n + i : i;
|
|
525
525
|
}
|
|
@@ -646,7 +646,7 @@ var ve = {
|
|
|
646
646
|
format: function(e) {
|
|
647
647
|
if (e === null || typeof e != "object")
|
|
648
648
|
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
|
|
649
|
-
return
|
|
649
|
+
return Fn("/", e);
|
|
650
650
|
},
|
|
651
651
|
parse: function(e) {
|
|
652
652
|
W(e);
|
|
@@ -678,14 +678,14 @@ 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 me() {
|
|
682
682
|
return "".concat(Z() + Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z()).concat(Z()).concat(Z());
|
|
683
683
|
}
|
|
684
|
-
const
|
|
684
|
+
const Un = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
685
685
|
function it(n) {
|
|
686
|
-
return
|
|
686
|
+
return Un.test(n);
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class on {
|
|
689
689
|
/**
|
|
690
690
|
* 拷贝文本
|
|
691
691
|
*
|
|
@@ -706,7 +706,7 @@ class nn {
|
|
|
706
706
|
* @private
|
|
707
707
|
* @type {(HTMLInputElement | null)}
|
|
708
708
|
*/
|
|
709
|
-
|
|
709
|
+
S(on, "inputElement", null);
|
|
710
710
|
const y = class y {
|
|
711
711
|
/**
|
|
712
712
|
* 检查数据库是否存在
|
|
@@ -941,11 +941,11 @@ const y = class y {
|
|
|
941
941
|
}
|
|
942
942
|
};
|
|
943
943
|
// 数据库版本
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
let
|
|
948
|
-
class
|
|
944
|
+
S(y, "version", 1), // 数据库连接句柄
|
|
945
|
+
S(y, "db", null), // 上一个连接
|
|
946
|
+
S(y, "lastLink");
|
|
947
|
+
let j = y;
|
|
948
|
+
class Wn {
|
|
949
949
|
/**
|
|
950
950
|
* Creates an instance of FileUploader.
|
|
951
951
|
* @author tony001
|
|
@@ -953,7 +953,7 @@ class On {
|
|
|
953
953
|
* @param {FileUploaderOptions<T>} options
|
|
954
954
|
*/
|
|
955
955
|
constructor(e) {
|
|
956
|
-
|
|
956
|
+
S(this, "options");
|
|
957
957
|
this.options = {
|
|
958
958
|
multiple: !0,
|
|
959
959
|
accept: "*/*",
|
|
@@ -1009,7 +1009,7 @@ class On {
|
|
|
1009
1009
|
return "".concat((e / 1024 ** i).toFixed(2), " ").concat(t[i]);
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
class
|
|
1012
|
+
class an {
|
|
1013
1013
|
/**
|
|
1014
1014
|
* 从XML元素中提取CDATA内容
|
|
1015
1015
|
*
|
|
@@ -1117,7 +1117,7 @@ class sn {
|
|
|
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 Vn {
|
|
1121
1121
|
/**
|
|
1122
1122
|
* 从XML元素中提取CDATA内容
|
|
1123
1123
|
*
|
|
@@ -1227,25 +1227,83 @@ class Bn {
|
|
|
1227
1227
|
function Je(n) {
|
|
1228
1228
|
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function rn(n, e, t, i) {
|
|
1231
1231
|
const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)), r = Math.max(0, Math.min(o, 1 - i));
|
|
1232
1232
|
return {
|
|
1233
1233
|
x: a,
|
|
1234
1234
|
y: r
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
|
-
|
|
1237
|
+
function cn(n) {
|
|
1238
|
+
let e = 0;
|
|
1239
|
+
for (let t = 0; t < n.length; t++) {
|
|
1240
|
+
const i = n.charCodeAt(t);
|
|
1241
|
+
e = (e << 5) - e + i, e |= 0;
|
|
1242
|
+
}
|
|
1243
|
+
return Math.abs(e).toString(36).toUpperCase();
|
|
1244
|
+
}
|
|
1245
|
+
function ln(n) {
|
|
1246
|
+
let e = 2166136261;
|
|
1247
|
+
for (let t = 0; t < n.length; t++)
|
|
1248
|
+
e ^= n.charCodeAt(t), e += (e << 1) + (e << 4) + (e << 7) + (e << 8) + (e << 24);
|
|
1249
|
+
return Math.abs(e).toString(36).toUpperCase();
|
|
1250
|
+
}
|
|
1251
|
+
function un(n) {
|
|
1252
|
+
let e = 5381;
|
|
1253
|
+
for (let t = 0; t < n.length; t++)
|
|
1254
|
+
e = (e << 5) + e + n.charCodeAt(t);
|
|
1255
|
+
return Math.abs(e).toString(36).toUpperCase();
|
|
1256
|
+
}
|
|
1257
|
+
function jn(n) {
|
|
1258
|
+
const e = cn(n), t = ln(n), i = un(n), s = e + t + i;
|
|
1259
|
+
let o = "";
|
|
1260
|
+
for (let a = 0; a < n.length % 10 + 10; a++) {
|
|
1261
|
+
const r = a * 7 % s.length;
|
|
1262
|
+
o += s.charAt(r);
|
|
1263
|
+
}
|
|
1264
|
+
return o.toUpperCase();
|
|
1265
|
+
}
|
|
1266
|
+
function ft(n) {
|
|
1267
|
+
return n.replace(/[^A-Z0-9]/g, "");
|
|
1268
|
+
}
|
|
1269
|
+
function dn(n, e) {
|
|
1270
|
+
switch (e) {
|
|
1271
|
+
case "fnv1a":
|
|
1272
|
+
return ln(n);
|
|
1273
|
+
case "djb2":
|
|
1274
|
+
return un(n);
|
|
1275
|
+
case "combined":
|
|
1276
|
+
return jn(n);
|
|
1277
|
+
case "simple":
|
|
1278
|
+
default:
|
|
1279
|
+
return cn(n);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
function qn(n, e = 36) {
|
|
1283
|
+
const t = ft(n);
|
|
1284
|
+
if (t.length >= e)
|
|
1285
|
+
return t.substring(0, e);
|
|
1286
|
+
let i = t;
|
|
1287
|
+
for (; i.length < e; )
|
|
1288
|
+
i += ft(dn(i, "combined"));
|
|
1289
|
+
return i.substring(0, e);
|
|
1290
|
+
}
|
|
1291
|
+
function vt(n, e = 36) {
|
|
1292
|
+
const t = dn(n, "combined");
|
|
1293
|
+
return qn(t, e);
|
|
1294
|
+
}
|
|
1295
|
+
var le, k, Re, mt, be = 0, hn = [], Ne = [], _t = b.__b, gt = b.__r, wt = b.diffed, bt = b.__c, yt = b.unmount;
|
|
1238
1296
|
function He(n, e) {
|
|
1239
|
-
|
|
1297
|
+
b.__h && b.__h(k, n, be || e), be = 0;
|
|
1240
1298
|
var t = k.__H || (k.__H = { __: [], __h: [] });
|
|
1241
|
-
return n >= t.__.length && t.__.push({ __V:
|
|
1299
|
+
return n >= t.__.length && t.__.push({ __V: Ne }), t.__[n];
|
|
1242
1300
|
}
|
|
1243
1301
|
function K(n) {
|
|
1244
|
-
return
|
|
1302
|
+
return be = 1, Yn(vn, n);
|
|
1245
1303
|
}
|
|
1246
|
-
function
|
|
1304
|
+
function Yn(n, e, t) {
|
|
1247
1305
|
var i = He(le++, 2);
|
|
1248
|
-
if (i.t = n, !i.__c && (i.__ = [t ? t(e) :
|
|
1306
|
+
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : vn(void 0, e), function(r) {
|
|
1249
1307
|
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, r);
|
|
1250
1308
|
u !== h && (i.__N = [h, i.__[1]], i.__c.setState({}));
|
|
1251
1309
|
}], i.__c = k, !k.u)) {
|
|
@@ -1281,80 +1339,80 @@ function Pn(n, e, t) {
|
|
|
1281
1339
|
}
|
|
1282
1340
|
function D(n, e) {
|
|
1283
1341
|
var t = He(le++, 3);
|
|
1284
|
-
!
|
|
1342
|
+
!b.__s && fn(t.__H, e) && (t.__ = n, t.i = e, k.__H.__h.push(t));
|
|
1285
1343
|
}
|
|
1286
1344
|
function P(n) {
|
|
1287
|
-
return
|
|
1345
|
+
return be = 5, X(function() {
|
|
1288
1346
|
return { current: n };
|
|
1289
1347
|
}, []);
|
|
1290
1348
|
}
|
|
1291
1349
|
function X(n, e) {
|
|
1292
1350
|
var t = He(le++, 7);
|
|
1293
|
-
return
|
|
1351
|
+
return fn(t.__H, e) ? (t.__V = n(), t.i = e, t.__h = n, t.__V) : t.__;
|
|
1294
1352
|
}
|
|
1295
1353
|
function Fe(n, e) {
|
|
1296
|
-
return
|
|
1354
|
+
return be = 8, X(function() {
|
|
1297
1355
|
return n;
|
|
1298
1356
|
}, e);
|
|
1299
1357
|
}
|
|
1300
|
-
function
|
|
1358
|
+
function pn(n) {
|
|
1301
1359
|
var e = k.context[n.__c], t = He(le++, 9);
|
|
1302
1360
|
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(k)), e.props.value) : n.__;
|
|
1303
1361
|
}
|
|
1304
|
-
function
|
|
1305
|
-
for (var n; n =
|
|
1362
|
+
function Xn() {
|
|
1363
|
+
for (var n; n = hn.shift(); )
|
|
1306
1364
|
if (n.__P && n.__H)
|
|
1307
1365
|
try {
|
|
1308
|
-
n.__H.__h.forEach(
|
|
1366
|
+
n.__H.__h.forEach(Ee), n.__H.__h.forEach(Ke), n.__H.__h = [];
|
|
1309
1367
|
} catch (e) {
|
|
1310
|
-
n.__H.__h = [],
|
|
1368
|
+
n.__H.__h = [], b.__e(e, n.__v);
|
|
1311
1369
|
}
|
|
1312
1370
|
}
|
|
1313
|
-
|
|
1314
|
-
k = null,
|
|
1315
|
-
},
|
|
1316
|
-
|
|
1371
|
+
b.__b = function(n) {
|
|
1372
|
+
k = null, _t && _t(n);
|
|
1373
|
+
}, b.__r = function(n) {
|
|
1374
|
+
gt && gt(n), le = 0;
|
|
1317
1375
|
var e = (k = n.__c).__H;
|
|
1318
1376
|
e && (Re === k ? (e.__h = [], k.__h = [], e.__.forEach(function(t) {
|
|
1319
|
-
t.__N && (t.__ = t.__N), t.__V =
|
|
1320
|
-
})) : (e.__h.forEach(
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1377
|
+
t.__N && (t.__ = t.__N), t.__V = Ne, t.__N = t.i = void 0;
|
|
1378
|
+
})) : (e.__h.forEach(Ee), e.__h.forEach(Ke), e.__h = [], le = 0)), Re = k;
|
|
1379
|
+
}, b.diffed = function(n) {
|
|
1380
|
+
wt && wt(n);
|
|
1323
1381
|
var e = n.__c;
|
|
1324
|
-
e && e.__H && (e.__H.__h.length && (
|
|
1325
|
-
t.i && (t.__H = t.i), t.__V !==
|
|
1382
|
+
e && e.__H && (e.__H.__h.length && (hn.push(e) !== 1 && mt === b.requestAnimationFrame || ((mt = b.requestAnimationFrame) || Zn)(Xn)), e.__H.__.forEach(function(t) {
|
|
1383
|
+
t.i && (t.__H = t.i), t.__V !== Ne && (t.__ = t.__V), t.i = void 0, t.__V = Ne;
|
|
1326
1384
|
})), Re = k = null;
|
|
1327
|
-
},
|
|
1385
|
+
}, b.__c = function(n, e) {
|
|
1328
1386
|
e.some(function(t) {
|
|
1329
1387
|
try {
|
|
1330
|
-
t.__h.forEach(
|
|
1388
|
+
t.__h.forEach(Ee), t.__h = t.__h.filter(function(i) {
|
|
1331
1389
|
return !i.__ || Ke(i);
|
|
1332
1390
|
});
|
|
1333
1391
|
} catch (i) {
|
|
1334
1392
|
e.some(function(s) {
|
|
1335
1393
|
s.__h && (s.__h = []);
|
|
1336
|
-
}), e = [],
|
|
1394
|
+
}), e = [], b.__e(i, t.__v);
|
|
1337
1395
|
}
|
|
1338
|
-
}),
|
|
1339
|
-
},
|
|
1340
|
-
|
|
1396
|
+
}), bt && bt(n, e);
|
|
1397
|
+
}, b.unmount = function(n) {
|
|
1398
|
+
yt && yt(n);
|
|
1341
1399
|
var e, t = n.__c;
|
|
1342
1400
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
1343
1401
|
try {
|
|
1344
|
-
|
|
1402
|
+
Ee(i);
|
|
1345
1403
|
} catch (s) {
|
|
1346
1404
|
e = s;
|
|
1347
1405
|
}
|
|
1348
|
-
}), t.__H = void 0, e &&
|
|
1406
|
+
}), t.__H = void 0, e && b.__e(e, t.__v));
|
|
1349
1407
|
};
|
|
1350
|
-
var
|
|
1351
|
-
function
|
|
1408
|
+
var Ct = typeof requestAnimationFrame == "function";
|
|
1409
|
+
function Zn(n) {
|
|
1352
1410
|
var e, t = function() {
|
|
1353
|
-
clearTimeout(i),
|
|
1411
|
+
clearTimeout(i), Ct && cancelAnimationFrame(e), setTimeout(n);
|
|
1354
1412
|
}, i = setTimeout(t, 100);
|
|
1355
|
-
|
|
1413
|
+
Ct && (e = requestAnimationFrame(t));
|
|
1356
1414
|
}
|
|
1357
|
-
function
|
|
1415
|
+
function Ee(n) {
|
|
1358
1416
|
var e = k, t = n.__c;
|
|
1359
1417
|
typeof t == "function" && (n.__c = void 0, t()), k = e;
|
|
1360
1418
|
}
|
|
@@ -1362,27 +1420,27 @@ function Ke(n) {
|
|
|
1362
1420
|
var e = k;
|
|
1363
1421
|
n.__c = n.__(), k = e;
|
|
1364
1422
|
}
|
|
1365
|
-
function
|
|
1423
|
+
function fn(n, e) {
|
|
1366
1424
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
1367
1425
|
return t !== n[i];
|
|
1368
1426
|
});
|
|
1369
1427
|
}
|
|
1370
|
-
function
|
|
1428
|
+
function vn(n, e) {
|
|
1371
1429
|
return typeof e == "function" ? e(n) : e;
|
|
1372
1430
|
}
|
|
1373
1431
|
function Oe() {
|
|
1374
1432
|
throw new Error("Cycle detected");
|
|
1375
1433
|
}
|
|
1376
|
-
var
|
|
1434
|
+
var Gn = Symbol.for("preact-signals");
|
|
1377
1435
|
function st() {
|
|
1378
1436
|
if (ce > 1)
|
|
1379
1437
|
ce--;
|
|
1380
1438
|
else {
|
|
1381
|
-
for (var n, e = !1;
|
|
1382
|
-
var t =
|
|
1383
|
-
for (
|
|
1439
|
+
for (var n, e = !1; _e !== void 0; ) {
|
|
1440
|
+
var t = _e;
|
|
1441
|
+
for (_e = void 0, Qe++; t !== void 0; ) {
|
|
1384
1442
|
var i = t.o;
|
|
1385
|
-
if (t.o = void 0, t.f &= -3, !(8 & t.f) &&
|
|
1443
|
+
if (t.o = void 0, t.f &= -3, !(8 & t.f) && _n(t))
|
|
1386
1444
|
try {
|
|
1387
1445
|
t.c();
|
|
1388
1446
|
} catch (s) {
|
|
@@ -1395,8 +1453,8 @@ function st() {
|
|
|
1395
1453
|
throw n;
|
|
1396
1454
|
}
|
|
1397
1455
|
}
|
|
1398
|
-
var N = void 0,
|
|
1399
|
-
function
|
|
1456
|
+
var N = void 0, _e = void 0, ce = 0, Qe = 0, Ie = 0;
|
|
1457
|
+
function mn(n) {
|
|
1400
1458
|
if (N !== void 0) {
|
|
1401
1459
|
var e = n.n;
|
|
1402
1460
|
if (e === void 0 || e.t !== N)
|
|
@@ -1408,7 +1466,7 @@ function un(n) {
|
|
|
1408
1466
|
function A(n) {
|
|
1409
1467
|
this.v = n, this.i = 0, this.n = void 0, this.t = void 0;
|
|
1410
1468
|
}
|
|
1411
|
-
A.prototype.brand =
|
|
1469
|
+
A.prototype.brand = Gn;
|
|
1412
1470
|
A.prototype.h = function() {
|
|
1413
1471
|
return !0;
|
|
1414
1472
|
};
|
|
@@ -1446,7 +1504,7 @@ A.prototype.peek = function() {
|
|
|
1446
1504
|
return this.v;
|
|
1447
1505
|
};
|
|
1448
1506
|
Object.defineProperty(A.prototype, "value", { get: function() {
|
|
1449
|
-
var n =
|
|
1507
|
+
var n = mn(this);
|
|
1450
1508
|
return n !== void 0 && (n.i = this.i), this.v;
|
|
1451
1509
|
}, set: function(n) {
|
|
1452
1510
|
if (N instanceof Q && function() {
|
|
@@ -1464,13 +1522,13 @@ Object.defineProperty(A.prototype, "value", { get: function() {
|
|
|
1464
1522
|
function J(n) {
|
|
1465
1523
|
return new A(n);
|
|
1466
1524
|
}
|
|
1467
|
-
function
|
|
1525
|
+
function _n(n) {
|
|
1468
1526
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1469
1527
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
1470
1528
|
return !0;
|
|
1471
1529
|
return !1;
|
|
1472
1530
|
}
|
|
1473
|
-
function
|
|
1531
|
+
function gn(n) {
|
|
1474
1532
|
for (var e = n.s; e !== void 0; e = e.n) {
|
|
1475
1533
|
var t = e.S.n;
|
|
1476
1534
|
if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -1479,7 +1537,7 @@ function hn(n) {
|
|
|
1479
1537
|
}
|
|
1480
1538
|
}
|
|
1481
1539
|
}
|
|
1482
|
-
function
|
|
1540
|
+
function wn(n) {
|
|
1483
1541
|
for (var e = n.s, t = void 0; e !== void 0; ) {
|
|
1484
1542
|
var i = e.p;
|
|
1485
1543
|
e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : t = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
|
|
@@ -1494,17 +1552,17 @@ function Q(n) {
|
|
|
1494
1552
|
return !1;
|
|
1495
1553
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ie))
|
|
1496
1554
|
return !0;
|
|
1497
|
-
if (this.g = Ie, this.f |= 1, this.i > 0 && !
|
|
1555
|
+
if (this.g = Ie, this.f |= 1, this.i > 0 && !_n(this))
|
|
1498
1556
|
return this.f &= -2, !0;
|
|
1499
1557
|
var n = N;
|
|
1500
1558
|
try {
|
|
1501
|
-
|
|
1559
|
+
gn(this), N = this;
|
|
1502
1560
|
var e = this.x();
|
|
1503
1561
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
1504
1562
|
} catch (t) {
|
|
1505
1563
|
this.v = t, this.f |= 16, this.i++;
|
|
1506
1564
|
}
|
|
1507
|
-
return N = n,
|
|
1565
|
+
return N = n, wn(this), this.f &= -2, !0;
|
|
1508
1566
|
};
|
|
1509
1567
|
Q.prototype.S = function(n) {
|
|
1510
1568
|
if (this.t === void 0) {
|
|
@@ -1535,15 +1593,15 @@ Q.prototype.peek = function() {
|
|
|
1535
1593
|
};
|
|
1536
1594
|
Object.defineProperty(Q.prototype, "value", { get: function() {
|
|
1537
1595
|
1 & this.f && Oe();
|
|
1538
|
-
var n =
|
|
1596
|
+
var n = mn(this);
|
|
1539
1597
|
if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f)
|
|
1540
1598
|
throw this.v;
|
|
1541
1599
|
return this.v;
|
|
1542
1600
|
} });
|
|
1543
|
-
function
|
|
1601
|
+
function bn(n) {
|
|
1544
1602
|
return new Q(n);
|
|
1545
1603
|
}
|
|
1546
|
-
function
|
|
1604
|
+
function yn(n) {
|
|
1547
1605
|
var e = n.u;
|
|
1548
1606
|
if (n.u = void 0, typeof e == "function") {
|
|
1549
1607
|
ce++;
|
|
@@ -1561,17 +1619,17 @@ function vn(n) {
|
|
|
1561
1619
|
function ot(n) {
|
|
1562
1620
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1563
1621
|
e.S.U(e);
|
|
1564
|
-
n.x = void 0, n.s = void 0,
|
|
1622
|
+
n.x = void 0, n.s = void 0, yn(n);
|
|
1565
1623
|
}
|
|
1566
|
-
function
|
|
1624
|
+
function Jn(n) {
|
|
1567
1625
|
if (N !== this)
|
|
1568
1626
|
throw new Error("Out-of-order effect");
|
|
1569
|
-
|
|
1627
|
+
wn(this), N = n, this.f &= -2, 8 & this.f && ot(this), st();
|
|
1570
1628
|
}
|
|
1571
|
-
function
|
|
1629
|
+
function ye(n) {
|
|
1572
1630
|
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
1573
1631
|
}
|
|
1574
|
-
|
|
1632
|
+
ye.prototype.c = function() {
|
|
1575
1633
|
var n = this.S();
|
|
1576
1634
|
try {
|
|
1577
1635
|
if (8 & this.f || this.x === void 0)
|
|
@@ -1582,19 +1640,19 @@ be.prototype.c = function() {
|
|
|
1582
1640
|
n();
|
|
1583
1641
|
}
|
|
1584
1642
|
};
|
|
1585
|
-
|
|
1586
|
-
1 & this.f && Oe(), this.f |= 1, this.f &= -9,
|
|
1643
|
+
ye.prototype.S = function() {
|
|
1644
|
+
1 & this.f && Oe(), this.f |= 1, this.f &= -9, yn(this), gn(this), ce++;
|
|
1587
1645
|
var n = N;
|
|
1588
|
-
return N = this,
|
|
1646
|
+
return N = this, Jn.bind(this, n);
|
|
1589
1647
|
};
|
|
1590
|
-
|
|
1591
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
1648
|
+
ye.prototype.N = function() {
|
|
1649
|
+
2 & this.f || (this.f |= 2, this.o = _e, _e = this);
|
|
1592
1650
|
};
|
|
1593
|
-
|
|
1651
|
+
ye.prototype.d = function() {
|
|
1594
1652
|
this.f |= 8, 1 & this.f || ot(this);
|
|
1595
1653
|
};
|
|
1596
1654
|
function at(n) {
|
|
1597
|
-
var e = new
|
|
1655
|
+
var e = new ye(n);
|
|
1598
1656
|
try {
|
|
1599
1657
|
e.c();
|
|
1600
1658
|
} catch (t) {
|
|
@@ -1604,13 +1662,13 @@ function at(n) {
|
|
|
1604
1662
|
}
|
|
1605
1663
|
var Be, Ue;
|
|
1606
1664
|
function ue(n, e) {
|
|
1607
|
-
|
|
1665
|
+
b[n] = e.bind(null, b[n] || function() {
|
|
1608
1666
|
});
|
|
1609
1667
|
}
|
|
1610
1668
|
function De(n) {
|
|
1611
1669
|
Ue && Ue(), Ue = n && n.S();
|
|
1612
1670
|
}
|
|
1613
|
-
function
|
|
1671
|
+
function Cn(n) {
|
|
1614
1672
|
var e = this, t = n.data, i = I(t);
|
|
1615
1673
|
i.value = t;
|
|
1616
1674
|
var s = X(function() {
|
|
@@ -1621,16 +1679,16 @@ function mn(n) {
|
|
|
1621
1679
|
}
|
|
1622
1680
|
return e.__$u.c = function() {
|
|
1623
1681
|
var a;
|
|
1624
|
-
!
|
|
1625
|
-
},
|
|
1682
|
+
!Xt(s.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = s.peek() : (e.__$f |= 1, e.setState({}));
|
|
1683
|
+
}, bn(function() {
|
|
1626
1684
|
var a = i.value.value;
|
|
1627
1685
|
return a === 0 ? 0 : a === !0 ? "" : a || "";
|
|
1628
1686
|
});
|
|
1629
1687
|
}, []);
|
|
1630
1688
|
return s.value;
|
|
1631
1689
|
}
|
|
1632
|
-
|
|
1633
|
-
Object.defineProperties(A.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value:
|
|
1690
|
+
Cn.displayName = "_st";
|
|
1691
|
+
Object.defineProperties(A.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Cn }, props: { configurable: !0, get: function() {
|
|
1634
1692
|
return { data: this };
|
|
1635
1693
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1636
1694
|
ue("__b", function(n, e) {
|
|
@@ -1675,13 +1733,13 @@ ue("diffed", function(n, e) {
|
|
|
1675
1733
|
t.U = o = {};
|
|
1676
1734
|
for (var u in i) {
|
|
1677
1735
|
var h = o[u], p = i[u];
|
|
1678
|
-
h === void 0 ? (h =
|
|
1736
|
+
h === void 0 ? (h = Kn(t, u, p, s), o[u] = h) : h.o(p, s);
|
|
1679
1737
|
}
|
|
1680
1738
|
}
|
|
1681
1739
|
}
|
|
1682
1740
|
n(e);
|
|
1683
1741
|
});
|
|
1684
|
-
function
|
|
1742
|
+
function Kn(n, e, t, i) {
|
|
1685
1743
|
var s = e in n && n.ownerSVGElement === void 0, o = J(t);
|
|
1686
1744
|
return { o: function(a, r) {
|
|
1687
1745
|
o.value = a, i = r;
|
|
@@ -1737,30 +1795,30 @@ function I(n) {
|
|
|
1737
1795
|
function B(n) {
|
|
1738
1796
|
var e = P(n);
|
|
1739
1797
|
return e.current = n, Be.__$f |= 4, X(function() {
|
|
1740
|
-
return
|
|
1798
|
+
return bn(function() {
|
|
1741
1799
|
return e.current();
|
|
1742
1800
|
});
|
|
1743
1801
|
}, []);
|
|
1744
1802
|
}
|
|
1745
|
-
var
|
|
1803
|
+
var Qn = 0;
|
|
1746
1804
|
function c(n, e, t, i, s, o) {
|
|
1747
1805
|
var a, r, u = {};
|
|
1748
1806
|
for (r in e)
|
|
1749
1807
|
r == "ref" ? a = e[r] : u[r] = e[r];
|
|
1750
|
-
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: --
|
|
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: --Qn, __source: s, __self: o };
|
|
1751
1809
|
if (typeof n == "function" && (a = n.defaultProps))
|
|
1752
1810
|
for (r in a)
|
|
1753
1811
|
u[r] === void 0 && (u[r] = a[r]);
|
|
1754
|
-
return
|
|
1812
|
+
return b.vnode && b.vnode(h), h;
|
|
1755
1813
|
}
|
|
1756
|
-
const
|
|
1814
|
+
const ei = () => c("svg", {
|
|
1757
1815
|
viewBox: "0 0 1024 1024",
|
|
1758
1816
|
version: "1.1",
|
|
1759
1817
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1760
1818
|
children: c("path", {
|
|
1761
1819
|
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"
|
|
1762
1820
|
})
|
|
1763
|
-
}),
|
|
1821
|
+
}), ti = () => c("svg", {
|
|
1764
1822
|
className: "icon",
|
|
1765
1823
|
viewBox: "0 0 1024 1024",
|
|
1766
1824
|
version: "1.1",
|
|
@@ -1768,7 +1826,7 @@ const jn = () => c("svg", {
|
|
|
1768
1826
|
children: c("path", {
|
|
1769
1827
|
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"
|
|
1770
1828
|
})
|
|
1771
|
-
}),
|
|
1829
|
+
}), ni = (n) => c("svg", {
|
|
1772
1830
|
viewBox: "0 0 1024 1024",
|
|
1773
1831
|
id: "send",
|
|
1774
1832
|
className: n.className,
|
|
@@ -1777,49 +1835,49 @@ const jn = () => c("svg", {
|
|
|
1777
1835
|
children: c("path", {
|
|
1778
1836
|
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"
|
|
1779
1837
|
})
|
|
1780
|
-
}),
|
|
1838
|
+
}), ii = () => c("svg", {
|
|
1781
1839
|
viewBox: "0 0 1024 1024",
|
|
1782
1840
|
version: "1.1",
|
|
1783
1841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1784
1842
|
children: c("path", {
|
|
1785
1843
|
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"
|
|
1786
1844
|
})
|
|
1787
|
-
}),
|
|
1845
|
+
}), Tt = () => c("svg", {
|
|
1788
1846
|
viewBox: "0 0 1024 1024",
|
|
1789
1847
|
version: "1.1",
|
|
1790
1848
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1791
1849
|
children: c("path", {
|
|
1792
1850
|
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"
|
|
1793
1851
|
})
|
|
1794
|
-
}),
|
|
1852
|
+
}), si = () => c("svg", {
|
|
1795
1853
|
viewBox: "0 0 1024 1024",
|
|
1796
1854
|
version: "1.1",
|
|
1797
1855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1798
1856
|
children: c("path", {
|
|
1799
1857
|
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"
|
|
1800
1858
|
})
|
|
1801
|
-
}),
|
|
1859
|
+
}), oi = () => c("svg", {
|
|
1802
1860
|
viewBox: "0 0 1024 1024",
|
|
1803
1861
|
version: "1.1",
|
|
1804
1862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1805
1863
|
children: c("path", {
|
|
1806
1864
|
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"
|
|
1807
1865
|
})
|
|
1808
|
-
}),
|
|
1866
|
+
}), ai = () => c("svg", {
|
|
1809
1867
|
viewBox: "0 0 1024 1024",
|
|
1810
1868
|
version: "1.1",
|
|
1811
1869
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1812
1870
|
children: c("path", {
|
|
1813
1871
|
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"
|
|
1814
1872
|
})
|
|
1815
|
-
}),
|
|
1873
|
+
}), ri = () => c("svg", {
|
|
1816
1874
|
viewBox: "0 0 1024 1024",
|
|
1817
1875
|
version: "1.1",
|
|
1818
1876
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1819
1877
|
children: c("path", {
|
|
1820
1878
|
d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64"
|
|
1821
1879
|
})
|
|
1822
|
-
}),
|
|
1880
|
+
}), ci = () => c("svg", {
|
|
1823
1881
|
viewBox: "0 0 1024 1024",
|
|
1824
1882
|
version: "1.1",
|
|
1825
1883
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1836,7 +1894,7 @@ const jn = () => c("svg", {
|
|
|
1836
1894
|
}), c("path", {
|
|
1837
1895
|
d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
|
|
1838
1896
|
})]
|
|
1839
|
-
}),
|
|
1897
|
+
}), li = () => c("svg", {
|
|
1840
1898
|
viewBox: "0 0 18 18",
|
|
1841
1899
|
fill: "none",
|
|
1842
1900
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1850,7 +1908,7 @@ const jn = () => c("svg", {
|
|
|
1850
1908
|
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",
|
|
1851
1909
|
fill: "currentColor"
|
|
1852
1910
|
})]
|
|
1853
|
-
}),
|
|
1911
|
+
}), ui = () => c("svg", {
|
|
1854
1912
|
viewBox: "64 64 896 896",
|
|
1855
1913
|
focusable: "false",
|
|
1856
1914
|
width: "1em",
|
|
@@ -1860,7 +1918,7 @@ const jn = () => c("svg", {
|
|
|
1860
1918
|
children: c("path", {
|
|
1861
1919
|
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"
|
|
1862
1920
|
})
|
|
1863
|
-
}),
|
|
1921
|
+
}), di = () => c("svg", {
|
|
1864
1922
|
fill: "currentColor",
|
|
1865
1923
|
viewBox: "0 0 1000 1000",
|
|
1866
1924
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1894,7 +1952,7 @@ const jn = () => c("svg", {
|
|
|
1894
1952
|
})]
|
|
1895
1953
|
}, u);
|
|
1896
1954
|
})
|
|
1897
|
-
}),
|
|
1955
|
+
}), hi = (n) => c("svg", {
|
|
1898
1956
|
className: n.className,
|
|
1899
1957
|
onClick: n.onClick,
|
|
1900
1958
|
viewBox: "0 0 1024 1024",
|
|
@@ -1903,7 +1961,7 @@ const jn = () => c("svg", {
|
|
|
1903
1961
|
children: c("path", {
|
|
1904
1962
|
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"
|
|
1905
1963
|
})
|
|
1906
|
-
}),
|
|
1964
|
+
}), pi = (n) => c("svg", {
|
|
1907
1965
|
className: n.className,
|
|
1908
1966
|
viewBox: "0 0 1024 1024",
|
|
1909
1967
|
version: "1.1",
|
|
@@ -1911,7 +1969,7 @@ const jn = () => c("svg", {
|
|
|
1911
1969
|
children: c("path", {
|
|
1912
1970
|
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"
|
|
1913
1971
|
})
|
|
1914
|
-
}),
|
|
1972
|
+
}), Tn = () => c("svg", {
|
|
1915
1973
|
className: "icon",
|
|
1916
1974
|
viewBox: "0 0 1024 1024",
|
|
1917
1975
|
version: "1.1",
|
|
@@ -1919,7 +1977,7 @@ const jn = () => c("svg", {
|
|
|
1919
1977
|
children: c("path", {
|
|
1920
1978
|
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"
|
|
1921
1979
|
})
|
|
1922
|
-
}),
|
|
1980
|
+
}), fi = (n) => c("svg", {
|
|
1923
1981
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1924
1982
|
className: n.className,
|
|
1925
1983
|
viewBox: "0 0 512 512",
|
|
@@ -1962,7 +2020,7 @@ const jn = () => c("svg", {
|
|
|
1962
2020
|
repeatCount: "indefinite"
|
|
1963
2021
|
})
|
|
1964
2022
|
})
|
|
1965
|
-
}),
|
|
2023
|
+
}), vi = () => c("svg", {
|
|
1966
2024
|
className: "icon",
|
|
1967
2025
|
viewBox: "0 0 1024 1024",
|
|
1968
2026
|
version: "1.1",
|
|
@@ -1972,7 +2030,7 @@ const jn = () => c("svg", {
|
|
|
1972
2030
|
children: c("path", {
|
|
1973
2031
|
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"
|
|
1974
2032
|
})
|
|
1975
|
-
}),
|
|
2033
|
+
}), Sn = () => c("svg", {
|
|
1976
2034
|
className: "icon",
|
|
1977
2035
|
viewBox: "0 0 1024 1024",
|
|
1978
2036
|
version: "1.1",
|
|
@@ -1986,7 +2044,7 @@ const jn = () => c("svg", {
|
|
|
1986
2044
|
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",
|
|
1987
2045
|
fill: "currentColor"
|
|
1988
2046
|
})]
|
|
1989
|
-
}),
|
|
2047
|
+
}), mi = () => c("svg", {
|
|
1990
2048
|
className: "icon",
|
|
1991
2049
|
viewBox: "0 0 1024 1024",
|
|
1992
2050
|
version: "1.1",
|
|
@@ -1997,7 +2055,7 @@ const jn = () => c("svg", {
|
|
|
1997
2055
|
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",
|
|
1998
2056
|
fill: "currentColor"
|
|
1999
2057
|
})
|
|
2000
|
-
}),
|
|
2058
|
+
}), _i = () => c("svg", {
|
|
2001
2059
|
className: "icon",
|
|
2002
2060
|
viewBox: "0 0 1024 1024",
|
|
2003
2061
|
version: "1.1",
|
|
@@ -2007,7 +2065,7 @@ const jn = () => c("svg", {
|
|
|
2007
2065
|
children: c("path", {
|
|
2008
2066
|
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"
|
|
2009
2067
|
})
|
|
2010
|
-
}),
|
|
2068
|
+
}), gi = (n) => c("svg", {
|
|
2011
2069
|
className: n.className,
|
|
2012
2070
|
id: "stop",
|
|
2013
2071
|
viewBox: "0 0 1025 1024",
|
|
@@ -2022,7 +2080,7 @@ const jn = () => c("svg", {
|
|
|
2022
2080
|
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",
|
|
2023
2081
|
fill: "currentColor"
|
|
2024
2082
|
})]
|
|
2025
|
-
}),
|
|
2083
|
+
}), wi = (n) => c("svg", {
|
|
2026
2084
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2027
2085
|
className: n.className,
|
|
2028
2086
|
viewBox: "0 0 512 512",
|
|
@@ -2034,7 +2092,7 @@ const jn = () => c("svg", {
|
|
|
2034
2092
|
strokeWidth: "48",
|
|
2035
2093
|
d: "M112 268l144 144 144-144M256 392V100"
|
|
2036
2094
|
})
|
|
2037
|
-
}),
|
|
2095
|
+
}), bi = () => c("svg", {
|
|
2038
2096
|
viewBox: "0 0 1024 1024",
|
|
2039
2097
|
version: "1.1",
|
|
2040
2098
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2047,7 +2105,7 @@ const jn = () => c("svg", {
|
|
|
2047
2105
|
}), c("path", {
|
|
2048
2106
|
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"
|
|
2049
2107
|
})]
|
|
2050
|
-
}),
|
|
2108
|
+
}), yi = () => c("svg", {
|
|
2051
2109
|
viewBox: "0 0 1024 1024",
|
|
2052
2110
|
version: "1.1",
|
|
2053
2111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2056,7 +2114,7 @@ const jn = () => c("svg", {
|
|
|
2056
2114
|
children: c("path", {
|
|
2057
2115
|
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"
|
|
2058
2116
|
})
|
|
2059
|
-
}),
|
|
2117
|
+
}), Ci = () => c("svg", {
|
|
2060
2118
|
version: "1.1",
|
|
2061
2119
|
className: "icon",
|
|
2062
2120
|
viewBox: "0 0 1024 1024",
|
|
@@ -2064,7 +2122,7 @@ const jn = () => c("svg", {
|
|
|
2064
2122
|
children: c("path", {
|
|
2065
2123
|
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"
|
|
2066
2124
|
})
|
|
2067
|
-
}),
|
|
2125
|
+
}), Ti = (n) => c("svg", {
|
|
2068
2126
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2069
2127
|
className: n.className,
|
|
2070
2128
|
viewBox: "0 0 512 512",
|
|
@@ -2076,7 +2134,7 @@ const jn = () => c("svg", {
|
|
|
2076
2134
|
strokeWidth: "48",
|
|
2077
2135
|
d: "M184 112l144 144-144 144"
|
|
2078
2136
|
})
|
|
2079
|
-
}),
|
|
2137
|
+
}), Si = () => c("svg", {
|
|
2080
2138
|
className: "icon",
|
|
2081
2139
|
viewBox: "0 0 1024 1024",
|
|
2082
2140
|
version: "1.1",
|
|
@@ -2085,7 +2143,7 @@ const jn = () => c("svg", {
|
|
|
2085
2143
|
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"
|
|
2086
2144
|
})
|
|
2087
2145
|
});
|
|
2088
|
-
const
|
|
2146
|
+
const xi = (n) => {
|
|
2089
2147
|
const {
|
|
2090
2148
|
items: e
|
|
2091
2149
|
} = n, t = I([]), i = new M("chat-thought-chain"), s = I([]);
|
|
@@ -2115,7 +2173,7 @@ const _i = (n) => {
|
|
|
2115
2173
|
children: [c("div", {
|
|
2116
2174
|
className: i.e("item-title"),
|
|
2117
2175
|
onClick: () => o(r),
|
|
2118
|
-
children: [a.title, c(
|
|
2176
|
+
children: [a.title, c(fi, {
|
|
2119
2177
|
className: i.e("icon")
|
|
2120
2178
|
})]
|
|
2121
2179
|
}), c("div", {
|
|
@@ -2127,7 +2185,7 @@ const _i = (n) => {
|
|
|
2127
2185
|
})
|
|
2128
2186
|
});
|
|
2129
2187
|
};
|
|
2130
|
-
const
|
|
2188
|
+
const ki = (n) => {
|
|
2131
2189
|
const {
|
|
2132
2190
|
items: e,
|
|
2133
2191
|
onItemClick: t
|
|
@@ -2140,17 +2198,17 @@ const gi = (n) => {
|
|
|
2140
2198
|
className: "".concat(s.e("item"), " ").concat(s.is("action", o.type === "action")),
|
|
2141
2199
|
onClick: (r) => i(o, r),
|
|
2142
2200
|
title: o.metadata.content_name,
|
|
2143
|
-
children: [o.metadata.content_name, c(
|
|
2201
|
+
children: [o.metadata.content_name, c(Ti, {
|
|
2144
2202
|
className: "".concat(s.e("item-icon"))
|
|
2145
2203
|
})]
|
|
2146
2204
|
}, a))
|
|
2147
2205
|
});
|
|
2148
2206
|
};
|
|
2149
|
-
const te = new M("markdown-message"),
|
|
2207
|
+
const te = new M("markdown-message"), Ni = (n) => {
|
|
2150
2208
|
const {
|
|
2151
2209
|
message: e,
|
|
2152
2210
|
size: t
|
|
2153
|
-
} = n, i = I(
|
|
2211
|
+
} = n, i = I(me()), s = I(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]), r = I({
|
|
2154
2212
|
title: "",
|
|
2155
2213
|
description: "",
|
|
2156
2214
|
icon: c(Ve, {})
|
|
@@ -2169,9 +2227,9 @@ const te = new M("markdown-message"), wi = (n) => {
|
|
|
2169
2227
|
n.controller.handleSuggestionClick(n.message, v, _);
|
|
2170
2228
|
}, l = (v) => {
|
|
2171
2229
|
const _ = v.indexOf("<think>"), d = v.indexOf("</think>");
|
|
2172
|
-
let f = "", m = "",
|
|
2173
|
-
return d === -1 ? (
|
|
2174
|
-
isThoughtCompleted:
|
|
2230
|
+
let f = "", m = "", w = !1;
|
|
2231
|
+
return d === -1 ? (w = !1, f = v.slice(_ + 7), m = "") : (w = !0, f = v.slice(_ + 7, d), m = v.slice(d + 8)), {
|
|
2232
|
+
isThoughtCompleted: w,
|
|
2175
2233
|
thoughtContent: f,
|
|
2176
2234
|
answerContent: m
|
|
2177
2235
|
};
|
|
@@ -2204,7 +2262,7 @@ const te = new M("markdown-message"), wi = (n) => {
|
|
|
2204
2262
|
}, f && (v = f);
|
|
2205
2263
|
} else
|
|
2206
2264
|
v = e.content;
|
|
2207
|
-
h(e.suggestions), s.value = new
|
|
2265
|
+
h(e.suggestions), s.value = new qt({
|
|
2208
2266
|
id: i,
|
|
2209
2267
|
value: v || "",
|
|
2210
2268
|
editor: {
|
|
@@ -2241,14 +2299,14 @@ const te = new M("markdown-message"), wi = (n) => {
|
|
|
2241
2299
|
}) : null]
|
|
2242
2300
|
}), c("div", {
|
|
2243
2301
|
className: "".concat(te.b("content"), " pre-wrap-container"),
|
|
2244
|
-
children: [c(
|
|
2302
|
+
children: [c(xi, {
|
|
2245
2303
|
items: [r.value]
|
|
2246
2304
|
}), c("div", {
|
|
2247
2305
|
id: i
|
|
2248
2306
|
})]
|
|
2249
2307
|
}), c("div", {
|
|
2250
2308
|
className: te.b("footer"),
|
|
2251
|
-
children: u.value.hasSuggestions ? c(
|
|
2309
|
+
children: u.value.hasSuggestions ? c(ki, {
|
|
2252
2310
|
items: u.value.suggestions,
|
|
2253
2311
|
onItemClick: (v, _) => {
|
|
2254
2312
|
p(v, _);
|
|
@@ -2257,7 +2315,7 @@ const te = new M("markdown-message"), wi = (n) => {
|
|
|
2257
2315
|
})]
|
|
2258
2316
|
});
|
|
2259
2317
|
};
|
|
2260
|
-
const de = new M("ossfile-material"),
|
|
2318
|
+
const de = new M("ossfile-material"), Ei = (n) => {
|
|
2261
2319
|
const e = B(() => n.material.data.name), t = B(() => n.material.metadata.size), i = B(() => {
|
|
2262
2320
|
const o = n.material.metadata.state;
|
|
2263
2321
|
return o === "successed" ? "上传成功" : o === "uploading" ? "上传中" : o === "failed" ? "上传失败" : "未知状态";
|
|
@@ -2277,7 +2335,7 @@ const de = new M("ossfile-material"), bi = (n) => {
|
|
|
2277
2335
|
className: de.b(),
|
|
2278
2336
|
children: [c("div", {
|
|
2279
2337
|
className: de.b("left"),
|
|
2280
|
-
children: c(
|
|
2338
|
+
children: c(Sn, {})
|
|
2281
2339
|
}), c("div", {
|
|
2282
2340
|
className: de.b("right"),
|
|
2283
2341
|
children: [c("div", {
|
|
@@ -2298,7 +2356,7 @@ const de = new M("ossfile-material"), bi = (n) => {
|
|
|
2298
2356
|
})]
|
|
2299
2357
|
});
|
|
2300
2358
|
};
|
|
2301
|
-
const he = new M("common-material"),
|
|
2359
|
+
const he = new M("common-material"), Mi = (n) => {
|
|
2302
2360
|
var i, s, o, a;
|
|
2303
2361
|
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((r) => r.id === n.material.metadata.actionId), t = B(() => n.material.metadata.name);
|
|
2304
2362
|
return c("div", {
|
|
@@ -2315,7 +2373,7 @@ const he = new M("common-material"), yi = (n) => {
|
|
|
2315
2373
|
}) : c("img", {
|
|
2316
2374
|
src: e.icon.imagePath
|
|
2317
2375
|
}) : null
|
|
2318
|
-
}) : c(
|
|
2376
|
+
}) : c(_i, {})
|
|
2319
2377
|
}), c("div", {
|
|
2320
2378
|
className: he.b("right"),
|
|
2321
2379
|
children: [c("div", {
|
|
@@ -2331,37 +2389,37 @@ const he = new M("common-material"), yi = (n) => {
|
|
|
2331
2389
|
})]
|
|
2332
2390
|
});
|
|
2333
2391
|
};
|
|
2334
|
-
const
|
|
2392
|
+
const je = new M("chat-input-material-item"), xn = (n) => {
|
|
2335
2393
|
const {
|
|
2336
2394
|
material: e
|
|
2337
2395
|
} = n;
|
|
2338
2396
|
let t = null;
|
|
2339
2397
|
switch (e.type) {
|
|
2340
2398
|
case "ossfile":
|
|
2341
|
-
t =
|
|
2399
|
+
t = Ei;
|
|
2342
2400
|
break;
|
|
2343
2401
|
default:
|
|
2344
|
-
t =
|
|
2402
|
+
t = Mi;
|
|
2345
2403
|
}
|
|
2346
2404
|
const i = () => {
|
|
2347
2405
|
n.controller.deleteMaterial(e);
|
|
2348
2406
|
};
|
|
2349
2407
|
return c("div", {
|
|
2350
|
-
className: "".concat(
|
|
2408
|
+
className: "".concat(je.b(), " ").concat(je.is("disabled", n.disabled)),
|
|
2351
2409
|
children: [c("div", {
|
|
2352
|
-
className:
|
|
2410
|
+
className: je.e("icon"),
|
|
2353
2411
|
onClick: i,
|
|
2354
|
-
children: c(
|
|
2355
|
-
}),
|
|
2412
|
+
children: c(mi, {})
|
|
2413
|
+
}), q(t, {
|
|
2356
2414
|
material: e,
|
|
2357
2415
|
controller: n.controller
|
|
2358
2416
|
})]
|
|
2359
2417
|
});
|
|
2360
2418
|
};
|
|
2361
|
-
const ie = new M("user-message-question"),
|
|
2362
|
-
const e = I(
|
|
2419
|
+
const ie = new M("user-message-question"), $i = (n) => {
|
|
2420
|
+
const e = I(me()), t = I(null), i = B(() => n.message.content), s = B(() => an.parseMixedContent(i.value));
|
|
2363
2421
|
return D(() => {
|
|
2364
|
-
t.value = new
|
|
2422
|
+
t.value = new qt({
|
|
2365
2423
|
id: e,
|
|
2366
2424
|
value: s.value.remainingText || "",
|
|
2367
2425
|
editor: {
|
|
@@ -2399,7 +2457,7 @@ const ie = new M("user-message-question"), Ci = (n) => {
|
|
|
2399
2457
|
className: ie.em("content", "body"),
|
|
2400
2458
|
children: [s.value.hasResources && c("div", {
|
|
2401
2459
|
className: ie.em("content", "material"),
|
|
2402
|
-
children: s.value.resources.map((o) => c(
|
|
2460
|
+
children: s.value.resources.map((o) => c(xn, {
|
|
2403
2461
|
material: o,
|
|
2404
2462
|
disabled: !0,
|
|
2405
2463
|
controller: n.controller
|
|
@@ -2414,32 +2472,32 @@ const ie = new M("user-message-question"), Ci = (n) => {
|
|
|
2414
2472
|
})]
|
|
2415
2473
|
});
|
|
2416
2474
|
};
|
|
2417
|
-
const
|
|
2475
|
+
const Te = new M("error-message"), Ai = (n) => {
|
|
2418
2476
|
const e = B(() => n.message.content);
|
|
2419
2477
|
return c("div", {
|
|
2420
|
-
className:
|
|
2478
|
+
className: Te.b(),
|
|
2421
2479
|
children: [c("div", {
|
|
2422
|
-
className:
|
|
2480
|
+
className: Te.b("header"),
|
|
2423
2481
|
children: [c("div", {
|
|
2424
|
-
className:
|
|
2482
|
+
className: Te.be("header", "caption"),
|
|
2425
2483
|
children: "AI "
|
|
2426
2484
|
}), n.children]
|
|
2427
2485
|
}), c("div", {
|
|
2428
|
-
className: "".concat(
|
|
2486
|
+
className: "".concat(Te.e("content"), " pre-wrap-container"),
|
|
2429
2487
|
children: c("span", {
|
|
2430
2488
|
children: e
|
|
2431
2489
|
})
|
|
2432
2490
|
})]
|
|
2433
2491
|
});
|
|
2434
2492
|
};
|
|
2435
|
-
const
|
|
2436
|
-
className:
|
|
2493
|
+
const St = new M("unknown-message"), Ii = (n) => c("div", {
|
|
2494
|
+
className: St.b(),
|
|
2437
2495
|
children: c("div", {
|
|
2438
|
-
className: "".concat(
|
|
2496
|
+
className: "".concat(St.e("content"), " pre-wrap-container"),
|
|
2439
2497
|
children: ["暂未支持的消息类型: ", n.message.type]
|
|
2440
2498
|
})
|
|
2441
2499
|
});
|
|
2442
|
-
const
|
|
2500
|
+
const Di = new M("chat-message-item"), Li = (n) => {
|
|
2443
2501
|
const {
|
|
2444
2502
|
message: e,
|
|
2445
2503
|
size: t
|
|
@@ -2447,17 +2505,17 @@ const Si = new M("chat-message-item"), ki = (n) => {
|
|
|
2447
2505
|
let i = null;
|
|
2448
2506
|
switch (e.type) {
|
|
2449
2507
|
case "DEFAULT":
|
|
2450
|
-
i = e.role === "ASSISTANT" ?
|
|
2508
|
+
i = e.role === "ASSISTANT" ? Ni : $i;
|
|
2451
2509
|
break;
|
|
2452
2510
|
case "ERROR":
|
|
2453
|
-
i =
|
|
2511
|
+
i = Ai;
|
|
2454
2512
|
break;
|
|
2455
2513
|
default:
|
|
2456
|
-
i =
|
|
2514
|
+
i = Ii;
|
|
2457
2515
|
}
|
|
2458
2516
|
return c("div", {
|
|
2459
|
-
className:
|
|
2460
|
-
children:
|
|
2517
|
+
className: Di.b(),
|
|
2518
|
+
children: q(i, {
|
|
2461
2519
|
size: t,
|
|
2462
2520
|
message: e,
|
|
2463
2521
|
controller: n.controller,
|
|
@@ -2548,7 +2606,7 @@ class pe {
|
|
|
2548
2606
|
return this.data.aiChat;
|
|
2549
2607
|
}
|
|
2550
2608
|
}
|
|
2551
|
-
class
|
|
2609
|
+
class qe {
|
|
2552
2610
|
constructor(e) {
|
|
2553
2611
|
this.material = e;
|
|
2554
2612
|
}
|
|
@@ -2565,8 +2623,8 @@ class je {
|
|
|
2565
2623
|
return this.material.data;
|
|
2566
2624
|
}
|
|
2567
2625
|
}
|
|
2568
|
-
const H = new M("chat-toolbar-item"),
|
|
2569
|
-
var f, m,
|
|
2626
|
+
const H = new M("chat-toolbar-item"), zi = (n) => {
|
|
2627
|
+
var f, m, w;
|
|
2570
2628
|
const {
|
|
2571
2629
|
model: e,
|
|
2572
2630
|
data: t,
|
|
@@ -2578,14 +2636,14 @@ const H = new M("chat-toolbar-item"), Ni = (n) => {
|
|
|
2578
2636
|
if (p(e))
|
|
2579
2637
|
return c(Y, {});
|
|
2580
2638
|
const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0, v = (g) => {
|
|
2581
|
-
var T, C,
|
|
2639
|
+
var T, C, x, O;
|
|
2582
2640
|
if (typeof g.icon == "function")
|
|
2583
2641
|
return g.icon();
|
|
2584
2642
|
if ((T = g.icon) != null && T.showIcon && ((C = g.icon) != null && C.cssClass))
|
|
2585
2643
|
return c("i", {
|
|
2586
2644
|
className: g.icon.cssClass
|
|
2587
2645
|
});
|
|
2588
|
-
if ((
|
|
2646
|
+
if ((x = g.icon) != null && x.showIcon && ((O = g.icon) != null && O.imagePath))
|
|
2589
2647
|
return it(g.icon.imagePath) ? c("div", {
|
|
2590
2648
|
dangerouslySetInnerHTML: {
|
|
2591
2649
|
__html: g.icon.imagePath
|
|
@@ -2629,7 +2687,7 @@ const H = new M("chat-toolbar-item"), Ni = (n) => {
|
|
|
2629
2687
|
}), r && c("div", {
|
|
2630
2688
|
ref: h,
|
|
2631
2689
|
className: H.b("dropdown"),
|
|
2632
|
-
children: (
|
|
2690
|
+
children: (w = e.children) == null ? void 0 : w.map((g, T) => {
|
|
2633
2691
|
if (!p(g))
|
|
2634
2692
|
return c("div", {
|
|
2635
2693
|
title: g.title,
|
|
@@ -2647,7 +2705,7 @@ const H = new M("chat-toolbar-item"), Ni = (n) => {
|
|
|
2647
2705
|
})]
|
|
2648
2706
|
});
|
|
2649
2707
|
};
|
|
2650
|
-
const
|
|
2708
|
+
const Hi = new M("chat-toolbar"), et = (n) => {
|
|
2651
2709
|
const {
|
|
2652
2710
|
controller: e,
|
|
2653
2711
|
items: t = [],
|
|
@@ -2655,19 +2713,19 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2655
2713
|
type: s,
|
|
2656
2714
|
className: o,
|
|
2657
2715
|
mode: a
|
|
2658
|
-
} = n, r =
|
|
2716
|
+
} = n, r = pn(rt);
|
|
2659
2717
|
let u = [];
|
|
2660
2718
|
const h = [{
|
|
2661
2719
|
label: "重置对话",
|
|
2662
2720
|
title: "重置对话",
|
|
2663
|
-
icon: () => c(
|
|
2721
|
+
icon: () => c(yi, {}),
|
|
2664
2722
|
onClick: () => {
|
|
2665
2723
|
e.resetTopic();
|
|
2666
2724
|
},
|
|
2667
2725
|
children: [{
|
|
2668
2726
|
label: "清空对话",
|
|
2669
2727
|
title: "清空对话",
|
|
2670
|
-
icon: () => c(
|
|
2728
|
+
icon: () => c(bi, {}),
|
|
2671
2729
|
onClick: () => {
|
|
2672
2730
|
e.clearTopic();
|
|
2673
2731
|
}
|
|
@@ -2675,7 +2733,7 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2675
2733
|
label: "新建对话",
|
|
2676
2734
|
title: "新建对话",
|
|
2677
2735
|
hidden: a !== "TOPIC",
|
|
2678
|
-
icon: () => c(
|
|
2736
|
+
icon: () => c(li, {}),
|
|
2679
2737
|
onClick: () => {
|
|
2680
2738
|
r.newTopic && r.newTopic();
|
|
2681
2739
|
}
|
|
@@ -2683,21 +2741,21 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2683
2741
|
}], p = [{
|
|
2684
2742
|
label: "刷新",
|
|
2685
2743
|
title: "刷新",
|
|
2686
|
-
icon: () => c(
|
|
2744
|
+
icon: () => c(Tt, {}),
|
|
2687
2745
|
onClick: () => {
|
|
2688
2746
|
e.refreshMessage(i);
|
|
2689
2747
|
}
|
|
2690
2748
|
}, {
|
|
2691
2749
|
label: "删除",
|
|
2692
2750
|
title: "删除",
|
|
2693
|
-
icon: () => c(
|
|
2751
|
+
icon: () => c(ii, {}),
|
|
2694
2752
|
onClick: () => {
|
|
2695
2753
|
e.deleteMessage(i);
|
|
2696
2754
|
}
|
|
2697
2755
|
}, {
|
|
2698
2756
|
label: "复制",
|
|
2699
2757
|
title: "复制",
|
|
2700
|
-
icon: () => c(
|
|
2758
|
+
icon: () => c(si, {}),
|
|
2701
2759
|
onClick: () => {
|
|
2702
2760
|
e.copyMessage(i);
|
|
2703
2761
|
}
|
|
@@ -2705,7 +2763,7 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2705
2763
|
r.enableBackFill && p.unshift({
|
|
2706
2764
|
label: "回填",
|
|
2707
2765
|
title: "回填",
|
|
2708
|
-
icon: () => c(
|
|
2766
|
+
icon: () => c(ti, {}),
|
|
2709
2767
|
onClick: () => {
|
|
2710
2768
|
e.backfill(i);
|
|
2711
2769
|
}
|
|
@@ -2713,7 +2771,7 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2713
2771
|
const l = [{
|
|
2714
2772
|
label: "刷新",
|
|
2715
2773
|
title: "刷新",
|
|
2716
|
-
icon: () => c(
|
|
2774
|
+
icon: () => c(Tt, {}),
|
|
2717
2775
|
onClick: () => {
|
|
2718
2776
|
e.refreshMessage(i, !0);
|
|
2719
2777
|
}
|
|
@@ -2740,13 +2798,13 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2740
2798
|
})), f.onClick && typeof f.onClick == "function")
|
|
2741
2799
|
f.onClick(d, f, e.context, e.params, m);
|
|
2742
2800
|
else {
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2801
|
+
const w = n.controller.opts.extendToolbarClick;
|
|
2802
|
+
w && typeof w == "function" && w(d, f, e.context, e.params, m);
|
|
2745
2803
|
}
|
|
2746
2804
|
}, _ = X(() => s === "content" && (i == null ? void 0 : i.state) === 20 && (i == null ? void 0 : i.completed) !== !0, [i == null ? void 0 : i.state, i == null ? void 0 : i.completed]);
|
|
2747
2805
|
return c("div", {
|
|
2748
|
-
className: "".concat(
|
|
2749
|
-
children: u.map((d, f) => c(
|
|
2806
|
+
className: "".concat(Hi.b(), " ").concat(o || ""),
|
|
2807
|
+
children: u.map((d, f) => c(zi, {
|
|
2750
2808
|
data: i,
|
|
2751
2809
|
model: d,
|
|
2752
2810
|
disabled: _,
|
|
@@ -2755,7 +2813,7 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2755
2813
|
}, f))
|
|
2756
2814
|
});
|
|
2757
2815
|
};
|
|
2758
|
-
function
|
|
2816
|
+
function Oi(n, e) {
|
|
2759
2817
|
let t = null;
|
|
2760
2818
|
return function(...i) {
|
|
2761
2819
|
t || (t = setTimeout(() => {
|
|
@@ -2763,7 +2821,7 @@ function Mi(n, e) {
|
|
|
2763
2821
|
}, e));
|
|
2764
2822
|
};
|
|
2765
2823
|
}
|
|
2766
|
-
const
|
|
2824
|
+
const Bi = (n) => {
|
|
2767
2825
|
const e = I(!1), t = I({}), i = new M("chat-back-bottom"), s = I(null), o = () => {
|
|
2768
2826
|
if (s.value) {
|
|
2769
2827
|
const u = n.visibilityHeight || 200, h = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
|
|
@@ -2775,7 +2833,7 @@ const $i = (n) => {
|
|
|
2775
2833
|
top: s.value.scrollHeight,
|
|
2776
2834
|
behavior: "smooth"
|
|
2777
2835
|
}), (u = n.onClick) == null || u.call(n));
|
|
2778
|
-
}, r =
|
|
2836
|
+
}, r = Oi(o, 300);
|
|
2779
2837
|
return X(() => {
|
|
2780
2838
|
t.value = {
|
|
2781
2839
|
right: "".concat(n.right, "px"),
|
|
@@ -2791,12 +2849,12 @@ const $i = (n) => {
|
|
|
2791
2849
|
className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
|
|
2792
2850
|
style: t.value,
|
|
2793
2851
|
onClick: a,
|
|
2794
|
-
children: c(
|
|
2852
|
+
children: c(wi, {
|
|
2795
2853
|
className: i.e("icon")
|
|
2796
2854
|
})
|
|
2797
2855
|
});
|
|
2798
2856
|
};
|
|
2799
|
-
const
|
|
2857
|
+
const xt = new M("chat-messages"), kt = (n) => {
|
|
2800
2858
|
const e = P(null), [t, i] = K(!0), s = P(!1), o = n.controller.messages, a = () => {
|
|
2801
2859
|
const h = e.current;
|
|
2802
2860
|
h && (s.current = !0, h.scrollTo({
|
|
@@ -2823,12 +2881,12 @@ const Tt = new M("chat-messages"), xt = (n) => {
|
|
|
2823
2881
|
};
|
|
2824
2882
|
return c("div", {
|
|
2825
2883
|
ref: e,
|
|
2826
|
-
className:
|
|
2884
|
+
className: xt.b(),
|
|
2827
2885
|
onScroll: r,
|
|
2828
2886
|
children: [o.value.map((h) => {
|
|
2829
2887
|
var l;
|
|
2830
2888
|
const p = ((l = h.content) == null ? void 0 : l.length) || 0;
|
|
2831
|
-
return h.role !== "SYSTEM" ? c(
|
|
2889
|
+
return h.role !== "SYSTEM" ? c(Li, {
|
|
2832
2890
|
size: p,
|
|
2833
2891
|
message: h,
|
|
2834
2892
|
controller: n.controller,
|
|
@@ -2839,20 +2897,20 @@ const Tt = new M("chat-messages"), xt = (n) => {
|
|
|
2839
2897
|
controller: n.controller
|
|
2840
2898
|
})
|
|
2841
2899
|
}, h.messageid) : null;
|
|
2842
|
-
}), c(
|
|
2900
|
+
}), c(Bi, {
|
|
2843
2901
|
right: 20,
|
|
2844
2902
|
bottom: 14,
|
|
2845
|
-
target: ".".concat(
|
|
2903
|
+
target: ".".concat(xt.b()),
|
|
2846
2904
|
onClick: u
|
|
2847
2905
|
})]
|
|
2848
2906
|
});
|
|
2849
2907
|
};
|
|
2850
|
-
function
|
|
2908
|
+
function Pi(n, e) {
|
|
2851
2909
|
for (var t in e)
|
|
2852
2910
|
n[t] = e[t];
|
|
2853
2911
|
return n;
|
|
2854
2912
|
}
|
|
2855
|
-
function
|
|
2913
|
+
function Nt(n, e) {
|
|
2856
2914
|
for (var t in n)
|
|
2857
2915
|
if (t !== "__source" && !(t in e))
|
|
2858
2916
|
return !0;
|
|
@@ -2861,55 +2919,55 @@ function St(n, e) {
|
|
|
2861
2919
|
return !0;
|
|
2862
2920
|
return !1;
|
|
2863
2921
|
}
|
|
2864
|
-
function
|
|
2922
|
+
function Et(n) {
|
|
2865
2923
|
this.props = n;
|
|
2866
2924
|
}
|
|
2867
|
-
(
|
|
2868
|
-
return
|
|
2925
|
+
(Et.prototype = new F()).isPureReactComponent = !0, Et.prototype.shouldComponentUpdate = function(n, e) {
|
|
2926
|
+
return Nt(this.props, n) || Nt(this.state, e);
|
|
2869
2927
|
};
|
|
2870
|
-
var
|
|
2871
|
-
|
|
2872
|
-
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null),
|
|
2928
|
+
var Mt = b.__b;
|
|
2929
|
+
b.__b = function(n) {
|
|
2930
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Mt && Mt(n);
|
|
2873
2931
|
};
|
|
2874
|
-
var
|
|
2875
|
-
|
|
2932
|
+
var Ri = b.__e;
|
|
2933
|
+
b.__e = function(n, e, t, i) {
|
|
2876
2934
|
if (n.then) {
|
|
2877
2935
|
for (var s, o = e; o = o.__; )
|
|
2878
2936
|
if ((s = o.__c) && s.__c)
|
|
2879
2937
|
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
2880
2938
|
}
|
|
2881
|
-
|
|
2939
|
+
Ri(n, e, t, i);
|
|
2882
2940
|
};
|
|
2883
|
-
var
|
|
2884
|
-
function
|
|
2941
|
+
var $t = b.unmount;
|
|
2942
|
+
function kn(n, e, t) {
|
|
2885
2943
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
2886
2944
|
typeof i.__c == "function" && i.__c();
|
|
2887
|
-
}), n.__c.__H = null), (n =
|
|
2888
|
-
return
|
|
2945
|
+
}), n.__c.__H = null), (n = Pi({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
|
|
2946
|
+
return kn(i, e, t);
|
|
2889
2947
|
})), n;
|
|
2890
2948
|
}
|
|
2891
|
-
function
|
|
2949
|
+
function Nn(n, e, t) {
|
|
2892
2950
|
return n && t && (n.__v = null, n.__k = n.__k && n.__k.map(function(i) {
|
|
2893
|
-
return
|
|
2951
|
+
return Nn(i, e, t);
|
|
2894
2952
|
}), n.__c && n.__c.__P === e && (n.__e && t.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
2895
2953
|
}
|
|
2896
2954
|
function Ye() {
|
|
2897
2955
|
this.__u = 0, this.t = null, this.__b = null;
|
|
2898
2956
|
}
|
|
2899
|
-
function
|
|
2957
|
+
function En(n) {
|
|
2900
2958
|
var e = n.__.__c;
|
|
2901
2959
|
return e && e.__a && e.__a(n);
|
|
2902
2960
|
}
|
|
2903
|
-
function
|
|
2961
|
+
function Se() {
|
|
2904
2962
|
this.u = null, this.o = null;
|
|
2905
2963
|
}
|
|
2906
|
-
|
|
2964
|
+
b.unmount = function(n) {
|
|
2907
2965
|
var e = n.__c;
|
|
2908
|
-
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null),
|
|
2966
|
+
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), $t && $t(n);
|
|
2909
2967
|
}, (Ye.prototype = new F()).__c = function(n, e) {
|
|
2910
2968
|
var t = e.__c, i = this;
|
|
2911
2969
|
i.t == null && (i.t = []), i.t.push(t);
|
|
2912
|
-
var s =
|
|
2970
|
+
var s = En(i.__v), o = !1, a = function() {
|
|
2913
2971
|
o || (o = !0, t.__R = null, s ? s(r) : r());
|
|
2914
2972
|
};
|
|
2915
2973
|
t.__R = a;
|
|
@@ -2917,7 +2975,7 @@ w.unmount = function(n) {
|
|
|
2917
2975
|
if (!--i.__u) {
|
|
2918
2976
|
if (i.state.__a) {
|
|
2919
2977
|
var h = i.state.__a;
|
|
2920
|
-
i.__v.__k[0] =
|
|
2978
|
+
i.__v.__k[0] = Nn(h, h.__c.__P, h.__c.__O);
|
|
2921
2979
|
}
|
|
2922
2980
|
var p;
|
|
2923
2981
|
for (i.setState({ __a: i.__b = null }); p = i.t.pop(); )
|
|
@@ -2931,14 +2989,14 @@ w.unmount = function(n) {
|
|
|
2931
2989
|
if (this.__b) {
|
|
2932
2990
|
if (this.__v.__k) {
|
|
2933
2991
|
var t = document.createElement("div"), i = this.__v.__k[0].__c;
|
|
2934
|
-
this.__v.__k[0] =
|
|
2992
|
+
this.__v.__k[0] = kn(this.__b, t, i.__O = i.__P);
|
|
2935
2993
|
}
|
|
2936
2994
|
this.__b = null;
|
|
2937
2995
|
}
|
|
2938
|
-
var s = e.__a &&
|
|
2939
|
-
return s && (s.__h = null), [
|
|
2996
|
+
var s = e.__a && q(Y, null, n.fallback);
|
|
2997
|
+
return s && (s.__h = null), [q(Y, null, e.__a ? null : n.children), s];
|
|
2940
2998
|
};
|
|
2941
|
-
var
|
|
2999
|
+
var At = function(n, e, t) {
|
|
2942
3000
|
if (++t[1] === t[0] && n.o.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.o.size))
|
|
2943
3001
|
for (t = n.u; t; ) {
|
|
2944
3002
|
for (; t.length > 3; )
|
|
@@ -2948,12 +3006,12 @@ var Mt = function(n, e, t) {
|
|
|
2948
3006
|
n.u = t = t[2];
|
|
2949
3007
|
}
|
|
2950
3008
|
};
|
|
2951
|
-
function
|
|
3009
|
+
function Fi(n) {
|
|
2952
3010
|
return this.getChildContext = function() {
|
|
2953
3011
|
return n.context;
|
|
2954
3012
|
}, n.children;
|
|
2955
3013
|
}
|
|
2956
|
-
function
|
|
3014
|
+
function Ui(n) {
|
|
2957
3015
|
var e = this, t = n.i;
|
|
2958
3016
|
e.componentWillUnmount = function() {
|
|
2959
3017
|
ae(null, e.l), e.l = null, e.i = null;
|
|
@@ -2963,34 +3021,34 @@ function Li(n) {
|
|
|
2963
3021
|
this.childNodes.push(i), e.i.appendChild(i);
|
|
2964
3022
|
}, removeChild: function(i) {
|
|
2965
3023
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
|
|
2966
|
-
} }), ae(
|
|
3024
|
+
} }), ae(q(Fi, { context: e.context }, n.__v), e.l);
|
|
2967
3025
|
}
|
|
2968
|
-
function
|
|
2969
|
-
var t =
|
|
3026
|
+
function Wi(n, e) {
|
|
3027
|
+
var t = q(Ui, { __v: n, i: e });
|
|
2970
3028
|
return t.containerInfo = e, t;
|
|
2971
3029
|
}
|
|
2972
|
-
(
|
|
2973
|
-
var e = this, t =
|
|
3030
|
+
(Se.prototype = new F()).__a = function(n) {
|
|
3031
|
+
var e = this, t = En(e.__v), i = e.o.get(n);
|
|
2974
3032
|
return i[0]++, function(s) {
|
|
2975
3033
|
var o = function() {
|
|
2976
|
-
e.props.revealOrder ? (i.push(s),
|
|
3034
|
+
e.props.revealOrder ? (i.push(s), At(e, n, i)) : s();
|
|
2977
3035
|
};
|
|
2978
3036
|
t ? t(o) : o();
|
|
2979
3037
|
};
|
|
2980
|
-
},
|
|
3038
|
+
}, Se.prototype.render = function(n) {
|
|
2981
3039
|
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
2982
|
-
var e =
|
|
3040
|
+
var e = $e(n.children);
|
|
2983
3041
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
2984
3042
|
for (var t = e.length; t--; )
|
|
2985
3043
|
this.o.set(e[t], this.u = [1, 0, this.u]);
|
|
2986
3044
|
return n.children;
|
|
2987
|
-
},
|
|
3045
|
+
}, Se.prototype.componentDidUpdate = Se.prototype.componentDidMount = function() {
|
|
2988
3046
|
var n = this;
|
|
2989
3047
|
this.o.forEach(function(e, t) {
|
|
2990
|
-
|
|
3048
|
+
At(n, t, e);
|
|
2991
3049
|
});
|
|
2992
3050
|
};
|
|
2993
|
-
var
|
|
3051
|
+
var Vi = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, ji = /^(?: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]/, qi = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Yi = /[A-Z0-9]/g, Xi = typeof document < "u", Zi = function(n) {
|
|
2994
3052
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
2995
3053
|
};
|
|
2996
3054
|
F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
@@ -3000,55 +3058,55 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
3000
3058
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
3001
3059
|
} });
|
|
3002
3060
|
});
|
|
3003
|
-
var
|
|
3004
|
-
function
|
|
3061
|
+
var It = b.event;
|
|
3062
|
+
function Gi() {
|
|
3005
3063
|
}
|
|
3006
|
-
function
|
|
3064
|
+
function Ji() {
|
|
3007
3065
|
return this.cancelBubble;
|
|
3008
3066
|
}
|
|
3009
|
-
function
|
|
3067
|
+
function Ki() {
|
|
3010
3068
|
return this.defaultPrevented;
|
|
3011
3069
|
}
|
|
3012
|
-
|
|
3013
|
-
return
|
|
3070
|
+
b.event = function(n) {
|
|
3071
|
+
return It && (n = It(n)), n.persist = Gi, n.isPropagationStopped = Ji, n.isDefaultPrevented = Ki, n.nativeEvent = n;
|
|
3014
3072
|
};
|
|
3015
|
-
var
|
|
3073
|
+
var Qi = { enumerable: !1, configurable: !0, get: function() {
|
|
3016
3074
|
return this.class;
|
|
3017
|
-
} },
|
|
3018
|
-
|
|
3075
|
+
} }, Dt = b.vnode;
|
|
3076
|
+
b.vnode = function(n) {
|
|
3019
3077
|
typeof n.type == "string" && function(e) {
|
|
3020
3078
|
var t = e.props, i = e.type, s = {};
|
|
3021
3079
|
for (var o in t) {
|
|
3022
3080
|
var a = t[o];
|
|
3023
|
-
if (!(o === "value" && "defaultValue" in t && a == null ||
|
|
3081
|
+
if (!(o === "value" && "defaultValue" in t && a == null || Xi && o === "children" && i === "noscript" || o === "class" || o === "className")) {
|
|
3024
3082
|
var r = o.toLowerCase();
|
|
3025
|
-
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : r === "ondoubleclick" ? o = "ondblclick" : r !== "onchange" || i !== "input" && i !== "textarea" ||
|
|
3083
|
+
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : r === "ondoubleclick" ? o = "ondblclick" : r !== "onchange" || i !== "input" && i !== "textarea" || Zi(t.type) ? r === "onfocus" ? o = "onfocusin" : r === "onblur" ? o = "onfocusout" : qi.test(o) ? o = r : i.indexOf("-") === -1 && ji.test(o) ? o = o.replace(Yi, "-$&").toLowerCase() : a === null && (a = void 0) : r = o = "oninput", r === "oninput" && s[o = r] && (o = "oninputCapture"), s[o] = a;
|
|
3026
3084
|
}
|
|
3027
3085
|
}
|
|
3028
|
-
i == "select" && s.multiple && Array.isArray(s.value) && (s.value =
|
|
3086
|
+
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = $e(t.children).forEach(function(u) {
|
|
3029
3087
|
u.props.selected = s.value.indexOf(u.props.value) != -1;
|
|
3030
|
-
})), i == "select" && s.defaultValue != null && (s.value =
|
|
3088
|
+
})), i == "select" && s.defaultValue != null && (s.value = $e(t.children).forEach(function(u) {
|
|
3031
3089
|
u.props.selected = s.multiple ? s.defaultValue.indexOf(u.props.value) != -1 : s.defaultValue == u.props.value;
|
|
3032
|
-
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className",
|
|
3033
|
-
}(n), n.$$typeof =
|
|
3090
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", Qi)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
3091
|
+
}(n), n.$$typeof = Vi, Dt && Dt(n);
|
|
3034
3092
|
};
|
|
3035
|
-
var
|
|
3036
|
-
|
|
3037
|
-
|
|
3093
|
+
var Lt = b.__r;
|
|
3094
|
+
b.__r = function(n) {
|
|
3095
|
+
Lt && Lt(n), n.__c;
|
|
3038
3096
|
};
|
|
3039
|
-
var
|
|
3040
|
-
|
|
3041
|
-
|
|
3097
|
+
var zt = b.diffed;
|
|
3098
|
+
b.diffed = function(n) {
|
|
3099
|
+
zt && zt(n);
|
|
3042
3100
|
var e = n.props, t = n.__e;
|
|
3043
3101
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
3044
3102
|
};
|
|
3045
|
-
var
|
|
3046
|
-
function
|
|
3047
|
-
var e =
|
|
3103
|
+
var ge = /* @__PURE__ */ new Map();
|
|
3104
|
+
function es(n) {
|
|
3105
|
+
var e = ge.get(n);
|
|
3048
3106
|
e && e.destroy();
|
|
3049
3107
|
}
|
|
3050
|
-
function
|
|
3051
|
-
var e =
|
|
3108
|
+
function ts(n) {
|
|
3109
|
+
var e = ge.get(n);
|
|
3052
3110
|
e && e.update();
|
|
3053
3111
|
}
|
|
3054
3112
|
var fe = null;
|
|
@@ -3061,23 +3119,23 @@ typeof window > "u" ? ((fe = function(n) {
|
|
|
3061
3119
|
}) : ((fe = function(n, e) {
|
|
3062
3120
|
return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
|
|
3063
3121
|
return function(i) {
|
|
3064
|
-
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !
|
|
3122
|
+
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !ge.has(i)) {
|
|
3065
3123
|
var s, o = null, a = window.getComputedStyle(i), r = (s = i.value, function() {
|
|
3066
3124
|
h({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
3067
3125
|
}), u = (function(l) {
|
|
3068
3126
|
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input", r), window.removeEventListener("resize", p), Object.keys(l).forEach(function(v) {
|
|
3069
3127
|
return i.style[v] = l[v];
|
|
3070
|
-
}),
|
|
3128
|
+
}), ge.delete(i);
|
|
3071
3129
|
}).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 });
|
|
3072
|
-
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", r), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word",
|
|
3130
|
+
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", r), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", ge.set(i, { destroy: u, update: p }), p();
|
|
3073
3131
|
}
|
|
3074
3132
|
function h(l) {
|
|
3075
|
-
var v, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, m = l.testForHeightReduction,
|
|
3076
|
-
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"),
|
|
3077
|
-
for (var
|
|
3078
|
-
C.parentNode.scrollTop &&
|
|
3133
|
+
var v, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, m = l.testForHeightReduction, w = m === void 0 || m, g = a.overflowY;
|
|
3134
|
+
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (v = function(C) {
|
|
3135
|
+
for (var x = []; C && C.parentNode && C.parentNode instanceof Element; )
|
|
3136
|
+
C.parentNode.scrollTop && x.push([C.parentNode, C.parentNode.scrollTop]), C = C.parentNode;
|
|
3079
3137
|
return function() {
|
|
3080
|
-
return
|
|
3138
|
+
return x.forEach(function(O) {
|
|
3081
3139
|
var L = O[0], U = O[1];
|
|
3082
3140
|
L.style.scrollBehavior = "auto", L.scrollTop = U, L.style.scrollBehavior = null;
|
|
3083
3141
|
});
|
|
@@ -3093,12 +3151,12 @@ typeof window > "u" ? ((fe = function(n) {
|
|
|
3093
3151
|
}(t);
|
|
3094
3152
|
}), n;
|
|
3095
3153
|
}).destroy = function(n) {
|
|
3096
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3154
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], es), n;
|
|
3097
3155
|
}, fe.update = function(n) {
|
|
3098
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3156
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], ts), n;
|
|
3099
3157
|
});
|
|
3100
|
-
var
|
|
3101
|
-
class
|
|
3158
|
+
var Ht = fe, 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
|
+
class Ot {
|
|
3102
3160
|
/**
|
|
3103
3161
|
* 聊天窗触发提问回调
|
|
3104
3162
|
*
|
|
@@ -3124,7 +3182,7 @@ class zt {
|
|
|
3124
3182
|
* @date 2023-10-16 16:10:29
|
|
3125
3183
|
* @type {Signal<ChatMessage[]>}
|
|
3126
3184
|
*/
|
|
3127
|
-
|
|
3185
|
+
S(this, "messages", J([]));
|
|
3128
3186
|
/**
|
|
3129
3187
|
* 素材列表
|
|
3130
3188
|
*
|
|
@@ -3132,7 +3190,7 @@ class zt {
|
|
|
3132
3190
|
* @date 2025-02-27 18:02:46
|
|
3133
3191
|
* @type {Signal<IMaterial[]>}
|
|
3134
3192
|
*/
|
|
3135
|
-
|
|
3193
|
+
S(this, "materials", J([]));
|
|
3136
3194
|
/**
|
|
3137
3195
|
* 聊天框输入值
|
|
3138
3196
|
*
|
|
@@ -3140,7 +3198,7 @@ class zt {
|
|
|
3140
3198
|
* @date 2023-10-16 15:10:43
|
|
3141
3199
|
* @type {Signal<string>}
|
|
3142
3200
|
*/
|
|
3143
|
-
|
|
3201
|
+
S(this, "input", J(""));
|
|
3144
3202
|
/**
|
|
3145
3203
|
* 是否加载中
|
|
3146
3204
|
*
|
|
@@ -3148,7 +3206,7 @@ class zt {
|
|
|
3148
3206
|
* @date 2025-03-10 18:03:42
|
|
3149
3207
|
* @type {Signal<boolean>}
|
|
3150
3208
|
*/
|
|
3151
|
-
|
|
3209
|
+
S(this, "isLoading", J(!1));
|
|
3152
3210
|
/**
|
|
3153
3211
|
* 视图参数
|
|
3154
3212
|
*
|
|
@@ -3156,7 +3214,7 @@ class zt {
|
|
|
3156
3214
|
* @date 2025-02-24 14:02:23
|
|
3157
3215
|
* @type {object}
|
|
3158
3216
|
*/
|
|
3159
|
-
|
|
3217
|
+
S(this, "context");
|
|
3160
3218
|
/**
|
|
3161
3219
|
* 视图参数
|
|
3162
3220
|
*
|
|
@@ -3164,7 +3222,7 @@ class zt {
|
|
|
3164
3222
|
* @date 2025-02-24 14:02:32
|
|
3165
3223
|
* @type {object}
|
|
3166
3224
|
*/
|
|
3167
|
-
|
|
3225
|
+
S(this, "params");
|
|
3168
3226
|
/**
|
|
3169
3227
|
* 应用实体标记
|
|
3170
3228
|
*
|
|
@@ -3172,7 +3230,7 @@ class zt {
|
|
|
3172
3230
|
* @date 2025-02-24 14:02:10
|
|
3173
3231
|
* @type {string}
|
|
3174
3232
|
*/
|
|
3175
|
-
|
|
3233
|
+
S(this, "appDataEntityId");
|
|
3176
3234
|
/**
|
|
3177
3235
|
* 话题标识
|
|
3178
3236
|
*
|
|
@@ -3180,7 +3238,7 @@ class zt {
|
|
|
3180
3238
|
* @date 2025-02-24 18:02:02
|
|
3181
3239
|
* @type {(string | undefined)}
|
|
3182
3240
|
*/
|
|
3183
|
-
|
|
3241
|
+
S(this, "topicId");
|
|
3184
3242
|
/**
|
|
3185
3243
|
* 话题数据
|
|
3186
3244
|
*
|
|
@@ -3188,8 +3246,14 @@ class zt {
|
|
|
3188
3246
|
* @date 2025-03-10 16:03:26
|
|
3189
3247
|
* @type {(ITopic | undefined)}
|
|
3190
3248
|
*/
|
|
3191
|
-
|
|
3192
|
-
|
|
3249
|
+
S(this, "topic");
|
|
3250
|
+
/**
|
|
3251
|
+
* @description 聊天sessionid
|
|
3252
|
+
* @type {string}
|
|
3253
|
+
* @memberof AiChatController
|
|
3254
|
+
*/
|
|
3255
|
+
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 = vt(this.topicId) : this.chatSessionid = vt(me()), this.fecthHistory();
|
|
3193
3257
|
}
|
|
3194
3258
|
/**
|
|
3195
3259
|
* 获取历史记录
|
|
@@ -3200,7 +3264,7 @@ class zt {
|
|
|
3200
3264
|
*/
|
|
3201
3265
|
async fecthHistory() {
|
|
3202
3266
|
if (this.topicId) {
|
|
3203
|
-
const t = await
|
|
3267
|
+
const t = await j.getData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId);
|
|
3204
3268
|
if (t && t.data && t.data.length > 0)
|
|
3205
3269
|
return t.data.forEach((i) => {
|
|
3206
3270
|
const s = {
|
|
@@ -3217,10 +3281,11 @@ class zt {
|
|
|
3217
3281
|
}
|
|
3218
3282
|
return await this.opts.history(this.context, this.params, {
|
|
3219
3283
|
appDataEntityId: this.appDataEntityId,
|
|
3220
|
-
appendCurData: this.opts.appendCurData
|
|
3284
|
+
appendCurData: this.opts.appendCurData,
|
|
3285
|
+
sessionid: this.chatSessionid
|
|
3221
3286
|
}) && this.opts.appendCurContent && this.addMessage({
|
|
3222
3287
|
state: 30,
|
|
3223
|
-
messageid:
|
|
3288
|
+
messageid: me(),
|
|
3224
3289
|
role: "USER",
|
|
3225
3290
|
type: "DEFAULT",
|
|
3226
3291
|
content: this.opts.appendCurContent,
|
|
@@ -3242,7 +3307,7 @@ class zt {
|
|
|
3242
3307
|
data: this.messages.value.map((t) => t._origin),
|
|
3243
3308
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
3244
3309
|
};
|
|
3245
|
-
await
|
|
3310
|
+
await j.updateData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, e);
|
|
3246
3311
|
}
|
|
3247
3312
|
/**
|
|
3248
3313
|
* 设置聊天框值
|
|
@@ -3289,7 +3354,8 @@ class zt {
|
|
|
3289
3354
|
t !== -1 ? (this.messages.value[t] = new V(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new V(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
|
|
3290
3355
|
appDataEntityId: this.appDataEntityId,
|
|
3291
3356
|
message: {
|
|
3292
|
-
messages: [e]
|
|
3357
|
+
messages: [e],
|
|
3358
|
+
sessionid: this.chatSessionid
|
|
3293
3359
|
}
|
|
3294
3360
|
}).then((i) => {
|
|
3295
3361
|
i && i.content && this.updateRecommendPrompt(e, i.content);
|
|
@@ -3327,7 +3393,7 @@ class zt {
|
|
|
3327
3393
|
s.state && s.state === "successed" && t.push(i);
|
|
3328
3394
|
} else
|
|
3329
3395
|
t.push(i);
|
|
3330
|
-
}), this.materials.value = []), t && t.length > 0 && (e =
|
|
3396
|
+
}), this.materials.value = []), t && t.length > 0 && (e = an.stringify(t)), e;
|
|
3331
3397
|
}
|
|
3332
3398
|
/**
|
|
3333
3399
|
* 提问
|
|
@@ -3345,13 +3411,13 @@ class zt {
|
|
|
3345
3411
|
let t = this.stringlyMaterialResource();
|
|
3346
3412
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
3347
3413
|
state: 30,
|
|
3348
|
-
messageid:
|
|
3414
|
+
messageid: me(),
|
|
3349
3415
|
role: "USER",
|
|
3350
3416
|
type: "DEFAULT",
|
|
3351
3417
|
content: t
|
|
3352
3418
|
}), await this.opts.question(this, this.context, this.params, {
|
|
3353
3419
|
appDataEntityId: this.appDataEntityId
|
|
3354
|
-
}, this.messages.value.filter((i) => i.type !== "ERROR").map((i) => i._origin)), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
3420
|
+
}, this.messages.value.filter((i) => i.type !== "ERROR").map((i) => i._origin), this.chatSessionid), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
3355
3421
|
} finally {
|
|
3356
3422
|
this.isLoading.value = !1;
|
|
3357
3423
|
}
|
|
@@ -3402,11 +3468,11 @@ class zt {
|
|
|
3402
3468
|
if (t)
|
|
3403
3469
|
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, {
|
|
3404
3470
|
appDataEntityId: this.appDataEntityId
|
|
3405
|
-
}, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
|
|
3471
|
+
}, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin), this.chatSessionid);
|
|
3406
3472
|
else if (i === this.messages.value.length - 1)
|
|
3407
3473
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3408
3474
|
appDataEntityId: this.appDataEntityId
|
|
3409
|
-
}, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
|
|
3475
|
+
}, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin), this.chatSessionid);
|
|
3410
3476
|
else {
|
|
3411
3477
|
const s = this.messages.value[i - 1].content;
|
|
3412
3478
|
this.messages.value.splice(i - 1, 2), this.question(s);
|
|
@@ -3424,7 +3490,7 @@ class zt {
|
|
|
3424
3490
|
*/
|
|
3425
3491
|
copyMessage(e) {
|
|
3426
3492
|
const t = e.realcontent;
|
|
3427
|
-
|
|
3493
|
+
on.copy(t), this.opts.action && this.opts.action("copymsg", e);
|
|
3428
3494
|
}
|
|
3429
3495
|
/**
|
|
3430
3496
|
* 重置对话
|
|
@@ -3432,9 +3498,10 @@ class zt {
|
|
|
3432
3498
|
* @memberof AiChatController
|
|
3433
3499
|
*/
|
|
3434
3500
|
async resetTopic() {
|
|
3435
|
-
await this.abortQuestion(), this.topicId && await
|
|
3501
|
+
await this.abortQuestion(), this.topicId && await j.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [], this.opts.history(this.context, this.params, {
|
|
3436
3502
|
appDataEntityId: this.appDataEntityId,
|
|
3437
|
-
appendCurData: this.opts.appendCurData
|
|
3503
|
+
appendCurData: this.opts.appendCurData,
|
|
3504
|
+
sessionid: this.chatSessionid
|
|
3438
3505
|
});
|
|
3439
3506
|
}
|
|
3440
3507
|
/**
|
|
@@ -3444,7 +3511,7 @@ class zt {
|
|
|
3444
3511
|
* @date 2025-03-18 17:03:57
|
|
3445
3512
|
*/
|
|
3446
3513
|
async clearTopic() {
|
|
3447
|
-
await this.abortQuestion(), this.topicId && await
|
|
3514
|
+
await this.abortQuestion(), this.topicId && await j.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [];
|
|
3448
3515
|
}
|
|
3449
3516
|
/**
|
|
3450
3517
|
* 新增素材资源
|
|
@@ -3454,7 +3521,7 @@ class zt {
|
|
|
3454
3521
|
* @param {IMaterial} data
|
|
3455
3522
|
*/
|
|
3456
3523
|
addMaterial(e) {
|
|
3457
|
-
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new
|
|
3524
|
+
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new qe(e)];
|
|
3458
3525
|
}
|
|
3459
3526
|
/**
|
|
3460
3527
|
* 替换素材资源
|
|
@@ -3466,7 +3533,7 @@ class zt {
|
|
|
3466
3533
|
*/
|
|
3467
3534
|
replaceMaterial(e, t) {
|
|
3468
3535
|
const i = this.materials.value.findIndex((s) => s.id === e);
|
|
3469
|
-
i !== -1 ? (this.materials.value[i] = new
|
|
3536
|
+
i !== -1 ? (this.materials.value[i] = new qe(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new qe(t)];
|
|
3470
3537
|
}
|
|
3471
3538
|
/**
|
|
3472
3539
|
* 删除指定素材资源
|
|
@@ -3492,7 +3559,7 @@ class zt {
|
|
|
3492
3559
|
return;
|
|
3493
3560
|
const i = this.messages.value.findIndex((o) => o.messageid === e.messageid), {
|
|
3494
3561
|
suggestions: s
|
|
3495
|
-
} =
|
|
3562
|
+
} = Vn.parseMixedContent(t);
|
|
3496
3563
|
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new V(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new V(e)], this.asyncToIndexDB());
|
|
3497
3564
|
}
|
|
3498
3565
|
/**
|
|
@@ -3540,7 +3607,7 @@ class zt {
|
|
|
3540
3607
|
}
|
|
3541
3608
|
}
|
|
3542
3609
|
}
|
|
3543
|
-
class
|
|
3610
|
+
class ns {
|
|
3544
3611
|
/**
|
|
3545
3612
|
* Creates an instance of AiTopicController.
|
|
3546
3613
|
* @author tony001
|
|
@@ -3555,7 +3622,7 @@ class Xi {
|
|
|
3555
3622
|
* @date 2025-02-20 16:02:38
|
|
3556
3623
|
* @type {Signal<ChatTopic[]>}
|
|
3557
3624
|
*/
|
|
3558
|
-
|
|
3625
|
+
S(this, "topics", J([]));
|
|
3559
3626
|
/**
|
|
3560
3627
|
* 激活话题
|
|
3561
3628
|
*
|
|
@@ -3563,7 +3630,7 @@ class Xi {
|
|
|
3563
3630
|
* @date 2025-02-24 16:02:44
|
|
3564
3631
|
* @type {(Signal<ITopic | undefined>)}
|
|
3565
3632
|
*/
|
|
3566
|
-
|
|
3633
|
+
S(this, "activedTopic", J(void 0));
|
|
3567
3634
|
/**
|
|
3568
3635
|
* 当前话题配置备份
|
|
3569
3636
|
*
|
|
@@ -3572,7 +3639,7 @@ class Xi {
|
|
|
3572
3639
|
* @public
|
|
3573
3640
|
* @type {(ITopicOptions | undefined)}
|
|
3574
3641
|
*/
|
|
3575
|
-
|
|
3642
|
+
S(this, "currentTopicOptions");
|
|
3576
3643
|
this.chat = e;
|
|
3577
3644
|
}
|
|
3578
3645
|
/**
|
|
@@ -3639,7 +3706,7 @@ class Xi {
|
|
|
3639
3706
|
url: l.url,
|
|
3640
3707
|
aiChat: l.aiChat
|
|
3641
3708
|
})), h = e.configService(e.appid, "aitopics", e.type);
|
|
3642
|
-
await (h == null ? void 0 : h.save(u)), await
|
|
3709
|
+
await (h == null ? void 0 : h.save(u)), await j.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]);
|
|
3643
3710
|
}
|
|
3644
3711
|
/**
|
|
3645
3712
|
* 更新话题数据
|
|
@@ -3747,7 +3814,7 @@ class Xi {
|
|
|
3747
3814
|
return;
|
|
3748
3815
|
await Promise.all(this.topics.value.map((a) => {
|
|
3749
3816
|
if (a.id !== (e == null ? void 0 : e.id))
|
|
3750
|
-
return
|
|
3817
|
+
return j.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, a.id);
|
|
3751
3818
|
})), this.topics.value = e ? [e] : [];
|
|
3752
3819
|
const i = (o = this.currentTopicOptions) == null ? void 0 : o.configService(this.currentTopicOptions.appid, "aitopics", this.currentTopicOptions.type), s = this.topics.value.map((a) => ({
|
|
3753
3820
|
appid: a.appid,
|
|
@@ -3761,12 +3828,12 @@ class Xi {
|
|
|
3761
3828
|
await (i == null ? void 0 : i.save(s));
|
|
3762
3829
|
}
|
|
3763
3830
|
}
|
|
3764
|
-
class
|
|
3831
|
+
class Mn {
|
|
3765
3832
|
constructor(e) {
|
|
3766
3833
|
this.aiChat = e;
|
|
3767
3834
|
}
|
|
3768
3835
|
}
|
|
3769
|
-
class
|
|
3836
|
+
class is extends Mn {
|
|
3770
3837
|
/**
|
|
3771
3838
|
* 执行操作
|
|
3772
3839
|
*
|
|
@@ -3795,7 +3862,7 @@ class Zi extends Tn {
|
|
|
3795
3862
|
}
|
|
3796
3863
|
}
|
|
3797
3864
|
}
|
|
3798
|
-
class
|
|
3865
|
+
class ss extends Mn {
|
|
3799
3866
|
/**
|
|
3800
3867
|
* 执行操作
|
|
3801
3868
|
*
|
|
@@ -3860,7 +3927,7 @@ class Gi extends Tn {
|
|
|
3860
3927
|
l == null || l(d, f);
|
|
3861
3928
|
}
|
|
3862
3929
|
};
|
|
3863
|
-
new
|
|
3930
|
+
new Wn(v).openFilePicker();
|
|
3864
3931
|
}
|
|
3865
3932
|
/**
|
|
3866
3933
|
* 构建素材对象
|
|
@@ -3886,17 +3953,17 @@ class Gi extends Tn {
|
|
|
3886
3953
|
};
|
|
3887
3954
|
}
|
|
3888
3955
|
}
|
|
3889
|
-
class
|
|
3956
|
+
class Bt {
|
|
3890
3957
|
static getMaterialHelper(e, t) {
|
|
3891
3958
|
switch (e) {
|
|
3892
3959
|
case "ossfile":
|
|
3893
|
-
return new
|
|
3960
|
+
return new ss(t);
|
|
3894
3961
|
default:
|
|
3895
|
-
return new
|
|
3962
|
+
return new is(t);
|
|
3896
3963
|
}
|
|
3897
3964
|
}
|
|
3898
3965
|
}
|
|
3899
|
-
class
|
|
3966
|
+
class os {
|
|
3900
3967
|
/**
|
|
3901
3968
|
* Creates an instance of ChatController.
|
|
3902
3969
|
* @author tony001
|
|
@@ -3911,7 +3978,7 @@ class Ji {
|
|
|
3911
3978
|
* @protected
|
|
3912
3979
|
* @type {HTMLDivElement}
|
|
3913
3980
|
*/
|
|
3914
|
-
|
|
3981
|
+
S(this, "container");
|
|
3915
3982
|
/**
|
|
3916
3983
|
* 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
|
|
3917
3984
|
*
|
|
@@ -3920,7 +3987,7 @@ class Ji {
|
|
|
3920
3987
|
* @protected
|
|
3921
3988
|
* @type {('DEFAULT' | 'TOPIC')}
|
|
3922
3989
|
*/
|
|
3923
|
-
|
|
3990
|
+
S(this, "mode", "DEFAULT");
|
|
3924
3991
|
/**
|
|
3925
3992
|
* 是否挂载ai话题
|
|
3926
3993
|
*
|
|
@@ -3929,7 +3996,7 @@ class Ji {
|
|
|
3929
3996
|
* @protected
|
|
3930
3997
|
* @type {boolean}
|
|
3931
3998
|
*/
|
|
3932
|
-
|
|
3999
|
+
S(this, "isMountedAiTopic", !1);
|
|
3933
4000
|
/**
|
|
3934
4001
|
* 容器配置备份
|
|
3935
4002
|
*
|
|
@@ -3938,7 +4005,7 @@ class Ji {
|
|
|
3938
4005
|
* @protected
|
|
3939
4006
|
* @type {(IContainerOptions | undefined)}
|
|
3940
4007
|
*/
|
|
3941
|
-
|
|
4008
|
+
S(this, "backupChatOptions");
|
|
3942
4009
|
/**
|
|
3943
4010
|
* 话题控制器
|
|
3944
4011
|
*
|
|
@@ -3947,7 +4014,7 @@ class Ji {
|
|
|
3947
4014
|
* @public
|
|
3948
4015
|
* @type {AiTopicController}
|
|
3949
4016
|
*/
|
|
3950
|
-
|
|
4017
|
+
S(this, "aiTopic");
|
|
3951
4018
|
/**
|
|
3952
4019
|
* 话题map
|
|
3953
4020
|
*
|
|
@@ -3955,8 +4022,8 @@ class Ji {
|
|
|
3955
4022
|
* @type {Map<string, AiChatController>}
|
|
3956
4023
|
* @memberof ChatController
|
|
3957
4024
|
*/
|
|
3958
|
-
|
|
3959
|
-
this.aiTopic = new
|
|
4025
|
+
S(this, "aiTopicMap", /* @__PURE__ */ new Map());
|
|
4026
|
+
this.aiTopic = new ns(this);
|
|
3960
4027
|
}
|
|
3961
4028
|
/**
|
|
3962
4029
|
* 聊天控制器
|
|
@@ -3977,7 +4044,7 @@ class Ji {
|
|
|
3977
4044
|
* @return {*} {Promise<void>}
|
|
3978
4045
|
*/
|
|
3979
4046
|
async initIndexDB() {
|
|
3980
|
-
await
|
|
4047
|
+
await j.checkTableExists(E.DATA_BASE_NAME, E.DATA_TABLE_NAME) || await j.createTable(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, E.DATA_TABLE_KEY_NAME, !1);
|
|
3981
4048
|
}
|
|
3982
4049
|
/**
|
|
3983
4050
|
* 创建聊天窗口(会同时显示出来)
|
|
@@ -4009,8 +4076,8 @@ class Ji {
|
|
|
4009
4076
|
topicId: i == null ? void 0 : i.id,
|
|
4010
4077
|
topic: i
|
|
4011
4078
|
});
|
|
4012
|
-
const s = new
|
|
4013
|
-
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ae(
|
|
4079
|
+
const s = new Ot(t);
|
|
4080
|
+
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ae(q(Ft, {
|
|
4014
4081
|
aiChat: s,
|
|
4015
4082
|
aiTopic: this.aiTopic,
|
|
4016
4083
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
@@ -4060,7 +4127,7 @@ class Ji {
|
|
|
4060
4127
|
recommendPrompt: this.backupChatOptions.chatOptions.recommendPrompt
|
|
4061
4128
|
});
|
|
4062
4129
|
let i;
|
|
4063
|
-
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new
|
|
4130
|
+
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new Ot(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (ae(null, this.container), ae(q(Ft, {
|
|
4064
4131
|
aiChat: i,
|
|
4065
4132
|
aiTopic: this.aiTopic,
|
|
4066
4133
|
mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
@@ -4109,19 +4176,19 @@ class Ji {
|
|
|
4109
4176
|
this.container && (ae(null, this.container), this.container.remove(), this.container = void 0);
|
|
4110
4177
|
}
|
|
4111
4178
|
}
|
|
4112
|
-
const
|
|
4113
|
-
const
|
|
4179
|
+
const vs = new os();
|
|
4180
|
+
const as = new M("chat-input-material"), rs = (n) => {
|
|
4114
4181
|
const e = n.controller.materials;
|
|
4115
4182
|
return c("div", {
|
|
4116
|
-
className:
|
|
4117
|
-
children: e.value.map((t) => c(
|
|
4183
|
+
className: as.b(),
|
|
4184
|
+
children: e.value.map((t) => c(xn, {
|
|
4118
4185
|
material: t,
|
|
4119
4186
|
disabled: !1,
|
|
4120
4187
|
controller: n.controller
|
|
4121
4188
|
}, t.id))
|
|
4122
4189
|
});
|
|
4123
4190
|
};
|
|
4124
|
-
const
|
|
4191
|
+
const $n = ({
|
|
4125
4192
|
children: n,
|
|
4126
4193
|
actions: e,
|
|
4127
4194
|
// 接收行为数据
|
|
@@ -4132,7 +4199,7 @@ const xn = ({
|
|
|
4132
4199
|
onAction: a
|
|
4133
4200
|
// 接收行为事件回调
|
|
4134
4201
|
}) => {
|
|
4135
|
-
const r = new M("pop"), u =
|
|
4202
|
+
const r = new M("pop"), u = pn(rt), [h, p] = K(s || !1), l = P(null), v = P(null);
|
|
4136
4203
|
D(() => {
|
|
4137
4204
|
s !== void 0 && p(s);
|
|
4138
4205
|
}, [s]), D(() => (v.current || (v.current = document.createElement("div"), v.current.className = r.b("content-container"), document.body.appendChild(v.current)), () => {
|
|
@@ -4189,7 +4256,7 @@ const xn = ({
|
|
|
4189
4256
|
p(f), o == null || o(f);
|
|
4190
4257
|
},
|
|
4191
4258
|
children: n
|
|
4192
|
-
}), h && v.current &&
|
|
4259
|
+
}), h && v.current && Wi(c("div", {
|
|
4193
4260
|
className: "".concat(r.b(), " pop-").concat(i),
|
|
4194
4261
|
style: _(),
|
|
4195
4262
|
children: t || (e == null ? void 0 : e.map((d) => c("div", {
|
|
@@ -4205,32 +4272,36 @@ const xn = ({
|
|
|
4205
4272
|
}, d.id)))
|
|
4206
4273
|
}), v.current)]
|
|
4207
4274
|
});
|
|
4208
|
-
}
|
|
4275
|
+
};
|
|
4276
|
+
const $ = new M("chat-input"), Pt = window.SpeechRecognition || window.webkitSpeechRecognition, Rt = (n) => {
|
|
4209
4277
|
var f;
|
|
4210
4278
|
const [e, t] = K(!1), i = P(null), s = n.controller.input, o = I(!1), a = P();
|
|
4211
|
-
|
|
4279
|
+
Pt && !a.current && (a.current = new Pt(), a.current.onstart = () => {
|
|
4212
4280
|
o.value = !0;
|
|
4213
4281
|
}, a.current.onend = () => {
|
|
4214
4282
|
o.value = !1;
|
|
4215
4283
|
}, a.current.onresult = (m) => {
|
|
4216
4284
|
var g, T, C;
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4285
|
+
const w = (C = (T = (g = m.results) == null ? void 0 : g[0]) == null ? void 0 : T[0]) == null ? void 0 : C.transcript;
|
|
4286
|
+
w && (s.value = "".concat(s.value).concat(w));
|
|
4219
4287
|
});
|
|
4220
4288
|
const r = () => {
|
|
4221
4289
|
a.current && !o.value && a.current.start();
|
|
4222
4290
|
}, u = Fe((m) => {
|
|
4223
4291
|
s.value = m.target.value;
|
|
4224
4292
|
}, [s]), h = B(() => s.value.length <= 0);
|
|
4225
|
-
D(() => (i.current &&
|
|
4226
|
-
i.current &&
|
|
4293
|
+
D(() => (i.current && Ht(i.current), () => {
|
|
4294
|
+
i.current && Ht.destroy(i.current);
|
|
4227
4295
|
}), [i]);
|
|
4228
4296
|
const p = Fe(async () => {
|
|
4297
|
+
var m;
|
|
4229
4298
|
try {
|
|
4230
|
-
const
|
|
4231
|
-
s.value = "", await n.controller.question(
|
|
4232
|
-
} catch (
|
|
4233
|
-
console.error(
|
|
4299
|
+
const w = s.value;
|
|
4300
|
+
s.value = "", await n.controller.question(w);
|
|
4301
|
+
} catch (w) {
|
|
4302
|
+
console.error(w);
|
|
4303
|
+
} finally {
|
|
4304
|
+
(m = i.current) == null || m.focus();
|
|
4234
4305
|
}
|
|
4235
4306
|
}, [s]), l = Fe(async () => {
|
|
4236
4307
|
try {
|
|
@@ -4241,15 +4312,15 @@ const xn = ({
|
|
|
4241
4312
|
}, [s]), v = (m) => {
|
|
4242
4313
|
m.code === "Enter" && !m.isComposing && (m.stopPropagation(), m.shiftKey === !1 && p());
|
|
4243
4314
|
}, _ = async (m) => {
|
|
4244
|
-
await
|
|
4245
|
-
}, d = async (m,
|
|
4246
|
-
await
|
|
4315
|
+
await Bt.getMaterialHelper("ossfile", n.controller).excuteAction(m), t(!1);
|
|
4316
|
+
}, d = async (m, w) => {
|
|
4317
|
+
await Bt.getMaterialHelper("common", n.controller).excuteAction(m, w), t(!1);
|
|
4247
4318
|
};
|
|
4248
4319
|
return c("div", {
|
|
4249
4320
|
className: $.b("wrapper"),
|
|
4250
4321
|
children: [c("div", {
|
|
4251
4322
|
className: $.b("material-wrapper"),
|
|
4252
|
-
children: c(
|
|
4323
|
+
children: c(rs, {
|
|
4253
4324
|
controller: n.controller
|
|
4254
4325
|
})
|
|
4255
4326
|
}), c("div", {
|
|
@@ -4271,7 +4342,7 @@ const xn = ({
|
|
|
4271
4342
|
children: [c("div", {
|
|
4272
4343
|
className: "".concat($.be("action-wrapper", "action-item"), " ").concat($.is("disabled", n.controller.isLoading.value)),
|
|
4273
4344
|
title: "上传资料",
|
|
4274
|
-
children: c(
|
|
4345
|
+
children: c($n, {
|
|
4275
4346
|
content: c("div", {
|
|
4276
4347
|
className: $.b("pop-actions"),
|
|
4277
4348
|
children: [c("div", {
|
|
@@ -4281,13 +4352,13 @@ const xn = ({
|
|
|
4281
4352
|
},
|
|
4282
4353
|
children: [c("span", {
|
|
4283
4354
|
className: $.b("pop-action-item-icon"),
|
|
4284
|
-
children: c(
|
|
4355
|
+
children: c(Sn, {})
|
|
4285
4356
|
}), c("span", {
|
|
4286
4357
|
className: $.b("pop-action-item-title"),
|
|
4287
4358
|
children: "文件资料"
|
|
4288
4359
|
})]
|
|
4289
4360
|
}), (f = n.questionToolbarItems) == null ? void 0 : f.map((m) => {
|
|
4290
|
-
var
|
|
4361
|
+
var w, g, T;
|
|
4291
4362
|
return c("div", {
|
|
4292
4363
|
className: $.b("pop-action-item"),
|
|
4293
4364
|
onClick: (C) => {
|
|
@@ -4295,7 +4366,7 @@ const xn = ({
|
|
|
4295
4366
|
},
|
|
4296
4367
|
children: [c("span", {
|
|
4297
4368
|
className: $.b("pop-action-item-icon"),
|
|
4298
|
-
children: typeof m.icon == "function" ? m.icon() : ((
|
|
4369
|
+
children: typeof m.icon == "function" ? m.icon() : ((w = m.icon) == null ? void 0 : w.showIcon) && c(Y, {
|
|
4299
4370
|
children: (g = m.icon) != null && g.cssClass ? c("i", {
|
|
4300
4371
|
className: m.icon.cssClass
|
|
4301
4372
|
}) : (T = m.icon) != null && T.imagePath ? it(m.icon.imagePath) ? c("div", {
|
|
@@ -4316,29 +4387,29 @@ const xn = ({
|
|
|
4316
4387
|
position: "top-left",
|
|
4317
4388
|
isOpen: e,
|
|
4318
4389
|
onToggleOpen: t,
|
|
4319
|
-
children: c(
|
|
4390
|
+
children: c(vi, {})
|
|
4320
4391
|
})
|
|
4321
4392
|
}), c("div", {
|
|
4322
4393
|
title: o.value ? "语音输入中..." : "语音输入",
|
|
4323
4394
|
className: "".concat($.be("action-wrapper", "action-item"), " ").concat($.is("disabled", n.controller.isLoading.value)),
|
|
4324
4395
|
onClick: r,
|
|
4325
|
-
children: o.value ? c(
|
|
4396
|
+
children: o.value ? c(di, {}) : c(ui, {})
|
|
4326
4397
|
}), n.controller.isLoading.value ? c("div", {
|
|
4327
4398
|
title: "停止生成",
|
|
4328
4399
|
className: "".concat($.be("action-wrapper", "action-item")),
|
|
4329
4400
|
onClick: l,
|
|
4330
|
-
children: c(
|
|
4401
|
+
children: c(gi, {})
|
|
4331
4402
|
}) : c("div", {
|
|
4332
4403
|
title: "发送消息",
|
|
4333
4404
|
className: "".concat($.be("action-wrapper", "action-item"), " ").concat($.is("disabled", h.value)),
|
|
4334
4405
|
onClick: p,
|
|
4335
|
-
children: c(
|
|
4406
|
+
children: c(ni, {})
|
|
4336
4407
|
})]
|
|
4337
4408
|
})]
|
|
4338
4409
|
})]
|
|
4339
4410
|
});
|
|
4340
4411
|
};
|
|
4341
|
-
const R = new M("chat-topic-item"),
|
|
4412
|
+
const R = new M("chat-topic-item"), cs = (n) => {
|
|
4342
4413
|
const {
|
|
4343
4414
|
controller: e,
|
|
4344
4415
|
topic: t,
|
|
@@ -4351,8 +4422,8 @@ const R = new M("chat-topic-item"), es = (n) => {
|
|
|
4351
4422
|
f.stopPropagation(), s("LINK", f);
|
|
4352
4423
|
}, l = (f, m) => {
|
|
4353
4424
|
f === "DELETE" ? s("DELETE", m) : f === "RENAME" && (h.value = !0, setTimeout(() => {
|
|
4354
|
-
var
|
|
4355
|
-
(
|
|
4425
|
+
var w;
|
|
4426
|
+
(w = o.current) == null || w.focus();
|
|
4356
4427
|
}, 100)), u(!1);
|
|
4357
4428
|
}, v = (f) => {
|
|
4358
4429
|
var m;
|
|
@@ -4386,18 +4457,18 @@ const R = new M("chat-topic-item"), es = (n) => {
|
|
|
4386
4457
|
title: "跳转主视图",
|
|
4387
4458
|
className: R.em("icon", "item"),
|
|
4388
4459
|
onClick: p.bind(void 0),
|
|
4389
|
-
children: c(
|
|
4460
|
+
children: c(pi, {
|
|
4390
4461
|
className: R.b("link-icon")
|
|
4391
4462
|
})
|
|
4392
|
-
}), a.value ? null : c(
|
|
4463
|
+
}), a.value ? null : c($n, {
|
|
4393
4464
|
actions: [{
|
|
4394
4465
|
id: "RENAME",
|
|
4395
4466
|
caption: "重命名",
|
|
4396
|
-
icon: c(
|
|
4467
|
+
icon: c(Ci, {})
|
|
4397
4468
|
}, {
|
|
4398
4469
|
id: "DELETE",
|
|
4399
4470
|
caption: "删除话题",
|
|
4400
|
-
icon: c(
|
|
4471
|
+
icon: c(Tn, {})
|
|
4401
4472
|
}],
|
|
4402
4473
|
position: "bottom",
|
|
4403
4474
|
isOpen: r,
|
|
@@ -4406,7 +4477,7 @@ const R = new M("chat-topic-item"), es = (n) => {
|
|
|
4406
4477
|
children: c("span", {
|
|
4407
4478
|
className: R.em("icon", "item"),
|
|
4408
4479
|
title: "更多",
|
|
4409
|
-
children: c(
|
|
4480
|
+
children: c(hi, {
|
|
4410
4481
|
className: R.e("more-icon")
|
|
4411
4482
|
})
|
|
4412
4483
|
})
|
|
@@ -4414,7 +4485,7 @@ const R = new M("chat-topic-item"), es = (n) => {
|
|
|
4414
4485
|
})]
|
|
4415
4486
|
});
|
|
4416
4487
|
};
|
|
4417
|
-
const xe = new M("chat-search"),
|
|
4488
|
+
const xe = new M("chat-search"), ls = (n) => {
|
|
4418
4489
|
const {
|
|
4419
4490
|
className: e,
|
|
4420
4491
|
value: t,
|
|
@@ -4428,7 +4499,7 @@ const xe = new M("chat-search"), ts = (n) => {
|
|
|
4428
4499
|
className: "".concat(xe.b(), " ").concat(xe.is("focus", o), " ").concat(e || ""),
|
|
4429
4500
|
children: [c("div", {
|
|
4430
4501
|
className: xe.e("prefix"),
|
|
4431
|
-
children: c(
|
|
4502
|
+
children: c(Si, {})
|
|
4432
4503
|
}), c("input", {
|
|
4433
4504
|
value: t,
|
|
4434
4505
|
className: xe.e("inner"),
|
|
@@ -4439,7 +4510,7 @@ const xe = new M("chat-search"), ts = (n) => {
|
|
|
4439
4510
|
})]
|
|
4440
4511
|
});
|
|
4441
4512
|
};
|
|
4442
|
-
const se = new M("chat-topics"),
|
|
4513
|
+
const se = new M("chat-topics"), us = (n) => {
|
|
4443
4514
|
const e = P(null), t = I(void 0), i = I([]);
|
|
4444
4515
|
D(() => {
|
|
4445
4516
|
i.value = n.controller.topics.value.filter((r) => {
|
|
@@ -4470,7 +4541,7 @@ const se = new M("chat-topics"), ns = (n) => {
|
|
|
4470
4541
|
className: se.b(),
|
|
4471
4542
|
children: [c("div", {
|
|
4472
4543
|
className: se.e("header"),
|
|
4473
|
-
children: c(
|
|
4544
|
+
children: c(ls, {
|
|
4474
4545
|
value: t.value,
|
|
4475
4546
|
placeholder: "搜索话题",
|
|
4476
4547
|
onChange: a.bind(void 0)
|
|
@@ -4478,7 +4549,7 @@ const se = new M("chat-topics"), ns = (n) => {
|
|
|
4478
4549
|
}), c("div", {
|
|
4479
4550
|
ref: e,
|
|
4480
4551
|
className: se.e("main"),
|
|
4481
|
-
children: i.value && i.value.length > 0 ? i.value.map((r) => c(
|
|
4552
|
+
children: i.value && i.value.length > 0 ? i.value.map((r) => c(cs, {
|
|
4482
4553
|
topic: r,
|
|
4483
4554
|
controller: n.controller,
|
|
4484
4555
|
onClick: () => s(r),
|
|
@@ -4493,14 +4564,14 @@ const se = new M("chat-topics"), ns = (n) => {
|
|
|
4493
4564
|
title: "清空会话",
|
|
4494
4565
|
className: se.e("action"),
|
|
4495
4566
|
onClick: () => n.controller.clearTopic(),
|
|
4496
|
-
children: [c(
|
|
4567
|
+
children: [c(Tn, {}), c("span", {
|
|
4497
4568
|
children: "清空会话"
|
|
4498
4569
|
})]
|
|
4499
4570
|
})
|
|
4500
4571
|
})]
|
|
4501
4572
|
});
|
|
4502
4573
|
};
|
|
4503
|
-
const oe = new M("chat-minimize"),
|
|
4574
|
+
const oe = new M("chat-minimize"), ds = (n) => {
|
|
4504
4575
|
const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1), r = {
|
|
4505
4576
|
x: (window.innerWidth - 86) / window.innerWidth,
|
|
4506
4577
|
y: (window.innerHeight - 86) / window.innerHeight
|
|
@@ -4509,9 +4580,9 @@ const oe = new M("chat-minimize"), is = (n) => {
|
|
|
4509
4580
|
return d ? d.role === "ASSISTANT" && d.state === 20 && d.completed !== !0 : !1;
|
|
4510
4581
|
}), h = (d) => {
|
|
4511
4582
|
const f = d.indexOf("<think>"), m = d.indexOf("</think>");
|
|
4512
|
-
let
|
|
4513
|
-
return m === -1 ? (
|
|
4514
|
-
thoughtContent:
|
|
4583
|
+
let w = "", g = "";
|
|
4584
|
+
return m === -1 ? (w = d.slice(f + 7), g = "") : (w = d.slice(f + 7, m), g = d.slice(m + 8)), {
|
|
4585
|
+
thoughtContent: w,
|
|
4515
4586
|
answerContent: g
|
|
4516
4587
|
};
|
|
4517
4588
|
}, p = B(() => {
|
|
@@ -4522,9 +4593,9 @@ const oe = new M("chat-minimize"), is = (n) => {
|
|
|
4522
4593
|
if (d = f.content, f.content.indexOf("<think>") !== -1) {
|
|
4523
4594
|
const {
|
|
4524
4595
|
thoughtContent: m,
|
|
4525
|
-
answerContent:
|
|
4596
|
+
answerContent: w
|
|
4526
4597
|
} = h(f.content);
|
|
4527
|
-
d = m +
|
|
4598
|
+
d = m + w;
|
|
4528
4599
|
}
|
|
4529
4600
|
return d;
|
|
4530
4601
|
}), l = () => {
|
|
@@ -4536,11 +4607,11 @@ const oe = new M("chat-minimize"), is = (n) => {
|
|
|
4536
4607
|
const d = e.current;
|
|
4537
4608
|
d && (d.onmousedown = (f) => {
|
|
4538
4609
|
document.body.style.userSelect = "none";
|
|
4539
|
-
const m = f.clientX - d.offsetLeft,
|
|
4610
|
+
const m = f.clientX - d.offsetLeft, w = f.clientY - d.offsetTop, g = Date.now(), T = (x) => {
|
|
4540
4611
|
const O = 56 / window.innerWidth, L = 56 / window.innerHeight, {
|
|
4541
4612
|
x: U,
|
|
4542
4613
|
y: z
|
|
4543
|
-
} =
|
|
4614
|
+
} = rn(x.clientX - m, x.clientY - w, O, L);
|
|
4544
4615
|
Object.assign(r, {
|
|
4545
4616
|
x: U,
|
|
4546
4617
|
y: z
|
|
@@ -4548,8 +4619,8 @@ const oe = new M("chat-minimize"), is = (n) => {
|
|
|
4548
4619
|
l();
|
|
4549
4620
|
});
|
|
4550
4621
|
}, C = () => {
|
|
4551
|
-
const
|
|
4552
|
-
a.current =
|
|
4622
|
+
const x = Date.now();
|
|
4623
|
+
a.current = x - g > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", C);
|
|
4553
4624
|
};
|
|
4554
4625
|
document.addEventListener("mousemove", T), document.addEventListener("mouseup", C);
|
|
4555
4626
|
});
|
|
@@ -4583,29 +4654,29 @@ const oe = new M("chat-minimize"), is = (n) => {
|
|
|
4583
4654
|
className: "typewriter",
|
|
4584
4655
|
children: t
|
|
4585
4656
|
})
|
|
4586
|
-
}), c(
|
|
4657
|
+
}), c(ci, {})]
|
|
4587
4658
|
})
|
|
4588
4659
|
});
|
|
4589
4660
|
};
|
|
4590
|
-
const rt =
|
|
4661
|
+
const rt = Bn({
|
|
4591
4662
|
zIndex: 10,
|
|
4592
4663
|
enableBackFill: !0,
|
|
4593
4664
|
newTopic: () => {
|
|
4594
4665
|
}
|
|
4595
4666
|
});
|
|
4596
|
-
var
|
|
4597
|
-
class
|
|
4667
|
+
var Ut, Wt, Vt, jt;
|
|
4668
|
+
class Ft extends F {
|
|
4598
4669
|
constructor(t) {
|
|
4599
4670
|
super(t);
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4671
|
+
S(this, "ns", new M("chat-container"));
|
|
4672
|
+
S(this, "containerRef", lt());
|
|
4673
|
+
S(this, "dragHandle", lt());
|
|
4603
4674
|
/**
|
|
4604
4675
|
* 窗口样式数据
|
|
4605
4676
|
*
|
|
4606
4677
|
* @memberof ChatContainer
|
|
4607
4678
|
*/
|
|
4608
|
-
|
|
4679
|
+
S(this, "data", {
|
|
4609
4680
|
side: {
|
|
4610
4681
|
y: 0,
|
|
4611
4682
|
height: 1,
|
|
@@ -4628,14 +4699,14 @@ class Pt extends F {
|
|
|
4628
4699
|
* @type {boolean}
|
|
4629
4700
|
* @memberof ChatContainer
|
|
4630
4701
|
*/
|
|
4631
|
-
|
|
4702
|
+
S(this, "disabled", !1);
|
|
4632
4703
|
/**
|
|
4633
4704
|
* 最小化是否在拖拽中
|
|
4634
4705
|
* - 在拖拽时不应触发点击事件
|
|
4635
4706
|
* @type {boolean}
|
|
4636
4707
|
* @memberof ChatContainer
|
|
4637
4708
|
*/
|
|
4638
|
-
|
|
4709
|
+
S(this, "isDragging", !1);
|
|
4639
4710
|
/**
|
|
4640
4711
|
* 容器上下文
|
|
4641
4712
|
*
|
|
@@ -4643,9 +4714,9 @@ class Pt extends F {
|
|
|
4643
4714
|
* @date 2025-03-03 16:03:44
|
|
4644
4715
|
* @type {ContainerContext}
|
|
4645
4716
|
*/
|
|
4646
|
-
|
|
4647
|
-
zIndex: ((
|
|
4648
|
-
enableBackFill: ((
|
|
4717
|
+
S(this, "containerContext", {
|
|
4718
|
+
zIndex: ((Ut = this.props.containerOptions) == null ? void 0 : Ut.zIndex) || 10,
|
|
4719
|
+
enableBackFill: ((Wt = this.props) == null ? void 0 : Wt.enableBackFill) !== void 0 && ((Vt = this.props) == null ? void 0 : Vt.enableBackFill) !== null ? (jt = this.props) == null ? void 0 : jt.enableBackFill : !0,
|
|
4649
4720
|
newTopic: () => {
|
|
4650
4721
|
this.props.aiTopic.newTopic();
|
|
4651
4722
|
}
|
|
@@ -4731,7 +4802,7 @@ class Pt extends F {
|
|
|
4731
4802
|
const {
|
|
4732
4803
|
x: u,
|
|
4733
4804
|
y: h
|
|
4734
|
-
} =
|
|
4805
|
+
} = rn(r.clientX - i, r.clientY - s, this.data.window.width, this.data.window.height);
|
|
4735
4806
|
Object.assign(this.data.window, {
|
|
4736
4807
|
x: u,
|
|
4737
4808
|
y: h
|
|
@@ -4887,39 +4958,39 @@ class Pt extends F {
|
|
|
4887
4958
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
|
|
4888
4959
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4889
4960
|
onClick: this.minimize.bind(this),
|
|
4890
|
-
children: c(
|
|
4961
|
+
children: c(ri, {})
|
|
4891
4962
|
}), this.state.isFullScreen ? c("div", {
|
|
4892
4963
|
title: "退出全屏",
|
|
4893
4964
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "close-full-screen")),
|
|
4894
4965
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4895
4966
|
onClick: this.closeFullScreen.bind(this),
|
|
4896
|
-
children: c(
|
|
4967
|
+
children: c(ai, {})
|
|
4897
4968
|
}) : c("div", {
|
|
4898
4969
|
title: "全屏",
|
|
4899
4970
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
|
|
4900
4971
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4901
4972
|
onClick: this.fullScreen.bind(this),
|
|
4902
|
-
children: c(
|
|
4973
|
+
children: c(oi, {})
|
|
4903
4974
|
}), c("div", {
|
|
4904
4975
|
title: "关闭",
|
|
4905
4976
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
|
|
4906
4977
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4907
4978
|
onClick: this.close.bind(this),
|
|
4908
|
-
children: c(
|
|
4979
|
+
children: c(ei, {})
|
|
4909
4980
|
})]
|
|
4910
4981
|
})]
|
|
4911
4982
|
}), this.props.mode === "TOPIC" ? c("div", {
|
|
4912
4983
|
className: "".concat(this.ns.b("main")),
|
|
4913
4984
|
children: [c("div", {
|
|
4914
4985
|
className: "".concat(this.ns.be("main", "left")),
|
|
4915
|
-
children: c(
|
|
4986
|
+
children: c(us, {
|
|
4916
4987
|
controller: this.props.aiTopic
|
|
4917
4988
|
})
|
|
4918
4989
|
}), c("div", {
|
|
4919
4990
|
className: "".concat(this.ns.be("main", "right")),
|
|
4920
4991
|
children: [c("div", {
|
|
4921
4992
|
className: this.ns.b("content"),
|
|
4922
|
-
children: c(
|
|
4993
|
+
children: c(kt, {
|
|
4923
4994
|
controller: this.props.aiChat,
|
|
4924
4995
|
toolbarItems: this.props.contentToolbarItems
|
|
4925
4996
|
})
|
|
@@ -4932,7 +5003,7 @@ class Pt extends F {
|
|
|
4932
5003
|
items: this.props.footerToolbarItems
|
|
4933
5004
|
}), c("div", {
|
|
4934
5005
|
className: this.ns.b("footer"),
|
|
4935
|
-
children: c(
|
|
5006
|
+
children: c(Rt, {
|
|
4936
5007
|
controller: this.props.aiChat,
|
|
4937
5008
|
questionToolbarItems: this.props.questionToolbarItems
|
|
4938
5009
|
})
|
|
@@ -4942,7 +5013,7 @@ class Pt extends F {
|
|
|
4942
5013
|
className: "".concat(this.ns.be("main", "default")),
|
|
4943
5014
|
children: [c("div", {
|
|
4944
5015
|
className: this.ns.b("content"),
|
|
4945
|
-
children: c(
|
|
5016
|
+
children: c(kt, {
|
|
4946
5017
|
controller: this.props.aiChat,
|
|
4947
5018
|
toolbarItems: this.props.contentToolbarItems
|
|
4948
5019
|
})
|
|
@@ -4955,13 +5026,13 @@ class Pt extends F {
|
|
|
4955
5026
|
items: this.props.footerToolbarItems
|
|
4956
5027
|
}), c("div", {
|
|
4957
5028
|
className: this.ns.b("footer"),
|
|
4958
|
-
children: c(
|
|
5029
|
+
children: c(Rt, {
|
|
4959
5030
|
controller: this.props.aiChat,
|
|
4960
5031
|
questionToolbarItems: this.props.questionToolbarItems
|
|
4961
5032
|
})
|
|
4962
5033
|
})]
|
|
4963
5034
|
})]
|
|
4964
|
-
}), c(
|
|
5035
|
+
}), c(ds, {
|
|
4965
5036
|
title: this.props.caption || "AI助手",
|
|
4966
5037
|
controller: this.props.aiChat,
|
|
4967
5038
|
isMinimize: this.state.isMinimize,
|
|
@@ -4972,6 +5043,6 @@ class Pt extends F {
|
|
|
4972
5043
|
}
|
|
4973
5044
|
}
|
|
4974
5045
|
export {
|
|
4975
|
-
|
|
4976
|
-
|
|
5046
|
+
Ft as ChatContainer,
|
|
5047
|
+
vs as chat
|
|
4977
5048
|
};
|