@sim-design/training 1.0.0

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.
Files changed (46) hide show
  1. package/README.md +33 -0
  2. package/dist/ArrowLeftOutlined-CiSQq3bL.js +12 -0
  3. package/dist/AssessmentPlugin-Bx4VrBdV.js +607 -0
  4. package/dist/CaseAnalysisPlugin-CQvF9_zr.js +416 -0
  5. package/dist/CharacterDialoguePanel-Bvdab3qj.js +776 -0
  6. package/dist/CheckCircleFilled-Byo8CDfW.js +12 -0
  7. package/dist/CustomLayoutRenderer--rnQrqQ2.js +122524 -0
  8. package/dist/DecisionSelectPlugin-DtQ2KV34.js +863 -0
  9. package/dist/DecisionShared-Dh9oeQFT.js +65 -0
  10. package/dist/DialogueFormPlugin-C9ssnVMr.js +959 -0
  11. package/dist/DialoguePlugin-DU00QpmQ.js +416 -0
  12. package/dist/DocumentReviewPlugin-HNOZY1T4.js +977 -0
  13. package/dist/EyeOutlined-XvOAKlLs.js +12 -0
  14. package/dist/FormFillingPlugin-DURWsioi.js +445 -0
  15. package/dist/ModelEditor-BPJsPR0S.js +8264 -0
  16. package/dist/PluginHeader-B-GESJmT.js +87 -0
  17. package/dist/ProcessOperationPlugin-IijngDlX.js +88 -0
  18. package/dist/QAPlugin-Bh_UjK1N.js +184 -0
  19. package/dist/RadarChart-C5ZM0kWt.js +24963 -0
  20. package/dist/ReloadOutlined-Daor2m11.js +12 -0
  21. package/dist/SettingOutlined-CLEOgXB-.js +92 -0
  22. package/dist/StrategyLabPlugin-DGeZsr_7.js +14361 -0
  23. package/dist/ThunderboltOutlined-nH_FO_4A.js +44 -0
  24. package/dist/ToolOutlined-DtuNJDB2.js +28 -0
  25. package/dist/TrainingModelContainer-DpW-uB8O.js +11883 -0
  26. package/dist/UndoOutlined-ChUQYUul.js +84 -0
  27. package/dist/WarningFilled-1Rc4hr0C.js +12 -0
  28. package/dist/WarningOutlined-5g1d66hO.js +164 -0
  29. package/dist/adapters-D1FFZFoA.js +51 -0
  30. package/dist/analysisTools-CXyOvSZT.js +237 -0
  31. package/dist/creator.js +5 -0
  32. package/dist/index-CYjdXPgc.js +6568 -0
  33. package/dist/index-XuBVjlmu.js +44651 -0
  34. package/dist/index.js +11 -0
  35. package/dist/judgement-D_9i7x9S.js +20 -0
  36. package/dist/runtime.js +4 -0
  37. package/dist/types.js +8 -0
  38. package/dist/useDialogueLogic-IHELcN3X.js +368 -0
  39. package/dist-types/client/src/lib/adapters.d.ts +10 -0
  40. package/dist-types/client/src/lib/creator.d.ts +3 -0
  41. package/dist-types/client/src/lib/creatorIntegrationContext.d.ts +8 -0
  42. package/dist-types/client/src/lib/index.d.ts +5 -0
  43. package/dist-types/client/src/lib/public-types.d.ts +2 -0
  44. package/dist-types/client/src/lib/runtime.d.ts +3 -0
  45. package/dist-types/client/src/lib/types.d.ts +301 -0
  46. package/package.json +83 -0
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @sim-design/training
2
+
3
+ React 组件库,用于外部项目集成实训模型运行、模型创建与模型编辑能力。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install @sim-design/training
9
+ ```
10
+
11
+ ## 导出路径
12
+
13
+ ```ts
14
+ import { TrainingRuntime } from '@sim-design/training/runtime'
15
+ import { StepByStepCreator, ModelEditor } from '@sim-design/training/creator'
16
+ import type { TrainingModel, StepByStepCreatorProps } from '@sim-design/training/types'
17
+ ```
18
+
19
+ ## 说明
20
+
21
+ - `runtime`:运行时组件导出
22
+ - `creator`:模型创建与模型编辑组件导出
23
+ - `types`:稳定契约类型与适配器接口导出
24
+
25
+ ## Creator 侧集成
26
+
27
+ `StepByStepCreator` 支持宿主系统注入:
28
+
29
+ - `cozeToken` 或 `getToken`
30
+ - `persistence`
31
+ - `notify`
32
+
33
+ `ModelEditor` 的保存动作完全由宿主系统通过 `onSave` 接管。
@@ -0,0 +1,12 @@
1
+ import { I as a, _ as o } from "./RadarChart-C5ZM0kWt.js";
2
+ import * as e from "react";
3
+ var n = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "arrow-left", theme: "outlined" }, c = function(r, t) {
4
+ return /* @__PURE__ */ e.createElement(a, o({}, r, {
5
+ ref: t,
6
+ icon: n
7
+ }));
8
+ }, f = /* @__PURE__ */ e.forwardRef(c);
9
+ process.env.NODE_ENV !== "production" && (f.displayName = "ArrowLeftOutlined");
10
+ export {
11
+ f as R
12
+ };
@@ -0,0 +1,607 @@
1
+ import { u as U, a as Z, r as S, j as s, R as D, b as ee } from "./RadarChart-C5ZM0kWt.js";
2
+ import se, { useState as Q, useMemo as u } from "react";
3
+ import { Radio as X, Space as re } from "antd";
4
+ import { n as oe, a as te } from "./judgement-D_9i7x9S.js";
5
+ import { b as ne, g as H } from "./DecisionShared-Dh9oeQFT.js";
6
+ import { R } from "./CheckCircleFilled-Byo8CDfW.js";
7
+ import { R as le } from "./ArrowLeftOutlined-CiSQq3bL.js";
8
+ import { R as ie } from "./WarningOutlined-5g1d66hO.js";
9
+ function t(r, L) {
10
+ const f = (r.startsWith("#") ? r.slice(1, 7) : r).slice(0, 6);
11
+ if (f.length !== 6) return r;
12
+ const p = parseInt(f.slice(0, 2), 16), z = parseInt(f.slice(2, 4), 16), i = parseInt(f.slice(4, 6), 16);
13
+ return `rgba(${p},${z},${i},${L})`;
14
+ }
15
+ const ye = ({ initData: r, checkRules: L, onFinish: f }) => {
16
+ var N, q, K, Y;
17
+ const [p, z] = Q({}), [i, I] = Q(0), { currentCase: T } = U(), h = Z((o) => o.filledData), e = u(() => {
18
+ var o;
19
+ return ne((o = r == null ? void 0 : r.uiConfig) == null ? void 0 : o.theme);
20
+ }, [(N = r == null ? void 0 : r.uiConfig) == null ? void 0 : N.theme]), O = u(() => oe(r == null ? void 0 : r.decisionMode, r), [r]), y = u(() => T || {}, [T]), d = u(
21
+ () => ((r == null ? void 0 : r.assessmentQuestions) || (r == null ? void 0 : r.questions) || []).map((o) => ({
22
+ ...o,
23
+ question: S(o.question || "", y, h),
24
+ options: (o.options || []).map((n) => typeof n == "string" ? S(n, y, h) : {
25
+ ...n,
26
+ label: S(n.label || "", y, h),
27
+ value: typeof n.value == "string" ? S(n.value, y, h) : n.value
28
+ })
29
+ })),
30
+ [r, y, h]
31
+ );
32
+ u(() => (r == null ? void 0 : r.previousEvidence) || [], [r]);
33
+ const C = u(
34
+ () => S((r == null ? void 0 : r.stepName) || "评估问卷", y, h),
35
+ [r == null ? void 0 : r.stepName, y, h]
36
+ ), w = Object.keys(p).length, a = w === d.length && d.length > 0, _ = d.length > 0 ? Math.round(w / d.length * 100) : 0, m = d[i], F = (m == null ? void 0 : m.id) || String(i), b = !!p[F], E = (o, n) => {
37
+ z((g) => ({ ...g, [o]: n }));
38
+ }, M = () => d.reduce((o, n, g) => {
39
+ var $;
40
+ const c = n.id || String(g), l = p[c], v = ($ = n.options) == null ? void 0 : $.find(
41
+ (x) => typeof x == "string" ? x === l : x.value === l || x.label === l
42
+ );
43
+ return !v || typeof v == "string" ? o : o + (v.score || 0);
44
+ }, 0), A = (o) => o >= 8 ? "R4" : o >= 6 ? "R3" : o >= 4 ? "R2" : "R1", B = u(() => a ? M() : 0, [p, d, a]), W = u(() => A(B), [B]), G = () => {
45
+ const o = M(), n = A(o), g = d.map((l, v) => {
46
+ var P;
47
+ const $ = l.id || String(v), x = p[$], j = (P = l.options) == null ? void 0 : P.find(
48
+ (k) => typeof k == "string" ? k === x : k.value === x || k.label === x
49
+ );
50
+ return `${l.question}:${typeof j == "string" ? j : (j == null ? void 0 : j.label) || x || "未作答"}`;
51
+ }), c = te({
52
+ sourceStepId: (r == null ? void 0 : r.stepId) || "unknown",
53
+ sourceStepName: C,
54
+ sourceType: "decision-making",
55
+ title: `${C}结果`,
56
+ summary: `评估结论为 ${n},总分 ${o} 分。`,
57
+ keyFacts: [
58
+ { label: "决策模式", value: O },
59
+ { label: "结论等级", value: n },
60
+ { label: "评估得分", value: String(o) },
61
+ { label: "题目数量", value: String(d.length) }
62
+ ],
63
+ conclusion: n
64
+ });
65
+ f({
66
+ stepId: (r == null ? void 0 : r.stepId) || "unknown",
67
+ operationType: "assessment",
68
+ operationData: { answers: p, riskLevel: n, score: o, basis: g },
69
+ operationLog: [{ action: "assessment-complete", answers: p, riskLevel: n, score: o, timestamp: Date.now() }],
70
+ timestamp: Date.now(),
71
+ evidenceSummary: c
72
+ });
73
+ }, V = () => {
74
+ i > 0 && I(i - 1);
75
+ }, J = () => {
76
+ i < d.length - 1 && I(i + 1);
77
+ };
78
+ return se.useEffect(() => {
79
+ const o = "assessment-scrollbar-style";
80
+ if (!document.getElementById(o)) {
81
+ const n = document.createElement("style");
82
+ n.id = o, n.textContent = `
83
+ .assessment-scroll::-webkit-scrollbar {
84
+ width: 4px;
85
+ height: 4px;
86
+ }
87
+ .assessment-scroll::-webkit-scrollbar-track {
88
+ background: transparent;
89
+ }
90
+ .assessment-scroll::-webkit-scrollbar-thumb {
91
+ background: rgba(102, 126, 234, 0.25);
92
+ border-radius: 2px;
93
+ }
94
+ .assessment-scroll::-webkit-scrollbar-thumb:hover {
95
+ background: rgba(102, 126, 234, 0.45);
96
+ }
97
+ `, document.head.appendChild(n);
98
+ }
99
+ }, []), /* @__PURE__ */ s.jsxs("div", { className: "assessment-scroll", style: {
100
+ height: "100%",
101
+ background: "linear-gradient(to bottom, #F8F9FC 0%, #FFFFFF 100%)",
102
+ borderRadius: e.radius.md,
103
+ border: `1px solid ${e.border}`,
104
+ overflow: "auto"
105
+ }, children: [
106
+ /* @__PURE__ */ s.jsxs("div", { style: {
107
+ padding: "16px 24px",
108
+ background: "linear-gradient(135deg, #667EEA 0%, #764BA2 100%)",
109
+ borderBottom: `2px solid ${t(e.primary, 0.2)}`,
110
+ position: "relative",
111
+ overflow: "hidden"
112
+ }, children: [
113
+ /* @__PURE__ */ s.jsx("div", { style: {
114
+ position: "absolute",
115
+ top: 0,
116
+ right: 0,
117
+ width: "200px",
118
+ height: "200px",
119
+ background: "radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%)",
120
+ borderRadius: "50%",
121
+ transform: "translate(30%, -30%)"
122
+ } }),
123
+ /* @__PURE__ */ s.jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
124
+ /* @__PURE__ */ s.jsx("div", { style: {
125
+ fontSize: 18,
126
+ fontWeight: 700,
127
+ color: "#FFFFFF",
128
+ letterSpacing: "0.5px",
129
+ marginBottom: 4
130
+ }, children: C }),
131
+ /* @__PURE__ */ s.jsxs("div", { style: {
132
+ fontSize: 13,
133
+ color: "rgba(255,255,255,0.85)",
134
+ display: "flex",
135
+ alignItems: "center",
136
+ gap: 6
137
+ }, children: [
138
+ /* @__PURE__ */ s.jsx("span", { style: {
139
+ width: 4,
140
+ height: 4,
141
+ borderRadius: "50%",
142
+ background: "rgba(255,255,255,0.6)"
143
+ } }),
144
+ "请根据实际情况逐题作答,系统将自动计算评估结论"
145
+ ] })
146
+ ] })
147
+ ] }),
148
+ /* @__PURE__ */ s.jsxs("div", { style: { display: "flex", height: "600px" }, children: [
149
+ /* @__PURE__ */ s.jsxs(
150
+ "div",
151
+ {
152
+ className: "assessment-scroll",
153
+ style: {
154
+ width: "35%",
155
+ flexShrink: 0,
156
+ background: "linear-gradient(to bottom, #F0F4FF 0%, #FAFBFF 100%)",
157
+ borderRight: `2px solid ${t(e.primary, 0.15)}`,
158
+ display: "flex",
159
+ flexDirection: "column",
160
+ position: "relative",
161
+ height: "100%",
162
+ overflowY: "auto",
163
+ overflowX: "hidden"
164
+ },
165
+ children: [
166
+ /* @__PURE__ */ s.jsx("div", { style: {
167
+ position: "absolute",
168
+ left: 0,
169
+ top: 0,
170
+ bottom: 0,
171
+ width: "3px",
172
+ background: `linear-gradient(to bottom, ${e.primary} 0%, ${e.success} 100%)`
173
+ } }),
174
+ /* @__PURE__ */ s.jsxs("div", { style: {
175
+ background: "#FFFFFF",
176
+ borderBottom: `1px solid ${t(e.border, 0.5)}`,
177
+ padding: "20px 20px 18px",
178
+ position: "relative"
179
+ }, children: [
180
+ /* @__PURE__ */ s.jsx("div", { style: {
181
+ position: "absolute",
182
+ top: 0,
183
+ right: 0,
184
+ width: "120px",
185
+ height: "120px",
186
+ background: `radial-gradient(circle, ${t(e.primary, 0.08)} 0%, transparent 70%)`,
187
+ borderRadius: "50%",
188
+ transform: "translate(40%, -40%)"
189
+ } }),
190
+ /* @__PURE__ */ s.jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
191
+ /* @__PURE__ */ s.jsxs("div", { style: {
192
+ fontSize: 11,
193
+ color: e.textMuted,
194
+ marginBottom: 10,
195
+ fontWeight: 600,
196
+ textTransform: "uppercase",
197
+ letterSpacing: "1px",
198
+ display: "flex",
199
+ alignItems: "center",
200
+ gap: 6
201
+ }, children: [
202
+ /* @__PURE__ */ s.jsx("span", { style: {
203
+ width: 6,
204
+ height: 6,
205
+ borderRadius: "50%",
206
+ background: a ? e.success : e.primary
207
+ } }),
208
+ "答题进度"
209
+ ] }),
210
+ /* @__PURE__ */ s.jsxs("div", { style: {
211
+ display: "flex",
212
+ alignItems: "baseline",
213
+ gap: 12,
214
+ marginBottom: 12
215
+ }, children: [
216
+ /* @__PURE__ */ s.jsx("span", { style: {
217
+ fontSize: 42,
218
+ fontWeight: 800,
219
+ color: a ? e.success : e.primary,
220
+ letterSpacing: "1px",
221
+ lineHeight: 1,
222
+ textShadow: `0 2px 8px ${t(a ? e.success : e.primary, 0.2)}`
223
+ }, children: w }),
224
+ /* @__PURE__ */ s.jsxs("span", { style: {
225
+ fontSize: 16,
226
+ color: e.textMuted,
227
+ fontWeight: 600
228
+ }, children: [
229
+ "/ ",
230
+ d.length,
231
+ " 题"
232
+ ] })
233
+ ] }),
234
+ /* @__PURE__ */ s.jsx("div", { style: {
235
+ height: 8,
236
+ background: t(e.border, 0.3),
237
+ borderRadius: 4,
238
+ overflow: "hidden",
239
+ marginTop: 8
240
+ }, children: /* @__PURE__ */ s.jsx("div", { style: {
241
+ height: "100%",
242
+ width: `${_}%`,
243
+ background: a ? `linear-gradient(90deg, ${e.success} 0%, ${t(e.success, 0.7)} 100%)` : `linear-gradient(90deg, ${e.primary} 0%, ${t(e.primary, 0.7)} 100%)`,
244
+ borderRadius: 4,
245
+ transition: "width 0.4s ease"
246
+ } }) })
247
+ ] })
248
+ ] }),
249
+ /* @__PURE__ */ s.jsxs("div", { style: { flex: 1, padding: "16px 16px 12px" }, children: [
250
+ /* @__PURE__ */ s.jsxs("div", { style: {
251
+ display: "flex",
252
+ alignItems: "center",
253
+ gap: 8,
254
+ marginBottom: 14
255
+ }, children: [
256
+ /* @__PURE__ */ s.jsx("div", { style: {
257
+ width: 32,
258
+ height: 32,
259
+ borderRadius: "50%",
260
+ background: `linear-gradient(135deg, ${e.primary} 0%, ${t(e.primary, 0.7)} 100%)`,
261
+ display: "flex",
262
+ alignItems: "center",
263
+ justifyContent: "center",
264
+ boxShadow: `0 2px 8px ${t(e.primary, 0.25)}`
265
+ }, children: /* @__PURE__ */ s.jsx(D, { style: { color: "#fff", fontSize: 15 } }) }),
266
+ /* @__PURE__ */ s.jsxs("div", { style: { flex: 1 }, children: [
267
+ /* @__PURE__ */ s.jsx("div", { style: { fontSize: 15, fontWeight: 700, color: e.text }, children: "题目列表" }),
268
+ /* @__PURE__ */ s.jsx("div", { style: { fontSize: 11, color: e.textLight }, children: "点击跳转到对应题目" })
269
+ ] })
270
+ ] }),
271
+ /* @__PURE__ */ s.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: d.map((o, n) => {
272
+ const g = o.id || String(n), c = !!p[g], l = n === i;
273
+ return /* @__PURE__ */ s.jsxs(
274
+ "button",
275
+ {
276
+ onClick: () => I(n),
277
+ style: {
278
+ width: "100%",
279
+ display: "flex",
280
+ alignItems: "center",
281
+ gap: 10,
282
+ padding: "12px 14px",
283
+ background: l ? `linear-gradient(to right, ${e.primaryLight} 0%, ${t(e.primary, 0.05)} 100%)` : "#FFFFFF",
284
+ border: `2px solid ${l ? e.primary : c ? e.successBorder : t(e.border, 0.5)}`,
285
+ borderRadius: 8,
286
+ cursor: "pointer",
287
+ fontSize: 13,
288
+ color: l ? e.primary : e.text,
289
+ fontWeight: l ? 600 : 400,
290
+ textAlign: "left",
291
+ transition: "all 0.2s ease",
292
+ boxShadow: l ? `0 2px 8px ${t(e.primary, 0.15)}` : "none",
293
+ minWidth: 0
294
+ },
295
+ children: [
296
+ /* @__PURE__ */ s.jsx("div", { style: {
297
+ width: 28,
298
+ height: 28,
299
+ borderRadius: "50%",
300
+ background: c ? e.successLight : l ? e.primaryLight : t(e.bg, 0.5),
301
+ border: `1.5px solid ${c ? e.successBorder : l ? e.primaryBorder : t(e.border, 0.6)}`,
302
+ display: "flex",
303
+ alignItems: "center",
304
+ justifyContent: "center",
305
+ flexShrink: 0,
306
+ fontSize: 12,
307
+ fontWeight: 700,
308
+ color: c ? e.success : l ? e.primary : e.textMuted
309
+ }, children: c ? /* @__PURE__ */ s.jsx(ee, { style: { fontSize: 12 } }) : n + 1 }),
310
+ /* @__PURE__ */ s.jsx("span", { style: {
311
+ flex: 1,
312
+ overflow: "hidden",
313
+ textOverflow: "ellipsis",
314
+ whiteSpace: "nowrap",
315
+ minWidth: 0
316
+ }, children: o.question }),
317
+ l && /* @__PURE__ */ s.jsx("span", { style: {
318
+ fontSize: 10,
319
+ color: e.primary,
320
+ background: t(e.primary, 0.1),
321
+ borderRadius: 3,
322
+ padding: "2px 6px",
323
+ fontWeight: 600,
324
+ flexShrink: 0
325
+ }, children: "当前" })
326
+ ]
327
+ },
328
+ g
329
+ );
330
+ }) })
331
+ ] })
332
+ ]
333
+ }
334
+ ),
335
+ /* @__PURE__ */ s.jsx(
336
+ "div",
337
+ {
338
+ className: "assessment-scroll",
339
+ style: {
340
+ flex: 1,
341
+ padding: "20px 24px",
342
+ display: "flex",
343
+ flexDirection: "column",
344
+ gap: 18,
345
+ background: "#FFFFFF",
346
+ height: "100%",
347
+ overflowY: "auto",
348
+ overflowX: "hidden"
349
+ },
350
+ children: m ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
351
+ /* @__PURE__ */ s.jsxs(
352
+ "div",
353
+ {
354
+ className: "assessment-scroll",
355
+ style: {
356
+ background: `linear-gradient(to bottom, ${t(e.bg, 0.3)} 0%, #FFFFFF 100%)`,
357
+ border: `2px solid ${b ? e.successBorder : t(e.border, 0.5)}`,
358
+ borderRadius: 10,
359
+ padding: "20px",
360
+ position: "relative",
361
+ overflowY: "auto",
362
+ overflowX: "hidden"
363
+ },
364
+ children: [
365
+ /* @__PURE__ */ s.jsx("div", { style: {
366
+ position: "absolute",
367
+ top: -30,
368
+ right: -30,
369
+ width: "150px",
370
+ height: "150px",
371
+ background: `radial-gradient(circle, ${t(b ? e.success : e.primary, 0.08)} 0%, transparent 70%)`,
372
+ borderRadius: "50%"
373
+ } }),
374
+ /* @__PURE__ */ s.jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
375
+ /* @__PURE__ */ s.jsxs("div", { style: {
376
+ display: "inline-flex",
377
+ alignItems: "center",
378
+ gap: 8,
379
+ background: b ? e.successLight : e.primaryLight,
380
+ border: `1.5px solid ${b ? e.successBorder : e.primaryBorder}`,
381
+ borderRadius: 6,
382
+ padding: "6px 12px",
383
+ marginBottom: 16
384
+ }, children: [
385
+ /* @__PURE__ */ s.jsxs("span", { style: {
386
+ fontSize: 14,
387
+ fontWeight: 700,
388
+ color: b ? e.success : e.primary
389
+ }, children: [
390
+ "第 ",
391
+ i + 1,
392
+ " 题"
393
+ ] }),
394
+ b && /* @__PURE__ */ s.jsx(R, { style: { color: e.success, fontSize: 14 } })
395
+ ] }),
396
+ /* @__PURE__ */ s.jsx("div", { style: {
397
+ fontSize: 16,
398
+ fontWeight: 600,
399
+ color: e.text,
400
+ lineHeight: 1.7,
401
+ marginBottom: 20
402
+ }, children: m.question }),
403
+ /* @__PURE__ */ s.jsx(
404
+ X.Group,
405
+ {
406
+ value: p[F],
407
+ onChange: (o) => E(F, o.target.value),
408
+ style: { width: "100%" },
409
+ children: /* @__PURE__ */ s.jsx(re, { direction: "vertical", size: 10, style: { width: "100%" }, children: (q = m.options) == null ? void 0 : q.map((o) => {
410
+ const n = typeof o == "string" ? o : o.value, g = typeof o == "string" ? o : o.label, c = p[F] === n;
411
+ return /* @__PURE__ */ s.jsxs(
412
+ "div",
413
+ {
414
+ onClick: () => E(F, n),
415
+ style: {
416
+ display: "flex",
417
+ alignItems: "center",
418
+ gap: 12,
419
+ padding: "14px 16px",
420
+ borderRadius: 8,
421
+ border: `2px solid ${c ? e.primary : t(e.border, 0.5)}`,
422
+ background: c ? `linear-gradient(135deg, ${t(e.primary, 0.08)} 0%, ${t(e.primary, 0.03)} 100%)` : "#FFFFFF",
423
+ cursor: "pointer",
424
+ transition: "all 0.2s ease",
425
+ boxShadow: c ? `0 2px 8px ${t(e.primary, 0.15)}` : "none"
426
+ },
427
+ onMouseEnter: (l) => {
428
+ c || (l.currentTarget.style.borderColor = t(e.primary, 0.4), l.currentTarget.style.boxShadow = "0 2px 6px rgba(0,0,0,0.06)");
429
+ },
430
+ onMouseLeave: (l) => {
431
+ c || (l.currentTarget.style.borderColor = t(e.border, 0.5), l.currentTarget.style.boxShadow = "none");
432
+ },
433
+ children: [
434
+ /* @__PURE__ */ s.jsx(X, { value: n, style: { margin: 0 } }),
435
+ /* @__PURE__ */ s.jsx("span", { style: {
436
+ fontSize: 14,
437
+ color: c ? e.primary : e.text,
438
+ fontWeight: c ? 600 : 400,
439
+ flex: 1
440
+ }, children: g }),
441
+ c && /* @__PURE__ */ s.jsx(R, { style: { color: e.primary, fontSize: 16 } })
442
+ ]
443
+ },
444
+ n
445
+ );
446
+ }) })
447
+ }
448
+ )
449
+ ] })
450
+ ]
451
+ }
452
+ ),
453
+ /* @__PURE__ */ s.jsxs("div", { style: {
454
+ display: "flex",
455
+ gap: 12,
456
+ alignItems: "center"
457
+ }, children: [
458
+ /* @__PURE__ */ s.jsxs(
459
+ "button",
460
+ {
461
+ onClick: V,
462
+ disabled: i === 0,
463
+ style: {
464
+ flex: 1,
465
+ height: 48,
466
+ border: `2px solid ${i === 0 ? t(e.border, 0.5) : e.primary}`,
467
+ borderRadius: 8,
468
+ fontSize: 14,
469
+ fontWeight: 600,
470
+ cursor: i === 0 ? "not-allowed" : "pointer",
471
+ background: i === 0 ? t(e.bg, 0.3) : "#FFFFFF",
472
+ color: i === 0 ? e.textLight : e.primary,
473
+ transition: "all 0.2s ease",
474
+ display: "flex",
475
+ alignItems: "center",
476
+ justifyContent: "center",
477
+ gap: 8
478
+ },
479
+ children: [
480
+ /* @__PURE__ */ s.jsx(le, { style: { fontSize: 14 } }),
481
+ "上一题"
482
+ ]
483
+ }
484
+ ),
485
+ /* @__PURE__ */ s.jsxs(
486
+ "button",
487
+ {
488
+ onClick: J,
489
+ disabled: i === d.length - 1,
490
+ style: {
491
+ flex: 1,
492
+ height: 48,
493
+ border: `2px solid ${i === d.length - 1 ? t(e.border, 0.5) : e.primary}`,
494
+ borderRadius: 8,
495
+ fontSize: 14,
496
+ fontWeight: 600,
497
+ cursor: i === d.length - 1 ? "not-allowed" : "pointer",
498
+ background: i === d.length - 1 ? t(e.bg, 0.3) : "#FFFFFF",
499
+ color: i === d.length - 1 ? e.textLight : e.primary,
500
+ transition: "all 0.2s ease",
501
+ display: "flex",
502
+ alignItems: "center",
503
+ justifyContent: "center",
504
+ gap: 8
505
+ },
506
+ children: [
507
+ "下一题",
508
+ /* @__PURE__ */ s.jsx(ie, { style: { fontSize: 14 } })
509
+ ]
510
+ }
511
+ )
512
+ ] }),
513
+ a && /* @__PURE__ */ s.jsxs("div", { style: {
514
+ background: `linear-gradient(135deg, ${t(e.successLight, 0.5)} 0%, ${t(e.primaryLight, 0.3)} 100%)`,
515
+ border: `2px solid ${e.successBorder}`,
516
+ borderRadius: 10,
517
+ padding: "18px 20px"
518
+ }, children: [
519
+ /* @__PURE__ */ s.jsxs("div", { style: {
520
+ display: "flex",
521
+ alignItems: "center",
522
+ gap: 10,
523
+ marginBottom: 14
524
+ }, children: [
525
+ /* @__PURE__ */ s.jsx(R, { style: { color: e.success, fontSize: 20 } }),
526
+ /* @__PURE__ */ s.jsx("span", { style: { fontSize: 15, fontWeight: 700, color: e.success }, children: "评估完成" })
527
+ ] }),
528
+ /* @__PURE__ */ s.jsxs("div", { style: { display: "flex", gap: 20, marginBottom: 16 }, children: [
529
+ /* @__PURE__ */ s.jsxs("div", { style: {
530
+ display: "flex",
531
+ flexDirection: "column",
532
+ gap: 4,
533
+ padding: "10px 14px",
534
+ background: "#FFFFFF",
535
+ border: `1.5px solid ${t(e.primaryBorder, 0.6)}`,
536
+ borderRadius: 8
537
+ }, children: [
538
+ /* @__PURE__ */ s.jsx("span", { style: { fontSize: 11, color: e.textLight, fontWeight: 600, textTransform: "uppercase" }, children: "评估得分" }),
539
+ /* @__PURE__ */ s.jsx("span", { style: { fontSize: 20, fontWeight: 800, color: e.primary }, children: B })
540
+ ] }),
541
+ /* @__PURE__ */ s.jsxs("div", { style: {
542
+ display: "flex",
543
+ flexDirection: "column",
544
+ gap: 4,
545
+ padding: "10px 14px",
546
+ background: "#FFFFFF",
547
+ border: `1.5px solid ${H(W, (K = r == null ? void 0 : r.uiConfig) == null ? void 0 : K.theme).border}`,
548
+ borderRadius: 8
549
+ }, children: [
550
+ /* @__PURE__ */ s.jsx("span", { style: { fontSize: 11, color: e.textLight, fontWeight: 600, textTransform: "uppercase" }, children: "结论等级" }),
551
+ /* @__PURE__ */ s.jsx("span", { style: {
552
+ fontSize: 20,
553
+ fontWeight: 800,
554
+ color: H(W, (Y = r == null ? void 0 : r.uiConfig) == null ? void 0 : Y.theme).color
555
+ }, children: W })
556
+ ] })
557
+ ] })
558
+ ] }),
559
+ /* @__PURE__ */ s.jsxs(
560
+ "button",
561
+ {
562
+ onClick: G,
563
+ disabled: !a,
564
+ style: {
565
+ width: "100%",
566
+ height: 52,
567
+ border: "none",
568
+ borderRadius: 10,
569
+ fontSize: 15,
570
+ fontWeight: 700,
571
+ cursor: a ? "pointer" : "not-allowed",
572
+ background: a ? `linear-gradient(135deg, ${e.success} 0%, ${t(e.success, 0.85)} 100%)` : "#E8E8E8",
573
+ color: a ? "#FFFFFF" : "#BFBFBF",
574
+ boxShadow: a ? `0 4px 16px ${t(e.success, 0.3)}` : "none",
575
+ transition: "all 0.25s ease",
576
+ display: "flex",
577
+ alignItems: "center",
578
+ justifyContent: "center",
579
+ gap: 10,
580
+ letterSpacing: "0.5px"
581
+ },
582
+ onMouseEnter: (o) => {
583
+ a && (o.currentTarget.style.transform = "translateY(-2px)", o.currentTarget.style.boxShadow = `0 6px 20px ${t(e.success, 0.4)}`);
584
+ },
585
+ onMouseLeave: (o) => {
586
+ a && (o.currentTarget.style.transform = "none", o.currentTarget.style.boxShadow = `0 4px 16px ${t(e.success, 0.3)}`);
587
+ },
588
+ children: [
589
+ a && /* @__PURE__ */ s.jsx(R, { style: { fontSize: 18 } }),
590
+ a ? "提交评估结果" : `请完成所有题目 (${w}/${d.length})`
591
+ ]
592
+ }
593
+ )
594
+ ] }) : /* @__PURE__ */ s.jsx("div", { style: {
595
+ padding: "40px 20px",
596
+ textAlign: "center",
597
+ color: e.textLight,
598
+ fontSize: 14
599
+ }, children: "暂无题目" })
600
+ }
601
+ )
602
+ ] })
603
+ ] });
604
+ };
605
+ export {
606
+ ye as default
607
+ };