@szjy/ai-coms 0.1.1 → 0.1.2
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/images/svg/arrow-right.svg +16 -0
- package/dist/images/svg/close.svg +16 -0
- package/dist/images/svg/copy.svg +1 -0
- package/dist/images/svg/drawer-layout.svg +14 -0
- package/dist/index.mjs +557 -535
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed as M, createElementBlock as z, openBlock as O, normalizeStyle as G, createElementVNode as _, normalizeClass as H, getCurrentInstance as re, ref as C, watch as ie, onUnmounted as ce, createBlock as Q, Transition as oe, withCtx as B, createCommentVNode as V, createVNode as A, nextTick as ae, resolveComponent as X, toDisplayString as D, createTextVNode as ue, Fragment as Y, renderList as Z, unref as de, withKeys as fe, defineComponent as pe, withModifiers as me } from "vue";
|
|
2
2
|
const ve = "/images/ai-round.png", he = "/images/ai-sqrt.png", ye = "/images/bars-loading.svg";
|
|
3
|
-
function ge(
|
|
4
|
-
return new URLSearchParams(new URL(
|
|
3
|
+
function ge(n, t = location.href) {
|
|
4
|
+
return new URLSearchParams(new URL(t).search).get(n);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return
|
|
6
|
+
function be(n) {
|
|
7
|
+
return n.startsWith("http://") || n.startsWith("https://") ? n : `${location.protocol}//${location.host}${n}`;
|
|
8
8
|
}
|
|
9
|
-
async function
|
|
10
|
-
const
|
|
11
|
-
Object.keys(
|
|
12
|
-
|
|
9
|
+
async function we(n) {
|
|
10
|
+
const t = new URL("http://localhost:11434/api/chat"), l = {};
|
|
11
|
+
Object.keys(l).forEach((a) => {
|
|
12
|
+
t.searchParams.append(a, l[a]);
|
|
13
13
|
});
|
|
14
|
-
const i = new Request(
|
|
14
|
+
const i = new Request(t, {
|
|
15
15
|
mode: "cors",
|
|
16
16
|
method: "post",
|
|
17
17
|
headers: {
|
|
@@ -27,23 +27,23 @@ async function be(e) {
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
role: "user",
|
|
30
|
-
content:
|
|
30
|
+
content: n
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
return fetch(i);
|
|
36
36
|
}
|
|
37
|
-
async function
|
|
38
|
-
const
|
|
39
|
-
Object.keys(i).forEach((
|
|
40
|
-
|
|
37
|
+
async function Se(n, t) {
|
|
38
|
+
const l = new URL(`${location.origin}/spark/v1/chat/completions`), i = {};
|
|
39
|
+
Object.keys(i).forEach((e) => {
|
|
40
|
+
l.searchParams.append(e, i[e]);
|
|
41
41
|
});
|
|
42
|
-
const
|
|
42
|
+
const a = new Request(l, {
|
|
43
43
|
method: "post",
|
|
44
44
|
headers: {
|
|
45
45
|
"Content-Type": "application/json",
|
|
46
|
-
Authorization: `Bearer ${
|
|
46
|
+
Authorization: `Bearer ${t}`
|
|
47
47
|
},
|
|
48
48
|
body: JSON.stringify({
|
|
49
49
|
model: "generalv4.0Ultra",
|
|
@@ -51,23 +51,23 @@ async function _e(e, n) {
|
|
|
51
51
|
messages: [
|
|
52
52
|
{
|
|
53
53
|
role: "user",
|
|
54
|
-
content:
|
|
54
|
+
content: n
|
|
55
55
|
}
|
|
56
56
|
]
|
|
57
57
|
})
|
|
58
58
|
});
|
|
59
|
-
return fetch(
|
|
59
|
+
return fetch(a);
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
62
|
-
const
|
|
63
|
-
Object.keys(i).forEach((
|
|
64
|
-
|
|
61
|
+
async function _e(n, t) {
|
|
62
|
+
const l = new URL(`${location.origin}/siliconflow/v1/chat/completions`), i = {};
|
|
63
|
+
Object.keys(i).forEach((e) => {
|
|
64
|
+
l.searchParams.append(e, i[e]);
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const a = new Request(l, {
|
|
67
67
|
method: "post",
|
|
68
68
|
headers: {
|
|
69
69
|
"Content-Type": "application/json",
|
|
70
|
-
Authorization: `Bearer ${
|
|
70
|
+
Authorization: `Bearer ${t}`
|
|
71
71
|
},
|
|
72
72
|
body: JSON.stringify({
|
|
73
73
|
// 集成了大部分模型,可以免费使用
|
|
@@ -76,23 +76,23 @@ async function Se(e, n) {
|
|
|
76
76
|
messages: [
|
|
77
77
|
{
|
|
78
78
|
role: "user",
|
|
79
|
-
content:
|
|
79
|
+
content: n
|
|
80
80
|
}
|
|
81
81
|
]
|
|
82
82
|
})
|
|
83
83
|
});
|
|
84
|
-
return fetch(
|
|
84
|
+
return fetch(a);
|
|
85
85
|
}
|
|
86
|
-
async function
|
|
87
|
-
const
|
|
88
|
-
Object.keys(i).forEach((
|
|
89
|
-
|
|
86
|
+
async function ke(n, t) {
|
|
87
|
+
const l = new URL(`${location.origin}/moonshot/v1/chat/completions`), i = {};
|
|
88
|
+
Object.keys(i).forEach((e) => {
|
|
89
|
+
l.searchParams.append(e, i[e]);
|
|
90
90
|
});
|
|
91
|
-
const
|
|
91
|
+
const a = new Request(l, {
|
|
92
92
|
method: "post",
|
|
93
93
|
headers: {
|
|
94
94
|
"Content-Type": "application/json",
|
|
95
|
-
Authorization: `Bearer ${
|
|
95
|
+
Authorization: `Bearer ${t}`
|
|
96
96
|
},
|
|
97
97
|
body: JSON.stringify({
|
|
98
98
|
model: "moonshot-v1-8k",
|
|
@@ -104,23 +104,23 @@ async function xe(e, n) {
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
role: "user",
|
|
107
|
-
content:
|
|
107
|
+
content: n
|
|
108
108
|
}
|
|
109
109
|
]
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
|
-
return fetch(
|
|
112
|
+
return fetch(a);
|
|
113
113
|
}
|
|
114
|
-
async function
|
|
115
|
-
const
|
|
116
|
-
Object.keys(i).forEach((
|
|
117
|
-
|
|
114
|
+
async function xe(n, t) {
|
|
115
|
+
const l = new URL(`${location.origin}/dashscope/compatible-mode/v1/chat/completions`), i = {};
|
|
116
|
+
Object.keys(i).forEach((e) => {
|
|
117
|
+
l.searchParams.append(e, i[e]);
|
|
118
118
|
});
|
|
119
|
-
const
|
|
119
|
+
const a = new Request(l, {
|
|
120
120
|
method: "post",
|
|
121
121
|
headers: {
|
|
122
122
|
"Content-Type": "application/json",
|
|
123
|
-
Authorization: `Bearer ${
|
|
123
|
+
Authorization: `Bearer ${t}`
|
|
124
124
|
},
|
|
125
125
|
body: JSON.stringify({
|
|
126
126
|
model: "qwq-32b-preview",
|
|
@@ -132,46 +132,45 @@ async function ke(e, n) {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
role: "user",
|
|
135
|
-
content:
|
|
135
|
+
content: n
|
|
136
136
|
}
|
|
137
137
|
]
|
|
138
138
|
})
|
|
139
139
|
});
|
|
140
|
-
return fetch(
|
|
140
|
+
return fetch(a);
|
|
141
141
|
}
|
|
142
|
-
async function Ce(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
t.searchParams.append(v, d[v]);
|
|
142
|
+
async function Ce(n, t, l, i = "") {
|
|
143
|
+
const a = be(i), e = new URL(`${a}/support/${l}/a`), d = {};
|
|
144
|
+
Object.keys(d).forEach((h) => {
|
|
145
|
+
e.searchParams.append(h, d[h]);
|
|
147
146
|
});
|
|
148
|
-
const
|
|
147
|
+
const S = new Request(e, {
|
|
149
148
|
method: "post",
|
|
150
149
|
headers: {
|
|
151
150
|
"Content-Type": "application/json",
|
|
152
|
-
Authorization: `Bearer ${
|
|
151
|
+
Authorization: `Bearer ${t}`
|
|
153
152
|
},
|
|
154
153
|
body: JSON.stringify({
|
|
155
|
-
content:
|
|
154
|
+
content: n
|
|
156
155
|
})
|
|
157
156
|
});
|
|
158
|
-
return fetch(
|
|
157
|
+
return fetch(S);
|
|
159
158
|
}
|
|
160
|
-
const Te = (
|
|
161
|
-
if (
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
159
|
+
const Te = (n) => {
|
|
160
|
+
if (n.startsWith("data:")) {
|
|
161
|
+
const t = n.substring(5).trim();
|
|
162
|
+
if (t === "[DONE]")
|
|
164
163
|
return {
|
|
165
164
|
done: !0
|
|
166
165
|
};
|
|
167
166
|
try {
|
|
168
|
-
return JSON.parse(
|
|
169
|
-
} catch (
|
|
170
|
-
console.error("JSON parsing error:",
|
|
167
|
+
return JSON.parse(t);
|
|
168
|
+
} catch (l) {
|
|
169
|
+
console.error("JSON parsing error:", l);
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
172
|
return null;
|
|
174
|
-
},
|
|
173
|
+
}, Pe = [
|
|
175
174
|
{
|
|
176
175
|
label: "模拟数据模型",
|
|
177
176
|
modelName: "standard",
|
|
@@ -180,107 +179,107 @@ const Te = (e) => {
|
|
|
180
179
|
{
|
|
181
180
|
label: "Spark 星火大模型",
|
|
182
181
|
modelName: "spark",
|
|
183
|
-
api:
|
|
182
|
+
api: Se
|
|
184
183
|
},
|
|
185
184
|
{
|
|
186
185
|
label: "Ollama 3 大模型",
|
|
187
186
|
modelName: "ollama3",
|
|
188
|
-
api:
|
|
187
|
+
api: we
|
|
189
188
|
},
|
|
190
189
|
{
|
|
191
190
|
label: "SiliconFlow 硅基流动大模型",
|
|
192
191
|
modelName: "siliconflow",
|
|
193
|
-
api:
|
|
192
|
+
api: _e
|
|
194
193
|
},
|
|
195
194
|
{
|
|
196
195
|
label: "Kimi Moonshot 月之暗面大模型",
|
|
197
196
|
modelName: "moonshot",
|
|
198
|
-
api:
|
|
197
|
+
api: ke
|
|
199
198
|
},
|
|
200
199
|
{
|
|
201
200
|
label: "通义千问大模型",
|
|
202
201
|
modelName: "dashscope",
|
|
203
|
-
api:
|
|
202
|
+
api: xe
|
|
204
203
|
},
|
|
205
204
|
{
|
|
206
205
|
label: "数智建管大模型",
|
|
207
206
|
modelName: "szjy",
|
|
208
207
|
api: Ce
|
|
209
208
|
}
|
|
210
|
-
],
|
|
211
|
-
standard(
|
|
212
|
-
let
|
|
213
|
-
return
|
|
209
|
+
], ee = {
|
|
210
|
+
standard(n, t) {
|
|
211
|
+
let l = "";
|
|
212
|
+
return n instanceof Uint8Array ? l = t.decode(n, {
|
|
214
213
|
stream: !0
|
|
215
|
-
}) :
|
|
216
|
-
content:
|
|
214
|
+
}) : l = n, {
|
|
215
|
+
content: l
|
|
217
216
|
};
|
|
218
217
|
},
|
|
219
|
-
spark(
|
|
220
|
-
const
|
|
221
|
-
return
|
|
218
|
+
spark(n) {
|
|
219
|
+
const t = Te(n);
|
|
220
|
+
return t.done ? {
|
|
222
221
|
done: !0
|
|
223
222
|
} : {
|
|
224
|
-
content:
|
|
223
|
+
content: t.choices[0].delta.content || ""
|
|
225
224
|
};
|
|
226
225
|
},
|
|
227
|
-
siliconflow(
|
|
228
|
-
return this.spark(
|
|
226
|
+
siliconflow(n) {
|
|
227
|
+
return this.spark(n);
|
|
229
228
|
},
|
|
230
|
-
moonshot(
|
|
231
|
-
return this.spark(
|
|
229
|
+
moonshot(n) {
|
|
230
|
+
return this.spark(n);
|
|
232
231
|
},
|
|
233
|
-
dashscope(
|
|
234
|
-
return this.spark(
|
|
232
|
+
dashscope(n) {
|
|
233
|
+
return this.spark(n);
|
|
235
234
|
},
|
|
236
|
-
szjy(
|
|
237
|
-
return this.spark(
|
|
235
|
+
szjy(n) {
|
|
236
|
+
return this.spark(n);
|
|
238
237
|
},
|
|
239
|
-
ollama3(
|
|
238
|
+
ollama3(n) {
|
|
240
239
|
return {
|
|
241
|
-
content: JSON.parse(
|
|
240
|
+
content: JSON.parse(n).message.content
|
|
242
241
|
};
|
|
243
242
|
}
|
|
244
|
-
},
|
|
245
|
-
const i =
|
|
246
|
-
return i.slice(0, -1).forEach((
|
|
247
|
-
|
|
243
|
+
}, te = (n, t, l) => {
|
|
244
|
+
const i = n.split(l);
|
|
245
|
+
return i.slice(0, -1).forEach((a) => {
|
|
246
|
+
a.trim() !== "" && t.enqueue(a);
|
|
248
247
|
}), i[i.length - 1];
|
|
249
|
-
},
|
|
250
|
-
let
|
|
248
|
+
}, Oe = (n) => {
|
|
249
|
+
let t = "";
|
|
251
250
|
return new TransformStream({
|
|
252
|
-
transform(
|
|
253
|
-
if (
|
|
254
|
-
|
|
251
|
+
transform(l, i) {
|
|
252
|
+
if (t += l, t.trim().startsWith("data:"))
|
|
253
|
+
t = te(t, i, n);
|
|
255
254
|
else
|
|
256
255
|
try {
|
|
257
|
-
JSON.parse(
|
|
256
|
+
JSON.parse(t), t = te(t, i, n);
|
|
258
257
|
} catch {
|
|
259
|
-
i.enqueue(
|
|
258
|
+
i.enqueue(l), t = "";
|
|
260
259
|
}
|
|
261
260
|
},
|
|
262
|
-
flush(
|
|
263
|
-
|
|
261
|
+
flush(l) {
|
|
262
|
+
t.trim() !== "" && l.enqueue(t);
|
|
264
263
|
}
|
|
265
264
|
});
|
|
266
265
|
};
|
|
267
|
-
async function
|
|
268
|
-
const
|
|
269
|
-
return
|
|
270
|
-
|
|
271
|
-
if (
|
|
272
|
-
const
|
|
266
|
+
async function Le(n, t) {
|
|
267
|
+
const l = n.api;
|
|
268
|
+
return l ? new Promise((i) => {
|
|
269
|
+
l(t.text, t.token, t.identifier, t.baseUrl).then((a) => {
|
|
270
|
+
if (a.body) {
|
|
271
|
+
const e = a.body.pipeThrough(new TextDecoderStream()).pipeThrough(Oe(`
|
|
273
272
|
`)).getReader();
|
|
274
|
-
console.log("reader from response:",
|
|
273
|
+
console.log("reader from response:", e), i({
|
|
275
274
|
error: 0,
|
|
276
|
-
reader:
|
|
275
|
+
reader: e
|
|
277
276
|
});
|
|
278
277
|
} else
|
|
279
278
|
i({
|
|
280
279
|
error: 1,
|
|
281
280
|
reader: null
|
|
282
281
|
});
|
|
283
|
-
}).catch((
|
|
282
|
+
}).catch((a) => {
|
|
284
283
|
i({
|
|
285
284
|
error: 1,
|
|
286
285
|
reader: null
|
|
@@ -291,59 +290,90 @@ async function Oe(e, n) {
|
|
|
291
290
|
reader: null
|
|
292
291
|
};
|
|
293
292
|
}
|
|
294
|
-
let
|
|
295
|
-
function
|
|
296
|
-
return
|
|
293
|
+
let F = null;
|
|
294
|
+
function Re() {
|
|
295
|
+
return F || (window.markdownit ? F = new window.markdownit({
|
|
297
296
|
html: !0,
|
|
298
297
|
linkify: !0,
|
|
299
298
|
typographer: !0
|
|
300
|
-
}) : console.log("markdownit is not loaded"),
|
|
299
|
+
}) : console.log("markdownit is not loaded"), F);
|
|
301
300
|
}
|
|
302
|
-
const
|
|
303
|
-
const
|
|
304
|
-
for (const [i,
|
|
305
|
-
|
|
306
|
-
return
|
|
307
|
-
},
|
|
308
|
-
|
|
301
|
+
const W = (n, t) => {
|
|
302
|
+
const l = n.__vccOpts || n;
|
|
303
|
+
for (const [i, a] of t)
|
|
304
|
+
l[i] = a;
|
|
305
|
+
return l;
|
|
306
|
+
}, ze = ["src", "alt"], je = {
|
|
307
|
+
__name: "SvgIcon",
|
|
309
308
|
props: {
|
|
310
|
-
|
|
311
|
-
type: String,
|
|
312
|
-
default: "icon"
|
|
313
|
-
},
|
|
309
|
+
// 图标名称或完整URL
|
|
314
310
|
name: {
|
|
315
311
|
type: String,
|
|
316
312
|
required: !0
|
|
317
313
|
},
|
|
314
|
+
// 图标大小
|
|
315
|
+
size: {
|
|
316
|
+
type: [Number, String],
|
|
317
|
+
default: 16
|
|
318
|
+
},
|
|
319
|
+
// 图标颜色(注意:直接加载SVG URL时,颜色控制可能受限)
|
|
318
320
|
color: {
|
|
319
321
|
type: String,
|
|
320
|
-
default: "
|
|
322
|
+
default: ""
|
|
323
|
+
},
|
|
324
|
+
// 额外的class
|
|
325
|
+
className: {
|
|
326
|
+
type: String,
|
|
327
|
+
default: ""
|
|
328
|
+
},
|
|
329
|
+
// 基础URL路径,如果name不是完整URL,会与此路径拼接
|
|
330
|
+
basePath: {
|
|
331
|
+
type: String,
|
|
332
|
+
default: "/icons/"
|
|
321
333
|
}
|
|
322
334
|
},
|
|
323
|
-
setup(
|
|
324
|
-
const
|
|
325
|
-
|
|
335
|
+
setup(n) {
|
|
336
|
+
const t = n, l = M(() => {
|
|
337
|
+
if (t.name.startsWith("http://") || t.name.startsWith("https://") || t.name.startsWith("/"))
|
|
338
|
+
return t.name;
|
|
339
|
+
const e = t.name.endsWith(".svg") ? t.name : `${t.name}.svg`;
|
|
340
|
+
return `${t.basePath}${e}`;
|
|
341
|
+
}), i = M(() => {
|
|
342
|
+
const e = typeof t.size == "number" ? `${t.size}px` : t.size;
|
|
343
|
+
return {
|
|
344
|
+
width: e,
|
|
345
|
+
height: e,
|
|
346
|
+
display: "inline-flex",
|
|
347
|
+
justifyContent: "center",
|
|
348
|
+
alignItems: "center"
|
|
349
|
+
};
|
|
350
|
+
}), a = M(() => {
|
|
351
|
+
const e = {
|
|
352
|
+
width: "100%",
|
|
353
|
+
height: "100%"
|
|
354
|
+
};
|
|
355
|
+
return t.color && (e.filter = `drop-shadow(0 0 0 ${t.color})`), e;
|
|
356
|
+
});
|
|
357
|
+
return (e, d) => (O(), z("div", {
|
|
358
|
+
class: "svg-icon-wrapper",
|
|
359
|
+
style: G(i.value)
|
|
360
|
+
}, [
|
|
361
|
+
_("img", {
|
|
362
|
+
src: l.value,
|
|
363
|
+
alt: n.name,
|
|
364
|
+
class: H(["svg-icon", n.className]),
|
|
365
|
+
style: G(a.value)
|
|
366
|
+
}, null, 14, ze)
|
|
367
|
+
], 4));
|
|
326
368
|
}
|
|
327
|
-
}
|
|
328
|
-
function $e(e, n, r, i, s, t) {
|
|
329
|
-
return P(), R("svg", ie({
|
|
330
|
-
class: e.svgClass,
|
|
331
|
-
"aria-hidden": "true"
|
|
332
|
-
}, e.$attrs), [
|
|
333
|
-
S("use", {
|
|
334
|
-
"xlink:href": e.symbolId,
|
|
335
|
-
fill: e.color
|
|
336
|
-
}, null, 8, Me)
|
|
337
|
-
], 16);
|
|
338
|
-
}
|
|
339
|
-
const D = /* @__PURE__ */ J(Re, [["render", $e], ["__scopeId", "data-v-349f049f"]]), Ie = async (e) => {
|
|
369
|
+
}, J = /* @__PURE__ */ W(je, [["__scopeId", "data-v-490b11c1"]]), Ne = async (n) => {
|
|
340
370
|
if (navigator.clipboard && navigator.permissions)
|
|
341
|
-
await navigator.clipboard.writeText(
|
|
371
|
+
await navigator.clipboard.writeText(n);
|
|
342
372
|
else {
|
|
343
|
-
const
|
|
344
|
-
|
|
373
|
+
const t = document.createElement("textArea");
|
|
374
|
+
t.value = n, t.style.width = 0, t.style.position = "fixed", t.style.left = "-999px", t.style.top = "10px", t.setAttribute("readonly", "readonly"), document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t);
|
|
345
375
|
}
|
|
346
|
-
},
|
|
376
|
+
}, Ue = ["innerHTML"], Ie = {
|
|
347
377
|
__name: "Previewer",
|
|
348
378
|
props: {
|
|
349
379
|
reader: null,
|
|
@@ -356,135 +386,135 @@ const D = /* @__PURE__ */ J(Re, [["render", $e], ["__scopeId", "data-v-349f049f"
|
|
|
356
386
|
"completed",
|
|
357
387
|
"updating"
|
|
358
388
|
],
|
|
359
|
-
setup(
|
|
360
|
-
const { appContext: i } = re(), { $message:
|
|
361
|
-
let
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
},
|
|
389
|
+
setup(n, { expose: t, emit: l }) {
|
|
390
|
+
const { appContext: i } = re(), { $message: a } = i.config.globalProperties, e = n, d = C(e.displayText || ""), S = C(""), h = C(!0), g = C(!1), R = C(!!e.displayText), L = l, q = C(null);
|
|
391
|
+
let x = null;
|
|
392
|
+
const N = M(() => F ? F.render(d.value) : d.value), U = () => {
|
|
393
|
+
e.reader && e.reader.cancel(), g.value = !0, o.value = !1, u(), R.value = !0, L("completed", d.value), h.value = !1, x && (cancelAnimationFrame(x), x = null);
|
|
394
|
+
}, E = M(() => `${N.value}`), f = C(!1), c = () => {
|
|
365
395
|
f.value = !0;
|
|
366
396
|
}, u = () => {
|
|
367
397
|
f.value = !1;
|
|
368
|
-
},
|
|
369
|
-
if (!
|
|
398
|
+
}, o = C(!1), r = async () => {
|
|
399
|
+
if (!e.reader) return;
|
|
370
400
|
const y = new TextDecoder("utf-8");
|
|
371
|
-
for (
|
|
401
|
+
for (h.value = !0; !g.value; )
|
|
372
402
|
try {
|
|
373
|
-
if (!
|
|
374
|
-
|
|
403
|
+
if (!e.reader) {
|
|
404
|
+
o.value = !0;
|
|
375
405
|
break;
|
|
376
406
|
}
|
|
377
|
-
const { value:
|
|
378
|
-
if (!
|
|
379
|
-
|
|
407
|
+
const { value: s, done: m } = await e.reader.read();
|
|
408
|
+
if (!e.reader) {
|
|
409
|
+
o.value = !0;
|
|
380
410
|
break;
|
|
381
411
|
}
|
|
382
412
|
if (m) {
|
|
383
|
-
|
|
413
|
+
o.value = !0;
|
|
384
414
|
break;
|
|
385
415
|
}
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
416
|
+
const b = ee[e.model];
|
|
417
|
+
if (!b)
|
|
388
418
|
break;
|
|
389
|
-
const T =
|
|
419
|
+
const T = b.call(ee, s, y);
|
|
390
420
|
if (T.done) {
|
|
391
|
-
|
|
421
|
+
o.value = !0;
|
|
392
422
|
break;
|
|
393
423
|
}
|
|
394
|
-
|
|
395
|
-
} catch (
|
|
396
|
-
|
|
424
|
+
S.value += T.content, x === null && k();
|
|
425
|
+
} catch (s) {
|
|
426
|
+
o.value = !0, console.log(3333, s), L("failed", s), U();
|
|
397
427
|
break;
|
|
398
428
|
} finally {
|
|
399
429
|
u();
|
|
400
430
|
}
|
|
401
|
-
},
|
|
402
|
-
|
|
431
|
+
}, v = async () => {
|
|
432
|
+
e.scrollToBottomFn && e.scrollToBottomFn();
|
|
403
433
|
}, p = (y = () => {
|
|
404
|
-
},
|
|
434
|
+
}, s = () => {
|
|
405
435
|
}) => {
|
|
406
|
-
if (
|
|
407
|
-
const m =
|
|
408
|
-
d.value += m,
|
|
436
|
+
if (S.value.length > 0) {
|
|
437
|
+
const m = S.value.substring(0, 10);
|
|
438
|
+
d.value += m, S.value = S.value.substring(10), y();
|
|
409
439
|
} else
|
|
410
|
-
|
|
411
|
-
},
|
|
412
|
-
if (g.value &&
|
|
413
|
-
cancelAnimationFrame(
|
|
440
|
+
s();
|
|
441
|
+
}, k = () => {
|
|
442
|
+
if (g.value && x) {
|
|
443
|
+
cancelAnimationFrame(x), x = null, h.value = !1;
|
|
414
444
|
return;
|
|
415
445
|
}
|
|
416
|
-
|
|
446
|
+
o.value ? p(
|
|
417
447
|
() => {
|
|
418
|
-
|
|
448
|
+
x = requestAnimationFrame(k), L("updating", null);
|
|
419
449
|
},
|
|
420
450
|
() => {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}),
|
|
451
|
+
L("completed", d.value), h.value = !1, R.value = !0, ae(() => {
|
|
452
|
+
o.value = !1;
|
|
453
|
+
}), x = null;
|
|
424
454
|
}
|
|
425
|
-
) : (p(),
|
|
455
|
+
) : (p(), x = requestAnimationFrame(k)), v();
|
|
426
456
|
};
|
|
427
|
-
|
|
428
|
-
() =>
|
|
457
|
+
ie(
|
|
458
|
+
() => e.reader,
|
|
429
459
|
() => {
|
|
430
|
-
|
|
460
|
+
e.reader && r();
|
|
431
461
|
},
|
|
432
462
|
{
|
|
433
463
|
immediate: !0,
|
|
434
464
|
deep: !0
|
|
435
465
|
}
|
|
436
|
-
),
|
|
437
|
-
|
|
438
|
-
}),
|
|
439
|
-
abortReader:
|
|
466
|
+
), ce(() => {
|
|
467
|
+
U();
|
|
468
|
+
}), t({
|
|
469
|
+
abortReader: U,
|
|
440
470
|
initializeStart: c,
|
|
441
471
|
initializeEnd: u
|
|
442
|
-
}),
|
|
443
|
-
const
|
|
472
|
+
}), M(() => f.value ? !0 : (!e.reader || !h || d.value, !1));
|
|
473
|
+
const w = async () => {
|
|
444
474
|
try {
|
|
445
475
|
const y = d.value;
|
|
446
|
-
await
|
|
476
|
+
await Ne(y), a.success("复制成功");
|
|
447
477
|
} catch (y) {
|
|
448
|
-
console.error("复制失败:", y),
|
|
478
|
+
console.error("复制失败:", y), a.error("复制失败");
|
|
449
479
|
}
|
|
450
480
|
};
|
|
451
|
-
return (y,
|
|
452
|
-
default:
|
|
453
|
-
|
|
481
|
+
return (y, s) => (O(), Q(oe, { name: "fade" }, {
|
|
482
|
+
default: B(() => [
|
|
483
|
+
E.value ? (O(), z("div", {
|
|
454
484
|
key: 0,
|
|
455
485
|
ref_key: "refWrapperContent",
|
|
456
|
-
ref:
|
|
486
|
+
ref: q,
|
|
457
487
|
"text-16": "",
|
|
458
488
|
class: "w-full h-full overflow-y-auto relative",
|
|
459
489
|
"p-24px": ""
|
|
460
490
|
}, [
|
|
461
|
-
|
|
491
|
+
_("div", {
|
|
462
492
|
class: "markdown-wrapper",
|
|
463
|
-
innerHTML:
|
|
464
|
-
}, null, 8,
|
|
465
|
-
|
|
493
|
+
innerHTML: E.value
|
|
494
|
+
}, null, 8, Ue),
|
|
495
|
+
R.value ? (O(), z("div", {
|
|
466
496
|
key: 0,
|
|
467
497
|
class: "copy-btn-wrapper",
|
|
468
|
-
onClick:
|
|
498
|
+
onClick: w
|
|
469
499
|
}, [
|
|
470
|
-
|
|
471
|
-
name: "copy",
|
|
500
|
+
A(J, {
|
|
501
|
+
name: "/images/svg/copy.svg",
|
|
472
502
|
color: "#666666"
|
|
473
503
|
}),
|
|
474
|
-
|
|
475
|
-
])) :
|
|
476
|
-
], 512)) :
|
|
504
|
+
s[0] || (s[0] = _("span", { class: "copy-text" }, "复制", -1))
|
|
505
|
+
])) : V("", !0)
|
|
506
|
+
], 512)) : V("", !0)
|
|
477
507
|
]),
|
|
478
508
|
_: 1
|
|
479
509
|
}));
|
|
480
510
|
}
|
|
481
|
-
},
|
|
511
|
+
}, $e = /* @__PURE__ */ W(Ie, [["__scopeId", "data-v-e07fd8c0"]]), Ae = { class: "panel-header" }, Ee = { class: "header-actions" }, Me = { class: "header-title" }, qe = { class: "action-icons" }, Be = { class: "body-content" }, Fe = {
|
|
482
512
|
key: 0,
|
|
483
513
|
class: "welcome-content"
|
|
484
|
-
},
|
|
514
|
+
}, Ve = { class: "subtitle" }, De = { class: "highlight" }, Je = { class: "quick-questions" }, We = ["onClick"], He = {
|
|
485
515
|
key: 1,
|
|
486
516
|
class: "message-content user-content"
|
|
487
|
-
},
|
|
517
|
+
}, Qe = { class: "panel-footer" }, Ke = {
|
|
488
518
|
key: 0,
|
|
489
519
|
src: ye,
|
|
490
520
|
alt: "加载中",
|
|
@@ -514,108 +544,108 @@ const D = /* @__PURE__ */ J(Re, [["render", $e], ["__scopeId", "data-v-349f049f"
|
|
|
514
544
|
}
|
|
515
545
|
},
|
|
516
546
|
emits: ["update:modelValue", "submit"],
|
|
517
|
-
setup(
|
|
518
|
-
const { appContext:
|
|
547
|
+
setup(n, { emit: t }) {
|
|
548
|
+
const { appContext: l } = re(), { $message: i } = l.config.globalProperties, a = ge("llmName") || "szjy", e = M(() => Pe.find((m) => m.modelName === a)), d = n, S = t, h = C(""), g = C(null), R = C(!1), L = C([]), q = C([
|
|
519
549
|
"什么是AI助理,能做什么?",
|
|
520
550
|
"当前项目的基本情况?",
|
|
521
551
|
"当前项目的进度情况?",
|
|
522
552
|
"当前项目的参建方有哪些?",
|
|
523
553
|
"数智建管平台有哪些功能?能做什么?"
|
|
524
|
-
]),
|
|
554
|
+
]), x = C([]), N = C(!1), U = C(null), E = () => {
|
|
525
555
|
ae(() => {
|
|
526
|
-
if (
|
|
527
|
-
const m =
|
|
528
|
-
|
|
529
|
-
top:
|
|
556
|
+
if (U.value) {
|
|
557
|
+
const m = U.value, b = m.scrollHeight, T = m.scrollTop, I = m.clientHeight;
|
|
558
|
+
b - T - I < 100 ? m.scrollTop = b : m.scrollTo({
|
|
559
|
+
top: b
|
|
530
560
|
});
|
|
531
561
|
}
|
|
532
562
|
});
|
|
533
|
-
}, f = C(!1), c =
|
|
534
|
-
console.log("onFailedReader", m,
|
|
563
|
+
}, f = C(!1), c = M(() => f.value ? "/images/ai-stop.png" : "/images/ai-send.png"), u = (m, b) => {
|
|
564
|
+
console.log("onFailedReader", m, b), N.value = !1;
|
|
535
565
|
const T = y();
|
|
536
566
|
T && T.initializeEnd(), i.error("转换失败,请重试"), f.value = !1, setTimeout(() => {
|
|
537
567
|
g.value && g.value.focus();
|
|
538
568
|
});
|
|
539
|
-
},
|
|
540
|
-
|
|
569
|
+
}, o = (m, b) => {
|
|
570
|
+
N.value = !1, f.value = !1, E(), b && L.value[m] && (L.value[m].displayText = b), setTimeout(() => {
|
|
541
571
|
g.value && g.value.focus();
|
|
542
572
|
});
|
|
543
|
-
},
|
|
573
|
+
}, r = (m) => {
|
|
544
574
|
f.value = !0;
|
|
545
|
-
},
|
|
546
|
-
f.value = !1,
|
|
547
|
-
}, p = C(!1),
|
|
575
|
+
}, v = () => {
|
|
576
|
+
f.value = !1, S("update:modelValue", !1), R.value = !1, L.value = [];
|
|
577
|
+
}, p = C(!1), k = () => {
|
|
548
578
|
p.value = !p.value;
|
|
549
|
-
},
|
|
550
|
-
|
|
579
|
+
}, w = (m) => {
|
|
580
|
+
h.value = m, s();
|
|
551
581
|
}, y = () => {
|
|
552
|
-
for (let m =
|
|
553
|
-
if (
|
|
554
|
-
return
|
|
582
|
+
for (let m = x.value.length - 1; m >= 0; m--)
|
|
583
|
+
if (x.value[m])
|
|
584
|
+
return x.value[m];
|
|
555
585
|
return null;
|
|
556
|
-
},
|
|
557
|
-
if (console.log("stylizingLoading:",
|
|
558
|
-
const
|
|
559
|
-
console.log("lastPreviewer:",
|
|
586
|
+
}, s = async () => {
|
|
587
|
+
if (console.log("stylizingLoading:", N.value), N.value) {
|
|
588
|
+
const P = y();
|
|
589
|
+
console.log("lastPreviewer:", P), P && (console.log("abortReader"), P.abortReader());
|
|
560
590
|
return;
|
|
561
591
|
}
|
|
562
|
-
if (!
|
|
592
|
+
if (!h.value.trim()) {
|
|
563
593
|
console.log("no input, return"), g.value.focus();
|
|
564
594
|
return;
|
|
565
595
|
}
|
|
566
|
-
|
|
596
|
+
L.value.push({
|
|
567
597
|
type: "user",
|
|
568
|
-
content:
|
|
569
|
-
}), f.value = !0,
|
|
570
|
-
const m =
|
|
571
|
-
|
|
572
|
-
const
|
|
573
|
-
|
|
598
|
+
content: h.value
|
|
599
|
+
}), f.value = !0, R.value = !0, S("submit", h.value), E();
|
|
600
|
+
const m = h.value;
|
|
601
|
+
h.value = "";
|
|
602
|
+
const b = L.value.length;
|
|
603
|
+
x.value[b] && x.value[b].initializeStart(), N.value = !0, L.value.push({
|
|
574
604
|
type: "ai"
|
|
575
605
|
});
|
|
576
|
-
const { error: T, reader:
|
|
606
|
+
const { error: T, reader: I } = await Le(e.value, {
|
|
577
607
|
text: m,
|
|
578
608
|
token: d.token,
|
|
579
609
|
identifier: d.identifier,
|
|
580
610
|
baseUrl: d.baseUrl
|
|
581
611
|
});
|
|
582
612
|
if (T) {
|
|
583
|
-
console.log(45455, T), u(
|
|
613
|
+
console.log(45455, T), u(b, T);
|
|
584
614
|
return;
|
|
585
615
|
}
|
|
586
|
-
|
|
616
|
+
I && (L.value[b].reader = I);
|
|
587
617
|
};
|
|
588
|
-
return (m,
|
|
589
|
-
const T =
|
|
590
|
-
return
|
|
591
|
-
default:
|
|
592
|
-
|
|
618
|
+
return (m, b) => {
|
|
619
|
+
const T = X("el-icon"), I = X("el-input");
|
|
620
|
+
return O(), Q(oe, { name: "slide" }, {
|
|
621
|
+
default: B(() => [
|
|
622
|
+
n.modelValue ? (O(), z("div", {
|
|
593
623
|
key: 0,
|
|
594
|
-
class:
|
|
624
|
+
class: H(["ai-panel", { "drawer-mode": p.value }])
|
|
595
625
|
}, [
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
626
|
+
_("div", Ae, [
|
|
627
|
+
_("div", Ee, [
|
|
628
|
+
_("div", Me, D(n.title), 1),
|
|
629
|
+
_("div", qe, [
|
|
630
|
+
A(T, {
|
|
601
631
|
class: "action-icon",
|
|
602
|
-
onClick:
|
|
632
|
+
onClick: k
|
|
603
633
|
}, {
|
|
604
|
-
default:
|
|
605
|
-
|
|
606
|
-
name: "drawer-layout",
|
|
634
|
+
default: B(() => [
|
|
635
|
+
A(J, {
|
|
636
|
+
name: "/images/svg/drawer-layout.svg",
|
|
607
637
|
color: "#999999"
|
|
608
638
|
})
|
|
609
639
|
]),
|
|
610
640
|
_: 1
|
|
611
641
|
}),
|
|
612
|
-
|
|
642
|
+
A(T, {
|
|
613
643
|
class: "action-icon",
|
|
614
|
-
onClick:
|
|
644
|
+
onClick: v
|
|
615
645
|
}, {
|
|
616
|
-
default:
|
|
617
|
-
|
|
618
|
-
name: "close",
|
|
646
|
+
default: B(() => [
|
|
647
|
+
A(J, {
|
|
648
|
+
name: "/images/svg/close.svg",
|
|
619
649
|
color: "#999999"
|
|
620
650
|
})
|
|
621
651
|
]),
|
|
@@ -624,82 +654,82 @@ const D = /* @__PURE__ */ J(Re, [["render", $e], ["__scopeId", "data-v-349f049f"
|
|
|
624
654
|
])
|
|
625
655
|
])
|
|
626
656
|
]),
|
|
627
|
-
|
|
628
|
-
|
|
657
|
+
_("div", Be, [
|
|
658
|
+
R.value ? (O(), z("div", {
|
|
629
659
|
key: 1,
|
|
630
660
|
class: "chat-messages",
|
|
631
661
|
ref_key: "messageContainerRef",
|
|
632
|
-
ref:
|
|
662
|
+
ref: U
|
|
633
663
|
}, [
|
|
634
|
-
(
|
|
635
|
-
key:
|
|
636
|
-
class:
|
|
664
|
+
(O(!0), z(Y, null, Z(L.value, (P, $) => (O(), z("div", {
|
|
665
|
+
key: $,
|
|
666
|
+
class: H(["message-item", P.type === "user" ? "user-message" : "ai-message"])
|
|
637
667
|
}, [
|
|
638
|
-
|
|
668
|
+
P.type === "ai" ? (O(), Q($e, {
|
|
639
669
|
key: 0,
|
|
640
670
|
ref_for: !0,
|
|
641
|
-
ref: (
|
|
642
|
-
reader:
|
|
643
|
-
"onUpdate:reader": (
|
|
644
|
-
model:
|
|
645
|
-
displayText:
|
|
646
|
-
scrollToBottomFn:
|
|
647
|
-
onFailed: (
|
|
648
|
-
onCompleted: (
|
|
649
|
-
onUpdating: () =>
|
|
650
|
-
}, null, 8, ["reader", "onUpdate:reader", "model", "displayText", "onFailed", "onCompleted", "onUpdating"])) : (
|
|
671
|
+
ref: (j) => x.value[$] = j,
|
|
672
|
+
reader: P.reader,
|
|
673
|
+
"onUpdate:reader": (j) => P.reader = j,
|
|
674
|
+
model: de(a),
|
|
675
|
+
displayText: P.displayText,
|
|
676
|
+
scrollToBottomFn: E,
|
|
677
|
+
onFailed: (j) => u($, j),
|
|
678
|
+
onCompleted: (j) => o($, j),
|
|
679
|
+
onUpdating: () => r()
|
|
680
|
+
}, null, 8, ["reader", "onUpdate:reader", "model", "displayText", "onFailed", "onCompleted", "onUpdating"])) : (O(), z("div", He, D(P.content), 1))
|
|
651
681
|
], 2))), 128))
|
|
652
|
-
], 512)) : (
|
|
653
|
-
|
|
654
|
-
|
|
682
|
+
], 512)) : (O(), z("div", Fe, [
|
|
683
|
+
b[2] || (b[2] = _("div", { class: "title" }, [
|
|
684
|
+
_("img", {
|
|
655
685
|
src: he,
|
|
656
686
|
alt: "AI助手",
|
|
657
687
|
class: "panel-icon"
|
|
658
688
|
}),
|
|
659
|
-
|
|
689
|
+
_("h3", { class: "title-text" }, "Hi, 您好")
|
|
660
690
|
], -1)),
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
691
|
+
_("div", Ve, [
|
|
692
|
+
b[1] || (b[1] = ue(" 我是")),
|
|
693
|
+
_("span", De, D(n.title), 1)
|
|
664
694
|
]),
|
|
665
|
-
|
|
666
|
-
(
|
|
667
|
-
key:
|
|
695
|
+
_("div", Je, [
|
|
696
|
+
(O(!0), z(Y, null, Z(q.value, (P, $) => (O(), z("div", {
|
|
697
|
+
key: $,
|
|
668
698
|
class: "question-item",
|
|
669
|
-
onClick: (
|
|
699
|
+
onClick: (j) => w(P)
|
|
670
700
|
}, [
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
default:
|
|
674
|
-
|
|
675
|
-
name: "arrow-right",
|
|
701
|
+
_("span", null, D(P), 1),
|
|
702
|
+
A(T, null, {
|
|
703
|
+
default: B(() => [
|
|
704
|
+
A(J, {
|
|
705
|
+
name: "/images/svg/arrow-right.svg",
|
|
676
706
|
color: "#999999"
|
|
677
707
|
})
|
|
678
708
|
]),
|
|
679
709
|
_: 1
|
|
680
710
|
})
|
|
681
|
-
], 8,
|
|
711
|
+
], 8, We))), 128))
|
|
682
712
|
])
|
|
683
713
|
]))
|
|
684
714
|
]),
|
|
685
|
-
|
|
686
|
-
f.value ? (
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
modelValue:
|
|
690
|
-
"onUpdate:modelValue":
|
|
715
|
+
_("div", Qe, [
|
|
716
|
+
f.value ? (O(), z("img", Ke)) : V("", !0),
|
|
717
|
+
_("div", Ge, [
|
|
718
|
+
A(I, {
|
|
719
|
+
modelValue: h.value,
|
|
720
|
+
"onUpdate:modelValue": b[0] || (b[0] = (P) => h.value = P),
|
|
691
721
|
ref_key: "refInputTextString",
|
|
692
722
|
ref: g,
|
|
693
723
|
placeholder: "请输入您的问题",
|
|
694
724
|
autofocus: "",
|
|
695
|
-
onKeyup:
|
|
725
|
+
onKeyup: fe(s, ["enter"])
|
|
696
726
|
}, {
|
|
697
|
-
append:
|
|
698
|
-
|
|
727
|
+
append: B(() => [
|
|
728
|
+
_("div", {
|
|
699
729
|
class: "send-icon-box",
|
|
700
|
-
onClick:
|
|
730
|
+
onClick: s
|
|
701
731
|
}, [
|
|
702
|
-
|
|
732
|
+
_("img", {
|
|
703
733
|
src: c.value,
|
|
704
734
|
alt: "发送",
|
|
705
735
|
class: "send-icon"
|
|
@@ -710,226 +740,226 @@ const D = /* @__PURE__ */ J(Re, [["render", $e], ["__scopeId", "data-v-349f049f"
|
|
|
710
740
|
}, 8, ["modelValue"])
|
|
711
741
|
])
|
|
712
742
|
])
|
|
713
|
-
], 2)) :
|
|
743
|
+
], 2)) : V("", !0)
|
|
714
744
|
]),
|
|
715
745
|
_: 1
|
|
716
746
|
});
|
|
717
747
|
};
|
|
718
748
|
}
|
|
719
|
-
},
|
|
749
|
+
}, Ze = /* @__PURE__ */ W(Ye, [["__scopeId", "data-v-cf96dd03"]]);
|
|
720
750
|
var se = { exports: {} };
|
|
721
|
-
(function(
|
|
722
|
-
(function(
|
|
723
|
-
|
|
751
|
+
(function(n, t) {
|
|
752
|
+
(function(l, i) {
|
|
753
|
+
n.exports = i();
|
|
724
754
|
})(window, function() {
|
|
725
|
-
return function(
|
|
755
|
+
return function(l) {
|
|
726
756
|
var i = {};
|
|
727
|
-
function
|
|
728
|
-
if (i[
|
|
729
|
-
var d = i[
|
|
730
|
-
return
|
|
757
|
+
function a(e) {
|
|
758
|
+
if (i[e]) return i[e].exports;
|
|
759
|
+
var d = i[e] = { i: e, l: !1, exports: {} };
|
|
760
|
+
return l[e].call(d.exports, d, d.exports, a), d.l = !0, d.exports;
|
|
731
761
|
}
|
|
732
|
-
return
|
|
733
|
-
|
|
734
|
-
},
|
|
735
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(
|
|
736
|
-
},
|
|
737
|
-
if (1 & d && (
|
|
738
|
-
var
|
|
739
|
-
if (
|
|
740
|
-
return
|
|
741
|
-
}).bind(null,
|
|
742
|
-
return
|
|
743
|
-
},
|
|
744
|
-
var d =
|
|
745
|
-
return
|
|
762
|
+
return a.m = l, a.c = i, a.d = function(e, d, S) {
|
|
763
|
+
a.o(e, d) || Object.defineProperty(e, d, { enumerable: !0, get: S });
|
|
764
|
+
}, a.r = function(e) {
|
|
765
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
|
|
766
|
+
}, a.t = function(e, d) {
|
|
767
|
+
if (1 & d && (e = a(e)), 8 & d || 4 & d && typeof e == "object" && e && e.__esModule) return e;
|
|
768
|
+
var S = /* @__PURE__ */ Object.create(null);
|
|
769
|
+
if (a.r(S), Object.defineProperty(S, "default", { enumerable: !0, value: e }), 2 & d && typeof e != "string") for (var h in e) a.d(S, h, (function(g) {
|
|
770
|
+
return e[g];
|
|
771
|
+
}).bind(null, h));
|
|
772
|
+
return S;
|
|
773
|
+
}, a.n = function(e) {
|
|
774
|
+
var d = e && e.__esModule ? function() {
|
|
775
|
+
return e.default;
|
|
746
776
|
} : function() {
|
|
747
|
-
return
|
|
777
|
+
return e;
|
|
748
778
|
};
|
|
749
|
-
return
|
|
750
|
-
},
|
|
751
|
-
return Object.prototype.hasOwnProperty.call(
|
|
752
|
-
},
|
|
753
|
-
}([function(
|
|
754
|
-
function
|
|
755
|
-
u.push(f),
|
|
779
|
+
return a.d(d, "a", d), d;
|
|
780
|
+
}, a.o = function(e, d) {
|
|
781
|
+
return Object.prototype.hasOwnProperty.call(e, d);
|
|
782
|
+
}, a.p = "", a(a.s = 0);
|
|
783
|
+
}([function(l, i, a) {
|
|
784
|
+
function e(f, c, u, o) {
|
|
785
|
+
u.push(f), o.push([].concat(c[f] || []));
|
|
756
786
|
}
|
|
757
787
|
function d(f, c) {
|
|
758
788
|
if (!f) throw new Error("[getMaxDepsChain] dep 参数不能为空");
|
|
759
|
-
var u = [],
|
|
760
|
-
for (
|
|
761
|
-
var
|
|
762
|
-
if (
|
|
763
|
-
var p =
|
|
764
|
-
if (
|
|
765
|
-
|
|
766
|
-
} else u.push([].concat(
|
|
789
|
+
var u = [], o = [], r = [];
|
|
790
|
+
for (e(f, c, o, r); o.length; ) {
|
|
791
|
+
var v = r.pop();
|
|
792
|
+
if (v && v.length) {
|
|
793
|
+
var p = v.shift();
|
|
794
|
+
if (r.push(v), ~o.indexOf(p)) throw new Error("[getMaxDepsChain][loop] 存在循环依赖,请检查依赖关系; nextName: " + p + ", mainStack: " + o);
|
|
795
|
+
e(p, c, o, r);
|
|
796
|
+
} else u.push([].concat(o)), o.pop();
|
|
767
797
|
}
|
|
768
|
-
return u.reduce(function(
|
|
769
|
-
return
|
|
798
|
+
return u.reduce(function(k, w) {
|
|
799
|
+
return w.length > k.length ? w : k;
|
|
770
800
|
}, []);
|
|
771
801
|
}
|
|
772
|
-
function
|
|
802
|
+
function S(f) {
|
|
773
803
|
if (!f) throw new Error("[depsParser] 入参不能为空");
|
|
774
804
|
var c = {};
|
|
775
|
-
f.forEach(function(
|
|
776
|
-
c[
|
|
805
|
+
f.forEach(function(o) {
|
|
806
|
+
c[o.name] = o.deps || [];
|
|
777
807
|
});
|
|
778
808
|
var u = [];
|
|
779
|
-
return f.forEach(function(
|
|
780
|
-
var
|
|
781
|
-
|
|
809
|
+
return f.forEach(function(o) {
|
|
810
|
+
var r = d(o.name, c).length - 1;
|
|
811
|
+
o.priority = r, u[r] = (u[r] || []).concat(o);
|
|
782
812
|
}), u;
|
|
783
813
|
}
|
|
784
|
-
|
|
785
|
-
return
|
|
786
|
-
}),
|
|
787
|
-
return
|
|
788
|
-
}),
|
|
789
|
-
return
|
|
790
|
-
}),
|
|
791
|
-
return I;
|
|
792
|
-
}), s.d(i, "loadScriptsQueue", function() {
|
|
814
|
+
a.r(i), a.d(i, "loadScript", function() {
|
|
815
|
+
return q;
|
|
816
|
+
}), a.d(i, "loadScripts", function() {
|
|
817
|
+
return x;
|
|
818
|
+
}), a.d(i, "dynamicLoadScripts", function() {
|
|
819
|
+
return N;
|
|
820
|
+
}), a.d(i, "createScriptsLoadIterator", function() {
|
|
793
821
|
return U;
|
|
794
|
-
}),
|
|
822
|
+
}), a.d(i, "loadScriptsQueue", function() {
|
|
823
|
+
return E;
|
|
824
|
+
}), a.d(i, "getMaxDepsChain", function() {
|
|
795
825
|
return d;
|
|
796
|
-
}),
|
|
797
|
-
return
|
|
826
|
+
}), a.d(i, "depsParser", function() {
|
|
827
|
+
return S;
|
|
798
828
|
});
|
|
799
|
-
var
|
|
800
|
-
return (
|
|
801
|
-
for (var c, u = 1,
|
|
829
|
+
var h = function() {
|
|
830
|
+
return (h = Object.assign || function(f) {
|
|
831
|
+
for (var c, u = 1, o = arguments.length; u < o; u++) for (var r in c = arguments[u]) Object.prototype.hasOwnProperty.call(c, r) && (f[r] = c[r]);
|
|
802
832
|
return f;
|
|
803
833
|
}).apply(this, arguments);
|
|
804
|
-
}, g = function(f, c, u,
|
|
805
|
-
return new (u || (u = Promise))(function(
|
|
834
|
+
}, g = function(f, c, u, o) {
|
|
835
|
+
return new (u || (u = Promise))(function(r, v) {
|
|
806
836
|
function p(y) {
|
|
807
837
|
try {
|
|
808
|
-
|
|
809
|
-
} catch (
|
|
810
|
-
|
|
838
|
+
w(o.next(y));
|
|
839
|
+
} catch (s) {
|
|
840
|
+
v(s);
|
|
811
841
|
}
|
|
812
842
|
}
|
|
813
|
-
function
|
|
843
|
+
function k(y) {
|
|
814
844
|
try {
|
|
815
|
-
|
|
816
|
-
} catch (
|
|
817
|
-
|
|
845
|
+
w(o.throw(y));
|
|
846
|
+
} catch (s) {
|
|
847
|
+
v(s);
|
|
818
848
|
}
|
|
819
849
|
}
|
|
820
|
-
function
|
|
821
|
-
var
|
|
822
|
-
y.done ?
|
|
823
|
-
m(
|
|
824
|
-
})).then(p,
|
|
850
|
+
function w(y) {
|
|
851
|
+
var s;
|
|
852
|
+
y.done ? r(y.value) : (s = y.value, s instanceof u ? s : new u(function(m) {
|
|
853
|
+
m(s);
|
|
854
|
+
})).then(p, k);
|
|
825
855
|
}
|
|
826
|
-
|
|
856
|
+
w((o = o.apply(f, [])).next());
|
|
827
857
|
});
|
|
828
|
-
},
|
|
829
|
-
var u,
|
|
830
|
-
if (1 &
|
|
831
|
-
return
|
|
858
|
+
}, R = function(f, c) {
|
|
859
|
+
var u, o, r, v, p = { label: 0, sent: function() {
|
|
860
|
+
if (1 & r[0]) throw r[1];
|
|
861
|
+
return r[1];
|
|
832
862
|
}, trys: [], ops: [] };
|
|
833
|
-
return
|
|
863
|
+
return v = { next: k(0), throw: k(1), return: k(2) }, typeof Symbol == "function" && (v[Symbol.iterator] = function() {
|
|
834
864
|
return this;
|
|
835
|
-
}),
|
|
836
|
-
function
|
|
865
|
+
}), v;
|
|
866
|
+
function k(w) {
|
|
837
867
|
return function(y) {
|
|
838
|
-
return function(
|
|
868
|
+
return function(s) {
|
|
839
869
|
if (u) throw new TypeError("Generator is already executing.");
|
|
840
870
|
for (; p; ) try {
|
|
841
|
-
if (u = 1,
|
|
842
|
-
switch (
|
|
871
|
+
if (u = 1, o && (r = 2 & s[0] ? o.return : s[0] ? o.throw || ((r = o.return) && r.call(o), 0) : o.next) && !(r = r.call(o, s[1])).done) return r;
|
|
872
|
+
switch (o = 0, r && (s = [2 & s[0], r.value]), s[0]) {
|
|
843
873
|
case 0:
|
|
844
874
|
case 1:
|
|
845
|
-
|
|
875
|
+
r = s;
|
|
846
876
|
break;
|
|
847
877
|
case 4:
|
|
848
|
-
return p.label++, { value:
|
|
878
|
+
return p.label++, { value: s[1], done: !1 };
|
|
849
879
|
case 5:
|
|
850
|
-
p.label++,
|
|
880
|
+
p.label++, o = s[1], s = [0];
|
|
851
881
|
continue;
|
|
852
882
|
case 7:
|
|
853
|
-
|
|
883
|
+
s = p.ops.pop(), p.trys.pop();
|
|
854
884
|
continue;
|
|
855
885
|
default:
|
|
856
|
-
if (
|
|
886
|
+
if (r = p.trys, !((r = r.length > 0 && r[r.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
|
|
857
887
|
p = 0;
|
|
858
888
|
continue;
|
|
859
889
|
}
|
|
860
|
-
if (
|
|
861
|
-
p.label =
|
|
890
|
+
if (s[0] === 3 && (!r || s[1] > r[0] && s[1] < r[3])) {
|
|
891
|
+
p.label = s[1];
|
|
862
892
|
break;
|
|
863
893
|
}
|
|
864
|
-
if (
|
|
865
|
-
p.label =
|
|
894
|
+
if (s[0] === 6 && p.label < r[1]) {
|
|
895
|
+
p.label = r[1], r = s;
|
|
866
896
|
break;
|
|
867
897
|
}
|
|
868
|
-
if (
|
|
869
|
-
p.label =
|
|
898
|
+
if (r && p.label < r[2]) {
|
|
899
|
+
p.label = r[2], p.ops.push(s);
|
|
870
900
|
break;
|
|
871
901
|
}
|
|
872
|
-
|
|
902
|
+
r[2] && p.ops.pop(), p.trys.pop();
|
|
873
903
|
continue;
|
|
874
904
|
}
|
|
875
|
-
|
|
905
|
+
s = c.call(f, p);
|
|
876
906
|
} catch (m) {
|
|
877
|
-
|
|
907
|
+
s = [6, m], o = 0;
|
|
878
908
|
} finally {
|
|
879
|
-
u =
|
|
909
|
+
u = r = 0;
|
|
880
910
|
}
|
|
881
|
-
if (5 &
|
|
882
|
-
return { value:
|
|
883
|
-
}([
|
|
911
|
+
if (5 & s[0]) throw s[1];
|
|
912
|
+
return { value: s[0] ? s[1] : void 0, done: !0 };
|
|
913
|
+
}([w, y]);
|
|
884
914
|
};
|
|
885
915
|
}
|
|
886
|
-
},
|
|
916
|
+
}, L = function(f) {
|
|
887
917
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
888
918
|
var c, u = f[Symbol.asyncIterator];
|
|
889
|
-
return u ? u.call(f) : (f = typeof __values == "function" ? __values(f) : f[Symbol.iterator](), c = {},
|
|
919
|
+
return u ? u.call(f) : (f = typeof __values == "function" ? __values(f) : f[Symbol.iterator](), c = {}, o("next"), o("throw"), o("return"), c[Symbol.asyncIterator] = function() {
|
|
890
920
|
return this;
|
|
891
921
|
}, c);
|
|
892
|
-
function
|
|
893
|
-
c[
|
|
894
|
-
return new Promise(function(p,
|
|
895
|
-
(function(
|
|
896
|
-
Promise.resolve(m).then(function(
|
|
897
|
-
|
|
922
|
+
function o(r) {
|
|
923
|
+
c[r] = f[r] && function(v) {
|
|
924
|
+
return new Promise(function(p, k) {
|
|
925
|
+
(function(w, y, s, m) {
|
|
926
|
+
Promise.resolve(m).then(function(b) {
|
|
927
|
+
w({ value: b, done: s });
|
|
898
928
|
}, y);
|
|
899
|
-
})(p,
|
|
929
|
+
})(p, k, (v = f[r](v)).done, v.value);
|
|
900
930
|
});
|
|
901
931
|
};
|
|
902
932
|
}
|
|
903
933
|
};
|
|
904
|
-
function
|
|
905
|
-
return c === void 0 && (c = !1), new Promise(function(u,
|
|
906
|
-
var
|
|
907
|
-
|
|
934
|
+
function q(f, c) {
|
|
935
|
+
return c === void 0 && (c = !1), new Promise(function(u, o) {
|
|
936
|
+
var r = c ? document.head : document.body, v = document.createElement("script");
|
|
937
|
+
v.type = "text/javascript", v.src = f, v.crossOrigin = "anonymous", v.onreadystatechange = u, v.onload = u, v.onerror = o, r.appendChild(v);
|
|
908
938
|
});
|
|
909
939
|
}
|
|
910
|
-
var
|
|
940
|
+
var x = function(f, c) {
|
|
911
941
|
return c === void 0 && (c = {}), g(void 0, void 0, void 0, function() {
|
|
912
|
-
var u,
|
|
913
|
-
return
|
|
914
|
-
switch (
|
|
942
|
+
var u, o, r, v, p;
|
|
943
|
+
return R(this, function(k) {
|
|
944
|
+
switch (k.label) {
|
|
915
945
|
case 0:
|
|
916
|
-
return u = c.baseUrl,
|
|
946
|
+
return u = c.baseUrl, o = u === void 0 ? "" : u, r = c.lastLoadResult, v = c.inHead, p = v !== void 0 && v, [4, Promise.all(f.map(function(w) {
|
|
917
947
|
return g(void 0, void 0, void 0, function() {
|
|
918
|
-
var y,
|
|
919
|
-
return
|
|
920
|
-
switch (
|
|
948
|
+
var y, s, m, b, T, I, P, $;
|
|
949
|
+
return R(this, function(j) {
|
|
950
|
+
switch (j.label) {
|
|
921
951
|
case 0:
|
|
922
|
-
return y =
|
|
952
|
+
return y = w.name, s = w.path, m = w.deps, (P = {})[y] = !0, b = P, ($ = {})[y] = !1, T = $, window[y] ? [2, b] : [3, 1];
|
|
923
953
|
case 1:
|
|
924
|
-
return
|
|
925
|
-
|
|
926
|
-
}),
|
|
927
|
-
return
|
|
954
|
+
return I = !0, m && r && [].concat(m).forEach(function(le) {
|
|
955
|
+
r[le] !== !1 && (I = !0);
|
|
956
|
+
}), I ? [4, q(s.indexOf("http") === 0 || s.indexOf("//:") === 0 ? s : o + s, p).then(function() {
|
|
957
|
+
return b;
|
|
928
958
|
}).catch(function() {
|
|
929
959
|
return T;
|
|
930
960
|
})] : [3, 3];
|
|
931
961
|
case 2:
|
|
932
|
-
return [2,
|
|
962
|
+
return [2, j.sent()];
|
|
933
963
|
case 3:
|
|
934
964
|
return [2, T];
|
|
935
965
|
}
|
|
@@ -937,50 +967,50 @@ var se = { exports: {} };
|
|
|
937
967
|
});
|
|
938
968
|
}))];
|
|
939
969
|
case 1:
|
|
940
|
-
return [2,
|
|
970
|
+
return [2, k.sent()];
|
|
941
971
|
}
|
|
942
972
|
});
|
|
943
973
|
});
|
|
944
|
-
},
|
|
974
|
+
}, N = function(f, c) {
|
|
945
975
|
return c === void 0 && (c = {}), function() {
|
|
946
|
-
var u = [].concat(
|
|
976
|
+
var u = [].concat(S(f));
|
|
947
977
|
return { next: function() {
|
|
948
978
|
if (u.length) {
|
|
949
|
-
var
|
|
950
|
-
return
|
|
951
|
-
return { value:
|
|
979
|
+
var o = u.shift();
|
|
980
|
+
return x(o, c).then(function(r) {
|
|
981
|
+
return { value: r, done: !1 };
|
|
952
982
|
});
|
|
953
983
|
}
|
|
954
984
|
return Promise.resolve({ done: !0 });
|
|
955
985
|
} };
|
|
956
986
|
};
|
|
957
|
-
}, I = function(f, c) {
|
|
958
|
-
var u;
|
|
959
|
-
return c === void 0 && (c = {}), (u = {})[Symbol.asyncIterator] = $(f, c), u;
|
|
960
987
|
}, U = function(f, c) {
|
|
988
|
+
var u;
|
|
989
|
+
return c === void 0 && (c = {}), (u = {})[Symbol.asyncIterator] = N(f, c), u;
|
|
990
|
+
}, E = function(f, c) {
|
|
961
991
|
return c === void 0 && (c = {}), g(void 0, void 0, void 0, function() {
|
|
962
|
-
var u,
|
|
963
|
-
return
|
|
964
|
-
switch (
|
|
992
|
+
var u, o, r, v, p, k;
|
|
993
|
+
return R(this, function(w) {
|
|
994
|
+
switch (w.label) {
|
|
965
995
|
case 0:
|
|
966
|
-
|
|
996
|
+
w.trys.push([0, 5, 6, 11]), u = L(U(f, c)), w.label = 1;
|
|
967
997
|
case 1:
|
|
968
998
|
return [4, u.next()];
|
|
969
999
|
case 2:
|
|
970
|
-
if ((
|
|
971
|
-
|
|
972
|
-
c.lastLoadResult =
|
|
973
|
-
}),
|
|
1000
|
+
if ((o = w.sent()).done) return [3, 4];
|
|
1001
|
+
r = o.value, c.lastLoadResult = c.lastLoadResult || {}, console.log("current load: ", r), r.forEach(function(y) {
|
|
1002
|
+
c.lastLoadResult = h(h({}, c.lastLoadResult), y);
|
|
1003
|
+
}), w.label = 3;
|
|
974
1004
|
case 3:
|
|
975
1005
|
return [3, 1];
|
|
976
1006
|
case 4:
|
|
977
1007
|
return [3, 11];
|
|
978
1008
|
case 5:
|
|
979
|
-
return
|
|
1009
|
+
return v = w.sent(), p = { error: v }, [3, 11];
|
|
980
1010
|
case 6:
|
|
981
|
-
return
|
|
1011
|
+
return w.trys.push([6, , 9, 10]), o && !o.done && (k = u.return) ? [4, k.call(u)] : [3, 8];
|
|
982
1012
|
case 7:
|
|
983
|
-
|
|
1013
|
+
w.sent(), w.label = 8;
|
|
984
1014
|
case 8:
|
|
985
1015
|
return [3, 10];
|
|
986
1016
|
case 9:
|
|
@@ -997,15 +1027,15 @@ var se = { exports: {} };
|
|
|
997
1027
|
}]);
|
|
998
1028
|
});
|
|
999
1029
|
})(se);
|
|
1000
|
-
var
|
|
1001
|
-
const
|
|
1030
|
+
var et = se.exports;
|
|
1031
|
+
const tt = {
|
|
1002
1032
|
key: 0,
|
|
1003
1033
|
class: "ai-assistant"
|
|
1004
|
-
},
|
|
1034
|
+
}, nt = {
|
|
1005
1035
|
name: "AiChat"
|
|
1006
1036
|
//这个⾮常重要,就是未来你放到其他项⽬中,组件标签的名字,⽐如:<sz-workflow></sz-workflow>
|
|
1007
|
-
},
|
|
1008
|
-
...
|
|
1037
|
+
}, rt = /* @__PURE__ */ pe({
|
|
1038
|
+
...nt,
|
|
1009
1039
|
props: {
|
|
1010
1040
|
token: {
|
|
1011
1041
|
type: String,
|
|
@@ -1024,13 +1054,13 @@ const nt = {
|
|
|
1024
1054
|
default: "数智AI助理"
|
|
1025
1055
|
}
|
|
1026
1056
|
},
|
|
1027
|
-
setup(
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
},
|
|
1031
|
-
|
|
1032
|
-
},
|
|
1033
|
-
console.log("用户输入:",
|
|
1057
|
+
setup(n) {
|
|
1058
|
+
const t = C(!1), l = C(!1), i = () => {
|
|
1059
|
+
t.value = !t.value;
|
|
1060
|
+
}, a = () => {
|
|
1061
|
+
l.value = !0, t.value = !1;
|
|
1062
|
+
}, e = (h) => {
|
|
1063
|
+
console.log("用户输入:", h);
|
|
1034
1064
|
}, d = [
|
|
1035
1065
|
{
|
|
1036
1066
|
name: "markdownit",
|
|
@@ -1041,105 +1071,97 @@ const nt = {
|
|
|
1041
1071
|
path: "highlight.11.11.1.min.js"
|
|
1042
1072
|
}
|
|
1043
1073
|
];
|
|
1044
|
-
let
|
|
1045
|
-
return
|
|
1074
|
+
let S = {};
|
|
1075
|
+
return et.loadScriptsQueue(d, {
|
|
1046
1076
|
baseUrl: "/scripts/ai/",
|
|
1047
|
-
lastLoadResult:
|
|
1077
|
+
lastLoadResult: S,
|
|
1048
1078
|
inHead: !1
|
|
1049
|
-
}).then((
|
|
1050
|
-
if (console.log("load ai deps: ",
|
|
1079
|
+
}).then((h) => {
|
|
1080
|
+
if (console.log("load ai deps: ", h), window.markdownit) {
|
|
1051
1081
|
const g = window.markdownit();
|
|
1052
|
-
console.log("markdownit: ", g),
|
|
1082
|
+
console.log("markdownit: ", g), Re();
|
|
1053
1083
|
}
|
|
1054
|
-
}), (
|
|
1055
|
-
|
|
1056
|
-
modelValue:
|
|
1057
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
1058
|
-
onSubmit:
|
|
1059
|
-
token:
|
|
1060
|
-
identifier:
|
|
1061
|
-
baseUrl:
|
|
1062
|
-
title:
|
|
1084
|
+
}), (h, g) => l.value ? V("", !0) : (O(), z("div", tt, [
|
|
1085
|
+
A(Ze, {
|
|
1086
|
+
modelValue: t.value,
|
|
1087
|
+
"onUpdate:modelValue": g[0] || (g[0] = (R) => t.value = R),
|
|
1088
|
+
onSubmit: e,
|
|
1089
|
+
token: n.token,
|
|
1090
|
+
identifier: n.identifier,
|
|
1091
|
+
baseUrl: n.baseUrl,
|
|
1092
|
+
title: n.title
|
|
1063
1093
|
}, null, 8, ["modelValue", "token", "identifier", "baseUrl", "title"]),
|
|
1064
|
-
|
|
1094
|
+
_("div", {
|
|
1065
1095
|
class: "ai-icon",
|
|
1066
1096
|
onClick: i
|
|
1067
1097
|
}, [
|
|
1068
|
-
|
|
1098
|
+
_("div", {
|
|
1069
1099
|
class: "close-icon",
|
|
1070
|
-
onClick: me(
|
|
1100
|
+
onClick: me(a, ["stop"])
|
|
1071
1101
|
}, g[1] || (g[1] = [
|
|
1072
|
-
|
|
1102
|
+
_("svg", {
|
|
1073
1103
|
viewBox: "0 0 1024 1024",
|
|
1074
1104
|
width: "8",
|
|
1075
1105
|
height: "8"
|
|
1076
1106
|
}, [
|
|
1077
|
-
|
|
1107
|
+
_("path", {
|
|
1078
1108
|
d: "M512 456.310154L94.247385 38.557538a39.384615 39.384615 0 0 0-55.689847 55.689847L456.310154 512 38.557538 929.752615a39.384615 39.384615 0 0 0 55.689847 55.689847L512 567.689846l417.752615 417.752616c15.163077 15.163077 40.526769 15.163077 55.689847 0s15.163077-40.526769 0-55.689847L567.689846 512l417.752616-417.752615a39.384615 39.384615 0 0 0-55.689847-55.689847L512 456.310154z",
|
|
1079
1109
|
fill: "currentColor"
|
|
1080
1110
|
})
|
|
1081
1111
|
], -1)
|
|
1082
1112
|
])),
|
|
1083
|
-
g[2] || (g[2] =
|
|
1113
|
+
g[2] || (g[2] = _("img", {
|
|
1084
1114
|
src: ve,
|
|
1085
1115
|
alt: "AI助手"
|
|
1086
1116
|
}, null, -1)),
|
|
1087
|
-
g[3] || (g[3] =
|
|
1117
|
+
g[3] || (g[3] = _("span", { class: "ai-icon-text" }, "AI助手", -1))
|
|
1088
1118
|
])
|
|
1089
1119
|
]));
|
|
1090
1120
|
}
|
|
1091
|
-
}),
|
|
1092
|
-
if (typeof window < "u") {
|
|
1093
|
-
let e = function() {
|
|
1094
|
-
var n = document.body, r = document.getElementById("__svg__icons__dom__");
|
|
1095
|
-
r || (r = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r.style.position = "absolute", r.style.width = "0", r.style.height = "0", r.id = "__svg__icons__dom__", r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink")), r.innerHTML = '<symbol viewBox="0 0 16 16" id="icon-arrow-right"><g fill="none" fill-rule="evenodd"><path d="M0 0h16v16H0Z" /><path d="m8.44 3.854.706-.707 4.642 4.641a.3.3 0 0 1 0 .424l-4.642 4.642-.707-.708L12.086 8.5H2v-1h10.086L8.439 3.854Z" fill="currentColor" fill-rule="nonzero" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-close"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path d="m12.865 12 3.956-3.955a.61.61 0 1 0-.864-.864L12 11.135 8.043 7.179a.61.61 0 1 0-.863.864L11.134 12 7.18 15.956a.61.61 0 1 0 .864.864L12 12.864l3.957 3.957c.12.12.275.179.432.179a.61.61 0 0 0 .432-1.042L12.865 12Z" fill-opacity=".65" fill="currentColor" fill-rule="nonzero" /></g></symbol><symbol viewBox="0 0 32 32" id="icon-copy"><path fill="currentColor" d="m27.4 14.7-6.1-6.1C21 8.2 20.5 8 20 8h-8c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V16.1c0-.5-.2-1-.6-1.4M20 10l5.9 6H20zm-8 18V10h6v6c0 1.1.9 2 2 2h6v10z" /><path fill="currentColor" d="M6 18H4V4c0-1.1.9-2 2-2h14v2H6z" /></symbol><symbol viewBox="0 0 24 24" id="icon-drawer-layout"><path d="M4.813 4.188a.624.624 0 0 0-.625.625v14.375c0 .345.279.625.625.625h14.375c.345 0 .625-.28.625-.625V4.813a.624.624 0 0 0-.625-.625ZM15.75 5.593h2.656v12.812H15.75V5.594Zm-10.156 0H14.5v12.812H5.594V5.594Z" fill="#999" fill-rule="nonzero" /></symbol>', n.insertBefore(r, n.lastChild);
|
|
1096
|
-
};
|
|
1097
|
-
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
|
|
1098
|
-
}
|
|
1099
|
-
const te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1121
|
+
}), ot = /* @__PURE__ */ W(rt, [["__scopeId", "data-v-4b85f480"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1100
1122
|
__proto__: null,
|
|
1101
|
-
SzAiChat:
|
|
1102
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1103
|
-
if (!
|
|
1104
|
-
|
|
1105
|
-
for (let
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1123
|
+
SzAiChat: ot
|
|
1124
|
+
}, Symbol.toStringTag, { value: "Module" })), K = function(n) {
|
|
1125
|
+
if (!K.installed) {
|
|
1126
|
+
K.installed = !0;
|
|
1127
|
+
for (let t in ne) {
|
|
1128
|
+
const l = Reflect.get(ne, t);
|
|
1129
|
+
n.component(l.name, l);
|
|
1108
1130
|
}
|
|
1109
1131
|
}
|
|
1110
|
-
},
|
|
1111
|
-
function
|
|
1112
|
-
componentPrefix:
|
|
1113
|
-
components:
|
|
1132
|
+
}, at = "0.1.2", st = "Sz";
|
|
1133
|
+
function it({
|
|
1134
|
+
componentPrefix: n = st,
|
|
1135
|
+
components: t = []
|
|
1114
1136
|
} = {}) {
|
|
1115
|
-
const
|
|
1116
|
-
function i(
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1137
|
+
const l = [];
|
|
1138
|
+
function i(e, d, S) {
|
|
1139
|
+
e.component(n + d) || e.component(
|
|
1140
|
+
n + d,
|
|
1141
|
+
S
|
|
1120
1142
|
);
|
|
1121
1143
|
}
|
|
1122
|
-
function
|
|
1123
|
-
|
|
1124
|
-
const { name:
|
|
1125
|
-
|
|
1126
|
-
i(
|
|
1144
|
+
function a(e) {
|
|
1145
|
+
l.includes(e) || (l.push(e), t.forEach((d) => {
|
|
1146
|
+
const { name: S, alias: h } = d;
|
|
1147
|
+
i(e, S, d), h && h.forEach((g) => {
|
|
1148
|
+
i(e, g, d);
|
|
1127
1149
|
});
|
|
1128
1150
|
}));
|
|
1129
1151
|
}
|
|
1130
1152
|
return {
|
|
1131
|
-
version:
|
|
1132
|
-
componentPrefix:
|
|
1133
|
-
install:
|
|
1153
|
+
version: at,
|
|
1154
|
+
componentPrefix: n,
|
|
1155
|
+
install: a
|
|
1134
1156
|
};
|
|
1135
1157
|
}
|
|
1136
|
-
const
|
|
1137
|
-
install(
|
|
1138
|
-
|
|
1158
|
+
const ct = {
|
|
1159
|
+
install(n) {
|
|
1160
|
+
K(n);
|
|
1139
1161
|
}
|
|
1140
1162
|
};
|
|
1141
1163
|
export {
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1164
|
+
ot as SzAiChat,
|
|
1165
|
+
it as create,
|
|
1166
|
+
ct as default
|
|
1145
1167
|
};
|