wi-chat 0.6.1 → 0.6.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/core/index.cjs +1 -1
- package/dist/core/index.js +273 -261
- package/dist/core/useChat.d.ts +61 -12
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +33 -33
- package/dist/mobile-ui/chat/ChatContainer.vue.d.ts +6 -6
- package/dist/mobile-ui/chat/ChatMessagesView.vue.d.ts +6 -6
- package/dist/mobile-ui/index.cjs +1 -1
- package/dist/mobile-ui/index.js +104 -104
- package/dist/mobile-ui/inputbox/Inputbox.vue.d.ts +5 -5
- package/dist/page-context/index.js +2 -4
- package/dist/parser/answerCom/actionExecute/actionProtocol.d.ts +1 -7
- package/dist/parser/answerCom/actionExecute/clarification.d.ts +15 -3
- package/dist/parser/answerCom/actionExecute/constants.d.ts +10 -0
- package/dist/parser/answerCom/actionExecute/parseCollectClarifications.d.ts +3 -2
- package/dist/parser/answerCom/actionExecute/parseHostAction.d.ts +3 -2
- package/dist/parser/answerCom/actionExecute/types.d.ts +3 -3
- package/dist/parser/index.cjs +2 -2
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/index.js +216 -258
- package/dist/parser/registry.d.ts +1 -1
- package/dist/renderers/aiAnswer/AiAnswerBubble.vue.d.ts +4 -4
- package/dist/renderers/clarification/ClarificationCard.vue.d.ts +3 -3
- package/dist/renderers/deepThinking/DeepThinkingSteps.vue.d.ts +4 -4
- package/dist/renderers/hostAction/HostActionStatus.vue.d.ts +3 -3
- package/dist/renderers/iframePage/IframePage.vue.d.ts +3 -3
- package/dist/renderers/index.cjs +1 -1
- package/dist/renderers/index.js +484 -498
- package/dist/renderers/knowledgeStream/KnowledgeStreamResult.vue.d.ts +3 -3
- package/dist/renderers/outputFile/OutputFile.vue.d.ts +3 -3
- package/dist/renderers/style.css +1 -1
- package/dist/request/index.cjs +2 -2
- package/dist/request/index.js +6 -13
- package/dist/request/ws.d.ts +3 -3
- package/dist/right-panel/RightPanel.vue.d.ts +6 -6
- package/dist/right-panel/RightPanelIcon.vue.d.ts +4 -4
- package/dist/right-panel/RightPanelTabs.vue.d.ts +5 -5
- package/dist/right-panel/index.cjs +1 -1
- package/dist/right-panel/index.js +397 -416
- package/dist/right-panel/panels/newtab/NewTabPanel.vue.d.ts +4 -4
- package/dist/right-panel/panels/web/WebPanel.vue.d.ts +3 -3
- package/dist/right-panel/shared/BrowserToolbar.vue.d.ts +3 -3
- package/dist/right-panel/shared/RightPanelToolList.vue.d.ts +5 -5
- package/dist/theme/index.js +2 -4
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.js +10 -19
- package/dist/tools/markdown/MarkdownContent.vue.d.ts +5 -5
- package/dist/tools/useAutoScroll.d.ts +3 -3
- package/dist/web-ui/attach/AttachmentCard.vue.d.ts +6 -6
- package/dist/web-ui/attach/AttachmentList.vue.d.ts +6 -6
- package/dist/web-ui/chat/ChatContainer.vue.d.ts +6 -6
- package/dist/web-ui/chat/ChatMessagesView.vue.d.ts +6 -6
- package/dist/web-ui/envswitch/EnvSwitch.vue.d.ts +5 -5
- package/dist/web-ui/index.cjs +1 -1
- package/dist/web-ui/index.js +630 -635
- package/dist/web-ui/inputbox/Inputbox.vue.d.ts +7 -7
- package/dist/web-ui/recordset/RecordsetTable.vue.d.ts +4 -4
- package/package.json +2 -1
package/dist/renderers/index.js
CHANGED
|
@@ -1,151 +1,150 @@
|
|
|
1
1
|
import "wi-chat/style.css";
|
|
2
|
-
import { defineAsyncComponent as H, defineComponent as j, computed as I, openBlock as
|
|
3
|
-
import { knowledgeStreamParser as
|
|
4
|
-
import { createStyleScope as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
{ ...
|
|
8
|
-
{ ...
|
|
9
|
-
{ ...
|
|
2
|
+
import { defineAsyncComponent as H, defineComponent as j, computed as I, openBlock as i, createElementBlock as u, createElementVNode as e, Fragment as M, renderList as B, createBlock as Z, resolveDynamicComponent as ye, createCommentVNode as V, createTextVNode as me, unref as l, toDisplayString as f, withDirectives as he, vShow as be, getCurrentInstance as ae, inject as re, toValue as z, ref as U, watch as le, onBeforeUnmount as ge, provide as ie, withKeys as se, withModifiers as Q, normalizeClass as D, Teleport as ke, createVNode as xe, Transition as Se, withCtx as $e, reactive as Ie, normalizeStyle as Ce } from "vue";
|
|
3
|
+
import { knowledgeStreamParser as Ee, iframePageParser as Oe, outputFileParser as Te, collectClarificationsParser as Ve, hostActionParser as Pe, formatFileSize as Ue, IFRAME_RESIZER_CHILD_SCRIPT as Me, submitClarification as Le, cancelClarification as je } from "wi-chat/parser";
|
|
4
|
+
import { createStyleScope as ue, renderMarkdown as ce, downloadTableAsExcel as Ne } from "wi-chat/tools";
|
|
5
|
+
import ne from "@iframe-resizer/vue/iframe-resizer.vue";
|
|
6
|
+
const Re = [
|
|
7
|
+
{ ...Ee, component: H(() => Promise.resolve().then(() => at)) },
|
|
8
|
+
{ ...Oe, component: H(() => Promise.resolve().then(() => es)) },
|
|
9
|
+
{ ...Te, component: H(() => Promise.resolve().then(() => qt)) },
|
|
10
10
|
// 确认卡片(front_reply + action_execute + executor=agent + collect_clarifications):
|
|
11
11
|
// 解析由内置 collectClarificationsParser 完成,提交/取消经 wi-chat/parser 回传 wait_reply
|
|
12
|
-
{ ...
|
|
12
|
+
{ ...Ve, component: H(() => Promise.resolve().then(() => Ns)) },
|
|
13
13
|
// 宿主执行过程(front_reply + action_execute + executor=host):宿主执行、进度卡片
|
|
14
|
-
{ ...
|
|
15
|
-
],
|
|
16
|
-
const a = (
|
|
14
|
+
{ ...Pe, component: H(() => Promise.resolve().then(() => Xs)) }
|
|
15
|
+
], Ae = (r) => {
|
|
16
|
+
const a = (c) => {
|
|
17
17
|
const t = {};
|
|
18
|
-
for (const o of
|
|
18
|
+
for (const o of c)
|
|
19
19
|
!o.answerType || !o.component || (t[o.answerType] = o.component);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
return { ...a(
|
|
23
|
-
},
|
|
22
|
+
return { ...a(Re), ...a(r ?? []) };
|
|
23
|
+
}, Fe = { class: "flex justify-start" }, De = { class: "ai-answer-bubble" }, Be = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "ai-answer-bubble__error"
|
|
26
|
-
},
|
|
26
|
+
}, ze = { class: "ai-answer-bubble__body" }, qe = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "ai-answer-bubble__status"
|
|
29
|
-
},
|
|
29
|
+
}, He = {
|
|
30
30
|
key: 2,
|
|
31
31
|
class: "ai-answer-bubble__status"
|
|
32
|
-
},
|
|
32
|
+
}, Ke = {
|
|
33
33
|
key: 3,
|
|
34
34
|
class: "ai-answer-bubble__loading"
|
|
35
|
-
},
|
|
35
|
+
}, Xe = /* @__PURE__ */ j({
|
|
36
36
|
__name: "AiAnswerBubble",
|
|
37
37
|
props: {
|
|
38
38
|
answer: {},
|
|
39
39
|
error: { type: Boolean, default: !1 },
|
|
40
40
|
stopped: { type: Boolean, default: !1 },
|
|
41
|
-
contentMap: { default: () =>
|
|
41
|
+
contentMap: { default: () => Ae() }
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const a =
|
|
43
|
+
setup(r) {
|
|
44
|
+
const a = r, c = I(() => {
|
|
45
45
|
var o, d;
|
|
46
46
|
return ((d = (o = a.answer) == null ? void 0 : o.answer) == null ? void 0 : d.reports) ?? [];
|
|
47
|
-
}), t = I(() =>
|
|
48
|
-
return (o, d) => (
|
|
49
|
-
e("div",
|
|
50
|
-
|
|
51
|
-
e("div",
|
|
52
|
-
(
|
|
53
|
-
key:
|
|
54
|
-
report:
|
|
47
|
+
}), t = I(() => c.value.filter((o) => a.contentMap[o.answer_type]));
|
|
48
|
+
return (o, d) => (i(), u("div", Fe, [
|
|
49
|
+
e("div", De, [
|
|
50
|
+
r.error ? (i(), u("div", Be, "回答加载失败")) : t.value.length ? (i(), u(M, { key: 1 }, [
|
|
51
|
+
e("div", ze, [
|
|
52
|
+
(i(!0), u(M, null, B(t.value, (v, S) => (i(), Z(ye(r.contentMap[v.answer_type]), {
|
|
53
|
+
key: S,
|
|
54
|
+
report: v
|
|
55
55
|
}, null, 8, ["report"]))), 128))
|
|
56
56
|
]),
|
|
57
|
-
|
|
58
|
-
], 64)) :
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
]))
|
|
57
|
+
r.stopped ? (i(), u("div", qe, "回答已停止")) : V("", !0)
|
|
58
|
+
], 64)) : r.stopped ? (i(), u("div", He, "回答已停止")) : c.value.length ? V("", !0) : (i(), u("div", Ke, [...d[0] || (d[0] = [
|
|
59
|
+
e("span", { class: "ai-answer-bubble__pulse" }, null, -1),
|
|
60
|
+
me("正在思考...", -1)
|
|
61
|
+
])]))
|
|
62
62
|
])
|
|
63
63
|
]));
|
|
64
64
|
}
|
|
65
|
-
}), N = (
|
|
66
|
-
const
|
|
65
|
+
}), N = (r, a) => {
|
|
66
|
+
const c = r.__vccOpts || r;
|
|
67
67
|
for (const [t, o] of a)
|
|
68
|
-
|
|
69
|
-
return
|
|
70
|
-
},
|
|
68
|
+
c[t] = o;
|
|
69
|
+
return c;
|
|
70
|
+
}, Qs = /* @__PURE__ */ N(Xe, [["__scopeId", "data-v-efad55c8"]]), Ge = ["data-wi-md-scope"], We = ["aria-expanded"], Ye = { class: "deep-thinking__count" }, Je = { class: "deep-thinking__list" }, Ze = { class: "deep-thinking__index" }, Qe = ["innerHTML"], et = /* @__PURE__ */ j({
|
|
71
71
|
__name: "DeepThinkingSteps",
|
|
72
72
|
props: {
|
|
73
73
|
steps: {},
|
|
74
74
|
expanded: { type: Boolean }
|
|
75
75
|
},
|
|
76
76
|
emits: ["update:expanded"],
|
|
77
|
-
setup(
|
|
78
|
-
const
|
|
79
|
-
let
|
|
80
|
-
return
|
|
81
|
-
},
|
|
82
|
-
return (
|
|
77
|
+
setup(r, { emit: a }) {
|
|
78
|
+
const c = r, t = a, o = { imageDownload: !1, tableDownload: !1 }, d = ue(), v = { ...o, styleScope: d.selector }, S = /* @__PURE__ */ new Map(), g = (h) => {
|
|
79
|
+
let w = S.get(h);
|
|
80
|
+
return w === void 0 && (S.size > 500 && S.clear(), w = ce(h, v), S.set(h, w)), w;
|
|
81
|
+
}, k = I(() => c.steps.map(g));
|
|
82
|
+
return (h, w) => k.value.length ? (i(), u("div", {
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "deep-thinking",
|
|
85
|
-
"data-wi-md-scope":
|
|
85
|
+
"data-wi-md-scope": l(d).id
|
|
86
86
|
}, [
|
|
87
87
|
e("button", {
|
|
88
88
|
type: "button",
|
|
89
89
|
class: "deep-thinking__header",
|
|
90
|
-
"aria-expanded":
|
|
91
|
-
onClick:
|
|
90
|
+
"aria-expanded": r.expanded,
|
|
91
|
+
onClick: w[0] || (w[0] = (x) => t("update:expanded", !r.expanded))
|
|
92
92
|
}, [
|
|
93
|
-
|
|
94
|
-
e("span",
|
|
95
|
-
e("span", null,
|
|
96
|
-
], 8,
|
|
97
|
-
|
|
98
|
-
(
|
|
93
|
+
w[1] || (w[1] = e("span", { class: "deep-thinking__title" }, "深度思考", -1)),
|
|
94
|
+
e("span", Ye, f(k.value.length), 1),
|
|
95
|
+
e("span", null, f(r.expanded ? "收起" : "展开"), 1)
|
|
96
|
+
], 8, We),
|
|
97
|
+
he(e("div", Je, [
|
|
98
|
+
(i(!0), u(M, null, B(k.value, (x, O) => (i(), u("div", {
|
|
99
99
|
key: O,
|
|
100
100
|
class: "deep-thinking__item"
|
|
101
101
|
}, [
|
|
102
|
-
e("span",
|
|
102
|
+
e("span", Ze, f(O + 1), 1),
|
|
103
103
|
e("div", {
|
|
104
104
|
class: "markdown-it",
|
|
105
|
-
innerHTML:
|
|
106
|
-
}, null, 8,
|
|
105
|
+
innerHTML: x
|
|
106
|
+
}, null, 8, Qe)
|
|
107
107
|
]))), 128))
|
|
108
108
|
], 512), [
|
|
109
|
-
[
|
|
109
|
+
[be, r.expanded]
|
|
110
110
|
])
|
|
111
|
-
], 8,
|
|
111
|
+
], 8, Ge)) : V("", !0);
|
|
112
112
|
}
|
|
113
|
-
}),
|
|
113
|
+
}), en = /* @__PURE__ */ N(et, [["__scopeId", "data-v-de333356"]]), tt = ["data-wi-md-scope"], st = ["innerHTML"], nt = /* @__PURE__ */ j({
|
|
114
114
|
__name: "KnowledgeStreamResult",
|
|
115
115
|
props: {
|
|
116
116
|
report: {}
|
|
117
117
|
},
|
|
118
|
-
setup(
|
|
119
|
-
const a =
|
|
118
|
+
setup(r) {
|
|
119
|
+
const a = r, c = { imageDownload: !1, tableDownload: !0 }, t = ue(), o = { ...c, styleScope: t.selector }, d = (k) => {
|
|
120
120
|
var O;
|
|
121
|
-
const
|
|
122
|
-
if (!
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return (g, p) => (l(), c("div", {
|
|
121
|
+
const w = k.target.closest(".wi-md-table-download");
|
|
122
|
+
if (!w) return;
|
|
123
|
+
k.preventDefault(), k.stopPropagation();
|
|
124
|
+
const x = (O = w.closest(".wi-md-table-wrap")) == null ? void 0 : O.querySelector("table");
|
|
125
|
+
x && Ne(x);
|
|
126
|
+
}, v = /* @__PURE__ */ new Map(), S = (k) => {
|
|
127
|
+
let h = v.get(k);
|
|
128
|
+
return h === void 0 && (v.size > 300 && v.clear(), h = ce(k, o), v.set(k, h)), h;
|
|
129
|
+
}, g = I(() => (a.report.values || []).map((k) => S(k.answer || "")));
|
|
130
|
+
return (k, h) => (i(), u("div", {
|
|
132
131
|
class: "knowledge-result",
|
|
133
|
-
"data-wi-md-scope":
|
|
132
|
+
"data-wi-md-scope": l(t).id,
|
|
134
133
|
onClick: d
|
|
135
134
|
}, [
|
|
136
|
-
(
|
|
137
|
-
key:
|
|
135
|
+
(i(!0), u(M, null, B(g.value, (w, x) => (i(), u("div", {
|
|
136
|
+
key: x,
|
|
138
137
|
class: "markdown-it",
|
|
139
|
-
innerHTML:
|
|
140
|
-
}, null, 8,
|
|
141
|
-
], 8,
|
|
138
|
+
innerHTML: w
|
|
139
|
+
}, null, 8, st))), 128))
|
|
140
|
+
], 8, tt));
|
|
142
141
|
}
|
|
143
|
-
}),
|
|
142
|
+
}), ot = /* @__PURE__ */ N(nt, [["__scopeId", "data-v-857bc0d2"]]), at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
144
143
|
__proto__: null,
|
|
145
|
-
default:
|
|
146
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
147
|
-
|
|
148
|
-
},
|
|
144
|
+
default: ot
|
|
145
|
+
}, Symbol.toStringTag, { value: "Module" })), de = Symbol("wi-chat-output-file-config"), tn = (r) => {
|
|
146
|
+
ie(de, r);
|
|
147
|
+
}, rt = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg", "ico"]), lt = /* @__PURE__ */ new Set(["mp3", "wav", "ogg", "m4a", "aac", "flac"]), it = /* @__PURE__ */ new Set(["mp4", "webm", "mov", "avi", "mkv"]), ut = /* @__PURE__ */ new Set(["doc", "docx", "xls", "xlsx", "ppt", "pptx"]), ct = /* @__PURE__ */ new Set(["html", "htm"]), dt = /* @__PURE__ */ new Set([
|
|
149
148
|
"js",
|
|
150
149
|
"mjs",
|
|
151
150
|
"cjs",
|
|
@@ -171,7 +170,7 @@ const ze = [
|
|
|
171
170
|
"css",
|
|
172
171
|
"scss",
|
|
173
172
|
"less"
|
|
174
|
-
]),
|
|
173
|
+
]), _t = /* @__PURE__ */ new Set([
|
|
175
174
|
"txt",
|
|
176
175
|
"text",
|
|
177
176
|
"md",
|
|
@@ -187,217 +186,198 @@ const ze = [
|
|
|
187
186
|
"env",
|
|
188
187
|
"toml",
|
|
189
188
|
"sql"
|
|
190
|
-
]),
|
|
191
|
-
if (!F.has(
|
|
192
|
-
const
|
|
193
|
-
|
|
189
|
+
]), pt = 20, F = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Map(), ft = (r, a) => {
|
|
190
|
+
if (!F.has(r) && F.size >= pt) {
|
|
191
|
+
const c = F.keys().next().value;
|
|
192
|
+
c !== void 0 && F.delete(c);
|
|
194
193
|
}
|
|
195
|
-
F.set(
|
|
196
|
-
},
|
|
197
|
-
const a =
|
|
198
|
-
return a >= 0 ?
|
|
199
|
-
},
|
|
200
|
-
const a =
|
|
194
|
+
F.set(r, a);
|
|
195
|
+
}, vt = (r) => {
|
|
196
|
+
const a = r.lastIndexOf(".");
|
|
197
|
+
return a >= 0 ? r.slice(a + 1).toLowerCase() : "";
|
|
198
|
+
}, wt = (r) => rt.has(r) ? "image" : r === "pdf" ? "pdf" : ct.has(r) ? "html" : lt.has(r) ? "audio" : it.has(r) ? "video" : ut.has(r) ? "office" : dt.has(r) ? "code" : _t.has(r) ? "text" : "unknown", yt = (r) => {
|
|
199
|
+
const a = ae() ? re(de, {}) : {}, c = I(() => {
|
|
201
200
|
var C;
|
|
202
|
-
const _ = z(
|
|
201
|
+
const _ = z(r);
|
|
203
202
|
return ((C = _ == null ? void 0 : _.values) == null ? void 0 : C.file_id) ?? (_ == null ? void 0 : _.file_id) ?? "";
|
|
204
203
|
}), t = I(() => {
|
|
205
204
|
var C;
|
|
206
|
-
const _ = z(
|
|
205
|
+
const _ = z(r);
|
|
207
206
|
return ((C = _ == null ? void 0 : _.values) == null ? void 0 : C.file_name) ?? (_ == null ? void 0 : _.file_name) ?? "未命名文件";
|
|
208
|
-
}), o = I(() =>
|
|
209
|
-
|
|
207
|
+
}), o = I(() => vt(t.value)), d = I(() => wt(o.value)), v = U(!1), S = U(!1), g = U(""), k = U(!1), h = U(""), w = U(""), x = U(null), O = I(() => x.value ? Ue(x.value.size) : ""), T = () => {
|
|
208
|
+
w.value && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(w.value), w.value = "";
|
|
210
209
|
}, R = async () => {
|
|
211
|
-
const _ =
|
|
212
|
-
if (!_)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return Y;
|
|
217
|
-
let A = se.get(E);
|
|
210
|
+
const _ = c.value, C = t.value;
|
|
211
|
+
if (!_) throw new Error("缺少文件 id,无法加载文件");
|
|
212
|
+
const E = _ || C, G = F.get(E);
|
|
213
|
+
if (G) return G;
|
|
214
|
+
let A = ee.get(E);
|
|
218
215
|
return A || (A = (async () => {
|
|
219
|
-
var
|
|
220
|
-
if (a.loadFile)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
})().then((L) => (St(E, L), L)).finally(() => se.delete(E)), se.set(E, A)), A;
|
|
230
|
-
}, S = async () => {
|
|
231
|
-
$.value = !0, b.value = "", g.value = !1, p.value = "", T();
|
|
216
|
+
var W, Y;
|
|
217
|
+
if (a.loadFile) return a.loadFile(_);
|
|
218
|
+
const L = (W = a.getFileUrl) == null ? void 0 : W.call(a, _);
|
|
219
|
+
if (!L) throw new Error("未配置文件加载方式(请提供 loadFile 或 getFileUrl)");
|
|
220
|
+
const y = await fetch(L, { headers: (Y = a.getHeaders) == null ? void 0 : Y.call(a) });
|
|
221
|
+
if (!y.ok) throw new Error(`文件加载失败(HTTP ${y.status})`);
|
|
222
|
+
return y.blob();
|
|
223
|
+
})().then((L) => (ft(E, L), L)).finally(() => ee.delete(E)), ee.set(E, A)), A;
|
|
224
|
+
}, b = async () => {
|
|
225
|
+
S.value = !0, g.value = "", k.value = !1, h.value = "", T();
|
|
232
226
|
try {
|
|
233
227
|
const _ = await R();
|
|
234
|
-
|
|
228
|
+
x.value = _;
|
|
235
229
|
const C = d.value;
|
|
236
230
|
if (C === "office") {
|
|
237
|
-
|
|
231
|
+
k.value = !0;
|
|
238
232
|
return;
|
|
239
233
|
}
|
|
240
234
|
if (C === "image" || C === "pdf" || C === "audio" || C === "video") {
|
|
241
|
-
typeof URL < "u" && typeof URL.createObjectURL == "function" && (
|
|
235
|
+
typeof URL < "u" && typeof URL.createObjectURL == "function" && (w.value = URL.createObjectURL(_));
|
|
242
236
|
return;
|
|
243
237
|
}
|
|
244
238
|
const E = await _.text();
|
|
245
239
|
if (E.includes("\0")) {
|
|
246
|
-
|
|
240
|
+
k.value = !0;
|
|
247
241
|
return;
|
|
248
242
|
}
|
|
249
|
-
|
|
243
|
+
h.value = E;
|
|
250
244
|
} catch (_) {
|
|
251
|
-
|
|
245
|
+
g.value = _ instanceof Error ? _.message : String(_);
|
|
252
246
|
} finally {
|
|
253
|
-
|
|
247
|
+
S.value = !1;
|
|
254
248
|
}
|
|
255
|
-
},
|
|
249
|
+
}, $ = async () => {
|
|
256
250
|
if (a.openPreview) {
|
|
257
251
|
a.openPreview({
|
|
258
|
-
fileId:
|
|
252
|
+
fileId: c.value,
|
|
259
253
|
fileName: t.value,
|
|
260
254
|
loadFile: R,
|
|
261
|
-
download:
|
|
255
|
+
download: X
|
|
262
256
|
});
|
|
263
257
|
return;
|
|
264
258
|
}
|
|
265
|
-
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
},
|
|
259
|
+
v.value = !0, await b();
|
|
260
|
+
}, K = () => {
|
|
261
|
+
v.value = !1, S.value = !1, g.value = "", k.value = !1, h.value = "", T();
|
|
262
|
+
}, X = async () => {
|
|
269
263
|
try {
|
|
270
|
-
const _ =
|
|
271
|
-
if (
|
|
272
|
-
a.downloadFile({ fileId:
|
|
264
|
+
const _ = x.value ?? await R();
|
|
265
|
+
if (x.value = _, a.downloadFile) {
|
|
266
|
+
a.downloadFile({ fileId: c.value, fileName: t.value, blob: _ });
|
|
273
267
|
return;
|
|
274
268
|
}
|
|
275
|
-
if (typeof document > "u" || typeof URL > "u")
|
|
276
|
-
return;
|
|
269
|
+
if (typeof document > "u" || typeof URL > "u") return;
|
|
277
270
|
const C = URL.createObjectURL(_), E = document.createElement("a");
|
|
278
271
|
E.href = C, E.download = t.value, document.body.appendChild(E), E.click(), E.remove(), URL.revokeObjectURL(C);
|
|
279
272
|
} catch (_) {
|
|
280
|
-
|
|
273
|
+
g.value = _ instanceof Error ? _.message : String(_), !v.value && !a.openPreview && (v.value = !0);
|
|
281
274
|
}
|
|
282
275
|
}, q = (_) => {
|
|
283
|
-
_.key === "Escape" &&
|
|
276
|
+
_.key === "Escape" && v.value && K();
|
|
284
277
|
};
|
|
285
|
-
return
|
|
278
|
+
return le(v, (_) => {
|
|
286
279
|
typeof window > "u" || (_ ? window.addEventListener("keydown", q) : window.removeEventListener("keydown", q));
|
|
287
|
-
}),
|
|
280
|
+
}), ge(() => {
|
|
288
281
|
typeof window < "u" && window.removeEventListener("keydown", q), T();
|
|
289
282
|
}), {
|
|
290
|
-
fileId:
|
|
283
|
+
fileId: c,
|
|
291
284
|
fileName: t,
|
|
292
285
|
extension: o,
|
|
293
286
|
previewKind: d,
|
|
294
287
|
fileSize: O,
|
|
295
|
-
visible:
|
|
296
|
-
loading:
|
|
297
|
-
error:
|
|
298
|
-
unsupported:
|
|
299
|
-
textContent:
|
|
300
|
-
objectUrl:
|
|
301
|
-
open:
|
|
302
|
-
close:
|
|
303
|
-
download:
|
|
288
|
+
visible: v,
|
|
289
|
+
loading: S,
|
|
290
|
+
error: g,
|
|
291
|
+
unsupported: k,
|
|
292
|
+
textContent: h,
|
|
293
|
+
objectUrl: w,
|
|
294
|
+
open: $,
|
|
295
|
+
close: K,
|
|
296
|
+
download: X
|
|
304
297
|
};
|
|
305
|
-
},
|
|
306
|
-
viewBox: "0 0 24 24",
|
|
307
|
-
fill: "none",
|
|
308
|
-
stroke: "currentColor",
|
|
309
|
-
"stroke-width": "1.7",
|
|
310
|
-
"stroke-linecap": "round",
|
|
311
|
-
"stroke-linejoin": "round"
|
|
312
|
-
}, [
|
|
313
|
-
/* @__PURE__ */ e("path", { d: "M7 2.5h7l4 4V21.5H7z" }),
|
|
314
|
-
/* @__PURE__ */ e("path", { d: "M14 2.5v4h4" })
|
|
315
|
-
], -1)), Tt = [
|
|
316
|
-
Ot
|
|
317
|
-
], Vt = { class: "wi-output-file__info" }, Pt = ["title"], Ut = { class: "wi-output-file__meta" }, Mt = { class: "wi-output-file__ext" }, Lt = {
|
|
298
|
+
}, mt = { class: "wi-output-file" }, ht = ["aria-label"], bt = { class: "wi-output-file__info" }, gt = ["title"], kt = { class: "wi-output-file__meta" }, xt = { class: "wi-output-file__ext" }, St = {
|
|
318
299
|
key: 0,
|
|
319
300
|
class: "wi-output-file__size"
|
|
320
|
-
},
|
|
321
|
-
viewBox: "0 0 24 24",
|
|
322
|
-
fill: "none",
|
|
323
|
-
stroke: "currentColor",
|
|
324
|
-
"stroke-width": "1.8",
|
|
325
|
-
"stroke-linecap": "round",
|
|
326
|
-
"stroke-linejoin": "round"
|
|
327
|
-
}, [
|
|
328
|
-
/* @__PURE__ */ e("path", { d: "M12 3v12" }),
|
|
329
|
-
/* @__PURE__ */ e("path", { d: "m7 10 5 5 5-5" }),
|
|
330
|
-
/* @__PURE__ */ e("path", { d: "M5 21h14" })
|
|
331
|
-
], -1)), Nt = [
|
|
332
|
-
jt
|
|
333
|
-
], Rt = ["aria-label"], At = { class: "wi-output-file-drawer__head" }, Ft = { class: "wi-output-file-drawer__title" }, Dt = { class: "wi-output-file-drawer__ext" }, Bt = ["title"], zt = {
|
|
301
|
+
}, $t = ["aria-label"], It = { class: "wi-output-file-drawer__head" }, Ct = { class: "wi-output-file-drawer__title" }, Et = { class: "wi-output-file-drawer__ext" }, Ot = ["title"], Tt = {
|
|
334
302
|
key: 0,
|
|
335
303
|
class: "wi-output-file-drawer__size"
|
|
336
|
-
},
|
|
304
|
+
}, Vt = { class: "wi-output-file-drawer__actions" }, Pt = { class: "wi-output-file-drawer__body" }, Ut = {
|
|
337
305
|
key: 0,
|
|
338
306
|
class: "wi-output-file-drawer__state"
|
|
339
|
-
},
|
|
307
|
+
}, Mt = {
|
|
340
308
|
key: 1,
|
|
341
309
|
class: "wi-output-file-drawer__state is-error"
|
|
342
|
-
},
|
|
310
|
+
}, Lt = {
|
|
343
311
|
key: 2,
|
|
344
312
|
class: "wi-output-file-drawer__state"
|
|
345
|
-
},
|
|
313
|
+
}, jt = ["src", "alt"], Nt = ["src", "title"], Rt = ["srcdoc", "title"], At = ["src"], Ft = ["src"], Dt = {
|
|
346
314
|
key: 8,
|
|
347
315
|
class: "wi-output-file-drawer__text"
|
|
348
|
-
},
|
|
316
|
+
}, Bt = /* @__PURE__ */ j({
|
|
349
317
|
__name: "OutputFile",
|
|
350
318
|
props: {
|
|
351
319
|
report: {}
|
|
352
320
|
},
|
|
353
|
-
setup(
|
|
354
|
-
const a =
|
|
355
|
-
fileName:
|
|
321
|
+
setup(r) {
|
|
322
|
+
const a = r, {
|
|
323
|
+
fileName: c,
|
|
356
324
|
extension: t,
|
|
357
325
|
previewKind: o,
|
|
358
326
|
fileSize: d,
|
|
359
|
-
visible:
|
|
360
|
-
loading:
|
|
361
|
-
error:
|
|
362
|
-
unsupported:
|
|
363
|
-
textContent:
|
|
364
|
-
objectUrl:
|
|
365
|
-
open:
|
|
327
|
+
visible: v,
|
|
328
|
+
loading: S,
|
|
329
|
+
error: g,
|
|
330
|
+
unsupported: k,
|
|
331
|
+
textContent: h,
|
|
332
|
+
objectUrl: w,
|
|
333
|
+
open: x,
|
|
366
334
|
close: O,
|
|
367
335
|
download: T
|
|
368
|
-
} =
|
|
369
|
-
return (R,
|
|
336
|
+
} = yt(() => a.report);
|
|
337
|
+
return (R, b) => (i(), u("div", mt, [
|
|
370
338
|
e("div", {
|
|
371
339
|
class: "wi-output-file__card",
|
|
372
340
|
role: "button",
|
|
373
341
|
tabindex: "0",
|
|
374
|
-
"aria-label": `预览文件 ${
|
|
375
|
-
onClick:
|
|
376
|
-
(
|
|
342
|
+
"aria-label": `预览文件 ${l(c)}`,
|
|
343
|
+
onClick: b[1] || (b[1] = //@ts-ignore
|
|
344
|
+
(...$) => l(x) && l(x)(...$)),
|
|
377
345
|
onKeydown: [
|
|
378
|
-
|
|
346
|
+
b[2] || (b[2] = se(
|
|
379
347
|
//@ts-ignore
|
|
380
|
-
(
|
|
348
|
+
(...$) => l(x) && l(x)(...$),
|
|
381
349
|
["enter"]
|
|
382
350
|
)),
|
|
383
|
-
|
|
351
|
+
b[3] || (b[3] = se(Q(
|
|
384
352
|
//@ts-ignore
|
|
385
|
-
(
|
|
353
|
+
(...$) => l(x) && l(x)(...$),
|
|
386
354
|
["prevent"]
|
|
387
355
|
), ["space"]))
|
|
388
356
|
]
|
|
389
357
|
}, [
|
|
390
358
|
e("span", {
|
|
391
|
-
class: D(["wi-output-file__icon", `is-${
|
|
392
|
-
},
|
|
393
|
-
|
|
359
|
+
class: D(["wi-output-file__icon", `is-${l(o)}`])
|
|
360
|
+
}, [...b[9] || (b[9] = [
|
|
361
|
+
e("svg", {
|
|
362
|
+
viewBox: "0 0 24 24",
|
|
363
|
+
fill: "none",
|
|
364
|
+
stroke: "currentColor",
|
|
365
|
+
"stroke-width": "1.7",
|
|
366
|
+
"stroke-linecap": "round",
|
|
367
|
+
"stroke-linejoin": "round"
|
|
368
|
+
}, [
|
|
369
|
+
e("path", { d: "M7 2.5h7l4 4V21.5H7z" }),
|
|
370
|
+
e("path", { d: "M14 2.5v4h4" })
|
|
371
|
+
], -1)
|
|
372
|
+
])], 2),
|
|
373
|
+
e("div", bt, [
|
|
394
374
|
e("div", {
|
|
395
375
|
class: "wi-output-file__name",
|
|
396
|
-
title:
|
|
397
|
-
},
|
|
398
|
-
e("div",
|
|
399
|
-
e("span",
|
|
400
|
-
|
|
376
|
+
title: l(c)
|
|
377
|
+
}, f(l(c)), 9, gt),
|
|
378
|
+
e("div", kt, [
|
|
379
|
+
e("span", xt, f(l(t).toUpperCase() || "FILE"), 1),
|
|
380
|
+
l(d) ? (i(), u("span", St, f(l(d)), 1)) : V("", !0)
|
|
401
381
|
])
|
|
402
382
|
]),
|
|
403
383
|
e("button", {
|
|
@@ -405,22 +385,35 @@ const ze = [
|
|
|
405
385
|
class: "wi-output-file__download",
|
|
406
386
|
title: "下载文件",
|
|
407
387
|
"aria-label": "下载文件",
|
|
408
|
-
onClick:
|
|
388
|
+
onClick: b[0] || (b[0] = Q(
|
|
409
389
|
//@ts-ignore
|
|
410
|
-
(
|
|
390
|
+
(...$) => l(T) && l(T)(...$),
|
|
411
391
|
["stop"]
|
|
412
392
|
))
|
|
413
|
-
},
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
393
|
+
}, [...b[10] || (b[10] = [
|
|
394
|
+
e("svg", {
|
|
395
|
+
viewBox: "0 0 24 24",
|
|
396
|
+
fill: "none",
|
|
397
|
+
stroke: "currentColor",
|
|
398
|
+
"stroke-width": "1.8",
|
|
399
|
+
"stroke-linecap": "round",
|
|
400
|
+
"stroke-linejoin": "round"
|
|
401
|
+
}, [
|
|
402
|
+
e("path", { d: "M12 3v12" }),
|
|
403
|
+
e("path", { d: "m7 10 5 5 5-5" }),
|
|
404
|
+
e("path", { d: "M5 21h14" })
|
|
405
|
+
], -1)
|
|
406
|
+
])])
|
|
407
|
+
], 40, ht),
|
|
408
|
+
(i(), Z(ke, { to: "body" }, [
|
|
409
|
+
xe(Se, { name: "wi-output-file-fade" }, {
|
|
410
|
+
default: $e(() => [
|
|
411
|
+
l(v) ? (i(), u("div", {
|
|
419
412
|
key: 0,
|
|
420
413
|
class: "wi-output-file-mask",
|
|
421
|
-
onClick:
|
|
414
|
+
onClick: b[8] || (b[8] = Q(
|
|
422
415
|
//@ts-ignore
|
|
423
|
-
(
|
|
416
|
+
(...$) => l(O) && l(O)(...$),
|
|
424
417
|
["self"]
|
|
425
418
|
))
|
|
426
419
|
}, [
|
|
@@ -428,80 +421,80 @@ const ze = [
|
|
|
428
421
|
class: "wi-output-file-drawer",
|
|
429
422
|
role: "dialog",
|
|
430
423
|
"aria-modal": "true",
|
|
431
|
-
"aria-label": `预览文件 ${
|
|
424
|
+
"aria-label": `预览文件 ${l(c)}`
|
|
432
425
|
}, [
|
|
433
|
-
e("header",
|
|
434
|
-
e("div",
|
|
435
|
-
e("span",
|
|
426
|
+
e("header", It, [
|
|
427
|
+
e("div", Ct, [
|
|
428
|
+
e("span", Et, f(l(t).toUpperCase() || "FILE"), 1),
|
|
436
429
|
e("div", {
|
|
437
430
|
class: "wi-output-file-drawer__name",
|
|
438
|
-
title:
|
|
439
|
-
},
|
|
440
|
-
|
|
431
|
+
title: l(c)
|
|
432
|
+
}, f(l(c)), 9, Ot),
|
|
433
|
+
l(d) ? (i(), u("div", Tt, f(l(d)), 1)) : V("", !0)
|
|
441
434
|
]),
|
|
442
|
-
e("div",
|
|
435
|
+
e("div", Vt, [
|
|
443
436
|
e("button", {
|
|
444
437
|
type: "button",
|
|
445
438
|
class: "wi-output-file-drawer__btn",
|
|
446
|
-
onClick:
|
|
447
|
-
(
|
|
439
|
+
onClick: b[4] || (b[4] = //@ts-ignore
|
|
440
|
+
(...$) => l(T) && l(T)(...$))
|
|
448
441
|
}, "下载"),
|
|
449
442
|
e("button", {
|
|
450
443
|
type: "button",
|
|
451
444
|
class: "wi-output-file-drawer__btn wi-output-file-drawer__btn--close",
|
|
452
445
|
title: "关闭",
|
|
453
446
|
"aria-label": "关闭预览",
|
|
454
|
-
onClick:
|
|
455
|
-
(
|
|
447
|
+
onClick: b[5] || (b[5] = //@ts-ignore
|
|
448
|
+
(...$) => l(O) && l(O)(...$))
|
|
456
449
|
}, " × ")
|
|
457
450
|
])
|
|
458
451
|
]),
|
|
459
|
-
e("div",
|
|
460
|
-
|
|
461
|
-
e("p", null,
|
|
452
|
+
e("div", Pt, [
|
|
453
|
+
l(S) ? (i(), u("div", Ut, "文件加载中…")) : l(g) ? (i(), u("div", Mt, [
|
|
454
|
+
e("p", null, f(l(g)), 1),
|
|
462
455
|
e("button", {
|
|
463
456
|
type: "button",
|
|
464
457
|
class: "wi-output-file-drawer__btn",
|
|
465
|
-
onClick:
|
|
466
|
-
(
|
|
458
|
+
onClick: b[6] || (b[6] = //@ts-ignore
|
|
459
|
+
(...$) => l(T) && l(T)(...$))
|
|
467
460
|
}, "下载文件")
|
|
468
|
-
])) :
|
|
469
|
-
|
|
461
|
+
])) : l(k) ? (i(), u("div", Lt, [
|
|
462
|
+
b[11] || (b[11] = e("p", null, "该文件类型暂不支持在线预览,请下载后查看。", -1)),
|
|
470
463
|
e("button", {
|
|
471
464
|
type: "button",
|
|
472
465
|
class: "wi-output-file-drawer__btn",
|
|
473
|
-
onClick:
|
|
474
|
-
(
|
|
466
|
+
onClick: b[7] || (b[7] = //@ts-ignore
|
|
467
|
+
(...$) => l(T) && l(T)(...$))
|
|
475
468
|
}, "下载文件")
|
|
476
|
-
])) :
|
|
469
|
+
])) : l(o) === "image" && l(w) ? (i(), u("img", {
|
|
477
470
|
key: 3,
|
|
478
471
|
class: "wi-output-file-drawer__image",
|
|
479
|
-
src:
|
|
480
|
-
alt:
|
|
481
|
-
}, null, 8,
|
|
472
|
+
src: l(w),
|
|
473
|
+
alt: l(c)
|
|
474
|
+
}, null, 8, jt)) : l(o) === "pdf" && l(w) ? (i(), u("iframe", {
|
|
482
475
|
key: 4,
|
|
483
476
|
class: "wi-output-file-drawer__frame",
|
|
484
|
-
src:
|
|
485
|
-
title:
|
|
486
|
-
}, null, 8,
|
|
477
|
+
src: l(w),
|
|
478
|
+
title: l(c)
|
|
479
|
+
}, null, 8, Nt)) : l(o) === "html" ? (i(), u("iframe", {
|
|
487
480
|
key: 5,
|
|
488
481
|
class: "wi-output-file-drawer__frame",
|
|
489
|
-
srcdoc:
|
|
482
|
+
srcdoc: l(h),
|
|
490
483
|
sandbox: "allow-scripts allow-forms allow-modals",
|
|
491
|
-
title:
|
|
492
|
-
}, null, 8,
|
|
484
|
+
title: l(c)
|
|
485
|
+
}, null, 8, Rt)) : l(o) === "audio" && l(w) ? (i(), u("audio", {
|
|
493
486
|
key: 6,
|
|
494
487
|
class: "wi-output-file-drawer__media",
|
|
495
|
-
src:
|
|
488
|
+
src: l(w),
|
|
496
489
|
controls: ""
|
|
497
|
-
}, null, 8,
|
|
490
|
+
}, null, 8, At)) : l(o) === "video" && l(w) ? (i(), u("video", {
|
|
498
491
|
key: 7,
|
|
499
492
|
class: "wi-output-file-drawer__media",
|
|
500
|
-
src:
|
|
493
|
+
src: l(w),
|
|
501
494
|
controls: ""
|
|
502
|
-
}, null, 8,
|
|
495
|
+
}, null, 8, Ft)) : (i(), u("pre", Dt, f(l(h)), 1))
|
|
503
496
|
])
|
|
504
|
-
], 8,
|
|
497
|
+
], 8, $t)
|
|
505
498
|
])) : V("", !0)
|
|
506
499
|
]),
|
|
507
500
|
_: 1
|
|
@@ -509,91 +502,85 @@ const ze = [
|
|
|
509
502
|
]))
|
|
510
503
|
]));
|
|
511
504
|
}
|
|
512
|
-
}),
|
|
505
|
+
}), zt = /* @__PURE__ */ N(Bt, [["__scopeId", "data-v-f61a91b5"]]), qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
513
506
|
__proto__: null,
|
|
514
|
-
default:
|
|
515
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
516
|
-
var a,
|
|
517
|
-
const
|
|
518
|
-
return typeof
|
|
519
|
-
},
|
|
520
|
-
const
|
|
521
|
-
return
|
|
522
|
-
},
|
|
523
|
-
const
|
|
507
|
+
default: zt
|
|
508
|
+
}, Symbol.toStringTag, { value: "Module" })), Ht = () => {
|
|
509
|
+
var a, c;
|
|
510
|
+
const r = (c = (a = window == null ? void 0 : window.globalConfig) == null ? void 0 : a.WebApiUrl) == null ? void 0 : c.MainUrl;
|
|
511
|
+
return typeof r == "string" ? r : "";
|
|
512
|
+
}, Kt = () => window.location.origin + window.location.pathname, te = "access-session", Xt = () => {
|
|
513
|
+
const r = window.location.pathname.split("/").filter((a) => !!a).join("-");
|
|
514
|
+
return r ? `${r}-` : "";
|
|
515
|
+
}, Gt = () => {
|
|
516
|
+
const r = `${Xt()}${te}`, a = [];
|
|
524
517
|
for (let t = 0; t < localStorage.length; t++) {
|
|
525
518
|
const o = localStorage.key(t);
|
|
526
|
-
!o || !o.endsWith(
|
|
519
|
+
!o || !o.endsWith(te) || o.slice(0, o.lastIndexOf(":")) !== "wi admin" && (o.endsWith(`x-${te}`) || a.push(o));
|
|
527
520
|
}
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
530
|
-
return "";
|
|
521
|
+
const c = a.find((t) => t.endsWith(r)) ?? a[0];
|
|
522
|
+
if (!c) return "";
|
|
531
523
|
try {
|
|
532
|
-
const t = localStorage.getItem(
|
|
533
|
-
if (!t || t === "undefined")
|
|
534
|
-
return "";
|
|
524
|
+
const t = localStorage.getItem(c);
|
|
525
|
+
if (!t || t === "undefined") return "";
|
|
535
526
|
const o = JSON.parse(t);
|
|
536
527
|
return o == null ? "" : String(o);
|
|
537
528
|
} catch {
|
|
538
529
|
return "";
|
|
539
530
|
}
|
|
540
|
-
},
|
|
541
|
-
_e
|
|
542
|
-
},
|
|
543
|
-
const
|
|
544
|
-
return
|
|
545
|
-
},
|
|
546
|
-
const a =
|
|
547
|
-
var
|
|
548
|
-
const o = z(
|
|
549
|
-
return d ? a.resolveUrl ? a.resolveUrl(d) :
|
|
531
|
+
}, _e = Symbol("wi-chat-iframe-page-config"), sn = (r) => {
|
|
532
|
+
ie(_e, r);
|
|
533
|
+
}, Wt = (r, a) => {
|
|
534
|
+
const c = (a == null ? void 0 : a.mainUrl) !== void 0 ? String(z(a.mainUrl)) : Ht(), t = (a == null ? void 0 : a.token) !== void 0 ? String(z(a.token)) : Gt();
|
|
535
|
+
return r.replace(/\{\{\s*MAIN_URL\s*\}\}/g, c).replace(/\{\{\s*SERVE_URL\s*\}\}/g, Kt()).replace(/\{\{\s*token\s*\}\}/g, t);
|
|
536
|
+
}, Yt = (r) => {
|
|
537
|
+
const a = ae() ? re(_e, {}) : {}, c = I(() => {
|
|
538
|
+
var v;
|
|
539
|
+
const o = z(r), d = ((v = o == null ? void 0 : o.values) == null ? void 0 : v.url) ?? (o == null ? void 0 : o.url) ?? "";
|
|
540
|
+
return d ? a.resolveUrl ? a.resolveUrl(d) : Wt(d, a) : "";
|
|
550
541
|
}), t = I(() => {
|
|
551
542
|
var d;
|
|
552
|
-
const o = z(
|
|
543
|
+
const o = z(r);
|
|
553
544
|
return ((d = o == null ? void 0 : o.values) == null ? void 0 : d.srcdoc) ?? (o == null ? void 0 : o.srcdoc) ?? "";
|
|
554
545
|
});
|
|
555
|
-
return { url:
|
|
556
|
-
},
|
|
557
|
-
if (!
|
|
558
|
-
return !1;
|
|
546
|
+
return { url: c, srcdoc: t };
|
|
547
|
+
}, oe = "data-wi-iframe-resizer-child", Jt = (r) => {
|
|
548
|
+
if (!r) return !1;
|
|
559
549
|
let a = null;
|
|
560
550
|
try {
|
|
561
|
-
a =
|
|
551
|
+
a = r.contentDocument;
|
|
562
552
|
} catch {
|
|
563
553
|
return !1;
|
|
564
554
|
}
|
|
565
|
-
if (!a)
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
if (!u)
|
|
569
|
-
return !1;
|
|
555
|
+
if (!a) return !1;
|
|
556
|
+
const c = a.head || a.documentElement;
|
|
557
|
+
if (!c) return !1;
|
|
570
558
|
const t = a.defaultView;
|
|
571
|
-
if (t != null && t.parentIframe || t != null && t.parentIFrame || a.querySelector(`script[${
|
|
572
|
-
return !1;
|
|
559
|
+
if (t != null && t.parentIframe || t != null && t.parentIFrame || a.querySelector(`script[${oe}]`)) return !1;
|
|
573
560
|
const o = a.createElement("script");
|
|
574
|
-
return o.textContent =
|
|
575
|
-
},
|
|
561
|
+
return o.textContent = Me, o.setAttribute(oe, ""), c.appendChild(o), !0;
|
|
562
|
+
}, Zt = /* @__PURE__ */ j({
|
|
576
563
|
__name: "IframePage",
|
|
577
564
|
props: {
|
|
578
565
|
report: {}
|
|
579
566
|
},
|
|
580
|
-
setup(
|
|
581
|
-
const a =
|
|
582
|
-
|
|
567
|
+
setup(r) {
|
|
568
|
+
const a = r, { url: c, srcdoc: t } = Yt(() => a.report), o = (d) => {
|
|
569
|
+
Jt(d.target);
|
|
583
570
|
};
|
|
584
|
-
return (d,
|
|
571
|
+
return (d, v) => l(c) ? (i(), Z(ne, {
|
|
585
572
|
key: 0,
|
|
586
573
|
class: "iframe-page__frame iframe-page__frame--url",
|
|
587
574
|
license: "GPLv3",
|
|
588
|
-
src:
|
|
575
|
+
src: l(c),
|
|
589
576
|
width: "100%",
|
|
590
577
|
"warning-timeout": 0,
|
|
591
578
|
onLoad: o
|
|
592
|
-
}, null, 8, ["src"])) :
|
|
579
|
+
}, null, 8, ["src"])) : l(t) ? (i(), Z(ne, {
|
|
593
580
|
key: 1,
|
|
594
581
|
class: "iframe-page iframe-page--srcdoc",
|
|
595
582
|
license: "GPLv3",
|
|
596
|
-
srcdoc:
|
|
583
|
+
srcdoc: l(t),
|
|
597
584
|
width: "100%",
|
|
598
585
|
frameborder: "no",
|
|
599
586
|
border: "0",
|
|
@@ -602,341 +589,340 @@ const ze = [
|
|
|
602
589
|
scrolling: "no"
|
|
603
590
|
}, null, 8, ["srcdoc"])) : V("", !0);
|
|
604
591
|
}
|
|
605
|
-
}),
|
|
592
|
+
}), Qt = /* @__PURE__ */ N(Zt, [["__scopeId", "data-v-f4c94a4e"]]), es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
606
593
|
__proto__: null,
|
|
607
|
-
default:
|
|
608
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
594
|
+
default: Qt
|
|
595
|
+
}, Symbol.toStringTag, { value: "Module" })), ts = { class: "wi-clarify__header" }, ss = { class: "wi-clarify__heading" }, ns = { class: "wi-clarify__title" }, os = {
|
|
609
596
|
key: 0,
|
|
610
597
|
class: "wi-clarify__desc"
|
|
611
|
-
},
|
|
598
|
+
}, as = { class: "wi-clarify__status" }, rs = { class: "wi-clarify__progress" }, ls = { class: "wi-clarify__progress-track" }, is = {
|
|
612
599
|
key: 0,
|
|
613
600
|
class: "wi-clarify__panel"
|
|
614
|
-
},
|
|
601
|
+
}, us = { class: "wi-clarify__question" }, cs = {
|
|
615
602
|
key: 0,
|
|
616
603
|
class: "wi-clarify__question-desc"
|
|
617
|
-
},
|
|
604
|
+
}, ds = {
|
|
618
605
|
key: 1,
|
|
619
606
|
class: "wi-clarify__binding"
|
|
620
|
-
},
|
|
607
|
+
}, _s = {
|
|
621
608
|
key: 2,
|
|
622
609
|
class: "wi-clarify__options"
|
|
623
|
-
},
|
|
610
|
+
}, ps = ["onClick"], fs = { class: "wi-clarify__option-indicator" }, vs = {
|
|
624
611
|
key: 3,
|
|
625
612
|
class: "wi-clarify__date"
|
|
626
|
-
},
|
|
613
|
+
}, ws = ["for"], ys = ["id", "value"], ms = { class: "wi-clarify__text" }, hs = {
|
|
627
614
|
key: 0,
|
|
628
615
|
class: "wi-clarify__or"
|
|
629
|
-
},
|
|
630
|
-
Ls
|
|
631
|
-
], Ns = ["for"], Rs = ["id", "value", "placeholder"], As = {
|
|
616
|
+
}, bs = ["for"], gs = ["id", "value", "placeholder"], ks = {
|
|
632
617
|
class: "wi-clarify__dots",
|
|
633
618
|
"aria-label": "确认问题导航"
|
|
634
|
-
},
|
|
619
|
+
}, xs = ["aria-label", "onClick"], Ss = { class: "wi-clarify__footer" }, $s = { class: "wi-clarify__actions" }, Is = { class: "wi-clarify__actions" }, Cs = ["disabled"], Es = {
|
|
635
620
|
key: 1,
|
|
636
621
|
class: "wi-clarify__result"
|
|
637
|
-
},
|
|
622
|
+
}, Os = { class: "wi-clarify__result-icon" }, Ts = { class: "wi-clarify__result-body" }, Vs = {
|
|
638
623
|
key: 0,
|
|
639
624
|
class: "wi-clarify__summary"
|
|
640
|
-
},
|
|
625
|
+
}, Ps = { key: 1 }, Us = { key: 2 }, Ms = {
|
|
641
626
|
key: 2,
|
|
642
627
|
class: "wi-clarify__feedback"
|
|
643
|
-
},
|
|
628
|
+
}, Ls = /* @__PURE__ */ j({
|
|
644
629
|
__name: "ClarificationCard",
|
|
645
630
|
props: {
|
|
646
631
|
report: {}
|
|
647
632
|
},
|
|
648
|
-
setup(
|
|
649
|
-
const a =
|
|
633
|
+
setup(r) {
|
|
634
|
+
const a = r, c = {
|
|
650
635
|
requestId: "",
|
|
651
636
|
title: "需要补充信息",
|
|
652
637
|
description: "",
|
|
653
638
|
items: [],
|
|
654
639
|
status: "expired",
|
|
655
640
|
resultMessage: "本次补充信息已失效(回答已结束)"
|
|
656
|
-
}, t = I(() => a.report.values ??
|
|
657
|
-
|
|
641
|
+
}, t = I(() => a.report.values ?? c), o = I(() => t.value.items ?? []), d = U(0), v = Ie({}), S = U(!1), g = U("");
|
|
642
|
+
le(() => {
|
|
658
643
|
var s;
|
|
659
644
|
return (s = t.value) == null ? void 0 : s.requestId;
|
|
660
645
|
}, () => {
|
|
661
|
-
Object.keys(
|
|
662
|
-
const
|
|
663
|
-
s.default !== void 0 && (s.input.type === "multi_select" ?
|
|
646
|
+
Object.keys(v).forEach((s) => delete v[s]), o.value.forEach((s) => {
|
|
647
|
+
const n = { structuredValue: void 0, structuredValues: [], textValue: "" };
|
|
648
|
+
s.default !== void 0 && (s.input.type === "multi_select" ? n.structuredValues = Array.isArray(s.default) ? [...s.default] : [] : s.input.type === "text" ? n.textValue = String(s.default) : n.structuredValue = s.default), v[s.id] = n;
|
|
664
649
|
}), d.value = 0;
|
|
665
650
|
}, { immediate: !0 });
|
|
666
|
-
const
|
|
667
|
-
var s,
|
|
668
|
-
return ((s = t.value) == null ? void 0 : s.status) === "submitted" ? "已提交" : ((
|
|
669
|
-
}),
|
|
651
|
+
const h = (s) => (v[s] || (v[s] = { structuredValue: void 0, structuredValues: [], textValue: "" }), v[s]), w = I(() => {
|
|
652
|
+
var s, n, p;
|
|
653
|
+
return ((s = t.value) == null ? void 0 : s.status) === "submitted" ? "已提交" : ((n = t.value) == null ? void 0 : n.status) === "cancelled" ? "已取消" : ((p = t.value) == null ? void 0 : p.status) === "expired" ? "已失效" : "等待回答";
|
|
654
|
+
}), x = (s) => {
|
|
670
655
|
try {
|
|
671
|
-
const
|
|
672
|
-
return
|
|
656
|
+
const n = JSON.stringify(s);
|
|
657
|
+
return n === void 0 ? String(s) : n;
|
|
673
658
|
} catch {
|
|
674
659
|
return String(s);
|
|
675
660
|
}
|
|
676
|
-
}, O = (s,
|
|
677
|
-
const
|
|
678
|
-
return s.input.type === "multi_select" ?
|
|
679
|
-
}, R = (s,
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
682
|
-
const m =
|
|
683
|
-
m >= 0 ?
|
|
661
|
+
}, O = (s, n) => x(s) === x(n), T = (s, n) => {
|
|
662
|
+
const p = h(s.id);
|
|
663
|
+
return s.input.type === "multi_select" ? p.structuredValues.some((m) => O(m, n)) : O(p.structuredValue, n);
|
|
664
|
+
}, R = (s, n) => {
|
|
665
|
+
const p = h(s.id);
|
|
666
|
+
if (p.textValue = "", s.input.type === "multi_select") {
|
|
667
|
+
const m = p.structuredValues.findIndex((P) => O(P, n));
|
|
668
|
+
m >= 0 ? p.structuredValues.splice(m, 1) : p.structuredValues.push(n);
|
|
684
669
|
return;
|
|
685
670
|
}
|
|
686
|
-
|
|
687
|
-
},
|
|
688
|
-
var
|
|
689
|
-
return ((
|
|
690
|
-
},
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
},
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
},
|
|
697
|
-
const
|
|
698
|
-
return
|
|
671
|
+
p.structuredValue = n;
|
|
672
|
+
}, b = (s) => {
|
|
673
|
+
var n;
|
|
674
|
+
return ((n = s.target) == null ? void 0 : n.value) ?? "";
|
|
675
|
+
}, $ = (s, n) => {
|
|
676
|
+
const p = h(s.id);
|
|
677
|
+
p.textValue = b(n), s.input.type !== "text" && (p.structuredValue = void 0, p.structuredValues.splice(0));
|
|
678
|
+
}, K = (s, n) => {
|
|
679
|
+
const p = h(s.id);
|
|
680
|
+
p.structuredValue = b(n), p.textValue = "";
|
|
681
|
+
}, X = (s) => {
|
|
682
|
+
const n = h(s.id).structuredValue;
|
|
683
|
+
return n == null ? "" : String(n);
|
|
699
684
|
}, q = (s) => {
|
|
700
|
-
var
|
|
701
|
-
return ((
|
|
685
|
+
var n;
|
|
686
|
+
return ((n = s.input.textInput) == null ? void 0 : n.placeholder) ?? s.input.placeholder ?? (s.input.type === "text" ? "请输入需要补充的信息" : "例如:使用阀门,或者说明你的具体要求");
|
|
702
687
|
}, _ = (s) => {
|
|
703
|
-
const
|
|
704
|
-
if (!
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
return [f, m].filter(Boolean).join(" · ");
|
|
688
|
+
const n = s.binding;
|
|
689
|
+
if (!n) return "";
|
|
690
|
+
const p = n.actionName ? `动作:${n.actionName}` : "", m = n.parameterPath ? `参数:${n.parameterPath}` : "";
|
|
691
|
+
return [p, m].filter(Boolean).join(" · ");
|
|
708
692
|
}, C = (s) => {
|
|
709
|
-
const
|
|
710
|
-
return s.input.type === "multi_select" ?
|
|
711
|
-
}, E = (s) => !!
|
|
712
|
-
|
|
693
|
+
const n = h(s.id);
|
|
694
|
+
return s.input.type === "multi_select" ? n.structuredValues.length > 0 : s.input.type === "single_select" ? n.structuredValue !== void 0 : s.input.type === "date" ? !!n.structuredValue : !1;
|
|
695
|
+
}, E = (s) => !!h(s.id).textValue.trim() || C(s), G = (s) => !s.required || E(s) ? !0 : (g.value = `请回答“${s.question}”`, !1), A = () => {
|
|
696
|
+
g.value = "", d.value = Math.max(0, d.value - 1);
|
|
713
697
|
}, L = () => {
|
|
714
|
-
!
|
|
715
|
-
},
|
|
716
|
-
var
|
|
717
|
-
const P = (
|
|
698
|
+
!y.value || !G(y.value) || (g.value = "", d.value = Math.min(o.value.length - 1, d.value + 1));
|
|
699
|
+
}, y = I(() => o.value[d.value]), W = (s, n) => s.input.type === "date" ? String(n ?? "") : (Array.isArray(n) ? n : [n]).map((m) => {
|
|
700
|
+
var J;
|
|
701
|
+
const P = (J = s.input.options) == null ? void 0 : J.find((we) => O(we.value, m));
|
|
718
702
|
return (P == null ? void 0 : P.label) ?? String(m ?? "");
|
|
719
|
-
}).filter(Boolean).join("、"),
|
|
720
|
-
const
|
|
721
|
-
if (s.input.type === "text" ||
|
|
722
|
-
return { id: s.id, mode: "text", value:
|
|
723
|
-
const m = s.input.type === "multi_select" ? [...
|
|
703
|
+
}).filter(Boolean).join("、"), Y = (s) => {
|
|
704
|
+
const n = h(s.id), p = n.textValue.trim();
|
|
705
|
+
if (s.input.type === "text" || p || !C(s))
|
|
706
|
+
return { id: s.id, mode: "text", value: p, displayText: p };
|
|
707
|
+
const m = s.input.type === "multi_select" ? [...n.structuredValues] : n.structuredValue;
|
|
724
708
|
return {
|
|
725
709
|
id: s.id,
|
|
726
710
|
mode: "structured",
|
|
727
711
|
value: m,
|
|
728
|
-
displayText:
|
|
712
|
+
displayText: W(s, m)
|
|
729
713
|
};
|
|
730
|
-
},
|
|
731
|
-
const s = o.value.findIndex((
|
|
714
|
+
}, pe = () => {
|
|
715
|
+
const s = o.value.findIndex((p) => p.required && !E(p));
|
|
732
716
|
if (s >= 0) {
|
|
733
|
-
d.value = s,
|
|
717
|
+
d.value = s, g.value = `请回答“${o.value[s].question}”`;
|
|
734
718
|
return;
|
|
735
719
|
}
|
|
736
|
-
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
},
|
|
740
|
-
|
|
741
|
-
},
|
|
742
|
-
var
|
|
743
|
-
return ((
|
|
720
|
+
g.value = "";
|
|
721
|
+
const n = o.value.filter((p) => p.required || E(p)).map(Y);
|
|
722
|
+
Le(t.value.requestId, n) || (g.value = "本次补充信息已经处理");
|
|
723
|
+
}, fe = () => {
|
|
724
|
+
S.value = !1, g.value = "", je(t.value.requestId) || (g.value = "本次补充信息已经处理");
|
|
725
|
+
}, ve = (s) => {
|
|
726
|
+
var n;
|
|
727
|
+
return ((n = o.value.find((p) => p.id === s)) == null ? void 0 : n.question) ?? s;
|
|
744
728
|
};
|
|
745
|
-
return (s,
|
|
746
|
-
var
|
|
747
|
-
return
|
|
729
|
+
return (s, n) => {
|
|
730
|
+
var p;
|
|
731
|
+
return i(), u("section", {
|
|
748
732
|
class: D(["wi-clarify", `is-${t.value.status}`])
|
|
749
733
|
}, [
|
|
750
|
-
e("header",
|
|
751
|
-
e("div",
|
|
752
|
-
|
|
753
|
-
e("h3",
|
|
754
|
-
t.value.description ? (
|
|
734
|
+
e("header", ts, [
|
|
735
|
+
e("div", ss, [
|
|
736
|
+
n[4] || (n[4] = e("div", { class: "wi-clarify__eyebrow" }, "需要补充信息", -1)),
|
|
737
|
+
e("h3", ns, f(t.value.title), 1),
|
|
738
|
+
t.value.description ? (i(), u("p", os, f(t.value.description), 1)) : V("", !0)
|
|
755
739
|
]),
|
|
756
|
-
e("span",
|
|
740
|
+
e("span", as, f(w.value), 1)
|
|
757
741
|
]),
|
|
758
|
-
t.value.status === "pending" ? (
|
|
759
|
-
e("div",
|
|
760
|
-
e("span", null, "问题 " +
|
|
761
|
-
e("div",
|
|
742
|
+
t.value.status === "pending" ? (i(), u(M, { key: 0 }, [
|
|
743
|
+
e("div", rs, [
|
|
744
|
+
e("span", null, "问题 " + f(d.value + 1) + " / " + f(o.value.length), 1),
|
|
745
|
+
e("div", ls, [
|
|
762
746
|
e("span", {
|
|
763
|
-
style:
|
|
747
|
+
style: Ce({ width: `${(d.value + 1) / o.value.length * 100}%` })
|
|
764
748
|
}, null, 4)
|
|
765
749
|
])
|
|
766
750
|
]),
|
|
767
|
-
|
|
768
|
-
e("div",
|
|
751
|
+
y.value ? (i(), u("div", is, [
|
|
752
|
+
e("div", us, [
|
|
769
753
|
e("span", {
|
|
770
|
-
class: D(
|
|
771
|
-
},
|
|
772
|
-
e("h4", null,
|
|
754
|
+
class: D(y.value.required ? "wi-clarify__required" : "wi-clarify__optional")
|
|
755
|
+
}, f(y.value.required ? "必填" : "选填"), 3),
|
|
756
|
+
e("h4", null, f(y.value.question), 1)
|
|
773
757
|
]),
|
|
774
|
-
|
|
775
|
-
_(
|
|
776
|
-
|
|
777
|
-
(
|
|
758
|
+
y.value.description ? (i(), u("p", cs, f(y.value.description), 1)) : V("", !0),
|
|
759
|
+
_(y.value) ? (i(), u("div", ds, f(_(y.value)), 1)) : V("", !0),
|
|
760
|
+
y.value.input.type === "single_select" || y.value.input.type === "multi_select" ? (i(), u("div", _s, [
|
|
761
|
+
(i(!0), u(M, null, B(y.value.input.options, (m, P) => (i(), u("button", {
|
|
778
762
|
key: P,
|
|
779
763
|
type: "button",
|
|
780
|
-
class: D(["wi-clarify__option", { "is-selected": T(
|
|
781
|
-
onClick: (
|
|
764
|
+
class: D(["wi-clarify__option", { "is-selected": T(y.value, m.value) }]),
|
|
765
|
+
onClick: (J) => R(y.value, m.value)
|
|
782
766
|
}, [
|
|
783
|
-
e("span",
|
|
784
|
-
e("span", null,
|
|
785
|
-
], 10,
|
|
786
|
-
])) :
|
|
767
|
+
e("span", fs, f(T(y.value, m.value) ? "✓" : ""), 1),
|
|
768
|
+
e("span", null, f(m.label), 1)
|
|
769
|
+
], 10, ps))), 128))
|
|
770
|
+
])) : y.value.input.type === "date" ? (i(), u("div", vs, [
|
|
787
771
|
e("label", {
|
|
788
|
-
for: `wi-clarify-date-${
|
|
789
|
-
}, "选择日期", 8,
|
|
772
|
+
for: `wi-clarify-date-${y.value.id}`
|
|
773
|
+
}, "选择日期", 8, ws),
|
|
790
774
|
e("input", {
|
|
791
|
-
id: `wi-clarify-date-${
|
|
775
|
+
id: `wi-clarify-date-${y.value.id}`,
|
|
792
776
|
type: "date",
|
|
793
|
-
value:
|
|
794
|
-
onInput:
|
|
795
|
-
}, null, 40,
|
|
777
|
+
value: X(y.value),
|
|
778
|
+
onInput: n[0] || (n[0] = (m) => K(y.value, m))
|
|
779
|
+
}, null, 40, ys)
|
|
796
780
|
])) : V("", !0),
|
|
797
|
-
e("div",
|
|
798
|
-
|
|
781
|
+
e("div", ms, [
|
|
782
|
+
y.value.input.type !== "text" ? (i(), u("div", hs, [...n[5] || (n[5] = [
|
|
783
|
+
e("span", null, "或者,用自己的话说明", -1)
|
|
784
|
+
])])) : V("", !0),
|
|
799
785
|
e("label", {
|
|
800
|
-
for: `wi-clarify-text-${
|
|
801
|
-
},
|
|
786
|
+
for: `wi-clarify-text-${y.value.id}`
|
|
787
|
+
}, f(y.value.input.type === "text" ? "你的回答" : "自然语言回答"), 9, bs),
|
|
802
788
|
e("textarea", {
|
|
803
|
-
id: `wi-clarify-text-${
|
|
804
|
-
value:
|
|
805
|
-
placeholder: q(
|
|
789
|
+
id: `wi-clarify-text-${y.value.id}`,
|
|
790
|
+
value: h(y.value.id).textValue,
|
|
791
|
+
placeholder: q(y.value),
|
|
806
792
|
rows: "3",
|
|
807
|
-
onInput:
|
|
808
|
-
}, null, 40,
|
|
793
|
+
onInput: n[1] || (n[1] = (m) => $(y.value, m))
|
|
794
|
+
}, null, 40, gs)
|
|
809
795
|
])
|
|
810
796
|
])) : V("", !0),
|
|
811
|
-
e("div",
|
|
812
|
-
(
|
|
797
|
+
e("div", ks, [
|
|
798
|
+
(i(!0), u(M, null, B(o.value, (m, P) => (i(), u("button", {
|
|
813
799
|
key: m.id,
|
|
814
800
|
type: "button",
|
|
815
801
|
"aria-label": `查看第 ${P + 1} 个问题`,
|
|
816
802
|
class: D({ "is-active": P === d.value, "is-answered": E(m) }),
|
|
817
|
-
onClick: (
|
|
818
|
-
}, null, 10,
|
|
803
|
+
onClick: (J) => d.value = P
|
|
804
|
+
}, null, 10, xs))), 128))
|
|
819
805
|
]),
|
|
820
|
-
e("footer",
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
e("div",
|
|
806
|
+
e("footer", Ss, [
|
|
807
|
+
S.value ? (i(), u(M, { key: 0 }, [
|
|
808
|
+
n[6] || (n[6] = e("span", { class: "wi-clarify__confirm-text" }, "取消后本次操作将停止等待这些回答", -1)),
|
|
809
|
+
e("div", $s, [
|
|
824
810
|
e("button", {
|
|
825
811
|
type: "button",
|
|
826
812
|
class: "wi-clarify__btn wi-clarify__btn--secondary",
|
|
827
|
-
onClick:
|
|
813
|
+
onClick: n[2] || (n[2] = (m) => S.value = !1)
|
|
828
814
|
}, " 继续填写 "),
|
|
829
815
|
e("button", {
|
|
830
816
|
type: "button",
|
|
831
817
|
class: "wi-clarify__btn wi-clarify__btn--danger",
|
|
832
|
-
onClick:
|
|
818
|
+
onClick: fe
|
|
833
819
|
}, "确认取消")
|
|
834
820
|
])
|
|
835
|
-
], 64)) : (
|
|
821
|
+
], 64)) : (i(), u(M, { key: 1 }, [
|
|
836
822
|
e("button", {
|
|
837
823
|
type: "button",
|
|
838
824
|
class: "wi-clarify__cancel",
|
|
839
|
-
onClick:
|
|
825
|
+
onClick: n[3] || (n[3] = (m) => S.value = !0)
|
|
840
826
|
}, "取消"),
|
|
841
|
-
e("div",
|
|
827
|
+
e("div", Is, [
|
|
842
828
|
e("button", {
|
|
843
829
|
type: "button",
|
|
844
830
|
class: "wi-clarify__btn wi-clarify__btn--secondary",
|
|
845
831
|
disabled: d.value === 0,
|
|
846
832
|
onClick: A
|
|
847
|
-
}, " 上一项 ", 8,
|
|
848
|
-
d.value < o.value.length - 1 ? (
|
|
833
|
+
}, " 上一项 ", 8, Cs),
|
|
834
|
+
d.value < o.value.length - 1 ? (i(), u("button", {
|
|
849
835
|
key: 0,
|
|
850
836
|
type: "button",
|
|
851
837
|
class: "wi-clarify__btn wi-clarify__btn--primary",
|
|
852
838
|
onClick: L
|
|
853
|
-
}, " 下一项 ")) : (
|
|
839
|
+
}, " 下一项 ")) : (i(), u("button", {
|
|
854
840
|
key: 1,
|
|
855
841
|
type: "button",
|
|
856
842
|
class: "wi-clarify__btn wi-clarify__btn--primary",
|
|
857
|
-
onClick:
|
|
843
|
+
onClick: pe
|
|
858
844
|
}, "提交全部"))
|
|
859
845
|
])
|
|
860
846
|
], 64))
|
|
861
847
|
])
|
|
862
|
-
], 64)) : (
|
|
863
|
-
e("div",
|
|
864
|
-
e("div",
|
|
865
|
-
e("h4", null,
|
|
866
|
-
t.value.status === "submitted" && ((
|
|
867
|
-
(
|
|
848
|
+
], 64)) : (i(), u("div", Es, [
|
|
849
|
+
e("div", Os, f(t.value.status === "submitted" ? "✓" : t.value.status === "cancelled" ? "—" : "!"), 1),
|
|
850
|
+
e("div", Ts, [
|
|
851
|
+
e("h4", null, f(t.value.resultMessage || w.value), 1),
|
|
852
|
+
t.value.status === "submitted" && ((p = t.value.answers) != null && p.length) ? (i(), u("div", Vs, [
|
|
853
|
+
(i(!0), u(M, null, B(t.value.answers, (m) => (i(), u("div", {
|
|
868
854
|
key: m.id
|
|
869
855
|
}, [
|
|
870
|
-
e("span", null,
|
|
871
|
-
e("strong", null,
|
|
856
|
+
e("span", null, f(ve(m.id)), 1),
|
|
857
|
+
e("strong", null, f(m.displayText || "未填写"), 1)
|
|
872
858
|
]))), 128))
|
|
873
|
-
])) : t.value.status === "cancelled" ? (
|
|
859
|
+
])) : t.value.status === "cancelled" ? (i(), u("p", Ps, "本次确认未提交,工作流将收到取消结果。")) : (i(), u("p", Us, "该确认项已失效,无法再提交。"))
|
|
874
860
|
])
|
|
875
861
|
])),
|
|
876
|
-
|
|
862
|
+
g.value ? (i(), u("div", Ms, f(g.value), 1)) : V("", !0)
|
|
877
863
|
], 2);
|
|
878
864
|
};
|
|
879
865
|
}
|
|
880
|
-
}),
|
|
866
|
+
}), js = /* @__PURE__ */ N(Ls, [["__scopeId", "data-v-c684f993"]]), Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
881
867
|
__proto__: null,
|
|
882
|
-
default:
|
|
883
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
868
|
+
default: js
|
|
869
|
+
}, Symbol.toStringTag, { value: "Module" })), Rs = { class: "wi-host-action__head" }, As = {
|
|
884
870
|
class: "wi-host-action__icon",
|
|
885
871
|
"aria-hidden": "true"
|
|
886
|
-
},
|
|
872
|
+
}, Fs = { class: "wi-host-action__title" }, Ds = { class: "wi-host-action__name" }, Bs = { class: "wi-host-action__chip" }, zs = { class: "wi-host-action__message" }, qs = {
|
|
887
873
|
key: 0,
|
|
888
874
|
class: "wi-host-action__args"
|
|
889
|
-
},
|
|
875
|
+
}, Hs = /* @__PURE__ */ j({
|
|
890
876
|
__name: "HostActionStatus",
|
|
891
877
|
props: {
|
|
892
878
|
report: {}
|
|
893
879
|
},
|
|
894
|
-
setup(
|
|
895
|
-
const a =
|
|
880
|
+
setup(r) {
|
|
881
|
+
const a = r, c = {
|
|
896
882
|
id: "",
|
|
897
883
|
name: "",
|
|
898
884
|
arguments: {},
|
|
899
885
|
status: "unknown",
|
|
900
886
|
message: "执行状态未知(回答已结束)"
|
|
901
|
-
}, t = I(() => a.report.values ??
|
|
902
|
-
const
|
|
903
|
-
return !!
|
|
904
|
-
}),
|
|
905
|
-
return (
|
|
887
|
+
}, t = I(() => a.report.values ?? c), o = I(() => t.value.status === "running" ? "●" : t.value.status === "success" ? "✓" : t.value.status === "error" ? "!" : "?"), d = I(() => t.value.status === "running" ? "执行中" : t.value.status === "success" ? "已完成" : t.value.status === "error" ? "执行失败" : "状态未知"), v = I(() => {
|
|
888
|
+
const g = t.value.arguments;
|
|
889
|
+
return !!g && typeof g == "object" && Object.keys(g).length > 0;
|
|
890
|
+
}), S = I(() => JSON.stringify(t.value.arguments ?? {}, null, 2));
|
|
891
|
+
return (g, k) => (i(), u("section", {
|
|
906
892
|
class: D(["wi-host-action", `is-${t.value.status}`])
|
|
907
893
|
}, [
|
|
908
|
-
e("header",
|
|
909
|
-
e("span",
|
|
910
|
-
e("div",
|
|
911
|
-
|
|
912
|
-
e("code",
|
|
894
|
+
e("header", Rs, [
|
|
895
|
+
e("span", As, f(o.value), 1),
|
|
896
|
+
e("div", Fs, [
|
|
897
|
+
k[0] || (k[0] = e("span", { class: "wi-host-action__label" }, "执行操作", -1)),
|
|
898
|
+
e("code", Ds, f(t.value.name || "未知操作"), 1)
|
|
913
899
|
]),
|
|
914
|
-
e("span",
|
|
900
|
+
e("span", Bs, f(d.value), 1)
|
|
915
901
|
]),
|
|
916
|
-
e("p",
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
e("pre", null,
|
|
902
|
+
e("p", zs, f(t.value.message || d.value), 1),
|
|
903
|
+
v.value ? (i(), u("details", qs, [
|
|
904
|
+
k[1] || (k[1] = e("summary", null, "查看参数", -1)),
|
|
905
|
+
e("pre", null, f(S.value), 1)
|
|
920
906
|
])) : V("", !0)
|
|
921
907
|
], 2));
|
|
922
908
|
}
|
|
923
|
-
}),
|
|
909
|
+
}), Ks = /* @__PURE__ */ N(Hs, [["__scopeId", "data-v-4acb4d02"]]), Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
924
910
|
__proto__: null,
|
|
925
|
-
default:
|
|
911
|
+
default: Ks
|
|
926
912
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
927
913
|
export {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
914
|
+
Qs as AiAnswerBubble,
|
|
915
|
+
js as ClarificationCard,
|
|
916
|
+
en as DeepThinkingSteps,
|
|
917
|
+
Ks as HostActionStatus,
|
|
918
|
+
Qt as IframePage,
|
|
919
|
+
ot as KnowledgeStreamResult,
|
|
920
|
+
zt as OutputFile,
|
|
921
|
+
Ae as createAnswerContentMap,
|
|
922
|
+
Jt as injectIframeResizerChild,
|
|
923
|
+
sn as provideIframePageConfig,
|
|
924
|
+
tn as provideOutputFileConfig,
|
|
925
|
+
Wt as resolveIframePlaceholders,
|
|
926
|
+
Yt as useIframePage
|
|
941
927
|
};
|
|
942
928
|
//# sourceMappingURL=index.js.map
|