@baishuyun/ai-feat-utils 2.0.27 → 2.0.29

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.
@@ -1,4 +1,4 @@
1
- const d = (e) => {
1
+ const u = (e) => {
2
2
  if ((e == null ? void 0 : e.type) !== "text" || !e.providerMetadata || !e.providerMetadata.raw || !e.providerMetadata.raw.data)
3
3
  return null;
4
4
  if (typeof e.providerMetadata.raw.data != "string")
@@ -10,19 +10,19 @@ const d = (e) => {
10
10
  console.error("invalid raw data");
11
11
  }
12
12
  return t || e.providerMetadata.raw.data;
13
- }, k = (e) => {
13
+ }, C = (e) => {
14
14
  if ((e == null ? void 0 : e.type) === "error")
15
15
  return !0;
16
- const t = d(e);
16
+ const t = u(e);
17
17
  return (t == null ? void 0 : t.type) === "agent-error";
18
- }, ce = (e) => {
19
- const t = d(e);
18
+ }, ge = (e) => {
19
+ const t = u(e);
20
20
  return (t == null ? void 0 : t.type) === "agent-fake-msg";
21
- }, ge = (e) => (e == null ? void 0 : e.type) === "file", me = (e) => {
22
- const t = d(e);
21
+ }, me = (e) => (e == null ? void 0 : e.type) === "file", pe = (e) => {
22
+ const t = u(e);
23
23
  return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
24
- }, pe = (e) => {
25
- const t = d(e);
24
+ }, fe = (e) => {
25
+ const t = u(e);
26
26
  if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
27
27
  return null;
28
28
  const r = t.result;
@@ -32,30 +32,30 @@ const d = (e) => {
32
32
  } catch (n) {
33
33
  return console.error("invalid query result data"), null;
34
34
  }
35
- }, fe = (e) => {
35
+ }, be = (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) => {
43
- const t = d(e);
44
- return (t == null ? void 0 : t.type) === "agent-loading";
45
42
  }, we = (e) => {
46
- const t = d(e);
47
- return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
43
+ const t = u(e);
44
+ return (t == null ? void 0 : t.type) === "agent-loading";
48
45
  }, ye = (e) => {
49
- if (!k(e))
46
+ const t = u(e);
47
+ return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
48
+ }, he = (e) => {
49
+ if (!C(e))
50
50
  return "";
51
51
  if (e != null && e.errorText)
52
52
  return e.errorText;
53
- const t = d(e);
53
+ const t = u(e);
54
54
  return (t == null ? void 0 : t.error) || "未知错误";
55
- }, he = (e) => {
55
+ }, ve = (e) => {
56
56
  if (e != null && e.errorText)
57
57
  return e.errorText;
58
- const t = d(e);
58
+ const t = u(e);
59
59
  return (t == null ? void 0 : t.error) || "未知错误";
60
60
  }, b = "data-shadow-slot-injected", Se = (e, t) => {
61
61
  if (e.querySelector(`[${b}]`)) return;
@@ -68,15 +68,15 @@ const d = (e) => {
68
68
  for (; n; )
69
69
  n instanceof ShadowRoot && (n.querySelectorAll("style").forEach(r), n.querySelectorAll('link[rel="stylesheet"]').forEach(r)), n = n.parentNode;
70
70
  };
71
- function C(e) {
71
+ function N(e) {
72
72
  return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
73
73
  }
74
- function N(e) {
74
+ function M(e) {
75
75
  return Array.isArray(e) ? e.every(
76
76
  (t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
77
77
  ) : !1;
78
78
  }
79
- const ve = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ") : e, M = /* @__PURE__ */ new Set([
79
+ const Ae = (e) => N(e) ? e.join(", ") : M(e) ? e.map((r) => r.value).join(", ") : e, q = /* @__PURE__ */ new Set([
80
80
  "password",
81
81
  "textarea",
82
82
  "datetime",
@@ -87,25 +87,31 @@ const ve = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ")
87
87
  "combocheck",
88
88
  "checkboxgroup",
89
89
  "number"
90
- ]), Ae = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? M.has(t.widget.type) : !1) : [], x = (e) => (t) => {
91
- const r = d(t);
90
+ ]), _e = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? q.has(t.widget.type) : !1) : [], x = (e) => (t) => {
91
+ const r = u(t);
92
92
  return (r == null ? void 0 : r.type) === e;
93
- }, _e = (e) => (t) => {
93
+ }, ke = (e) => (t) => {
94
94
  const r = t, n = r == null ? void 0 : r.part;
95
95
  return x(e)(n);
96
- }, ke = (e) => (t) => {
97
- const r = d(t);
96
+ }, Ce = (e) => (t) => {
97
+ const r = u(t);
98
98
  return (r == null ? void 0 : r.type) !== e ? null : (r == null ? void 0 : r.field) || null;
99
- }, Ce = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Ne = (e) => {
99
+ }, Ne = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Me = (e) => {
100
+ if (typeof e != "string")
101
+ return e;
100
102
  try {
101
103
  return JSON.parse(e);
102
104
  } catch (t) {
103
105
  return console.info("[safeParseJson] Failed to parse JSON:", t), null;
104
106
  }
105
- }, q = (e = "_widget_") => {
107
+ }, w = (e) => !!(e && typeof e == "object" && e.qnKey), qe = (e) => {
108
+ var n, a;
109
+ const t = (n = e == null ? void 0 : e.widget) == null ? void 0 : n.value, r = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.type;
110
+ 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 : r === "signature" ? w(t) : r === "upload" || r === "image" ? Array.isArray(t) && t.length > 0 && t.every(w) : !0;
111
+ }, F = (e = "_widget_") => {
106
112
  const t = Date.now(), r = String(t), n = r.length, a = r.slice(0, n - 5), l = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
107
113
  return `${e}${a}${l}`;
108
- }, Me = (e, t) => ({
114
+ }, xe = (e, t) => ({
109
115
  field: e,
110
116
  onLoaded: () => {
111
117
  t.fillWidget({
@@ -122,13 +128,13 @@ const ve = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ")
122
128
  };
123
129
  t.fillWidget(i);
124
130
  }
125
- }), xe = 10, qe = (e, t = "image/png") => new Promise((r) => {
131
+ }), Fe = 10, Ee = (e, t = "image/png") => new Promise((r) => {
126
132
  const n = new Image();
127
133
  n.crossOrigin = "anonymous", n.onload = () => {
128
134
  const a = document.createElement("canvas");
129
135
  a.width = n.naturalWidth, a.height = n.naturalHeight, a.getContext("2d").drawImage(n, 0, 0), r(a.toDataURL(t));
130
136
  }, n.onerror = () => r(e), n.src = e;
131
- }), Fe = {
137
+ }), De = {
132
138
  eq: "等于",
133
139
  neq: "不等于",
134
140
  gt: "大于",
@@ -143,7 +149,7 @@ const ve = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ")
143
149
  empty: "为空",
144
150
  not_empty: "不为空",
145
151
  range: "范围"
146
- }, F = {
152
+ }, E = {
147
153
  // Text-like: equality, fuzzy, empty checks
148
154
  text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
149
155
  password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
@@ -187,7 +193,7 @@ const ve = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ")
187
193
  button: [],
188
194
  subform: [],
189
195
  unknown: []
190
- }, E = {
196
+ }, D = {
191
197
  text: "eq",
192
198
  password: "eq",
193
199
  radiogroup: "eq",
@@ -215,24 +221,24 @@ const ve = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ")
215
221
  dataload: "eq",
216
222
  formula: "eq"
217
223
  };
218
- function Ee(e) {
224
+ function Re(e) {
219
225
  var t;
220
- return e ? (t = F[e]) != null ? t : [] : [];
226
+ return e ? (t = E[e]) != null ? t : [] : [];
221
227
  }
222
- function De(e) {
228
+ function Pe(e) {
223
229
  var t;
224
- return e && (t = E[e]) != null ? t : "eq";
230
+ return e && (t = D[e]) != null ? t : "eq";
225
231
  }
226
232
  function m(e) {
227
233
  return typeof e == "object" && e !== null && !Array.isArray(e);
228
234
  }
229
- function A(e) {
235
+ function _(e) {
230
236
  return m(e) ? e : null;
231
237
  }
232
- function w(e) {
238
+ function y(e) {
233
239
  return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
234
240
  }
235
- function y(e, t) {
241
+ function h(e, t) {
236
242
  if (Array.isArray(e) && Array.isArray(t)) {
237
243
  if (e.length !== t.length) return !1;
238
244
  const r = e.map(String).sort(), n = t.map(String).sort();
@@ -244,40 +250,40 @@ function y(e, t) {
244
250
  }
245
251
  return String(e) === String(t);
246
252
  }
247
- function h(e, t) {
253
+ function v(e, t) {
248
254
  if (m(t)) {
249
- const n = A(e);
255
+ const n = _(e);
250
256
  return !(!n || t.province !== void 0 && String(n.province) !== String(t.province) || t.city !== void 0 && String(n.city) !== String(t.city) || t.district !== void 0 && String(n.district) !== String(t.district));
251
257
  }
252
258
  const r = Array.isArray(t) ? t.map(String) : [];
253
259
  return Array.isArray(e) ? e.some((n) => r.includes(String(n))) : r.includes(String(e));
254
260
  }
255
- function D(e, t) {
261
+ function R(e, t) {
256
262
  const r = Array.isArray(t) ? t.map(String) : [];
257
263
  if (r.length === 0) return !1;
258
264
  const n = Array.isArray(e) ? e.map(String) : [];
259
265
  return r.every((a) => n.includes(a));
260
266
  }
261
267
  function P(e, t) {
262
- const r = A(t);
268
+ const r = _(t);
263
269
  if (!r) return !1;
264
270
  const n = Number(e);
265
271
  return !(isNaN(n) || r.min !== void 0 && r.min !== null && n < Number(r.min) || r.max !== void 0 && r.max !== null && n > Number(r.max));
266
272
  }
267
- function R(e, t) {
273
+ function W(e, t) {
268
274
  var i;
269
275
  const r = (i = e.field.widget) == null ? void 0 : i.widgetName;
270
276
  if (!r) return !1;
271
277
  const n = t[r], { operator: a, value: l } = e;
272
278
  switch (a) {
273
279
  case "empty":
274
- return w(n);
280
+ return y(n);
275
281
  case "not_empty":
276
- return !w(n);
282
+ return !y(n);
277
283
  case "eq":
278
- return y(n, l);
284
+ return h(n, l);
279
285
  case "neq":
280
- return !y(n, l);
286
+ return !h(n, l);
281
287
  case "contains":
282
288
  return String(n).includes(String(l));
283
289
  case "not_contains":
@@ -291,28 +297,28 @@ function R(e, t) {
291
297
  case "lte":
292
298
  return Number(n) <= Number(l);
293
299
  case "in":
294
- return h(n, l);
300
+ return v(n, l);
295
301
  case "nin":
296
- return !h(n, l);
302
+ return !v(n, l);
297
303
  case "all":
298
- return D(n, l);
304
+ return R(n, l);
299
305
  case "range":
300
306
  return P(n, l);
301
307
  default:
302
308
  return !1;
303
309
  }
304
310
  }
305
- function Pe(e, t) {
311
+ function We(e, t) {
306
312
  if (!e.enabled)
307
313
  return !1;
308
314
  const r = e.triggerCondition;
309
315
  if (!r) return !0;
310
316
  const { items: n, quantifier: a } = r;
311
317
  if (!n || n.length === 0) return !0;
312
- const l = n.map((i) => R(i, t));
318
+ const l = n.map((i) => W(i, t));
313
319
  return a === "any" ? l.some((i) => i) : l.every((i) => i);
314
320
  }
315
- const Re = (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", W = {
321
+ const Be = (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", B = {
316
322
  eq: "eq",
317
323
  neq: "ne",
318
324
  gt: "gt",
@@ -343,13 +349,13 @@ const Re = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
343
349
  not_empty: "not_empty",
344
350
  range: "range"
345
351
  };
346
- function We(e) {
352
+ function Te(e) {
347
353
  const t = e.quantifier === "any" ? "or" : "and", r = e.items.map((n) => {
348
- var i, s, u, c, p, f;
349
- const a = (i = W[n.operator]) != null ? i : "eq";
354
+ var i, s, d, c, p, f;
355
+ const a = (i = B[n.operator]) != null ? i : "eq";
350
356
  let l;
351
357
  return n.operator === "range" && m(n.value) ? l = [n.value.min, n.value.max] : Array.isArray(n.value) ? l = n.value : l = [n.value], {
352
- field: (c = (u = (s = n.field) == null ? void 0 : s.widget) == null ? void 0 : u.widgetName) != null ? c : "",
358
+ field: (c = (d = (s = n.field) == null ? void 0 : s.widget) == null ? void 0 : d.widgetName) != null ? c : "",
353
359
  method: a,
354
360
  value: l,
355
361
  type: (f = (p = n.field) == null ? void 0 : p.widget) == null ? void 0 : f.type
@@ -357,10 +363,10 @@ function We(e) {
357
363
  });
358
364
  return JSON.stringify({ rel: t, cond: r });
359
365
  }
360
- function Te(e) {
366
+ function Oe(e) {
361
367
  const t = JSON.parse(e), r = t.rel === "or" ? "any" : "all", n = t.cond.map((a, l) => {
362
- var u, c;
363
- const i = (u = T[a.method]) != null ? u : "eq";
368
+ var d, c;
369
+ const i = (d = T[a.method]) != null ? d : "eq";
364
370
  let s = a.value;
365
371
  return i === "range" ? s = { min: a.value[0], max: a.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (s = a.value[0]), {
366
372
  id: `${a.field}_${l}`,
@@ -378,23 +384,23 @@ function Te(e) {
378
384
  });
379
385
  return { targetName: "", quantifier: r, items: n };
380
386
  }
381
- function Be(e) {
387
+ function $e(e) {
382
388
  const t = (r) => String(r).padStart(2, "0");
383
389
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
384
390
  }
385
- function Oe(e, t, r = 1) {
391
+ function Ie(e, t, r = 1) {
386
392
  const n = [], a = [];
387
393
  for (const l of e)
388
394
  t(l) ? a.push(l) : (a.length > 0 && (n.push(a.length >= r ? [...a] : a[0]), a.length = 0), n.push(l));
389
395
  return a.length > 0 && n.push(a.length >= 2 ? [...a] : a[0]), n;
390
396
  }
391
- function _(e) {
397
+ function k(e) {
392
398
  const t = [];
393
399
  for (const r of e)
394
- Array.isArray(r) ? t.push(..._(r)) : t.push(r);
400
+ Array.isArray(r) ? t.push(...k(r)) : t.push(r);
395
401
  return t;
396
402
  }
397
- const B = {
403
+ const O = {
398
404
  projectdevelopment: "e914",
399
405
  resourcelibrary: "e915",
400
406
  Plugin2: "e90e",
@@ -788,11 +794,11 @@ const B = {
788
794
  Automation1: "ea95",
789
795
  Avatar: "ea96"
790
796
  };
791
- function $e(e) {
792
- const t = B[e];
797
+ function Le(e) {
798
+ const t = O[e];
793
799
  return t ? `&#x${t};` : void 0;
794
800
  }
795
- const Ie = (e, t, r) => {
801
+ const Ge = (e, t, r) => {
796
802
  if (!r)
797
803
  return {
798
804
  translated: ""
@@ -802,22 +808,22 @@ const Ie = (e, t, r) => {
802
808
  if (i.widget.type === "subform" && i.widget.items) {
803
809
  for (const s of i.widget.items)
804
810
  if ("widget" in s && !("options" in s)) {
805
- const u = `${i.widget.widgetName}.${s.widget.widgetName}`;
806
- n.set(u, s.label);
811
+ const d = `${i.widget.widgetName}.${s.widget.widgetName}`;
812
+ n.set(d, s.label);
807
813
  }
808
814
  }
809
815
  const a = [], l = e.replace(
810
816
  /\$\{(_widget_\d+(?:\._widget_\d+)?)\}/g,
811
817
  (i, s) => {
812
- const { translated: u, meta: c } = r(s);
813
- return c && a.push(c), u;
818
+ const { translated: d, meta: c } = r(s);
819
+ return c && a.push(c), d;
814
820
  }
815
821
  );
816
822
  return {
817
- meta: a.length ? _(a) : null,
823
+ meta: a.length ? k(a) : null,
818
824
  translated: (l != null ? l : "").trim()
819
825
  };
820
- }, O = {
826
+ }, $ = {
821
827
  手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
822
828
  电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
823
829
  邮政编码: "^\\d{6}$",
@@ -830,7 +836,7 @@ const Ie = (e, t, r) => {
830
836
  条形码图片: "barcode",
831
837
  自定义: "custom"
832
838
  }, S = (e) => {
833
- const { widget: t, labelStyle: r, label: n, ...a } = e || {}, l = O[r] || "";
839
+ const { widget: t, labelStyle: r, label: n, ...a } = e || {}, l = $[r] || "";
834
840
  return {
835
841
  widget: {
836
842
  widgetName: `_widget_${Date.now()}`,
@@ -884,7 +890,7 @@ const Ie = (e, t, r) => {
884
890
  return r;
885
891
  const n = t.toString().length;
886
892
  return `${r.slice(0, -n)}${t}`;
887
- }, $ = (e) => {
893
+ }, I = (e) => {
888
894
  const { widget: t, label: r, ...n } = e || {};
889
895
  return {
890
896
  widget: {
@@ -949,7 +955,7 @@ const Ie = (e, t, r) => {
949
955
  tab: null,
950
956
  ...n
951
957
  };
952
- }, I = (e) => {
958
+ }, L = (e) => {
953
959
  const { widget: t, label: r, ...n } = e || {};
954
960
  return {
955
961
  widget: {
@@ -986,7 +992,7 @@ const Ie = (e, t, r) => {
986
992
  tab: null,
987
993
  ...n
988
994
  };
989
- }, v = (e) => {
995
+ }, A = (e) => {
990
996
  const { widget: t, label: r, ...n } = e || {};
991
997
  return {
992
998
  widget: {
@@ -1022,7 +1028,7 @@ const Ie = (e, t, r) => {
1022
1028
  ...n,
1023
1029
  labelStyle: r
1024
1030
  };
1025
- }, L = (e) => {
1031
+ }, G = (e) => {
1026
1032
  const { widget: t, label: r, ...n } = e || {};
1027
1033
  return {
1028
1034
  widget: {
@@ -1089,7 +1095,7 @@ const Ie = (e, t, r) => {
1089
1095
  tab: null,
1090
1096
  ...n
1091
1097
  };
1092
- }, g = (e) => e, G = (e) => {
1098
+ }, g = (e) => e, U = (e) => {
1093
1099
  const { widget: t, label: r, ...n } = e || {};
1094
1100
  return {
1095
1101
  widget: {
@@ -1123,7 +1129,7 @@ const Ie = (e, t, r) => {
1123
1129
  tab: null,
1124
1130
  ...n
1125
1131
  };
1126
- }, U = (e) => {
1132
+ }, j = (e) => {
1127
1133
  const { widget: t, label: r, ...n } = e || {};
1128
1134
  return {
1129
1135
  widget: {
@@ -1160,7 +1166,7 @@ const Ie = (e, t, r) => {
1160
1166
  tab: null,
1161
1167
  ...n
1162
1168
  };
1163
- }, j = (e) => {
1169
+ }, H = (e) => {
1164
1170
  const { widget: t, label: r, ...n } = e || {};
1165
1171
  return {
1166
1172
  widget: {
@@ -1194,7 +1200,7 @@ const Ie = (e, t, r) => {
1194
1200
  tab: null,
1195
1201
  ...n
1196
1202
  };
1197
- }, H = (e) => {
1203
+ }, Q = (e) => {
1198
1204
  const { widget: t, label: r, ...n } = e || {};
1199
1205
  return {
1200
1206
  widget: {
@@ -1231,7 +1237,7 @@ const Ie = (e, t, r) => {
1231
1237
  tab: null,
1232
1238
  ...n
1233
1239
  };
1234
- }, Q = (e) => {
1240
+ }, z = (e) => {
1235
1241
  const { widget: t, label: r, ...n } = e || {};
1236
1242
  return {
1237
1243
  widget: {
@@ -1259,7 +1265,7 @@ const Ie = (e, t, r) => {
1259
1265
  tab: null,
1260
1266
  ...n
1261
1267
  };
1262
- }, z = (e) => !e || !e.length ? e : e.map((t, r) => ({
1268
+ }, Z = (e) => !e || !e.length ? e : e.map((t, r) => ({
1263
1269
  id: r,
1264
1270
  // name: "_widget_1761976674767",
1265
1271
  // form: "a2f34ef882158a3e97da4ef7",
@@ -1271,10 +1277,10 @@ const Ie = (e, t, r) => {
1271
1277
  isEditable: !0,
1272
1278
  group: "dimension,filter,select",
1273
1279
  formula: ""
1274
- })), Z = (e) => !e || !e.length ? e : e.map((t) => ({
1280
+ })), X = (e) => !e || !e.length ? e : e.map((t) => ({
1275
1281
  mode: "depend",
1276
1282
  ...t
1277
- })), X = (e) => {
1283
+ })), Y = (e) => {
1278
1284
  var a, l, i;
1279
1285
  const { widget: t, label: r, ...n } = e || {};
1280
1286
  return {
@@ -1316,8 +1322,8 @@ const Ie = (e, t, r) => {
1316
1322
  forms: (a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.forms,
1317
1323
  selectArg: [],
1318
1324
  selectRel: "and",
1319
- fields: z((l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.mapFields),
1320
- mapFields: Z((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1325
+ fields: Z((l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.mapFields),
1326
+ mapFields: X((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1321
1327
  },
1322
1328
  labelStyle: r
1323
1329
  },
@@ -1326,7 +1332,7 @@ const Ie = (e, t, r) => {
1326
1332
  tab: null,
1327
1333
  ...n
1328
1334
  };
1329
- }, Y = (e) => {
1335
+ }, K = (e) => {
1330
1336
  const { widget: t, label: r, ...n } = e || {};
1331
1337
  return {
1332
1338
  widget: {
@@ -1363,7 +1369,7 @@ const Ie = (e, t, r) => {
1363
1369
  tab: null,
1364
1370
  ...n
1365
1371
  };
1366
- }, K = (e) => {
1372
+ }, V = (e) => {
1367
1373
  const { widget: t, label: r, ...n } = e || {};
1368
1374
  return {
1369
1375
  widget: {
@@ -1386,7 +1392,7 @@ const Ie = (e, t, r) => {
1386
1392
  tab: null,
1387
1393
  ...n
1388
1394
  };
1389
- }, V = (e) => {
1395
+ }, J = (e) => {
1390
1396
  const { widget: t, label: r, ...n } = e || {};
1391
1397
  return {
1392
1398
  widget: {
@@ -1458,7 +1464,7 @@ const Ie = (e, t, r) => {
1458
1464
  tab: null,
1459
1465
  ...n
1460
1466
  };
1461
- }, J = (e) => {
1467
+ }, ee = (e) => {
1462
1468
  const { widget: t, label: r, ...n } = e || {};
1463
1469
  return {
1464
1470
  widget: {
@@ -1493,7 +1499,7 @@ const Ie = (e, t, r) => {
1493
1499
  tab: null,
1494
1500
  ...n
1495
1501
  };
1496
- }, ee = (e) => {
1502
+ }, te = (e) => {
1497
1503
  const { widget: t, label: r, ...n } = e || {};
1498
1504
  return {
1499
1505
  widget: {
@@ -1527,7 +1533,7 @@ const Ie = (e, t, r) => {
1527
1533
  tab: null,
1528
1534
  ...n
1529
1535
  };
1530
- }, te = (e) => {
1536
+ }, re = (e) => {
1531
1537
  const { widget: t, label: r, ...n } = e || {};
1532
1538
  return {
1533
1539
  widget: {
@@ -1546,7 +1552,7 @@ const Ie = (e, t, r) => {
1546
1552
  tab: null,
1547
1553
  ...n
1548
1554
  };
1549
- }, re = (e) => {
1555
+ }, ne = (e) => {
1550
1556
  const { widget: t, label: r, ...n } = e || {};
1551
1557
  return {
1552
1558
  widget: {
@@ -1583,7 +1589,7 @@ const Ie = (e, t, r) => {
1583
1589
  tab: null,
1584
1590
  ...n
1585
1591
  };
1586
- }, ne = (e) => {
1592
+ }, ae = (e) => {
1587
1593
  const { widget: t, label: r, ...n } = e || {};
1588
1594
  return {
1589
1595
  widget: {
@@ -1620,7 +1626,7 @@ const Ie = (e, t, r) => {
1620
1626
  tab: null,
1621
1627
  ...n
1622
1628
  };
1623
- }, ae = (e) => {
1629
+ }, le = (e) => {
1624
1630
  const { widget: t, label: r, ...n } = e || {};
1625
1631
  return {
1626
1632
  widget: {
@@ -1663,7 +1669,7 @@ const Ie = (e, t, r) => {
1663
1669
  tab: null,
1664
1670
  ...n
1665
1671
  };
1666
- }, le = (e = {}) => {
1672
+ }, ie = (e = {}) => {
1667
1673
  const { widget: t, label: r, ...n } = e;
1668
1674
  return {
1669
1675
  widget: {
@@ -1707,7 +1713,7 @@ const Ie = (e, t, r) => {
1707
1713
  tab: null,
1708
1714
  ...n
1709
1715
  };
1710
- }, ie = (e = {}) => {
1716
+ }, oe = (e = {}) => {
1711
1717
  const { widget: t, label: r, ...n } = e;
1712
1718
  return {
1713
1719
  widget: {
@@ -1741,7 +1747,7 @@ const Ie = (e, t, r) => {
1741
1747
  tab: null,
1742
1748
  ...n
1743
1749
  };
1744
- }, oe = (e = {}) => {
1750
+ }, se = (e = {}) => {
1745
1751
  const { widget: t, label: r, ...n } = e;
1746
1752
  return {
1747
1753
  widget: {
@@ -1761,7 +1767,7 @@ const Ie = (e, t, r) => {
1761
1767
  version: 1
1762
1768
  },
1763
1769
  items: (t.items || []).map((a, l) => {
1764
- const i = ue(a, !0);
1770
+ const i = ce(a, !0);
1765
1771
  return i.widget.widgetName = o("_widget", l), i;
1766
1772
  }),
1767
1773
  sortable: !0,
@@ -1824,7 +1830,7 @@ const Ie = (e, t, r) => {
1824
1830
  lineWidth: 12,
1825
1831
  tab: null
1826
1832
  };
1827
- }, se = (e) => {
1833
+ }, ue = (e) => {
1828
1834
  const { widget: t, label: r, ...n } = e || {};
1829
1835
  return {
1830
1836
  widget: {
@@ -1859,80 +1865,81 @@ const Ie = (e, t, r) => {
1859
1865
  ...n
1860
1866
  };
1861
1867
  }, de = {
1862
- address: ie,
1863
- button: le,
1864
- textarea: ae,
1865
- datetime: L,
1868
+ address: oe,
1869
+ button: ie,
1870
+ textarea: le,
1871
+ datetime: G,
1866
1872
  text: S,
1867
1873
  password: S,
1868
- location: ne,
1869
- radiogroup: v,
1870
- radio: v,
1871
- combo: I,
1872
- combocheck: re,
1873
- separator: te,
1874
- checkboxgroup: ee,
1875
- upload: J,
1876
- number: $,
1877
- image: V,
1878
- signature: K,
1879
- user: Y,
1880
- dataload: X,
1881
- linkdata: Q,
1882
- linkquery: se,
1883
- usergroup: H,
1884
- subform: oe,
1885
- dept: j,
1886
- sn: U,
1887
- deptgroup: G,
1874
+ location: ae,
1875
+ radiogroup: A,
1876
+ radio: A,
1877
+ combo: L,
1878
+ combocheck: ne,
1879
+ separator: re,
1880
+ checkboxgroup: te,
1881
+ upload: ee,
1882
+ number: I,
1883
+ image: J,
1884
+ signature: V,
1885
+ user: K,
1886
+ dataload: Y,
1887
+ linkdata: z,
1888
+ linkquery: ue,
1889
+ usergroup: Q,
1890
+ subform: se,
1891
+ dept: H,
1892
+ sn: j,
1893
+ deptgroup: U,
1888
1894
  flowState: g,
1889
1895
  flowstate: g,
1890
1896
  formula: g,
1891
1897
  unknown: g
1892
- }, ue = (e, t = !1) => {
1898
+ }, ce = (e, t = !1) => {
1893
1899
  var l, i;
1894
1900
  if (!e || !e.widget || !e.widget.type)
1895
1901
  return e;
1896
1902
  const r = e.widget.type || "unknown";
1897
- return t && r === "subform" ? g(e) : (((i = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = q()), (de[r] || g)(e));
1903
+ return t && r === "subform" ? g(e) : (((i = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = F()), (de[r] || g)(e));
1898
1904
  };
1899
1905
  export {
1900
- xe as DATA_COUNT_PER_BATCH,
1901
- F as FIELD_TYPE_OPERATOR_MAP,
1902
- we as GetLoadingMsg,
1903
- ye as GetPartErrMsg,
1904
- pe as GetQueryResult,
1905
- Ae as GetSafeFormStructure,
1906
- k as IsErrorPart,
1907
- ce as IsFakeMsgPart,
1908
- fe as IsFileGroupPart,
1909
- ge as IsFilePart,
1910
- be as IsLoadingPart,
1911
- me as IsQueryResultPart,
1912
- Fe as OPERATOR_LABEL_MAP,
1913
- M as WHITE_LIST_FIELDS_SET,
1914
- Te as bsConditionParse2Condition,
1915
- We as conditionStringify2bsCondition,
1916
- Ce as createFieldPartsExtractor,
1917
- ke as createGetFieldJsonInfo,
1906
+ Fe as DATA_COUNT_PER_BATCH,
1907
+ E as FIELD_TYPE_OPERATOR_MAP,
1908
+ ye as GetLoadingMsg,
1909
+ he as GetPartErrMsg,
1910
+ fe as GetQueryResult,
1911
+ _e as GetSafeFormStructure,
1912
+ C as IsErrorPart,
1913
+ ge as IsFakeMsgPart,
1914
+ be as IsFileGroupPart,
1915
+ me as IsFilePart,
1916
+ we as IsLoadingPart,
1917
+ pe as IsQueryResultPart,
1918
+ De as OPERATOR_LABEL_MAP,
1919
+ q as WHITE_LIST_FIELDS_SET,
1920
+ Oe as bsConditionParse2Condition,
1921
+ Te as conditionStringify2bsCondition,
1922
+ Ne as createFieldPartsExtractor,
1923
+ Ce as createGetFieldJsonInfo,
1918
1924
  x as createPartTypeChecker,
1919
- _e as createPayloadTypeChecker,
1920
- d as extractTextPartMeta,
1921
- Me as field2config,
1922
- _ as flatArr,
1923
- Be as formatLocalDate,
1924
- Ee as getAvailableOperators,
1925
- De as getDefaultOperator,
1926
- $e as getIconUnicode,
1927
- he as getMetaErrorMsg,
1928
- qe as imageUrlToBase64,
1925
+ ke as createPayloadTypeChecker,
1926
+ u as extractTextPartMeta,
1927
+ xe as field2config,
1928
+ k as flatArr,
1929
+ $e as formatLocalDate,
1930
+ Re as getAvailableOperators,
1931
+ Pe as getDefaultOperator,
1932
+ Le as getIconUnicode,
1933
+ ve as getMetaErrorMsg,
1934
+ qe as hasValidFieldValue,
1935
+ Ee as imageUrlToBase64,
1929
1936
  Se as injectHostStylesIntoShadow,
1930
- Re as isCtxMatch,
1931
- Pe as isHelperCondMet,
1932
- Oe as mergeConsecutiveTargets,
1933
- Ie as promptParser,
1934
- ue as rebuildFieldsJsonStructure,
1935
- Ne as safeParseJson,
1936
- ve as valueNormalizer
1937
+ Be as isCtxMatch,
1938
+ We as isHelperCondMet,
1939
+ Ie as mergeConsecutiveTargets,
1940
+ Ge as promptParser,
1941
+ ce as rebuildFieldsJsonStructure,
1942
+ Me as safeParseJson,
1943
+ Ae as valueNormalizer
1937
1944
  };
1938
1945
  //# sourceMappingURL=ai-feat-utils.js.map