@baishuyun/ai-feat-utils 2.0.47 → 2.0.49

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.
@@ -10,18 +10,18 @@ const y = (e) => {
10
10
  console.error("invalid raw data");
11
11
  }
12
12
  return t || e.providerMetadata.raw.data;
13
- }, j = (e) => {
13
+ }, H = (e) => {
14
14
  if ((e == null ? void 0 : e.type) === "error")
15
15
  return !0;
16
16
  const t = y(e);
17
17
  return (t == null ? void 0 : t.type) === "agent-error";
18
- }, Oe = (e) => {
18
+ }, We = (e) => {
19
19
  const t = y(e);
20
20
  return (t == null ? void 0 : t.type) === "agent-fake-msg";
21
- }, Ie = (e) => (e == null ? void 0 : e.type) === "file", Pe = (e) => {
21
+ }, Be = (e) => (e == null ? void 0 : e.type) === "file", je = (e) => {
22
22
  const t = y(e);
23
23
  return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
24
- }, Le = (e) => {
24
+ }, Ue = (e) => {
25
25
  const t = y(e);
26
26
  if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
27
27
  return null;
@@ -32,32 +32,32 @@ const y = (e) => {
32
32
  } catch (r) {
33
33
  return console.error("invalid query result data"), null;
34
34
  }
35
- }, We = (e) => {
35
+ }, He = (e) => {
36
36
  if (!Array.isArray(e))
37
37
  return !1;
38
38
  for (const t of e)
39
39
  if ((t == null ? void 0 : t.type) === "file")
40
40
  return !0;
41
41
  return !1;
42
- }, Be = (e) => {
42
+ }, Ge = (e) => {
43
43
  const t = y(e);
44
44
  return (t == null ? void 0 : t.type) === "agent-loading";
45
- }, je = (e) => {
45
+ }, ze = (e) => {
46
46
  const t = y(e);
47
47
  return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
48
- }, Ue = (e) => {
49
- if (!j(e))
48
+ }, Qe = (e) => {
49
+ if (!H(e))
50
50
  return "";
51
51
  if (e != null && e.errorText)
52
52
  return e.errorText;
53
53
  const t = y(e);
54
54
  return (t == null ? void 0 : t.error) || "未知错误";
55
- }, He = (e) => {
55
+ }, Ye = (e) => {
56
56
  if (e != null && e.errorText)
57
57
  return e.errorText;
58
58
  const t = y(e);
59
59
  return (t == null ? void 0 : t.error) || "未知错误";
60
- }, M = "data-shadow-slot-injected", v = "host-clone", U = (e) => {
60
+ }, M = "data-shadow-slot-injected", v = "host-clone", G = (e) => {
61
61
  try {
62
62
  const t = new CSSStyleSheet();
63
63
  t.replaceSync(e);
@@ -78,13 +78,13 @@ ${a.join(`
78
78
  ${e}
79
79
  }`;
80
80
  }
81
- }, Ge = (e, t) => {
81
+ }, Ke = (e, t) => {
82
82
  if (e.querySelector(`[${M}]`)) return;
83
83
  const n = [], r = [], l = (o) => {
84
84
  if (o instanceof HTMLLinkElement) {
85
85
  const s = `@import url("${o.href}") layer(${v})`;
86
86
  n.push(o.media ? `${s} ${o.media};` : `${s};`);
87
- } else o instanceof HTMLStyleElement && r.push(U(o.textContent || ""));
87
+ } else o instanceof HTMLStyleElement && r.push(G(o.textContent || ""));
88
88
  };
89
89
  document.head.querySelectorAll("style").forEach(l), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(l);
90
90
  let a = t.parentNode;
@@ -97,7 +97,7 @@ ${e}
97
97
  ...r
98
98
  ].join(`
99
99
  `), e.appendChild(i);
100
- }, E = "data-bs-host-style", N = /* @__PURE__ */ new WeakMap(), A = (e, t) => e.replace(
100
+ }, E = "data-bs-host-style", C = /* @__PURE__ */ new WeakMap(), A = (e, t) => e.replace(
101
101
  /url\(\s*(?:"([^"\n]*)"|'([^'\n]*)'|([^\s)]*))\s*\)/gi,
102
102
  (n, r, l, a) => {
103
103
  var o;
@@ -109,18 +109,18 @@ ${e}
109
109
  return n;
110
110
  }
111
111
  }
