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