@glodon-aiot/dataset-annotation 3.24.0-alpha.6 → 3.25.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/es/components/ClassificationAnnotation/index.mjs +374 -325
  2. package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +82 -78
  3. package/dist/es/components/DetectionAnnotation/components/ImageModal/index.mjs +28 -26
  4. package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +173 -166
  5. package/dist/es/components/DetectionAnnotation/index.mjs +478 -473
  6. package/dist/es/components/OcrAnnotation/OCRBoxDetail/index.mjs +249 -230
  7. package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +103 -98
  8. package/dist/es/components/OcrAnnotation/index.mjs +281 -248
  9. package/dist/es/components/VLMAnnotationDetail/VLMDetail/index.mjs +277 -272
  10. package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +42 -40
  11. package/dist/es/components/VLMAnnotationDetail/index.mjs +331 -278
  12. package/dist/es/index.mjs +1 -1
  13. package/dist/es/utils/checkVlmSampleLabeled.mjs +7 -0
  14. package/dist/es/utils/scrollSampleIntoView.mjs +16 -0
  15. package/dist/lib/index.js +4 -4
  16. package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +2 -0
  17. package/dist/src/components/DetectionAnnotation/components/ImageModal/index.d.ts +2 -0
  18. package/dist/src/components/OcrAnnotation/OCRBoxDetail/index.d.ts +2 -0
  19. package/dist/src/components/OcrAnnotation/OcrModal/index.d.ts +1 -0
  20. package/dist/src/components/VLMAnnotationDetail/VLMDetail/index.d.ts +6 -0
  21. package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +5 -0
  22. package/dist/src/utils/checkVlmSampleLabeled.d.ts +8 -0
  23. package/dist/src/utils/scrollSampleIntoView.d.ts +9 -0
  24. package/package.json +2 -2
