@glodon-aiot/dataset-annotation 3.13.0-alpha.27 → 3.13.0-alpha.28

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,345 +1,344 @@
1
- var ut = Object.defineProperty, gt = Object.defineProperties;
2
- var mt = Object.getOwnPropertyDescriptors;
3
- var ze = Object.getOwnPropertySymbols;
4
- var pt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable;
5
- var Me = (V, f, o) => f in V ? ut(V, f, { enumerable: !0, configurable: !0, writable: !0, value: o }) : V[f] = o, p = (V, f) => {
1
+ var ft = Object.defineProperty, ut = Object.defineProperties;
2
+ var ht = Object.getOwnPropertyDescriptors;
3
+ var Ae = Object.getOwnPropertySymbols;
4
+ var mt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable;
5
+ var Ee = (N, f, o) => f in N ? ft(N, f, { enumerable: !0, configurable: !0, writable: !0, value: o }) : N[f] = o, m = (N, f) => {
6
6
  for (var o in f || (f = {}))
7
- pt.call(f, o) && Me(V, o, f[o]);
8
- if (ze)
9
- for (var o of ze(f))
10
- bt.call(f, o) && Me(V, o, f[o]);
11
- return V;
12
- }, I = (V, f) => gt(V, mt(f));
13
- import { jsx as s, jsxs as T, Fragment as Re } from "react/jsx-runtime";
14
- import { useRef as vt, useState as c, useEffect as h } from "react";
15
- import { message as M, ConfigProvider as St, Space as ie, Select as Ct, Button as ne, Tabs as yt, Col as It, Tooltip as Lt, Empty as Dt, Spin as kt, Modal as xt } from "antd";
16
- import Tt from "rc-virtual-list";
17
- import { UploadZipsStatus as $, PreLabelTaskStatus as Vt } from "@glodon-aiot/apis";
18
- import Nt from "antd/es/locale/zh_CN";
19
- import Pt from "../../DatasetContext/index.mjs";
20
- import wt from "./icon_item_empty.svg.mjs";
7
+ mt.call(f, o) && Ee(N, o, f[o]);
8
+ if (Ae)
9
+ for (var o of Ae(f))
10
+ gt.call(f, o) && Ee(N, o, f[o]);
11
+ return N;
12
+ }, S = (N, f) => ut(N, ht(f));
13
+ import { jsx as s, jsxs as V, Fragment as ze } from "react/jsx-runtime";
14
+ import { useRef as pt, useState as d, useEffect as u } from "react";
15
+ import { message as z, ConfigProvider as bt, Space as te, Select as vt, Button as ie, Tabs as St, Col as Ct, Tooltip as yt, Empty as It, Spin as Lt, Modal as Dt } from "antd";
16
+ import kt from "rc-virtual-list";
17
+ import { UploadZipsStatus as U, PreLabelTaskStatus as Tt } from "@glodon-aiot/apis";
18
+ import xt from "antd/es/locale/zh_CN";
19
+ import Vt from "../../DatasetContext/index.mjs";
20
+ import Nt from "./icon_item_empty.svg.mjs";
21
21
  import "./style.less.mjs";
