@skopon-cool/form-sdk 0.1.4 → 0.1.6

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 (48) hide show
  1. package/dist/adapter/a2uiAdapter.d.ts.map +1 -1
  2. package/dist/adapter/formSchema.d.ts.map +1 -1
  3. package/dist/blocks/{case_singleselect → case_multiselect}/adapter.d.ts +2 -2
  4. package/dist/blocks/case_multiselect/adapter.d.ts.map +1 -0
  5. package/dist/blocks/case_multiselect/index.d.ts +3 -0
  6. package/dist/blocks/case_multiselect/index.d.ts.map +1 -0
  7. package/dist/catalog/resumeSearchContext.d.ts +9 -0
  8. package/dist/catalog/resumeSearchContext.d.ts.map +1 -1
  9. package/dist/catalog/skoponCaseSelect.d.ts.map +1 -1
  10. package/dist/catalog/skoponResumeSelect.d.ts.map +1 -1
  11. package/dist/components/AskUserFormCard.d.ts.map +1 -1
  12. package/dist/components/CurlSubmitBlock.d.ts +4 -1
  13. package/dist/components/CurlSubmitBlock.d.ts.map +1 -1
  14. package/dist/components/SkoponA2uiStreamRenderer.d.ts.map +1 -1
  15. package/dist/form-sdk.css +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +901 -852
  19. package/dist/submit/buildCurlStatement.d.ts +3 -1
  20. package/dist/submit/buildCurlStatement.d.ts.map +1 -1
  21. package/dist/submit/intersectPayloadBlocksWithForm.d.ts.map +1 -1
  22. package/dist/types/index.d.ts +11 -4
  23. package/dist/types/index.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/src/adapter/a2uiAdapter.test.ts +37 -14
  26. package/src/adapter/a2uiAdapter.ts +1 -4
  27. package/src/adapter/formSchema.ts +49 -29
  28. package/src/blocks/case_multiselect/adapter.ts +90 -0
  29. package/src/blocks/case_multiselect/index.ts +14 -0
  30. package/src/blocks/registry.ts +2 -2
  31. package/src/catalog/resumeSearchContext.tsx +10 -0
  32. package/src/catalog/skoponCaseSelect.tsx +38 -13
  33. package/src/catalog/skoponResumeSelect.tsx +76 -10
  34. package/src/components/AskUserFormCard.tsx +3 -1
  35. package/src/components/CurlSubmitBlock.tsx +28 -7
  36. package/src/components/SkoponA2uiStreamRenderer.tsx +11 -4
  37. package/src/index.ts +6 -1
  38. package/src/styles/a2ui-preview.css +4 -4
  39. package/src/styles/index.css +148 -17
  40. package/src/submit/buildCurlStatement.ts +18 -23
  41. package/src/submit/intersectPayloadBlocksWithForm.ts +14 -2
  42. package/src/submit/submit.test.ts +66 -3
  43. package/src/types/index.ts +10 -3
  44. package/dist/blocks/case_singleselect/adapter.d.ts.map +0 -1
  45. package/dist/blocks/case_singleselect/index.d.ts +0 -3
  46. package/dist/blocks/case_singleselect/index.d.ts.map +0 -1
  47. package/src/blocks/case_singleselect/adapter.ts +0 -74
  48. package/src/blocks/case_singleselect/index.ts +0 -14
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import './form-sdk.css';
2
- import { jsx as c, jsxs as N, Fragment as qe } from "react/jsx-runtime";
3
- import { createContext as Fe, useContext as Me, useCallback as Z, useSyncExternalStore as ft, useMemo as O, useState as E, useRef as V, useEffect as w, forwardRef as ht, useImperativeHandle as gt } from "react";
4
- import { Spin as Pe, Button as ce, Typography as $, Avatar as yt, Select as ke, Checkbox as vt, Radio as bt, Switch as St, TimePicker as xt, DatePicker as kt, Upload as he, Input as ge, InputNumber as At, Tooltip as ie, Tag as Ae } from "antd";
5
- import { ReloadOutlined as De, FileTextOutlined as Je, UserOutlined as It, FileExcelOutlined as Ct, FileOutlined as Ke, PictureOutlined as Tt, SoundOutlined as Nt, VideoCameraOutlined as Ft } from "@ant-design/icons";
6
- import { createBinderlessComponentImplementation as R, basicCatalog as ae, A2uiSurface as He } from "@a2ui/react/v0_9";
7
- import { z as m } from "zod";
8
- import { Catalog as Mt, MessageProcessor as Ye } from "@a2ui/web_core/v0_9";
2
+ import { jsx as s, jsxs as x, Fragment as De } from "react/jsx-runtime";
3
+ import { createContext as Me, useContext as Ee, useCallback as W, useSyncExternalStore as bt, useMemo as z, useState as E, useRef as B, useEffect as V, forwardRef as St, useImperativeHandle as kt } from "react";
4
+ import { Spin as _e, Button as ue, Typography as L, Avatar as xt, Tag as Q, Select as Ce, Checkbox as At, Radio as Tt, Switch as Ct, TimePicker as It, DatePicker as Nt, Upload as ge, Input as ye, InputNumber as Ft, Tooltip as Z } from "antd";
5
+ import { ReloadOutlined as Ke, FileTextOutlined as Je, UserOutlined as Pt, FileImageOutlined as Mt, FileExcelOutlined as Et, FileOutlined as He, PictureOutlined as _t, SoundOutlined as Ut, VideoCameraOutlined as zt } from "@ant-design/icons";
6
+ import { createBinderlessComponentImplementation as R, basicCatalog as le, A2uiSurface as Ye } from "@a2ui/react/v0_9";
7
+ import { z as d } from "zod";
8
+ import { Catalog as Rt, MessageProcessor as Xe } from "@a2ui/web_core/v0_9";
9
9
  import { injectBasicCatalogStyles as Ge } from "@a2ui/web_core/v0_9/basic_catalog";