@@ -1,87 +1,88 @@
1
- var Xt = Object.defineProperty, Jt = Object.defineProperties;
2
- var Qt = Object.getOwnPropertyDescriptors;
3
- var st = Object.getOwnPropertySymbols;
4
- var Yt = Object.prototype.hasOwnProperty, en = Object.prototype.propertyIsEnumerable;
5
- var ct = (L, g, a) => g in L ? Xt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : L[g] = a, b = (L, g) => {
1
+ var Yt = Object.defineProperty, en = Object.defineProperties;
2
+ var tn = Object.getOwnPropertyDescriptors;
3
+ var at = Object.getOwnPropertySymbols;
4
+ var nn = Object.prototype.hasOwnProperty, rn = Object.prototype.propertyIsEnumerable;
5
+ var dt = (L, g, a) => g in L ? Yt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : L[g] = a, b = (L, g) => {
6
6
  for (var a in g || (g = {}))
7
- Yt.call(g, a) && ct(L, a, g[a]);
8
- if (st)
9
- for (var a of st(g))
10
- en.call(g, a) && ct(L, a, g[a]);
7
+ nn.call(g, a) && dt(L, a, g[a]);
8
+ if (at)
9
+ for (var a of at(g))
10
+ rn.call(g, a) && dt(L, a, g[a]);
11
11
  return L;
12
- }, S = (L, g) => Jt(L, Qt(g));
13
- var Fe = (L, g, a) => new Promise((Q, ve) => {
14
- var ye = (x) => {
12
+ }, S = (L, g) => en(L, tn(g));
13
+ var He = (L, g, a) => new Promise((J, be) => {
14
+ var ve = (I) => {
15
15
  try {
16
- oe(a.next(x));
16
+ oe(a.next(I));
17
17
  } catch (le) {
18
- ve(le);
18
+ be(le);
19
19
  }
20
- }, R = (x) => {
20
+ }, T = (I) => {
21
21
  try {
22
- oe(a.throw(x));
22
+ oe(a.throw(I));
23
23
  } catch (le) {
24
- ve(le);
24
+ be(le);
25
25
  }
26
- }, oe = (x) => x.done ? Q(x.value) : Promise.resolve(x.value).then(ye, R);
26
+ }, oe = (I) => I.done ? J(I.value) : Promise.resolve(I.value).then(ve, T);
27
27
  oe((a = a.apply(L, g)).next());
28
28
  });
29
- import { jsx as c, jsxs as m, Fragment as at } from "react/jsx-runtime";
30
- import { useRef as j, useState as p, useLayoutEffect as tn, useEffect as I, useCallback as nn } from "react";
31
- import { message as D, ConfigProvider as rn, Space as be, Select as on, Button as re, Dropdown as dt, Tabs as ln, Checkbox as ft, Col as sn, Tooltip as cn, Empty as an, Spin as dn, Modal as Le } from "antd";
32
- import fn from "rc-virtual-list";
33
- import { UploadZipsStatus as ie, PreLabelTaskStatus as hn } from "@glodon-aiot/apis";
34
- import un from "antd/es/locale/zh_CN";
35
- import gn from "../../DatasetContext/index.mjs";
36
- import pn from "./icon_item_empty.svg.mjs";
29
+ import { jsx as s, jsxs as m, Fragment as ft } from "react/jsx-runtime";
30
+ import { useRef as q, useState as p, useLayoutEffect as on, useEffect as C, useCallback as ln } from "react";
31
+ import { message as D, ConfigProvider as sn, Space as me, Select as cn, Button as re, Dropdown as ut, Tabs as an, Checkbox as ht, Col as dn, Tooltip as fn, Empty as un, Spin as hn, Modal as De } from "antd";
32
+ import gn from "rc-virtual-list";
33
+ import { UploadZipsStatus as ie, PreLabelTaskStatus as pn } from "@glodon-aiot/apis";
34
+ import mn from "antd/es/locale/zh_CN";
35
+ import bn from "../../DatasetContext/index.mjs";
36
+ import vn from "./icon_item_empty.svg.mjs";
37
37
  import "./style.less.mjs";
38
- import { tagColors as ht } from "../../utils/index.mjs";
39
- import mn from "./components/Labels/index.mjs";
40
- import { useKeyPress as bn } from "ahooks";
41
- import ut from "./components/DisabledTooltip/index.mjs";
42
- import vn from "./PreSamplesPage/index.mjs";
43
- import { DownOutlined as gt, SearchOutlined as yn } from "@ant-design/icons";
44
- import Sn from "../../Common/Page/index.mjs";
45
- import Cn from "../PicZipImportModal/index.mjs";
46
- import In from "../PageNav/index.mjs";
47
- import xn from "../Thumbnail/index.mjs";
48
- import kn from "../CompositionInput/index.mjs";
49
- import { Prompt as Ln } from "../hooks/Prompt.mjs";
50
- import wn from "../PreLabelOCR/index.mjs";
51
- import Dn from "lodash/merge";
52
- import { DEFAULT_FILTER_SWITCH as Nn } from "../../constant.mjs";
53
- import Rn from "../DetectionStatus/index.mjs";
54
- import Tn from "./components/ImageModal/index.mjs";
55
- import Pn from "./hooks/useSamplePreload.mjs";
56
- var Vn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm = "CONFIRM", L.Save = "Save", L))(Vn || {});
57
- const ar = (L) => {
38
+ import { tagColors as gt } from "../../utils/index.mjs";
39
+ import { scrollSampleIntoView as Sn, getVirtualListHolder as yn } from "../../utils/scrollSampleIntoView.mjs";
40
+ import Cn from "./components/Labels/index.mjs";
41
+ import { useKeyPress as In } from "ahooks";
42
+ import pt from "./components/DisabledTooltip/index.mjs";
43
+ import xn from "./PreSamplesPage/index.mjs";
44
+ import { DownOutlined as mt, SearchOutlined as kn } from "@ant-design/icons";
45
+ import Ln from "../../Common/Page/index.mjs";
46
+ import wn from "../PicZipImportModal/index.mjs";
47
+ import Dn from "../PageNav/index.mjs";
48
+ import Nn from "../Thumbnail/index.mjs";
49
+ import Tn from "../CompositionInput/index.mjs";
50
+ import { Prompt as Rn } from "../hooks/Prompt.mjs";
51
+ import Pn from "../PreLabelOCR/index.mjs";
52
+ import Vn from "lodash/merge";
53
+ import { DEFAULT_FILTER_SWITCH as zn } from "../../constant.mjs";
54
+ import An from "../DetectionStatus/index.mjs";
55
+ import En from "./components/ImageModal/index.mjs";
56
+ import Fn from "./hooks/useSamplePreload.mjs";
57
+ var Bn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm = "CONFIRM", L.Save = "Save", L))(Bn || {});
58
+ const pr = (L) => {
58
59
  const {
59
60
  services: g,
60
61
  datasetId: a,
61
- versionId: Q,
62
- backTo: ve,
63
- labelManager: ye = !1,
64
- datasetManager: R = !1,
62
+ versionId: J,
63
+ backTo: be,
64
+ labelManager: ve = !1,
65
+ datasetManager: T = !1,
65
66
  annotation: oe,
66
- header: x = {
67
+ header: I = {
67
68
  versionSelect: !1
68
69
  },
69
70
  exampleSrcRoot: le
70
- } = L, se = b({}, Nn);
71
- Dn(se, L.filterSwitch);
72
- const Se = !!(R && R.delete), G = !!(R && R.label), we = Se || G, ce = j(null), De = j(null), [pt, mt] = p(0), [k, Oe] = p(), [o, ae] = p(), [Ce, bt] = p([]), [He, Ue] = p(!1), [de, qe] = p(0), [fe, Ke] = p(0), [h, Ne] = p(""), [Y, We] = p(0), [vt, yt] = p(), [$e, Re] = p(!1), [je, St] = p(!1), [Ge, Ct] = p(!0), [It, xt] = p(!1), [O, Ze] = p([]), [v, U] = p([]), [he, Z] = p(!1), [ee, ue] = p(!1), [M, V] = p(-1), [u, N] = p(), [kt, _e] = p(), [f, z] = p(), [l, T] = p({
71
+ } = L, se = b({}, zn);
72
+ Vn(se, L.filterSwitch);
73
+ const Se = !!(T && T.delete), j = !!(T && T.label), Ne = Se || j, ce = q(null), Te = q(null), [bt, vt] = p(0), [k, Ue] = p(), [o, ae] = p(), [ye, St] = p([]), [qe, Ke] = p(!1), [de, We] = p(0), [fe, $e] = p(0), [u, Re] = p(""), [Q, je] = p(0), [yt, Ct] = p(), [Ge, Pe] = p(!1), [Ze, It] = p(!1), [_e, xt] = p(!0), [kt, Lt] = p(!1), [F, Xe] = p([]), [v, H] = p([]), [ue, G] = p(!1), [Y, he] = p(!1), [E, V] = p(-1), [h, N] = p(), [wt, Je] = p(), [Dt, Ce] = p(!1), [f, z] = p(), [l, R] = p({
73
74
  current: 0,
74
75
  pageSize: 100
75
- }), [W, Te] = p([]), [_, Lt] = p(""), [wt, Dt] = p(!1), [Xe, Je] = p(), [Ie, Pe] = p(null), [H, Qe] = p(!1), [Nt, Rt] = p(!1), [zn, Tt] = p(0), [An, Ve] = p(""), [ge, Pt] = p(""), pe = j({}), ze = j(!1), me = j(0), Ye = j(0), $ = j(0), [P, Ae] = p(/* @__PURE__ */ new Set()), [Vt, xe] = p(!1), et = j(-1);
76
- tn(() => {
76
+ }), [K, Ve] = p([]), [Z, Nt] = p(""), [Tt, Rt] = p(!1), [Qe, Ye] = p(), [Ie, ze] = p(null), [B, et] = p(!1), [Pt, Vt] = p(!1), [Mn, zt] = p(0), [On, Ae] = p(""), [ge, At] = p(""), ee = q({}), Ee = q(void 0), xe = q(!1), pe = q(0), tt = q(0), W = q(0), [P, Fe] = p(/* @__PURE__ */ new Set()), [Et, ke] = p(!1), nt = q(-1);
77
+ on(() => {
77
78
  const e = ce.current;
78
79
  if (!e)
79
80
  return;
80
81
  let t = 0;
81
82
  const n = () => {
82
83
  cancelAnimationFrame(t), t = requestAnimationFrame(() => {
83
- const s = e.clientHeight, d = Math.max(1, Math.round(s));
84
- d !== et.current && (et.current = d, mt(d));
84
+ const c = e.clientHeight, d = Math.max(1, Math.round(c));
85
+ d !== nt.current && (nt.current = d, vt(d));
85
86
  });
86
87
  };
87
88
  n();
@@ -93,189 +94,186 @@ const ar = (L) => {
93
94
  };
94
95
  }, [k]);
95
96
  const te = () => {
96
- N(void 0), z(void 0), V(-1), Z(!1), q(), setTimeout(() => {
97
- T((e) => S(b({}, e), {
97
+ N(void 0), z(void 0), V(-1), G(!1), U(), setTimeout(() => {
98
+ R((e) => S(b({}, e), {
98
99
  current: 1,
99
100
  type: void 0
100
101
  }));
101
102
  }, 10);
102
103
  };
103
- bn("Esc", te), I(() => {
104
+ In("Esc", te), C(() => {
104
105
  a && g.cvforceDatahub.getS3Iam(a).then((e) => {
105
- yt(e);
106
+ Ct(e);
106
107
  });
107
- }, [a]), I(() => {
108
+ }, [a]), C(() => {
108
109
  w();
109
- }, [o == null ? void 0 : o.id]), I(() => {
110
- a && (Ue(!0), Promise.all([
110
+ }, [o == null ? void 0 : o.id]), C(() => {
111
+ a && (Ke(!0), Promise.all([
111
112
  // 数据集
112
113
  g.cvforceDatahub.getDatasetsId(a).then((e) => {
113
- Oe(e);
114
+ Ue(e);
114
115
  }),
115
116
  // 版本列表
116
117
  g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
117
- bt(e.recordList), ae(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
118
+ St(e.recordList), ae(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
118
119
  })
119
- ]).finally(() => Ue(!1)));
120
- }, [a, Q]);
121
- const tt = () => {
120
+ ]).finally(() => Ke(!1)));
121
+ }, [a, J]);
122
+ const rt = () => {
122
123
  !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(a, o.id).then((e) => {
123
- ae(e), Lt(e.versionAsyncTask.state);
124
+ ae(e), Nt(e.versionAsyncTask.state);
124
125
  });
125
126
  };
126
- I(() => {
127
- _ !== ie.Pending && _ !== ie.Started || D.warning("文件导入中,请刷新页面再试");
128
- }, [_]), I(() => {
129
- ae(void 0), T(S(b({}, l), {
127
+ C(() => {
128
+ Z !== ie.Pending && Z !== ie.Started || D.warning("文件导入中,请刷新页面再试");
129
+ }, [Z]), C(() => {
130
+ ae(void 0), R(S(b({}, l), {
130
131
  current: 1
131
- })), U([]), tt();
132
- }, [a, Q]), I(() => {
132
+ })), H([]), rt();
133
+ }, [a, J]), C(() => {
133
134
  a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
134
- Oe(e);
135
+ Ue(e);
135
136
  });
136
- }, [a]), I(() => {
137
- me.current++, $.current++;
138
- }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, h, W]), I(() => {
139
- q();
140
- }, [W, o, h]), I(() => {
137
+ }, [a]), C(() => {
138
+ pe.current++, W.current++;
139
+ }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, u, K]), C(() => {
140
+ U();
141
+ }, [K, o, u]), C(() => {
141
142
  !o || !k || A(S(b({}, l), {
142
143
  current: 1
143
144
  })).then((e) => {
144
145
  });
145
- }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, W]), I(() => {
146
- if (ze.current) {
147
- ze.current = !1, w();
146
+ }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, K]), C(() => {
147
+ if (xe.current) {
148
+ xe.current = !1;
149
+ return;
150
+ }
151
+ if (Ee.current === l.current) {
152
+ Ee.current = void 0, w();
148
153
  return;
149
154
  }
150
155
  A().then((e) => {
151
156
  }), w();
152
- }, [l.current]), I(() => {
153
- H && w();
154
- }, [Xe]), I(() => {
155
- const e = pe.current[h];
156
- let t;
157
- e && e.page > 1 ? t = A(S(b({}, l), {
157
+ }, [l.current]), C(() => {
158
+ B && w();
159
+ }, [Qe]), C(() => {
160
+ let e = !1;
161
+ const t = ee.current[u];
162
+ let n;
163
+ return t && t.page > 1 ? n = A(S(b({}, l), {
158
164
  current: 1,
159
- pageSize: e.page * 100,
165
+ pageSize: t.page * 100,
160
166
  // 假设默认pageSize为100
161
167
  total: void 0
162
- })).then((n) => (ze.current = !0, T((r) => S(b({}, r), {
163
- current: e.page,
168
+ })).then((r) => (e || (Ee.current = t.page, R((i) => S(b({}, i), {
169
+ current: t.page,
164
170
  pageSize: 100
165
- })), n)) : t = A(S(b({}, l), {
171
+ }))), r)) : n = A(S(b({}, l), {
166
172
  current: 1,
167
173
  total: void 0
168
- })), t.then((n) => {
169
- if (n && !(!u && !ee))
170
- if (Array.isArray(n) && n.length) {
171
- const r = pe.current[h], i = r == null ? void 0 : r.index, s = i !== void 0 && i >= 0 && i < n.length ? i : 0;
172
- V(s), N(n[s]), z(void 0);
174
+ })), n.then((r) => {
175
+ if (!e && (Ce(!1), !!r && !(!h && !Y)))
176
+ if (Array.isArray(r) && r.length) {
177
+ const i = ee.current[u], c = i == null ? void 0 : i.index, d = c !== void 0 && c >= 0 && c < r.length ? c : 0;
178
+ V(d), N(r[d]), z(void 0);
173
179
  } else
174
- N(void 0), z(void 0), V(-1), q(), setTimeout(() => {
175
- T((r) => S(b({}, r), {
180
+ N(void 0), z(void 0), V(-1), U(), setTimeout(() => {
181
+ R((i) => S(b({}, i), {
176
182
  current: 1,
177
183
  type: void 0
178
184
  }));
179
185
  }, 10);
180
- });
181
- }, [h]), I(() => {
186
+ }), () => {
187
+ e = !0;
188
+ };
189
+ }, [u]), C(() => {
182
190
  var t;
183
191
  let e;
184
- if (!ee) {
185
- const n = u !== void 0, r = u == null ? void 0 : u.id, i = M;
186
- N(void 0), z(void 0), Z(!1), V(-1), _e(void 0), q(), n && ((t = De.current) == null || t.fetchLabels()), w(), r !== void 0 && (e = requestAnimationFrame(() => {
187
- var F, J;
188
- const s = (F = ce.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
189
- if (!s)
190
- return;
191
- const d = Array.from(s.querySelectorAll("[data-sample-id]")), y = (J = d.find((B) => B.dataset.sampleId === String(r))) != null ? J : i >= 0 ? d[i] : void 0;
192
- if (!y)
193
- return;
194
- const C = s.getBoundingClientRect(), E = y.getBoundingClientRect(), K = s.scrollTop + E.top - C.top - Math.max(0, (s.clientHeight - E.height) / 2);
195
- s.scrollTo({
196
- top: Math.max(0, K)
197
- });
192
+ if (!Y) {
193
+ const n = h !== void 0, r = h == null ? void 0 : h.id, i = E;
194
+ N(void 0), z(void 0), G(!1), V(-1), Je(void 0), Ce(!1), U(), n && ((t = Te.current) == null || t.fetchLabels()), w(), r !== void 0 && (e = requestAnimationFrame(() => {
195
+ Sn(yn(ce.current), r, i);
198
196
  }));
199
197
  }
200
198
  return () => {
201
199
  e !== void 0 && cancelAnimationFrame(e);
202
200
  };
203
- }, [ee]);
204
- const zt = nn((e, t) => {
205
- _e(e ? void 0 : t);
201
+ }, [Y]);
202
+ const Ft = ln((e, t) => {
203
+ Je(e ? void 0 : t);
206
204
  }, []);
207
- Pn({
205
+ Fn({
208
206
  samples: v,
209
- currentIndex: M,
210
- active: ee,
211
- loadedImageUrl: kt
212
- }), I(() => {
213
- xt(!Ge && je);
214
- }, [Ge, je]), I(() => {
207
+ currentIndex: E,
208
+ active: Y,
209
+ loadedImageUrl: wt
210
+ }), C(() => {
211
+ Lt(!_e && Ze);
212
+ }, [_e, Ze]), C(() => {
215
213
  if (!a) {
216
- Ie && (clearTimeout(Ie), Pe(null)), Je(void 0);
214
+ Ie && (clearTimeout(Ie), ze(null)), Ye(void 0);
217
215
  return;
218
216
  }
217
+ Me();
218
+ }, [a, o == null ? void 0 : o.id]), C(() => {
219
+ Me();
220
+ }, [Tt]), C(() => {
219
221
  Be();
220
- }, [a, o == null ? void 0 : o.id]), I(() => {
221
- Be();
222
- }, [wt]), I(() => {
223
- Ee();
224
- }, [H, a, o]), I(() => {
225
- me.current++, $.current++, A(S(b({}, l), {
222
+ }, [B, a, o]), C(() => {
223
+ pe.current++, W.current++, A(S(b({}, l), {
226
224
  current: 1
227
225
  })), w();
228
- }, [ge]), I(() => {
229
- Ve("");
230
- }, [u]), I(() => {
226
+ }, [ge]), C(() => {
227
+ Ae("");
228
+ }, [h]), C(() => {
231
229
  if (v.length === 0) {
232
- xe(!1);
230
+ ke(!1);
233
231
  return;
234
232
  }
235
233
  const e = v.every((t) => P.has(t.id));
236
- xe(e);
234
+ ke(e);
237
235
  }, [v, P]);
238
- const Ee = () => {
236
+ const Be = () => {
239
237
  o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
240
238
  pageNo: 1,
241
239
  pageSize: 1e3,
242
240
  confirmStatus: 1
243
241
  }).then((e) => {
244
- Tt(e.recordList.length);
242
+ zt(e.recordList.length);
245
243
  });
246
- }, Be = () => {
244
+ }, Me = () => {
247
245
  !a || !o || g.cvforceDatahub.getPreLabelTask(a, o.id).then((e) => {
248
246
  const t = e[0];
249
- if (Je(t), Ie && (clearTimeout(Ie), Pe(null)), !(t != null && t.state) || t.state !== hn.Started) {
250
- Qe(!1), w();
247
+ if (Ye(t), Ie && (clearTimeout(Ie), ze(null)), !(t != null && t.state) || t.state !== pn.Started) {
248
+ et(!1), w();
251
249
  return;
252
250
  } else
253
- Qe(!0);
254
- Pe(setTimeout(() => {
255
- Be();
251
+ et(!0);
252
+ ze(setTimeout(() => {
253
+ Me();
256
254
  }, 1e4));
257
255
  });
258
256
  };
259
- I(() => {
257
+ C(() => {
260
258
  k && k.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
261
259
  }, [k]);
262
260
  const A = (e, t) => {
263
261
  const n = (e == null ? void 0 : e.current) || l.current, r = (e == null ? void 0 : e.pageSize) || l.pageSize;
264
262
  if (!a || !o || !n)
265
263
  return Promise.resolve(!1);
266
- const i = me.current, s = W.map((C) => C.label), d = () => {
267
- switch (h) {
264
+ const i = pe.current, c = K.map((x) => x.label), d = () => {
265
+ switch (u) {
268
266
  case "nocode":
269
267
  return "nocode";
270
268
  case "pending":
271
- return s.length ? s : "";
269
+ return c.length ? c : "";
272
270
  case "hascode":
273
- return s.length ? s : "hascode";
271
+ return c.length ? c : "hascode";
274
272
  default:
275
- return s.length ? s : void 0;
273
+ return c.length ? c : void 0;
276
274
  }
277
275
  }, y = () => {
278
- switch (h) {
276
+ switch (u) {
279
277
  case "nocode":
280
278
  case "hascode":
281
279
  return 0;
@@ -285,7 +283,7 @@ const ar = (L) => {
285
283
  return 2;
286
284
  }
287
285
  };
288
- return n === 1 && Ut(), T(S(b({}, l), {
286
+ return n === 1 && Wt(), R(S(b({}, l), {
289
287
  current: n,
290
288
  pageSize: r
291
289
  })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
@@ -294,38 +292,38 @@ const ar = (L) => {
294
292
  labels: d(),
295
293
  confirmStatus: y(),
296
294
  searchName: ge
297
- }).then((C) => {
298
- if (i !== me.current)
295
+ }).then((x) => {
296
+ if (i !== pe.current)
299
297
  return !1;
300
- const E = C.recordList || [], K = n === 1 ? E : [...t || v, ...E];
301
- if (U(K), T(S(b({}, l), {
298
+ const M = x.recordList || [], X = n === 1 ? M : [...t || v, ...M];
299
+ if (H(X), R(S(b({}, l), {
302
300
  current: n,
303
301
  pageSize: r,
304
- total: C.totalResults
305
- })), l.type === "next" && E.length) {
302
+ total: x.totalResults
303
+ })), l.type === "next" && M.length) {
306
304
  V(0);
307
- const F = C.recordList[0];
308
- N(F);
305
+ const $ = x.recordList[0];
306
+ N($);
309
307
  }
310
- if (l.type === "prev" && E.length) {
308
+ if (l.type === "prev" && M.length) {
311
309
  V(l.pageSize - 1);
312
- const F = C.recordList[l.pageSize - 1];
313
- N(F);
310
+ const $ = x.recordList[l.pageSize - 1];
311
+ N($);
314
312
  }
315
- return he && M < 0 && (V(0), N(E[0]), ue(!0)), K;
313
+ return ue && E < 0 && (V(0), N(M[0]), he(!0)), X;
316
314
  }).catch(() => !1);
317
315
  };
318
- I(() => {
319
- T(h === "nocode" ? S(b({}, l), {
316
+ C(() => {
317
+ R(u === "nocode" ? S(b({}, l), {
320
318
  total: de
321
- }) : h === "" ? S(b({}, l), {
322
- total: Y
323
- }) : h === "pending" ? S(b({}, l), {
319
+ }) : u === "" ? S(b({}, l), {
320
+ total: Q
321
+ }) : u === "pending" ? S(b({}, l), {
324
322
  total: fe
325
323
  }) : S(b({}, l), {
326
- total: Y - de - fe
324
+ total: Q - de - fe
327
325
  }));
328
- }, [de, Y, fe]);
326
+ }, [de, Q, fe]);
329
327
  const w = () => {
330
328
  !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
331
329
  label: "allcode",
@@ -333,100 +331,100 @@ const ar = (L) => {
333
331
  searchName: ge
334
332
  }).then((e) => {
335
333
  const t = e.find((i) => i.id === "allcodeid"), n = e.find((i) => i.id === "nocodeid"), r = e.find((i) => i.id === "pendingid");
336
- We(t ? t.count : 0), qe(n ? n.count : 0), Ke(r ? r.count : 0);
334
+ je(t ? t.count : 0), We(n ? n.count : 0), $e(r ? r.count : 0);
337
335
  });
338
- }, q = () => {
336
+ }, U = () => {
339
337
  if (!a || !(o != null && o.id))
340
338
  return;
341
- const e = ++Ye.current;
339
+ const e = ++tt.current;
342
340
  let t = 2;
343
- return h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
341
+ return u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
344
342
  confirmStatus: t
345
343
  }).then((n) => {
346
- if (e !== Ye.current)
344
+ if (e !== tt.current)
347
345
  return;
348
- const i = (n || []).filter((s) => s.label !== "nocode").map((s, d) => {
346
+ const i = (n || []).filter((c) => c.label !== "nocode").map((c, d) => {
349
347
  var y;
350
348
  return {
351
- label: s.label,
352
- count: s.count,
353
- boxCount: (y = s.boxCount) != null ? y : 0,
354
- id: s.id,
355
- color: ht[d % 40]
349
+ label: c.label,
350
+ count: c.count,
351
+ boxCount: (y = c.boxCount) != null ? y : 0,
352
+ id: c.id,
353
+ color: gt[d % 40]
356
354
  };
357
355
  });
358
- return Ze(i), n;
356
+ return Xe(i), n;
359
357
  });
360
- }, At = (e) => {
358
+ }, Bt = (e) => {
361
359
  if (!v)
362
360
  return;
363
- Z(!1), V(e);
361
+ G(!1), V(e);
364
362
  const t = v[e];
365
- N(t), z(void 0), ue(!0), h !== void 0 && (pe.current[h] = {
363
+ N(t), z(void 0), he(!0), u !== void 0 && (ee.current[u] = {
366
364
  index: e,
367
365
  page: l.current || 1
368
366
  });
369
367
  };
370
- I(() => {
368
+ C(() => {
371
369
  l.type || A();
372
- }, [l.type]), I(() => {
370
+ }, [l.type]), C(() => {
373
371
  if (!f)
374
372
  return;
375
373
  const e = [];
376
374
  f == null || f.labels.forEach((t) => {
377
- O != null && O.find((n) => n.id === t.id) && e.push(t);
375
+ F != null && F.find((n) => n.id === t.id) && e.push(t);
378
376
  }), e.length !== f.labels.length && z(S(b({}, f), {
379
377
  labels: e
380
378
  }));
381
- }, [O]);
382
- const X = (e, t, n, r) => {
379
+ }, [F]);
380
+ const _ = (e, t, n, r) => {
383
381
  setTimeout(() => {
384
- r === $.current && (V(t), N(e[t]), z(void 0), h !== void 0 && (pe.current[h] = {
382
+ r === W.current && (V(t), N(e[t]), z(void 0), u !== void 0 && (ee.current[u] = {
385
383
  index: t,
386
384
  page: n
387
385
  }));
388
386
  }, 0);
389
- }, nt = (e, t) => {
387
+ }, it = (e, t) => {
390
388
  if (!v)
391
389
  return;
392
- const n = ++$.current;
393
- if (!he) {
394
- U((r) => {
390
+ const n = ++W.current;
391
+ if (!ue) {
392
+ H((r) => {
395
393
  var y;
396
394
  if (!Array.isArray(r) || !r.length)
397
395
  return te(), r;
398
- const i = M + 1, d = !!W.length ? r.length : (y = l.total) != null ? y : r.length;
396
+ const i = E + 1, d = !!K.length ? r.length : (y = l.total) != null ? y : r.length;
399
397
  return i >= r.length ? i >= d ? D.error("已经是最后一个了") : A({
400
398
  current: l.current + 1,
401
399
  pageSize: l.pageSize,
402
400
  type: "next"
403
- }, r).then((C) => {
404
- Array.isArray(C) && X(C, i, l.current + 1, n);
405
- }) : X(r, i, l.current || 1, n), r;
401
+ }, r).then((x) => {
402
+ Array.isArray(x) && _(x, i, l.current + 1, n);
403
+ }) : _(r, i, l.current || 1, n), r;
406
404
  });
407
405
  return;
408
406
  }
409
- return ke(e, t).then((r) => (r && n === $.current && (console.log("action", t, "changedSample", f), w(), U((i) => {
407
+ return Le(e, t).then((r) => (r && n === W.current && (console.log("action", t, "changedSample", f), w(), H((i) => {
410
408
  var d, y;
411
- let s;
409
+ let c;
412
410
  if (Array.isArray(i)) {
413
411
  if (!i.length)
414
412
  return te(), i;
415
- const C = h === "", E = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && h === "hascode", J = C || K || F || E ? M + 1 : M;
413
+ const x = u === "", M = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && u === "nocode", X = t !== "CONFIRM" && u === "pending", $ = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && u === "hascode", we = x || X || $ || M ? E + 1 : E;
416
414
  if (f) {
417
- if (f.labels.length && h === "nocode" || !f.labels.length && h === "hascode" || t === "CONFIRM" && h === "pending") {
418
- const B = i.findIndex((Me) => Me.id === f.id);
419
- B > -1 && (i.splice(B, 1), s = [...i], l.total && (l.total = l.total - 1));
415
+ if (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode" || t === "CONFIRM" && u === "pending") {
416
+ const O = i.findIndex((Oe) => Oe.id === f.id);
417
+ O > -1 && (i.splice(O, 1), c = [...i], l.total && (l.total = l.total - 1));
420
418
  }
421
- } else if (t === "CONFIRM" && h === "pending") {
422
- const B = i.findIndex((Me) => Me.id === (u == null ? void 0 : u.id));
423
- B > -1 && (i.splice(B, 1), s = [...i], l.total && (l.total = l.total - 1));
419
+ } else if (t === "CONFIRM" && u === "pending") {
420
+ const O = i.findIndex((Oe) => Oe.id === (h == null ? void 0 : h.id));
421
+ O > -1 && (i.splice(O, 1), c = [...i], l.total && (l.total = l.total - 1));
424
422
  }
425
- if (J >= i.length)
426
- if (l.total && J >= l.total) {
423
+ if (we >= i.length)
424
+ if (l.total && we >= l.total) {
427
425
  if (i.length > 0) {
428
- const B = i.length - 1;
429
- X(i, B, l.current || 1, n);
426
+ const O = i.length - 1;
427
+ _(i, O, l.current || 1, n);
430
428
  }
431
429
  D.error("已经是最后一个了");
432
430
  } else
@@ -434,127 +432,127 @@ const ar = (L) => {
434
432
  current: l.current + 1,
435
433
  pageSize: l.pageSize,
436
434
  type: "next"
437
- }, i).then((B) => {
438
- Array.isArray(B) && X(B, J, l.current + 1, n);
435
+ }, i).then((O) => {
436
+ Array.isArray(O) && _(O, we, l.current + 1, n);
439
437
  });
440
438
  else
441
- X(i, J, l.current || 1, n);
439
+ _(i, we, l.current || 1, n);
442
440
  }
443
- return s || i;
441
+ return c || i;
444
442
  })), r));
445
- }, Et = (e) => {
443
+ }, Mt = (e) => {
446
444
  if (!v)
447
445
  return;
448
- const t = ++$.current;
449
- if (!he) {
450
- U((n) => {
446
+ const t = ++W.current;
447
+ if (!ue) {
448
+ H((n) => {
451
449
  if (!Array.isArray(n) || !n.length)
452
450
  return te(), n;
453
- const r = M - 1;
454
- return r < 0 ? D.error("已经是第一个了") : X(n, r, l.current || 1, t), n;
451
+ const r = E - 1;
452
+ return r < 0 ? D.error("已经是第一个了") : _(n, r, l.current || 1, t), n;
455
453
  });
456
454
  return;
457
455
  }
458
- ke(e).then((n) => {
459
- n && t === $.current && (w(), U((r) => {
456
+ Le(e).then((n) => {
457
+ n && t === W.current && (w(), H((r) => {
460
458
  let i;
461
459
  if (Array.isArray(r)) {
462
460
  if (!r.length)
463
461
  return te(), r;
464
- const s = M - 1;
465
- if (s < 0)
466
- s < 0 ? D.error("已经是第一个了") : T({
462
+ const c = E - 1;
463
+ if (c < 0)
464
+ c < 0 ? D.error("已经是第一个了") : R({
467
465
  current: l.current - 1,
468
466
  pageSize: l.pageSize,
469
467
  type: "prev"
470
468
  });
471
469
  else {
472
- if (f && (f.labels.length && h === "nocode" || !f.labels.length && h === "hascode")) {
470
+ if (f && (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode")) {
473
471
  const d = r.findIndex((y) => y.id === f.id);
474
472
  d > -1 && (r.splice(d, 1), i = [...r], l.total && (l.total = l.total - 1));
475
473
  }
476
- X(r, s, l.current || 1, t);
474
+ _(r, c, l.current || 1, t);
477
475
  }
478
476
  }
479
477
  return i || r;
480
478
  }));
481
479
  });
482
- }, Bt = (e) => {
480
+ }, Ot = (e) => {
483
481
  const t = Object.keys(e.labels.reduce((n, r) => (n[r.label] ? ++n[r.label] : n[r.label] = 1, n), {})).length;
484
482
  return t >= 2 ? `+${t - 1}` : null;
485
- }, Mt = (e) => {
486
- var C, E;
483
+ }, Ht = (e) => {
484
+ var x, M;
487
485
  const {
488
486
  scrollTop: t,
489
487
  scrollHeight: n,
490
488
  clientHeight: r
491
- } = e.currentTarget, i = n - t - r, s = 3, d = (C = l.pageSize) != null ? C : 100, y = (E = l.current) != null ? E : 0;
492
- y >= 1 && v.length > 0 && v.length < y * d || (!l.total || l.total > v.length) && i <= s && T((K) => {
493
- var F;
494
- return S(b({}, K), {
495
- current: ((F = K.current) != null ? F : 0) + 1
489
+ } = e.currentTarget, i = n - t - r, c = 3, d = (x = l.pageSize) != null ? x : 100, y = (M = l.current) != null ? M : 0;
490
+ y >= 1 && v.length > 0 && v.length < y * d || (!l.total || l.total > v.length) && i <= c && R((X) => {
491
+ var $;
492
+ return S(b({}, X), {
493
+ current: (($ = X.current) != null ? $ : 0) + 1
496
494
  });
497
495
  });
498
- }, ke = (e, t) => {
496
+ }, Le = (e, t) => {
499
497
  var n, r;
500
498
  if (!o)
501
499
  return Promise.resolve(!1);
502
- if (f && !H) {
500
+ if (f && !B) {
503
501
  const i = S(b({}, f), {
504
502
  labels: f.labels ? [...f.labels] : []
505
503
  });
506
- return i.labels && (i.labels = i.labels.filter((s) => !!s.id)), e !== void 0 && (i.confirmStatus = e, i.isLabeled = ((n = i.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [i], e).then(() => {
504
+ return i.labels && (i.labels = i.labels.filter((c) => !!c.id)), e !== void 0 && (i.confirmStatus = e, i.isLabeled = ((n = i.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [i], e).then(() => {
507
505
  D.success({
508
506
  content: "保存成功"
509
507
  });
510
- const s = S(b({}, i), {
508
+ const c = S(b({}, i), {
511
509
  labels: i.labels ? [...i.labels] : []
512
510
  });
513
- return U((d) => {
514
- const y = d.findIndex((C) => C.id === (s == null ? void 0 : s.id));
511
+ return H((d) => {
512
+ const y = d.findIndex((x) => x.id === (c == null ? void 0 : c.id));
515
513
  if (y > -1) {
516
- const C = [...d];
517
- return C[y] = s, C;
514
+ const x = [...d];
515
+ return x[y] = c, x;
518
516
  }
519
517
  return d;
520
- }), N(s), z(s), !0;
518
+ }), N(c), z(c), !0;
521
519
  }).catch(() => !1);
522
520
  } else
523
- return !f && !H && u ? t !== "CONFIRM" && h === "pending" || h === "nocode" || h === "hascode" || h === "" && (u.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (u.labels && (u.labels = u.labels.filter((i) => !!i.id)), e !== void 0 && (u.confirmStatus = e, u.isLabeled = ((r = u.labels) == null ? void 0 : r.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [u], e).then(() => (D.success({
521
+ return !f && !B && h ? t !== "CONFIRM" && u === "pending" || u === "nocode" || u === "hascode" || u === "" && (h.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (h.labels && (h.labels = h.labels.filter((i) => !!i.id)), e !== void 0 && (h.confirmStatus = e, h.isLabeled = ((r = h.labels) == null ? void 0 : r.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [h], e).then(() => (D.success({
524
522
  content: "保存成功"
525
- }), U((i) => {
526
- const s = i.findIndex((d) => d.id === (u == null ? void 0 : u.id));
527
- return s > -1 && (i[s] = u), [...i];
528
- }), N(b({}, u)), !0)).catch(() => !1)) : Promise.resolve(!0);
529
- }, Ft = (e, t) => {
523
+ }), H((i) => {
524
+ const c = i.findIndex((d) => d.id === (h == null ? void 0 : h.id));
525
+ return c > -1 && (i[c] = h), [...i];
526
+ }), N(b({}, h)), !0)).catch(() => !1)) : Promise.resolve(!0);
527
+ }, Ut = (e, t) => {
530
528
  if (f && f.labels.some((n) => !n.id))
531
529
  return D.error("所有标注需设置标签"), Promise.resolve(!1);
532
- nt(e, t);
533
- }, Ot = (e) => {
530
+ it(e, t);
531
+ }, qt = (e) => {
534
532
  if (f && f.labels.some((t) => !t.id)) {
535
533
  D.error("所有标注需设置标签");
536
534
  return;
537
535
  }
538
536
  if (!f) {
539
- Z(!1);
537
+ G(!1);
540
538
  return;
541
539
  }
542
- ke(e).then((t) => {
543
- t && (z(void 0), Z(!1), w(), q());
540
+ Le(e).then((t) => {
541
+ t && (z(void 0), G(!1), w(), U());
544
542
  });
545
- }, Ht = () => {
546
- Le.confirm({
543
+ }, Kt = () => {
544
+ De.confirm({
547
545
  title: "确认要删除当前数据吗?",
548
546
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
549
547
  onOk: () => {
550
- !u || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, o.id, u.id).then(() => {
551
- const e = v.findIndex((n) => n.id === u.id);
548
+ !h || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, o.id, h.id).then(() => {
549
+ const e = v.findIndex((n) => n.id === h.id);
552
550
  v.splice(e, 1);
553
551
  const t = v.length;
554
- U([...v]), T(S(b({}, l), {
552
+ H([...v]), R(S(b({}, l), {
555
553
  total: l.total ? l.total - 1 : 0
556
- })), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (N(void 0), z(void 0), V(-1), he || ue(!1), setTimeout(() => {
557
- T((n) => S(b({}, n), {
554
+ })), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (N(void 0), z(void 0), V(-1), ue || he(!1), setTimeout(() => {
555
+ R((n) => S(b({}, n), {
558
556
  current: 1,
559
557
  type: void 0
560
558
  }));
@@ -562,9 +560,9 @@ const ar = (L) => {
562
560
  });
563
561
  }
564
562
  });
565
- }, rt = [{
563
+ }, ot = [{
566
564
  key: "",
567
- label: `全部(${Y})`,
565
+ label: `全部(${Q})`,
568
566
  children: null
569
567
  }, {
570
568
  key: "nocode",
@@ -576,29 +574,35 @@ const ar = (L) => {
576
574
  children: null
577
575
  }, {
578
576
  key: "hascode",
579
- label: `已标注(${Y - de - fe})`,
577
+ label: `已标注(${Q - de - fe})`,
580
578
  children: null
581
- }], Ut = () => {
579
+ }], Wt = () => {
582
580
  var e, t;
583
581
  (t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
584
582
  top: 0
585
583
  });
586
- }, qt = (e) => {
587
- Pt(e), ne();
588
- }, it = (e) => {
589
- me.current++, $.current++, M >= 0 && h !== void 0 && h !== null && (pe.current[h] = {
590
- index: M,
591
- page: l.current || 1
592
- }), ne(), f ? ke(f == null ? void 0 : f.confirmStatus).then((t) => {
593
- t ? (Ne(e), w()) : D.error("保存失败");
594
- }) : (T(S(b({}, l), {
584
+ }, $t = (e) => {
585
+ At(e), ne();
586
+ }, lt = (e) => {
587
+ if (pe.current++, W.current++, E >= 0 && u !== void 0 && u !== null) {
588
+ const n = ee.current[u];
589
+ !!n && n.page > 1 && (l.current || 1) === 1 || (ee.current[u] = {
590
+ index: E,
591
+ page: l.current || 1
592
+ });
593
+ }
594
+ ne(), e !== u && Ce(!0);
595
+ const t = (l.current || 1) !== 1;
596
+ f ? Le(f == null ? void 0 : f.confirmStatus).then((n) => {
597
+ n ? (xe.current = t, Re(e), w()) : (Ce(!1), D.error("保存失败"));
598
+ }) : (xe.current = t, R(S(b({}, l), {
595
599
  current: 1,
596
600
  total: void 0
597
- })), Ne(e)), e === "nocode" && Te([]);
598
- }, Kt = () => {
601
+ })), Re(e)), e === "nocode" && Ve([]);
602
+ }, jt = () => {
599
603
  if (console.log("一键确认", g, o), !(g != null && g.cvforceDatahub) || !(o != null && o.id))
600
604
  return Promise.resolve(!1);
601
- Le.confirm({
605
+ De.confirm({
602
606
  title: "一键保存所有标注?",
603
607
  content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
604
608
  onOk: () => {
@@ -609,19 +613,19 @@ const ar = (L) => {
609
613
  });
610
614
  }
611
615
  });
612
- }, Wt = (e, t) => {
616
+ }, Gt = (e, t) => {
613
617
  const n = new Set(P);
614
- t ? n.add(e) : n.delete(e), Ae(n);
615
- }, $t = (e) => {
618
+ t ? n.add(e) : n.delete(e), Fe(n);
619
+ }, Zt = (e) => {
616
620
  const t = new Set(P);
617
621
  e ? v.forEach((n) => {
618
622
  t.add(n.id);
619
623
  }) : v.forEach((n) => {
620
624
  t.delete(n.id);
621
- }), Ae(t), xe(e);
625
+ }), Fe(t), ke(e);
622
626
  }, ne = () => {
623
- Ae(/* @__PURE__ */ new Set()), xe(!1);
624
- }, ot = () => {
627
+ Fe(/* @__PURE__ */ new Set()), ke(!1);
628
+ }, st = () => {
625
629
  const e = v.filter((n) => P.has(n.id)), t = {
626
630
  nocode: 0,
627
631
  pending: 0,
@@ -630,15 +634,15 @@ const ar = (L) => {
630
634
  return e.forEach((n) => {
631
635
  n.confirmStatus === 1 ? t.pending++ : !n.labels || n.labels.length === 0 ? t.nocode++ : t.hascode++;
632
636
  }), t;
633
- }, jt = () => {
637
+ }, _t = () => {
634
638
  if (!Se)
635
639
  return;
636
640
  if (P.size === 0) {
637
641
  D.warning("请先选择要删除的图片");
638
642
  return;
639
643
  }
640
- const e = ot(), t = e.nocode > 0, n = e.pending > 0, r = e.hascode > 0, i = /* @__PURE__ */ m("div", {
641
- children: [/* @__PURE__ */ c("p", {
644
+ const e = st(), t = e.nocode > 0, n = e.pending > 0, r = e.hascode > 0, i = /* @__PURE__ */ m("div", {
645
+ children: [/* @__PURE__ */ s("p", {
642
646
  style: {
643
647
  marginBottom: 16
644
648
  },
@@ -653,7 +657,7 @@ const ar = (L) => {
653
657
  alignItems: "center",
654
658
  marginBottom: 4
655
659
  },
656
- children: [/* @__PURE__ */ c("span", {
660
+ children: [/* @__PURE__ */ s("span", {
657
661
  style: {
658
662
  display: "inline-block",
659
663
  padding: "2px 8px",
@@ -673,7 +677,7 @@ const ar = (L) => {
673
677
  alignItems: "center",
674
678
  marginBottom: 4
675
679
  },
676
- children: [/* @__PURE__ */ c("span", {
680
+ children: [/* @__PURE__ */ s("span", {
677
681
  style: {
678
682
  display: "inline-block",
679
683
  padding: "2px 8px",
@@ -693,7 +697,7 @@ const ar = (L) => {
693
697
  alignItems: "center",
694
698
  marginBottom: 4
695
699
  },
696
- children: [/* @__PURE__ */ c("span", {
700
+ children: [/* @__PURE__ */ s("span", {
697
701
  style: {
698
702
  display: "inline-block",
699
703
  padding: "2px 8px",
@@ -708,45 +712,45 @@ const ar = (L) => {
708
712
  children: [e.hascode, "张"]
709
713
  })]
710
714
  })]
711
- }), /* @__PURE__ */ c("p", {
715
+ }), /* @__PURE__ */ s("p", {
712
716
  style: {
713
717
  color: "red"
714
718
  },
715
719
  children: "彻底移除选中的图片文件及其关联的所有标注坐标、标签信息。数据不可恢复。"
716
720
  })]
717
721
  });
718
- Le.confirm({
722
+ De.confirm({
719
723
  title: "删除操作确认",
720
724
  content: i,
721
725
  okText: "确定",
722
726
  cancelText: "取消",
723
727
  width: 500,
724
- onOk: () => Fe(void 0, null, function* () {
728
+ onOk: () => He(void 0, null, function* () {
725
729
  if (!o)
726
730
  return;
727
- const s = Array.from(P);
728
- if (s.length === 0) {
731
+ const c = Array.from(P);
732
+ if (c.length === 0) {
729
733
  D.warning("没有选中的图片");
730
734
  return;
731
735
  }
732
736
  try {
733
- yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"), ne(), A(S(b({}, l), {
737
+ yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, c), D.success("删除成功"), ne(), A(S(b({}, l), {
734
738
  current: 1
735
- })), w(), q();
739
+ })), w(), U();
736
740
  } catch (d) {
737
741
  D.error("删除失败");
738
742
  }
739
743
  })
740
744
  });
741
- }, Gt = () => {
742
- if (!G)
745
+ }, Xt = () => {
746
+ if (!j)
743
747
  return;
744
748
  if (P.size === 0) {
745
749
  D.warning("请先选择要清除标注的图片");
746
750
  return;
747
751
  }
748
- const e = ot(), t = e.nocode > 0, n = e.pending > 0, r = e.hascode > 0, i = /* @__PURE__ */ m("div", {
749
- children: [/* @__PURE__ */ c("p", {
752
+ const e = st(), t = e.nocode > 0, n = e.pending > 0, r = e.hascode > 0, i = /* @__PURE__ */ m("div", {
753
+ children: [/* @__PURE__ */ s("p", {
750
754
  style: {
751
755
  marginBottom: 16
752
756
  },
@@ -761,7 +765,7 @@ const ar = (L) => {
761
765
  alignItems: "center",
762
766
  marginBottom: 4
763
767
  },
764
- children: [/* @__PURE__ */ c("span", {
768
+ children: [/* @__PURE__ */ s("span", {
765
769
  style: {
766
770
  display: "inline-block",
767
771
  padding: "2px 8px",
@@ -781,7 +785,7 @@ const ar = (L) => {
781
785
  alignItems: "center",
782
786
  marginBottom: 4
783
787
  },
784
- children: [/* @__PURE__ */ c("span", {
788
+ children: [/* @__PURE__ */ s("span", {
785
789
  style: {
786
790
  display: "inline-block",
787
791
  padding: "2px 8px",
@@ -801,7 +805,7 @@ const ar = (L) => {
801
805
  alignItems: "center",
802
806
  marginBottom: 4
803
807
  },
804
- children: [/* @__PURE__ */ c("span", {
808
+ children: [/* @__PURE__ */ s("span", {
805
809
  style: {
806
810
  display: "inline-block",
807
811
  padding: "2px 8px",
@@ -816,172 +820,172 @@ const ar = (L) => {
816
820
  children: [e.hascode, "张"]
817
821
  })]
818
822
  })]
819
- }), /* @__PURE__ */ c("p", {
823
+ }), /* @__PURE__ */ s("p", {
820
824
  children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
821
825
  })]
822
826
  });
823
- Le.confirm({
827
+ De.confirm({
824
828
  title: "删除操作确认",
825
829
  content: i,
826
830
  okText: "确定",
827
831
  cancelText: "取消",
828
832
  width: 500,
829
- onOk: () => Fe(void 0, null, function* () {
833
+ onOk: () => He(void 0, null, function* () {
830
834
  if (!o)
831
835
  return;
832
- const s = v.filter((d) => P.has(d.id));
833
- if (s.length === 0) {
836
+ const c = v.filter((d) => P.has(d.id));
837
+ if (c.length === 0) {
834
838
  D.warning("没有选中的图片");
835
839
  return;
836
840
  }
837
841
  try {
838
- const d = s.map((y) => S(b({}, y), {
842
+ const d = c.map((y) => S(b({}, y), {
839
843
  labels: [],
840
844
  confirmStatus: 0,
841
845
  isLabeled: !1
842
846
  }));
843
847
  yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), ne(), A(S(b({}, l), {
844
848
  current: 1
845
- })), w(), q();
849
+ })), w(), U();
846
850
  } catch (d) {
847
851
  D.error("清除标注失败");
848
852
  }
849
853
  })
850
854
  });
851
- }, Zt = [...Se ? [{
855
+ }, Jt = [...Se ? [{
852
856
  key: "deleteWithAnnotations",
853
857
  label: "删除所选图片(含标注)",
854
- onClick: jt
855
- }] : [], ...G ? [{
858
+ onClick: _t
859
+ }] : [], ...j ? [{
856
860
  key: "clearAnnotations",
857
861
  label: "仅清除所选图片内的标注",
858
- onClick: Gt
859
- }] : []], lt = !u && !!(R && R.preLabel) && !!(o != null && o.id), _t = G || lt;
860
- return /* @__PURE__ */ c(rn, {
861
- locale: un,
862
- children: /* @__PURE__ */ c(gn.Provider, {
862
+ onClick: Xt
863
+ }] : []], ct = !h && !!(T && T.preLabel) && !!(o != null && o.id), Qt = j || ct;
864
+ return /* @__PURE__ */ s(sn, {
865
+ locale: mn,
866
+ children: /* @__PURE__ */ s(bn.Provider, {
863
867
  value: {
864
868
  datasetId: a,
865
869
  versionId: (o == null ? void 0 : o.id) || "",
866
870
  no: (o == null ? void 0 : o.no) || "",
867
- loading: He,
871
+ loading: qe,
868
872
  version: o,
869
- versions: Ce,
873
+ versions: ye,
870
874
  samples: v,
871
875
  pagination: l,
872
876
  services: g,
873
877
  featuresConfig: {
874
- labelManager: ye,
875
- datasetManager: R,
878
+ labelManager: ve,
879
+ datasetManager: T,
876
880
  annotation: oe,
877
881
  filterSwitch: se,
878
- header: x,
882
+ header: I,
879
883
  exampleSrcRoot: le
880
884
  }
881
885
  },
882
- children: k ? k.markType === "detection" ? /* @__PURE__ */ c("div", {
886
+ children: k ? k.markType === "detection" ? /* @__PURE__ */ s("div", {
883
887
  className: "detection-version-detail",
884
- children: Nt ? o != null && o.id && R && R.preLabel ? /* @__PURE__ */ c(vn, {
888
+ children: Pt ? o != null && o.id && T && T.preLabel ? /* @__PURE__ */ s(xn, {
885
889
  datasetId: a,
886
890
  versionId: o.id,
887
891
  onClose: () => {
888
- Rt(!1), Ee(), q(), w(), A();
892
+ Vt(!1), Be(), U(), w(), A();
889
893
  },
890
894
  samples: v,
891
- labels: O,
892
- fetchLength: Ee
893
- }) : null : /* @__PURE__ */ m(Sn, {
895
+ labels: F,
896
+ fetchLength: Be
897
+ }) : null : /* @__PURE__ */ m(Ln, {
894
898
  className: "product-details-page",
895
- header: x === !1 ? void 0 : /* @__PURE__ */ c(In, {
896
- backTo: ve,
897
- onBackClick: x != null && x.onBackClick ? () => {
898
- u && te(), x.onBackClick && x.onBackClick();
899
+ header: I === !1 ? void 0 : /* @__PURE__ */ s(Dn, {
900
+ backTo: be,
901
+ onBackClick: I != null && I.onBackClick ? () => {
902
+ h && te(), I.onBackClick && I.onBackClick();
899
903
  } : void 0,
900
- left: !He && /* @__PURE__ */ m(be, {
901
- children: [/* @__PURE__ */ c("span", {
904
+ left: !qe && /* @__PURE__ */ m(me, {
905
+ children: [/* @__PURE__ */ s("span", {
902
906
  style: {
903
907
  fontWeight: "bold"
904
908
  },
905
909
  children: k == null ? void 0 : k.name
906
- }), /* @__PURE__ */ c(on, {
907
- disabled: (x == null ? void 0 : x.versionSelect) === !1,
910
+ }), /* @__PURE__ */ s(cn, {
911
+ disabled: (I == null ? void 0 : I.versionSelect) === !1,
908
912
  value: o == null ? void 0 : o.id,
909
913
  style: {
910
914
  width: 70
911
915
  },
912
- options: Ce.map((e) => ({
916
+ options: ye.map((e) => ({
913
917
  label: e.no,
914
918
  value: e.id
915
919
  })),
916
920
  onChange: (e) => {
917
- const t = Ce.find((r) => r.id === e);
921
+ const t = ye.find((r) => r.id === e);
918
922
  if (!k || !t)
919
923
  return;
920
- const n = Ce.find((r) => r.id === t.id);
921
- ae(n), ne(), x != null && x.onVersionChange && x.onVersionChange(n);
924
+ const n = ye.find((r) => r.id === t.id);
925
+ ae(n), ne(), I != null && I.onVersionChange && I.onVersionChange(n);
922
926
  }
923
927
  })]
924
928
  }),
925
- right: /* @__PURE__ */ m(be, {
926
- children: [!u && R && R.add && /* @__PURE__ */ c(ut, {
927
- isPreLabel: H,
929
+ right: /* @__PURE__ */ m(me, {
930
+ children: [!h && T && T.add && /* @__PURE__ */ s(pt, {
931
+ isPreLabel: B,
928
932
  placement: "bottom",
929
- children: /* @__PURE__ */ c(re, {
933
+ children: /* @__PURE__ */ s(re, {
930
934
  type: "default",
931
- onClick: () => Re(!0),
932
- disabled: _ === ie.Pending || _ === ie.Started || H,
935
+ onClick: () => Pe(!0),
936
+ disabled: Z === ie.Pending || Z === ie.Started || B,
933
937
  children: "导入数据"
934
938
  }, "del")
935
- }), _t && /* @__PURE__ */ c(dt, {
939
+ }), Qt && /* @__PURE__ */ s(ut, {
936
940
  menu: {
937
- items: [...G ? [{
941
+ items: [...j ? [{
938
942
  key: "manual",
939
- label: /* @__PURE__ */ c(ut, {
940
- isPreLabel: H,
941
- children: /* @__PURE__ */ c(be, {
942
- children: /* @__PURE__ */ c(re, {
943
+ label: /* @__PURE__ */ s(pt, {
944
+ isPreLabel: B,
945
+ children: /* @__PURE__ */ s(me, {
946
+ children: /* @__PURE__ */ s(re, {
943
947
  type: "text",
944
- disabled: H,
948
+ disabled: B,
945
949
  onClick: () => {
946
- u || Ne("nocode"), Z(!0), V(-1), h === "nocode" && (V(0), N(v[0])), ue(!0);
950
+ h || Re("nocode"), G(!0), V(-1), u === "nocode" && (V(0), N(v[0])), he(!0);
947
951
  },
948
952
  children: "人工标注"
949
953
  })
950
954
  })
951
955
  })
952
- }] : [], lt ? {
956
+ }] : [], ct ? {
953
957
  key: "auto",
954
- label: /* @__PURE__ */ c(wn, {
958
+ label: /* @__PURE__ */ s(Pn, {
955
959
  buttonType: "text",
956
960
  datasetId: a,
957
961
  versionId: (o == null ? void 0 : o.id) || "",
958
962
  disabled: !v.length,
959
- setIsTaskChange: Dt,
963
+ setIsTaskChange: Rt,
960
964
  datasetType: "detection",
961
- preLabelTask: Xe
965
+ preLabelTask: Qe
962
966
  })
963
967
  } : null]
964
968
  },
965
969
  placement: "bottom",
966
970
  children: /* @__PURE__ */ m(re, {
967
971
  type: "primary",
968
- children: ["开始标注", /* @__PURE__ */ c(gt, {})]
972
+ children: ["开始标注", /* @__PURE__ */ s(mt, {})]
969
973
  })
970
- }), /* @__PURE__ */ c(Ln, {
971
- when: It,
974
+ }), /* @__PURE__ */ s(Rn, {
975
+ when: kt,
972
976
  content: "确认要离开此页面吗?",
973
977
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
974
- }), $e && /* @__PURE__ */ c(Cn, {
975
- datasetIam: vt,
978
+ }), Ge && /* @__PURE__ */ s(wn, {
979
+ datasetIam: yt,
976
980
  datasetId: a,
977
981
  currentVersion: o,
978
982
  tenCode: k == null ? void 0 : k.tenantCode,
979
- isVisible: $e,
980
- setIsVisible: Re,
983
+ isVisible: Ge,
984
+ setIsVisible: Pe,
981
985
  getVersionListRequest: w,
982
- setIsConfirm: Ct,
986
+ setIsConfirm: xt,
983
987
  onUploadStatusChange: (e) => {
984
- St(e);
988
+ It(e);
985
989
  },
986
990
  tableReload: () => {
987
991
  var e, t, n;
@@ -989,44 +993,44 @@ const ar = (L) => {
989
993
  top: 0
990
994
  }), A(S(b({}, l), {
991
995
  current: 1
992
- })), (n = De.current) == null || n.fetchLabels());
996
+ })), (n = Te.current) == null || n.fetchLabels());
993
997
  },
994
- loadVersionData: tt,
998
+ loadVersionData: rt,
995
999
  markType: k.markType
996
1000
  })]
997
1001
  })
998
1002
  }),
999
1003
  children: [/* @__PURE__ */ m("div", {
1000
1004
  className: "detection-header",
1001
- children: [/* @__PURE__ */ m(be, {
1002
- children: [se.tabs && /* @__PURE__ */ c(ln, {
1005
+ children: [/* @__PURE__ */ m(me, {
1006
+ children: [se.tabs && /* @__PURE__ */ s(an, {
1003
1007
  className: "header-tab",
1004
- activeKey: h,
1005
- items: rt,
1006
- onChange: it
1007
- }), !u && se.search && /* @__PURE__ */ c(kn, {
1008
+ activeKey: u,
1009
+ items: ot,
1010
+ onChange: lt
1011
+ }), !h && se.search && /* @__PURE__ */ s(Tn, {
1008
1012
  placeholder: "请输入图片名称搜索",
1009
1013
  style: {
1010
1014
  width: 200
1011
1015
  },
1012
- suffix: /* @__PURE__ */ c(yn, {}),
1016
+ suffix: /* @__PURE__ */ s(kn, {}),
1013
1017
  value: ge,
1014
- onChange: qt,
1018
+ onChange: $t,
1015
1019
  allowClear: !0
1016
- }), !u && we && /* @__PURE__ */ c(dt, {
1020
+ }), !h && Ne && /* @__PURE__ */ s(ut, {
1017
1021
  menu: {
1018
- items: Zt
1022
+ items: Jt
1019
1023
  },
1020
1024
  disabled: P.size === 0,
1021
1025
  children: /* @__PURE__ */ m(re, {
1022
1026
  size: "middle",
1023
1027
  disabled: P.size === 0,
1024
- children: ["删除", /* @__PURE__ */ c(gt, {})]
1028
+ children: ["删除", /* @__PURE__ */ s(mt, {})]
1025
1029
  })
1026
- }), !u && we && /* @__PURE__ */ m(at, {
1027
- children: [/* @__PURE__ */ c(ft, {
1028
- checked: Vt,
1029
- onChange: (e) => $t(e.target.checked),
1030
+ }), !h && Ne && /* @__PURE__ */ m(ft, {
1031
+ children: [/* @__PURE__ */ s(ht, {
1032
+ checked: Et,
1033
+ onChange: (e) => Zt(e.target.checked),
1030
1034
  children: "选择当前页"
1031
1035
  }), P.size > 0 && /* @__PURE__ */ m("span", {
1032
1036
  style: {
@@ -1035,11 +1039,11 @@ const ar = (L) => {
1035
1039
  children: ["已选中", P.size, "张,共", l.total || 0, "张"]
1036
1040
  })]
1037
1041
  })]
1038
- }), /* @__PURE__ */ c(be, {
1039
- children: h === "pending" && G && /* @__PURE__ */ c(re, {
1042
+ }), /* @__PURE__ */ s(me, {
1043
+ children: u === "pending" && j && /* @__PURE__ */ s(re, {
1040
1044
  type: "primary",
1041
1045
  className: "pending-confirm-button",
1042
- onClick: Kt,
1046
+ onClick: jt,
1043
1047
  children: "一键确认"
1044
1048
  })
1045
1049
  })]
@@ -1048,98 +1052,99 @@ const ar = (L) => {
1048
1052
  children: [/* @__PURE__ */ m("div", {
1049
1053
  className: "d-right",
1050
1054
  ref: ce,
1051
- children: [ee && /* @__PURE__ */ c(Tn, {
1055
+ children: [Y && /* @__PURE__ */ s(En, {
1052
1056
  datasetId: a,
1053
- isImageDetailVisible: ee,
1054
- setIsImageDetailVisible: ue,
1055
- currentSample: f != null ? f : u,
1056
- labels: O,
1057
- previewMode: !he,
1058
- filterItems: rt,
1059
- filterMode: h,
1060
- onFilterChange: it,
1057
+ isImageDetailVisible: Y,
1058
+ setIsImageDetailVisible: he,
1059
+ currentSample: f != null ? f : h,
1060
+ labels: F,
1061
+ previewMode: !ue,
1062
+ filterItems: ot,
1063
+ filterMode: u,
1064
+ onFilterChange: lt,
1061
1065
  onChange: z,
1062
- onNextClick: (e) => nt(e),
1063
- onPrevClick: (e) => Et(e),
1064
- onSave: (e, t) => Ft(e, t),
1065
- onDeleteSample: () => Ht(),
1066
+ onNextClick: (e) => it(e),
1067
+ onPrevClick: (e) => Mt(e),
1068
+ onSave: (e, t) => Ut(e, t),
1069
+ onDeleteSample: () => Kt(),
1066
1070
  onEnterEdit: () => {
1067
- Z(!0);
1071
+ G(!0);
1068
1072
  },
1069
- onBackToDetail: (e) => Ot(e),
1070
- onLoadingChange: zt,
1073
+ onBackToDetail: (e) => qt(e),
1074
+ onLoadingChange: Ft,
1075
+ switchingSample: Dt,
1071
1076
  onRefresh: () => {
1072
1077
  var e;
1073
- (e = q()) == null || e.then((t) => {
1078
+ (e = U()) == null || e.then((t) => {
1074
1079
  var n, r;
1075
1080
  if (f) {
1076
1081
  const i = [];
1077
- (n = f.labels) == null || n.forEach((s) => {
1078
- t != null && t.find((d) => d.id === s.id) && i.push(s);
1082
+ (n = f.labels) == null || n.forEach((c) => {
1083
+ t != null && t.find((d) => d.id === c.id) && i.push(c);
1079
1084
  }), f.labels = i, z(b({}, f));
1080
1085
  }
1081
- if (u) {
1086
+ if (h) {
1082
1087
  const i = [];
1083
- (r = u.labels) == null || r.forEach((s) => {
1084
- t != null && t.find((d) => d.id === s.id) && i.push(s);
1085
- }), u.labels = i, N(b({}, u));
1088
+ (r = h.labels) == null || r.forEach((c) => {
1089
+ t != null && t.find((d) => d.id === c.id) && i.push(c);
1090
+ }), h.labels = i, N(b({}, h));
1086
1091
  }
1087
1092
  }), w();
1088
1093
  },
1089
- isPreLabel: H,
1094
+ isPreLabel: B,
1090
1095
  imgCount: {
1091
- total: Y,
1092
- index: M + 1
1096
+ total: Q,
1097
+ index: E + 1
1093
1098
  },
1094
- settingHide: !ye,
1095
- canLabel: G,
1099
+ settingHide: !ve,
1100
+ canLabel: j,
1096
1101
  canDelete: Se
1097
- }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ c(at, {
1098
- children: /* @__PURE__ */ c(fn, {
1102
+ }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ s(ft, {
1103
+ children: /* @__PURE__ */ s(gn, {
1099
1104
  innerProps: {
1100
1105
  className: "d-right-row"
1101
1106
  },
1102
1107
  data: v,
1103
1108
  itemKey: "id",
1104
- height: Math.max(pt, 1),
1105
- onScroll: Mt,
1109
+ height: Math.max(bt, 1),
1110
+ onScroll: Ht,
1106
1111
  children: (e, t) => {
1107
1112
  var n;
1108
- return /* @__PURE__ */ c(sn, {
1113
+ return /* @__PURE__ */ s(dn, {
1109
1114
  className: "d-right-col",
1110
1115
  "data-sample-id": e.id,
1111
1116
  children: /* @__PURE__ */ m("div", {
1112
1117
  className: "right-col-wrapper",
1113
- onMouseEnter: () => Ve(e.id),
1114
- onMouseLeave: () => Ve(""),
1115
- children: [/* @__PURE__ */ c("div", {
1118
+ onMouseEnter: () => Ae(e.id),
1119
+ onMouseLeave: () => Ae(""),
1120
+ children: [/* @__PURE__ */ s("div", {
1116
1121
  className: "detection-status-wrapper",
1117
- children: /* @__PURE__ */ c(Rn, {
1122
+ children: /* @__PURE__ */ s(An, {
1118
1123
  sample: e
1119
1124
  })
1120
- }), we && /* @__PURE__ */ c("div", {
1125
+ }), Ne && /* @__PURE__ */ s("div", {
1121
1126
  className: "sample-checkbox-wrapper",
1122
- children: /* @__PURE__ */ c(ft, {
1127
+ children: /* @__PURE__ */ s(ht, {
1123
1128
  checked: P.has(e.id),
1124
1129
  onChange: (r) => {
1125
- r.stopPropagation(), Wt(e.id, r.target.checked);
1130
+ r.stopPropagation(), Gt(e.id, r.target.checked);
1126
1131
  },
1127
1132
  onClick: (r) => r.stopPropagation()
1128
1133
  })
1129
- }), /* @__PURE__ */ c("div", {
1134
+ }), /* @__PURE__ */ s("div", {
1130
1135
  className: "right-col-img",
1131
- onClick: () => At(t),
1132
- children: /* @__PURE__ */ c(xn, {
1136
+ onClick: () => Bt(t),
1137
+ children: /* @__PURE__ */ s(Nn, {
1133
1138
  fileKey: e.fileKey,
1134
1139
  width: 124,
1135
1140
  thumbnailUrl: e.thumbnailUrl
1136
1141
  })
1137
1142
  }), /* @__PURE__ */ m("div", {
1138
1143
  className: "right-col-text",
1139
- children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ c(cn, {
1144
+ children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ s(fn, {
1140
1145
  placement: "top",
1141
- title: /* @__PURE__ */ c("div", {
1142
- children: Object.keys(e.labels.reduce((r, i) => (r[i.label] ? ++r[i.label] : r[i.label] = 1, r), {})).map((r) => /* @__PURE__ */ c("div", {
1146
+ title: /* @__PURE__ */ s("div", {
1147
+ children: Object.keys(e.labels.reduce((r, i) => (r[i.label] ? ++r[i.label] : r[i.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
1143
1148
  children: r
1144
1149
  }, r))
1145
1150
  }),
@@ -1148,7 +1153,7 @@ const ar = (L) => {
1148
1153
  width: "100%",
1149
1154
  display: "flex"
1150
1155
  },
1151
- children: [/* @__PURE__ */ c("span", {
1156
+ children: [/* @__PURE__ */ s("span", {
1152
1157
  style: {
1153
1158
  display: "inline-block",
1154
1159
  maxWidth: "calc(100% - 25px)",
@@ -1157,21 +1162,21 @@ const ar = (L) => {
1157
1162
  whiteSpace: "nowrap"
1158
1163
  },
1159
1164
  children: e.labels[0].label
1160
- }), e.labels.length > 1 ? /* @__PURE__ */ c("span", {
1165
+ }), e.labels.length > 1 ? /* @__PURE__ */ s("span", {
1161
1166
  style: {
1162
1167
  color: "rgba(0,0,0,0.45)",
1163
1168
  marginLeft: 5
1164
1169
  },
1165
- children: Bt(e)
1170
+ children: Ot(e)
1166
1171
  }) : null]
1167
1172
  })
1168
- }) : /* @__PURE__ */ c("span", {
1173
+ }) : /* @__PURE__ */ s("span", {
1169
1174
  style: {
1170
1175
  color: "rgba(0,0,0,0.45)",
1171
1176
  width: "100%"
1172
1177
  },
1173
1178
  children: "无标签"
1174
- }), /* @__PURE__ */ c("div", {
1179
+ }), /* @__PURE__ */ s("div", {
1175
1180
  children: t + 1
1176
1181
  })]
1177
1182
  })]
@@ -1179,21 +1184,21 @@ const ar = (L) => {
1179
1184
  }, e.id);
1180
1185
  }
1181
1186
  })
1182
- }) : /* @__PURE__ */ c("div", {
1187
+ }) : /* @__PURE__ */ s("div", {
1183
1188
  className: "empty",
1184
- children: l.total === 0 ? /* @__PURE__ */ c(an, {
1185
- image: pn,
1189
+ children: l.total === 0 ? /* @__PURE__ */ s(un, {
1190
+ image: vn,
1186
1191
  description: /* @__PURE__ */ m("span", {
1187
- children: ["暂无数据", h !== "hascode" && !ge && /* @__PURE__ */ c("span", {
1188
- children: R && R.add && /* @__PURE__ */ m(re, {
1192
+ children: ["暂无数据", u !== "hascode" && !ge && /* @__PURE__ */ s("span", {
1193
+ children: T && T.add && /* @__PURE__ */ m(re, {
1189
1194
  type: "link",
1190
1195
  size: "small",
1191
1196
  style: {
1192
1197
  padding: 0
1193
1198
  },
1194
- onClick: () => Re(!0),
1195
- disabled: _ === ie.Pending || _ === ie.Started,
1196
- children: [/* @__PURE__ */ c("span", {
1199
+ onClick: () => Pe(!0),
1200
+ disabled: Z === ie.Pending || Z === ie.Started,
1201
+ children: [/* @__PURE__ */ s("span", {
1197
1202
  style: {
1198
1203
  color: "black"
1199
1204
  },
@@ -1202,45 +1207,45 @@ const ar = (L) => {
1202
1207
  })
1203
1208
  })]
1204
1209
  })
1205
- }) : /* @__PURE__ */ c(dn, {})
1210
+ }) : /* @__PURE__ */ s(hn, {})
1206
1211
  })]
1207
- }), h !== "nocode" && se.labels && /* @__PURE__ */ c("div", {
1212
+ }), u !== "nocode" && se.labels && /* @__PURE__ */ s("div", {
1208
1213
  className: "d-sider",
1209
- children: /* @__PURE__ */ c(mn, {
1210
- ref: De,
1214
+ children: /* @__PURE__ */ s(Cn, {
1215
+ ref: Te,
1211
1216
  datasetId: a,
1212
- data: O || [],
1217
+ data: F || [],
1213
1218
  showStatColumns: !0,
1214
- selected: W,
1219
+ selected: K,
1215
1220
  onSelectedChange: (e) => {
1216
- ne(), Te((O == null ? void 0 : O.filter((t) => e.find((n) => n.label === t.label))) || []);
1221
+ ne(), Ve((F == null ? void 0 : F.filter((t) => e.find((n) => n.label === t.label))) || []);
1217
1222
  },
1218
1223
  onListChange: (e) => {
1219
1224
  if (!o)
1220
1225
  return;
1221
1226
  let t = 2;
1222
- h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
1227
+ u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
1223
1228
  confirmStatus: t
1224
1229
  }).then((n) => {
1225
1230
  const i = (n || []).filter((d) => d.label !== "nocode").map((d, y) => {
1226
- var C;
1231
+ var x;
1227
1232
  return {
1228
1233
  label: d.label,
1229
1234
  count: d.count,
1230
- boxCount: (C = d.boxCount) != null ? C : 0,
1235
+ boxCount: (x = d.boxCount) != null ? x : 0,
1231
1236
  id: d.id,
1232
- color: ht[y % 40]
1237
+ color: gt[y % 40]
1233
1238
  };
1234
- }), s = W.filter((d) => i.some((y) => y.id === d.id));
1235
- Ze(i), W.length !== s.length && Te(s);
1239
+ }), c = K.filter((d) => i.some((y) => y.id === d.id));
1240
+ Xe(i), K.length !== c.length && Ve(c);
1236
1241
  }), w();
1237
1242
  },
1238
- isPreLabel: H
1243
+ isPreLabel: B
1239
1244
  })
1240
1245
  })]
1241
1246
  })]
1242
1247
  })
1243
- }) : /* @__PURE__ */ c("div", {
1248
+ }) : /* @__PURE__ */ s("div", {
1244
1249
  style: {
1245
1250
  color: "red",
1246
1251
  textAlign: "center"
@@ -1251,6 +1256,6 @@ const ar = (L) => {
1251
1256
  });
1252
1257
  };
1253
1258
  export {
1254
- Vn as ISampleActionType,
1255
- ar as default
1259
+ Bn as ISampleActionType,
1260
+ pr as default
1256
1261
  };