112
- ), H = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), C = (e, t) => Array.from(e).map((n) => {
112
+ ), z = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), N = (e, t) => Array.from(e).map((n) => {
113
113
  if (n.type === 1) {
114
114
  const r = n, l = n.cssText.slice(n.cssText.indexOf("{"));
115
- return H(r.selectorText) + A(l, t);
115
+ return z(r.selectorText) + A(l, t);
116
116
  }
117
- return "cssRules" in n && n.type !== 7 ? n.cssText.slice(0, n.cssText.indexOf("{") + 1) + C(n.cssRules, t) + "}" : A(n.cssText, t);
117
+ return "cssRules" in n && n.type !== 7 ? n.cssText.slice(0, n.cssText.indexOf("{") + 1) + N(n.cssRules, t) + "}" : A(n.cssText, t);
118
118
  }).join(`
119
119
  `), q = (e) => {
120
120
  var r, l;
121
121
  const t = e.nodeType === 9 ? e : e.ownerDocument, n = [];
122
122
  if (e.nodeType === 9 && t.body) {
123
- const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((m) => m.startsWith("--")), s = [...i, ...o].map((m) => `${m}:${a.getPropertyValue(m)};`).join("");
123
+ const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((p) => p.startsWith("--")), s = [...i, ...o].map((p) => `${p}:${a.getPropertyValue(p)};`).join("");
124
124
  n.push({ source: t, css: `:host {display:contents;${s}}`, media: "", nonce: "", classes: `${t.documentElement.className} ${t.body.className}` });
125
125
  }
126
126
  for (const a of Array.from(e.querySelectorAll('style,link[rel~="stylesheet"]'))) {
@@ -128,7 +128,7 @@ ${e}
128
128
  const i = a.media || "", o = a.nonce || "";
129
129
  try {
130
130
  if (a.sheet) {
131
- n.push({ source: a, css: C(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
131
+ n.push({ source: a, css: N(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
132
132
  continue;
133
133
  }
134
134
  } catch (s) {
@@ -140,10 +140,10 @@ ${e}
140
140
  a.tagName === "LINK" ? n.push({ source: a, href: a.href, media: i, nonce: o }) : n.push({ source: a, css: A(a.textContent || "", a.baseURI), media: i, nonce: o });
141
141
  }
142
142
  for (const a of Array.from(e.adoptedStyleSheets || []))
143
- a.disabled || n.push({ source: a, css: C(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
143
+ a.disabled || n.push({ source: a, css: N(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
144
144
  return ((l = n[0]) == null ? void 0 : l.source) === t && n.push(n.shift()), n;
145
- }, G = (e) => {
146
- const t = N.get(e);
145
+ }, Q = (e) => {
146
+ const t = C.get(e);
147
147
  if (t) return t;
148
148
  const n = e.nodeType === 9 ? e : e.ownerDocument;
149
149
  let r = q(e), l = !1;
@@ -164,53 +164,53 @@ ${e}
164
164
  }) && o();
165
165
  });
166
166
  s.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["href", "rel", "media", "disabled", "class", "style"] }), e.addEventListener("load", o, !0);
167
- const m = n.defaultView.setInterval(i, 1e3), d = {
167
+ const p = n.defaultView.setInterval(i, 1e3), d = {
168
168
  read: () => r,
169
169
  refresh: o,
170
170
  subscribe(u) {
171
171
  return a.add(u), () => {
172
- a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), n.defaultView.clearInterval(m), N.delete(e));
172
+ a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), n.defaultView.clearInterval(p), C.delete(e));
173
173
  };
174
174
  }
175
175
  };
176
- return N.set(e, d), d;
177
- }, ze = (e, t) => {
176
+ return C.set(e, d), d;
177
+ }, Xe = (e, t) => {
178
178
  const n = [t.ownerDocument];
179
179
  let r = t.getRootNode();
180
180
  for (; r.nodeType === 11 && "host" in r; ) {
181
181
  const d = r;
182
182
  d.host.getAttribute("data-bs-style-mode") !== "sdk" && n.splice(1, 0, d), r = d.host.getRootNode();
183
183
  }
184
- const l = n.map(G), a = t.ownerDocument.createComment("host styles");
184
+ const l = n.map(Q), a = t.ownerDocument.createComment("host styles");
185
185
  e.prepend(a);
186
186
  const i = /* @__PURE__ */ new Map(), o = () => {
187
187
  var x;
188
- const d = l.reduce((p, f) => p.concat(f.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.className) || ""}`;
188
+ const d = l.reduce((f, g) => f.concat(g.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.className) || ""}`;
189
189
  u && u.className !== c && (u.className = c);
190
- const b = new Set(d.map((p) => p.source));
191
- for (const [p, f] of i) b.has(p) || (f.remove(), i.delete(p));
190
+ const b = new Set(d.map((f) => f.source));
191
+ for (const [f, g] of i) b.has(f) || (g.remove(), i.delete(f));
192
192
  let h = a;
193
- for (const p of d) {
194
- let f = i.get(p.source);
195
- const B = p.href ? "LINK" : "STYLE";
196
- if (f && f.tagName !== B && (f.remove(), i.delete(p.source), f = void 0), f || (f = t.ownerDocument.createElement(p.href ? "link" : "style"), f.setAttribute(E, ""), i.set(p.source, f)), f.media = p.media, f.nonce = p.nonce, p.href) {
197
- const k = f;
198
- k.rel = "stylesheet", k.href !== p.href && (k.href = p.href);
199
- } else f.textContent !== p.css && (f.textContent = p.css || "");
200
- h.nextSibling !== f && h.after(f), h = f;
193
+ for (const f of d) {
194
+ let g = i.get(f.source);
195
+ const U = f.href ? "LINK" : "STYLE";
196
+ if (g && g.tagName !== U && (g.remove(), i.delete(f.source), g = void 0), g || (g = t.ownerDocument.createElement(f.href ? "link" : "style"), g.setAttribute(E, ""), i.set(f.source, g)), g.media = f.media, g.nonce = f.nonce, f.href) {
197
+ const k = g;
198
+ k.rel = "stylesheet", k.href !== f.href && (k.href = f.href);
199
+ } else g.textContent !== f.css && (g.textContent = f.css || "");
200
+ h.nextSibling !== g && h.after(g), h = g;
201
201
  }
202
202
  }, s = l.map((d) => d.subscribe(o));
203
203
  o();
204
- const m = new MutationObserver((d) => {
204
+ const p = new MutationObserver((d) => {
205
205
  d.some((u) => {
206
206
  const c = u.target.nodeType === 1 ? u.target : u.target.parentElement;
207
207
  return c && !c.closest("style,link");
208
208
  }) && l.forEach((u) => u.refresh());
209
209
  });
210
- return m.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
211
- m.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
210
+ return p.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
211
+ p.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
212
212
  };
213
- }, F = "data-bs-font-faces", z = 5, Qe = (e, t) => {
213
+ }, F = "data-bs-font-faces", Y = 5, Ze = (e, t) => {
214
214
  if (e.querySelector(`[${F}]`)) return;
215
215
  const n = t.ownerDocument, r = [];
216
216
  for (const a of Array.from(n.styleSheets)) {
@@ -222,22 +222,22 @@ ${e}
222
222
  }
223
223
  const o = a.href || n.baseURI;
224
224
  for (const s of Array.from(i))
225
- s.type === z && r.push(A(s.cssText, o));
225
+ s.type === Y && r.push(A(s.cssText, o));
226
226
  }
227
227
  if (!r.length) return;
228
228
  const l = n.createElement("style");
229
229
  l.setAttribute(F, ""), l.textContent = r.join(`
230
230
  `), e.prepend(l);
231
231
  };
232
- function Q(e) {
232
+ function K(e) {
233
233
  return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
234
234
  }
235
- function Y(e) {
235
+ function X(e) {
236
236
  return Array.isArray(e) ? e.every(
237
237
  (t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
238
238
  ) : !1;
239
239
  }
240
- const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ") : e, K = /* @__PURE__ */ new Set([
240
+ const Ve = (e) => K(e) ? e.join(", ") : X(e) ? e.map((n) => n.value).join(", ") : e, Z = /* @__PURE__ */ new Set([
241
241
  "password",
242
242
  "textarea",
243
243
  "datetime",
@@ -248,16 +248,16 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
248
248
  "combocheck",
249
249
  "checkboxgroup",
250
250
  "number"
251
- ]), Ke = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? K.has(t.widget.type) : !1) : [], V = (e) => (t) => {
251
+ ]), Je = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? Z.has(t.widget.type) : !1) : [], V = (e) => (t) => {
252
252
  const n = y(t);
253
253
  return (n == null ? void 0 : n.type) === e;
254
- }, Ve = (e) => (t) => {
254
+ }, et = (e) => (t) => {
255
255
  const n = t, r = n == null ? void 0 : n.part;
256
256
  return V(e)(r);
257
- }, Xe = (e) => (t) => {
257
+ }, tt = (e) => (t) => {
258
258
  const n = y(t);
259
259
  return (n == null ? void 0 : n.type) !== e ? null : (n == null ? void 0 : n.field) || null;
260
- }, Ze = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Je = (e) => {
260
+ }, nt = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], rt = (e) => {
261
261
  if (typeof e != "string")
262
262
  return e;
263
263
  try {
@@ -265,14 +265,14 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
265
265
  } catch (t) {
266
266
  return console.info("[safeParseJson] Failed to parse JSON:", t), null;
267
267
  }
268
- }, R = (e) => !!(e && typeof e == "object" && e.qnKey), et = (e) => {
268
+ }, R = (e) => !!(e && typeof e == "object" && e.qnKey), at = (e) => {
269
269
  var r, l;
270
270
  const t = (r = e == null ? void 0 : e.widget) == null ? void 0 : r.value, n = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.type;
271
271
  return t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "number" && Number.isNaN(t) || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? !1 : n === "signature" ? R(t) : n === "upload" || n === "image" ? Array.isArray(t) && t.length > 0 && t.every(R) : !0;
272
- }, X = (e = "_widget_") => {
272
+ }, J = (e = "_widget_") => {
273
273
  const t = Date.now(), n = String(t), r = n.length, l = n.slice(0, r - 5), a = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
274
274
  return `${e}${l}${a}`;
275
- }, tt = (e, t) => ({
275
+ }, lt = (e, t) => ({
276
276
  field: e,
277
277
  onLoaded: () => {
278
278
  t.fillWidget({
@@ -289,13 +289,13 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
289
289
  };
290
290
  t.fillWidget(i);
291
291
  }
292
- }), nt = 10, rt = (e, t = "image/png") => new Promise((n) => {
292
+ }), it = 10, ot = (e, t = "image/png") => new Promise((n) => {
293
293
  const r = new Image();
294
294
  r.crossOrigin = "anonymous", r.onload = () => {
295
295
  const l = document.createElement("canvas");
296
296
  l.width = r.naturalWidth, l.height = r.naturalHeight, l.getContext("2d").drawImage(r, 0, 0), n(l.toDataURL(t));
297
297
  }, r.onerror = () => n(e), r.src = e;
298
- }), Z = {
298
+ }), ee = {
299
299
  eq: "等于",
300
300
  neq: "不等于",
301
301
  gt: "大于",
@@ -312,7 +312,7 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
312
312
  range: "选择范围",
313
313
  like: "模糊匹配",
314
314
  unlike: "模糊不匹配"
315
- }, J = {
315
+ }, te = {
316
316
  usergroup: { in: "包含任意一个" },
317
317
  deptgroup: { in: "包含任意一个" },
318
318
  checkboxgroup: { in: "包含任意一个" },
@@ -320,12 +320,12 @@ const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ")
320
320
  address: { in: "属于", nin: "不属于" },
321
321
  location: { in: "包含", nin: "不包含" }
322
322
  };
323
- function at(e, t) {
323
+ function st(e, t) {
324
324
  var r, l;
325
- const n = t ? J[t] : void 0;
326
- return (l = (r = n == null ? void 0 : n[e]) != null ? r : Z[e]) != null ? l : e;
325
+ const n = t ? te[t] : void 0;
326
+ return (l = (r = n == null ? void 0 : n[e]) != null ? r : ee[e]) != null ? l : e;
327
327
  }
328
- const ee = {
328
+ const ne = {
329
329
  // Text-like: equality, fuzzy, empty checks
330
330
  text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
331
331
  password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
@@ -369,7 +369,7 @@ const ee = {
369
369
  button: [],
370
370
  subform: [],
371
371
  unknown: []
372
- }, te = {
372
+ }, re = {
373
373
  text: "eq",
374
374
  password: "eq",
375
375
  radiogroup: "eq",
@@ -397,21 +397,21 @@ const ee = {
397
397
  dataload: "eq",
398
398
  formula: "eq"
399
399
  };
400
- function lt(e) {
400
+ function ut(e) {
401
401
  var t;
402
- return e ? (t = ee[e]) != null ? t : [] : [];
402
+ return e ? (t = ne[e]) != null ? t : [] : [];
403
403
  }
404
- function it(e) {
404
+ function dt(e) {
405
405
  var t;
406
- return e && (t = te[e]) != null ? t : "eq";
406
+ return e && (t = re[e]) != null ? t : "eq";
407
407
  }
408
- function S(e) {
408
+ function w(e) {
409
409
  return typeof e == "object" && e !== null && !Array.isArray(e);
410
410
  }
411
- function L(e) {
412
- return S(e) ? e : null;
411
+ function B(e) {
412
+ return w(e) ? e : null;
413
413
  }
414
- function D(e) {
414
+ function T(e) {
415
415
  return !!(e == null || e === "" || e === "{}" || Array.isArray(e) && e.length === 0);
416
416
  }
417
417
  function _(e, t) {
@@ -420,13 +420,13 @@ function _(e, t) {
420
420
  const n = e.map(String).sort(), r = t.map(String).sort();
421
421
  return n.every((l, a) => l === r[a]);
422
422
  }
423
- if (S(e) && S(t)) {
423
+ if (w(e) && w(t)) {
424
424
  const n = Object.keys(e), r = Object.keys(t);
425
425
  return n.length !== r.length ? !1 : n.every((l) => String(e[l]) === String(t[l]));
426
426
  }
427
427
  return String(e) === String(t);
428
428
  }
429
- function T(e) {
429
+ function D(e) {
430
430
  if (e == null) return null;
431
431
  let t = null;
432
432
  if (e instanceof Date)
@@ -440,93 +440,125 @@ function T(e) {
440
440
  return n ? `${n[1]}-${n[2].padStart(2, "0")}-${n[3].padStart(2, "0")}` : null;
441
441
  }
442
442
  function $(e, t) {
443
- const n = T(e), r = T(t);
443
+ const n = D(e), r = D(t);
444
444
  return n !== null && r !== null ? n === r : _(e, t);
445
445
  }
446
446
  function O(e, t) {
447
- if (S(t)) {
448
- const r = L(e);
447
+ if (w(t)) {
448
+ const r = B(e);
449
449
  return !(!r || t.province !== void 0 && String(r.province) !== String(t.province) || t.city !== void 0 && String(r.city) !== String(t.city) || t.district !== void 0 && String(r.district) !== String(t.district));
450
450
  }
451
451
  const n = Array.isArray(t) ? t.map(String) : [];
452
452
  return Array.isArray(e) ? e.some((r) => n.includes(String(r))) : n.includes(String(e));
453
453
  }
454
- function ne(e, t) {
454
+ function ae(e, t) {
455
455
  const n = Array.isArray(t) ? t.map(String) : [];
456
456
  if (n.length === 0) return !1;
457
457
  const r = Array.isArray(e) ? e.map(String) : [];
458
458
  return n.every((l) => r.includes(l));
459
459
  }
460
- function re(e, t) {
461
- const n = L(t);
460
+ function le(e, t) {
461
+ const n = B(t);
462
462
  if (!n) return !1;
463
463
  const r = Number(e);
464
464
  return !(isNaN(r) || n.min !== void 0 && n.min !== null && r < Number(n.min) || n.max !== void 0 && n.max !== null && r > Number(n.max));
465
465
  }
466
- const ae = (e, t) => t === "user" ? e._id : e;
467
- function le(e, t) {
468
- var m, d, u;
469
- const n = (m = e.field.widget) == null ? void 0 : m.widgetName;
470
- if (!n) return !1;
471
- const r = (d = e.field.widget) == null ? void 0 : d.type, l = t[n], a = ae(l, r), { operator: i, value: o } = e, s = ((u = e.field.widget) == null ? void 0 : u.type) === "datetime";
472
- switch (i) {
466
+ const ie = (e, t) => t === "user" ? e == null ? void 0 : e._id : e;
467
+ function oe(e) {
468
+ return w(e) && "data" in e && "widgetType" in e;
469
+ }
470
+ function P(e, t) {
471
+ const n = [];
472
+ for (const r of e)
473
+ if (w(r) && t in r) {
474
+ const l = r[t];
475
+ n.push(oe(l) ? l.data : l);
476
+ }
477
+ return n;
478
+ }
479
+ function se(e, t) {
480
+ if (e.includes(".")) {
481
+ const [n, r] = e.split("."), l = t[n];
482
+ return Array.isArray(l) ? P(l, r) : [];
483
+ }
484
+ if (e in t)
485
+ return [t[e]];
486
+ for (const n of Object.values(t)) {
487
+ if (!Array.isArray(n)) continue;
488
+ const r = P(n, e);
489
+ if (r.length > 0) return r;
490
+ }
491
+ return [];
492
+ }
493
+ function I(e, t) {
494
+ var o;
495
+ const n = (o = t.field.widget) == null ? void 0 : o.type, r = ie(e, n), { operator: l, value: a } = t, i = n === "datetime";
496
+ switch (l) {
473
497
  case "empty":
474
- return D(a);
498
+ return T(r);
475
499
  case "not_empty":
476
- return !D(a);
500
+ return !T(r);
477
501
  case "eq":
478
- return s ? $(a, o) : _(a, o);
502
+ return i ? $(r, a) : _(r, a);
479
503
  case "neq":
480
- return s ? !$(a, o) : !_(a, o);
504
+ return i ? !$(r, a) : !_(r, a);
481
505
  case "contains":
482
506
  case "like":
483
- return String(a).includes(String(o));
507
+ return String(r).includes(String(a));
484
508
  case "not_contains":
485
509
  case "unlike":
486
- return !String(a).includes(String(o));
510
+ return !String(r).includes(String(a));
487
511
  case "gt":
488
- return Number(a) > Number(o);
512
+ return Number(r) > Number(a);
489
513
  case "gte":
490
- return Number(a) >= Number(o);
514
+ return Number(r) >= Number(a);
491
515
  case "lt":
492
- return Number(a) < Number(o);
516
+ return Number(r) < Number(a);
493
517
  case "lte":
494
- return Number(a) <= Number(o);
518
+ return Number(r) <= Number(a);
495
519
  case "in":
496
- return O(a, o);
520
+ return O(r, a);
497
521
  case "nin":
498
- return !O(a, o);
522
+ return !O(r, a);
499
523
  case "all":
500
- return ne(a, o);
524
+ return ae(r, a);
501
525
  case "range":
502
- return re(a, o);
526
+ return le(r, a);
503
527
  default:
504
528
  return !1;
505
529
  }
506
530
  }
507
- function ot(e, t) {
531
+ function ue(e, t) {
532
+ var l;
533
+ const n = (l = e.field.widget) == null ? void 0 : l.widgetName;
534
+ if (!n) return !1;
535
+ const r = se(n, t);
536
+ return r.length === 0 ? I(void 0, e) : r.some((a) => I(a, e));
537
+ }
538
+ function ct(e, t) {
539
+ var l;
508
540
  if (!t || !(t != null && t.length))
509
541
  return !1;
510
- const n = e.formFieldEditPreference;
542
+ const n = (l = e.formFieldEditPreference) != null ? l : "edit_any_field";
511
543
  if (n === "edit_any_field")
512
544
  return !!(t != null && t.length);
513
545
  const r = new Set(t);
514
- return n == null ? void 0 : n.fields.some((l) => {
515
- var a;
516
- return r.has((a = l == null ? void 0 : l.widget) == null ? void 0 : a.widgetName);
546
+ return n.fields.some((a) => {
547
+ var i;
548
+ return r.has((i = a == null ? void 0 : a.widget) == null ? void 0 : i.widgetName);
517
549
  });
518
550
  }
519
- function st(e, t) {
551
+ function mt(e, t) {
520
552
  if (!e.enabled)
521
553
  return !1;
522
554
  const n = e.triggerCondition;
523
555
  if (!n) return !0;
524
556
  const { items: r, quantifier: l } = n;
525
557
  if (!r || r.length === 0) return !0;
526
- const a = r.map((i) => le(i, t));
558
+ const a = r.map((i) => ue(i, t));
527
559
  return l === "any" ? a.some((i) => i) : a.every((i) => i);
528
560
  }
529
- const ut = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global" || t.type === "app" || t.type === "form", ie = {
561
+ const gt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global" || t.type === "app" || t.type === "form", de = {
530
562
  eq: "eq",
531
563
  neq: "ne",
532
564
  gt: "gt",
@@ -543,7 +575,7 @@ const ut = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
543
575
  empty: "empty",
544
576
  not_empty: "not_empty",
545
577
  range: "range"
546
- }, oe = {
578
+ }, ce = {
547
579
  eq: "eq",
548
580
  ne: "neq",
549
581
  gt: "gt",
@@ -561,13 +593,13 @@ const ut = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
561
593
  not_empty: "not_empty",
562
594
  range: "range"
563
595
  };
564
- function dt(e) {
596
+ function ft(e) {
565
597
  const t = e.quantifier === "any" ? "or" : "and", n = e.items.map((r) => {
566
- var i, o, s, m, d, u;
567
- const l = (i = ie[r.operator]) != null ? i : "eq";
598
+ var i, o, s, p, d, u;
599
+ const l = (i = de[r.operator]) != null ? i : "eq";
568
600
  let a;
569
- return r.operator === "range" && S(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
570
- field: (m = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? m : "",
601
+ return r.operator === "range" && w(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
602
+ field: (p = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? p : "",
571
603
  method: l,
572
604
  value: a,
573
605
  type: (u = (d = r.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
@@ -575,10 +607,10 @@ function dt(e) {
575
607
  });
576
608
  return JSON.stringify({ rel: t, cond: n });
577
609
  }
578
- function ct(e) {
610
+ function pt(e) {
579
611
  const t = JSON.parse(e), n = t.rel === "or" ? "any" : "all", r = t.cond.map((l, a) => {
580
- var s, m;
581
- const i = (s = oe[l.method]) != null ? s : "eq";
612
+ var s, p;
613
+ const i = (s = ce[l.method]) != null ? s : "eq";
582
614
  let o = l.value;
583
615
  return i === "range" ? o = { min: l.value[0], max: l.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (o = l.value[0]), {
584
616
  id: `${l.field}_${a}`,
@@ -586,7 +618,7 @@ function ct(e) {
586
618
  label: l.field,
587
619
  widget: {
588
620
  widgetName: l.field,
589
- type: (m = l.type) != null ? m : "unknown",
621
+ type: (p = l.type) != null ? p : "unknown",
590
622
  value: void 0
591
623
  }
592
624
  },
@@ -596,23 +628,23 @@ function ct(e) {
596
628
  });
597
629
  return { targetName: "", quantifier: n, items: r };
598
630
  }
599
- function gt(e) {
631
+ function bt(e) {
600
632
  const t = (n) => String(n).padStart(2, "0");
601
633
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
602
634
  }
603
- function mt(e, t, n = 1) {
635
+ function yt(e, t, n = 1) {
604
636
  const r = [], l = [];
605
637
  for (const a of e)
606
638
  t(a) ? l.push(a) : (l.length > 0 && (r.push(l.length >= n ? [...l] : l[0]), l.length = 0), r.push(a));
607
639
  return l.length > 0 && r.push(l.length >= 2 ? [...l] : l[0]), r;
608
640
  }
609
- function W(e) {
641
+ function j(e) {
610
642
  const t = [];
611
643
  for (const n of e)
612
- Array.isArray(n) ? t.push(...W(n)) : t.push(n);
644
+ Array.isArray(n) ? t.push(...j(n)) : t.push(n);
613
645
  return t;
614
646
  }
615
- const se = {
647
+ const me = {
616
648
  projectdevelopment: "e914",
617
649
  resourcelibrary: "e915",
618
650
  Plugin2: "e90e",
@@ -1019,11 +1051,11 @@ const se = {
1019
1051
  Automation1: "ea95",
1020
1052
  Avatar: "ea96"
1021
1053
  };
1022
- function ft(e) {
1023
- const t = se[e];
1054
+ function ht(e) {
1055
+ const t = me[e];
1024
1056
  return t ? `&#x${t};` : void 0;
1025
1057
  }
1026
- const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, bt = (e, t, n) => {
1058
+ const wt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, St = (e, t, n) => {
1027
1059
  if (!n)
1028
1060
  return {
1029
1061
  translated: ""
@@ -1040,15 +1072,15 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1040
1072
  const l = [], a = e.replace(
1041
1073
  /\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
1042
1074
  (i, o, s) => {
1043
- const m = !!o, { translated: d, meta: u } = n(s, m);
1075
+ const p = !!o, { translated: d, meta: u } = n(s, p);
1044
1076
  return u && l.push(u), d;
1045
1077
  }
1046
1078
  );
1047
1079
  return {
1048
- meta: l.length ? W(l) : null,
1080
+ meta: l.length ? j(l) : null,
1049
1081
  translated: (a != null ? a : "").trim()
1050
1082
  };
1051
- }, ue = {
1083
+ }, ge = {
1052
1084
  手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
1053
1085
  电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
1054
1086
  邮政编码: "^\\d{6}$",
@@ -1060,8 +1092,8 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1060
1092
  二维码图片: "qrcode",
1061
1093
  条形码图片: "barcode",
1062
1094
  自定义: "custom"
1063
- }, I = (e) => {
1064
- const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = ue[n] || "";
1095
+ }, L = (e) => {
1096
+ const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = ge[n] || "";
1065
1097
  return {
1066
1098
  widget: {
1067
1099
  widgetName: `_widget_${Date.now()}`,
@@ -1109,18 +1141,18 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1109
1141
  tab: null,
1110
1142
  ...l
1111
1143
  };
1112
- }, g = (e = "_widget", t) => {
1144
+ }, m = (e = "_widget", t) => {
1113
1145
  const n = `${e}_${Date.now()}`;
1114
1146
  if (t === void 0)
1115
1147
  return n;
1116
1148
  const r = t.toString().length;
1117
1149
  return `${n.slice(0, -r)}${t}`;
1118
- }, de = (e) => {
1150
+ }, fe = (e) => {
1119
1151
  const { widget: t, label: n, ...r } = e || {};
1120
1152
  return {
1121
1153
  widget: {
1122
1154
  type: "number",
1123
- widgetName: g(),
1155
+ widgetName: m(),
1124
1156
  widgetNameAlias: "",
1125
1157
  triggerEvent: !1,
1126
1158
  customCls: null,
@@ -1180,7 +1212,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1180
1212
  tab: null,
1181
1213
  ...r
1182
1214
  };
1183
- }, ce = (e) => {
1215
+ }, pe = (e) => {
1184
1216
  const { widget: t, label: n, ...r } = e || {};
1185
1217
  return {
1186
1218
  widget: {
@@ -1217,7 +1249,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1217
1249
  tab: null,
1218
1250
  ...r
1219
1251
  };
1220
- }, P = (e) => {
1252
+ }, W = (e) => {
1221
1253
  const { widget: t, label: n, ...r } = e || {};
1222
1254
  return {
1223
1255
  widget: {
@@ -1253,7 +1285,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1253
1285
  ...r,
1254
1286
  labelStyle: n
1255
1287
  };
1256
- }, ge = (e) => {
1288
+ }, be = (e) => {
1257
1289
  const { widget: t, label: n, ...r } = e || {};
1258
1290
  return {
1259
1291
  widget: {
@@ -1320,12 +1352,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1320
1352
  tab: null,
1321
1353
  ...r
1322
1354
  };
1323
- }, w = (e) => e, me = (e) => {
1355
+ }, S = (e) => e, ye = (e) => {
1324
1356
  const { widget: t, label: n, ...r } = e || {};
1325
1357
  return {
1326
1358
  widget: {
1327
1359
  type: "deptgroup",
1328
- widgetName: g(),
1360
+ widgetName: m(),
1329
1361
  widgetNameAlias: "",
1330
1362
  customCls: null,
1331
1363
  height: "34",
@@ -1354,12 +1386,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1354
1386
  tab: null,
1355
1387
  ...r
1356
1388
  };
1357
- }, fe = (e) => {
1389
+ }, he = (e) => {
1358
1390
  const { widget: t, label: n, ...r } = e || {};
1359
1391
  return {
1360
1392
  widget: {
1361
1393
  type: "sn",
1362
- widgetName: g(),
1394
+ widgetName: m(),
1363
1395
  widgetNameAlias: "",
1364
1396
  triggerEvent: 0,
1365
1397
  customCls: null,
@@ -1391,12 +1423,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1391
1423
  tab: null,
1392
1424
  ...r
1393
1425
  };
1394
- }, pe = (e) => {
1426
+ }, we = (e) => {
1395
1427
  const { widget: t, label: n, ...r } = e || {};
1396
1428
  return {
1397
1429
  widget: {
1398
1430
  type: "dept",
1399
- widgetName: g(),
1431
+ widgetName: m(),
1400
1432
  widgetNameAlias: "",
1401
1433
  customCls: null,
1402
1434
  height: "34",
@@ -1425,12 +1457,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1425
1457
  tab: null,
1426
1458
  ...r
1427
1459
  };
1428
- }, be = (e) => {
1460
+ }, Se = (e) => {
1429
1461
  const { widget: t, label: n, ...r } = e || {};
1430
1462
  return {
1431
1463
  widget: {
1432
1464
  type: "usergroup",
1433
- widgetName: g(),
1465
+ widgetName: m(),
1434
1466
  widgetNameAlias: "",
1435
1467
  customCls: null,
1436
1468
  height: "34",
@@ -1462,11 +1494,11 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1462
1494
  tab: null,
1463
1495
  ...r
1464
1496
  };
1465
- }, ye = (e) => {
1497
+ }, ve = (e) => {
1466
1498
  const { widget: t, label: n, ...r } = e || {};
1467
1499
  return {
1468
1500
  widget: {
1469
- widgetName: g(),
1501
+ widgetName: m(),
1470
1502
  widgetNameAlias: "",
1471
1503
  customCls: null,
1472
1504
  enable: !0,
@@ -1490,7 +1522,7 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1490
1522
  tab: null,
1491
1523
  ...r
1492
1524
  };
1493
- }, he = (e) => !e || !e.length ? e : e.map((t, n) => ({
1525
+ }, Ae = (e) => !e || !e.length ? e : e.map((t, n) => ({
1494
1526
  id: n,
1495
1527
  // name: "_widget_1761976674767",
1496
1528
  // form: "a2f34ef882158a3e97da4ef7",
@@ -1502,16 +1534,16 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1502
1534
  isEditable: !0,
1503
1535
  group: "dimension,filter,select",
1504
1536
  formula: ""
1505
- })), we = (e) => !e || !e.length ? e : e.map((t) => ({
1537
+ })), ke = (e) => !e || !e.length ? e : e.map((t) => ({
1506
1538
  mode: "depend",
1507
1539
  ...t
1508
- })), Se = (e) => {
1540
+ })), Ce = (e) => {
1509
1541
  var l, a, i;
1510
1542
  const { widget: t, label: n, ...r } = e || {};
1511
1543
  return {
1512
1544
  widget: {
1513
1545
  type: "dataload",
1514
- widgetName: g(),
1546
+ widgetName: m(),
1515
1547
  widgetNameAlias: "",
1516
1548
  customCls: null,
1517
1549
  width: 350,
@@ -1547,8 +1579,8 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1547
1579
  forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
1548
1580
  selectArg: [],
1549
1581
  selectRel: "and",
1550
- fields: he((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1551
- mapFields: we((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1582
+ fields: Ae((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1583
+ mapFields: ke((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1552
1584
  },
1553
1585
  labelStyle: n
1554
1586
  },
@@ -1557,12 +1589,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1557
1589
  tab: null,
1558
1590
  ...r
1559
1591
  };
1560
- }, ve = (e) => {
1592
+ }, Ne = (e) => {
1561
1593
  const { widget: t, label: n, ...r } = e || {};
1562
1594
  return {
1563
1595
  widget: {
1564
1596
  type: "user",
1565
- widgetName: g(),
1597
+ widgetName: m(),
1566
1598
  widgetNameAlias: "",
1567
1599
  customCls: null,
1568
1600
  height: "34",
@@ -1594,12 +1626,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1594
1626
  tab: null,
1595
1627
  ...r
1596
1628
  };
1597
- }, Ae = (e) => {
1629
+ }, _e = (e) => {
1598
1630
  const { widget: t, label: n, ...r } = e || {};
1599
1631
  return {
1600
1632
  widget: {
1601
1633
  type: "signature",
1602
- widgetName: g(),
1634
+ widgetName: m(),
1603
1635
  widgetNameAlias: "",
1604
1636
  customCls: null,
1605
1637
  height: 34,
@@ -1617,12 +1649,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1617
1649
  tab: null,
1618
1650
  ...r
1619
1651
  };
1620
- }, ke = (e) => {
1652
+ }, Ee = (e) => {
1621
1653
  const { widget: t, label: n, ...r } = e || {};
1622
1654
  return {
1623
1655
  widget: {
1624
1656
  type: "image",
1625
- widgetName: g(),
1657
+ widgetName: m(),
1626
1658
  widgetNameAlias: "",
1627
1659
  customCls: null,
1628
1660
  height: 100,
@@ -1689,12 +1721,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1689
1721
  tab: null,
1690
1722
  ...r
1691
1723
  };
1692
- }, Ne = (e) => {
1724
+ }, xe = (e) => {
1693
1725
  const { widget: t, label: n, ...r } = e || {};
1694
1726
  return {
1695
1727
  widget: {
1696
1728
  type: "upload",
1697
- widgetName: g(),
1729
+ widgetName: m(),
1698
1730
  widgetNameAlias: "",
1699
1731
  customCls: null,
1700
1732
  enable: !0,
@@ -1724,12 +1756,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1724
1756
  tab: null,
1725
1757
  ...r
1726
1758
  };
1727
- }, Ce = (e) => {
1759
+ }, Me = (e) => {
1728
1760
  const { widget: t, label: n, ...r } = e || {};
1729
1761
  return {
1730
1762
  widget: {
1731
1763
  type: "checkboxgroup",
1732
- widgetName: g(),
1764
+ widgetName: m(),
1733
1765
  widgetNameAlias: "",
1734
1766
  customCls: null,
1735
1767
  enable: !0,
@@ -1758,12 +1790,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1758
1790
  tab: null,
1759
1791
  ...r
1760
1792
  };
1761
- }, _e = (e) => {
1793
+ }, qe = (e) => {
1762
1794
  const { widget: t, label: n, ...r } = e || {};
1763
1795
  return {
1764
1796
  widget: {
1765
1797
  type: "separator",
1766
- widgetName: g(),
1798
+ widgetName: m(),
1767
1799
  widgetNameAlias: "",
1768
1800
  customCls: null,
1769
1801
  enable: !0,
@@ -1777,12 +1809,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1777
1809
  tab: null,
1778
1810
  ...r
1779
1811
  };
1780
- }, Ee = (e) => {
1812
+ }, Fe = (e) => {
1781
1813
  const { widget: t, label: n, ...r } = e || {};
1782
1814
  return {
1783
1815
  widget: {
1784
1816
  type: "combocheck",
1785
- widgetName: g(),
1817
+ widgetName: m(),
1786
1818
  widgetNameAlias: "",
1787
1819
  customCls: null,
1788
1820
  height: 34,
@@ -1814,12 +1846,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1814
1846
  tab: null,
1815
1847
  ...r
1816
1848
  };
1817
- }, xe = (e) => {
1849
+ }, Re = (e) => {
1818
1850
  const { widget: t, label: n, ...r } = e || {};
1819
1851
  return {
1820
1852
  widget: {
1821
1853
  type: "location",
1822
- widgetName: g(),
1854
+ widgetName: m(),
1823
1855
  widgetNameAlias: "",
1824
1856
  customCls: null,
1825
1857
  enable: !0,
@@ -1851,12 +1883,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1851
1883
  tab: null,
1852
1884
  ...r
1853
1885
  };
1854
- }, Me = (e) => {
1886
+ }, Te = (e) => {
1855
1887
  const { widget: t, label: n, ...r } = e || {};
1856
1888
  return {
1857
1889
  widget: {
1858
1890
  type: "textarea",
1859
- widgetName: g(),
1891
+ widgetName: m(),
1860
1892
  widgetNameAlias: "",
1861
1893
  triggerEvent: !1,
1862
1894
  customCls: null,
@@ -1894,12 +1926,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1894
1926
  tab: null,
1895
1927
  ...r
1896
1928
  };
1897
- }, qe = (e = {}) => {
1929
+ }, De = (e = {}) => {
1898
1930
  const { widget: t, label: n, ...r } = e;
1899
1931
  return {
1900
1932
  widget: {
1901
1933
  type: "button",
1902
- widgetName: g(),
1934
+ widgetName: m(),
1903
1935
  widgetNameAlias: "",
1904
1936
  triggerEvent: 0,
1905
1937
  customCls: null,
@@ -1938,12 +1970,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1938
1970
  tab: null,
1939
1971
  ...r
1940
1972
  };
1941
- }, Fe = (e = {}) => {
1973
+ }, $e = (e = {}) => {
1942
1974
  const { widget: t, label: n, ...r } = e;
1943
1975
  return {
1944
1976
  widget: {
1945
1977
  type: "address",
1946
- widgetName: g(),
1978
+ widgetName: m(),
1947
1979
  widgetNameAlias: "",
1948
1980
  customCls: null,
1949
1981
  width: 720,
@@ -1972,12 +2004,12 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1972
2004
  tab: null,
1973
2005
  ...r
1974
2006
  };
1975
- }, Re = (e = {}) => {
2007
+ }, Oe = (e = {}) => {
1976
2008
  const { widget: t, label: n, ...r } = e;
1977
2009
  return {
1978
2010
  widget: {
1979
2011
  type: "subform",
1980
- widgetName: g(),
2012
+ widgetName: m(),
1981
2013
  widgetNameAlias: "",
1982
2014
  customCls: null,
1983
2015
  enable: !0,
@@ -1992,8 +2024,8 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1992
2024
  version: 1
1993
2025
  },
1994
2026
  items: (t.items || []).map((l, a) => {
1995
- const i = $e(l, !0);
1996
- return i.widget.widgetName = g("_widget", a), i;
2027
+ const i = Le(l, !0);
2028
+ return i.widget.widgetName = m("_widget", a), i;
1997
2029
  }),
1998
2030
  sortable: !0,
1999
2031
  //启用子表单数据排序
@@ -2055,11 +2087,11 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2055
2087
  lineWidth: 12,
2056
2088
  tab: null
2057
2089
  };
2058
- }, De = (e) => {
2090
+ }, Pe = (e) => {
2059
2091
  const { widget: t, label: n, ...r } = e || {};
2060
2092
  return {
2061
2093
  widget: {
2062
- widgetName: g(),
2094
+ widgetName: m(),
2063
2095
  widgetNameAlias: "",
2064
2096
  customCls: null,
2065
2097
  enable: !0,
@@ -2089,47 +2121,47 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2089
2121
  tab: null,
2090
2122
  ...r
2091
2123
  };
2092
- }, Te = {
2093
- address: Fe,
2094
- button: qe,
2095
- textarea: Me,
2096
- datetime: ge,
2097
- text: I,
2098
- password: I,
2099
- location: xe,
2100
- radiogroup: P,
2101
- radio: P,
2102
- combo: ce,
2103
- combocheck: Ee,
2104
- separator: _e,
2105
- checkboxgroup: Ce,
2106
- upload: Ne,
2107
- number: de,
2108
- image: ke,
2109
- signature: Ae,
2110
- user: ve,
2111
- dataload: Se,
2112
- linkdata: ye,
2113
- linkquery: De,
2114
- usergroup: be,
2115
- subform: Re,
2116
- dept: pe,
2117
- sn: fe,
2118
- deptgroup: me,
2119
- flowState: w,
2120
- flowstate: w,
2121
- formula: w,
2122
- unknown: w
2123
- }, $e = (e, t = !1) => {
2124
+ }, Ie = {
2125
+ address: $e,
2126
+ button: De,
2127
+ textarea: Te,
2128
+ datetime: be,
2129
+ text: L,
2130
+ password: L,
2131
+ location: Re,
2132
+ radiogroup: W,
2133
+ radio: W,
2134
+ combo: pe,
2135
+ combocheck: Fe,
2136
+ separator: qe,
2137
+ checkboxgroup: Me,
2138
+ upload: xe,
2139
+ number: fe,
2140
+ image: Ee,
2141
+ signature: _e,
2142
+ user: Ne,
2143
+ dataload: Ce,
2144
+ linkdata: ve,
2145
+ linkquery: Pe,
2146
+ usergroup: Se,
2147
+ subform: Oe,
2148
+ dept: we,
2149
+ sn: he,
2150
+ deptgroup: ye,
2151
+ flowState: S,
2152
+ flowstate: S,
2153
+ formula: S,
2154
+ unknown: S
2155
+ }, Le = (e, t = !1) => {
2124
2156
  var a, i;
2125
2157
  if (!e || !e.widget || !e.widget.type)
2126
2158
  return e;
2127
2159
  const n = e.widget.type || "unknown";
2128
- return t && n === "subform" ? w(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = X()), (Te[n] || w)(e));
2129
- }, yt = (e) => {
2160
+ return t && n === "subform" ? S(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = J()), (Ie[n] || S)(e));
2161
+ }, vt = (e) => {
2130
2162
  var t, n, r, l, a, i, o, s;
2131
2163
  return !e || !((t = e.corp) != null && t.name) || !((n = e.user) != null && n.nickname) ? "" : `${(r = e.corp) == null ? void 0 : r.name} ${(l = e.user) == null ? void 0 : l.nickname}(${(a = e.user) == null ? void 0 : a.username}) ${(i = e.appName) != null ? i : ""} ${(o = e.entryName) != null ? o : ""} ${(s = e.agentName) != null ? s : ""}`;
2132
- }, ht = (e) => {
2164
+ }, At = (e) => {
2133
2165
  var n;
2134
2166
  if (!e)
2135
2167
  return "";
@@ -2149,52 +2181,52 @@ const pt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2149
2181
  }
2150
2182
  };
2151
2183
  export {
2152
- nt as DATA_COUNT_PER_BATCH,
2153
- J as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
2154
- ee as FIELD_TYPE_OPERATOR_MAP,
2155
- pt as FORM_ICON_UNICODE_MAP,
2156
- je as GetLoadingMsg,
2157
- Ue as GetPartErrMsg,
2158
- Le as GetQueryResult,
2159
- Ke as GetSafeFormStructure,
2160
- se as ICON_UNICODE_MAP,
2161
- j as IsErrorPart,
2162
- Oe as IsFakeMsgPart,
2163
- We as IsFileGroupPart,
2164
- Ie as IsFilePart,
2165
- Be as IsLoadingPart,
2166
- Pe as IsQueryResultPart,
2167
- Z as OPERATOR_LABEL_MAP,
2168
- K as WHITE_LIST_FIELDS_SET,
2169
- ct as bsConditionParse2Condition,
2170
- dt as conditionStringify2bsCondition,
2171
- Ze as createFieldPartsExtractor,
2172
- Xe as createGetFieldJsonInfo,
2184
+ it as DATA_COUNT_PER_BATCH,
2185
+ te as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
2186
+ ne as FIELD_TYPE_OPERATOR_MAP,
2187
+ wt as FORM_ICON_UNICODE_MAP,
2188
+ ze as GetLoadingMsg,
2189
+ Qe as GetPartErrMsg,
2190
+ Ue as GetQueryResult,
2191
+ Je as GetSafeFormStructure,
2192
+ me as ICON_UNICODE_MAP,
2193
+ H as IsErrorPart,
2194
+ We as IsFakeMsgPart,
2195
+ He as IsFileGroupPart,
2196
+ Be as IsFilePart,
2197
+ Ge as IsLoadingPart,
2198
+ je as IsQueryResultPart,
2199
+ ee as OPERATOR_LABEL_MAP,
2200
+ Z as WHITE_LIST_FIELDS_SET,
2201
+ pt as bsConditionParse2Condition,
2202
+ ft as conditionStringify2bsCondition,
2203
+ nt as createFieldPartsExtractor,
2204
+ tt as createGetFieldJsonInfo,
2173
2205
  V as createPartTypeChecker,
2174
- Ve as createPayloadTypeChecker,
2206
+ et as createPayloadTypeChecker,
2175
2207
  y as extractTextPartMeta,
2176
- tt as field2config,
2177
- W as flatArr,
2178
- gt as formatLocalDate,
2179
- lt as getAvailableOperators,
2180
- yt as getChatCtxForHuman,
2181
- ht as getChatCtxForMcp,
2182
- it as getDefaultOperator,
2183
- ft as getIconUnicode,
2184
- He as getMetaErrorMsg,
2185
- at as getOperatorLabel,
2186
- et as hasValidFieldValue,
2187
- rt as imageUrlToBase64,
2188
- Qe as injectHostFontFacesIntoShadow,
2189
- Ge as injectHostStylesIntoShadow,
2190
- ut as isCtxMatch,
2191
- st as isHelperCondMet,
2192
- ot as isHelperPrefMet,
2193
- mt as mergeConsecutiveTargets,
2194
- bt as promptParser,
2195
- $e as rebuildFieldsJsonStructure,
2196
- Je as safeParseJson,
2197
- ze as syncHostStylesIntoShadow,
2198
- Ye as valueNormalizer
2208
+ lt as field2config,
2209
+ j as flatArr,
2210
+ bt as formatLocalDate,
2211
+ ut as getAvailableOperators,
2212
+ vt as getChatCtxForHuman,
2213
+ At as getChatCtxForMcp,
2214
+ dt as getDefaultOperator,
2215
+ ht as getIconUnicode,
2216
+ Ye as getMetaErrorMsg,
2217
+ st as getOperatorLabel,
2218
+ at as hasValidFieldValue,
2219
+ ot as imageUrlToBase64,
2220
+ Ze as injectHostFontFacesIntoShadow,
2221
+ Ke as injectHostStylesIntoShadow,
2222
+ gt as isCtxMatch,
2223
+ mt as isHelperCondMet,
2224
+ ct as isHelperPrefMet,
2225
+ yt as mergeConsecutiveTargets,
2226
+ St as promptParser,
2227
+ Le as rebuildFieldsJsonStructure,
2228
+ rt as safeParseJson,
2229
+ Xe as syncHostStylesIntoShadow,
2230
+ Ve as valueNormalizer
2199
2231
  };
2200
2232
  //# sourceMappingURL=ai-feat-utils.js.map