10
- import { injectStyles as Xe } from "@a2ui/react/styles";
11
- import Be from "dayjs";
12
- const Lr = "v0.9", Pt = [
10
+ import { injectStyles as We } from "@a2ui/react/styles";
11
+ import qe from "dayjs";
12
+ const Wr = "v0.9", wt = [
13
13
  "huge",
14
14
  "large",
15
15
  "medium",
@@ -19,13 +19,13 @@ const Lr = "v0.9", Pt = [
19
19
  function Ie(e) {
20
20
  return e === "image" || e === "video" || e === "audio";
21
21
  }
22
- function Ee(e) {
22
+ function Ue(e) {
23
23
  return e === "heading" || e === "paragraph";
24
24
  }
25
- function K(e) {
26
- return !Ee(e) && !Ie(e);
25
+ function J(e) {
26
+ return !Ue(e) && !Ie(e);
27
27
  }
28
- function Et() {
28
+ function Ot() {
29
29
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
30
30
  return crypto.randomUUID();
31
31
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -39,11 +39,11 @@ function Et() {
39
39
  return (e === "x" ? t : t & 3 | 8).toString(16);
40
40
  });
41
41
  }
42
- function Q(e) {
43
- const t = Et().replace(/-/g, "").slice(0, 8);
42
+ function te(e) {
43
+ const t = Ot().replace(/-/g, "").slice(0, 8);
44
44
  return `${e}${t}`;
45
45
  }
46
- const We = [
46
+ const Ze = [
47
47
  { value: "image/*", label: "图片" },
48
48
  { value: "video/*", label: "视频" },
49
49
  { value: "audio/*", label: "音频" },
@@ -54,7 +54,7 @@ const We = [
54
54
  { value: "text/plain", label: "纯文本" },
55
55
  { value: "application/zip", label: "ZIP 压缩包" },
56
56
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
57
- ], zt = {
57
+ ], Bt = {
58
58
  "image/*": ["image/*"],
59
59
  "video/*": ["video/*"],
60
60
  "audio/*": ["audio/*"],
@@ -74,7 +74,7 @@ const We = [
74
74
  "text/plain": ["text/plain"],
75
75
  "application/zip": ["application/zip"],
76
76
  "application/x-rar-compressed": ["application/x-rar-compressed"]
77
- }, _t = {
77
+ }, Vt = {
78
78
  "image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
79
79
  "video/*": [".mp4", ".mov", ".avi", ".webm"],
80
80
  "audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
@@ -85,7 +85,7 @@ const We = [
85
85
  "text/plain": [".txt"],
86
86
  "application/zip": [".zip", ".7z"],
87
87
  "application/x-rar-compressed": [".rar"]
88
- }, Rt = {
88
+ }, qt = {
89
89
  "application/msword": "office/word",
90
90
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
91
91
  "application/vnd.ms-excel": "office/excel",
@@ -118,117 +118,117 @@ const We = [
118
118
  { value: ".zip", label: ".zip" },
119
119
  { value: ".rar", label: ".rar" },
120
120
  { value: ".7z", label: ".7z" }
121
- ], Ut = Object.fromEntries(
122
- We.map((e) => [e.value, e.label])
123
- ), Ot = Object.fromEntries(
121
+ ], jt = Object.fromEntries(
122
+ Ze.map((e) => [e.value, e.label])
123
+ ), Lt = Object.fromEntries(
124
124
  ze.map((e) => [e.value, e.label])
125
- ), Vt = new Set(We.map((e) => e.value)), Bt = new Set(
125
+ ), $t = new Set(Ze.map((e) => e.value)), Dt = new Set(
126
126
  ze.map((e) => e.value)
127
127
  );
128
- function wt(e) {
128
+ function Kt(e) {
129
129
  const t = e.trim();
130
- return t ? Vt.has(t) ? t : Rt[t] ?? null : null;
130
+ return t ? $t.has(t) ? t : qt[t] ?? null : null;
131
131
  }
132
- function jt(e) {
132
+ function Jt(e) {
133
133
  return Array.isArray(e) ? e.map((t) => {
134
134
  const n = t.trim().toLowerCase();
135
135
  return n ? n.startsWith(".") ? n : `.${n}` : "";
136
136
  }).filter(Boolean) : [];
137
137
  }
138
- function ee(e) {
138
+ function ne(e) {
139
139
  if (!Array.isArray(e)) return [];
140
140
  const t = [], n = /* @__PURE__ */ new Set();
141
141
  for (const r of e) {
142
- const o = wt(r);
142
+ const o = Kt(r);
143
143
  o && !n.has(o) && (n.add(o), t.push(o));
144
144
  }
145
145
  return t;
146
146
  }
147
- function $t(e) {
148
- const t = ee(e), n = [];
147
+ function Ht(e) {
148
+ const t = ne(e), n = [];
149
149
  for (const r of t)
150
- n.push(...zt[r] ?? [r]);
150
+ n.push(...Bt[r] ?? [r]);
151
151
  return n;
152
152
  }
153
- function Lt(e) {
154
- const t = ee(e);
153
+ function Yt(e) {
154
+ const t = ne(e);
155
155
  if (t.length === 0) return [];
156
156
  const n = /* @__PURE__ */ new Set();
157
157
  for (const r of t)
158
- for (const o of _t[r] ?? [])
158
+ for (const o of Vt[r] ?? [])
159
159
  n.add(o);
160
160
  return ze.filter((r) => n.has(r.value));
161
161
  }
162
- function _e(e, t) {
163
- const n = jt(t), r = ee(e);
162
+ function Re(e, t) {
163
+ const n = Jt(t), r = ne(e);
164
164
  if (r.length === 0)
165
- return n.filter((a) => Bt.has(a));
165
+ return n.filter((a) => Dt.has(a));
166
166
  const o = new Set(
167
- Lt(r).map((a) => a.value)
167
+ Yt(r).map((a) => a.value)
168
168
  );
169
169
  return n.filter((a) => o.has(a));
170
170
  }
171
- function qt(e, t) {
172
- const n = $t(e), r = _e(e, t), o = [...n, ...r];
171
+ function Xt(e, t) {
172
+ const n = Ht(e), r = Re(e, t), o = [...n, ...r];
173
173
  return o.length > 0 ? o.join(",") : void 0;
174
174
  }
175
- function Dt(e, t) {
176
- const n = ee(e), r = _e(
175
+ function Gt(e, t) {
176
+ const n = ne(e), r = Re(
177
177
  n,
178
178
  t
179
179
  ), o = [
180
- ...n.map((a) => Ut[a] ?? a),
181
- ...r.map((a) => Ot[a] ?? a)
180
+ ...n.map((a) => jt[a] ?? a),
181
+ ...r.map((a) => Lt[a] ?? a)
182
182
  ];
183
183
  return o.length === 0 ? null : o.join("、");
184
184
  }
185
- const Jt = [
185
+ const Wt = [
186
186
  "video",
187
187
  "audio",
188
188
  "image",
189
189
  "file",
190
190
  "spreadsheet",
191
191
  "document"
192
- ], Kt = new Set(Jt);
193
- function Ht(e) {
194
- return e && Kt.has(e) ? e : "file";
192
+ ], Zt = new Set(Wt);
193
+ function Qt(e) {
194
+ return e && Zt.has(e) ? e : "file";
195
195
  }
196
- function te(e) {
197
- return typeof e == "string" && Pt.includes(e) ? e : "medium";
196
+ function re(e) {
197
+ return typeof e == "string" && wt.includes(e) ? e : "medium";
198
198
  }
199
- function Yt(e, t) {
199
+ function en(e, t) {
200
200
  var o;
201
201
  const n = Math.max(1, t);
202
202
  let r = [];
203
203
  return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((a) => String(a).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
204
204
  }
205
- function Gt(e) {
205
+ function tn(e) {
206
206
  var t;
207
207
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
208
208
  }
209
- function Xt(e) {
210
- return `form-media-size-${te(e)}`;
209
+ function nn(e) {
210
+ return `form-media-size-${re(e)}`;
211
211
  }
212
- function Wt(e) {
213
- return `form-media-preview form-media-list ${Xt(e)}`;
212
+ function rn(e) {
213
+ return `form-media-preview form-media-list ${nn(e)}`;
214
214
  }
215
- const Zt = 10;
216
- function Re(e) {
215
+ const on = 10;
216
+ function we(e) {
217
217
  return e === !0 || e === "true";
218
218
  }
219
- function we(e, t = 1) {
219
+ function je(e, t = 1) {
220
220
  const n = typeof e == "number" ? e : Number(e);
221
221
  return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
222
222
  }
223
- function Qt(e, t) {
223
+ function an(e, t) {
224
224
  if (t !== void 0)
225
- return e === "toggle" ? Re(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
225
+ return e === "toggle" ? we(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
226
226
  }
227
- function en(e) {
228
- const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.flowId) == "number" ? e.flowId : Number(e == null ? void 0 : e.flowId), o = Number.isFinite(r) && r > 0 ? Math.floor(r) : void 0, a = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, i = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0;
229
- return { agentKind: a, agentUniqueId: i, flowId: o, pageSize: n };
227
+ function ln(e) {
228
+ const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, a = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, l = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
229
+ return { agentKind: r, agentUniqueId: o, flowType: a, category: i, flowUniqueIds: l, pageSize: n };
230
230
  }
231
- function tn(e) {
231
+ function sn(e) {
232
232
  const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20;
233
233
  return {
234
234
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
@@ -237,42 +237,47 @@ function tn(e) {
237
237
  pageSize: n
238
238
  };
239
239
  }
240
- function nn(e) {
241
- var r, o;
242
- const t = ee(e.fileAcceptTypes), n = e.type;
240
+ function cn(e) {
241
+ if (e.type !== "case_singleselect") return e;
242
+ const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
243
+ return { ...e, type: "case_multiselect", defaultValue: t };
244
+ }
245
+ function un(e) {
246
+ var o, a;
247
+ const t = cn(e), n = ne(t.fileAcceptTypes), r = t.type;
243
248
  return {
244
- id: ((r = e.id) == null ? void 0 : r.trim()) || Q("block-"),
245
- type: n,
246
- name: ((o = e.name) == null ? void 0 : o.trim()) || void 0,
247
- label: e.label ?? "",
248
- placeholder: e.placeholder ?? "",
249
- help: e.help ?? "",
250
- required: e.required === !0,
251
- mediaUrls: Ie(n) ? Yt(e, Zt) : void 0,
252
- mediaSize: Ie(n) ? te(e.mediaSize) : void 0,
253
- fileAcceptTypes: t,
254
- fileAcceptExtensions: _e(
255
- t,
256
- e.fileAcceptExtensions
249
+ id: ((o = t.id) == null ? void 0 : o.trim()) || te("block-"),
250
+ type: r,
251
+ name: ((a = t.name) == null ? void 0 : a.trim()) || void 0,
252
+ label: t.label ?? "",
253
+ placeholder: t.placeholder ?? "",
254
+ help: t.help ?? "",
255
+ required: t.required === !0,
256
+ mediaUrls: Ie(r) ? en(t, on) : void 0,
257
+ mediaSize: Ie(r) ? re(t.mediaSize) : void 0,
258
+ fileAcceptTypes: n,
259
+ fileAcceptExtensions: Re(
260
+ n,
261
+ t.fileAcceptExtensions
257
262
  ),
258
- filePlaceholderIcon: Ht(e.filePlaceholderIcon),
259
- fileMinCount: n === "file" ? we(e.fileMinCount, 1) : void 0,
260
- fileMaxCount: n === "file" ? we(e.fileMaxCount, 1) : void 0,
261
- defaultValue: Qt(n, e.defaultValue),
262
- options: Array.isArray(e.options) ? e.options.map((a, i) => {
263
- var l, s;
263
+ filePlaceholderIcon: Qt(t.filePlaceholderIcon),
264
+ fileMinCount: r === "file" ? je(t.fileMinCount, 1) : void 0,
265
+ fileMaxCount: r === "file" ? je(t.fileMaxCount, 1) : void 0,
266
+ defaultValue: an(r, t.defaultValue),
267
+ options: Array.isArray(t.options) ? t.options.map((i, l) => {
268
+ var c, u;
264
269
  return {
265
- value: ((l = a.value) == null ? void 0 : l.trim()) || `option_${i + 1}`,
266
- label: ((s = a.label) == null ? void 0 : s.trim()) || `选项 ${i + 1}`
270
+ value: ((c = i.value) == null ? void 0 : c.trim()) || `option_${l + 1}`,
271
+ label: ((u = i.label) == null ? void 0 : u.trim()) || `选项 ${l + 1}`
267
272
  };
268
273
  }) : void 0,
269
- resumeEnableRefresh: n === "resume_multiselect" ? e.resumeEnableRefresh !== !1 : void 0,
270
- resumeFilter: n === "resume_multiselect" ? tn(e.resumeFilter) : void 0,
271
- caseEnableRefresh: n === "case_singleselect" ? e.caseEnableRefresh !== !1 : void 0,
272
- caseFilter: n === "case_singleselect" ? en(e.caseFilter) : void 0
274
+ resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
275
+ resumeFilter: r === "resume_multiselect" ? sn(t.resumeFilter) : void 0,
276
+ caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
277
+ caseFilter: r === "case_multiselect" ? ln(t.caseFilter) : void 0
273
278
  };
274
279
  }
275
- function le(e) {
280
+ function se(e) {
276
281
  return {
277
282
  title: e.title ?? "",
278
283
  description: e.description ?? "",
@@ -280,19 +285,30 @@ function le(e) {
280
285
  jsonSchema: e.jsonSchema ?? {}
281
286
  };
282
287
  }
283
- function Y(e) {
288
+ function H(e) {
284
289
  if (!e || !Array.isArray(e.blocks))
285
- return le({ title: "", description: "", blocks: [], jsonSchema: {} });
286
- const t = e.blocks.map(nn);
287
- return le({
290
+ return se({ title: "", description: "", blocks: [], jsonSchema: {} });
291
+ const t = e.blocks.map(un);
292
+ return se({
288
293
  title: typeof e.title == "string" ? e.title : "",
289
294
  description: typeof e.description == "string" ? e.description : "",
290
295
  blocks: t,
291
296
  jsonSchema: {}
292
297
  });
293
298
  }
294
- function rn(e, t) {
295
- var i, l, s, u;
299
+ function pn(e) {
300
+ const t = typeof e.pageSize == "number" ? e.pageSize : Number(e.pageSize), n = typeof e.agentKind == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, r = typeof e.agentUniqueId == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, o = typeof e.flowType == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, a = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, i = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
301
+ return {
302
+ agentKind: n,
303
+ agentUniqueId: r,
304
+ flowType: o,
305
+ category: a,
306
+ flowUniqueIds: i,
307
+ pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
308
+ };
309
+ }
310
+ function mn(e, t) {
311
+ var i, l, c, u, m, p;
296
312
  const { id: n, label: r, path: o, withData: a } = t;
297
313
  return a({
298
314
  id: n,
@@ -304,116 +320,114 @@ function rn(e, t) {
304
320
  caseFilter: {
305
321
  agentKind: (i = e.caseFilter) == null ? void 0 : i.agentKind,
306
322
  agentUniqueId: (l = e.caseFilter) == null ? void 0 : l.agentUniqueId,
307
- flowId: (s = e.caseFilter) == null ? void 0 : s.flowId,
308
- pageSize: ((u = e.caseFilter) == null ? void 0 : u.pageSize) ?? 20
323
+ flowType: (c = e.caseFilter) == null ? void 0 : c.flowType,
324
+ category: (u = e.caseFilter) == null ? void 0 : u.category,
325
+ flowUniqueIds: ((m = e.caseFilter) == null ? void 0 : m.flowUniqueIds) ?? [],
326
+ pageSize: ((p = e.caseFilter) == null ? void 0 : p.pageSize) ?? 20
309
327
  },
310
328
  value: { path: o }
311
329
  });
312
330
  }
313
- function on(e, t, n) {
331
+ function dn(e, t, n) {
314
332
  const r = n.nameFromValue(e.value), o = {
315
- ...t("case_singleselect"),
333
+ ...t("case_multiselect"),
316
334
  name: r,
317
335
  caseEnableRefresh: e.enableRefresh !== !1
318
336
  }, a = n.asLiteral(e.placeholder);
319
337
  a && (o.placeholder = a);
320
338
  const i = n.asLiteral(e.help);
321
- if (i && (o.help = i), e.caseFilter && typeof e.caseFilter == "object") {
322
- const l = e.caseFilter, s = typeof l.flowId == "number" ? l.flowId : Number(l.flowId), u = typeof l.pageSize == "number" ? l.pageSize : Number(l.pageSize), d = typeof l.agentKind == "string" && l.agentKind.trim() ? l.agentKind.trim() : void 0, p = typeof l.agentUniqueId == "string" && l.agentUniqueId.trim() ? l.agentUniqueId.trim() : void 0;
323
- o.caseFilter = {
324
- agentKind: d,
325
- agentUniqueId: p,
326
- flowId: Number.isFinite(s) && s > 0 ? Math.floor(s) : void 0,
327
- pageSize: Number.isFinite(u) && u >= 1 && u <= 100 ? Math.floor(u) : 20
328
- };
329
- }
330
- return o;
339
+ return i && (o.help = i), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = pn(e.caseFilter)), o;
331
340
  }
332
- const Ze = Fe({ interactive: !0 });
333
- function Qe({
341
+ const Qe = Me({ interactive: !0 });
342
+ function et({
334
343
  interactive: e,
335
344
  children: t
336
345
  }) {
337
- return /* @__PURE__ */ c(Ze.Provider, { value: { interactive: e }, children: t });
346
+ return /* @__PURE__ */ s(Qe.Provider, { value: { interactive: e }, children: t });
338
347
  }
339
- function L() {
340
- return Me(Ze);
348
+ function $() {
349
+ return Ee(Qe);
341
350
  }
342
- function et(e) {
351
+ function tt(e) {
343
352
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
344
353
  }
345
- function je(e, t = "value") {
354
+ function Le(e, t = "value") {
346
355
  const r = e.componentModel.properties[t];
347
- if (!(!et(r) || r === void 0))
356
+ if (!(!tt(r) || r === void 0))
348
357
  return e.dataContext.resolveDynamicValue(r);
349
358
  }
350
- function q(e, t = "value") {
351
- const r = e.componentModel.properties[t], o = et(r), a = Z(
359
+ function D(e, t = "value") {
360
+ const r = e.componentModel.properties[t], o = tt(r), a = W(
352
361
  (u) => {
353
362
  if (!o || r === void 0) return () => {
354
363
  };
355
- const d = e.dataContext.subscribeDynamicValue(r, () => u());
356
- return () => d.unsubscribe();
364
+ const m = e.dataContext.subscribeDynamicValue(r, () => u());
365
+ return () => m.unsubscribe();
357
366
  },
358
367
  [e, r, o]
359
- ), i = Z(() => {
368
+ ), i = W(() => {
360
369
  if (!(!o || r === void 0))
361
370
  return e.dataContext.resolveDynamicValue(r);
362
- }, [e, r, o]), l = ft(a, i, i), s = Z(
371
+ }, [e, r, o]), l = bt(a, i, i), c = W(
363
372
  (u) => {
364
373
  !o || !r || typeof r != "object" || !("path" in r) || e.dataContext.set(String(r.path), u);
365
374
  },
366
375
  [e, r, o]
367
376
  );
368
- return { value: l, setValue: s, hasBinding: !!o };
377
+ return { value: l, setValue: c, hasBinding: !!o };
369
378
  }
370
- function H(e) {
379
+ function ee(e) {
371
380
  if (typeof e == "string") return e || void 0;
372
381
  if (typeof e == "number") return String(e);
373
382
  }
374
- function J(e) {
383
+ function j(e) {
375
384
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
376
385
  }
377
- const tt = Fe(null);
378
- function nt({
386
+ const nt = Me(null);
387
+ function rt({
379
388
  caseSearch: e,
380
389
  children: t
381
390
  }) {
382
- return /* @__PURE__ */ c(tt.Provider, { value: e ?? null, children: t });
391
+ return /* @__PURE__ */ s(nt.Provider, { value: e ?? null, children: t });
383
392
  }
384
- function an() {
385
- return Me(tt);
393
+ function fn() {
394
+ return Ee(nt);
386
395
  }
387
- function ye(e) {
396
+ function ve(e) {
388
397
  return typeof e == "string" ? e : "";
389
398
  }
390
- function ve(e) {
399
+ function be(e) {
391
400
  if (!e || typeof e != "object")
392
- return { pageSize: 20 };
393
- const t = e, n = typeof t.flowId == "number" ? t.flowId : Number(t.flowId), r = Number.isFinite(n) && n > 0 ? Math.floor(n) : void 0, o = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), a = Number.isFinite(o) && o >= 1 && o <= 100 ? Math.floor(o) : 20;
394
- return { flowId: r, pageSize: a };
401
+ return { flowUniqueIds: [], pageSize: 20 };
402
+ const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, a = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, i = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, l = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, c = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
403
+ return { agentKind: o, agentUniqueId: a, flowType: i, category: l, flowUniqueIds: c, pageSize: r };
395
404
  }
396
- function ln(e) {
405
+ function Se(e) {
406
+ var r;
407
+ const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
408
+ return t || n;
409
+ }
410
+ function hn(e) {
397
411
  return JSON.stringify(e);
398
412
  }
399
- const sn = {
413
+ const gn = {
400
414
  name: "SkoponCaseSelect",
401
- schema: m.object({
402
- label: m.any().optional(),
403
- placeholder: m.any().optional(),
404
- help: m.any().optional(),
405
- enableRefresh: m.any().optional(),
406
- caseFilter: m.any().optional(),
407
- value: m.any().optional()
415
+ schema: d.object({
416
+ label: d.any().optional(),
417
+ placeholder: d.any().optional(),
418
+ help: d.any().optional(),
419
+ enableRefresh: d.any().optional(),
420
+ caseFilter: d.any().optional(),
421
+ value: d.any().optional()
408
422
  }).passthrough()
409
423
  };
410
- function cn({
424
+ function yn({
411
425
  item: e,
412
426
  selected: t,
413
427
  disabled: n,
414
428
  onToggle: r
415
429
  }) {
416
- return /* @__PURE__ */ N(
430
+ return /* @__PURE__ */ x(
417
431
  "button",
418
432
  {
419
433
  type: "button",
@@ -421,11 +435,11 @@ function cn({
421
435
  disabled: n,
422
436
  onClick: r,
423
437
  children: [
424
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ c(Je, { style: { fontSize: 24, color: "var(--color-primary, #1677ff)" } }) }),
425
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-body", children: [
426
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name }),
427
- e.description ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
428
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-meta", children: [
438
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ s(Je, { style: { fontSize: 24, color: "var(--color-primary, #1677ff)" } }) }),
439
+ /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-body", children: [
440
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-name", children: e.name }),
441
+ e.description ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
442
+ /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-meta", children: [
429
443
  e.caseUniqueId,
430
444
  e.platform ? ` · ${e.platform}` : "",
431
445
  e.link ? ` · ${e.link}` : ""
@@ -435,81 +449,83 @@ function cn({
435
449
  }
436
450
  );
437
451
  }
438
- function un({ context: e }) {
439
- const { interactive: t } = L(), n = an(), { value: r, setValue: o } = q(e), a = e.componentModel.properties, i = ye(a.label), l = ye(a.placeholder), s = ye(a.help), u = a.enableRefresh !== !1, d = O(() => ve(a.caseFilter), [a.caseFilter]), p = ln(d), [g, S] = E(1), [A, F] = E(!1), [k, f] = E(""), [h, x] = E([]), [v, b] = E(0), [M, U] = E(d.pageSize ?? 20), _ = V(0), B = H(r) ?? "", j = O(() => n ? d.flowId ? k || l || "暂无匹配的案例" : "未配置 Flow 筛选条件" : "未配置案例搜索服务", [n, d.flowId, k, l]), D = Z(
440
- async (y) => {
441
- const I = ve(JSON.parse(p)), P = ++_.current;
442
- if (!n || !I.flowId) {
443
- x([]), b(0), f("");
452
+ function vn({ context: e }) {
453
+ const { interactive: t } = $(), n = fn(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ve(a.label), l = ve(a.placeholder), c = ve(a.help), u = a.enableRefresh !== !1, m = z(() => be(a.caseFilter), [a.caseFilter]), p = hn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [M, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = z(() => n ? Se(m) ? T || l || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, m, T, l]), K = W(
454
+ async (g) => {
455
+ const A = be(JSON.parse(p)), P = ++U.current;
456
+ if (!n || !Se(A)) {
457
+ k([]), b(0), f("");
444
458
  return;
445
459
  }
446
460
  F(!0), f("");
447
461
  try {
448
- const C = await n({ filter: I, page: y });
449
- if (P !== _.current) return;
450
- x(C.list), b(C.total), S(C.page), U(C.pageSize);
451
- } catch (C) {
452
- if (P !== _.current) return;
453
- x([]), b(0), f(C instanceof Error ? C.message : "加载案例列表失败");
462
+ const I = await n({ filter: A, page: g });
463
+ if (P !== U.current) return;
464
+ k(I.list), b(I.total), S(I.page), w(I.pageSize);
465
+ } catch (I) {
466
+ if (P !== U.current) return;
467
+ k([]), b(0), f(I instanceof Error ? I.message : "加载案例列表失败");
454
468
  } finally {
455
- P === _.current && F(!1);
469
+ P === U.current && F(!1);
456
470
  }
457
471
  },
458
472
  [n, p]
459
473
  );
460
- w(() => {
461
- S(1), D(1);
462
- }, [p, D]);
463
- const G = (y) => {
464
- t && o(B === y ? "" : y);
474
+ V(() => {
475
+ S(1), K(1);
476
+ }, [p, K]);
477
+ const Y = (g) => {
478
+ if (!t) return;
479
+ const A = O.includes(g) ? O.filter((P) => P !== g) : [...O, g];
480
+ o(A);
465
481
  }, X = () => {
466
- const y = ve(JSON.parse(p)), I = M || y.pageSize || 20, P = Math.max(1, Math.ceil(v / I)), C = g >= P ? 1 : g + 1;
467
- D(C);
482
+ const g = be(JSON.parse(p)), A = M || g.pageSize || 20, P = Math.max(1, Math.ceil(v / A)), I = y >= P ? 1 : y + 1;
483
+ K(I);
468
484
  };
469
- return /* @__PURE__ */ N("div", { className: "form-block-preview skopon-resume-select", children: [
470
- i ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: i }) : null,
471
- A && h.length === 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-status", children: [
472
- /* @__PURE__ */ c(Pe, { size: "small" }),
485
+ return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-resume-select", children: [
486
+ i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
487
+ C && h.length === 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-status", children: [
488
+ /* @__PURE__ */ s(_e, { size: "small" }),
473
489
  " 加载案例…"
474
490
  ] }) : null,
475
- !A && h.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: j }) : null,
476
- h.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: h.map((y) => /* @__PURE__ */ c(
477
- cn,
491
+ !C && h.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: q }) : null,
492
+ h.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: h.map((g) => /* @__PURE__ */ s(
493
+ yn,
478
494
  {
479
- item: y,
480
- selected: B === y.caseUniqueId,
495
+ item: g,
496
+ selected: O.includes(g.caseUniqueId),
481
497
  disabled: !t,
482
- onToggle: () => G(y.caseUniqueId)
498
+ onToggle: () => Y(g.caseUniqueId)
483
499
  },
484
- y.caseUniqueId
500
+ g.caseUniqueId
485
501
  )) }) : null,
486
- u && n && d.flowId ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ c(
487
- ce,
502
+ u && n && Se(m) ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ s(
503
+ ue,
488
504
  {
489
505
  type: "default",
490
506
  size: "small",
491
- icon: /* @__PURE__ */ c(De, {}),
492
- loading: A,
507
+ icon: /* @__PURE__ */ s(Ke, {}),
508
+ loading: C,
493
509
  disabled: !t,
494
510
  onClick: X,
495
511
  children: "换一批"
496
512
  }
497
513
  ) }) : null,
498
- s ? /* @__PURE__ */ c($.Text, { type: "secondary", className: "form-block-preview-help", children: s }) : null
514
+ c ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
499
515
  ] });
500
516
  }
501
- const pn = R(
502
- sn,
503
- un
504
- ), dn = {
505
- type: "case_singleselect",
517
+ const bn = R(
518
+ gn,
519
+ vn
520
+ ), Sn = {
521
+ type: "case_multiselect",
506
522
  componentName: "SkoponCaseSelect",
507
- toComponent: rn,
508
- fromComponent: on,
509
- catalogComponents: [pn]
523
+ toComponent: mn,
524
+ fromComponent: dn,
525
+ catalogComponents: [bn]
510
526
  };
511
- function mn(e, t) {
512
- var i, l, s, u;
527
+ function kn(e, t) {
528
+ var i, l, c, u;
513
529
  const { id: n, label: r, path: o, withData: a } = t;
514
530
  return a({
515
531
  id: n,
@@ -521,13 +537,13 @@ function mn(e, t) {
521
537
  resumeFilter: {
522
538
  names: ((i = e.resumeFilter) == null ? void 0 : i.names) ?? [],
523
539
  agentUniqueIds: ((l = e.resumeFilter) == null ? void 0 : l.agentUniqueIds) ?? [],
524
- resumeUniqueIds: ((s = e.resumeFilter) == null ? void 0 : s.resumeUniqueIds) ?? [],
540
+ resumeUniqueIds: ((c = e.resumeFilter) == null ? void 0 : c.resumeUniqueIds) ?? [],
525
541
  pageSize: ((u = e.resumeFilter) == null ? void 0 : u.pageSize) ?? 20
526
542
  },
527
543
  value: { path: o }
528
544
  });
529
545
  }
530
- function fn(e, t, n) {
546
+ function xn(e, t, n) {
531
547
  const r = n.nameFromValue(e.value), o = {
532
548
  ...t("resume_multiselect"),
533
549
  name: r,
@@ -546,230 +562,258 @@ function fn(e, t, n) {
546
562
  }
547
563
  return o;
548
564
  }
549
- const rt = Fe(null);
550
- function ot({
565
+ const ot = Me(null);
566
+ function at({
551
567
  resumeSearch: e,
552
568
  children: t
553
569
  }) {
554
- return /* @__PURE__ */ c(rt.Provider, { value: e ?? null, children: t });
570
+ return /* @__PURE__ */ s(ot.Provider, { value: e ?? null, children: t });
555
571
  }
556
- function hn() {
557
- return Me(rt);
572
+ function An() {
573
+ return Ee(ot);
558
574
  }
559
- function be(e) {
575
+ function ke(e) {
560
576
  return typeof e == "string" ? e : "";
561
577
  }
562
- function Se(e) {
578
+ function xe(e) {
563
579
  if (!e || typeof e != "object")
564
580
  return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
565
581
  const t = e, n = Array.isArray(t.names) ? t.names.map(String).filter(Boolean) : [], r = Array.isArray(t.agentUniqueIds) ? t.agentUniqueIds.map(String).filter(Boolean) : [], o = Array.isArray(t.resumeUniqueIds) ? t.resumeUniqueIds.map(String).filter(Boolean) : [], a = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), i = Number.isFinite(a) && a >= 1 && a <= 100 ? Math.floor(a) : 20;
566
582
  return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: i };
567
583
  }
568
- function gn(e) {
584
+ function Tn(e) {
569
585
  return JSON.stringify(e);
570
586
  }
571
- const yn = {
587
+ const Cn = {
572
588
  name: "SkoponResumeSelect",
573
- schema: m.object({
574
- label: m.any().optional(),
575
- placeholder: m.any().optional(),
576
- help: m.any().optional(),
577
- enableRefresh: m.any().optional(),
578
- resumeFilter: m.any().optional(),
579
- value: m.any().optional()
589
+ schema: d.object({
590
+ label: d.any().optional(),
591
+ placeholder: d.any().optional(),
592
+ help: d.any().optional(),
593
+ enableRefresh: d.any().optional(),
594
+ resumeFilter: d.any().optional(),
595
+ value: d.any().optional()
580
596
  }).passthrough()
581
- };
582
- function vn({
597
+ }, In = 3, Nn = 2;
598
+ function Ae(e, t) {
599
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, In), o = n.length - r.length;
600
+ return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-tags", children: [
601
+ /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-label", children: e }),
602
+ n.length > 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-tags-list", children: [
603
+ r.map((a) => /* @__PURE__ */ s(Q, { className: "skopon-resume-select-card-tag", children: a }, a)),
604
+ o > 0 ? /* @__PURE__ */ x(Q, { className: "skopon-resume-select-card-tag", children: [
605
+ "+",
606
+ o
607
+ ] }) : null
608
+ ] }) : /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
609
+ ] });
610
+ }
611
+ function Fn(e) {
612
+ return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-field", children: [
613
+ /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
614
+ /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
615
+ ] });
616
+ }
617
+ function Pn({ work: e }) {
618
+ return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-work", children: [
619
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ s("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ s(Mt, { className: "skopon-resume-select-card-work-placeholder" }) }),
620
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
621
+ ] });
622
+ }
623
+ function Mn({
583
624
  item: e,
584
625
  selected: t,
585
626
  disabled: n,
586
627
  onToggle: r
587
628
  }) {
588
- return /* @__PURE__ */ N(
629
+ const o = (e.works ?? []).slice(0, Nn);
630
+ return /* @__PURE__ */ x(
589
631
  "button",
590
632
  {
591
633
  type: "button",
592
- className: `skopon-resume-select-card${t ? " skopon-resume-select-card--selected" : ""}`,
634
+ className: `skopon-resume-select-card skopon-resume-select-card--profile${t ? " skopon-resume-select-card--selected" : ""}`,
593
635
  disabled: n,
594
636
  onClick: r,
595
637
  children: [
596
- /* @__PURE__ */ c(
597
- yt,
638
+ /* @__PURE__ */ s(
639
+ xt,
598
640
  {
599
641
  size: 48,
600
642
  src: e.avatarUrl || void 0,
601
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ c(It, {}),
643
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ s(Pt, {}),
602
644
  className: "skopon-resume-select-card-avatar"
603
645
  }
604
646
  ),
605
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-body", children: [
606
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name }),
607
- e.description ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
608
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-meta", children: [
609
- e.resumeUniqueId,
610
- typeof e.satisfaction == "number" ? ` · 满意度 ${e.satisfaction}%` : ""
647
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
648
+ /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-body", children: [
649
+ Fn(e.satisfaction),
650
+ Ae("性格", e.personality),
651
+ Ae("专长", e.specialties),
652
+ Ae("擅长领域", e.traits),
653
+ /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-works", children: [
654
+ /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
655
+ o.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-list", children: o.map((a, i) => /* @__PURE__ */ s(Pn, { work: a }, `${a.title}-${i}`)) }) : /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
611
656
  ] })
612
657
  ] })
613
658
  ]
614
659
  }
615
660
  );
616
661
  }
617
- function bn({ context: e }) {
618
- const { interactive: t } = L(), n = hn(), { value: r, setValue: o } = q(e), a = e.componentModel.properties, i = be(a.label), l = be(a.placeholder), s = be(a.help), u = a.enableRefresh !== !1, d = O(() => Se(a.resumeFilter), [a.resumeFilter]), p = gn(d), [g, S] = E(1), [A, F] = E(!1), [k, f] = E(""), [h, x] = E([]), [v, b] = E(0), [M, U] = E(d.pageSize ?? 20), _ = V(0), B = J(r), j = Z(
619
- async (y) => {
620
- const I = Se(JSON.parse(p)), P = ++_.current;
662
+ function En({ context: e }) {
663
+ const { interactive: t } = $(), n = An(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ke(a.label), l = ke(a.placeholder), c = ke(a.help), u = a.enableRefresh !== !1, m = z(() => xe(a.resumeFilter), [a.resumeFilter]), p = Tn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [M, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = W(
664
+ async (g) => {
665
+ const A = xe(JSON.parse(p)), P = ++U.current;
621
666
  if (!n) {
622
- x([]), b(0), f("未配置简历搜索服务");
667
+ k([]), b(0), f("未配置简历搜索服务");
623
668
  return;
624
669
  }
625
670
  F(!0), f("");
626
671
  try {
627
- const C = await n({ filter: I, page: y });
628
- if (P !== _.current) return;
629
- x(C.list), b(C.total), S(C.page), U(C.pageSize);
630
- } catch (C) {
631
- if (P !== _.current) return;
632
- x([]), b(0), f(C instanceof Error ? C.message : "加载简历列表失败");
672
+ const I = await n({ filter: A, page: g });
673
+ if (P !== U.current) return;
674
+ k(I.list), b(I.total), S(I.page), w(I.pageSize);
675
+ } catch (I) {
676
+ if (P !== U.current) return;
677
+ k([]), b(0), f(I instanceof Error ? I.message : "加载简历列表失败");
633
678
  } finally {
634
- P === _.current && F(!1);
679
+ P === U.current && F(!1);
635
680
  }
636
681
  },
637
682
  [n, p]
638
683
  );
639
- w(() => {
640
- S(1), j(1);
641
- }, [p, j]);
642
- const D = (y) => {
684
+ V(() => {
685
+ S(1), q(1);
686
+ }, [p, q]);
687
+ const K = (g) => {
643
688
  if (!t) return;
644
- const I = B.includes(y) ? B.filter((P) => P !== y) : [...B, y];
645
- o(I);
646
- }, G = () => {
647
- const y = Se(JSON.parse(p)), I = M || y.pageSize || 20, P = Math.max(1, Math.ceil(v / I)), C = g >= P ? 1 : g + 1;
648
- j(C);
689
+ const A = O.includes(g) ? O.filter((P) => P !== g) : [...O, g];
690
+ o(A);
691
+ }, Y = () => {
692
+ const g = xe(JSON.parse(p)), A = M || g.pageSize || 20, P = Math.max(1, Math.ceil(v / A)), I = y >= P ? 1 : y + 1;
693
+ q(I);
649
694
  }, X = l || "暂无匹配的简历";
650
- return /* @__PURE__ */ N("div", { className: "form-block-preview skopon-resume-select", children: [
651
- i ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: i }) : null,
652
- A && h.length === 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-status", children: [
653
- /* @__PURE__ */ c(Pe, { size: "small" }),
695
+ return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-resume-select", children: [
696
+ i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
697
+ C && h.length === 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-status", children: [
698
+ /* @__PURE__ */ s(_e, { size: "small" }),
654
699
  " 加载简历…"
655
700
  ] }) : null,
656
- !A && k ? /* @__PURE__ */ c($.Text, { type: "danger", className: "skopon-resume-select-status", children: k }) : null,
657
- !A && !k && h.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: X }) : null,
658
- h.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: h.map((y) => /* @__PURE__ */ c(
659
- vn,
701
+ !C && T ? /* @__PURE__ */ s(L.Text, { type: "danger", className: "skopon-resume-select-status", children: T }) : null,
702
+ !C && !T && h.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: X }) : null,
703
+ h.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: h.map((g) => /* @__PURE__ */ s(
704
+ Mn,
660
705
  {
661
- item: y,
662
- selected: B.includes(y.resumeUniqueId),
706
+ item: g,
707
+ selected: O.includes(g.resumeUniqueId),
663
708
  disabled: !t,
664
- onToggle: () => D(y.resumeUniqueId)
709
+ onToggle: () => K(g.resumeUniqueId)
665
710
  },
666
- y.resumeUniqueId
711
+ g.resumeUniqueId
667
712
  )) }) : null,
668
- u && n ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ c(
669
- ce,
713
+ u && n ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ s(
714
+ ue,
670
715
  {
671
716
  type: "default",
672
717
  size: "small",
673
- icon: /* @__PURE__ */ c(De, {}),
674
- loading: A,
718
+ icon: /* @__PURE__ */ s(Ke, {}),
719
+ loading: C,
675
720
  disabled: !t,
676
- onClick: G,
721
+ onClick: Y,
677
722
  children: "换一批"
678
723
  }
679
724
  ) }) : null,
680
- s ? /* @__PURE__ */ c($.Text, { type: "secondary", className: "form-block-preview-help", children: s }) : null
725
+ c ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
681
726
  ] });
682
727
  }
683
- const Sn = R(
684
- yn,
685
- bn
686
- ), xn = {
728
+ const _n = R(
729
+ Cn,
730
+ En
731
+ ), Un = {
687
732
  type: "resume_multiselect",
688
733
  componentName: "SkoponResumeSelect",
689
- toComponent: mn,
690
- fromComponent: fn,
691
- catalogComponents: [Sn]
692
- }, ue = [xn, dn], kn = new Map(
693
- ue.map((e) => [e.type, e])
694
- ), An = new Map(
695
- ue.map((e) => [e.componentName, e])
734
+ toComponent: kn,
735
+ fromComponent: xn,
736
+ catalogComponents: [_n]
737
+ }, pe = [Un, Sn], zn = new Map(
738
+ pe.map((e) => [e.type, e])
739
+ ), Rn = new Map(
740
+ pe.map((e) => [e.componentName, e])
696
741
  );
697
- function In(e) {
698
- return kn.get(e);
742
+ function wn(e) {
743
+ return zn.get(e);
699
744
  }
700
- function Cn(e) {
701
- return An.get(e);
745
+ function On(e) {
746
+ return Rn.get(e);
702
747
  }
703
- function Tn() {
704
- return ue.flatMap((e) => e.catalogComponents);
748
+ function Bn() {
749
+ return pe.flatMap((e) => e.catalogComponents);
705
750
  }
706
- function Nn() {
707
- return ue.map((e) => e.componentName);
751
+ function Vn() {
752
+ return pe.map((e) => e.componentName);
708
753
  }
709
- const se = "root", Ce = "__title__", Te = "__desc__", at = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
710
- function Fn(e) {
754
+ const ce = "root", Ne = "__title__", Fe = "__desc__", it = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
755
+ function qn(e) {
711
756
  return `/${e}`;
712
757
  }
713
758
  function $e(e) {
714
759
  return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
715
760
  }
716
- function z(e) {
761
+ function _(e) {
717
762
  if (typeof e == "string") return e;
718
763
  }
719
- function Mn(e) {
720
- const t = e.id || Q("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
764
+ function jn(e) {
765
+ const t = e.id || te("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
721
766
  return {
722
767
  id: t,
723
768
  component: "SkoponMedia",
724
769
  mediaType: n,
725
- urls: Gt(e),
726
- mediaSize: te(e.mediaSize),
770
+ urls: tn(e),
771
+ mediaSize: re(e.mediaSize),
727
772
  label: e.label ?? "",
728
773
  help: e.help ?? "",
729
774
  placeholder: e.placeholder ?? ""
730
775
  };
731
776
  }
732
- function Pn(e) {
777
+ function Ln(e) {
733
778
  if (Array.isArray(e.urls))
734
779
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
735
- const t = z(e.url);
780
+ const t = _(e.url);
736
781
  return t != null && t.trim() ? [t.trim()] : [];
737
782
  }
738
- function re(e, t, n) {
739
- const r = typeof e.id == "string" ? e.id : Q("block-"), o = Pn(e), a = z(e.label) ?? z(e.description) ?? n, i = z(e.help), l = z(e.placeholder), s = te(e.mediaSize);
783
+ function ae(e, t, n) {
784
+ const r = typeof e.id == "string" ? e.id : te("block-"), o = Ln(e), a = _(e.label) ?? _(e.description) ?? n, i = _(e.help), l = _(e.placeholder), c = re(e.mediaSize);
740
785
  return {
741
786
  id: r,
742
787
  type: t,
743
788
  label: a,
744
789
  ...i ? { help: i } : {},
745
790
  ...l ? { placeholder: l } : {},
746
- mediaSize: s,
791
+ mediaSize: c,
747
792
  mediaUrls: o.length > 0 ? o : [""]
748
793
  };
749
794
  }
750
- function En(e) {
795
+ function $n(e) {
751
796
  switch (e.type) {
752
797
  case "toggle":
753
- return Re(e.defaultValue);
798
+ return we(e.defaultValue);
754
799
  case "multiselect":
755
800
  case "checkbox":
756
801
  case "resume_multiselect":
802
+ case "case_multiselect":
757
803
  return Array.isArray(e.defaultValue) ? e.defaultValue : typeof e.defaultValue == "string" && e.defaultValue ? [e.defaultValue] : [];
758
804
  case "select":
759
805
  case "radio":
760
- case "case_singleselect":
761
- return Array.isArray(e.defaultValue) ? e.defaultValue[0] ?? "" : typeof e.defaultValue == "string" ? e.defaultValue : "";
762
806
  case "number":
763
807
  return typeof e.defaultValue == "number" || typeof e.defaultValue == "string" && e.defaultValue ? e.defaultValue : null;
764
808
  default:
765
809
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
766
810
  }
767
811
  }
768
- function zn(e) {
812
+ function Dn(e) {
769
813
  var u;
770
- const t = e.id || Q("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? Fn(r) : void 0, a = (e.options ?? []).map((d) => ({ label: d.label, value: d.value })), i = (d) => r ? { node: d, dataKey: r, dataValue: En(e) } : { node: d }, l = { id: t, label: n, name: r, path: o, withData: i }, s = In(e.type);
771
- if (s)
772
- return s.toComponent(e, l);
814
+ const t = e.id || te("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? qn(r) : void 0, a = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), i = (m) => r ? { node: m, dataKey: r, dataValue: $n(e) } : { node: m }, l = { id: t, label: n, name: r, path: o, withData: i }, c = wn(e.type);
815
+ if (c)
816
+ return c.toComponent(e, l);
773
817
  switch (e.type) {
774
818
  case "heading":
775
819
  return { node: { id: t, component: "Text", text: n, variant: "h3" } };
@@ -792,7 +836,7 @@ function zn(e) {
792
836
  component: "TextField",
793
837
  label: n,
794
838
  variant: "shortText",
795
- validationRegexp: at,
839
+ validationRegexp: it,
796
840
  ...e.placeholder ? { placeholder: e.placeholder } : {},
797
841
  value: { path: o }
798
842
  });
@@ -878,7 +922,7 @@ function zn(e) {
878
922
  case "image":
879
923
  case "video":
880
924
  case "audio":
881
- return { node: Mn(e) };
925
+ return { node: jn(e) };
882
926
  case "file":
883
927
  return i({
884
928
  id: t,
@@ -895,31 +939,31 @@ function zn(e) {
895
939
  return { node: null };
896
940
  }
897
941
  }
898
- function Ne(e) {
942
+ function Pe(e) {
899
943
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
900
- const t = e.components.find((r) => r.id === se);
944
+ const t = e.components.find((r) => r.id === ce);
901
945
  if (!t) return e.components.length === 0;
902
946
  const n = t.children;
903
947
  return !Array.isArray(n) || n.length === 0;
904
948
  }
905
- function it(e, t) {
949
+ function lt(e, t) {
906
950
  const n = [], r = [], o = {}, a = (t == null ? void 0 : t.includeHeader) !== !1, i = (e.title ?? "").trim(), l = (e.description ?? "").trim();
907
- a && i && (n.push({ id: Ce, component: "Text", text: i, variant: "h2" }), r.push(Ce)), a && l && (n.push({ id: Te, component: "Text", text: l, variant: "body" }), r.push(Te));
908
- for (const d of e.blocks ?? []) {
909
- const { node: p, dataKey: g, dataValue: S } = zn(d);
910
- p && (n.push(p), r.push(p.id), g && (o[g] = S));
951
+ a && i && (n.push({ id: Ne, component: "Text", text: i, variant: "h2" }), r.push(Ne)), a && l && (n.push({ id: Fe, component: "Text", text: l, variant: "body" }), r.push(Fe));
952
+ for (const m of e.blocks ?? []) {
953
+ const { node: p, dataKey: y, dataValue: S } = Dn(m);
954
+ p && (n.push(p), r.push(p.id), y && (o[y] = S));
911
955
  }
912
- n.unshift({ id: se, component: "Column", children: r });
913
- const s = { root: se, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
914
- return u !== void 0 && (s.surfaceProperties = { styleId: u ?? null }), s;
956
+ n.unshift({ id: ce, component: "Column", children: r });
957
+ const c = { root: ce, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
958
+ return u !== void 0 && (c.surfaceProperties = { styleId: u ?? null }), c;
915
959
  }
916
- function _n(e) {
960
+ function Kn(e) {
917
961
  const t = /* @__PURE__ */ new Map();
918
962
  for (const n of e.components ?? [])
919
963
  n && typeof n.id == "string" && t.set(n.id, n);
920
964
  return t;
921
965
  }
922
- function xe(e) {
966
+ function Te(e) {
923
967
  const t = e.options;
924
968
  return Array.isArray(t) ? t.map((n) => {
925
969
  if (!n || typeof n != "object") return null;
@@ -930,68 +974,68 @@ function xe(e) {
930
974
  };
931
975
  }).filter((n) => !!n) : [];
932
976
  }
933
- function Rn(e) {
934
- const t = typeof e.id == "string" ? e.id : Q("block-"), n = String(e.component ?? ""), r = z(e.label) ?? z(e.text) ?? "", o = $e(e.value), a = (l) => ({ id: t, type: l, label: r }), i = Cn(n);
977
+ function Jn(e) {
978
+ const t = typeof e.id == "string" ? e.id : te("block-"), n = String(e.component ?? ""), r = _(e.label) ?? _(e.text) ?? "", o = $e(e.value), a = (l) => ({ id: t, type: l, label: r }), i = On(n);
935
979
  if (i)
936
- return i.fromComponent(e, a, { asLiteral: z, nameFromValue: $e });
980
+ return i.fromComponent(e, a, { asLiteral: _, nameFromValue: $e });
937
981
  switch (n) {
938
982
  case "Text": {
939
- const l = String(e.variant ?? "body"), s = /^h[1-6]$/i.test(l) || l === "title" || l === "subtitle";
940
- return { id: t, type: s ? "heading" : "paragraph", label: r };
983
+ const l = String(e.variant ?? "body"), c = /^h[1-6]$/i.test(l) || l === "title" || l === "subtitle";
984
+ return { id: t, type: c ? "heading" : "paragraph", label: r };
941
985
  }
942
986
  case "TextField": {
943
987
  const l = String(e.variant ?? "shortText");
944
- let s = "text";
945
- l === "longText" ? s = "textarea" : l === "number" ? s = "number" : z(e.validationRegexp) === at && (s = "email");
946
- const u = { ...a(s), name: o }, d = z(e.placeholder);
947
- return d && (u.placeholder = d), u;
988
+ let c = "text";
989
+ l === "longText" ? c = "textarea" : l === "number" ? c = "number" : _(e.validationRegexp) === it && (c = "email");
990
+ const u = { ...a(c), name: o }, m = _(e.placeholder);
991
+ return m && (u.placeholder = m), u;
948
992
  }
949
993
  case "CheckBox":
950
994
  return { ...a("toggle"), name: o };
951
995
  case "SkoponSelect": {
952
- const s = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", u = {
953
- ...a(s),
996
+ const c = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", u = {
997
+ ...a(c),
954
998
  name: o,
955
- options: xe(e)
956
- }, d = z(e.placeholder);
957
- return d && (u.placeholder = d), u;
999
+ options: Te(e)
1000
+ }, m = _(e.placeholder);
1001
+ return m && (u.placeholder = m), u;
958
1002
  }
959
1003
  case "ChoicePicker": {
960
- const l = z(e.skoponPickerType);
1004
+ const l = _(e.skoponPickerType);
961
1005
  if (l === "select" || l === "multiselect" || l === "radio" || l === "checkbox") {
962
- const d = {
1006
+ const m = {
963
1007
  ...a(l),
964
1008
  name: o,
965
- options: xe(e)
966
- }, p = z(e.placeholder);
967
- return p && (d.placeholder = p), d;
1009
+ options: Te(e)
1010
+ }, p = _(e.placeholder);
1011
+ return p && (m.placeholder = p), m;
968
1012
  }
969
1013
  const u = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
970
- return { ...a(u), name: o, options: xe(e) };
1014
+ return { ...a(u), name: o, options: Te(e) };
971
1015
  }
972
1016
  case "DateTimeInput": {
973
- const l = e.enableDate === !0, s = e.enableTime === !0, d = { ...a(!l && s ? "time" : "datetime"), name: o }, p = z(e.placeholder);
974
- return p && (d.placeholder = p), d;
1017
+ const l = e.enableDate === !0, c = e.enableTime === !0, m = { ...a(!l && c ? "time" : "datetime"), name: o }, p = _(e.placeholder);
1018
+ return p && (m.placeholder = p), m;
975
1019
  }
976
1020
  case "SkoponMedia": {
977
1021
  const l = String(e.mediaType ?? "image");
978
- return re(e, l === "video" ? "video" : l === "audio" ? "audio" : "image", r);
1022
+ return ae(e, l === "video" ? "video" : l === "audio" ? "audio" : "image", r);
979
1023
  }
980
1024
  case "Image":
981
- return re(e, "image", r);
1025
+ return ae(e, "image", r);
982
1026
  case "Video":
983
- return re(e, "video", r);
1027
+ return ae(e, "video", r);
984
1028
  case "AudioPlayer":
985
- return re(e, "audio", r);
1029
+ return ae(e, "audio", r);
986
1030
  case "FileUpload": {
987
- const l = z(e.accept) ?? "", s = { ...a("file"), name: o };
988
- return l && (s.fileAcceptExtensions = l.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (s.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (s.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (s.fileMinCount = e.minCount), typeof e.maxCount == "number" && (s.fileMaxCount = e.maxCount), s;
1031
+ const l = _(e.accept) ?? "", c = { ...a("file"), name: o };
1032
+ return l && (c.fileAcceptExtensions = l.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (c.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (c.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (c.fileMinCount = e.minCount), typeof e.maxCount == "number" && (c.fileMaxCount = e.maxCount), c;
989
1033
  }
990
1034
  default:
991
1035
  return null;
992
1036
  }
993
1037
  }
994
- function lt(e, t, n, r) {
1038
+ function st(e, t, n, r) {
995
1039
  if (n.has(e)) return;
996
1040
  n.add(e);
997
1041
  const o = t.get(e);
@@ -999,12 +1043,12 @@ function lt(e, t, n, r) {
999
1043
  const a = String(o.component ?? "");
1000
1044
  if ((a === "Column" || a === "Row") && Array.isArray(o.children)) {
1001
1045
  for (const i of o.children)
1002
- typeof i == "string" && lt(i, t, n, r);
1046
+ typeof i == "string" && st(i, t, n, r);
1003
1047
  return;
1004
1048
  }
1005
1049
  r.push(o);
1006
1050
  }
1007
- function Un(e, t) {
1051
+ function Hn(e, t) {
1008
1052
  return t ? e.map((n) => {
1009
1053
  var a;
1010
1054
  const r = (a = n.name) == null ? void 0 : a.trim();
@@ -1013,33 +1057,33 @@ function Un(e, t) {
1013
1057
  return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: o === !0 || o === "true" } : { ...n, defaultValue: o };
1014
1058
  }) : e;
1015
1059
  }
1016
- function On(e) {
1060
+ function Yn(e) {
1017
1061
  if (!e || !Array.isArray(e.components))
1018
- return le({ title: "", description: "", blocks: [], jsonSchema: {} });
1019
- const t = _n(e), n = [];
1020
- lt(e.root ?? se, t, /* @__PURE__ */ new Set(), n);
1062
+ return se({ title: "", description: "", blocks: [], jsonSchema: {} });
1063
+ const t = Kn(e), n = [];
1064
+ st(e.root ?? ce, t, /* @__PURE__ */ new Set(), n);
1021
1065
  let r = "", o = "";
1022
1066
  const a = [];
1023
1067
  for (const i of n) {
1024
- if (i.id === Ce) {
1025
- r = z(i.text) ?? r;
1068
+ if (i.id === Ne) {
1069
+ r = _(i.text) ?? r;
1026
1070
  continue;
1027
1071
  }
1028
- if (i.id === Te) {
1029
- o = z(i.text) ?? o;
1072
+ if (i.id === Fe) {
1073
+ o = _(i.text) ?? o;
1030
1074
  continue;
1031
1075
  }
1032
- const l = Rn(i);
1076
+ const l = Jn(i);
1033
1077
  l && a.push(l);
1034
1078
  }
1035
- return le({
1079
+ return se({
1036
1080
  title: r,
1037
1081
  description: o,
1038
- blocks: Un(a, e.dataModel),
1082
+ blocks: Hn(a, e.dataModel),
1039
1083
  jsonSchema: {}
1040
1084
  });
1041
1085
  }
1042
- function Vn(e, t) {
1086
+ function Xn(e, t) {
1043
1087
  const { surfaceId: n, catalogId: r } = t, o = [
1044
1088
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1045
1089
  {
@@ -1052,24 +1096,24 @@ function Vn(e, t) {
1052
1096
  updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
1053
1097
  }), o;
1054
1098
  }
1055
- function st(e) {
1099
+ function ct(e) {
1056
1100
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1057
1101
  }
1058
- function Bn(e, t) {
1102
+ function Gn(e, t) {
1059
1103
  if (!e || typeof e != "object") return null;
1060
- const n = e, r = st(n.a2ui) ? n.a2ui : void 0;
1061
- if (r && !Ne(r)) return r;
1104
+ const n = e, r = ct(n.a2ui) ? n.a2ui : void 0;
1105
+ if (r && !Pe(r)) return r;
1062
1106
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1063
1107
  if (o.length === 0) return null;
1064
- const a = Y({
1108
+ const a = H({
1065
1109
  title: typeof n.title == "string" ? n.title : "",
1066
1110
  description: typeof n.description == "string" ? n.description : "",
1067
1111
  blocks: o
1068
- }), i = it(a, t);
1069
- return Ne(i) ? null : i;
1112
+ }), i = lt(a, t);
1113
+ return Pe(i) ? null : i;
1070
1114
  }
1071
- function wn(e, t, n) {
1072
- return it(
1115
+ function Wn(e, t, n) {
1116
+ return lt(
1073
1117
  {
1074
1118
  title: e.title,
1075
1119
  description: e.description,
@@ -1078,17 +1122,17 @@ function wn(e, t, n) {
1078
1122
  n
1079
1123
  );
1080
1124
  }
1081
- function jn(e) {
1125
+ function Zn(e) {
1082
1126
  if (!e || typeof e != "object" || Array.isArray(e))
1083
1127
  return;
1084
1128
  const t = e;
1085
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && st(t.a2ui) ? On(t.a2ui) : Y({
1129
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && ct(t.a2ui) ? Yn(t.a2ui) : H({
1086
1130
  title: typeof t.title == "string" ? t.title : "",
1087
1131
  description: typeof t.description == "string" ? t.description : "",
1088
1132
  blocks: Array.isArray(t.blocks) ? t.blocks : []
1089
1133
  });
1090
1134
  }
1091
- function $n(e, t, n) {
1135
+ function Qn(e, t, n) {
1092
1136
  const r = e.model.surfacesMap.get(t);
1093
1137
  if (!r) return {};
1094
1138
  const o = {};
@@ -1098,52 +1142,14 @@ function $n(e, t, n) {
1098
1142
  }
1099
1143
  return o;
1100
1144
  }
1101
- function ct(e) {
1102
- return e.replace(/'/g, "'\\''");
1103
- }
1104
- function Ln(e, t) {
1105
- const n = (t ?? "").trim() || "<callback_url>", r = JSON.stringify(e ?? {}, null, 2);
1106
- return [
1107
- `curl -X POST '${n}' \\`,
1108
- " -H 'Content-Type: application/json' \\",
1109
- ` -d '${ct(r)}'`
1110
- ].join(`
1111
- `);
1112
- }
1113
- function Le(e, t, n) {
1114
- return ` ${JSON.stringify(e)}: ${JSON.stringify(t)}${n ? "," : ""}`;
1115
- }
1116
- function qn(e, t) {
1117
- const n = ["{"], r = Object.entries(e), o = Object.entries(t);
1118
- return r.forEach(([a, i], l) => {
1119
- const s = l < r.length - 1 || o.length > 0;
1120
- n.push(Le(a, i, s));
1121
- }), o.length > 0 && (n.push(" // 额外字段(未在卡片展示)"), o.forEach(([a, i], l) => {
1122
- n.push(Le(a, i, l < o.length - 1));
1123
- })), n.push("}"), n.join(`
1124
- `);
1125
- }
1126
- function Dn({
1127
- cardValues: e,
1128
- extraValues: t = {},
1129
- callbackUrl: n
1130
- }) {
1131
- const r = (n ?? "").trim() || "<callback_url>", o = qn(e, t);
1132
- return [
1133
- `curl -X POST '${r}' \\`,
1134
- " -H 'Content-Type: application/json' \\",
1135
- ` -d '${ct(o)}'`
1136
- ].join(`
1137
- `);
1138
- }
1139
- function Jn(e) {
1140
- return Y({
1145
+ function er(e) {
1146
+ return H({
1141
1147
  title: "",
1142
1148
  description: "",
1143
1149
  blocks: [e]
1144
1150
  }).blocks[0];
1145
1151
  }
1146
- function Kn(e, t) {
1152
+ function tr(e, t) {
1147
1153
  var o, a;
1148
1154
  const n = /* @__PURE__ */ new Map();
1149
1155
  for (const i of t) {
@@ -1152,52 +1158,52 @@ function Kn(e, t) {
1152
1158
  }
1153
1159
  const r = [];
1154
1160
  for (const i of e.blocks) {
1155
- if (Ee(i.type)) {
1156
- r.push(Jn(i));
1161
+ if (Ue(i.type)) {
1162
+ r.push(er(i));
1157
1163
  continue;
1158
1164
  }
1159
- if (!K(i.type)) continue;
1165
+ if (!J(i.type)) continue;
1160
1166
  const l = (a = i.name) == null ? void 0 : a.trim();
1161
1167
  if (!l) continue;
1162
- const s = n.get(l);
1163
- s && r.push(s);
1168
+ const c = n.get(l);
1169
+ c && r.push(c);
1164
1170
  }
1165
1171
  return r;
1166
1172
  }
1167
- function Hn(e, t) {
1173
+ function nr(e, t) {
1168
1174
  var r;
1169
1175
  const n = {
1170
1176
  ...e,
1171
1177
  name: ((r = e.name) == null ? void 0 : r.trim()) || t.name
1172
1178
  };
1173
- return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue), Y({
1179
+ return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue), H({
1174
1180
  title: "",
1175
1181
  description: "",
1176
1182
  blocks: [n]
1177
1183
  }).blocks[0];
1178
1184
  }
1179
- function Yn(e) {
1185
+ function ut(e) {
1180
1186
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1181
1187
  const t = e;
1182
- return Array.isArray(t.blocks) ? Y({
1188
+ return Array.isArray(t.blocks) ? H({
1183
1189
  title: typeof t.title == "string" ? t.title : "",
1184
1190
  description: typeof t.description == "string" ? t.description : "",
1185
1191
  blocks: t.blocks
1186
1192
  }) : null;
1187
1193
  }
1188
- function Gn(e, t) {
1189
- var a, i, l, s, u, d;
1194
+ function rr(e, t) {
1195
+ var a, i, l, c, u, m;
1190
1196
  const n = /* @__PURE__ */ new Map();
1191
1197
  for (const p of (t == null ? void 0 : t.blocks) ?? [])
1192
- K(p.type) && ((a = p.name) != null && a.trim()) && n.set(p.name.trim(), p);
1198
+ J(p.type) && ((a = p.name) != null && a.trim()) && n.set(p.name.trim(), p);
1193
1199
  const r = [], o = [];
1194
1200
  for (const p of e.blocks) {
1195
- if (!K(p.type)) continue;
1196
- const g = (i = p.name) == null ? void 0 : i.trim();
1197
- if (!g) continue;
1198
- const S = n.get(g);
1199
- S ? r.push(Hn(S, p)) : o.push(
1200
- Y({
1201
+ if (!J(p.type)) continue;
1202
+ const y = (i = p.name) == null ? void 0 : i.trim();
1203
+ if (!y) continue;
1204
+ const S = n.get(y);
1205
+ S ? r.push(nr(S, p)) : o.push(
1206
+ H({
1201
1207
  title: "",
1202
1208
  description: "",
1203
1209
  blocks: [p]
@@ -1207,46 +1213,80 @@ function Gn(e, t) {
1207
1213
  return {
1208
1214
  matchedBlocks: r,
1209
1215
  extraBlocks: o,
1210
- renderBlocks: Kn(e, r),
1211
- title: ((l = e.title) == null ? void 0 : l.trim()) || ((s = t == null ? void 0 : t.title) == null ? void 0 : s.trim()) || "",
1212
- description: ((u = e.description) == null ? void 0 : u.trim()) || ((d = t == null ? void 0 : t.description) == null ? void 0 : d.trim()) || ""
1216
+ renderBlocks: tr(e, r),
1217
+ title: ((l = e.title) == null ? void 0 : l.trim()) || ((c = t == null ? void 0 : t.title) == null ? void 0 : c.trim()) || "",
1218
+ description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1213
1219
  };
1214
1220
  }
1215
- function Xn(e) {
1221
+ function or(e) {
1216
1222
  const { type: t, defaultValue: n } = e;
1217
- return n !== void 0 ? t === "toggle" ? n === !0 || n === "true" : t === "multiselect" || t === "checkbox" ? Array.isArray(n) ? n.map(String) : typeof n == "string" && n ? [n] : [] : n : t === "toggle" ? !1 : t === "multiselect" || t === "checkbox" ? [] : t === "number" ? null : "";
1223
+ return n !== void 0 ? t === "toggle" ? n === !0 || n === "true" : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? Array.isArray(n) ? n.map(String) : typeof n == "string" && n ? [n] : [] : n : t === "toggle" ? !1 : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? [] : t === "number" ? null : "";
1218
1224
  }
1219
- function Wn(e) {
1225
+ function pt(e) {
1220
1226
  var n;
1221
1227
  const t = {};
1222
1228
  for (const r of e) {
1223
- if (!K(r.type)) continue;
1229
+ if (!J(r.type)) continue;
1224
1230
  const o = (n = r.name) == null ? void 0 : n.trim();
1225
- o && (t[o] = Xn(r));
1231
+ o && (t[o] = or(r));
1226
1232
  }
1227
1233
  return t;
1228
1234
  }
1229
- function Zn(e) {
1235
+ function ar(e) {
1230
1236
  return e.blocks.some(
1231
1237
  (t) => {
1232
1238
  var n;
1233
- return K(t.type) && !!((n = t.name) != null && n.trim());
1239
+ return J(t.type) && !!((n = t.name) != null && n.trim());
1234
1240
  }
1235
1241
  );
1236
1242
  }
1237
- function Qn(e) {
1243
+ function ir(e) {
1238
1244
  return e.blocks.filter((t) => {
1239
1245
  var n;
1240
- return Ee(t.type) ? !0 : K(t.type) && !!((n = t.name) != null && n.trim());
1246
+ return Ue(t.type) ? !0 : J(t.type) && !!((n = t.name) != null && n.trim());
1241
1247
  });
1242
1248
  }
1243
- function er(e) {
1249
+ function lr(e) {
1244
1250
  return e.blocks.filter((t) => {
1245
1251
  var n;
1246
- return K(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1252
+ return J(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1247
1253
  }).map((t) => t.name.trim());
1248
1254
  }
1249
- async function tr(e, t, n) {
1255
+ function mt(e) {
1256
+ return e.replace(/'/g, "'\\''");
1257
+ }
1258
+ function dt(e, t) {
1259
+ const n = (t ?? "").trim() || "<callback_url>", r = JSON.stringify(e ?? {}, null, 2);
1260
+ return [
1261
+ `curl -X POST '${n}' \\`,
1262
+ " -H 'Content-Type: application/json' \\",
1263
+ ` -d '${mt(r)}'`
1264
+ ].join(`
1265
+ `);
1266
+ }
1267
+ function sr(e, t) {
1268
+ return JSON.stringify({ ...e, ...t }, null, 2);
1269
+ }
1270
+ function ft({
1271
+ cardValues: e,
1272
+ extraValues: t = {},
1273
+ callbackUrl: n
1274
+ }) {
1275
+ const r = (n ?? "").trim() || "<callback_url>", o = sr(e, t);
1276
+ return [
1277
+ `curl -X POST '${r}' \\`,
1278
+ " -H 'Content-Type: application/json' \\",
1279
+ ` -d '${mt(o)}'`
1280
+ ].join(`
1281
+ `);
1282
+ }
1283
+ function cr(e, t) {
1284
+ const n = ut(e);
1285
+ if (!n) return dt(e, t);
1286
+ const r = pt(n.blocks);
1287
+ return ft({ cardValues: r, callbackUrl: t });
1288
+ }
1289
+ async function ur(e, t, n) {
1250
1290
  const r = e.trim();
1251
1291
  if (!r)
1252
1292
  throw new Error("callback_url 为空");
@@ -1273,7 +1313,7 @@ async function tr(e, t, n) {
1273
1313
  }
1274
1314
  return { ok: a.ok, status: a.status, body: i };
1275
1315
  }
1276
- async function ut(e) {
1316
+ async function ht(e) {
1277
1317
  var n;
1278
1318
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
1279
1319
  await navigator.clipboard.writeText(e);
@@ -1289,7 +1329,7 @@ async function ut(e) {
1289
1329
  document.body.removeChild(t);
1290
1330
  }
1291
1331
  }
1292
- async function nr(e) {
1332
+ async function pr(e) {
1293
1333
  let t;
1294
1334
  try {
1295
1335
  t = await e.json();
@@ -1302,7 +1342,7 @@ async function nr(e) {
1302
1342
  throw new Error(t.message || `响应缺少 data (${e.status})`);
1303
1343
  return t.data;
1304
1344
  }
1305
- function qr(e = {}) {
1345
+ function Zr(e = {}) {
1306
1346
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
1307
1347
  async function o(a) {
1308
1348
  var p;
@@ -1313,35 +1353,35 @@ function qr(e = {}) {
1313
1353
  i.set("form_unique_id", a.formUniqueId);
1314
1354
  else
1315
1355
  throw new Error("form_id 或 form_unique_id 至少传一个");
1316
- const l = await ((p = e.getHeaders) == null ? void 0 : p.call(e)) ?? {}, s = await r(`${t}${n}?${i.toString()}`, {
1356
+ const l = await ((p = e.getHeaders) == null ? void 0 : p.call(e)) ?? {}, c = await r(`${t}${n}?${i.toString()}`, {
1317
1357
  method: "GET",
1318
1358
  headers: l
1319
- }), u = await nr(s), d = jn(u.form_definition);
1359
+ }), u = await pr(c), m = Zn(u.form_definition);
1320
1360
  return {
1321
1361
  formUniqueId: u.form_unique_id,
1322
1362
  formId: u.form_id,
1323
1363
  disabled: u.disabled === 1,
1324
- formDefinition: d,
1325
- a2ui: Bn(u.form_definition) ?? void 0
1364
+ formDefinition: m,
1365
+ a2ui: Gn(u.form_definition) ?? void 0
1326
1366
  };
1327
1367
  }
1328
1368
  return { fetchDetail: o };
1329
1369
  }
1330
- const rr = {
1331
- video: Ft,
1332
- audio: Nt,
1333
- image: Tt,
1334
- file: Ke,
1335
- spreadsheet: Ct,
1370
+ const mr = {
1371
+ video: zt,
1372
+ audio: Ut,
1373
+ image: _t,
1374
+ file: He,
1375
+ spreadsheet: Et,
1336
1376
  document: Je
1337
1377
  };
1338
- function or({
1378
+ function dr({
1339
1379
  type: e,
1340
1380
  size: t = 40,
1341
1381
  className: n
1342
1382
  }) {
1343
- const r = rr[e] ?? Ke;
1344
- return /* @__PURE__ */ c(
1383
+ const r = mr[e] ?? He;
1384
+ return /* @__PURE__ */ s(
1345
1385
  r,
1346
1386
  {
1347
1387
  className: n ?? "skopon-form-file-placeholder-icon",
@@ -1350,7 +1390,7 @@ function or({
1350
1390
  }
1351
1391
  );
1352
1392
  }
1353
- const pt = "skopon-form-v0_9", ar = /* @__PURE__ */ new Set([
1393
+ const gt = "skopon-form-v0_9", fr = /* @__PURE__ */ new Set([
1354
1394
  "SkoponMedia",
1355
1395
  "SkoponSelect",
1356
1396
  "Image",
@@ -1362,24 +1402,24 @@ const pt = "skopon-form-v0_9", ar = /* @__PURE__ */ new Set([
1362
1402
  "FileUpload",
1363
1403
  "TextField",
1364
1404
  "Text",
1365
- ...Nn()
1366
- ]), ir = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1367
- function ne(e) {
1368
- const t = [...ae.components.values()].find((n) => n.name === e);
1405
+ ...Vn()
1406
+ ]), hr = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1407
+ function oe(e) {
1408
+ const t = [...le.components.values()].find((n) => n.name === e);
1369
1409
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
1370
1410
  return t.schema;
1371
1411
  }
1372
- function T(e) {
1412
+ function N(e) {
1373
1413
  return typeof e == "string" ? e : "";
1374
1414
  }
1375
- function dt(e) {
1415
+ function yt(e) {
1376
1416
  return Array.isArray(e) ? e.map((t) => {
1377
1417
  if (!t || typeof t != "object") return null;
1378
1418
  const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
1379
1419
  return { value: r, label: o };
1380
1420
  }).filter((t) => !!t) : [];
1381
1421
  }
1382
- function pe({
1422
+ function me({
1383
1423
  mediaType: e,
1384
1424
  urls: t,
1385
1425
  mediaSize: n,
@@ -1387,408 +1427,408 @@ function pe({
1387
1427
  help: o,
1388
1428
  placeholder: a
1389
1429
  }) {
1390
- const i = r == null ? void 0 : r.trim(), l = o == null ? void 0 : o.trim(), s = Wt(n), u = (a == null ? void 0 : a.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
1391
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1392
- i ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: i }) : null,
1393
- t.length === 0 ? /* @__PURE__ */ c("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ c("div", { className: s, children: t.map((d, p) => e === "image" ? /* @__PURE__ */ c(
1430
+ const i = r == null ? void 0 : r.trim(), l = o == null ? void 0 : o.trim(), c = rn(n), u = (a == null ? void 0 : a.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
1431
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1432
+ i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1433
+ t.length === 0 ? /* @__PURE__ */ s("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ s("div", { className: c, children: t.map((m, p) => e === "image" ? /* @__PURE__ */ s(
1394
1434
  "img",
1395
1435
  {
1396
- src: d,
1436
+ src: m,
1397
1437
  alt: i || "图片",
1398
1438
  className: "form-media-item"
1399
1439
  },
1400
1440
  `media-${p}`
1401
- ) : e === "video" ? /* @__PURE__ */ c(
1441
+ ) : e === "video" ? /* @__PURE__ */ s(
1402
1442
  "video",
1403
1443
  {
1404
- src: d,
1444
+ src: m,
1405
1445
  controls: !0,
1406
1446
  className: "form-media-item"
1407
1447
  },
1408
1448
  `media-${p}`
1409
- ) : /* @__PURE__ */ c(
1449
+ ) : /* @__PURE__ */ s(
1410
1450
  "audio",
1411
1451
  {
1412
- src: d,
1452
+ src: m,
1413
1453
  controls: !0,
1414
1454
  className: "form-media-item form-media-item--audio"
1415
1455
  },
1416
1456
  `media-${p}`
1417
1457
  )) }),
1418
- l ? /* @__PURE__ */ c($.Text, { type: "secondary", className: "form-block-preview-help", children: l }) : null
1458
+ l ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-help", children: l }) : null
1419
1459
  ] });
1420
1460
  }
1421
1461
  function de(e, t) {
1422
- const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : T(e.url).trim() ? [T(e.url).trim()] : [];
1462
+ const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : N(e.url).trim() ? [N(e.url).trim()] : [];
1423
1463
  return {
1424
1464
  mediaType: t,
1425
1465
  urls: n,
1426
- mediaSize: te(e.mediaSize),
1427
- label: T(e.label) || T(e.description),
1428
- help: T(e.help),
1429
- placeholder: T(e.placeholder)
1466
+ mediaSize: re(e.mediaSize),
1467
+ label: N(e.label) || N(e.description),
1468
+ help: N(e.help),
1469
+ placeholder: N(e.placeholder)
1430
1470
  };
1431
1471
  }
1432
- const lr = {
1472
+ const gr = {
1433
1473
  name: "SkoponMedia",
1434
- schema: m.object({
1435
- mediaType: m.any().optional(),
1436
- urls: m.any().optional(),
1437
- mediaSize: m.any().optional(),
1438
- label: m.any().optional(),
1439
- help: m.any().optional(),
1440
- placeholder: m.any().optional()
1474
+ schema: d.object({
1475
+ mediaType: d.any().optional(),
1476
+ urls: d.any().optional(),
1477
+ mediaSize: d.any().optional(),
1478
+ label: d.any().optional(),
1479
+ help: d.any().optional(),
1480
+ placeholder: d.any().optional()
1441
1481
  }).passthrough()
1442
- }, sr = R(lr, ({ context: e }) => {
1443
- const t = e.componentModel.properties, n = T(t.mediaType);
1444
- return /* @__PURE__ */ c(pe, { ...de(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
1445
- }), cr = R(
1446
- { name: "Image", schema: ne("Image") },
1447
- ({ context: e }) => /* @__PURE__ */ c(pe, { ...de(e.componentModel.properties, "image") })
1448
- ), ur = R(
1449
- { name: "Video", schema: ne("Video") },
1450
- ({ context: e }) => /* @__PURE__ */ c(pe, { ...de(e.componentModel.properties, "video") })
1451
- ), pr = R(
1452
- { name: "AudioPlayer", schema: ne("AudioPlayer") },
1453
- ({ context: e }) => /* @__PURE__ */ c(pe, { ...de(e.componentModel.properties, "audio") })
1454
- ), dr = {
1482
+ }, yr = R(gr, ({ context: e }) => {
1483
+ const t = e.componentModel.properties, n = N(t.mediaType);
1484
+ return /* @__PURE__ */ s(me, { ...de(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
1485
+ }), vr = R(
1486
+ { name: "Image", schema: oe("Image") },
1487
+ ({ context: e }) => /* @__PURE__ */ s(me, { ...de(e.componentModel.properties, "image") })
1488
+ ), br = R(
1489
+ { name: "Video", schema: oe("Video") },
1490
+ ({ context: e }) => /* @__PURE__ */ s(me, { ...de(e.componentModel.properties, "video") })
1491
+ ), Sr = R(
1492
+ { name: "AudioPlayer", schema: oe("AudioPlayer") },
1493
+ ({ context: e }) => /* @__PURE__ */ s(me, { ...de(e.componentModel.properties, "audio") })
1494
+ ), kr = {
1455
1495
  name: "SkoponSelect",
1456
- schema: m.object({
1457
- label: m.any().optional(),
1458
- mode: m.any().optional(),
1459
- placeholder: m.any().optional(),
1460
- options: m.any().optional(),
1461
- value: m.any().optional()
1496
+ schema: d.object({
1497
+ label: d.any().optional(),
1498
+ mode: d.any().optional(),
1499
+ placeholder: d.any().optional(),
1500
+ options: d.any().optional(),
1501
+ value: d.any().optional()
1462
1502
  }).passthrough()
1463
1503
  };
1464
- function mr({ context: e }) {
1465
- const { interactive: t } = L(), { value: n, setValue: r } = q(e), o = e.componentModel.properties, a = T(o.label), i = T(o.placeholder), l = dt(o.options), s = T(o.mode) === "multiple";
1466
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1467
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
1468
- /* @__PURE__ */ c(
1469
- ke,
1504
+ function xr({ context: e }) {
1505
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = yt(o.options), c = N(o.mode) === "multiple";
1506
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1507
+ a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1508
+ /* @__PURE__ */ s(
1509
+ Ce,
1470
1510
  {
1471
- mode: s ? "multiple" : void 0,
1511
+ mode: c ? "multiple" : void 0,
1472
1512
  disabled: !t,
1473
1513
  allowClear: !0,
1474
1514
  className: "form-block-preview-control",
1475
1515
  style: { width: "100%" },
1476
- placeholder: i || (s ? "请选择多项" : "请选择"),
1516
+ placeholder: i || (c ? "请选择多项" : "请选择"),
1477
1517
  options: l,
1478
- value: s ? J(n) : H(n),
1479
- onChange: (u) => r(s ? u ?? [] : u ?? "")
1518
+ value: c ? j(n) : ee(n),
1519
+ onChange: (u) => r(c ? u ?? [] : u ?? "")
1480
1520
  }
1481
1521
  )
1482
1522
  ] });
1483
1523
  }
1484
- const fr = R(
1485
- dr,
1486
- mr
1524
+ const Ar = R(
1525
+ kr,
1526
+ xr
1487
1527
  );
1488
- function hr({ context: e }) {
1489
- const { interactive: t } = L(), { value: n, setValue: r } = q(e), o = e.componentModel.properties, a = T(o.label), i = T(o.variant) || "mutuallyExclusive", l = T(o.skoponPickerType), s = T(o.placeholder), u = dt(o.options), p = l === "select" || l === "multiselect" || l === "radio" || l === "checkbox" ? l : i === "multipleSelection" ? "checkbox" : "radio";
1490
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1491
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
1492
- p === "select" ? /* @__PURE__ */ c(
1493
- ke,
1528
+ function Tr({ context: e }) {
1529
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.variant) || "mutuallyExclusive", l = N(o.skoponPickerType), c = N(o.placeholder), u = yt(o.options), p = l === "select" || l === "multiselect" || l === "radio" || l === "checkbox" ? l : i === "multipleSelection" ? "checkbox" : "radio";
1530
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1531
+ a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1532
+ p === "select" ? /* @__PURE__ */ s(
1533
+ Ce,
1494
1534
  {
1495
1535
  disabled: !t,
1496
1536
  allowClear: !0,
1497
1537
  className: "form-block-preview-control",
1498
1538
  style: { width: "100%" },
1499
- placeholder: s || "请选择",
1539
+ placeholder: c || "请选择",
1500
1540
  options: u,
1501
- value: H(n),
1502
- onChange: (g) => r(g ?? "")
1541
+ value: ee(n),
1542
+ onChange: (y) => r(y ?? "")
1503
1543
  }
1504
- ) : p === "multiselect" ? /* @__PURE__ */ c(
1505
- ke,
1544
+ ) : p === "multiselect" ? /* @__PURE__ */ s(
1545
+ Ce,
1506
1546
  {
1507
1547
  mode: "multiple",
1508
1548
  disabled: !t,
1509
1549
  allowClear: !0,
1510
1550
  className: "form-block-preview-control",
1511
1551
  style: { width: "100%" },
1512
- placeholder: s || "请选择多项",
1552
+ placeholder: c || "请选择多项",
1513
1553
  options: u,
1514
- value: J(n),
1515
- onChange: (g) => r(g ?? [])
1554
+ value: j(n),
1555
+ onChange: (y) => r(y ?? [])
1516
1556
  }
1517
- ) : p === "checkbox" ? /* @__PURE__ */ c(
1518
- vt.Group,
1557
+ ) : p === "checkbox" ? /* @__PURE__ */ s(
1558
+ At.Group,
1519
1559
  {
1520
1560
  disabled: !t,
1521
1561
  className: "form-block-preview-control",
1522
1562
  options: u,
1523
- value: J(n),
1524
- onChange: (g) => r(g)
1563
+ value: j(n),
1564
+ onChange: (y) => r(y)
1525
1565
  }
1526
- ) : /* @__PURE__ */ c(
1527
- bt.Group,
1566
+ ) : /* @__PURE__ */ s(
1567
+ Tt.Group,
1528
1568
  {
1529
1569
  disabled: !t,
1530
1570
  className: "form-block-preview-control",
1531
1571
  options: u,
1532
- value: H(n),
1533
- onChange: (g) => r(g.target.value)
1572
+ value: ee(n),
1573
+ onChange: (y) => r(y.target.value)
1534
1574
  }
1535
1575
  )
1536
1576
  ] });
1537
1577
  }
1538
- const gr = R(
1578
+ const Cr = R(
1539
1579
  {
1540
1580
  name: "ChoicePicker",
1541
- schema: m.object({
1542
- label: m.any().optional(),
1543
- variant: m.any().optional(),
1544
- options: m.any().optional(),
1545
- value: m.any().optional(),
1546
- skoponPickerType: m.any().optional(),
1547
- placeholder: m.any().optional()
1581
+ schema: d.object({
1582
+ label: d.any().optional(),
1583
+ variant: d.any().optional(),
1584
+ options: d.any().optional(),
1585
+ value: d.any().optional(),
1586
+ skoponPickerType: d.any().optional(),
1587
+ placeholder: d.any().optional()
1548
1588
  }).passthrough()
1549
1589
  },
1550
- hr
1590
+ Tr
1551
1591
  );
1552
- function yr({ context: e }) {
1553
- const { interactive: t } = L(), { value: n, setValue: r } = q(e), o = e.componentModel.properties, a = T(o.label);
1554
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1555
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
1556
- /* @__PURE__ */ c(
1557
- St,
1592
+ function Ir({ context: e }) {
1593
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label);
1594
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1595
+ a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1596
+ /* @__PURE__ */ s(
1597
+ Ct,
1558
1598
  {
1559
1599
  disabled: !t,
1560
1600
  className: "form-block-preview-control",
1561
- checked: Re(n),
1601
+ checked: we(n),
1562
1602
  onChange: (i) => r(i)
1563
1603
  }
1564
1604
  )
1565
1605
  ] });
1566
1606
  }
1567
- const vr = R(
1568
- { name: "CheckBox", schema: ne("CheckBox") },
1569
- yr
1607
+ const Nr = R(
1608
+ { name: "CheckBox", schema: oe("CheckBox") },
1609
+ Ir
1570
1610
  );
1571
- function br(e, t, n) {
1572
- const r = H(e);
1611
+ function Fr(e, t, n) {
1612
+ const r = ee(e);
1573
1613
  if (!r) return;
1574
1614
  if (!t && n) {
1575
- const a = Be(r, "HH:mm", !0);
1615
+ const a = qe(r, "HH:mm", !0);
1576
1616
  return a.isValid() ? a : void 0;
1577
1617
  }
1578
- const o = Be(r);
1618
+ const o = qe(r);
1579
1619
  return o.isValid() ? o : void 0;
1580
1620
  }
1581
- function Sr({ context: e }) {
1582
- const { interactive: t } = L(), { value: n, setValue: r } = q(e), o = e.componentModel.properties, a = T(o.label), i = T(o.placeholder), l = o.enableDate === !0, s = o.enableTime === !0, u = br(n, l, s), d = (p) => {
1621
+ function Pr({ context: e }) {
1622
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = o.enableDate === !0, c = o.enableTime === !0, u = Fr(n, l, c), m = (p) => {
1583
1623
  if (!p) {
1584
1624
  r("");
1585
1625
  return;
1586
1626
  }
1587
- if (!l && s) {
1627
+ if (!l && c) {
1588
1628
  r(p.format("HH:mm"));
1589
1629
  return;
1590
1630
  }
1591
- if (l && s) {
1631
+ if (l && c) {
1592
1632
  r(p.format("YYYY-MM-DDTHH:mm"));
1593
1633
  return;
1594
1634
  }
1595
1635
  r(p.format("YYYY-MM-DD"));
1596
1636
  };
1597
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1598
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
1599
- !l && s ? /* @__PURE__ */ c(
1600
- xt,
1637
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1638
+ a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1639
+ !l && c ? /* @__PURE__ */ s(
1640
+ It,
1601
1641
  {
1602
1642
  disabled: !t,
1603
1643
  className: "form-block-preview-control",
1604
1644
  style: { width: "100%" },
1605
1645
  placeholder: i || "选择时间",
1606
1646
  value: u,
1607
- onChange: d
1647
+ onChange: m
1608
1648
  }
1609
- ) : /* @__PURE__ */ c(
1610
- kt,
1649
+ ) : /* @__PURE__ */ s(
1650
+ Nt,
1611
1651
  {
1612
- showTime: l && s,
1652
+ showTime: l && c,
1613
1653
  disabled: !t,
1614
1654
  className: "form-block-preview-control",
1615
1655
  style: { width: "100%" },
1616
- placeholder: i || (l && s ? "选择日期时间" : "选择日期"),
1656
+ placeholder: i || (l && c ? "选择日期时间" : "选择日期"),
1617
1657
  value: u,
1618
- onChange: d
1658
+ onChange: m
1619
1659
  }
1620
1660
  )
1621
1661
  ] });
1622
1662
  }
1623
- const xr = R(
1663
+ const Mr = R(
1624
1664
  {
1625
1665
  name: "DateTimeInput",
1626
- schema: m.object({
1627
- label: m.any().optional(),
1628
- enableDate: m.any().optional(),
1629
- enableTime: m.any().optional(),
1630
- placeholder: m.any().optional(),
1631
- value: m.any().optional(),
1632
- min: m.any().optional(),
1633
- max: m.any().optional()
1666
+ schema: d.object({
1667
+ label: d.any().optional(),
1668
+ enableDate: d.any().optional(),
1669
+ enableTime: d.any().optional(),
1670
+ placeholder: d.any().optional(),
1671
+ value: d.any().optional(),
1672
+ min: d.any().optional(),
1673
+ max: d.any().optional()
1634
1674
  }).passthrough()
1635
1675
  },
1636
- Sr
1637
- ), kr = {
1676
+ Pr
1677
+ ), Er = {
1638
1678
  name: "FileUpload",
1639
- schema: m.object({
1640
- label: m.any().optional(),
1641
- accept: m.any().optional(),
1642
- fileAcceptTypes: m.any().optional(),
1643
- filePlaceholderIcon: m.any().optional(),
1644
- minCount: m.any().optional(),
1645
- maxCount: m.any().optional(),
1646
- value: m.any().optional()
1679
+ schema: d.object({
1680
+ label: d.any().optional(),
1681
+ accept: d.any().optional(),
1682
+ fileAcceptTypes: d.any().optional(),
1683
+ filePlaceholderIcon: d.any().optional(),
1684
+ minCount: d.any().optional(),
1685
+ maxCount: d.any().optional(),
1686
+ value: d.any().optional()
1647
1687
  }).passthrough()
1648
1688
  };
1649
- function Ar({ context: e }) {
1650
- const { interactive: t } = L(), { value: n, setValue: r } = q(e), o = e.componentModel.properties, a = T(o.label), i = T(o.accept), l = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, s = i ? i.split(",").map((f) => f.trim()).filter(Boolean) : void 0, u = Dt(l, s), d = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
1689
+ function _r({ context: e }) {
1690
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.accept), l = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, c = i ? i.split(",").map((f) => f.trim()).filter(Boolean) : void 0, u = Gt(l, c), m = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
1651
1691
  o.filePlaceholderIcon
1652
- ) ? o.filePlaceholderIcon : "document", p = typeof o.minCount == "number" ? Math.max(0, o.minCount) : 0, g = typeof o.maxCount == "number" ? o.maxCount : 1, S = g > 0, A = J(n), F = S && A.length >= g, k = A.length < p;
1653
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1654
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
1655
- /* @__PURE__ */ N(
1656
- he.Dragger,
1692
+ ) ? o.filePlaceholderIcon : "document", p = typeof o.minCount == "number" ? Math.max(0, o.minCount) : 0, y = typeof o.maxCount == "number" ? o.maxCount : 1, S = y > 0, C = j(n), F = S && C.length >= y, T = C.length < p;
1693
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1694
+ a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1695
+ /* @__PURE__ */ x(
1696
+ ge.Dragger,
1657
1697
  {
1658
1698
  disabled: !t || F,
1659
- accept: qt(l, s),
1699
+ accept: Xt(l, c),
1660
1700
  className: "form-file-upload-preview",
1661
- showUploadList: t && A.length > 0,
1662
- fileList: t ? A.map((f, h) => ({
1701
+ showUploadList: t && C.length > 0,
1702
+ fileList: t ? C.map((f, h) => ({
1663
1703
  uid: `${h}-${f}`,
1664
1704
  name: f,
1665
1705
  status: "done"
1666
1706
  })) : [],
1667
1707
  beforeUpload: (f) => {
1668
- if (!t) return he.LIST_IGNORE;
1669
- const h = J(je(e));
1670
- if (S && h.length >= g) return he.LIST_IGNORE;
1671
- const x = S ? [...h, f.name].slice(0, g) : [...h, f.name];
1672
- return r(x), !1;
1708
+ if (!t) return ge.LIST_IGNORE;
1709
+ const h = j(Le(e));
1710
+ if (S && h.length >= y) return ge.LIST_IGNORE;
1711
+ const k = S ? [...h, f.name].slice(0, y) : [...h, f.name];
1712
+ return r(k), !1;
1673
1713
  },
1674
1714
  onRemove: (f) => {
1675
- const h = J(je(e)), x = /^(\d+)-/.exec(f.uid ?? ""), v = x ? Number(x[1]) : -1, b = v >= 0 && v < h.length ? h.filter((M, U) => U !== v) : h.filter((M) => M !== f.name);
1715
+ const h = j(Le(e)), k = /^(\d+)-/.exec(f.uid ?? ""), v = k ? Number(k[1]) : -1, b = v >= 0 && v < h.length ? h.filter((M, w) => w !== v) : h.filter((M) => M !== f.name);
1676
1716
  if (b.length < p) return !1;
1677
1717
  r(b);
1678
1718
  },
1679
1719
  children: [
1680
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(or, { type: d, size: 40 }) }),
1681
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
1720
+ /* @__PURE__ */ s("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ s(dr, { type: m, size: 40 }) }),
1721
+ /* @__PURE__ */ s("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
1682
1722
  ]
1683
1723
  }
1684
1724
  ),
1685
- /* @__PURE__ */ N($.Text, { type: "secondary", className: "form-block-preview-help", children: [
1725
+ /* @__PURE__ */ x(L.Text, { type: "secondary", className: "form-block-preview-help", children: [
1686
1726
  "允许:",
1687
1727
  u ?? "全部类型",
1688
1728
  p > 0 ? `;至少 ${p} 个文件` : "",
1689
- S ? `;最多 ${g} 个文件` : "",
1690
- k && t ? `(当前 ${A.length} 个,未达下限)` : ""
1729
+ S ? `;最多 ${y} 个文件` : "",
1730
+ T && t ? `(当前 ${C.length} 个,未达下限)` : ""
1691
1731
  ] })
1692
1732
  ] });
1693
1733
  }
1694
- const Ir = R(
1695
- kr,
1696
- Ar
1734
+ const Ur = R(
1735
+ Er,
1736
+ _r
1697
1737
  );
1698
- function Cr({ context: e }) {
1699
- const { interactive: t } = L(), { value: n, setValue: r } = q(e), o = e.componentModel.properties, a = T(o.label), i = T(o.placeholder), l = T(o.variant) || "shortText", s = H(n) ?? "", u = !t, d = "form-block-preview-control";
1738
+ function zr({ context: e }) {
1739
+ const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = N(o.variant) || "shortText", c = ee(n) ?? "", u = !t, m = "form-block-preview-control";
1700
1740
  let p;
1701
1741
  if (l === "longText")
1702
- p = /* @__PURE__ */ c(
1703
- ge.TextArea,
1742
+ p = /* @__PURE__ */ s(
1743
+ ye.TextArea,
1704
1744
  {
1705
1745
  disabled: u,
1706
- className: d,
1746
+ className: m,
1707
1747
  placeholder: i || "长文本回答...",
1708
1748
  autoSize: { minRows: 2, maxRows: 6 },
1709
- value: s,
1710
- onChange: (g) => r(g.target.value)
1749
+ value: c,
1750
+ onChange: (y) => r(y.target.value)
1711
1751
  }
1712
1752
  );
1713
1753
  else if (l === "number") {
1714
- const g = s && Number.isFinite(Number(s)) ? Number(s) : void 0;
1715
- p = /* @__PURE__ */ c(
1716
- At,
1754
+ const y = c && Number.isFinite(Number(c)) ? Number(c) : void 0;
1755
+ p = /* @__PURE__ */ s(
1756
+ Ft,
1717
1757
  {
1718
1758
  disabled: u,
1719
- className: d,
1759
+ className: m,
1720
1760
  style: { width: "100%" },
1721
1761
  placeholder: i || "数字",
1722
- value: g,
1762
+ value: y,
1723
1763
  onChange: (S) => r(S == null ? "" : String(S))
1724
1764
  }
1725
1765
  );
1726
- } else l === "obscured" ? p = /* @__PURE__ */ c(
1727
- ge.Password,
1766
+ } else l === "obscured" ? p = /* @__PURE__ */ s(
1767
+ ye.Password,
1728
1768
  {
1729
1769
  disabled: u,
1730
- className: d,
1770
+ className: m,
1731
1771
  placeholder: i,
1732
- value: s,
1733
- onChange: (g) => r(g.target.value)
1772
+ value: c,
1773
+ onChange: (y) => r(y.target.value)
1734
1774
  }
1735
- ) : p = /* @__PURE__ */ c(
1736
- ge,
1775
+ ) : p = /* @__PURE__ */ s(
1776
+ ye,
1737
1777
  {
1738
1778
  disabled: u,
1739
- className: d,
1779
+ className: m,
1740
1780
  placeholder: i,
1741
- value: s,
1742
- onChange: (g) => r(g.target.value)
1781
+ value: c,
1782
+ onChange: (y) => r(y.target.value)
1743
1783
  }
1744
1784
  );
1745
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
1746
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
1785
+ return /* @__PURE__ */ x("div", { className: "form-block-preview", children: [
1786
+ a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1747
1787
  p
1748
1788
  ] });
1749
1789
  }
1750
- const Tr = R(
1790
+ const Rr = R(
1751
1791
  {
1752
1792
  name: "TextField",
1753
- schema: m.object({
1754
- label: m.any().optional(),
1755
- variant: m.any().optional(),
1756
- placeholder: m.any().optional(),
1757
- validationRegexp: m.any().optional(),
1758
- value: m.any().optional()
1793
+ schema: d.object({
1794
+ label: d.any().optional(),
1795
+ variant: d.any().optional(),
1796
+ placeholder: d.any().optional(),
1797
+ validationRegexp: d.any().optional(),
1798
+ value: d.any().optional()
1759
1799
  }).passthrough()
1760
1800
  },
1761
- Cr
1801
+ zr
1762
1802
  );
1763
- function Nr({ context: e }) {
1764
- const t = e.componentModel.properties, n = T(t.text), r = T(t.variant) || "body";
1765
- return ir.has(r) ? r === "caption" ? /* @__PURE__ */ c($.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c($.Paragraph, { className: "form-block-preview-paragraph", children: n });
1803
+ function wr({ context: e }) {
1804
+ const t = e.componentModel.properties, n = N(t.text), r = N(t.variant) || "body";
1805
+ return hr.has(r) ? r === "caption" ? /* @__PURE__ */ s(L.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ s("em", { children: n }) }) : /* @__PURE__ */ s(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ s(L.Paragraph, { className: "form-block-preview-paragraph", children: n });
1766
1806
  }
1767
- const Fr = R(
1768
- { name: "Text", schema: ne("Text") },
1769
- Nr
1807
+ const Or = R(
1808
+ { name: "Text", schema: oe("Text") },
1809
+ wr
1770
1810
  );
1771
- function mt() {
1811
+ function vt() {
1772
1812
  const t = [
1773
- ...[...ae.components.values()].filter(
1774
- (r) => !ar.has(r.name)
1813
+ ...[...le.components.values()].filter(
1814
+ (r) => !fr.has(r.name)
1775
1815
  ),
1776
- sr,
1777
- fr,
1778
- cr,
1779
- ur,
1780
- pr,
1781
- gr,
1816
+ yr,
1817
+ Ar,
1782
1818
  vr,
1783
- xr,
1784
- Ir,
1785
- Tr,
1786
- Fr,
1787
- ...Tn()
1788
- ], n = [...ae.functions.values()];
1789
- return new Mt(pt, t, n, ae.themeSchema);
1790
- }
1791
- const Mr = ht(
1819
+ br,
1820
+ Sr,
1821
+ Cr,
1822
+ Nr,
1823
+ Mr,
1824
+ Ur,
1825
+ Rr,
1826
+ Or,
1827
+ ...Bn()
1828
+ ], n = [...le.functions.values()];
1829
+ return new Rt(gt, t, n, le.themeSchema);
1830
+ }
1831
+ const Br = St(
1792
1832
  function({
1793
1833
  doc: t,
1794
1834
  surfaceId: n = "skopon-form",
@@ -1797,53 +1837,53 @@ const Mr = ht(
1797
1837
  fieldNames: a = [],
1798
1838
  resumeSearch: i = null,
1799
1839
  caseSearch: l = null
1800
- }, s) {
1801
- w(() => {
1802
- Xe(), Ge();
1840
+ }, c) {
1841
+ V(() => {
1842
+ We(), Ge();
1803
1843
  }, []);
1804
- const u = V(null), d = V(a);
1805
- d.current = a;
1806
- const p = O(() => {
1807
- if (Ne(t)) return "";
1844
+ const u = B(null), m = B(a);
1845
+ m.current = a;
1846
+ const p = z(() => {
1847
+ if (Pe(t)) return "";
1808
1848
  try {
1809
1849
  return JSON.stringify(t);
1810
1850
  } catch {
1811
1851
  return String(t);
1812
1852
  }
1813
- }, [t]), g = O(() => {
1853
+ }, [t]), y = z(() => {
1814
1854
  if (!p)
1815
1855
  return { surfaces: [], processor: null };
1816
1856
  try {
1817
- const F = JSON.parse(p), k = new Ye([mt()]), f = Vn(F, {
1857
+ const F = JSON.parse(p), T = new Xe([vt()]), f = Xn(F, {
1818
1858
  surfaceId: n,
1819
- catalogId: pt
1859
+ catalogId: gt
1820
1860
  });
1821
- return k.processMessages(f), {
1822
- surfaces: Array.from(k.model.surfacesMap.values()),
1823
- processor: k
1861
+ return T.processMessages(f), {
1862
+ surfaces: Array.from(T.model.surfacesMap.values()),
1863
+ processor: T
1824
1864
  };
1825
1865
  } catch (F) {
1826
1866
  return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", F), { surfaces: [], processor: null };
1827
1867
  }
1828
- }, [p, n]), { surfaces: S, processor: A } = g;
1829
- return u.current = A, gt(
1830
- s,
1868
+ }, [p, n]), { surfaces: S, processor: C } = y;
1869
+ return u.current = C, kt(
1870
+ c,
1831
1871
  () => ({
1832
1872
  getValues(F) {
1833
- const k = u.current;
1834
- if (!k) return {};
1835
- const f = (F ?? d.current).map((h) => h.trim()).filter(Boolean);
1836
- return $n(k, n, f);
1873
+ const T = u.current;
1874
+ if (!T) return {};
1875
+ const f = (F ?? m.current).map((h) => h.trim()).filter(Boolean);
1876
+ return Qn(T, n, f);
1837
1877
  }
1838
1878
  }),
1839
1879
  [n]
1840
- ), S.length === 0 ? /* @__PURE__ */ c(qe, { children: r }) : /* @__PURE__ */ c(ot, { resumeSearch: i, children: /* @__PURE__ */ c(nt, { caseSearch: l, children: /* @__PURE__ */ c(Qe, { interactive: o, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: S.map((F) => /* @__PURE__ */ c(He, { surface: F }, F.id)) }) }) }) });
1880
+ ), S.length === 0 ? /* @__PURE__ */ s(De, { children: r }) : /* @__PURE__ */ s(at, { resumeSearch: i, children: /* @__PURE__ */ s(rt, { caseSearch: l, children: /* @__PURE__ */ s(et, { interactive: o, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: S.map((F) => /* @__PURE__ */ s(Ye, { surface: F }, F.id)) }) }) }) });
1841
1881
  }
1842
1882
  );
1843
- function oe() {
1844
- return new Ye([mt()]);
1883
+ function ie() {
1884
+ return new Xe([vt()]);
1845
1885
  }
1846
- function Dr({
1886
+ function Qr({
1847
1887
  messages: e,
1848
1888
  surfaceId: t = "skopon-form-stream",
1849
1889
  emptyHint: n = null,
@@ -1851,59 +1891,65 @@ function Dr({
1851
1891
  resumeSearch: o = null,
1852
1892
  caseSearch: a = null
1853
1893
  }) {
1854
- w(() => {
1855
- Xe(), Ge();
1894
+ V(() => {
1895
+ We(), Ge();
1856
1896
  }, []);
1857
- const i = V(oe()), l = V(0), s = V(""), u = V(!0), d = V(t);
1897
+ const i = B(null);
1898
+ i.current === null && (i.current = ie());
1899
+ const l = B(0), c = B(""), u = B(!0), m = B(t);
1858
1900
  function p(f, h) {
1859
- i.current = f, l.current = h.length, s.current = JSON.stringify(h), u.current && (A(f), k(Array.from(f.model.surfacesMap.values())));
1901
+ i.current = f, l.current = h.length, c.current = JSON.stringify(h), u.current && (C(f), T(Array.from(f.model.surfacesMap.values())));
1860
1902
  }
1861
- function g(f, h) {
1903
+ function y(f, h) {
1862
1904
  if (h <= 0) return !1;
1863
- const x = JSON.stringify(f.slice(0, h)), v = s.current;
1905
+ const k = JSON.stringify(f.slice(0, h)), v = c.current;
1864
1906
  if (!v) return !0;
1865
1907
  try {
1866
1908
  const b = JSON.parse(v);
1867
- return JSON.stringify(b.slice(0, h)) !== x;
1909
+ return JSON.stringify(b.slice(0, h)) !== k;
1868
1910
  } catch {
1869
1911
  return !0;
1870
1912
  }
1871
1913
  }
1872
- const [S, A] = E(() => i.current), [F, k] = E(
1873
- () => Array.from(i.current.model.surfacesMap.values())
1914
+ const [S, C] = E(
1915
+ () => i.current
1916
+ ), [F, T] = E(
1917
+ () => Array.from(
1918
+ i.current.model.surfacesMap.values()
1919
+ )
1874
1920
  );
1875
- return w(() => (u.current = !0, () => {
1921
+ return V(() => (u.current = !0, () => {
1876
1922
  u.current = !1;
1877
- }), []), w(() => {
1923
+ }), []), V(() => {
1878
1924
  i.current = S;
1879
- }, [S]), w(() => {
1925
+ }, [S]), V(() => {
1880
1926
  const f = () => {
1881
- u.current && k(Array.from(S.model.surfacesMap.values()));
1882
- }, h = S.onSurfaceCreated(f), x = S.onSurfaceDeleted(f);
1927
+ u.current && T(Array.from(S.model.surfacesMap.values()));
1928
+ }, h = S.onSurfaceCreated(f), k = S.onSurfaceDeleted(f);
1883
1929
  return () => {
1884
- h.unsubscribe(), x.unsubscribe();
1930
+ h.unsubscribe(), k.unsubscribe();
1885
1931
  };
1886
- }, [S]), w(() => {
1932
+ }, [S]), V(() => {
1887
1933
  let f = !1;
1888
- const h = d.current !== t;
1889
- if (d.current = t, h) {
1890
- const M = oe();
1891
- return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), f || p(M, e)) : (i.current = M, l.current = 0, s.current = "", f || (A(M), k([]))), () => {
1934
+ const h = m.current !== t;
1935
+ if (m.current = t, h) {
1936
+ const M = ie();
1937
+ return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), f || p(M, e)) : (i.current = M, l.current = 0, c.current = "", f || (C(M), T([]))), () => {
1892
1938
  f = !0;
1893
1939
  };
1894
1940
  }
1895
1941
  if (!Array.isArray(e) || e.length === 0) {
1896
1942
  if (l.current > 0) {
1897
- const M = oe();
1898
- i.current = M, l.current = 0, s.current = "", f || (A(M), k([]));
1943
+ const M = ie();
1944
+ i.current = M, l.current = 0, c.current = "", f || (C(M), T([]));
1899
1945
  }
1900
1946
  return () => {
1901
1947
  f = !0;
1902
1948
  };
1903
1949
  }
1904
- const x = i.current, v = l.current;
1905
- if (e.length < v || g(e, v)) {
1906
- const M = oe();
1950
+ const k = i.current, v = l.current;
1951
+ if (e.length < v || y(e, v)) {
1952
+ const M = ie();
1907
1953
  return M.processMessages(e), f || p(M, e), () => {
1908
1954
  f = !0;
1909
1955
  };
@@ -1911,43 +1957,45 @@ function Dr({
1911
1957
  const b = e.slice(v);
1912
1958
  return b.length === 0 ? () => {
1913
1959
  f = !0;
1914
- } : (x.processMessages(b), l.current = e.length, s.current = JSON.stringify(e), f || k(Array.from(x.model.surfacesMap.values())), () => {
1960
+ } : (k.processMessages(b), l.current = e.length, c.current = JSON.stringify(e), f || T(Array.from(k.model.surfacesMap.values())), () => {
1915
1961
  f = !0;
1916
1962
  });
1917
- }, [e, t]), F.length === 0 ? /* @__PURE__ */ c(qe, { children: n }) : /* @__PURE__ */ c(ot, { resumeSearch: o, children: /* @__PURE__ */ c(nt, { caseSearch: a, children: /* @__PURE__ */ c(Qe, { interactive: r, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: F.map((f) => /* @__PURE__ */ c(He, { surface: f }, f.id)) }) }) }) });
1963
+ }, [e, t]), F.length === 0 ? /* @__PURE__ */ s(De, { children: n }) : /* @__PURE__ */ s(at, { resumeSearch: o, children: /* @__PURE__ */ s(rt, { caseSearch: a, children: /* @__PURE__ */ s(et, { interactive: r, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: F.map((f) => /* @__PURE__ */ s(Ye, { surface: f }, f.id)) }) }) }) });
1918
1964
  }
1919
- function Pr({
1965
+ function Vr({
1920
1966
  payload: e,
1921
1967
  callbackUrl: t,
1922
1968
  title: n,
1923
1969
  unpublishedFormId: r,
1924
1970
  incompleteFormId: o,
1925
- onNotify: a
1971
+ copyMode: a = "display",
1972
+ onNotify: i
1926
1973
  }) {
1927
- const i = O(
1928
- () => Ln(e, t),
1974
+ const l = z(
1975
+ () => dt(e, t),
1929
1976
  [e, t]
1930
- );
1931
- async function l() {
1977
+ ), c = z(() => a === "submitFields" ? cr(e, t) : l, [a, e, t, l]);
1978
+ async function u() {
1932
1979
  try {
1933
- await ut(i), a == null || a("success", "已复制到剪贴板");
1980
+ await ht(c), i == null || i("success", "已复制到剪贴板");
1934
1981
  } catch {
1935
- a == null || a("error", "复制失败");
1982
+ i == null || i("error", "复制失败");
1936
1983
  }
1937
1984
  }
1938
- return /* @__PURE__ */ N("div", { className: "ask-user-curl-card", children: [
1939
- /* @__PURE__ */ N("div", { className: "ask-user-curl-card-header", children: [
1940
- /* @__PURE__ */ N("div", { className: "ask-user-curl-card-header-title", children: [
1941
- /* @__PURE__ */ c($.Text, { type: "secondary", children: n ?? "curl 命令" }),
1942
- r ? /* @__PURE__ */ c(ie, { title: r, children: /* @__PURE__ */ c(Ae, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
1943
- o ? /* @__PURE__ */ c(ie, { title: o, children: /* @__PURE__ */ c(Ae, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
1985
+ const m = a === "submitFields" ? "复制提交字段 curl(向 callback 回传)" : "复制 curl";
1986
+ return /* @__PURE__ */ x("div", { className: "ask-user-curl-card", children: [
1987
+ /* @__PURE__ */ x("div", { className: "ask-user-curl-card-header", children: [
1988
+ /* @__PURE__ */ x("div", { className: "ask-user-curl-card-header-title", children: [
1989
+ /* @__PURE__ */ s(L.Text, { type: "secondary", children: n ?? "curl 命令" }),
1990
+ r ? /* @__PURE__ */ s(Z, { title: r, children: /* @__PURE__ */ s(Q, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
1991
+ o ? /* @__PURE__ */ s(Z, { title: o, children: /* @__PURE__ */ s(Q, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
1944
1992
  ] }),
1945
- /* @__PURE__ */ c(ce, { size: "small", type: "text", onClick: () => void l(), children: "复制" })
1993
+ /* @__PURE__ */ s(Z, { title: m, children: /* @__PURE__ */ s(ue, { size: "small", type: "text", onClick: () => void u(), children: "复制" }) })
1946
1994
  ] }),
1947
- /* @__PURE__ */ c("pre", { className: "skopon-form-curl-json", children: i })
1995
+ /* @__PURE__ */ s("pre", { className: "skopon-form-curl-json", children: l })
1948
1996
  ] });
1949
1997
  }
1950
- function Er(e, t) {
1998
+ function qr(e, t) {
1951
1999
  if (t && typeof t == "object" && t !== null && "message" in t) {
1952
2000
  const n = t.message;
1953
2001
  if (typeof n == "string" && n.trim())
@@ -1955,7 +2003,7 @@ function Er(e, t) {
1955
2003
  }
1956
2004
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
1957
2005
  }
1958
- function Jr({
2006
+ function eo({
1959
2007
  payload: e,
1960
2008
  formUniqueId: t,
1961
2009
  callbackUrl: n,
@@ -1965,104 +2013,104 @@ function Jr({
1965
2013
  resumeSearch: i = null,
1966
2014
  caseSearch: l = null
1967
2015
  }) {
1968
- const [s, u] = E(null), [d, p] = E(!1), [g, S] = E(!0), [A, F] = E(!1), k = V(null), f = V(!0), h = V(a);
2016
+ const [c, u] = E(null), [m, p] = E(!1), [y, S] = E(!0), [C, F] = E(!1), T = B(null), f = B(!0), h = B(a);
1969
2017
  h.current = a;
1970
- const x = (t == null ? void 0 : t.trim()) ?? "";
1971
- w(() => (f.current = !0, () => {
2018
+ const k = (t == null ? void 0 : t.trim()) ?? "";
2019
+ V(() => (f.current = !0, () => {
1972
2020
  f.current = !1;
1973
- }), []), w(() => {
1974
- let y = !1;
1975
- return x ? (S(!0), p(!1), o({ formUniqueId: x }).then((I) => {
1976
- y || (p(!!I.disabled), u(I.formDefinition ?? null));
1977
- }).catch((I) => {
2021
+ }), []), V(() => {
2022
+ let g = !1;
2023
+ return k ? (S(!0), p(!1), o({ formUniqueId: k }).then((A) => {
2024
+ g || (p(!!A.disabled), u(A.formDefinition ?? null));
2025
+ }).catch((A) => {
1978
2026
  var P;
1979
- if (!y) {
2027
+ if (!g) {
1980
2028
  p(!1), u(null);
1981
- const C = I instanceof Error ? I.message : "获取表单定义失败";
1982
- (P = h.current) == null || P.call(h, "error", C);
2029
+ const I = A instanceof Error ? A.message : "获取表单定义失败";
2030
+ (P = h.current) == null || P.call(h, "error", I);
1983
2031
  }
1984
2032
  }).finally(() => {
1985
- y || S(!1);
2033
+ g || S(!1);
1986
2034
  }), () => {
1987
- y = !0;
2035
+ g = !0;
1988
2036
  }) : (S(!1), p(!1), u(null), () => {
1989
- y = !0;
2037
+ g = !0;
1990
2038
  });
1991
- }, [x, o]);
1992
- const v = O(() => Yn(e), [e]), b = O(() => v ? Gn(v, s ?? void 0) : null, [v, s]), M = (b == null ? void 0 : b.matchedBlocks) ?? [], U = !!(v && Zn(v) && M.length === 0), _ = O(() => b && b.renderBlocks.length > 0 ? b.renderBlocks : U && v ? Qn(v) : [], [b, U, v]), B = O(
1993
- () => U ? {} : Wn((b == null ? void 0 : b.extraBlocks) ?? []),
1994
- [U, b]
1995
- ), j = O(() => U && v ? er(v) : _.filter((y) => {
1996
- var I;
1997
- return (I = y.name) == null ? void 0 : I.trim();
1998
- }).map((y) => y.name.trim()), [U, v, _]), D = O(() => {
1999
- if (_.length === 0) return null;
2000
- const y = (b == null ? void 0 : b.title) ?? (v == null ? void 0 : v.title) ?? "", I = (b == null ? void 0 : b.description) ?? (v == null ? void 0 : v.description) ?? "";
2001
- return wn({ title: y, description: I }, _);
2002
- }, [b, v, _]), G = x ? `ask-user-${x}` : "ask-user-payload";
2003
- if (g)
2004
- return /* @__PURE__ */ c("div", { className: "ask-user-form-card", children: /* @__PURE__ */ c(Pe, { size: "small" }) });
2005
- if (!v || _.length === 0)
2006
- return /* @__PURE__ */ c(
2007
- Pr,
2039
+ }, [k, o]);
2040
+ const v = z(() => ut(e), [e]), b = z(() => v ? rr(v, c ?? void 0) : null, [v, c]), M = (b == null ? void 0 : b.matchedBlocks) ?? [], w = !!(v && ar(v) && M.length === 0), U = z(() => w && v ? ir(v) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, w, v]), O = z(
2041
+ () => w ? {} : pt((b == null ? void 0 : b.extraBlocks) ?? []),
2042
+ [w, b]
2043
+ ), q = z(() => w && v ? lr(v) : U.filter((g) => {
2044
+ var A;
2045
+ return (A = g.name) == null ? void 0 : A.trim();
2046
+ }).map((g) => g.name.trim()), [w, v, U]), K = z(() => {
2047
+ if (U.length === 0) return null;
2048
+ const g = (b == null ? void 0 : b.title) ?? (v == null ? void 0 : v.title) ?? "", A = (b == null ? void 0 : b.description) ?? (v == null ? void 0 : v.description) ?? "";
2049
+ return Wn({ title: g, description: A }, U);
2050
+ }, [b, v, U]), Y = k ? `ask-user-${k}` : "ask-user-payload";
2051
+ if (y)
2052
+ return /* @__PURE__ */ s("div", { className: "ask-user-form-card", children: /* @__PURE__ */ s(_e, { size: "small" }) });
2053
+ if (!v || U.length === 0)
2054
+ return /* @__PURE__ */ s(
2055
+ Vr,
2008
2056
  {
2009
2057
  payload: e,
2010
2058
  callbackUrl: n,
2011
- unpublishedFormId: d && x ? x : void 0,
2059
+ unpublishedFormId: m && k ? k : void 0,
2012
2060
  onNotify: a
2013
2061
  }
2014
2062
  );
2015
2063
  async function X() {
2016
- var y, I, P, C, Ue, Oe;
2017
- if (!A) {
2064
+ var g, A, P, I, Oe, Be;
2065
+ if (!C) {
2018
2066
  F(!0);
2019
2067
  try {
2020
- const W = ((y = k.current) == null ? void 0 : y.getValues(j)) ?? {}, me = { ...W, ...B };
2068
+ const G = ((g = T.current) == null ? void 0 : g.getValues(q)) ?? {}, fe = { ...G, ...O };
2021
2069
  if (r === "post") {
2022
2070
  const Ve = (n ?? "").trim();
2023
2071
  if (!Ve) {
2024
- (I = h.current) == null || I.call(h, "error", "callback_url 为空,无法提交");
2072
+ (A = h.current) == null || A.call(h, "error", "callback_url 为空,无法提交");
2025
2073
  return;
2026
2074
  }
2027
- const fe = await tr(Ve, me);
2075
+ const he = await ur(Ve, fe);
2028
2076
  if (!f.current) return;
2029
- fe.ok ? (P = h.current) == null || P.call(h, "success", "提交成功") : (C = h.current) == null || C.call(h, "error", Er(fe.status, fe.body));
2077
+ he.ok ? (P = h.current) == null || P.call(h, "success", "提交成功") : (I = h.current) == null || I.call(h, "error", qr(he.status, he.body));
2030
2078
  return;
2031
2079
  }
2032
- if (await ut(
2033
- Dn({ cardValues: W, extraValues: B, callbackUrl: n })
2080
+ if (await ht(
2081
+ ft({ cardValues: G, extraValues: O, callbackUrl: n })
2034
2082
  ), !f.current) return;
2035
- (Ue = h.current) == null || Ue.call(h, "success", "已复制 curl 到剪贴板");
2036
- } catch (W) {
2083
+ (Oe = h.current) == null || Oe.call(h, "success", "已复制 curl 到剪贴板");
2084
+ } catch (G) {
2037
2085
  if (!f.current) return;
2038
- const me = W instanceof Error ? W.message : "复制失败";
2039
- (Oe = h.current) == null || Oe.call(h, "error", me);
2086
+ const fe = G instanceof Error ? G.message : "复制失败";
2087
+ (Be = h.current) == null || Be.call(h, "error", fe);
2040
2088
  } finally {
2041
2089
  f.current && F(!1);
2042
2090
  }
2043
2091
  }
2044
2092
  }
2045
- return /* @__PURE__ */ N("div", { className: "ask-user-form-card", children: [
2046
- d && x ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(ie, { title: x, children: /* @__PURE__ */ c(Ae, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
2047
- /* @__PURE__ */ c(
2048
- Mr,
2093
+ return /* @__PURE__ */ x("div", { className: "ask-user-form-card", children: [
2094
+ m && k ? /* @__PURE__ */ s("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ s(Z, { title: k, children: /* @__PURE__ */ s(Q, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
2095
+ /* @__PURE__ */ s(
2096
+ Br,
2049
2097
  {
2050
- ref: k,
2051
- doc: D,
2052
- surfaceId: G,
2053
- fieldNames: j,
2098
+ ref: T,
2099
+ doc: K,
2100
+ surfaceId: Y,
2101
+ fieldNames: q,
2054
2102
  interactive: !0,
2055
2103
  resumeSearch: i,
2056
2104
  caseSearch: l
2057
2105
  }
2058
2106
  ),
2059
- /* @__PURE__ */ c("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ c(ie, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ c(
2060
- ce,
2107
+ /* @__PURE__ */ s("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ s(Z, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ s(
2108
+ ue,
2061
2109
  {
2062
2110
  type: "primary",
2063
2111
  size: "small",
2064
- loading: A,
2065
- disabled: A,
2112
+ loading: C,
2113
+ disabled: C,
2066
2114
  onClick: () => void X(),
2067
2115
  children: "提交"
2068
2116
  }
@@ -2070,39 +2118,40 @@ function Jr({
2070
2118
  ] });
2071
2119
  }
2072
2120
  export {
2073
- Lr as A2UI_PROTOCOL_VERSION,
2074
- Jr as AskUserFormCard,
2075
- nt as CaseSearchProvider,
2076
- Pr as CurlSubmitBlock,
2077
- Pt as FORM_MEDIA_SIZES,
2078
- ot as ResumeSearchProvider,
2079
- Dr as SkoponA2uiStreamRenderer,
2080
- Mr as SkoponFormRenderer,
2081
- On as a2uiToBlocks,
2082
- it as blocksToA2ui,
2083
- qn as buildAskUserCurlBodyJson,
2084
- Dn as buildAskUserCurlStatement,
2085
- wn as buildAskUserSurface,
2086
- Ln as buildCurlStatement,
2087
- ut as copyTextToClipboard,
2088
- qr as createFormClient,
2089
- Wn as extractExtraBlockValues,
2090
- $n as extractSurfaceValues,
2091
- er as getPayloadInputFieldNames,
2092
- Qn as getPayloadRenderableBlocks,
2093
- Gn as intersectPayloadBlocksWithForm,
2094
- Ne as isA2uiSurfaceEmpty,
2095
- K as isInputBlockType,
2096
- Ee as isLayoutBlockType,
2121
+ Wr as A2UI_PROTOCOL_VERSION,
2122
+ eo as AskUserFormCard,
2123
+ rt as CaseSearchProvider,
2124
+ Vr as CurlSubmitBlock,
2125
+ wt as FORM_MEDIA_SIZES,
2126
+ at as ResumeSearchProvider,
2127
+ Qr as SkoponA2uiStreamRenderer,
2128
+ Br as SkoponFormRenderer,
2129
+ Yn as a2uiToBlocks,
2130
+ lt as blocksToA2ui,
2131
+ sr as buildAskUserCurlBodyJson,
2132
+ ft as buildAskUserCurlStatement,
2133
+ cr as buildAskUserSubmitCurlFromPayload,
2134
+ Wn as buildAskUserSurface,
2135
+ dt as buildCurlStatement,
2136
+ ht as copyTextToClipboard,
2137
+ Zr as createFormClient,
2138
+ pt as extractExtraBlockValues,
2139
+ Qn as extractSurfaceValues,
2140
+ lr as getPayloadInputFieldNames,
2141
+ ir as getPayloadRenderableBlocks,
2142
+ rr as intersectPayloadBlocksWithForm,
2143
+ Pe as isA2uiSurfaceEmpty,
2144
+ J as isInputBlockType,
2145
+ Ue as isLayoutBlockType,
2097
2146
  Ie as isMediaBlockType,
2098
- jn as mapFormDefinitionFromDto,
2099
- Y as normalizeFormDefinition,
2100
- Yn as parsePayloadBlocksJson,
2101
- Zn as payloadHasInputBlocks,
2102
- Bn as resolveSurfaceFromFormDefinition,
2103
- tr as submitFormJson,
2104
- Vn as surfaceDocToMessages,
2105
- le as syncFormDefinition,
2106
- an as useCaseSearch,
2107
- hn as useResumeSearch
2147
+ Zn as mapFormDefinitionFromDto,
2148
+ H as normalizeFormDefinition,
2149
+ ut as parsePayloadBlocksJson,
2150
+ ar as payloadHasInputBlocks,
2151
+ Gn as resolveSurfaceFromFormDefinition,
2152
+ ur as submitFormJson,
2153
+ Xn as surfaceDocToMessages,
2154
+ se as syncFormDefinition,
2155
+ fn as useCaseSearch,
2156
+ An as useResumeSearch
2108
2157
  };