@glodon-aiot/dataset-annotation 3.9.0-beta.9 → 3.10.0-alpha.11
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.
- package/dist/es/DatasetContext/index.mjs +6 -3
- package/dist/es/components/Iconfont/index.mjs +2 -2
- package/dist/es/components/PicZipImportModal/config.mjs +41 -0
- package/dist/es/components/PicZipImportModal/index.mjs +317 -301
- package/dist/es/components/PicZipImportModal/pic_vlm_json_zip.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/pic_vlm_zip.svg.mjs +4 -0
- package/dist/es/components/VLMAnnotation/RegionItem.mjs +95 -0
- package/dist/es/components/VLMAnnotation/TextAnnotationPanel.mjs +83 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.mjs +75 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.mjs +115 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.mjs +42 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.mjs +55 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.mjs +51 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.mjs +47 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.mjs +220 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.mjs +106 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.mjs +68 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.mjs +38 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.mjs +141 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.mjs +72 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.mjs +102 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.mjs +103 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.mjs +156 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/del.png.mjs +4 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +507 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.mjs +33 -0
- package/dist/es/components/VLMAnnotation/components/DragButton.mjs +18 -0
- package/dist/es/components/VLMAnnotation/components/FitToScreenButton.mjs +16 -0
- package/dist/es/components/VLMAnnotation/components/RectangleButton.mjs +30 -0
- package/dist/es/components/VLMAnnotation/components/Toolbar.mjs +40 -0
- package/dist/es/components/VLMAnnotation/components/ZoomControls.mjs +44 -0
- package/dist/es/components/VLMAnnotation/constants.mjs +50 -0
- package/dist/es/components/VLMAnnotation/index.mjs +242 -0
- package/dist/es/components/VLMAnnotation/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +345 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +240 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +201 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +399 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +139 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/index.mjs +446 -0
- package/dist/es/components/VLMAnnotationDetail/style.less.mjs +4 -0
- package/dist/es/constant.mjs +3 -3
- package/dist/es/createVlmtasetAnnotation/index.mjs +131 -0
- package/dist/es/featuresConfig.mjs +13 -9
- package/dist/es/index.mjs +11 -7
- package/dist/lib/index.js +4 -3
- package/dist/src/DatasetContext/index.d.ts +2 -0
- package/dist/src/components/Iconfont/font_4439177_tgvowh6bmlb.d.ts +0 -0
- package/dist/src/components/PicZipImportModal/config.d.ts +20 -0
- package/dist/src/components/VLMAnnotation/ImageAnnotationDebugger.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/RegionItem.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/TextAnnotationPanel.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.d.ts +12 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.d.ts +38 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.d.ts +18 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.d.ts +21 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.d.ts +31 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.d.ts +11 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.d.ts +28 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.d.ts +37 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.d.ts +12 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.d.ts +15 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.d.ts +25 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/index.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/components/DragButton.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/components/FitToScreenButton.d.ts +6 -0
- package/dist/src/components/VLMAnnotation/components/RectangleButton.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/components/Toolbar.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/components/ZoomControls.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/constants.d.ts +97 -0
- package/dist/src/components/VLMAnnotation/index.d.ts +6 -0
- package/dist/src/components/VLMAnnotation/types.d.ts +172 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.d.ts +14 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +21 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +19 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/index.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/index.d.ts +6 -0
- package/dist/src/constant.d.ts +1 -1
- package/dist/src/createVlmtasetAnnotation/index.d.ts +16 -0
- package/dist/src/featuresConfig.d.ts +4 -0
- package/dist/src/index.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1,160 +1,165 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var
|
|
9
|
-
|
|
10
|
-
return
|
|
1
|
+
var dl = Object.defineProperty;
|
|
2
|
+
var Te = Object.getOwnPropertySymbols;
|
|
3
|
+
var pl = Object.prototype.hasOwnProperty, ml = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var Oe = (S, e, s) => e in S ? dl(S, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : S[e] = s, Ve = (S, e) => {
|
|
5
|
+
for (var s in e || (e = {}))
|
|
6
|
+
pl.call(e, s) && Oe(S, s, e[s]);
|
|
7
|
+
if (Te)
|
|
8
|
+
for (var s of Te(e))
|
|
9
|
+
ml.call(e, s) && Oe(S, s, e[s]);
|
|
10
|
+
return S;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var ce = (S, e, s) => new Promise((u, K) => {
|
|
13
|
+
var _ = (N) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
16
|
-
} catch (
|
|
17
|
-
|
|
15
|
+
U(s.next(N));
|
|
16
|
+
} catch (v) {
|
|
17
|
+
K(v);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, h = (N) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
U(s.throw(N));
|
|
22
|
+
} catch (v) {
|
|
23
|
+
K(v);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
25
|
+
}, U = (N) => N.done ? u(N.value) : Promise.resolve(N.value).then(_, h);
|
|
26
|
+
U((s = s.apply(S, e)).next());
|
|
27
27
|
});
|
|
28
|
-
import { jsxs as
|
|
29
|
-
import { useContext as
|
|
30
|
-
import { Form as
|
|
28
|
+
import { jsxs as d, Fragment as de, jsx as l } from "react/jsx-runtime";
|
|
29
|
+
import { useContext as ul, useState as r, useRef as fl, useEffect as T } from "react";
|
|
30
|
+
import { Form as O, message as $, Modal as H, Button as V, Radio as k, Tooltip as hl, Space as Pe, Upload as gl, Row as pe, Col as Cl, Spin as bl, Result as Me } from "antd";
|
|
31
31
|
import "./style.less.mjs";
|
|
32
|
-
import { CloudUploadOutlined as
|
|
33
|
-
import
|
|
34
|
-
import { initMinio as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
import { InfoCircleOutlined as yl, CloudUploadOutlined as Sl, PaperClipOutlined as zl, DeleteOutlined as wl, PlusOutlined as El } from "@ant-design/icons";
|
|
33
|
+
import Nl from "browser-md5-file";
|
|
34
|
+
import { initMinio as De, putObjectBuffer as Ke } from "@glodon-aiot/minio";
|
|
35
|
+
import vl from "antd/lib/upload/Dragger";
|
|
36
|
+
import xl from "./pic_zip.svg.mjs";
|
|
37
|
+
import Rl from "./pic_zip_json.svg.mjs";
|
|
38
|
+
import Bl from "./pic_vlm_json_zip.svg.mjs";
|
|
39
|
+
import Fl from "./pic_vlm_zip.svg.mjs";
|
|
40
|
+
import { MB as _e, GB as Al } from "../../constant.mjs";
|
|
41
|
+
import { fileSuffixToLowerCase as $l } from "../../utils/index.mjs";
|
|
42
|
+
import kl from "../../DatasetContext/index.mjs";
|
|
43
|
+
import { EXAMPLE_SRC_ROOT as Ul, VLM_EXAMPLE_SRC_ROOT as jl } from "../../featuresConfig.mjs";
|
|
44
|
+
import { getImportConfig as Ll } from "./config.mjs";
|
|
45
|
+
let f = 0, G = 0, P = 0, I = 0;
|
|
46
|
+
const nt = (S) => {
|
|
44
47
|
const {
|
|
45
|
-
datasetIam:
|
|
46
|
-
datasetId:
|
|
47
|
-
currentVersion:
|
|
48
|
-
tenCode:
|
|
49
|
-
isVisible:
|
|
50
|
-
markType:
|
|
51
|
-
setIsVisible:
|
|
52
|
-
getVersionListRequest:
|
|
53
|
-
onUploadStatusChange:
|
|
54
|
-
setIsConfirm:
|
|
55
|
-
tableReload:
|
|
48
|
+
datasetIam: e,
|
|
49
|
+
datasetId: s,
|
|
50
|
+
currentVersion: u,
|
|
51
|
+
tenCode: K,
|
|
52
|
+
isVisible: _,
|
|
53
|
+
markType: h,
|
|
54
|
+
setIsVisible: U,
|
|
55
|
+
getVersionListRequest: N,
|
|
56
|
+
onUploadStatusChange: v,
|
|
57
|
+
setIsConfirm: Q,
|
|
58
|
+
tableReload: me,
|
|
56
59
|
loadVersionData: q,
|
|
57
60
|
actionAfterFinish: ue
|
|
58
|
-
} =
|
|
61
|
+
} = S, {
|
|
59
62
|
services: {
|
|
60
|
-
cvforceDatahub:
|
|
63
|
+
cvforceDatahub: p
|
|
61
64
|
},
|
|
62
65
|
featuresConfig: {
|
|
63
|
-
exampleSrcRoot:
|
|
66
|
+
exampleSrcRoot: fe,
|
|
67
|
+
vlmExampleSrcRoot: he
|
|
64
68
|
} = {
|
|
65
|
-
exampleSrcRoot:
|
|
69
|
+
exampleSrcRoot: Ul,
|
|
70
|
+
vlmExampleSrcRoot: jl
|
|
66
71
|
}
|
|
67
|
-
} =
|
|
72
|
+
} = ul(kl), [z, Ze] = r(0), [w, Ge] = r(0), [Y, Ie] = r([]), [M, qe] = r(), [ge, Tl] = r([]), [ee, X] = r(!1), [Ce, le] = r(!1), [Z, te] = r(!1), [ie, Xe] = r(0), [be, Je] = r(0), [J, ye] = r(-1), [se, Ol] = r([]), [Se, Vl] = r([]), [ze, ne] = r(!1), We = new Nl(), [W] = O.useForm(), n = O.useWatch("acceptType", W), B = O.useWatch("labelState", W), [g, we] = r([]), [F, Ee] = r([]), [A, He] = r(), [Ne, ve] = r(0), [xe, Re] = r(!1), [Pl, Be] = r(""), [Qe, Fe] = r(!1), [Ae, Ye] = r(
|
|
68
73
|
"unlabeled"
|
|
69
74
|
/* Unlabeled */
|
|
70
|
-
),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
const
|
|
75
|
+
), ae = fl(!0), oe = ["image/jpeg", "image/jpg", "image/png", "image/bmp"], E = Ll(h), re = E.maxImageSize;
|
|
76
|
+
T(() => {
|
|
77
|
+
f = 0, G = 0, P = 0, I = 0, te(!1), _ && (ae.current = !1, q && q());
|
|
78
|
+
}, [_]);
|
|
79
|
+
const $e = (t, i) => {
|
|
75
80
|
var a;
|
|
76
81
|
if (n === "image") {
|
|
77
|
-
|
|
82
|
+
ne(!0);
|
|
78
83
|
let o = 0;
|
|
79
|
-
if (
|
|
84
|
+
if (f = f + 1, G = G + 1, i.length === 0)
|
|
80
85
|
return;
|
|
81
|
-
let
|
|
82
|
-
const [...c] =
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
let m = 0;
|
|
87
|
+
const [...c] = i, b = window.URL || window.webkitURL, y = new Image();
|
|
88
|
+
y.src = b.createObjectURL(t), y.onload = () => {
|
|
89
|
+
Y.push({
|
|
85
90
|
name: t.name,
|
|
86
|
-
src:
|
|
87
|
-
width:
|
|
88
|
-
height:
|
|
89
|
-
}),
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
}), c.length > 100 && c.splice(100, c.length),
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
if (!
|
|
91
|
+
src: y.src,
|
|
92
|
+
width: y.width,
|
|
93
|
+
height: y.height
|
|
94
|
+
}), Ie(Y);
|
|
95
|
+
}, i.map((x) => {
|
|
96
|
+
const R = oe.some((L) => L === x.type), j = x.size <= re;
|
|
97
|
+
R ? j || (o = o + 1, c.splice(c.findIndex((L) => L.name === x.name), 1)) : (m = m + 1, c.splice(c.findIndex((L) => L.name === x.name), 1));
|
|
98
|
+
}), c.length > 100 && c.splice(100, c.length), Ze(m), Ge(o), G === i.length && (ne(!0), G = 0);
|
|
99
|
+
const C = oe.some((x) => x === t.type), D = t.size <= re;
|
|
100
|
+
if (C) {
|
|
101
|
+
if (!D)
|
|
97
102
|
return !1;
|
|
98
103
|
} else
|
|
99
104
|
return !1;
|
|
100
105
|
} else {
|
|
101
|
-
if (t.size > 2 *
|
|
102
|
-
return
|
|
106
|
+
if (t.size > 2 * Al)
|
|
107
|
+
return $.error(`${t.name}文件总大小不能超过2G`), !1;
|
|
103
108
|
const o = (a = t.name) == null ? void 0 : a.substring(t.name.lastIndexOf("."));
|
|
104
109
|
if (n === "zip" && o !== ".zip")
|
|
105
|
-
return
|
|
106
|
-
|
|
110
|
+
return $.error("存在格式不正确的文件,已自动去除"), !1;
|
|
111
|
+
Ee((m) => m.length >= 1 ? m : [...m, t]);
|
|
107
112
|
}
|
|
108
113
|
return !1;
|
|
109
114
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}, [
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
+
T(() => {
|
|
116
|
+
ze !== !1 && (!z && !w && !f || (f = f - I - z - w, f < 101 ? z > 0 && w > 0 ? ($.error(`${z + w}个文件添加失败,格式、大小或数量不符合要求`), f = f - z - w) : z > 0 && w === 0 ? $.error(`${z}个文件添加失败,格式不符合要求`) : z === 0 && w > 0 ? $.error(`${w}个文件添加失败,单张图片超过${E.maxImageSize / _e}M`) : z === 0 && w === 0 && $.success("校验成功") : z + w === 0 ? ($.error(`${f - 100}个文件添加失败,超过数量限制`), f = 100) : ($.error(`${f - 100 + z + w}个文件添加失败,格式、大小或数量不符合要求`), f = f < 101 ? f : 100), ne(!1)));
|
|
117
|
+
}, [ze]);
|
|
118
|
+
const el = (t) => {
|
|
119
|
+
const i = t.originFileObj;
|
|
115
120
|
return new Promise((a, o) => {
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
We.md5(i, (m, c) => {
|
|
122
|
+
m && o(m), tl(c, i), a(c);
|
|
118
123
|
});
|
|
119
124
|
});
|
|
120
|
-
},
|
|
121
|
-
if (!
|
|
125
|
+
}, ll = () => ce(void 0, null, function* () {
|
|
126
|
+
if (!g)
|
|
122
127
|
return;
|
|
123
128
|
const t = [];
|
|
124
|
-
for (let
|
|
125
|
-
const a =
|
|
129
|
+
for (let i = 0; i < g.length; i++) {
|
|
130
|
+
const a = g[i], o = yield el(a);
|
|
126
131
|
t.push(o);
|
|
127
132
|
}
|
|
128
|
-
!
|
|
129
|
-
|
|
133
|
+
!s || t.length === 0 || p == null || p.getDeduplication(t, s).then((i) => {
|
|
134
|
+
qe(i), Fe(!1);
|
|
130
135
|
});
|
|
131
136
|
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
},
|
|
137
|
+
T(() => {
|
|
138
|
+
ll();
|
|
139
|
+
}, [g]);
|
|
140
|
+
const tl = (t, i) => {
|
|
141
|
+
i.md5 = t, ge.push(i);
|
|
142
|
+
}, ke = ({
|
|
138
143
|
fileList: t
|
|
139
144
|
}) => {
|
|
140
145
|
if (n === "zip")
|
|
141
146
|
return;
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
n === "zip" && (
|
|
147
|
-
},
|
|
147
|
+
Fe(!0);
|
|
148
|
+
const i = t.filter((a) => a.size && a.size <= re ? oe.some((o) => a.type === o) : !1);
|
|
149
|
+
i.splice(100, i.length), i.length < g.length ? (we(i), I++) : (P = P - I, I = 0, P++, P == i.length && we(i), P > i.length && (P = i.length));
|
|
150
|
+
}, Ue = () => {
|
|
151
|
+
n === "zip" && (ae.current = !0), U(!1);
|
|
152
|
+
}, il = () => {
|
|
148
153
|
if (n === "image") {
|
|
149
|
-
if (!
|
|
154
|
+
if (!M)
|
|
150
155
|
return;
|
|
151
|
-
let t = 0,
|
|
152
|
-
if (
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
var
|
|
156
|
-
return ((
|
|
157
|
-
})) == null ? void 0 :
|
|
156
|
+
let t = 0, i = 0;
|
|
157
|
+
if (M.duplicated.length !== 0 && M.duplicated.map((a, o) => {
|
|
158
|
+
var b;
|
|
159
|
+
const m = M.duplicatedMd5[o], c = ((b = g.find((y) => {
|
|
160
|
+
var C;
|
|
161
|
+
return ((C = y.originFileObj) == null ? void 0 : C.md5) === m;
|
|
162
|
+
})) == null ? void 0 : b.name) || "";
|
|
158
163
|
se.push({
|
|
159
164
|
labels: [],
|
|
160
165
|
fileKey: a,
|
|
@@ -162,165 +167,170 @@ const Wl = (y) => {
|
|
|
162
167
|
name: c
|
|
163
168
|
}
|
|
164
169
|
});
|
|
165
|
-
}),
|
|
166
|
-
const a =
|
|
167
|
-
const c =
|
|
170
|
+
}), M.unduplicated.length !== 0) {
|
|
171
|
+
const a = M.unduplicated.map((o) => new Promise((m) => {
|
|
172
|
+
const c = ge.find((j) => j.md5 === o);
|
|
168
173
|
if (!c)
|
|
169
|
-
return
|
|
170
|
-
const
|
|
174
|
+
return m();
|
|
175
|
+
const b = c.name, y = b.substring(b.indexOf(".")), C = Y.find((j) => j.name === b), D = {
|
|
171
176
|
"Content-Type": "application/octet-stream",
|
|
172
|
-
"X-Amz-Meta-Width":
|
|
173
|
-
"X-Amz-Meta-Height":
|
|
174
|
-
},
|
|
177
|
+
"X-Amz-Meta-Width": C == null ? void 0 : C.width,
|
|
178
|
+
"X-Amz-Meta-Height": C == null ? void 0 : C.height
|
|
179
|
+
}, x = `dataset/${s}/sample/${o}${$l(y)}`;
|
|
175
180
|
delete c.md5;
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
endPoint:
|
|
180
|
-
useSSL:
|
|
181
|
-
accessKey:
|
|
182
|
-
secretKey:
|
|
183
|
-
}),
|
|
184
|
-
|
|
181
|
+
const R = new FileReader();
|
|
182
|
+
R.readAsArrayBuffer(c), R.onload = (j) => {
|
|
183
|
+
De({
|
|
184
|
+
endPoint: e == null ? void 0 : e.endpoints[0],
|
|
185
|
+
useSSL: e == null ? void 0 : e.useSSL,
|
|
186
|
+
accessKey: e == null ? void 0 : e.accessKey,
|
|
187
|
+
secretKey: e == null ? void 0 : e.secretKey
|
|
188
|
+
}), Ke(K, x, j.target.result, D, (L, Ml) => {
|
|
189
|
+
X(!0), i += 1, L && (t += 1, Je(t)), Xe(i), Se.push({
|
|
185
190
|
labels: [],
|
|
186
|
-
fileKey: `${
|
|
191
|
+
fileKey: `${K}/${x}`,
|
|
187
192
|
sampleFileName: {
|
|
188
|
-
name:
|
|
193
|
+
name: b
|
|
189
194
|
}
|
|
190
|
-
}),
|
|
195
|
+
}), m();
|
|
191
196
|
});
|
|
192
197
|
};
|
|
193
198
|
}));
|
|
194
199
|
Promise.all(a).then(() => {
|
|
195
|
-
!
|
|
196
|
-
|
|
197
|
-
samples:
|
|
200
|
+
!s || !u || setTimeout(() => {
|
|
201
|
+
p == null || p.postDatasetsIdVersionsVidSamples(s, u.id, {
|
|
202
|
+
samples: Se.concat(se)
|
|
198
203
|
}).then(() => {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}),
|
|
204
|
+
p.getDatasetsIdVersionsVid(s, u.id).then((o) => {
|
|
205
|
+
ye(o.samplesCount - u.samplesCount);
|
|
206
|
+
}), Q(!0), v && v(!1);
|
|
202
207
|
});
|
|
203
208
|
}, 100);
|
|
204
209
|
});
|
|
205
210
|
} else {
|
|
206
|
-
if (!
|
|
211
|
+
if (!s || !u)
|
|
207
212
|
return;
|
|
208
|
-
|
|
213
|
+
p == null || p.postDatasetsIdVersionsVidSamples(s, u.id, {
|
|
209
214
|
samples: se
|
|
210
215
|
}).then(() => {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}),
|
|
216
|
+
p.getDatasetsIdVersionsVid(s, u.id).then((a) => {
|
|
217
|
+
ye(a.samplesCount - u.samplesCount);
|
|
218
|
+
}), Q(!0), v && v(!1);
|
|
214
219
|
});
|
|
215
220
|
}
|
|
216
221
|
} else
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
!
|
|
220
|
-
var
|
|
222
|
+
sl(F);
|
|
223
|
+
}, sl = (t) => {
|
|
224
|
+
!s || !u || t.map((i, a) => {
|
|
225
|
+
var y;
|
|
221
226
|
const o = {
|
|
222
227
|
"Content-Type": "application/octet-stream"
|
|
223
|
-
},
|
|
224
|
-
endPoint:
|
|
225
|
-
useSSL:
|
|
226
|
-
accessKey:
|
|
227
|
-
secretKey:
|
|
228
|
-
}, c = (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (
|
|
232
|
-
console.log(
|
|
228
|
+
}, m = {
|
|
229
|
+
endPoint: e == null ? void 0 : e.endpoints[0],
|
|
230
|
+
useSSL: e == null ? void 0 : e.useSSL,
|
|
231
|
+
accessKey: e == null ? void 0 : e.accessKey,
|
|
232
|
+
secretKey: e == null ? void 0 : e.secretKey
|
|
233
|
+
}, c = (e == null ? void 0 : e.prefix) + ((y = t[0]) == null ? void 0 : y.name), b = new FileReader();
|
|
234
|
+
b.readAsArrayBuffer(i), b.onload = (C) => {
|
|
235
|
+
De(m), Ke(e == null ? void 0 : e.bucket, c, C.target.result, o, (D, x) => {
|
|
236
|
+
if (D)
|
|
237
|
+
console.log(D);
|
|
233
238
|
else {
|
|
234
|
-
if (
|
|
239
|
+
if (ae.current)
|
|
235
240
|
return;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
X(!0), h === "vlm" ? p == null || p.postVlmUploadPicsZip(s, u.id, {
|
|
242
|
+
zipUrl: (e == null ? void 0 : e.bucket) + "/" + c,
|
|
243
|
+
type: B === "labeled" ? 2 : 1
|
|
244
|
+
}).then((R) => {
|
|
245
|
+
je(R), Be(R);
|
|
246
|
+
}) : p == null || p.postUploadPicsZip(s, u.id, Ve({
|
|
247
|
+
zipUrls: [(e == null ? void 0 : e.bucket) + "/" + c]
|
|
248
|
+
}, (h === "ocr" || h === "vlm") && {
|
|
249
|
+
type: B === "labeled" ? 1 : 0
|
|
250
|
+
})).then((R) => {
|
|
251
|
+
je(R), Be(R);
|
|
242
252
|
});
|
|
243
253
|
}
|
|
244
254
|
});
|
|
245
255
|
};
|
|
246
256
|
});
|
|
247
|
-
},
|
|
248
|
-
var
|
|
249
|
-
if (!(!
|
|
257
|
+
}, je = (t) => ce(void 0, null, function* () {
|
|
258
|
+
var i;
|
|
259
|
+
if (!(!s || !u || !p))
|
|
250
260
|
try {
|
|
251
|
-
const a = yield
|
|
261
|
+
const a = yield p.checkFileResult(s, u.id, {
|
|
252
262
|
taskId: t
|
|
253
|
-
}, 5e3, (o) => {
|
|
254
|
-
|
|
263
|
+
}, 5e3, h, (o) => {
|
|
264
|
+
ve(o);
|
|
255
265
|
});
|
|
256
|
-
a &&
|
|
266
|
+
a && He(JSON.parse(a));
|
|
257
267
|
} catch (a) {
|
|
258
|
-
if (((
|
|
259
|
-
|
|
268
|
+
if (((i = a.cause) == null ? void 0 : i.code) === -101) {
|
|
269
|
+
Re(!0);
|
|
260
270
|
return;
|
|
261
271
|
}
|
|
262
272
|
}
|
|
263
273
|
});
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}, [
|
|
267
|
-
|
|
268
|
-
}, [
|
|
269
|
-
|
|
270
|
-
}, [
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
children: [/* @__PURE__ */
|
|
274
|
+
T(() => {
|
|
275
|
+
A && (ve(100), le(!0));
|
|
276
|
+
}, [A]), T(() => {
|
|
277
|
+
ie !== 0 && (Q(!1), v && v(!0));
|
|
278
|
+
}, [ie]), T(() => {
|
|
279
|
+
J !== -1 && (le(!0), te(!1));
|
|
280
|
+
}, [J]);
|
|
281
|
+
const nl = () => {
|
|
282
|
+
Le(), le(!1), ue && ue();
|
|
283
|
+
}, Le = () => {
|
|
284
|
+
N(), X(!1), U(!1), me && me(), q && q();
|
|
285
|
+
}, al = /* @__PURE__ */ d("div", {
|
|
286
|
+
children: [/* @__PURE__ */ l(El, {}), /* @__PURE__ */ l("div", {
|
|
277
287
|
style: {
|
|
278
288
|
marginTop: 8
|
|
279
289
|
},
|
|
280
290
|
children: "添加图片"
|
|
281
291
|
})]
|
|
282
|
-
}),
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
|
|
292
|
+
}), ol = (t) => {
|
|
293
|
+
const i = F.filter((a) => a.uid !== t.uid);
|
|
294
|
+
Ee(i);
|
|
295
|
+
}, rl = () => {
|
|
296
|
+
B === "labeled" ? h === "vlm" ? window.location.href = `${he}/%E6%9C%89%E6%A0%87%E6%B3%A8%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${fe}/%E6%A0%87%E6%B3%A8%E6%A0%BC%E5%BC%8F%E7%A4%BA%E4%BE%8B.zip` : h === "vlm" ? window.location.href = `${he}/%E6%97%A0%E6%A0%87%E6%B3%A8%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${fe}/%E7%A4%BA%E4%BE%8B%E5%8E%8B%E7%BC%A9%E5%8C%85.zip`;
|
|
297
|
+
}, cl = () => {
|
|
298
|
+
N(), Re(!1), X(!1), U(!1);
|
|
289
299
|
};
|
|
290
|
-
return
|
|
291
|
-
|
|
292
|
-
labelFormat: "json",
|
|
300
|
+
return T(() => {
|
|
301
|
+
Ae === "labeled" && W.setFieldsValue({
|
|
302
|
+
labelFormat: E.labelFormat || "json",
|
|
293
303
|
acceptType: "zip"
|
|
294
304
|
/* Zip */
|
|
295
305
|
});
|
|
296
|
-
}, [
|
|
297
|
-
children: [/* @__PURE__ */
|
|
306
|
+
}, [Ae, E.labelFormat]), /* @__PURE__ */ d(de, {
|
|
307
|
+
children: [/* @__PURE__ */ l(H, {
|
|
298
308
|
className: "upload-pics",
|
|
299
309
|
width: 600,
|
|
300
310
|
title: "导入数据",
|
|
301
|
-
open:
|
|
311
|
+
open: _,
|
|
302
312
|
destroyOnClose: !0,
|
|
303
|
-
onCancel: () =>
|
|
313
|
+
onCancel: () => Ue(),
|
|
304
314
|
maskClosable: !1,
|
|
305
315
|
centered: !0,
|
|
306
|
-
footer: [/* @__PURE__ */
|
|
307
|
-
onClick:
|
|
316
|
+
footer: [/* @__PURE__ */ l(V, {
|
|
317
|
+
onClick: Ue,
|
|
308
318
|
children: "取消"
|
|
309
|
-
}, "cancel"), /* @__PURE__ */
|
|
319
|
+
}, "cancel"), /* @__PURE__ */ l(V, {
|
|
310
320
|
type: "primary",
|
|
311
321
|
htmlType: "submit",
|
|
312
322
|
form: "importModal",
|
|
313
|
-
disabled: n === "image" && !
|
|
314
|
-
loading:
|
|
323
|
+
disabled: n === "image" && !g.length || n === "zip" && !F.length || ee && Ne == 0 || Qe,
|
|
324
|
+
loading: Z == !0,
|
|
315
325
|
onClick: () => {
|
|
316
|
-
|
|
326
|
+
il(), te(!0);
|
|
317
327
|
},
|
|
318
328
|
children: "导入"
|
|
319
329
|
}, "confirm")],
|
|
320
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ d(O, {
|
|
321
331
|
className: "file-form",
|
|
322
332
|
preserve: !1,
|
|
323
|
-
form:
|
|
333
|
+
form: W,
|
|
324
334
|
initialValues: {
|
|
325
335
|
acceptType: "image",
|
|
326
336
|
labelState: "unlabeled"
|
|
@@ -333,245 +343,251 @@ const Wl = (y) => {
|
|
|
333
343
|
width: 110
|
|
334
344
|
}
|
|
335
345
|
},
|
|
336
|
-
children: [
|
|
346
|
+
children: [(h === "ocr" || h === "vlm") && /* @__PURE__ */ l(O.Item, {
|
|
337
347
|
label: "数据标注状态",
|
|
338
348
|
name: "labelState",
|
|
339
349
|
rules: [{
|
|
340
350
|
required: !0,
|
|
341
351
|
message: "请选择数据标注状态"
|
|
342
352
|
}],
|
|
343
|
-
children: /* @__PURE__ */
|
|
344
|
-
disabled:
|
|
353
|
+
children: /* @__PURE__ */ d(k.Group, {
|
|
354
|
+
disabled: Z,
|
|
345
355
|
onChange: (t) => {
|
|
346
|
-
|
|
356
|
+
Ye(t.target.value);
|
|
347
357
|
},
|
|
348
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ l(k, {
|
|
349
359
|
value: "unlabeled",
|
|
350
360
|
children: "无标注信息"
|
|
351
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ d(k, {
|
|
352
362
|
value: "labeled",
|
|
353
|
-
children: "有标注信息"
|
|
363
|
+
children: ["有标注信息", h === "vlm" && /* @__PURE__ */ l(hl, {
|
|
364
|
+
title: "支持上传带OCR标注信息的数据",
|
|
365
|
+
children: /* @__PURE__ */ l(yl, {
|
|
366
|
+
style: {
|
|
367
|
+
cursor: "pointer",
|
|
368
|
+
marginLeft: 4,
|
|
369
|
+
marginTop: 2
|
|
370
|
+
}
|
|
371
|
+
})
|
|
372
|
+
})]
|
|
354
373
|
})]
|
|
355
374
|
})
|
|
356
|
-
}),
|
|
375
|
+
}), B === "labeled" && /* @__PURE__ */ l(O.Item, {
|
|
357
376
|
label: "标注格式",
|
|
358
377
|
name: "labelFormat",
|
|
359
378
|
rules: [{
|
|
360
379
|
required: !0,
|
|
361
380
|
message: "请选择标注格式"
|
|
362
381
|
}],
|
|
363
|
-
children: /* @__PURE__ */
|
|
364
|
-
disabled:
|
|
365
|
-
children: /* @__PURE__ */
|
|
366
|
-
value: "json",
|
|
367
|
-
children: "json"
|
|
382
|
+
children: /* @__PURE__ */ l(k.Group, {
|
|
383
|
+
disabled: Z,
|
|
384
|
+
children: /* @__PURE__ */ l(k, {
|
|
385
|
+
value: E.labelFormat || "json",
|
|
386
|
+
children: E.labelFormat || "json"
|
|
368
387
|
})
|
|
369
388
|
})
|
|
370
|
-
}), /* @__PURE__ */
|
|
389
|
+
}), /* @__PURE__ */ l(O.Item, {
|
|
371
390
|
label: "导入方式",
|
|
372
391
|
name: "acceptType",
|
|
373
392
|
rules: [{
|
|
374
393
|
required: !0,
|
|
375
394
|
message: "请选择导入方式"
|
|
376
395
|
}],
|
|
377
|
-
children: /* @__PURE__ */
|
|
378
|
-
disabled:
|
|
379
|
-
children: [
|
|
396
|
+
children: /* @__PURE__ */ d(k.Group, {
|
|
397
|
+
disabled: Z,
|
|
398
|
+
children: [B !== "labeled" && /* @__PURE__ */ l(k.Button, {
|
|
380
399
|
value: "image",
|
|
381
400
|
children: "上传图片"
|
|
382
|
-
}), /* @__PURE__ */
|
|
401
|
+
}), /* @__PURE__ */ l(k.Button, {
|
|
383
402
|
value: "zip",
|
|
384
403
|
children: "上传压缩包"
|
|
385
404
|
})]
|
|
386
405
|
})
|
|
387
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ d("div", {
|
|
388
407
|
className: "file-upload",
|
|
389
|
-
children: [(n === "image" && !
|
|
408
|
+
children: [(n === "image" && !g.length || n === "zip") && /* @__PURE__ */ d(vl, {
|
|
390
409
|
name: "file",
|
|
391
410
|
showUploadList: !1,
|
|
392
411
|
multiple: !0,
|
|
393
|
-
beforeUpload:
|
|
412
|
+
beforeUpload: $e,
|
|
394
413
|
accept: n === "zip" ? ".zip" : "image/png, image/jpeg, image/jpg, image/bmp",
|
|
395
414
|
maxCount: n === "zip" ? 1 : void 0,
|
|
396
|
-
onChange:
|
|
397
|
-
disabled: n === "zip" ?
|
|
398
|
-
children: [/* @__PURE__ */
|
|
415
|
+
onChange: ke,
|
|
416
|
+
disabled: n === "zip" ? F.length === 1 : !1,
|
|
417
|
+
children: [/* @__PURE__ */ l("span", {
|
|
399
418
|
className: "file-upload-icon",
|
|
400
|
-
children: /* @__PURE__ */
|
|
401
|
-
}), /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ l(Sl, {})
|
|
420
|
+
}), /* @__PURE__ */ d(Pe, {
|
|
402
421
|
className: "file-upload-action",
|
|
403
|
-
children: [n === "image" && "拖拽图片至此,或者", n === "zip" && "拖拽包含“图片”的压缩包至此,或者", /* @__PURE__ */
|
|
422
|
+
children: [n === "image" && "拖拽图片至此,或者", n === "zip" && "拖拽包含“图片”的压缩包至此,或者", /* @__PURE__ */ l(V, {
|
|
404
423
|
type: "link",
|
|
405
424
|
style: {
|
|
406
425
|
padding: 0
|
|
407
426
|
},
|
|
408
|
-
disabled: n === "zip" ?
|
|
427
|
+
disabled: n === "zip" ? F.length === 1 : !1,
|
|
409
428
|
children: n === "image" ? "上传图片" : "上传压缩包"
|
|
410
429
|
})]
|
|
411
|
-
}), n === "image" && /* @__PURE__ */
|
|
430
|
+
}), n === "image" && /* @__PURE__ */ d("div", {
|
|
412
431
|
className: "file-upload-desc",
|
|
413
432
|
style: {
|
|
414
433
|
width: 350
|
|
415
434
|
},
|
|
416
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ d("div", {
|
|
417
436
|
className: "item-upload-desc item-upload-desc__1",
|
|
418
|
-
children: "1. 支持jpg、png 、jpeg 、bmp格式,单张图片不超过
|
|
419
|
-
}), /* @__PURE__ */
|
|
437
|
+
children: ["1. 支持jpg、png 、jpeg 、bmp格式,单张图片不超过", E.maxImageSize / _e, "M;"]
|
|
438
|
+
}), /* @__PURE__ */ l("div", {
|
|
420
439
|
className: "item-upload-desc",
|
|
421
440
|
children: "2. 单次上传最多可选择100个文件。"
|
|
422
441
|
})]
|
|
423
|
-
}), n === "zip" && /* @__PURE__ */
|
|
442
|
+
}), n === "zip" && /* @__PURE__ */ d("div", {
|
|
424
443
|
className: "file-upload-desc",
|
|
425
444
|
style: {
|
|
426
445
|
width: 350
|
|
427
446
|
},
|
|
428
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ l("div", {
|
|
429
448
|
className: "item-upload-desc item-upload-desc__1",
|
|
430
449
|
children: "1. 仅支持.zip格式,单个压缩包不超过2G;"
|
|
431
|
-
}),
|
|
432
|
-
children:
|
|
433
|
-
className: "item-upload-desc",
|
|
434
|
-
children: "2. 压缩包内每张图片(jpg、png 、jpeg 、bmp格式)需要对应一个json文件,名称需一致,位置处在一级目录下;"
|
|
435
|
-
}), /* @__PURE__ */ e("div", {
|
|
450
|
+
}), B === "labeled" ? /* @__PURE__ */ l(de, {
|
|
451
|
+
children: E.zipUploadTexts.labeled.description.map((t, i) => /* @__PURE__ */ d("div", {
|
|
436
452
|
className: "item-upload-desc",
|
|
437
|
-
children: "
|
|
438
|
-
})
|
|
439
|
-
}) : /* @__PURE__ */
|
|
453
|
+
children: [i + 2, ". ", t]
|
|
454
|
+
}, i))
|
|
455
|
+
}) : /* @__PURE__ */ d("div", {
|
|
440
456
|
className: "item-upload-desc",
|
|
441
|
-
children: "2.
|
|
442
|
-
}), /* @__PURE__ */
|
|
457
|
+
children: ["2. ", E.zipUploadTexts.unlabeled.description[0]]
|
|
458
|
+
}), /* @__PURE__ */ d("div", {
|
|
443
459
|
className: "item-upload-desc",
|
|
444
|
-
children: [
|
|
460
|
+
children: [B === "labeled" ? E.zipUploadTexts.labeled.description.length + 2 : 3, ". 单次仅可上传1个文件。"]
|
|
445
461
|
})]
|
|
446
462
|
})]
|
|
447
|
-
}), n === "image" &&
|
|
463
|
+
}), n === "image" && g.length ? /* @__PURE__ */ l("div", {
|
|
448
464
|
className: "picture-upload",
|
|
449
|
-
children: /* @__PURE__ */
|
|
465
|
+
children: /* @__PURE__ */ l(gl, {
|
|
450
466
|
listType: "picture-card",
|
|
451
|
-
fileList:
|
|
467
|
+
fileList: g,
|
|
452
468
|
multiple: !0,
|
|
453
469
|
showUploadList: {
|
|
454
470
|
showPreviewIcon: !1
|
|
455
471
|
},
|
|
456
|
-
beforeUpload:
|
|
472
|
+
beforeUpload: $e,
|
|
457
473
|
accept: "image/png, image/jpeg, image/jpg, image/bmp",
|
|
458
|
-
onChange:
|
|
459
|
-
children:
|
|
474
|
+
onChange: ke,
|
|
475
|
+
children: g.length < 100 ? al : null
|
|
460
476
|
})
|
|
461
|
-
}) : /* @__PURE__ */
|
|
477
|
+
}) : /* @__PURE__ */ l(de, {}), n === "zip" && /* @__PURE__ */ d("div", {
|
|
462
478
|
className: "upload-wrapper",
|
|
463
|
-
children: [
|
|
479
|
+
children: [F != null && F.length ? /* @__PURE__ */ l("div", {
|
|
464
480
|
className: "upload-main",
|
|
465
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ l(pe, {
|
|
466
482
|
gutter: [24, 8],
|
|
467
483
|
className: "upload-pannel",
|
|
468
|
-
children:
|
|
484
|
+
children: F.map((t) => /* @__PURE__ */ l(Cl, {
|
|
469
485
|
span: 24,
|
|
470
486
|
className: "upload-item",
|
|
471
|
-
children: /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ d(pe, {
|
|
472
488
|
justify: "space-between",
|
|
473
489
|
align: "middle",
|
|
474
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ d(pe, {
|
|
475
491
|
align: "middle",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ l("span", {
|
|
477
493
|
className: "upload-item-file-icon",
|
|
478
|
-
children: /* @__PURE__ */
|
|
479
|
-
}), /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ l(zl, {})
|
|
495
|
+
}), /* @__PURE__ */ l("span", {
|
|
480
496
|
className: "upload-item-name",
|
|
481
497
|
children: t.name
|
|
482
498
|
})]
|
|
483
|
-
}), /* @__PURE__ */
|
|
499
|
+
}), /* @__PURE__ */ l(V, {
|
|
484
500
|
className: "upload-item-upload-delete",
|
|
485
501
|
type: "link",
|
|
486
|
-
disabled:
|
|
487
|
-
onClick: () =>
|
|
488
|
-
children: /* @__PURE__ */
|
|
502
|
+
disabled: Z,
|
|
503
|
+
onClick: () => ol(t),
|
|
504
|
+
children: /* @__PURE__ */ l(wl, {})
|
|
489
505
|
})]
|
|
490
506
|
})
|
|
491
507
|
}, t.uid))
|
|
492
508
|
})
|
|
493
|
-
}) : null, n === "zip" && /* @__PURE__ */
|
|
509
|
+
}) : null, n === "zip" && /* @__PURE__ */ d("div", {
|
|
494
510
|
className: "upload-example",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ l("div", {
|
|
496
512
|
className: "upload-example-header",
|
|
497
|
-
children: /* @__PURE__ */
|
|
498
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: /* @__PURE__ */ d(Pe, {
|
|
514
|
+
children: [/* @__PURE__ */ l("span", {
|
|
499
515
|
children: "数据示例:"
|
|
500
|
-
}), /* @__PURE__ */
|
|
516
|
+
}), /* @__PURE__ */ l(V, {
|
|
501
517
|
size: "small",
|
|
502
518
|
type: "link",
|
|
503
519
|
style: {
|
|
504
520
|
padding: 0
|
|
505
521
|
},
|
|
506
522
|
onClick: (t) => {
|
|
507
|
-
t.stopPropagation(),
|
|
523
|
+
t.stopPropagation(), rl();
|
|
508
524
|
},
|
|
509
525
|
children: "下载示例 >"
|
|
510
526
|
})]
|
|
511
527
|
})
|
|
512
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ l("div", {
|
|
513
529
|
className: "upload-example-main",
|
|
514
|
-
children: /* @__PURE__ */
|
|
515
|
-
src:
|
|
530
|
+
children: /* @__PURE__ */ l("img", {
|
|
531
|
+
src: B === "labeled" ? h === "vlm" ? Bl : Rl : h === "vlm" ? Fl : xl
|
|
516
532
|
})
|
|
517
533
|
})]
|
|
518
534
|
})]
|
|
519
535
|
})]
|
|
520
536
|
})]
|
|
521
537
|
})
|
|
522
|
-
}),
|
|
538
|
+
}), ee && /* @__PURE__ */ l(H, {
|
|
523
539
|
className: "uploading-modal",
|
|
524
540
|
width: 404,
|
|
525
541
|
title: null,
|
|
526
|
-
open:
|
|
542
|
+
open: ee,
|
|
527
543
|
maskClosable: !1,
|
|
528
544
|
closable: n !== "image",
|
|
529
545
|
onCancel: () => {
|
|
530
|
-
|
|
546
|
+
Le();
|
|
531
547
|
},
|
|
532
548
|
footer: null,
|
|
533
|
-
children: /* @__PURE__ */
|
|
549
|
+
children: /* @__PURE__ */ l("div", {
|
|
534
550
|
className: "upload-spin",
|
|
535
|
-
children: /* @__PURE__ */
|
|
536
|
-
tip: n === "image" ? `数据导入中(${
|
|
551
|
+
children: /* @__PURE__ */ l(bl, {
|
|
552
|
+
tip: n === "image" ? `数据导入中(${ie}/${g.length}),请耐心等待` : `处理中(${Ne}/100%),请耐心等待`,
|
|
537
553
|
size: "large",
|
|
538
|
-
children: /* @__PURE__ */
|
|
554
|
+
children: /* @__PURE__ */ l("div", {
|
|
539
555
|
className: "content"
|
|
540
556
|
})
|
|
541
557
|
})
|
|
542
558
|
})
|
|
543
|
-
}),
|
|
559
|
+
}), Ce && /* @__PURE__ */ l(H, {
|
|
544
560
|
className: "result",
|
|
545
561
|
width: 424,
|
|
546
562
|
title: null,
|
|
547
|
-
open:
|
|
563
|
+
open: Ce,
|
|
548
564
|
closable: !1,
|
|
549
565
|
footer: null,
|
|
550
|
-
children: /* @__PURE__ */
|
|
566
|
+
children: /* @__PURE__ */ l("div", {
|
|
551
567
|
className: "upload-result",
|
|
552
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ l(Me, {
|
|
553
569
|
status: "success",
|
|
554
|
-
title: n === "image" ? `数据导入完成,成功${
|
|
555
|
-
extra: [/* @__PURE__ */
|
|
556
|
-
onClick:
|
|
570
|
+
title: n === "image" ? `数据导入完成,成功${J}个,失败${be}个,去重${g.length - J - be}个` : A && `数据导入完成,格式不符合的图片${A.formatErrorCount || 0}个,成功${A.successCount || 0}个,去重${A.repeatCount || 0}个,失败${A.failedCount || 0}个` + (B === "labeled" ? `(${(E.labelFormat || "json").toUpperCase()}格式不符合${A.labelErrorCount}个)` : ""),
|
|
571
|
+
extra: [/* @__PURE__ */ l(V, {
|
|
572
|
+
onClick: nl,
|
|
557
573
|
children: "关闭"
|
|
558
574
|
}, "close")]
|
|
559
575
|
})
|
|
560
576
|
})
|
|
561
|
-
}),
|
|
577
|
+
}), xe && /* @__PURE__ */ l(H, {
|
|
562
578
|
className: "result",
|
|
563
579
|
width: 424,
|
|
564
580
|
title: null,
|
|
565
|
-
open:
|
|
581
|
+
open: xe,
|
|
566
582
|
closable: !1,
|
|
567
583
|
footer: null,
|
|
568
|
-
children: /* @__PURE__ */
|
|
584
|
+
children: /* @__PURE__ */ l("div", {
|
|
569
585
|
className: "upload-result",
|
|
570
|
-
children: /* @__PURE__ */
|
|
586
|
+
children: /* @__PURE__ */ l(Me, {
|
|
571
587
|
status: "error",
|
|
572
588
|
title: "文件处理失败",
|
|
573
|
-
extra: [/* @__PURE__ */
|
|
574
|
-
onClick:
|
|
589
|
+
extra: [/* @__PURE__ */ l(V, {
|
|
590
|
+
onClick: cl,
|
|
575
591
|
children: "关闭"
|
|
576
592
|
}, "close")]
|
|
577
593
|
})
|
|
@@ -580,5 +596,5 @@ const Wl = (y) => {
|
|
|
580
596
|
});
|
|
581
597
|
};
|
|
582
598
|
export {
|
|
583
|
-
|
|
599
|
+
nt as default
|
|
584
600
|
};
|