22
- import { tagColors as Be } from "../../utils/index.mjs";
23
- import At from "./components/Labels/index.mjs";
24
- import { useKeyPress as Et } from "ahooks";
25
- import Oe from "./components/DisabledTooltip/index.mjs";
26
- import zt from "./PreSamplesPage/index.mjs";
27
- import { SearchOutlined as Mt } from "@ant-design/icons";
28
- import Rt from "../../Common/Page/index.mjs";
29
- import Bt from "../PicZipImportModal/index.mjs";
30
- import Ot from "../PageNav/index.mjs";
31
- import Ft from "../Thumbnail/index.mjs";
32
- import Ht from "../CompositionInput/index.mjs";
33
- import { Prompt as Kt } from "../hooks/Prompt.mjs";
34
- import Ut from "../PreLabelOCR/index.mjs";
35
- import jt from "lodash/merge";
36
- import { DEFAULT_FILTER_SWITCH as Zt } from "../../constant.mjs";
37
- import $t from "./components/ImageModal/index.mjs";
38
- const Si = (V) => {
39
- var Ae;
22
+ import { tagColors as Me } from "../../utils/index.mjs";
23
+ import Pt from "./components/Labels/index.mjs";
24
+ import { useKeyPress as wt } from "ahooks";
25
+ import Re from "./components/DisabledTooltip/index.mjs";
26
+ import At from "./PreSamplesPage/index.mjs";
27
+ import { SearchOutlined as Et } from "@ant-design/icons";
28
+ import zt from "../../Common/Page/index.mjs";
29
+ import Mt from "../PicZipImportModal/index.mjs";
30
+ import Rt from "../PageNav/index.mjs";
31
+ import Bt from "../Thumbnail/index.mjs";
32
+ import Ot from "../CompositionInput/index.mjs";
33
+ import { Prompt as Ft } from "../hooks/Prompt.mjs";
34
+ import Ht from "../PreLabelOCR/index.mjs";
35
+ import Kt from "lodash/merge";
36
+ import { DEFAULT_FILTER_SWITCH as Ut } from "../../constant.mjs";
37
+ import jt from "./components/ImageModal/index.mjs";
38
+ const bi = (N) => {
39
+ var Pe;
40
40
  const {
41
41
  services: f,
42
42
  datasetId: o,
43
43
  versionId: Q,
44
- backTo: Fe,
45
- labelManager: ge = !1,
46
- datasetManager: C = !1,
47
- annotation: He,
48
- header: L = {
44
+ backTo: Be,
45
+ labelManager: ue = !1,
46
+ datasetManager: I = !1,
47
+ annotation: Oe,
48
+ header: D = {
49
49
  versionSelect: !1
50
50
  },
51
- exampleSrcRoot: Ke
52
- } = V, W = p({}, Zt);
53
- jt(W, V.filterSwitch);
54
- const q = vt(null), [v, me] = c(), [i, _] = c(), [X, Ue] = c([]), [pe, be] = c(!1), [H, ve] = c(0), [y, re] = c(""), [K, Se] = c(0), [je, Ze] = c(), [Ce, oe] = c(!1), [ye, $e] = c(!1), [Ie, We] = c(!0), [qe, _e] = c(!1), [P, Le] = c([]), [m, z] = c([]), [R, B] = c(!1), [le, Y] = c(!1), [O, S] = c(-1), [g, b] = c(), [a, D] = c(), [U, j] = c(!1), [n, N] = c({
51
+ exampleSrcRoot: Fe
52
+ } = N, j = m({}, Ut);
53
+ Kt(j, N.filterSwitch);
54
+ const Z = pt(null), [C, he] = d(), [i, $] = d(), [X, He] = d([]), [me, ge] = d(!1), [B, pe] = d(0), [L, ne] = d(""), [O, be] = d(0), [Ke, Ue] = d(), [ve, re] = d(!1), [Se, je] = d(!1), [Ce, Ze] = d(!0), [$e, We] = d(!1), [P, ye] = d([]), [b, E] = d([]), [W, q] = d(!1), [Y, _] = d(!1), [M, p] = d(-1), [v, g] = d(), [a, y] = d(), [n, T] = d({
55
55
  current: 0,
56
56
  pageSize: 100
57
- }), [Z, se] = c([]), [F, Ge] = c(""), [Je, Qe] = c(!1), [De, ke] = c(), [ee, ae] = c(null), [w, xe] = c(!1), [Xe, Te] = c(!1), [Ye, et] = c(0), [Wt, ce] = c(""), [G, tt] = c(""), [it, nt] = c(), A = () => {
58
- b(void 0), D(void 0), S(-1), B(!1), j(!1), te(), setTimeout(() => {
59
- N((e) => I(p({}, e), {
57
+ }), [F, oe] = d([]), [R, qe] = d(""), [_e, Ge] = d(!1), [Ie, Le] = d(), [ee, le] = d(null), [w, De] = d(!1), [Je, ke] = d(!1), [Qe, Xe] = d(0), [Zt, se] = d(""), [G, Ye] = d(""), [et, tt] = d(), H = () => {
58
+ g(void 0), y(void 0), p(-1), q(!1), K(), setTimeout(() => {
59
+ T((e) => S(m({}, e), {
60
60
  current: 1,
61
61
  type: void 0
62
62
  }));
63
63
  }, 10);
64
64
  };
65
- Et("Esc", A), h(() => {
65
+ wt("Esc", H), u(() => {
66
66
  o && f.cvforceDatahub.getS3Iam(o).then((e) => {
67
- Ze(e);
67
+ Ue(e);
68
68
  });
69
- }, [o]), h(() => {
70
- f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) => nt(e));
71
- }, [f.cvforceDatahub]), h(() => {
69
+ }, [o]), u(() => {
70
+ f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) => tt(e));
71
+ }, [f.cvforceDatahub]), u(() => {
72
72
  x();
73
- }, [i == null ? void 0 : i.id]), h(() => {
74
- o && (be(!0), Promise.all([
73
+ }, [i == null ? void 0 : i.id]), u(() => {
74
+ o && (ge(!0), Promise.all([
75
75
  // 数据集
76
76
  f.cvforceDatahub.getDatasetsId(o).then((e) => {
77
- me(e);
77
+ he(e);
78
78
  }),
79
79
  // 版本列表
80
80
  f.cvforceDatahub.getDatasetsIdVersions(o, 1, 1e3).then((e) => {
81
- Ue(e.recordList), _(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
81
+ He(e.recordList), $(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
82
82
  })
83
- ]).finally(() => be(!1)));
83
+ ]).finally(() => ge(!1)));
84
84
  }, [o, Q]);
85
- const Ve = () => {
85
+ const Te = () => {
86
86
  !o || !i || f.cvforceDatahub.getDatasetsIdVersionsVid(o, i.id).then((e) => {
87
- _(e), Ge(e.versionAsyncTask.state);
87
+ $(e), qe(e.versionAsyncTask.state);
88
88
  });
89
89
  };
90
- h(() => {
91
- F !== $.Pending && F !== $.Started || M.warning("文件导入中,请刷新页面再试");
92
- }, [F]), h(() => {
93
- _(void 0), N(I(p({}, n), {
90
+ u(() => {
91
+ R !== U.Pending && R !== U.Started || z.warning("文件导入中,请刷新页面再试");
92
+ }, [R]), u(() => {
93
+ $(void 0), T(S(m({}, n), {
94
94
  current: 1
95
- })), z([]), Ve();
96
- }, [o, Q]), h(() => {
95
+ })), E([]), Te();
96
+ }, [o, Q]), u(() => {
97
97
  o && f.cvforceDatahub.getDatasetsId(o).then((e) => {
98
- me(e);
98
+ he(e);
99
99
  });
100
- }, [o]), h(() => {
101
- te();
102
- }, [Z, i]), h(() => {
103
- !i || !v || E(I(p({}, n), {
100
+ }, [o]), u(() => {
101
+ K();
102
+ }, [F, i]), u(() => {
103
+ !i || !C || A(S(m({}, n), {
104
104
  current: 1
105
105
  })).then((e) => {
106
106
  });
107
- }, [v == null ? void 0 : v.id, i == null ? void 0 : i.id, Z]), h(() => {
108
- E().then((e) => {
107
+ }, [C == null ? void 0 : C.id, i == null ? void 0 : i.id, F]), u(() => {
108
+ A().then((e) => {
109
109
  }), x();
110
- }, [n.current]), h(() => {
110
+ }, [n.current]), u(() => {
111
111
  w && x();
112
- }, [De]), h(() => {
113
- E(I(p({}, n), {
112
+ }, [Ie]), u(() => {
113
+ A(S(m({}, n), {
114
114
  current: 1,
115
115
  total: void 0
116
116
  })).then((e) => {
117
- e && g && (Array.isArray(e) && e.length ? (S(0), b(e[0]), D(void 0)) : A());
117
+ e && v && (Array.isArray(e) && e.length ? (p(0), g(e[0]), y(void 0)) : (g(void 0), y(void 0), p(-1), K(), setTimeout(() => {
118
+ T((t) => S(m({}, t), {
119
+ current: 1,
120
+ type: void 0
121
+ }));
122
+ }, 10)));
118
123
  });
119
- }, [y]), h(() => {
120
- le || (b(void 0), D(void 0), j(!1), B(!1), S(-1));
121
- }, [le]), h(() => {
122
- !R && g && !U && B(!0);
123
- }, [g, U]), h(() => {
124
- !m.length && R && A();
125
- }, [m.length, R]), h(() => {
126
- R && j(!1);
127
- }, [R]), h(() => {
128
- _e(!Ie && ye);
129
- }, [Ie, ye]), h(() => {
124
+ }, [L]), u(() => {
125
+ Y || (g(void 0), y(void 0), q(!1), p(-1));
126
+ }, [Y]), u(() => {
127
+ We(!Ce && Se);
128
+ }, [Ce, Se]), u(() => {
130
129
  if (!o) {
131
- ee && (clearTimeout(ee), ae(null)), ke(void 0);
130
+ ee && (clearTimeout(ee), le(null)), Le(void 0);
132
131
  return;
133
132
  }
134
- fe();
135
- }, [o, i == null ? void 0 : i.id]), h(() => {
136
- fe();
137
- }, [Je]), h(() => {
138
- de();
139
- }, [w, o, i]), h(() => {
140
- E(I(p({}, n), {
133
+ ce();
134
+ }, [o, i == null ? void 0 : i.id]), u(() => {
135
+ ce();
136
+ }, [_e]), u(() => {
137
+ ae();
138
+ }, [w, o, i]), u(() => {
139
+ A(S(m({}, n), {
141
140
  current: 1
142
141
  })), x();
143
- }, [G]), h(() => {
144
- ce("");
145
- }, [g]);
146
- const de = () => {
142
+ }, [G]), u(() => {
143
+ se("");
144
+ }, [v]);
145
+ const ae = () => {
147
146
  i && f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
148
147
  pageNo: 1,
149
148
  pageSize: 1e3,
150
149
  confirmStatus: 1
151
150
  }).then((e) => {
152
- et(e.recordList.length);
151
+ Xe(e.recordList.length);
153
152
  });
154
- }, fe = () => {
153
+ }, ce = () => {
155
154
  !o || !i || f.cvforceDatahub.getPreLabelTask(o, i.id).then((e) => {
156
155
  const t = e[0];
157
- if (ke(t), ee && (clearTimeout(ee), ae(null)), !(t != null && t.state) || t.state !== Vt.Started) {
158
- xe(!1), x();
156
+ if (Le(t), ee && (clearTimeout(ee), le(null)), !(t != null && t.state) || t.state !== Tt.Started) {
157
+ De(!1), x();
159
158
  return;
160
159
  } else
161
- xe(!0);
162
- ae(setTimeout(() => {
163
- fe();
160
+ De(!0);
161
+ le(setTimeout(() => {
162
+ ce();
164
163
  }, 1e4));
165
164
  });
166
165
  };
167
- h(() => {
168
- v && v.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
169
- }, [v]);
170
- const E = (e, t) => {
166
+ u(() => {
167
+ C && C.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
168
+ }, [C]);
169
+ const A = (e, t) => {
171
170
  const l = (e == null ? void 0 : e.current) || n.current, r = (e == null ? void 0 : e.pageSize) || n.pageSize;
172
171
  if (!o || !i || !l)
173
172
  return Promise.resolve(!1);
174
- const d = Z.map((k) => k.label), u = () => {
175
- switch (y) {
173
+ const c = F.map((k) => k.label), h = () => {
174
+ switch (L) {
176
175
  case "nocode":
177
176
  return "nocode";
178
177
  case "hascode":
179
- return d.length ? d : "hascode";
178
+ return c.length ? c : "hascode";
180
179
  default:
181
- return d.length ? d : void 0;
180
+ return c.length ? c : void 0;
182
181
  }
183
182
  };
184
- return l === 1 && dt(), N(I(p({}, n), {
183
+ return l === 1 && at(), T(S(m({}, n), {
185
184
  current: l,
186
185
  pageSize: r
187
186
  })), f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
188
187
  pageNo: l,
189
188
  pageSize: r,
190
- labels: u(),
189
+ labels: h(),
191
190
  searchName: G
192
191
  }).then((k) => {
193
- const J = k.recordList || [], Ee = l === 1 ? J : [...t || m, ...J];
194
- if (z(Ee), N(I(p({}, n), {
192
+ const J = k.recordList || [], we = l === 1 ? J : [...t || b, ...J];
193
+ if (E(we), T(S(m({}, n), {
195
194
  current: l,
196
195
  pageSize: r,
197
196
  total: k.totalResults
198
197
  })), n.type === "next" && J.length) {
199
- S(0);
200
- const ue = k.recordList[0];
201
- b(ue);
198
+ p(0);
199
+ const fe = k.recordList[0];
200
+ g(fe);
202
201
  }
203
202
  if (n.type === "prev" && J.length) {
204
- S(n.pageSize - 1);
205
- const ue = k.recordList[n.pageSize - 1];
206
- b(ue);
203
+ p(n.pageSize - 1);
204
+ const fe = k.recordList[n.pageSize - 1];
205
+ g(fe);
207
206
  }
208
- return R && O < 0 && (S(0), b(J[0]), Y(!0)), Ee;
207
+ return W && M < 0 && (p(0), g(J[0]), _(!0)), we;
209
208
  }).catch(() => !1);
210
209
  };
211
- h(() => {
212
- N(y === "nocode" ? I(p({}, n), {
213
- total: H
214
- }) : y === "" ? I(p({}, n), {
215
- total: K
216
- }) : I(p({}, n), {
217
- total: K - H
210
+ u(() => {
211
+ T(L === "nocode" ? S(m({}, n), {
212
+ total: B
213
+ }) : L === "" ? S(m({}, n), {
214
+ total: O
215
+ }) : S(m({}, n), {
216
+ total: O - B
218
217
  }));
219
- }, [H, K]);
218
+ }, [B, O]);
220
219
  const x = () => {
221
220
  !o || !i || f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id, {
222
221
  label: "allcode",
223
222
  searchName: G
224
223
  }).then((e) => {
225
224
  const t = e.find((r) => r.id === "allcodeid"), l = e.find((r) => r.id === "nocodeid");
226
- Se(t ? t.count : 0), ve(l ? l.count : 0);
225
+ be(t ? t.count : 0), pe(l ? l.count : 0);
227
226
  });
228
- }, te = () => {
227
+ }, K = () => {
229
228
  if (!(!o || !(i != null && i.id)))
230
229
  return f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((e) => {
231
- const l = (e || []).filter((r) => r.label !== "nocode").map((r, d) => ({
230
+ const l = (e || []).filter((r) => r.label !== "nocode").map((r, c) => ({
232
231
  label: r.label,
233
232
  count: r.count,
234
233
  id: r.id,
235
- color: Be[d % 40]
234
+ color: Me[c % 40]
236
235
  }));
237
- return Le(l), e;
236
+ return ye(l), e;
238
237
  });
239
- }, rt = (e) => {
240
- if (!m)
238
+ }, it = (e) => {
239
+ if (!b)
241
240
  return;
242
- j(!0), B(!1), S(e);
243
- const t = m[e];
244
- b(t), D(void 0), Y(!0);
241
+ q(!1), p(e);
242
+ const t = b[e];
243
+ g(t), y(void 0), _(!0);
245
244
  };
246
- h(() => {
247
- n.type || E();
248
- }, [n.type]), h(() => {
245
+ u(() => {
246
+ n.type || A();
247
+ }, [n.type]), u(() => {
249
248
  if (!a)
250
249
  return;
251
250
  const e = [];
252
251
  a == null || a.labels.forEach((t) => {
253
252
  P != null && P.find((l) => l.id === t.id) && e.push(t);
254
- }), a.labels = e, D(a);
253
+ }), a.labels = e, y(a);
255
254
  }, [P]);
256
- const Ne = () => {
257
- if (m) {
258
- if (U) {
259
- z((e) => {
255
+ const xe = () => {
256
+ if (b) {
257
+ if (!W) {
258
+ E((e) => {
260
259
  if (!Array.isArray(e) || !e.length)
261
- return A(), e;
262
- const t = O + 1;
263
- return t >= e.length ? n.total && t >= n.total ? M.error("已经是最后一个了") : E({
260
+ return H(), e;
261
+ const t = M + 1;
262
+ return t >= e.length ? n.total && t >= n.total ? z.error("已经是最后一个了") : A({
264
263
  current: n.current + 1,
265
264
  pageSize: n.pageSize,
266
265
  type: "next"
267
266
  }, e).then((l) => {
268
- S(t);
267
+ p(t);
269
268
  const r = l[t];
270
- b(r), D(void 0);
269
+ g(r), y(void 0);
271
270
  }) : setTimeout(() => {
272
- S(t);
271
+ p(t);
273
272
  const l = e[t];
274
- b(l), D(void 0);
273
+ g(l), y(void 0);
275
274
  }, 200), e;
276
275
  });
277
276
  return;
278
277
  }
279
- return he().then((e) => (e && (x(), z((t) => {
278
+ return de().then((e) => (e && (x(), E((t) => {
280
279
  let l;
281
280
  if (Array.isArray(t)) {
282
281
  if (!t.length)
283
- return A(), t;
284
- const r = !a || a.labels.length && y === "hascode" || !a.labels.length && y === "nocode" || y === "" ? O + 1 : O;
285
- if (a && (a.labels.length && y === "nocode" || !a.labels.length && y === "hascode")) {
286
- const d = t.findIndex((u) => u.id === a.id);
287
- d > -1 && (t.splice(d, 1), l = [...t], n.total && (n.total = n.total - 1));
282
+ return H(), t;
283
+ const r = !a || a.labels.length && L === "hascode" || !a.labels.length && L === "nocode" || L === "" ? M + 1 : M;
284
+ if (a && (a.labels.length && L === "nocode" || !a.labels.length && L === "hascode")) {
285
+ const c = t.findIndex((h) => h.id === a.id);
286
+ c > -1 && (t.splice(c, 1), l = [...t], n.total && (n.total = n.total - 1));
288
287
  }
289
- r >= t.length ? n.total && r >= n.total ? M.error("已经是最后一个了") : E({
288
+ r >= t.length ? n.total && r >= n.total ? z.error("已经是最后一个了") : A({
290
289
  current: n.current + 1,
291
290
  pageSize: n.pageSize,
292
291
  type: "next"
293
- }, t).then((d) => {
294
- S(r);
295
- const u = d[r];
296
- b(u), D(void 0);
292
+ }, t).then((c) => {
293
+ p(r);
294
+ const h = c[r];
295
+ g(h), y(void 0);
297
296
  }) : setTimeout(() => {
298
- S(r);
299
- const d = t[r];
300
- b(d), D(void 0);
297
+ p(r);
298
+ const c = t[r];
299
+ g(c), y(void 0);
301
300
  }, 200);
302
301
  }
303
302
  return l || t;
304
303
  })), e));
305
304
  }
306
- }, ot = () => {
307
- if (m) {
308
- if (U) {
309
- z((e) => {
305
+ }, nt = () => {
306
+ if (b) {
307
+ if (!W) {
308
+ E((e) => {
310
309
  if (!Array.isArray(e) || !e.length)
311
- return A(), e;
312
- const t = O - 1;
313
- return t < 0 ? M.error("已经是第一个了") : setTimeout(() => {
314
- S(t);
310
+ return H(), e;
311
+ const t = M - 1;
312
+ return t < 0 ? z.error("已经是第一个了") : setTimeout(() => {
313
+ p(t);
315
314
  const l = e[t];
316
- b(l), D(void 0);
315
+ g(l), y(void 0);
317
316
  }, 200), e;
318
317
  });
319
318
  return;
320
319
  }
321
- he().then((e) => {
322
- e && (x(), z((t) => {
320
+ de().then((e) => {
321
+ e && (x(), E((t) => {
323
322
  let l;
324
323
  if (Array.isArray(t)) {
325
324
  if (!t.length)
326
- return A(), t;
327
- const r = O - 1;
325
+ return H(), t;
326
+ const r = M - 1;
328
327
  if (r < 0)
329
- r < 0 ? M.error("已经是第一个了") : N({
328
+ r < 0 ? z.error("已经是第一个了") : T({
330
329
  current: n.current - 1,
331
330
  pageSize: n.pageSize,
332
331
  type: "prev"
333
332
  });
334
333
  else {
335
- if (a && (a.labels.length && y === "nocode" || !a.labels.length && y === "hascode")) {
336
- const d = t.findIndex((u) => u.id === a.id);
337
- d > -1 && (t.splice(d, 1), l = [...t], n.total && (n.total = n.total - 1));
334
+ if (a && (a.labels.length && L === "nocode" || !a.labels.length && L === "hascode")) {
335
+ const c = t.findIndex((h) => h.id === a.id);
336
+ c > -1 && (t.splice(c, 1), l = [...t], n.total && (n.total = n.total - 1));
338
337
  }
339
338
  setTimeout(() => {
340
- S(r);
341
- const d = t[r];
342
- b(d), D(void 0);
339
+ p(r);
340
+ const c = t[r];
341
+ g(c), y(void 0);
343
342
  }, 200);
344
343
  }
345
344
  }
@@ -347,113 +346,118 @@ const Si = (V) => {
347
346
  }));
348
347
  });
349
348
  }
350
- }, lt = (e) => {
349
+ }, rt = (e) => {
351
350
  const t = Object.keys(e.labels.reduce((l, r) => (l[r.label] ? ++l[r.label] : l[r.label] = 1, l), {})).length;
352
351
  return t >= 2 ? `+${t - 1}` : null;
353
- }, st = (e) => {
352
+ }, ot = (e) => {
354
353
  var t;
355
- (!n.total || n.total > m.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((t = q.current) == null ? void 0 : t.clientHeight) && N(I(p({}, n), {
354
+ (!n.total || n.total > b.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((t = Z.current) == null ? void 0 : t.clientHeight) && T(S(m({}, n), {
356
355
  current: n.current + 1
357
356
  }));
358
- }, he = () => i ? a && !w ? (a.labels && (a.labels = a.labels.filter((e) => !!e.id)), f.cvforceDatahub.updateSamples(o, i.id, [a], 0).then(() => (M.success({
357
+ }, de = () => i ? a && !w ? (a.labels && (a.labels = a.labels.filter((e) => !!e.id)), f.cvforceDatahub.updateSamples(o, i.id, [a], 0).then(() => (z.success({
359
358
  content: "保存成功"
360
- }), z((e) => {
359
+ }), E((e) => {
361
360
  const t = e.findIndex((l) => l.id === (a == null ? void 0 : a.id));
362
361
  return t > -1 && (e[t] = a), [...e];
363
- }), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1), at = () => {
362
+ }), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1), lt = () => {
364
363
  if (a && a.labels.some((e) => !e.id))
365
- return M.error("所有标注需设置标签"), Promise.resolve(!1);
366
- Ne();
367
- }, ct = () => {
368
- xt.confirm({
364
+ return z.error("所有标注需设置标签"), Promise.resolve(!1);
365
+ xe();
366
+ }, st = () => {
367
+ Dt.confirm({
369
368
  title: "确认要删除当前数据吗?",
370
369
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
371
370
  onOk: () => {
372
- !g || !i || f.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(o, i.id, g.id).then(() => {
373
- const e = m.findIndex((t) => t.id === g.id);
374
- m.splice(e, 1), z([...m]), N(I(p({}, n), {
371
+ !v || !i || f.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(o, i.id, v.id).then(() => {
372
+ const e = b.findIndex((t) => t.id === v.id);
373
+ b.splice(e, 1), E([...b]), T(S(m({}, n), {
375
374
  total: n.total ? n.total - 1 : 0
376
- })), e <= m.length - 1 ? b(m[e]) : (b(m[e - 1]), S(e - 1)), x(), D(void 0), n.total && n.total - 1 === 0 && A();
375
+ })), e <= b.length - 1 ? g(b[e]) : (g(b[e - 1]), p(e - 1)), x(), y(void 0), n.total && n.total - 1 === 0 && (g(void 0), y(void 0), p(-1), W || _(!1), K(), setTimeout(() => {
376
+ T((t) => S(m({}, t), {
377
+ current: 1,
378
+ type: void 0
379
+ }));
380
+ }, 10));
377
381
  });
378
382
  }
379
383
  });
380
- }, Pe = [{
384
+ }, Ve = [{
381
385
  key: "",
382
- label: `全部(${K})`,
386
+ label: `全部(${O})`,
383
387
  children: null
384
388
  }, {
385
389
  key: "nocode",
386
- label: `未标注(${H})`,
390
+ label: `未标注(${B})`,
387
391
  children: null
388
392
  }, {
389
393
  key: "hascode",
390
- label: `已标注(${K - H})`,
394
+ label: `已标注(${O - B})`,
391
395
  children: null
392
- }], dt = () => {
396
+ }], at = () => {
393
397
  var e, t;
394
- (t = (e = q.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
398
+ (t = (e = Z.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
395
399
  top: 0
396
400
  });
397
- }, ft = () => {
398
- Te(!0);
399
- }, ht = (e) => {
400
- tt(e);
401
- }, we = (e) => {
402
- a ? (he().then((t) => {
403
- t ? (re(e), x()) : M.error("保存失败");
404
- }), B(!1)) : (N(I(p({}, n), {
401
+ }, ct = () => {
402
+ ke(!0);
403
+ }, dt = (e) => {
404
+ Ye(e);
405
+ }, Ne = (e) => {
406
+ a ? de().then((t) => {
407
+ t ? (ne(e), x()) : z.error("保存失败");
408
+ }) : (T(S(m({}, n), {
405
409
  current: 1,
406
410
  total: void 0
407
- })), re(e)), e === "nocode" && se([]);
411
+ })), ne(e)), e === "nocode" && oe([]);
408
412
  };
409
- return /* @__PURE__ */ s(St, {
410
- locale: Nt,
411
- children: /* @__PURE__ */ s(Pt.Provider, {
413
+ return /* @__PURE__ */ s(bt, {
414
+ locale: xt,
415
+ children: /* @__PURE__ */ s(Vt.Provider, {
412
416
  value: {
413
417
  datasetId: o,
414
418
  versionId: (i == null ? void 0 : i.id) || "",
415
419
  no: (i == null ? void 0 : i.no) || "",
416
- loading: pe,
420
+ loading: me,
417
421
  version: i,
418
422
  versions: X,
419
- samples: m,
423
+ samples: b,
420
424
  pagination: n,
421
425
  services: f,
422
426
  featuresConfig: {
423
- labelManager: ge,
424
- datasetManager: C,
425
- annotation: He,
426
- filterSwitch: W,
427
- header: L,
428
- exampleSrcRoot: Ke
427
+ labelManager: ue,
428
+ datasetManager: I,
429
+ annotation: Oe,
430
+ filterSwitch: j,
431
+ header: D,
432
+ exampleSrcRoot: Fe
429
433
  }
430
434
  },
431
- children: v ? v.markType === "detection" ? /* @__PURE__ */ s("div", {
435
+ children: C ? C.markType === "detection" ? /* @__PURE__ */ s("div", {
432
436
  className: "detection-version-detail",
433
- children: Xe ? i != null && i.id && C && C.preLabel ? /* @__PURE__ */ s(zt, {
437
+ children: Je ? i != null && i.id && I && I.preLabel ? /* @__PURE__ */ s(At, {
434
438
  datasetId: o,
435
439
  versionId: i.id,
436
440
  onClose: () => {
437
- Te(!1), de(), te(), x(), E();
441
+ ke(!1), ae(), K(), x(), A();
438
442
  },
439
- samples: m,
443
+ samples: b,
440
444
  labels: P,
441
- fetchLength: de
442
- }) : null : /* @__PURE__ */ T(Rt, {
445
+ fetchLength: ae
446
+ }) : null : /* @__PURE__ */ V(zt, {
443
447
  className: "product-details-page",
444
- header: L === !1 ? void 0 : /* @__PURE__ */ s(Ot, {
445
- backTo: Fe,
446
- onBackClick: L != null && L.onBackClick ? () => {
447
- g && A(), L.onBackClick && L.onBackClick();
448
+ header: D === !1 ? void 0 : /* @__PURE__ */ s(Rt, {
449
+ backTo: Be,
450
+ onBackClick: D != null && D.onBackClick ? () => {
451
+ v && H(), D.onBackClick && D.onBackClick();
448
452
  } : void 0,
449
- left: !pe && /* @__PURE__ */ T(ie, {
453
+ left: !me && /* @__PURE__ */ V(te, {
450
454
  children: [/* @__PURE__ */ s("span", {
451
455
  style: {
452
456
  fontWeight: "bold"
453
457
  },
454
- children: v == null ? void 0 : v.name
455
- }), /* @__PURE__ */ s(Ct, {
456
- disabled: (L == null ? void 0 : L.versionSelect) === !1,
458
+ children: C == null ? void 0 : C.name
459
+ }), /* @__PURE__ */ s(vt, {
460
+ disabled: (D == null ? void 0 : D.versionSelect) === !1,
457
461
  value: i == null ? void 0 : i.id,
458
462
  style: {
459
463
  width: 70
@@ -464,177 +468,176 @@ const Si = (V) => {
464
468
  })),
465
469
  onChange: (e) => {
466
470
  const t = X.find((r) => r.id === e);
467
- if (!v || !t)
471
+ if (!C || !t)
468
472
  return;
469
473
  const l = X.find((r) => r.id === t.id);
470
- _(l), L != null && L.onVersionChange && L.onVersionChange(l);
474
+ $(l), D != null && D.onVersionChange && D.onVersionChange(l);
471
475
  }
472
476
  })]
473
477
  }),
474
- right: /* @__PURE__ */ T(ie, {
475
- children: [!g && C && C.add && /* @__PURE__ */ s(Oe, {
478
+ right: /* @__PURE__ */ V(te, {
479
+ children: [!v && I && I.add && /* @__PURE__ */ s(Re, {
476
480
  isPreLabel: w,
477
481
  placement: "bottom",
478
- children: /* @__PURE__ */ s(ne, {
482
+ children: /* @__PURE__ */ s(ie, {
479
483
  type: "default",
480
- onClick: () => oe(!0),
481
- disabled: F === $.Pending || F === $.Started || w,
484
+ onClick: () => re(!0),
485
+ disabled: R === U.Pending || R === U.Started || w,
482
486
  children: "导入数据"
483
487
  }, "del")
484
- }), !g && C && C.preLabel && (i != null && i.id) ? /* @__PURE__ */ T(Re, {
485
- children: [/* @__PURE__ */ s(Ut, {
488
+ }), !v && I && I.preLabel && (i != null && i.id) ? /* @__PURE__ */ V(ze, {
489
+ children: [/* @__PURE__ */ s(Ht, {
486
490
  datasetId: o,
487
491
  versionId: i.id,
488
- disabled: !m.length,
489
- setIsTaskChange: Qe,
492
+ disabled: !b.length,
493
+ setIsTaskChange: Ge,
490
494
  datasetType: "detection",
491
- preLabelTask: De
492
- }), /* @__PURE__ */ s(ne, {
493
- disabled: w || !Ye,
494
- onClick: ft,
495
+ preLabelTask: Ie
496
+ }), /* @__PURE__ */ s(ie, {
497
+ disabled: w || !Qe,
498
+ onClick: ct,
495
499
  children: "待确认标注"
496
500
  })]
497
- }) : null, /* @__PURE__ */ s(Kt, {
498
- when: qe,
501
+ }) : null, /* @__PURE__ */ s(Ft, {
502
+ when: $e,
499
503
  content: "确认要离开此页面吗?",
500
504
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
501
- }), Ce && /* @__PURE__ */ s(Bt, {
502
- datasetIam: je,
505
+ }), ve && /* @__PURE__ */ s(Mt, {
506
+ datasetIam: Ke,
503
507
  datasetId: o,
504
508
  currentVersion: i,
505
- tenCode: v == null ? void 0 : v.tenantCode,
506
- isVisible: Ce,
507
- setIsVisible: oe,
509
+ tenCode: C == null ? void 0 : C.tenantCode,
510
+ isVisible: ve,
511
+ setIsVisible: re,
508
512
  getVersionListRequest: x,
509
- setIsConfirm: We,
513
+ setIsConfirm: Ze,
510
514
  onUploadStatusChange: (e) => {
511
- $e(e);
515
+ je(e);
512
516
  },
513
517
  tableReload: () => {
514
518
  var e, t;
515
- i != null && i.id && ((t = (e = q.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
519
+ i != null && i.id && ((t = (e = Z.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
516
520
  top: 0
517
- }), E(I(p({}, n), {
521
+ }), A(S(m({}, n), {
518
522
  current: 1
519
523
  })));
520
524
  },
521
- loadVersionData: Ve
525
+ loadVersionData: Te
522
526
  })]
523
527
  })
524
528
  }),
525
- children: [/* @__PURE__ */ T("div", {
529
+ children: [/* @__PURE__ */ V("div", {
526
530
  className: "detection-header",
527
- children: [/* @__PURE__ */ T(ie, {
528
- children: [W.tabs && /* @__PURE__ */ s(yt, {
531
+ children: [/* @__PURE__ */ V(te, {
532
+ children: [j.tabs && /* @__PURE__ */ s(St, {
529
533
  className: "header-tab",
530
- activeKey: y,
531
- items: Pe,
532
- onChange: we
533
- }), !g && W.search && /* @__PURE__ */ s(Ht, {
534
+ activeKey: L,
535
+ items: Ve,
536
+ onChange: Ne
537
+ }), !v && j.search && /* @__PURE__ */ s(Ot, {
534
538
  placeholder: "请输入图片名称搜索",
535
- suffix: /* @__PURE__ */ s(Mt, {}),
539
+ suffix: /* @__PURE__ */ s(Et, {}),
536
540
  value: G,
537
- onChange: ht,
541
+ onChange: dt,
538
542
  allowClear: !0
539
543
  })]
540
- }), /* @__PURE__ */ s(Oe, {
544
+ }), /* @__PURE__ */ s(Re, {
541
545
  isPreLabel: w,
542
- children: /* @__PURE__ */ s(ie, {
543
- children: C && C.label && /* @__PURE__ */ s(ne, {
546
+ children: /* @__PURE__ */ s(te, {
547
+ children: I && I.label && /* @__PURE__ */ s(ie, {
544
548
  type: "primary",
545
- disabled: !H || w,
549
+ disabled: !B || w,
546
550
  onClick: () => {
547
- g || re("nocode"), j(!1), B(!0), S(-1), y === "nocode" && (S(0), b(m[0])), Y(!0);
551
+ v || ne("nocode"), q(!0), p(-1), L === "nocode" && (p(0), g(b[0])), _(!0);
548
552
  },
549
553
  children: "标注"
550
554
  })
551
555
  })
552
556
  })]
553
- }), /* @__PURE__ */ T("div", {
557
+ }), /* @__PURE__ */ V("div", {
554
558
  className: "d-row",
555
- children: [/* @__PURE__ */ T("div", {
559
+ children: [/* @__PURE__ */ V("div", {
556
560
  className: "d-right",
557
- ref: q,
558
- children: [g && /* @__PURE__ */ s($t, {
561
+ ref: Z,
562
+ children: [Y && /* @__PURE__ */ s(jt, {
559
563
  datasetId: o,
560
- isImageDetailVisible: le,
561
- setIsImageDetailVisible: Y,
562
- currentSample: a != null ? a : g,
564
+ isImageDetailVisible: Y,
565
+ setIsImageDetailVisible: _,
566
+ currentSample: a != null ? a : v,
563
567
  labels: P,
564
- editing: U ? !1 : R,
565
- filterItems: Pe,
566
- filterMode: y,
567
- onFilterChange: we,
568
- onChange: D,
569
- onNextClick: () => Ne(),
570
- onPrevClick: () => ot(),
571
- onSave: () => at(),
572
- onDeleteSample: () => ct(),
568
+ previewMode: !W,
569
+ filterItems: Ve,
570
+ filterMode: L,
571
+ onFilterChange: Ne,
572
+ onChange: y,
573
+ onNextClick: () => xe(),
574
+ onPrevClick: () => nt(),
575
+ onSave: () => lt(),
576
+ onDeleteSample: () => st(),
573
577
  onEnterEdit: () => {
574
- j(!1), B(!0);
578
+ q(!0);
575
579
  },
576
580
  onRefresh: () => {
577
581
  var e;
578
- (e = te()) == null || e.then((t) => {
582
+ (e = K()) == null || e.then((t) => {
579
583
  var l, r;
580
584
  if (a) {
581
- const d = [];
582
- (l = a.labels) == null || l.forEach((u) => {
583
- t != null && t.find((k) => k.id === u.id) && d.push(u);
584
- }), a.labels = d, D(p({}, a));
585
+ const c = [];
586
+ (l = a.labels) == null || l.forEach((h) => {
587
+ t != null && t.find((k) => k.id === h.id) && c.push(h);
588
+ }), a.labels = c, y(m({}, a));
585
589
  }
586
- if (g) {
587
- const d = [];
588
- (r = g.labels) == null || r.forEach((u) => {
589
- t != null && t.find((k) => k.id === u.id) && d.push(u);
590
- }), g.labels = d, b(p({}, g));
590
+ if (v) {
591
+ const c = [];
592
+ (r = v.labels) == null || r.forEach((h) => {
593
+ t != null && t.find((k) => k.id === h.id) && c.push(h);
594
+ }), v.labels = c, g(m({}, v));
591
595
  }
592
596
  }), x();
593
597
  },
594
598
  isPreLabel: w,
595
599
  imgCount: {
596
- total: K,
597
- index: O + 1
600
+ total: O,
601
+ index: M + 1
598
602
  },
599
- settingHide: !ge,
600
- canLabel: !!(C && C.label),
601
- canDelete: !!(C && C.delete),
602
- previewMode: U
603
- }), g ? /* @__PURE__ */ s("div", {}) : n.total !== void 0 && n.total > 0 ? /* @__PURE__ */ s(Re, {
604
- children: /* @__PURE__ */ s(Tt, {
603
+ settingHide: !ue,
604
+ canLabel: !!(I && I.label),
605
+ canDelete: !!(I && I.delete)
606
+ }), v ? /* @__PURE__ */ s("div", {}) : n.total !== void 0 && n.total > 0 ? /* @__PURE__ */ s(ze, {
607
+ children: /* @__PURE__ */ s(kt, {
605
608
  innerProps: {
606
609
  className: "d-right-row"
607
610
  },
608
- data: m,
611
+ data: b,
609
612
  itemKey: "id",
610
- height: (Ae = q.current) == null ? void 0 : Ae.clientHeight,
611
- onScroll: st,
613
+ height: (Pe = Z.current) == null ? void 0 : Pe.clientHeight,
614
+ onScroll: ot,
612
615
  children: (e, t) => {
613
616
  var l;
614
- return /* @__PURE__ */ s(It, {
617
+ return /* @__PURE__ */ s(Ct, {
615
618
  className: "d-right-col",
616
- onClick: () => rt(t),
617
- children: /* @__PURE__ */ T("div", {
619
+ onClick: () => it(t),
620
+ children: /* @__PURE__ */ V("div", {
618
621
  className: "right-col-wrapper",
619
- onMouseEnter: () => ce(e.id),
620
- onMouseLeave: () => ce(""),
622
+ onMouseEnter: () => se(e.id),
623
+ onMouseLeave: () => se(""),
621
624
  children: [/* @__PURE__ */ s("div", {
622
625
  className: "right-col-img",
623
- children: /* @__PURE__ */ s(Ft, {
626
+ children: /* @__PURE__ */ s(Bt, {
624
627
  fileKey: e.fileKey,
625
628
  width: 124,
626
- imgProxy: it
629
+ imgProxy: et
627
630
  })
628
- }), /* @__PURE__ */ T("div", {
631
+ }), /* @__PURE__ */ V("div", {
629
632
  className: "right-col-text",
630
- children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(Lt, {
633
+ children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(yt, {
631
634
  placement: "top",
632
635
  title: /* @__PURE__ */ s("div", {
633
- children: Object.keys(e.labels.reduce((r, d) => (r[d.label] ? ++r[d.label] : r[d.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
636
+ children: Object.keys(e.labels.reduce((r, c) => (r[c.label] ? ++r[c.label] : r[c.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
634
637
  children: r
635
638
  }, r))
636
639
  }),
637
- children: /* @__PURE__ */ T("div", {
640
+ children: /* @__PURE__ */ V("div", {
638
641
  style: {
639
642
  width: "100%",
640
643
  display: "flex"
@@ -653,7 +656,7 @@ const Si = (V) => {
653
656
  color: "rgba(0,0,0,0.45)",
654
657
  marginLeft: 5
655
658
  },
656
- children: lt(e)
659
+ children: rt(e)
657
660
  }) : null]
658
661
  })
659
662
  }) : /* @__PURE__ */ s("span", {
@@ -672,18 +675,18 @@ const Si = (V) => {
672
675
  })
673
676
  }) : /* @__PURE__ */ s("div", {
674
677
  className: "empty",
675
- children: n.total === 0 ? /* @__PURE__ */ s(Dt, {
676
- image: wt,
677
- description: /* @__PURE__ */ T("span", {
678
- children: ["暂无数据", y !== "hascode" && !G && /* @__PURE__ */ s("span", {
679
- children: C && C.add && /* @__PURE__ */ T(ne, {
678
+ children: n.total === 0 ? /* @__PURE__ */ s(It, {
679
+ image: Nt,
680
+ description: /* @__PURE__ */ V("span", {
681
+ children: ["暂无数据", L !== "hascode" && !G && /* @__PURE__ */ s("span", {
682
+ children: I && I.add && /* @__PURE__ */ V(ie, {
680
683
  type: "link",
681
684
  size: "small",
682
685
  style: {
683
686
  padding: 0
684
687
  },
685
- onClick: () => oe(!0),
686
- disabled: F === $.Pending || F === $.Started,
688
+ onClick: () => re(!0),
689
+ disabled: R === U.Pending || R === U.Started,
687
690
  children: [/* @__PURE__ */ s("span", {
688
691
  style: {
689
692
  color: "black"
@@ -693,26 +696,26 @@ const Si = (V) => {
693
696
  })
694
697
  })]
695
698
  })
696
- }) : /* @__PURE__ */ s(kt, {})
699
+ }) : /* @__PURE__ */ s(Lt, {})
697
700
  })]
698
- }), !g && W.labels && /* @__PURE__ */ s("div", {
701
+ }), !v && j.labels && /* @__PURE__ */ s("div", {
699
702
  className: "d-sider",
700
- children: /* @__PURE__ */ s(At, {
703
+ children: /* @__PURE__ */ s(Pt, {
701
704
  datasetId: o,
702
705
  data: P || [],
703
- selected: Z,
706
+ selected: F,
704
707
  onSelectedChange: (e) => {
705
- se((P == null ? void 0 : P.filter((t) => e.find((l) => l.label === t.label))) || []);
708
+ oe((P == null ? void 0 : P.filter((t) => e.find((l) => l.label === t.label))) || []);
706
709
  },
707
710
  onListChange: (e) => {
708
711
  i && (f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((t) => {
709
- const r = (t || []).filter((u) => u.label !== "nocode").map((u, k) => ({
710
- label: u.label,
711
- count: u.count,
712
- id: u.id,
713
- color: Be[k % 40]
714
- })), d = Z.filter((u) => r.some((k) => k.id === u.id));
715
- Le(r), Z.length !== d.length && se(d);
712
+ const r = (t || []).filter((h) => h.label !== "nocode").map((h, k) => ({
713
+ label: h.label,
714
+ count: h.count,
715
+ id: h.id,
716
+ color: Me[k % 40]
717
+ })), c = F.filter((h) => r.some((k) => k.id === h.id));
718
+ ye(r), F.length !== c.length && oe(c);
716
719
  }), x());
717
720
  },
718
721
  isPreLabel: w
@@ -731,5 +734,5 @@ const Si = (V) => {
731
734
  });
732
735
  };
733
736
  export {
734
- Si as default
737
+ bi as default
735
738
  };