handy-uploader 2.0.2 → 2.0.3
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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/components/InsertButton.vue.d.ts +5 -13
- package/dist/components/SelectFileIconType.vue.d.ts +3 -23
- package/dist/components/SimpleUploader.vue.d.ts +7 -35
- package/dist/components/TableUploader.vue.d.ts +6 -38
- package/dist/components/ThumbnailUploader.vue.d.ts +8 -44
- package/dist/components/handyUploader.vue.d.ts +19 -77
- package/dist/composables/useErrorHandler.d.ts +4 -4
- package/dist/composables/useFileUpload.d.ts +2 -2
- package/dist/handy-uploader.css +1 -0
- package/dist/handy-uploader.es.js +1237 -1336
- package/dist/handy-uploader.umd.js +1 -1
- package/dist/lib/index.d.ts +3 -694
- package/dist/logo.png +0 -0
- package/dist/utils/fileUtils.d.ts +17 -2
- package/package.json +37 -21
|
@@ -1,69 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
props: {
|
|
5
|
-
fileFormat: {},
|
|
6
|
-
size: { default: 30 }
|
|
7
|
-
},
|
|
8
|
-
setup(a) {
|
|
9
|
-
const n = a, e = ie(() => ({
|
|
10
|
-
pdf: { icon: "mdi-file-pdf-outline", color: "red darken-1" },
|
|
11
|
-
doc: { icon: "mdi-file-word-outline", color: "blue darken-1" },
|
|
12
|
-
docx: { icon: "mdi-file-word-outline", color: "blue darken-1" },
|
|
13
|
-
odt: { icon: "mdi-file-word-outline", color: "blue darken-1" },
|
|
14
|
-
jpg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
15
|
-
jpeg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
16
|
-
png: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
17
|
-
tif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
18
|
-
bmp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
19
|
-
xls: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
|
|
20
|
-
xlsx: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
|
|
21
|
-
ppt: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
22
|
-
pptx: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
23
|
-
pptm: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
24
|
-
mp4: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
25
|
-
mov: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
26
|
-
flv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
27
|
-
wmv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
28
|
-
avi: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
29
|
-
dwg: { icon: "mdi-file-cad", color: "indigo lighten-2" },
|
|
30
|
-
zip: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
31
|
-
rar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
32
|
-
"7-zip": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
33
|
-
txt: { icon: "mdi-script-text-outline", color: "light-green darken-3" }
|
|
34
|
-
})[n.fileFormat] || {
|
|
35
|
-
icon: "mdi-file-question-outline",
|
|
36
|
-
color: "indigo lighten-1"
|
|
37
|
-
});
|
|
38
|
-
return (t, p) => {
|
|
39
|
-
const D = f("v-icon");
|
|
40
|
-
return c(), V("div", null, [
|
|
41
|
-
r(D, {
|
|
42
|
-
size: n.size,
|
|
43
|
-
color: e.value.color,
|
|
44
|
-
textContent: x(e.value.icon)
|
|
45
|
-
}, null, 8, ["size", "color", "textContent"])
|
|
46
|
-
]);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
function de(a) {
|
|
51
|
-
const n = a / 1024, e = n / 1024;
|
|
1
|
+
import { defineComponent as ee, computed as le, resolveComponent as g, createElementBlock as V, openBlock as m, createVNode as r, withCtx as a, createTextVNode as w, toDisplayString as x, reactive as _e, watch as E, onMounted as ze, Fragment as O, renderList as X, createBlock as b, createElementVNode as A, unref as Z, createCommentVNode as B, mergeProps as Y, withDirectives as xe, vShow as we, nextTick as Te, ref as ae, onBeforeMount as $e, onDeactivated as Le } from "vue";
|
|
2
|
+
function ce(o) {
|
|
3
|
+
const i = o / 1024, e = i / 1024;
|
|
52
4
|
return e >= 1 ? {
|
|
53
5
|
text: `${e.toFixed(2)} MB`,
|
|
54
6
|
color: e > 10 ? "red" : e > 5 ? "orange" : "green"
|
|
55
7
|
} : {
|
|
56
|
-
text: `${
|
|
57
|
-
color:
|
|
8
|
+
text: `${i.toFixed(2)} KB`,
|
|
9
|
+
color: i > 1e3 ? "orange" : "green"
|
|
58
10
|
};
|
|
59
11
|
}
|
|
60
|
-
function re(
|
|
12
|
+
function re(o, i) {
|
|
61
13
|
var t;
|
|
62
|
-
const e = ((t =
|
|
63
|
-
return ["jpg", "jpeg", "png", "gif", "bmp", "svg", "webp", "tiff"].includes(e) ||
|
|
14
|
+
const e = ((t = o.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
|
|
15
|
+
return ["jpg", "jpeg", "png", "gif", "bmp", "svg", "webp", "tiff"].includes(e) || i != null && i.startsWith("image/") ? "image" : ["pdf", "doc", "docx", "txt", "rtf", "odt"].includes(e) ? "document" : ["xls", "xlsx", "csv", "ods"].includes(e) ? "spreadsheet" : ["ppt", "pptx", "odp"].includes(e) ? "presentation" : ["zip", "rar", "7z", "tar", "gz"].includes(e) ? "archive" : ["mp4", "avi", "mov", "wmv", "flv", "webm"].includes(e) ? "video" : ["mp3", "wav", "flac", "aac", "ogg"].includes(e) ? "audio" : "unknown";
|
|
64
16
|
}
|
|
65
|
-
|
|
66
|
-
|
|
17
|
+
const de = {
|
|
18
|
+
// PDF
|
|
19
|
+
pdf: { icon: "mdi-file-pdf-box", color: "red darken-1" },
|
|
20
|
+
// Word Documents
|
|
21
|
+
doc: { icon: "mdi-file-word-outline", color: "blue darken-1" },
|
|
22
|
+
docx: { icon: "mdi-file-word-outline", color: "blue darken-1" },
|
|
23
|
+
odt: { icon: "mdi-file-word-outline", color: "blue darken-1" },
|
|
24
|
+
// Images
|
|
25
|
+
jpg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
26
|
+
jpeg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
27
|
+
png: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
28
|
+
gif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
29
|
+
bmp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
30
|
+
tif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
31
|
+
tiff: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
32
|
+
svg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
33
|
+
webp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
|
|
34
|
+
// Excel/Spreadsheets
|
|
35
|
+
xls: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
|
|
36
|
+
xlsx: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
|
|
37
|
+
csv: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
|
|
38
|
+
ods: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
|
|
39
|
+
// PowerPoint/Presentations
|
|
40
|
+
ppt: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
41
|
+
pptx: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
42
|
+
pptm: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
43
|
+
odp: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
|
|
44
|
+
// Videos
|
|
45
|
+
mp4: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
46
|
+
mov: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
47
|
+
flv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
48
|
+
wmv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
49
|
+
avi: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
50
|
+
webm: { icon: "mdi-file-video-outline", color: "red lighten-1" },
|
|
51
|
+
// Audio
|
|
52
|
+
mp3: { icon: "mdi-file-music-outline", color: "purple darken-1" },
|
|
53
|
+
wav: { icon: "mdi-file-music-outline", color: "purple darken-1" },
|
|
54
|
+
flac: { icon: "mdi-file-music-outline", color: "purple darken-1" },
|
|
55
|
+
aac: { icon: "mdi-file-music-outline", color: "purple darken-1" },
|
|
56
|
+
ogg: { icon: "mdi-file-music-outline", color: "purple darken-1" },
|
|
57
|
+
// CAD
|
|
58
|
+
dwg: { icon: "mdi-file-cad", color: "indigo lighten-2" },
|
|
59
|
+
// Archives
|
|
60
|
+
zip: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
61
|
+
rar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
62
|
+
"7z": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
63
|
+
"7-zip": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
64
|
+
tar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
65
|
+
gz: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
|
|
66
|
+
// Text files
|
|
67
|
+
txt: { icon: "mdi-script-text-outline", color: "light-green darken-3" },
|
|
68
|
+
rtf: { icon: "mdi-script-text-outline", color: "light-green darken-3" },
|
|
69
|
+
// Unknown/Default file type
|
|
70
|
+
unknown: { icon: "mdi-file-question-outline", color: "grey darken-1" }
|
|
71
|
+
};
|
|
72
|
+
function kt(o, i) {
|
|
73
|
+
const e = re(o, i), t = {
|
|
67
74
|
image: { icon: "mdi-file-image", color: "blue" },
|
|
68
75
|
document: { icon: "mdi-file-document", color: "red" },
|
|
69
76
|
spreadsheet: { icon: "mdi-file-excel", color: "green" },
|
|
@@ -71,22 +78,34 @@ function Te(a, n) {
|
|
|
71
78
|
archive: { icon: "mdi-folder-zip", color: "purple" },
|
|
72
79
|
video: { icon: "mdi-file-video", color: "pink" },
|
|
73
80
|
audio: { icon: "mdi-file-music", color: "teal" },
|
|
74
|
-
file: { icon: "mdi-file", color: "grey" }
|
|
81
|
+
file: { icon: "mdi-file", color: "grey" },
|
|
82
|
+
unknown: { icon: "mdi-file-question-outline", color: "grey darken-1" }
|
|
75
83
|
};
|
|
76
|
-
return t[e] || t.
|
|
84
|
+
return t[e] || t.unknown;
|
|
85
|
+
}
|
|
86
|
+
function ue(o) {
|
|
87
|
+
var e;
|
|
88
|
+
const i = (e = o.split(".").pop()) == null ? void 0 : e.toLowerCase();
|
|
89
|
+
return i && de[i] || de.unknown;
|
|
90
|
+
}
|
|
91
|
+
function me(o) {
|
|
92
|
+
return ue(o).icon;
|
|
77
93
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
94
|
+
function fe(o) {
|
|
95
|
+
return ue(o).color;
|
|
80
96
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
97
|
+
function pe(o, i) {
|
|
98
|
+
return re(o, i) === "image";
|
|
83
99
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
100
|
+
function Ve(o, i) {
|
|
101
|
+
return o <= i;
|
|
86
102
|
}
|
|
87
|
-
function
|
|
103
|
+
function Be(o, i) {
|
|
104
|
+
return o < i;
|
|
105
|
+
}
|
|
106
|
+
function Fe(o) {
|
|
88
107
|
var t;
|
|
89
|
-
const
|
|
108
|
+
const i = ((t = o.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
|
|
90
109
|
return {
|
|
91
110
|
// Image types
|
|
92
111
|
jpg: "image/jpeg",
|
|
@@ -113,55 +132,86 @@ function _e(a) {
|
|
|
113
132
|
// Archive types
|
|
114
133
|
zip: "application/zip",
|
|
115
134
|
rar: "application/x-rar-compressed"
|
|
116
|
-
}[
|
|
135
|
+
}[i] || "application/octet-stream";
|
|
117
136
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
137
|
+
function Se(o, i) {
|
|
138
|
+
if (!o || !i)
|
|
139
|
+
return console.warn("constructImageDataUrl: missing base64 or format", { hasBase64: !!o, format: i }), "";
|
|
140
|
+
const e = o.replace(/^data:[^;]+;base64,/, "");
|
|
141
|
+
return `data:${i.startsWith("image/") ? i : `image/${i}`};base64,${e}`;
|
|
121
142
|
}
|
|
122
|
-
function
|
|
123
|
-
return new Promise((
|
|
124
|
-
const L = document.createElement("canvas"),
|
|
125
|
-
|
|
126
|
-
let { width:
|
|
127
|
-
if (
|
|
128
|
-
const
|
|
129
|
-
|
|
143
|
+
function Ie(o, i = 0.8, e = 1920, t = 1080) {
|
|
144
|
+
return new Promise((c, T) => {
|
|
145
|
+
const L = document.createElement("canvas"), k = L.getContext("2d"), C = new Image();
|
|
146
|
+
C.onload = () => {
|
|
147
|
+
let { width: h, height: D } = C;
|
|
148
|
+
if (h > e || D > t) {
|
|
149
|
+
const U = Math.min(e / h, t / D);
|
|
150
|
+
h *= U, D *= U;
|
|
130
151
|
}
|
|
131
|
-
L.width =
|
|
132
|
-
const $ = L.toDataURL("image/jpeg",
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
},
|
|
152
|
+
L.width = h, L.height = D, k == null || k.drawImage(C, 0, 0, h, D);
|
|
153
|
+
const $ = L.toDataURL("image/jpeg", i);
|
|
154
|
+
c($);
|
|
155
|
+
}, C.onerror = () => T(new Error("Failed to load image for compression"));
|
|
156
|
+
const _ = new FileReader();
|
|
157
|
+
_.onload = (h) => {
|
|
158
|
+
var D;
|
|
159
|
+
C.src = (D = h.target) == null ? void 0 : D.result;
|
|
160
|
+
}, _.onerror = () => T(new Error("Failed to read file")), _.readAsDataURL(o);
|
|
140
161
|
});
|
|
141
162
|
}
|
|
142
|
-
function
|
|
143
|
-
return new Promise((
|
|
163
|
+
function ye(o) {
|
|
164
|
+
return new Promise((i, e) => {
|
|
144
165
|
const t = new FileReader();
|
|
145
166
|
t.onload = () => {
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
}, t.onerror = () => e(new Error("Failed to read file")), t.readAsDataURL(
|
|
167
|
+
const c = t.result, T = c.split(",")[1] || c;
|
|
168
|
+
i(T);
|
|
169
|
+
}, t.onerror = () => e(new Error("Failed to read file")), t.readAsDataURL(o);
|
|
149
170
|
});
|
|
150
171
|
}
|
|
151
|
-
const
|
|
172
|
+
const ie = /* @__PURE__ */ ee({
|
|
173
|
+
__name: "SelectFileIconType",
|
|
174
|
+
props: {
|
|
175
|
+
fileFormat: {},
|
|
176
|
+
size: { default: 30 }
|
|
177
|
+
},
|
|
178
|
+
setup(o) {
|
|
179
|
+
const i = o, e = le(() => {
|
|
180
|
+
const t = `file.${i.fileFormat}`;
|
|
181
|
+
return ue(t);
|
|
182
|
+
});
|
|
183
|
+
return (t, c) => {
|
|
184
|
+
const T = g("v-icon");
|
|
185
|
+
return m(), V("div", null, [
|
|
186
|
+
r(T, {
|
|
187
|
+
size: i.size,
|
|
188
|
+
color: e.value.color
|
|
189
|
+
}, {
|
|
190
|
+
default: a(() => [
|
|
191
|
+
w(x(e.value.icon), 1)
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["size", "color"])
|
|
195
|
+
]);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}), Ue = {
|
|
199
|
+
key: 0,
|
|
200
|
+
style: { height: "200px", display: "flex", "align-items": "center", "justify-content": "center", "background-color": "#f5f5f5", overflow: "hidden" }
|
|
201
|
+
}, Ee = ["src", "onError"], Pe = {
|
|
152
202
|
key: 1,
|
|
153
203
|
style: { height: "200px", "background-color": "#f5f5f5", position: "relative", overflow: "hidden", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
154
|
-
},
|
|
204
|
+
}, Me = ["src", "onError"], je = {
|
|
155
205
|
key: 1,
|
|
156
206
|
style: { width: "100%", height: "100%", background: "#e0e0e0", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
157
|
-
},
|
|
207
|
+
}, He = {
|
|
158
208
|
class: "d-flex justify-center align-center",
|
|
159
209
|
style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", background: "rgba(0,0,0,0.7)", "border-radius": "50%", width: "60px", height: "60px", cursor: "pointer" }
|
|
160
|
-
},
|
|
210
|
+
}, Ne = {
|
|
161
211
|
key: 2,
|
|
162
212
|
class: "d-flex justify-center align-center",
|
|
163
213
|
style: { height: "200px", "background-color": "#f5f5f5" }
|
|
164
|
-
},
|
|
214
|
+
}, Re = { class: "BYekan" }, Oe = { class: "BYekan" }, We = { key: 0 }, ge = /* @__PURE__ */ ee({
|
|
165
215
|
__name: "ThumbnailUploader",
|
|
166
216
|
props: {
|
|
167
217
|
lang: { default: "en" },
|
|
@@ -178,212 +228,230 @@ const Se = {
|
|
|
178
228
|
tile: { type: Boolean, default: !1 }
|
|
179
229
|
},
|
|
180
230
|
emits: ["openDeleteDialog", "openEditDocumentDialog"],
|
|
181
|
-
setup(
|
|
182
|
-
const e =
|
|
183
|
-
const
|
|
184
|
-
return console.log("
|
|
185
|
-
},
|
|
186
|
-
|
|
231
|
+
setup(o, { emit: i }) {
|
|
232
|
+
const e = (n) => {
|
|
233
|
+
const l = pe(n);
|
|
234
|
+
return console.log("🔍 isImageFile check:", n, "→", l), l;
|
|
235
|
+
}, t = o, c = i, T = (n) => {
|
|
236
|
+
const l = re(n) === "video";
|
|
237
|
+
return console.log("🎥 Checking if video file:", n, "result:", l, "fileType:", re(n)), l;
|
|
238
|
+
}, L = (n) => {
|
|
239
|
+
var p;
|
|
240
|
+
if (!n.base64 || !n.format)
|
|
241
|
+
return console.error("❌ Missing base64 or format for:", n.name, { base64: !!n.base64, format: n.format }), "";
|
|
242
|
+
const l = Se(n.base64, n.format);
|
|
243
|
+
return console.log("🖼️ Image source for:", n.name, {
|
|
244
|
+
format: n.format,
|
|
245
|
+
base64Length: ((p = n.base64) == null ? void 0 : p.length) || 0,
|
|
246
|
+
srcLength: l.length,
|
|
247
|
+
srcPreview: l.substring(0, 100) + "..."
|
|
248
|
+
}), l;
|
|
249
|
+
}, k = (n) => {
|
|
250
|
+
var l;
|
|
187
251
|
console.error("Image failed to load:", {
|
|
188
|
-
name:
|
|
189
|
-
format:
|
|
190
|
-
base64Length: ((
|
|
252
|
+
name: n.name,
|
|
253
|
+
format: n.format,
|
|
254
|
+
base64Length: ((l = n.base64) == null ? void 0 : l.length) || 0
|
|
191
255
|
});
|
|
192
|
-
},
|
|
193
|
-
var
|
|
194
|
-
const
|
|
195
|
-
if (!
|
|
196
|
-
console.error("❌ Canvas context not available"),
|
|
256
|
+
}, C = _e(/* @__PURE__ */ new Map()), _ = (n) => (console.log("🎬 Starting video thumbnail generation for:", n.name), new Promise((l, p) => {
|
|
257
|
+
var W;
|
|
258
|
+
const s = document.createElement("video"), F = document.createElement("canvas"), y = F.getContext("2d");
|
|
259
|
+
if (!y) {
|
|
260
|
+
console.error("❌ Canvas context not available"), p(new Error("Canvas context not available"));
|
|
197
261
|
return;
|
|
198
262
|
}
|
|
199
|
-
|
|
263
|
+
s.crossOrigin = "anonymous", s.preload = "metadata", s.muted = !0, s.onloadedmetadata = () => {
|
|
200
264
|
if (console.log("📹 Video metadata loaded:", {
|
|
201
|
-
duration:
|
|
202
|
-
width:
|
|
203
|
-
height:
|
|
204
|
-
readyState:
|
|
205
|
-
networkState:
|
|
206
|
-
}),
|
|
207
|
-
console.error("❌ Invalid video duration:",
|
|
208
|
-
const K =
|
|
209
|
-
|
|
265
|
+
duration: s.duration,
|
|
266
|
+
width: s.videoWidth,
|
|
267
|
+
height: s.videoHeight,
|
|
268
|
+
readyState: s.readyState,
|
|
269
|
+
networkState: s.networkState
|
|
270
|
+
}), s.duration === 0 || isNaN(s.duration)) {
|
|
271
|
+
console.error("❌ Invalid video duration:", s.duration);
|
|
272
|
+
const K = h(n);
|
|
273
|
+
D.delete(K), p(new Error("Invalid video duration"));
|
|
210
274
|
return;
|
|
211
275
|
}
|
|
212
|
-
if (
|
|
213
|
-
console.error("❌ Invalid video dimensions:",
|
|
214
|
-
const K =
|
|
215
|
-
|
|
276
|
+
if (s.videoWidth === 0 || s.videoHeight === 0) {
|
|
277
|
+
console.error("❌ Invalid video dimensions:", s.videoWidth, "x", s.videoHeight);
|
|
278
|
+
const K = h(n);
|
|
279
|
+
D.delete(K), p(new Error("Invalid video dimensions"));
|
|
216
280
|
return;
|
|
217
281
|
}
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
console.log("⏰ Seeking to time:",
|
|
221
|
-
},
|
|
222
|
-
console.log("🎯 Video seeked successfully to:",
|
|
282
|
+
F.width = s.videoWidth, F.height = s.videoHeight;
|
|
283
|
+
const N = Math.min(1, s.duration * 0.1);
|
|
284
|
+
console.log("⏰ Seeking to time:", N, "of total duration:", s.duration), s.currentTime = N;
|
|
285
|
+
}, s.onseeked = () => {
|
|
286
|
+
console.log("🎯 Video seeked successfully to:", s.currentTime);
|
|
223
287
|
try {
|
|
224
288
|
console.log("🖼️ Canvas setup:", {
|
|
225
|
-
width:
|
|
226
|
-
height:
|
|
227
|
-
videoCurrentTime:
|
|
228
|
-
videoReadyState:
|
|
229
|
-
}),
|
|
230
|
-
const K =
|
|
289
|
+
width: F.width,
|
|
290
|
+
height: F.height,
|
|
291
|
+
videoCurrentTime: s.currentTime,
|
|
292
|
+
videoReadyState: s.readyState
|
|
293
|
+
}), y.drawImage(s, 0, 0, F.width, F.height);
|
|
294
|
+
const K = y.getImageData(0, 0, F.width, F.height).data.some((te) => te !== 0);
|
|
231
295
|
console.log("🎨 Canvas content check:", K ? "Has content" : "Empty/transparent");
|
|
232
|
-
const
|
|
296
|
+
const G = F.toDataURL("image/jpeg", 0.8);
|
|
233
297
|
console.log("✅ Generated thumbnail:", {
|
|
234
|
-
dataUrlLength:
|
|
235
|
-
startsWithData:
|
|
236
|
-
preview:
|
|
237
|
-
}),
|
|
238
|
-
} catch (
|
|
239
|
-
console.error("❌ Error during thumbnail generation:",
|
|
298
|
+
dataUrlLength: G.length,
|
|
299
|
+
startsWithData: G.startsWith("data:image/jpeg"),
|
|
300
|
+
preview: G.substring(0, 50) + "..."
|
|
301
|
+
}), l(G);
|
|
302
|
+
} catch (N) {
|
|
303
|
+
console.error("❌ Error during thumbnail generation:", N), p(N);
|
|
240
304
|
}
|
|
241
|
-
},
|
|
242
|
-
console.warn("⚠️ Video loading aborted"),
|
|
243
|
-
},
|
|
305
|
+
}, s.onabort = () => {
|
|
306
|
+
console.warn("⚠️ Video loading aborted"), p(new Error("Video loading aborted"));
|
|
307
|
+
}, s.onstalled = () => {
|
|
244
308
|
console.warn("⚠️ Video loading stalled");
|
|
245
|
-
},
|
|
246
|
-
console.error("❌ Video failed to load for thumbnail generation:",
|
|
247
|
-
},
|
|
309
|
+
}, s.onerror = (N) => {
|
|
310
|
+
console.error("❌ Video failed to load for thumbnail generation:", N), p(new Error("Video failed to load for thumbnail generation"));
|
|
311
|
+
}, s.onloadstart = () => {
|
|
248
312
|
console.log("🔄 Video load started");
|
|
249
|
-
},
|
|
313
|
+
}, s.oncanplay = () => {
|
|
250
314
|
console.log("▶️ Video can play");
|
|
251
315
|
};
|
|
252
|
-
const
|
|
253
|
-
let
|
|
254
|
-
|
|
255
|
-
const
|
|
316
|
+
const S = ((W = n.base64) == null ? void 0 : W.replace(/^data:[^;]+;base64,/, "")) || "";
|
|
317
|
+
let I;
|
|
318
|
+
n.format.startsWith("video/") ? I = n.format : (I = Fe(n.name), I.startsWith("video/") || (I = `video/${n.format}`));
|
|
319
|
+
const J = `data:${I};base64,${S}`;
|
|
256
320
|
console.log("🔗 Setting video source:", {
|
|
257
|
-
fileName:
|
|
258
|
-
format:
|
|
259
|
-
mimeType:
|
|
260
|
-
base64Length:
|
|
261
|
-
videoSrcLength:
|
|
262
|
-
}),
|
|
263
|
-
})),
|
|
264
|
-
var
|
|
265
|
-
return `${
|
|
321
|
+
fileName: n.name,
|
|
322
|
+
format: n.format,
|
|
323
|
+
mimeType: I,
|
|
324
|
+
base64Length: S.length,
|
|
325
|
+
videoSrcLength: J.length
|
|
326
|
+
}), s.src = J;
|
|
327
|
+
})), h = (n) => {
|
|
328
|
+
var l;
|
|
329
|
+
return `${n.name}_${(l = n.base64) == null ? void 0 : l.substring(0, 50)}`;
|
|
266
330
|
};
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
if (console.log("🔍 Getting video thumbnail for:",
|
|
271
|
-
return console.log("💾 Returning cached thumbnail for:",
|
|
272
|
-
if (
|
|
273
|
-
console.log("⏳ Thumbnail already being generated for:",
|
|
331
|
+
le(() => (console.log("🔄 Video thumbnails computed updated:", Array.from(C.keys())), C));
|
|
332
|
+
const D = /* @__PURE__ */ new Set(), $ = (n) => {
|
|
333
|
+
const l = h(n);
|
|
334
|
+
if (console.log("🔍 Getting video thumbnail for:", n.name, "cache key:", l), C.has(l))
|
|
335
|
+
return console.log("💾 Returning cached thumbnail for:", n.name), C.get(l);
|
|
336
|
+
if (D.has(l)) {
|
|
337
|
+
console.log("⏳ Thumbnail already being generated for:", n.name);
|
|
274
338
|
return;
|
|
275
339
|
}
|
|
276
|
-
console.log("🚀 No cached thumbnail, generating new one for:",
|
|
277
|
-
console.log("✅ Thumbnail generated and cached for:",
|
|
278
|
-
console.log("🔄 UI update triggered for:",
|
|
340
|
+
console.log("🚀 No cached thumbnail, generating new one for:", n.name), D.add(l), _(n).then((p) => {
|
|
341
|
+
console.log("✅ Thumbnail generated and cached for:", n.name), C.set(l, p), D.delete(l), Te(() => {
|
|
342
|
+
console.log("🔄 UI update triggered for:", n.name);
|
|
279
343
|
});
|
|
280
|
-
}).catch((
|
|
281
|
-
console.error("❌ Failed to generate video thumbnail for:",
|
|
344
|
+
}).catch((p) => {
|
|
345
|
+
console.error("❌ Failed to generate video thumbnail for:", n.name, p), D.delete(l);
|
|
282
346
|
});
|
|
283
|
-
},
|
|
347
|
+
}, U = (n) => {
|
|
284
348
|
console.error("Video thumbnail failed to load:", {
|
|
285
|
-
name:
|
|
286
|
-
format:
|
|
349
|
+
name: n.name,
|
|
350
|
+
format: n.format
|
|
287
351
|
});
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
352
|
+
const l = h(n);
|
|
353
|
+
C.delete(l);
|
|
354
|
+
}, j = (n) => ({
|
|
355
|
+
icon: me(n),
|
|
356
|
+
color: fe(n)
|
|
357
|
+
}), P = (n) => n.tags.length > 0 || !!n.description, H = (n) => {
|
|
358
|
+
n.showDetailState = !n.showDetailState;
|
|
359
|
+
}, u = (n, l) => {
|
|
360
|
+
c("openDeleteDialog", n, l);
|
|
361
|
+
}, f = (n, l) => {
|
|
362
|
+
c("openEditDocumentDialog", n, l);
|
|
363
|
+
}, d = () => {
|
|
364
|
+
console.log("🎯 Generating thumbnails for videos, total attachments:", t.documentAttachment.length);
|
|
365
|
+
const n = t.documentAttachment.filter((l) => T(l.file.name));
|
|
366
|
+
console.log("📹 Found video attachments:", n.length, n.map((l) => l.file.name)), n.forEach((l) => {
|
|
367
|
+
console.log("🎬 Processing video:", l.file.name), $(l.file);
|
|
301
368
|
});
|
|
302
369
|
};
|
|
303
|
-
return
|
|
304
|
-
const
|
|
305
|
-
return
|
|
370
|
+
return E(() => t.documentAttachment, d, { immediate: !0 }), ze(d), (n, l) => {
|
|
371
|
+
const p = g("v-icon"), s = g("v-card-subtitle"), F = g("v-chip"), y = g("v-divider"), S = g("v-btn"), I = g("v-tooltip"), J = g("v-spacer"), W = g("v-card-actions"), N = g("v-chip-group"), K = g("v-card-text"), G = g("v-expand-transition"), te = g("v-card"), se = g("v-col"), oe = g("v-row");
|
|
372
|
+
return m(), V("div", null, [
|
|
306
373
|
r(oe, null, {
|
|
307
|
-
default:
|
|
308
|
-
(
|
|
374
|
+
default: a(() => [
|
|
375
|
+
(m(!0), V(O, null, X(o.documentAttachment, (z, Q) => (m(), b(se, {
|
|
309
376
|
key: `attachment-${Q}`,
|
|
310
377
|
cols: "12",
|
|
311
|
-
md:
|
|
378
|
+
md: o.cols,
|
|
312
379
|
xs: "12"
|
|
313
380
|
}, {
|
|
314
|
-
default:
|
|
315
|
-
r(
|
|
316
|
-
shaped:
|
|
317
|
-
outlined:
|
|
318
|
-
raised:
|
|
319
|
-
tile:
|
|
381
|
+
default: a(() => [
|
|
382
|
+
r(te, {
|
|
383
|
+
shaped: o.shaped,
|
|
384
|
+
outlined: o.outlined,
|
|
385
|
+
raised: o.raised,
|
|
386
|
+
tile: o.tile,
|
|
320
387
|
class: "mx-auto",
|
|
321
388
|
"max-width": "344"
|
|
322
389
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
390
|
+
default: a(() => [
|
|
391
|
+
e(z.file.name) ? (m(), V("div", Ue, [
|
|
392
|
+
A("img", {
|
|
393
|
+
src: L(z.file),
|
|
394
|
+
style: { "max-width": "100%", "max-height": "100%", "object-fit": "contain" },
|
|
395
|
+
onError: (R) => k(z.file)
|
|
396
|
+
}, null, 40, Ee)
|
|
397
|
+
])) : T(z.file.name) ? (m(), V("div", Pe, [
|
|
398
|
+
$(z.file) ? (m(), V("img", {
|
|
331
399
|
key: 0,
|
|
332
|
-
src:
|
|
400
|
+
src: $(z.file),
|
|
333
401
|
style: { width: "100%", height: "100%", "object-fit": "cover" },
|
|
334
|
-
onError: (
|
|
335
|
-
}, null, 40,
|
|
336
|
-
r(
|
|
402
|
+
onError: (R) => U(z.file)
|
|
403
|
+
}, null, 40, Me)) : (m(), V("div", je, [
|
|
404
|
+
r(p, {
|
|
337
405
|
size: "60",
|
|
338
406
|
color: "grey"
|
|
339
407
|
}, {
|
|
340
|
-
default:
|
|
341
|
-
|
|
342
|
-
])),
|
|
408
|
+
default: a(() => [...l[0] || (l[0] = [
|
|
409
|
+
w("mdi-video", -1)
|
|
410
|
+
])]),
|
|
343
411
|
_: 1
|
|
344
412
|
})
|
|
345
413
|
])),
|
|
346
|
-
|
|
347
|
-
r(
|
|
414
|
+
A("div", He, [
|
|
415
|
+
r(p, {
|
|
348
416
|
color: "white",
|
|
349
417
|
size: "30"
|
|
350
418
|
}, {
|
|
351
|
-
default:
|
|
352
|
-
|
|
353
|
-
])),
|
|
419
|
+
default: a(() => [...l[1] || (l[1] = [
|
|
420
|
+
w("mdi-play", -1)
|
|
421
|
+
])]),
|
|
354
422
|
_: 1
|
|
355
423
|
})
|
|
356
424
|
])
|
|
357
|
-
])) : (
|
|
358
|
-
r(
|
|
425
|
+
])) : (m(), V("div", Ne, [
|
|
426
|
+
r(p, {
|
|
359
427
|
size: "120",
|
|
360
|
-
color:
|
|
428
|
+
color: j(z.file.name).color
|
|
361
429
|
}, {
|
|
362
|
-
default:
|
|
363
|
-
|
|
430
|
+
default: a(() => [
|
|
431
|
+
w(x(j(z.file.name).icon), 1)
|
|
364
432
|
]),
|
|
365
433
|
_: 2
|
|
366
434
|
}, 1032, ["color"])
|
|
367
435
|
])),
|
|
368
|
-
r(
|
|
369
|
-
default:
|
|
370
|
-
|
|
436
|
+
r(s, { class: "text-truncate py-2" }, {
|
|
437
|
+
default: a(() => [
|
|
438
|
+
w(x(z.file.name), 1)
|
|
371
439
|
]),
|
|
372
440
|
_: 2
|
|
373
441
|
}, 1024),
|
|
374
|
-
r(
|
|
375
|
-
default:
|
|
376
|
-
r(
|
|
377
|
-
color:
|
|
442
|
+
r(s, { class: "pt-2 pb-3" }, {
|
|
443
|
+
default: a(() => [
|
|
444
|
+
r(F, {
|
|
445
|
+
color: Z(ce)(z.file.size).color,
|
|
378
446
|
label: "",
|
|
379
447
|
"text-color": "white"
|
|
380
448
|
}, {
|
|
381
|
-
default:
|
|
382
|
-
|
|
383
|
-
r(
|
|
384
|
-
default:
|
|
385
|
-
|
|
386
|
-
])),
|
|
449
|
+
default: a(() => [
|
|
450
|
+
w(x(Z(ce)(z.file.size).text) + " ", 1),
|
|
451
|
+
r(p, { right: "" }, {
|
|
452
|
+
default: a(() => [...l[2] || (l[2] = [
|
|
453
|
+
w("mdi-harddisk", -1)
|
|
454
|
+
])]),
|
|
387
455
|
_: 1
|
|
388
456
|
})
|
|
389
457
|
]),
|
|
@@ -392,115 +460,113 @@ const Se = {
|
|
|
392
460
|
]),
|
|
393
461
|
_: 2
|
|
394
462
|
}, 1024),
|
|
395
|
-
r(
|
|
396
|
-
r(
|
|
397
|
-
default:
|
|
398
|
-
r(
|
|
399
|
-
activator:
|
|
400
|
-
|
|
463
|
+
r(y, { class: "mx-4" }),
|
|
464
|
+
r(W, { style: { padding: "0" } }, {
|
|
465
|
+
default: a(() => [
|
|
466
|
+
r(I, { right: "" }, {
|
|
467
|
+
activator: a(({ props: R }) => [
|
|
468
|
+
o.deletePermission ? (m(), b(S, Y({
|
|
401
469
|
key: 0,
|
|
402
470
|
text: "",
|
|
403
|
-
fab: ""
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
onClick: (le) => O(Q, "")
|
|
471
|
+
fab: ""
|
|
472
|
+
}, { ref_for: !0 }, R, {
|
|
473
|
+
onClick: (ne) => u(Q, "")
|
|
407
474
|
}), {
|
|
408
|
-
default:
|
|
409
|
-
r(
|
|
410
|
-
default:
|
|
411
|
-
|
|
412
|
-
])),
|
|
475
|
+
default: a(() => [
|
|
476
|
+
r(p, { color: "red" }, {
|
|
477
|
+
default: a(() => [...l[3] || (l[3] = [
|
|
478
|
+
w("mdi-trash-can-outline", -1)
|
|
479
|
+
])]),
|
|
413
480
|
_: 1
|
|
414
481
|
})
|
|
415
482
|
]),
|
|
416
|
-
_:
|
|
417
|
-
},
|
|
483
|
+
_: 1
|
|
484
|
+
}, 16, ["onClick"])) : B("", !0)
|
|
418
485
|
]),
|
|
419
|
-
default:
|
|
420
|
-
|
|
486
|
+
default: a(() => [
|
|
487
|
+
A("span", Re, x(o.selectedLang[o.lang].delete), 1)
|
|
421
488
|
]),
|
|
422
489
|
_: 2
|
|
423
490
|
}, 1024),
|
|
424
|
-
r(
|
|
425
|
-
activator:
|
|
426
|
-
|
|
491
|
+
r(I, { right: "" }, {
|
|
492
|
+
activator: a(({ props: R }) => [
|
|
493
|
+
o.editPermission ? (m(), b(S, Y({
|
|
427
494
|
key: 0,
|
|
428
495
|
text: "",
|
|
429
|
-
fab: ""
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
onClick: (le) => d(C, Q)
|
|
496
|
+
fab: ""
|
|
497
|
+
}, { ref_for: !0 }, R, {
|
|
498
|
+
onClick: (ne) => f(z, Q)
|
|
433
499
|
}), {
|
|
434
|
-
default:
|
|
435
|
-
r(
|
|
436
|
-
default:
|
|
437
|
-
|
|
438
|
-
])),
|
|
500
|
+
default: a(() => [
|
|
501
|
+
r(p, { color: "green" }, {
|
|
502
|
+
default: a(() => [...l[4] || (l[4] = [
|
|
503
|
+
w("mdi-pencil-outline", -1)
|
|
504
|
+
])]),
|
|
439
505
|
_: 1
|
|
440
506
|
})
|
|
441
507
|
]),
|
|
442
|
-
_:
|
|
443
|
-
},
|
|
508
|
+
_: 1
|
|
509
|
+
}, 16, ["onClick"])) : B("", !0)
|
|
444
510
|
]),
|
|
445
|
-
default:
|
|
446
|
-
|
|
511
|
+
default: a(() => [
|
|
512
|
+
A("span", Oe, x(o.selectedLang[o.lang].edit), 1)
|
|
447
513
|
]),
|
|
448
514
|
_: 2
|
|
449
515
|
}, 1024),
|
|
450
|
-
r(
|
|
451
|
-
|
|
516
|
+
r(J),
|
|
517
|
+
P(z.file) ? (m(), b(S, {
|
|
452
518
|
key: 0,
|
|
453
519
|
icon: "",
|
|
454
|
-
onClick: (
|
|
520
|
+
onClick: (R) => H(z.file)
|
|
455
521
|
}, {
|
|
456
|
-
default:
|
|
457
|
-
r(
|
|
458
|
-
default:
|
|
459
|
-
|
|
522
|
+
default: a(() => [
|
|
523
|
+
r(p, null, {
|
|
524
|
+
default: a(() => [
|
|
525
|
+
w(x(z.file.showDetailState ? "mdi-chevron-up" : "mdi-chevron-down"), 1)
|
|
460
526
|
]),
|
|
461
527
|
_: 2
|
|
462
528
|
}, 1024)
|
|
463
529
|
]),
|
|
464
530
|
_: 2
|
|
465
|
-
}, 1032, ["onClick"])) :
|
|
531
|
+
}, 1032, ["onClick"])) : B("", !0)
|
|
466
532
|
]),
|
|
467
533
|
_: 2
|
|
468
534
|
}, 1024),
|
|
469
|
-
r(
|
|
470
|
-
default:
|
|
471
|
-
|
|
472
|
-
r(
|
|
473
|
-
|
|
535
|
+
r(G, null, {
|
|
536
|
+
default: a(() => [
|
|
537
|
+
P(z.file) ? xe((m(), V("div", We, [
|
|
538
|
+
r(y),
|
|
539
|
+
z.file.tags.length ? (m(), b(N, {
|
|
474
540
|
key: 0,
|
|
475
541
|
multiple: "",
|
|
476
542
|
"active-class": "primary--text",
|
|
477
543
|
class: "pa-2"
|
|
478
544
|
}, {
|
|
479
|
-
default:
|
|
480
|
-
(
|
|
481
|
-
key: `tag-${
|
|
545
|
+
default: a(() => [
|
|
546
|
+
(m(!0), V(O, null, X(z.file.tags, (R, ne) => (m(), b(F, {
|
|
547
|
+
key: `tag-${ne}`,
|
|
482
548
|
class: "ma-1"
|
|
483
549
|
}, {
|
|
484
|
-
default:
|
|
485
|
-
|
|
550
|
+
default: a(() => [
|
|
551
|
+
w(x(R), 1)
|
|
486
552
|
]),
|
|
487
553
|
_: 2
|
|
488
554
|
}, 1024))), 128))
|
|
489
555
|
]),
|
|
490
556
|
_: 2
|
|
491
|
-
}, 1024)) :
|
|
492
|
-
|
|
557
|
+
}, 1024)) : B("", !0),
|
|
558
|
+
z.file.description ? (m(), b(K, {
|
|
493
559
|
key: 1,
|
|
494
560
|
class: "text-justify"
|
|
495
561
|
}, {
|
|
496
|
-
default:
|
|
497
|
-
|
|
562
|
+
default: a(() => [
|
|
563
|
+
w(x(z.file.description), 1)
|
|
498
564
|
]),
|
|
499
565
|
_: 2
|
|
500
|
-
}, 1024)) :
|
|
566
|
+
}, 1024)) : B("", !0)
|
|
501
567
|
], 512)), [
|
|
502
|
-
[
|
|
503
|
-
]) :
|
|
568
|
+
[we, z.file.showDetailState]
|
|
569
|
+
]) : B("", !0)
|
|
504
570
|
]),
|
|
505
571
|
_: 2
|
|
506
572
|
}, 1024)
|
|
@@ -516,10 +582,16 @@ const Se = {
|
|
|
516
582
|
]);
|
|
517
583
|
};
|
|
518
584
|
}
|
|
519
|
-
}),
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
},
|
|
585
|
+
}), Ke = {
|
|
586
|
+
class: "text-left",
|
|
587
|
+
style: { width: "80px" }
|
|
588
|
+
}, qe = { class: "text-center" }, Ge = {
|
|
589
|
+
class: "text-left",
|
|
590
|
+
style: { width: "120px" }
|
|
591
|
+
}, Ye = {
|
|
592
|
+
class: "text-left",
|
|
593
|
+
style: { width: "120px" }
|
|
594
|
+
}, Xe = { class: "text-center pa-3" }, Je = { class: "text-left pa-3" }, Qe = { class: "text-left pa-3" }, Ze = { class: "text-center pa-2" }, et = { class: "d-flex justify-center ga-1" }, tt = /* @__PURE__ */ ee({
|
|
523
595
|
__name: "TableUploader",
|
|
524
596
|
props: {
|
|
525
597
|
documentAttachment: {},
|
|
@@ -534,275 +606,174 @@ const Se = {
|
|
|
534
606
|
selectedLang: {}
|
|
535
607
|
},
|
|
536
608
|
emits: ["openDeleteDialog", "openEditDocumentDialog"],
|
|
537
|
-
setup(
|
|
538
|
-
const e =
|
|
539
|
-
|
|
540
|
-
return
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
609
|
+
setup(o, { emit: i }) {
|
|
610
|
+
const e = o, t = i, c = (_) => _ ? pe(_) : !1, T = (_) => {
|
|
611
|
+
const h = _ / 1e3, D = h / 1024;
|
|
612
|
+
return D >= 1 ? `${D.toFixed(1)} MB` : `${h.toFixed(1)} KB`;
|
|
613
|
+
}, L = (_) => {
|
|
614
|
+
const h = _ / 1024e3;
|
|
615
|
+
return h < 1 ? "success" : h < 5 ? "warning" : "error";
|
|
616
|
+
}, k = (_, h) => {
|
|
617
|
+
t("openDeleteDialog", _, h);
|
|
618
|
+
}, C = (_, h) => {
|
|
619
|
+
t("openEditDocumentDialog", _, h);
|
|
545
620
|
};
|
|
546
|
-
return (
|
|
547
|
-
const
|
|
548
|
-
return
|
|
549
|
-
r(
|
|
550
|
-
default:
|
|
551
|
-
r(
|
|
552
|
-
|
|
553
|
-
lg: "12",
|
|
554
|
-
md: "12",
|
|
555
|
-
xs: "12"
|
|
556
|
-
}, {
|
|
557
|
-
default: o(() => [
|
|
621
|
+
return (_, h) => {
|
|
622
|
+
const D = g("v-img"), $ = g("v-icon"), U = g("v-tooltip"), j = g("v-chip"), P = g("v-btn"), H = g("v-table"), u = g("v-col"), f = g("v-row");
|
|
623
|
+
return m(), V("div", null, [
|
|
624
|
+
r(f, null, {
|
|
625
|
+
default: a(() => [
|
|
626
|
+
r(u, { cols: "12" }, {
|
|
627
|
+
default: a(() => [
|
|
558
628
|
r(H, {
|
|
559
629
|
"fixed-header": e.tableFixedHeader,
|
|
560
|
-
height: e.tableHeight + "px"
|
|
630
|
+
height: e.tableHeight + "px",
|
|
631
|
+
class: "elevation-1"
|
|
561
632
|
}, {
|
|
562
|
-
default:
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
633
|
+
default: a(() => [
|
|
634
|
+
A("thead", null, [
|
|
635
|
+
A("tr", null, [
|
|
636
|
+
A("th", Ke, x(e.selectedLang[o.lang].table.thumb), 1),
|
|
637
|
+
A("th", qe, x(e.selectedLang[o.lang].table.name), 1),
|
|
638
|
+
A("th", Ge, x(e.selectedLang[o.lang].table.size), 1),
|
|
639
|
+
A("th", Ye, x(e.selectedLang[o.lang].table.action.action), 1)
|
|
569
640
|
])
|
|
570
641
|
]),
|
|
571
|
-
|
|
572
|
-
(
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
})
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
style: { "margin-left": "10px" },
|
|
647
|
-
size: "50",
|
|
648
|
-
"file-word-outline": "",
|
|
649
|
-
color: "red lighten-1"
|
|
650
|
-
}, {
|
|
651
|
-
default: o(() => g[5] || (g[5] = [
|
|
652
|
-
_("mdi-file-video-outline")
|
|
653
|
-
])),
|
|
654
|
-
_: 1
|
|
655
|
-
})) : p(s.file.name) === "dwg" ? (c(), h(y, {
|
|
656
|
-
key: 5,
|
|
657
|
-
style: { "margin-left": "10px" },
|
|
658
|
-
size: "50",
|
|
659
|
-
"file-word-outline": "",
|
|
660
|
-
color: "indigo lighten-2"
|
|
661
|
-
}, {
|
|
662
|
-
default: o(() => g[6] || (g[6] = [
|
|
663
|
-
_("mdi-file-cad")
|
|
664
|
-
])),
|
|
665
|
-
_: 1
|
|
666
|
-
})) : ["zip", "rar", "7-zip"].includes(p(s.file.name)) ? (c(), h(y, {
|
|
667
|
-
key: 6,
|
|
668
|
-
size: "120",
|
|
669
|
-
"file-word-outline": "",
|
|
670
|
-
color: "lime lighten-1"
|
|
671
|
-
}, {
|
|
672
|
-
default: o(() => g[7] || (g[7] = [
|
|
673
|
-
_("mdi-folder-zip-outline")
|
|
674
|
-
])),
|
|
675
|
-
_: 1
|
|
676
|
-
})) : p(s.file.name) === "txt" ? (c(), h(y, {
|
|
677
|
-
key: 7,
|
|
678
|
-
style: { "margin-left": "10px" },
|
|
679
|
-
size: "50",
|
|
680
|
-
"file-word-outline": "",
|
|
681
|
-
color: "light-green darken-3"
|
|
682
|
-
}, {
|
|
683
|
-
default: o(() => g[8] || (g[8] = [
|
|
684
|
-
_("mdi-script-text-outline")
|
|
685
|
-
])),
|
|
686
|
-
_: 1
|
|
687
|
-
})) : (c(), h(y, {
|
|
688
|
-
key: 8,
|
|
689
|
-
"x-large": "",
|
|
690
|
-
"file-word-outline": "",
|
|
691
|
-
color: "indigo lighten-1"
|
|
692
|
-
}, {
|
|
693
|
-
default: o(() => g[9] || (g[9] = [
|
|
694
|
-
_("mdi-file-question-outline")
|
|
695
|
-
])),
|
|
696
|
-
_: 1
|
|
697
|
-
}))
|
|
698
|
-
], 64))
|
|
699
|
-
])) : z("", !0),
|
|
700
|
-
P("td", null, x(s.file.name), 1),
|
|
701
|
-
P("td", null, [
|
|
702
|
-
Number((s.file.size / 1e3).toFixed(1)) < 1024 ? (c(), h($, {
|
|
642
|
+
A("tbody", null, [
|
|
643
|
+
(m(!0), V(O, null, X(e.documentAttachment, (d, n) => (m(), V("tr", {
|
|
644
|
+
key: `attachment-${n}`,
|
|
645
|
+
class: "table-row"
|
|
646
|
+
}, [
|
|
647
|
+
A("td", Xe, [
|
|
648
|
+
r(U, { location: "top" }, {
|
|
649
|
+
activator: a(({ props: l }) => [
|
|
650
|
+
A("div", Y({
|
|
651
|
+
class: "d-flex justify-center align-center",
|
|
652
|
+
style: { height: "60px", width: "60px" }
|
|
653
|
+
}, { ref_for: !0 }, l), [
|
|
654
|
+
c(d.file.name) ? (m(), V(O, { key: 0 }, [
|
|
655
|
+
e.thumb && d.file.base64 ? (m(), b(D, {
|
|
656
|
+
key: 0,
|
|
657
|
+
style: { height: "40px", width: "40px" },
|
|
658
|
+
src: "data:" + d.file.format + ";base64," + d.file.base64,
|
|
659
|
+
height: "40",
|
|
660
|
+
width: "40",
|
|
661
|
+
class: "rounded",
|
|
662
|
+
contain: ""
|
|
663
|
+
}, null, 8, ["src"])) : (m(), b($, {
|
|
664
|
+
key: 1,
|
|
665
|
+
size: "40",
|
|
666
|
+
color: "deep-purple"
|
|
667
|
+
}, {
|
|
668
|
+
default: a(() => [...h[0] || (h[0] = [
|
|
669
|
+
w(" mdi-file-image-outline ", -1)
|
|
670
|
+
])]),
|
|
671
|
+
_: 1
|
|
672
|
+
}))
|
|
673
|
+
], 64)) : (m(), b($, {
|
|
674
|
+
key: 1,
|
|
675
|
+
icon: Z(me)(d.file.name),
|
|
676
|
+
color: Z(fe)(d.file.name),
|
|
677
|
+
size: "40"
|
|
678
|
+
}, null, 8, ["icon", "color"]))
|
|
679
|
+
], 16)
|
|
680
|
+
]),
|
|
681
|
+
default: a(() => [
|
|
682
|
+
A("span", null, x(d.file.name), 1)
|
|
683
|
+
]),
|
|
684
|
+
_: 2
|
|
685
|
+
}, 1024)
|
|
686
|
+
]),
|
|
687
|
+
A("td", Je, [
|
|
688
|
+
r(U, { location: "top" }, {
|
|
689
|
+
activator: a(({ props: l }) => [
|
|
690
|
+
A("span", Y({ ref_for: !0 }, l), x((() => {
|
|
691
|
+
const p = d.file.name.split(".").pop(), s = d.file.name.slice(0, d.file.name.lastIndexOf("."));
|
|
692
|
+
return `${s.length > 10 ? s.slice(0, 10) + "..." : s}.${p}`;
|
|
693
|
+
})()), 17)
|
|
694
|
+
]),
|
|
695
|
+
default: a(() => [
|
|
696
|
+
A("span", null, x(d.file.name), 1)
|
|
697
|
+
]),
|
|
698
|
+
_: 2
|
|
699
|
+
}, 1024)
|
|
700
|
+
]),
|
|
701
|
+
A("td", Qe, [
|
|
702
|
+
r(j, {
|
|
703
|
+
color: L(d.file.size),
|
|
704
|
+
variant: "tonal",
|
|
705
|
+
size: "small",
|
|
706
|
+
class: "text-caption"
|
|
707
|
+
}, {
|
|
708
|
+
default: a(() => [
|
|
709
|
+
w(x(T(d.file.size)), 1)
|
|
710
|
+
]),
|
|
711
|
+
_: 2
|
|
712
|
+
}, 1032, ["color"])
|
|
713
|
+
]),
|
|
714
|
+
A("td", Ze, [
|
|
715
|
+
A("div", et, [
|
|
716
|
+
o.editPermission ? (m(), b(U, {
|
|
703
717
|
key: 0,
|
|
704
|
-
|
|
718
|
+
location: "top"
|
|
705
719
|
}, {
|
|
706
|
-
|
|
707
|
-
r(
|
|
708
|
-
color: "teal lighten-2",
|
|
709
|
-
label: "",
|
|
710
|
-
"text-color": "white"
|
|
711
|
-
}, {
|
|
712
|
-
default: o(() => [
|
|
713
|
-
_(x(Number((s.file.size / 1e3).toFixed(1)) + v.selectedLang[v.lang].size.kb) + " ", 1),
|
|
714
|
-
r(y, { right: "" }, {
|
|
715
|
-
default: o(() => g[10] || (g[10] = [
|
|
716
|
-
_("mdi-harddisk")
|
|
717
|
-
])),
|
|
718
|
-
_: 1
|
|
719
|
-
})
|
|
720
|
-
]),
|
|
721
|
-
_: 2
|
|
722
|
-
}, 1024)
|
|
723
|
-
]),
|
|
724
|
-
_: 2
|
|
725
|
-
}, 1024)) : z("", !0),
|
|
726
|
-
Number((s.file.size / 1e3).toFixed(1)) > 1024 ? (c(), h($, { key: 1 }, {
|
|
727
|
-
default: o(() => [
|
|
728
|
-
r(w, {
|
|
729
|
-
color: "teal lighten-2",
|
|
730
|
-
label: "",
|
|
731
|
-
"text-color": "white"
|
|
732
|
-
}, {
|
|
733
|
-
default: o(() => [
|
|
734
|
-
_(x(Number(
|
|
735
|
-
(s.file.size / 1e3 / 1024).toFixed(1)
|
|
736
|
-
) + v.selectedLang[v.lang].size.mb) + " ", 1),
|
|
737
|
-
r(y, { right: "" }, {
|
|
738
|
-
default: o(() => g[11] || (g[11] = [
|
|
739
|
-
_("mdi-harddisk")
|
|
740
|
-
])),
|
|
741
|
-
_: 1
|
|
742
|
-
})
|
|
743
|
-
]),
|
|
744
|
-
_: 2
|
|
745
|
-
}, 1024)
|
|
746
|
-
]),
|
|
747
|
-
_: 2
|
|
748
|
-
}, 1024)) : z("", !0)
|
|
749
|
-
]),
|
|
750
|
-
P("td", null, [
|
|
751
|
-
r(j, { top: "" }, {
|
|
752
|
-
activator: o(({ props: u }) => [
|
|
753
|
-
v.deletePermission ? (c(), h(T, ee({
|
|
754
|
-
key: 0,
|
|
720
|
+
activator: a(({ props: l }) => [
|
|
721
|
+
r(P, Y({
|
|
755
722
|
icon: "",
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
723
|
+
size: "small",
|
|
724
|
+
color: "success",
|
|
725
|
+
variant: "text"
|
|
726
|
+
}, { ref_for: !0 }, l, {
|
|
727
|
+
onClick: (p) => C(d, n)
|
|
760
728
|
}), {
|
|
761
|
-
default:
|
|
762
|
-
r(
|
|
763
|
-
default:
|
|
764
|
-
|
|
765
|
-
])),
|
|
729
|
+
default: a(() => [
|
|
730
|
+
r($, { size: "18" }, {
|
|
731
|
+
default: a(() => [...h[1] || (h[1] = [
|
|
732
|
+
w("mdi-pencil-outline", -1)
|
|
733
|
+
])]),
|
|
766
734
|
_: 1
|
|
767
735
|
})
|
|
768
736
|
]),
|
|
769
|
-
_:
|
|
770
|
-
},
|
|
737
|
+
_: 1
|
|
738
|
+
}, 16, ["onClick"])
|
|
771
739
|
]),
|
|
772
|
-
default:
|
|
773
|
-
|
|
740
|
+
default: a(() => [
|
|
741
|
+
A("span", null, x(o.selectedLang[o.lang].edit), 1)
|
|
774
742
|
]),
|
|
775
743
|
_: 2
|
|
776
|
-
}, 1024),
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
744
|
+
}, 1024)) : B("", !0),
|
|
745
|
+
o.deletePermission ? (m(), b(U, {
|
|
746
|
+
key: 1,
|
|
747
|
+
location: "top"
|
|
748
|
+
}, {
|
|
749
|
+
activator: a(({ props: l }) => [
|
|
750
|
+
r(P, Y({
|
|
751
|
+
icon: "",
|
|
752
|
+
size: "small",
|
|
753
|
+
color: "error",
|
|
754
|
+
variant: "text"
|
|
755
|
+
}, { ref_for: !0 }, l, {
|
|
756
|
+
onClick: (p) => k(n, "")
|
|
786
757
|
}), {
|
|
787
|
-
default:
|
|
788
|
-
r(
|
|
789
|
-
default:
|
|
790
|
-
|
|
791
|
-
])),
|
|
758
|
+
default: a(() => [
|
|
759
|
+
r($, { size: "18" }, {
|
|
760
|
+
default: a(() => [...h[2] || (h[2] = [
|
|
761
|
+
w("mdi-delete", -1)
|
|
762
|
+
])]),
|
|
792
763
|
_: 1
|
|
793
764
|
})
|
|
794
765
|
]),
|
|
795
|
-
_:
|
|
796
|
-
},
|
|
766
|
+
_: 1
|
|
767
|
+
}, 16, ["onClick"])
|
|
797
768
|
]),
|
|
798
|
-
default:
|
|
799
|
-
|
|
769
|
+
default: a(() => [
|
|
770
|
+
A("span", null, x(o.selectedLang[o.lang].table.action.deleteTooltip), 1)
|
|
800
771
|
]),
|
|
801
772
|
_: 2
|
|
802
|
-
}, 1024)
|
|
773
|
+
}, 1024)) : B("", !0)
|
|
803
774
|
])
|
|
804
|
-
])
|
|
805
|
-
|
|
775
|
+
])
|
|
776
|
+
]))), 128))
|
|
806
777
|
])
|
|
807
778
|
]),
|
|
808
779
|
_: 1
|
|
@@ -816,7 +787,30 @@ const Se = {
|
|
|
816
787
|
]);
|
|
817
788
|
};
|
|
818
789
|
}
|
|
819
|
-
}),
|
|
790
|
+
}), ke = (o, i) => {
|
|
791
|
+
const e = o.__vccOpts || o;
|
|
792
|
+
for (const [t, c] of i)
|
|
793
|
+
e[t] = c;
|
|
794
|
+
return e;
|
|
795
|
+
}, he = /* @__PURE__ */ ke(tt, [["__scopeId", "data-v-d05b814b"]]), ot = {
|
|
796
|
+
class: "d-flex align-center pa-3",
|
|
797
|
+
style: { height: "100%" }
|
|
798
|
+
}, nt = {
|
|
799
|
+
class: "flex-grow-1 pr-4",
|
|
800
|
+
style: { "max-width": "60%" }
|
|
801
|
+
}, lt = {
|
|
802
|
+
class: "text-subtitle-1 font-weight-medium mb-2",
|
|
803
|
+
style: { overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap", "max-width": "100%" }
|
|
804
|
+
}, it = {
|
|
805
|
+
class: "flex-shrink-0",
|
|
806
|
+
style: { "min-width": "80px" }
|
|
807
|
+
}, at = {
|
|
808
|
+
key: 0,
|
|
809
|
+
class: "thumbnail-container"
|
|
810
|
+
}, rt = {
|
|
811
|
+
key: 1,
|
|
812
|
+
class: "d-flex align-center justify-center"
|
|
813
|
+
}, st = { class: "d-flex gap-2 pb-1" }, dt = /* @__PURE__ */ ee({
|
|
820
814
|
__name: "SimpleUploader",
|
|
821
815
|
props: {
|
|
822
816
|
documentAttachment: {},
|
|
@@ -833,270 +827,177 @@ const Se = {
|
|
|
833
827
|
selectedLang: {}
|
|
834
828
|
},
|
|
835
829
|
emits: ["setCardTheme", "openDeleteDialog", "openEditDocumentDialog"],
|
|
836
|
-
setup(
|
|
837
|
-
const e =
|
|
838
|
-
const
|
|
839
|
-
return
|
|
840
|
-
},
|
|
841
|
-
var
|
|
842
|
-
return ["jpg", "jpeg", "png", "tif", "bmp"].includes(((
|
|
843
|
-
}, L = (
|
|
844
|
-
|
|
845
|
-
const
|
|
846
|
-
return
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
jpg: "mdi-file-image-outline",
|
|
852
|
-
jpeg: "mdi-file-image-outline",
|
|
853
|
-
png: "mdi-file-image-outline",
|
|
854
|
-
tif: "mdi-file-image-outline",
|
|
855
|
-
bmp: "mdi-file-image-outline",
|
|
856
|
-
xls: "mdi-file-excel-outline",
|
|
857
|
-
xlsx: "mdi-file-excel-outline",
|
|
858
|
-
pptx: "mdi-file-powerpoint-outline",
|
|
859
|
-
pptm: "mdi-file-powerpoint-outline",
|
|
860
|
-
ppt: "mdi-file-powerpoint-outline",
|
|
861
|
-
mp4: "mdi-file-video-outline",
|
|
862
|
-
mov: "mdi-file-video-outline",
|
|
863
|
-
flv: "mdi-file-video-outline",
|
|
864
|
-
wmv: "mdi-file-video-outline",
|
|
865
|
-
avi: "mdi-file-video-outline",
|
|
866
|
-
dwg: "mdi-file-cad",
|
|
867
|
-
zip: "mdi-folder-zip-outline",
|
|
868
|
-
rar: "mdi-folder-zip-outline",
|
|
869
|
-
"7-zip": "mdi-folder-zip-outline",
|
|
870
|
-
txt: "mdi-script-text-outline"
|
|
871
|
-
}[w] || "mdi-file-question-outline";
|
|
872
|
-
}, v = (y) => {
|
|
873
|
-
var T;
|
|
874
|
-
const w = (T = y.split(".").pop()) == null ? void 0 : T.toLowerCase();
|
|
875
|
-
return w && {
|
|
876
|
-
pdf: "red darken-1",
|
|
877
|
-
doc: "blue darken-1",
|
|
878
|
-
docx: "blue darken-1",
|
|
879
|
-
odt: "blue darken-1",
|
|
880
|
-
jpg: "deep-purple darken-1",
|
|
881
|
-
jpeg: "deep-purple darken-1",
|
|
882
|
-
png: "deep-purple darken-1",
|
|
883
|
-
tif: "deep-purple darken-1",
|
|
884
|
-
bmp: "deep-purple darken-1",
|
|
885
|
-
xls: "teal darken-1",
|
|
886
|
-
xlsx: "teal darken-1",
|
|
887
|
-
pptx: "orange darken-3",
|
|
888
|
-
pptm: "orange darken-3",
|
|
889
|
-
ppt: "orange darken-3",
|
|
890
|
-
mp4: "red lighten-1",
|
|
891
|
-
mov: "red lighten-1",
|
|
892
|
-
flv: "red lighten-1",
|
|
893
|
-
wmv: "red lighten-1",
|
|
894
|
-
avi: "red lighten-1",
|
|
895
|
-
dwg: "indigo lighten-2",
|
|
896
|
-
zip: "lime lighten-1",
|
|
897
|
-
rar: "lime lighten-1",
|
|
898
|
-
"7-zip": "lime lighten-1",
|
|
899
|
-
txt: "light-green darken-3"
|
|
900
|
-
}[w] || "indigo lighten-1";
|
|
901
|
-
}, g = (y, w) => t("openDeleteDialog", y, w), U = (y, w) => t("openEditDocumentDialog", y, w);
|
|
902
|
-
return (y, w) => {
|
|
903
|
-
const $ = f("v-list-item-subtitle"), T = f("v-icon"), j = f("v-chip"), H = f("v-list-item-content"), O = f("v-img"), d = f("v-avatar"), s = f("v-list-item-title"), l = f("v-list-item"), i = f("v-divider"), u = f("v-btn"), m = f("v-tooltip"), k = f("v-spacer"), S = f("v-card-actions"), F = f("v-chip-group"), B = f("v-card-text"), M = f("v-expand-transition"), G = f("v-card"), E = f("v-col"), K = f("v-row");
|
|
904
|
-
return c(), V("div", null, [
|
|
905
|
-
r(K, null, {
|
|
906
|
-
default: o(() => [
|
|
907
|
-
(c(!0), V(R, null, Z(e.documentAttachment, (A, Y) => (c(), h(E, {
|
|
908
|
-
key: `attachment-${Y}`,
|
|
830
|
+
setup(o, { emit: i }) {
|
|
831
|
+
const e = o, t = i, c = (_) => {
|
|
832
|
+
const h = _ / 1e3;
|
|
833
|
+
return h < 1024 ? `${h.toFixed(1)} ${e.selectedLang[e.lang].size.kb}` : `${(h / 1024).toFixed(1)} ${e.selectedLang[e.lang].size.mb}`;
|
|
834
|
+
}, T = (_) => {
|
|
835
|
+
var h;
|
|
836
|
+
return ["jpg", "jpeg", "png", "tif", "bmp"].includes(((h = _.split(".").pop()) == null ? void 0 : h.toLowerCase()) || "");
|
|
837
|
+
}, L = (_) => _.base64 ? _.base64.startsWith("data:") ? _.base64 : `data:${_.format};base64,${_.base64}` : "", k = (_, h) => t("openDeleteDialog", _, h), C = (_, h) => t("openEditDocumentDialog", _, h);
|
|
838
|
+
return (_, h) => {
|
|
839
|
+
const D = g("v-icon"), $ = g("v-chip"), U = g("v-img"), j = g("v-divider"), P = g("v-btn"), H = g("v-tooltip"), u = g("v-chip-group"), f = g("v-card-text"), d = g("v-expand-transition"), n = g("v-card"), l = g("v-col"), p = g("v-row");
|
|
840
|
+
return m(), V("div", null, [
|
|
841
|
+
r(p, null, {
|
|
842
|
+
default: a(() => [
|
|
843
|
+
(m(!0), V(O, null, X(e.documentAttachment, (s, F) => (m(), b(l, {
|
|
844
|
+
key: `attachment-${F}`,
|
|
909
845
|
cols: "12",
|
|
910
|
-
|
|
911
|
-
|
|
846
|
+
sm: "6",
|
|
847
|
+
md: "4",
|
|
848
|
+
lg: "3"
|
|
912
849
|
}, {
|
|
913
|
-
default:
|
|
914
|
-
r(
|
|
850
|
+
default: a(() => [
|
|
851
|
+
r(n, {
|
|
852
|
+
class: "file-card",
|
|
915
853
|
shaped: e.shaped,
|
|
916
854
|
outlined: e.outlined,
|
|
917
855
|
raised: e.raised,
|
|
918
|
-
tile: e.tile
|
|
856
|
+
tile: e.tile,
|
|
857
|
+
height: "180"
|
|
919
858
|
}, {
|
|
920
|
-
default:
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
r(
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
color: "teal lighten-2",
|
|
935
|
-
label: "",
|
|
936
|
-
"text-color": "white"
|
|
937
|
-
}, {
|
|
938
|
-
default: o(() => [
|
|
939
|
-
_(x(p(A.file.size)) + " ", 1),
|
|
940
|
-
r(T, { right: "" }, {
|
|
941
|
-
default: o(() => w[0] || (w[0] = [
|
|
942
|
-
_("mdi-harddisk")
|
|
943
|
-
])),
|
|
944
|
-
_: 1
|
|
945
|
-
})
|
|
946
|
-
]),
|
|
947
|
-
_: 2
|
|
948
|
-
}, 1024)
|
|
949
|
-
]),
|
|
950
|
-
_: 2
|
|
951
|
-
}, 1024)
|
|
952
|
-
]),
|
|
953
|
-
_: 2
|
|
954
|
-
}, 1024),
|
|
955
|
-
r(l, null, {
|
|
956
|
-
prepend: o(() => [
|
|
957
|
-
r(d, {
|
|
958
|
-
size: "80",
|
|
959
|
-
color: "blue-grey lighten-5"
|
|
859
|
+
default: a(() => [
|
|
860
|
+
A("div", ot, [
|
|
861
|
+
A("div", nt, [
|
|
862
|
+
A("div", lt, x(s.file.name), 1),
|
|
863
|
+
r($, {
|
|
864
|
+
color: "teal",
|
|
865
|
+
variant: "flat",
|
|
866
|
+
size: "small",
|
|
867
|
+
class: "text-white mb-2"
|
|
868
|
+
}, {
|
|
869
|
+
default: a(() => [
|
|
870
|
+
r(D, {
|
|
871
|
+
start: "",
|
|
872
|
+
size: "16"
|
|
960
873
|
}, {
|
|
961
|
-
default:
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
src: "data:" + A.file.format + "," + A.file.base64
|
|
965
|
-
}, null, 8, ["src"])) : (c(), h(T, {
|
|
966
|
-
key: 1,
|
|
967
|
-
color: v(A.file.name),
|
|
968
|
-
size: "50"
|
|
969
|
-
}, {
|
|
970
|
-
default: o(() => [
|
|
971
|
-
_(x(L(A.file.name)), 1)
|
|
972
|
-
]),
|
|
973
|
-
_: 2
|
|
974
|
-
}, 1032, ["color"]))
|
|
975
|
-
]),
|
|
976
|
-
_: 2
|
|
977
|
-
}, 1024)
|
|
978
|
-
]),
|
|
979
|
-
default: o(() => [
|
|
980
|
-
r(s, null, {
|
|
981
|
-
default: o(() => w[1] || (w[1] = [
|
|
982
|
-
_("File Title Here")
|
|
983
|
-
])),
|
|
874
|
+
default: a(() => [...h[0] || (h[0] = [
|
|
875
|
+
w("mdi-harddisk", -1)
|
|
876
|
+
])]),
|
|
984
877
|
_: 1
|
|
985
|
-
})
|
|
878
|
+
}),
|
|
879
|
+
w(" " + x(c(s.file.size)), 1)
|
|
986
880
|
]),
|
|
987
881
|
_: 2
|
|
988
882
|
}, 1024)
|
|
989
883
|
]),
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
884
|
+
A("div", it, [
|
|
885
|
+
T(s.file.name) && e.thumb ? (m(), V("div", at, [
|
|
886
|
+
r(U, {
|
|
887
|
+
src: L(s.file),
|
|
888
|
+
height: "80",
|
|
889
|
+
width: "80",
|
|
890
|
+
cover: "",
|
|
891
|
+
class: "rounded"
|
|
892
|
+
}, null, 8, ["src"])
|
|
893
|
+
])) : (m(), V("div", rt, [
|
|
894
|
+
r(D, {
|
|
895
|
+
color: Z(fe)(s.file.name),
|
|
896
|
+
size: "60"
|
|
897
|
+
}, {
|
|
898
|
+
default: a(() => [
|
|
899
|
+
w(x(Z(me)(s.file.name)), 1)
|
|
900
|
+
]),
|
|
901
|
+
_: 2
|
|
902
|
+
}, 1032, ["color"])
|
|
903
|
+
]))
|
|
904
|
+
])
|
|
905
|
+
]),
|
|
906
|
+
r(j, { class: "my-2" }),
|
|
907
|
+
A("div", st, [
|
|
908
|
+
r(H, { bottom: "" }, {
|
|
909
|
+
activator: a(({ props: y }) => [
|
|
910
|
+
e.deletePermission ? (m(), b(P, Y({
|
|
911
|
+
key: 0,
|
|
912
|
+
icon: "",
|
|
913
|
+
variant: "text",
|
|
914
|
+
size: "small"
|
|
915
|
+
}, { ref_for: !0 }, y, {
|
|
916
|
+
onClick: (S) => k(F, "")
|
|
917
|
+
}), {
|
|
918
|
+
default: a(() => [
|
|
919
|
+
r(D, {
|
|
920
|
+
color: "red",
|
|
921
|
+
size: "20"
|
|
922
|
+
}, {
|
|
923
|
+
default: a(() => [...h[1] || (h[1] = [
|
|
924
|
+
w("mdi-delete-outline", -1)
|
|
925
|
+
])]),
|
|
926
|
+
_: 1
|
|
927
|
+
})
|
|
928
|
+
]),
|
|
929
|
+
_: 1
|
|
930
|
+
}, 16, ["onClick"])) : B("", !0)
|
|
931
|
+
]),
|
|
932
|
+
default: a(() => [
|
|
933
|
+
A("span", null, x(e.selectedLang[o.lang].delete), 1)
|
|
934
|
+
]),
|
|
935
|
+
_: 2
|
|
936
|
+
}, 1024),
|
|
937
|
+
r(H, { bottom: "" }, {
|
|
938
|
+
activator: a(({ props: y }) => [
|
|
939
|
+
e.editPermission ? (m(), b(P, Y({
|
|
940
|
+
key: 0,
|
|
941
|
+
icon: "",
|
|
942
|
+
variant: "text",
|
|
943
|
+
size: "small"
|
|
944
|
+
}, { ref_for: !0 }, y, {
|
|
945
|
+
onClick: (S) => C(s, F)
|
|
946
|
+
}), {
|
|
947
|
+
default: a(() => [
|
|
948
|
+
r(D, {
|
|
949
|
+
color: "green",
|
|
950
|
+
size: "20"
|
|
951
|
+
}, {
|
|
952
|
+
default: a(() => [...h[2] || (h[2] = [
|
|
953
|
+
w("mdi-pencil-outline", -1)
|
|
954
|
+
])]),
|
|
955
|
+
_: 1
|
|
956
|
+
})
|
|
957
|
+
]),
|
|
958
|
+
_: 1
|
|
959
|
+
}, 16, ["onClick"])) : B("", !0)
|
|
960
|
+
]),
|
|
961
|
+
default: a(() => [
|
|
962
|
+
A("span", null, x(e.selectedLang[o.lang].edit), 1)
|
|
963
|
+
]),
|
|
964
|
+
_: 2
|
|
965
|
+
}, 1024)
|
|
966
|
+
]),
|
|
967
|
+
r(d, null, {
|
|
968
|
+
default: a(() => [
|
|
969
|
+
xe(A("div", null, [
|
|
970
|
+
r(j),
|
|
971
|
+
s.file.tags.length ? (m(), b(u, {
|
|
1071
972
|
key: 0,
|
|
1072
973
|
multiple: "",
|
|
1073
974
|
"active-class": "primary--text",
|
|
1074
975
|
style: { padding: "8px" }
|
|
1075
976
|
}, {
|
|
1076
|
-
default:
|
|
1077
|
-
(
|
|
1078
|
-
key: `tag-${
|
|
977
|
+
default: a(() => [
|
|
978
|
+
(m(!0), V(O, null, X(s.file.tags, (y, S) => (m(), b($, {
|
|
979
|
+
key: `tag-${S}`,
|
|
1079
980
|
style: { margin: "5px" }
|
|
1080
981
|
}, {
|
|
1081
|
-
default:
|
|
1082
|
-
|
|
982
|
+
default: a(() => [
|
|
983
|
+
w(x(y), 1)
|
|
1083
984
|
]),
|
|
1084
985
|
_: 2
|
|
1085
986
|
}, 1024))), 128))
|
|
1086
987
|
]),
|
|
1087
988
|
_: 2
|
|
1088
|
-
}, 1024)) :
|
|
1089
|
-
|
|
989
|
+
}, 1024)) : B("", !0),
|
|
990
|
+
s.file.description ? (m(), b(f, {
|
|
1090
991
|
key: 1,
|
|
1091
992
|
style: { "text-align": "justify" }
|
|
1092
993
|
}, {
|
|
1093
|
-
default:
|
|
1094
|
-
|
|
994
|
+
default: a(() => [
|
|
995
|
+
w(x(s.file.description), 1)
|
|
1095
996
|
]),
|
|
1096
997
|
_: 2
|
|
1097
|
-
}, 1024)) :
|
|
998
|
+
}, 1024)) : B("", !0)
|
|
1098
999
|
], 512), [
|
|
1099
|
-
[
|
|
1000
|
+
[we, s.file.showDetailState]
|
|
1100
1001
|
])
|
|
1101
1002
|
]),
|
|
1102
1003
|
_: 2
|
|
@@ -1106,14 +1007,14 @@ const Se = {
|
|
|
1106
1007
|
}, 1032, ["shaped", "outlined", "raised", "tile"])
|
|
1107
1008
|
]),
|
|
1108
1009
|
_: 2
|
|
1109
|
-
},
|
|
1010
|
+
}, 1024))), 128))
|
|
1110
1011
|
]),
|
|
1111
1012
|
_: 1
|
|
1112
1013
|
})
|
|
1113
1014
|
]);
|
|
1114
1015
|
};
|
|
1115
1016
|
}
|
|
1116
|
-
}),
|
|
1017
|
+
}), ve = /* @__PURE__ */ ke(dt, [["__scopeId", "data-v-f7000da4"]]), be = /* @__PURE__ */ ee({
|
|
1117
1018
|
__name: "InsertButton",
|
|
1118
1019
|
props: {
|
|
1119
1020
|
documentAttachment: {},
|
|
@@ -1124,61 +1025,61 @@ const Se = {
|
|
|
1124
1025
|
selectedLang: {}
|
|
1125
1026
|
},
|
|
1126
1027
|
emits: ["openInputDocumentModal"],
|
|
1127
|
-
setup(
|
|
1128
|
-
const e =
|
|
1028
|
+
setup(o, { emit: i }) {
|
|
1029
|
+
const e = i, t = o, c = () => {
|
|
1129
1030
|
e("openInputDocumentModal");
|
|
1130
1031
|
};
|
|
1131
|
-
return (
|
|
1132
|
-
const
|
|
1133
|
-
return
|
|
1134
|
-
t.badgeCounter ? (
|
|
1135
|
-
t.documentAttachment.length > 0 ? (
|
|
1032
|
+
return (T, L) => {
|
|
1033
|
+
const k = g("v-btn"), C = g("v-badge");
|
|
1034
|
+
return m(), V("div", null, [
|
|
1035
|
+
t.badgeCounter ? (m(), V(O, { key: 0 }, [
|
|
1036
|
+
t.documentAttachment.length > 0 ? (m(), b(C, {
|
|
1136
1037
|
key: 0,
|
|
1137
1038
|
bordered: "",
|
|
1138
1039
|
color: t.documentAttachment.length === t.maxFileCount ? "error" : "success",
|
|
1139
1040
|
overlap: "",
|
|
1140
|
-
content:
|
|
1041
|
+
content: o.documentAttachment.length
|
|
1141
1042
|
}, {
|
|
1142
|
-
default:
|
|
1143
|
-
r(
|
|
1043
|
+
default: a(() => [
|
|
1044
|
+
r(k, {
|
|
1144
1045
|
color: t.btnColor,
|
|
1145
|
-
onClick:
|
|
1046
|
+
onClick: c,
|
|
1146
1047
|
class: "mb-4"
|
|
1147
1048
|
}, {
|
|
1148
|
-
default:
|
|
1149
|
-
|
|
1049
|
+
default: a(() => [
|
|
1050
|
+
w(x(t.selectedLang[o.lang].insertFile), 1)
|
|
1150
1051
|
]),
|
|
1151
1052
|
_: 1
|
|
1152
1053
|
}, 8, ["color"])
|
|
1153
1054
|
]),
|
|
1154
1055
|
_: 1
|
|
1155
|
-
}, 8, ["color", "content"])) : (
|
|
1056
|
+
}, 8, ["color", "content"])) : (m(), b(k, {
|
|
1156
1057
|
key: 1,
|
|
1157
1058
|
color: t.btnColor,
|
|
1158
|
-
onClick:
|
|
1059
|
+
onClick: c,
|
|
1159
1060
|
class: "mb-4"
|
|
1160
1061
|
}, {
|
|
1161
|
-
default:
|
|
1162
|
-
|
|
1062
|
+
default: a(() => [
|
|
1063
|
+
w(x(t.selectedLang[o.lang].insertFile), 1)
|
|
1163
1064
|
]),
|
|
1164
1065
|
_: 1
|
|
1165
1066
|
}, 8, ["color"]))
|
|
1166
|
-
], 64)) :
|
|
1167
|
-
t.badgeCounter ?
|
|
1067
|
+
], 64)) : B("", !0),
|
|
1068
|
+
t.badgeCounter ? B("", !0) : (m(), b(k, {
|
|
1168
1069
|
key: 1,
|
|
1169
|
-
color:
|
|
1170
|
-
onClick:
|
|
1070
|
+
color: o.btnColor,
|
|
1071
|
+
onClick: c,
|
|
1171
1072
|
class: "mb-4"
|
|
1172
1073
|
}, {
|
|
1173
|
-
default:
|
|
1174
|
-
|
|
1074
|
+
default: a(() => [
|
|
1075
|
+
w(x(t.selectedLang[o.lang].insertFile), 1)
|
|
1175
1076
|
]),
|
|
1176
1077
|
_: 1
|
|
1177
1078
|
}, 8, ["color"]))
|
|
1178
1079
|
]);
|
|
1179
1080
|
};
|
|
1180
1081
|
}
|
|
1181
|
-
}),
|
|
1082
|
+
}), ct = {
|
|
1182
1083
|
en: {
|
|
1183
1084
|
insertFile: "Insert File",
|
|
1184
1085
|
insertNewFile: "Insert New File",
|
|
@@ -1326,39 +1227,39 @@ const Se = {
|
|
|
1326
1227
|
fileTags: "علامات الملف"
|
|
1327
1228
|
}
|
|
1328
1229
|
};
|
|
1329
|
-
function
|
|
1230
|
+
function Dt(o, i = {}) {
|
|
1330
1231
|
const {
|
|
1331
1232
|
maxFileSize: e = 5 * 1024 * 1024,
|
|
1332
1233
|
// 5MB default
|
|
1333
1234
|
maxFileCount: t = 10,
|
|
1334
|
-
imageCompressor:
|
|
1335
|
-
imageCompressLevel:
|
|
1235
|
+
imageCompressor: c = !1,
|
|
1236
|
+
imageCompressLevel: T = 0.8,
|
|
1336
1237
|
fileAccept: L = "*"
|
|
1337
|
-
} =
|
|
1238
|
+
} = i, k = ae(!1), C = ae({
|
|
1338
1239
|
show: !1,
|
|
1339
1240
|
text: "",
|
|
1340
1241
|
color: "success"
|
|
1341
|
-
}),
|
|
1342
|
-
() =>
|
|
1242
|
+
}), _ = le(() => o.value.length), h = le(() => _.value < t), D = le(
|
|
1243
|
+
() => o.value.reduce((d, n) => d + n.file.size, 0)
|
|
1343
1244
|
);
|
|
1344
|
-
function $(
|
|
1345
|
-
|
|
1245
|
+
function $(d, n = "success") {
|
|
1246
|
+
C.value = { show: !0, text: d, color: n };
|
|
1346
1247
|
}
|
|
1347
|
-
function
|
|
1348
|
-
var
|
|
1349
|
-
if (!
|
|
1248
|
+
function U(d) {
|
|
1249
|
+
var n;
|
|
1250
|
+
if (!Ve(d.size, e))
|
|
1350
1251
|
return {
|
|
1351
1252
|
valid: !1,
|
|
1352
1253
|
error: `File size exceeds maximum allowed size of ${(e / 1048576).toFixed(1)}MB`
|
|
1353
1254
|
};
|
|
1354
|
-
if (!
|
|
1255
|
+
if (!Be(_.value, t))
|
|
1355
1256
|
return {
|
|
1356
1257
|
valid: !1,
|
|
1357
1258
|
error: `Maximum file count of ${t} reached`
|
|
1358
1259
|
};
|
|
1359
1260
|
if (L !== "*") {
|
|
1360
|
-
const
|
|
1361
|
-
if (!
|
|
1261
|
+
const l = L.split(",").map((y) => y.trim()), p = `.${(n = d.name.split(".").pop()) == null ? void 0 : n.toLowerCase()}`, s = d.type;
|
|
1262
|
+
if (!l.some((y) => y.startsWith(".") ? y === p : y.includes("/*") ? s.startsWith(y.replace("/*", "")) : y === s))
|
|
1362
1263
|
return {
|
|
1363
1264
|
valid: !1,
|
|
1364
1265
|
error: `File type not accepted. Allowed types: ${L}`
|
|
@@ -1366,287 +1267,287 @@ function rt(a, n = {}) {
|
|
|
1366
1267
|
}
|
|
1367
1268
|
return { valid: !0 };
|
|
1368
1269
|
}
|
|
1369
|
-
async function j(
|
|
1370
|
-
let
|
|
1371
|
-
if (
|
|
1270
|
+
async function j(d) {
|
|
1271
|
+
let n;
|
|
1272
|
+
if (c && pe(d.name, d.type))
|
|
1372
1273
|
try {
|
|
1373
|
-
|
|
1374
|
-
} catch (
|
|
1375
|
-
console.warn("Image compression failed, using original file:",
|
|
1274
|
+
n = (await Ie(d, T)).split(",")[1];
|
|
1275
|
+
} catch (s) {
|
|
1276
|
+
console.warn("Image compression failed, using original file:", s), n = await ye(d);
|
|
1376
1277
|
}
|
|
1377
1278
|
else
|
|
1378
|
-
|
|
1379
|
-
const
|
|
1279
|
+
n = await ye(d);
|
|
1280
|
+
const l = ce(d.size), p = Fe(d.name);
|
|
1380
1281
|
return {
|
|
1381
|
-
base64:
|
|
1382
|
-
size:
|
|
1383
|
-
name:
|
|
1282
|
+
base64: n,
|
|
1283
|
+
size: l.text,
|
|
1284
|
+
name: d.name,
|
|
1384
1285
|
tags: [],
|
|
1385
1286
|
description: "",
|
|
1386
1287
|
showDetailState: !1,
|
|
1387
|
-
format:
|
|
1288
|
+
format: p
|
|
1388
1289
|
};
|
|
1389
1290
|
}
|
|
1390
|
-
async function
|
|
1391
|
-
if (
|
|
1392
|
-
|
|
1393
|
-
const
|
|
1394
|
-
for (const
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1291
|
+
async function P(d) {
|
|
1292
|
+
if (k.value) return !1;
|
|
1293
|
+
k.value = !0;
|
|
1294
|
+
const n = Array.from(d), l = [];
|
|
1295
|
+
for (const p of n) {
|
|
1296
|
+
const s = U(p);
|
|
1297
|
+
s.valid ? l.push(p) : $(s.error, "error");
|
|
1397
1298
|
}
|
|
1398
|
-
if (
|
|
1399
|
-
return
|
|
1299
|
+
if (l.length === 0)
|
|
1300
|
+
return k.value = !1, !1;
|
|
1400
1301
|
try {
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
)).map((
|
|
1404
|
-
var
|
|
1302
|
+
const s = (await Promise.all(
|
|
1303
|
+
l.map((y) => j(y))
|
|
1304
|
+
)).map((y) => {
|
|
1305
|
+
var S;
|
|
1405
1306
|
return {
|
|
1406
1307
|
file: {
|
|
1407
|
-
name:
|
|
1408
|
-
format:
|
|
1409
|
-
base64:
|
|
1410
|
-
size: ((
|
|
1411
|
-
tags:
|
|
1412
|
-
description:
|
|
1413
|
-
showDetailState:
|
|
1308
|
+
name: y.name,
|
|
1309
|
+
format: y.format,
|
|
1310
|
+
base64: y.base64,
|
|
1311
|
+
size: ((S = l.find((I) => I.name === y.name)) == null ? void 0 : S.size) || 0,
|
|
1312
|
+
tags: y.tags,
|
|
1313
|
+
description: y.description,
|
|
1314
|
+
showDetailState: y.showDetailState
|
|
1414
1315
|
}
|
|
1415
1316
|
};
|
|
1416
1317
|
});
|
|
1417
|
-
|
|
1418
|
-
const
|
|
1419
|
-
return $(
|
|
1420
|
-
} catch (
|
|
1421
|
-
return console.error("File upload error:",
|
|
1318
|
+
o.value.push(...s);
|
|
1319
|
+
const F = l.length === 1 ? `File "${l[0].name}" uploaded successfully` : `${l.length} files uploaded successfully`;
|
|
1320
|
+
return $(F, "success"), !0;
|
|
1321
|
+
} catch (p) {
|
|
1322
|
+
return console.error("File upload error:", p), $("Failed to upload files. Please try again.", "error"), !1;
|
|
1422
1323
|
} finally {
|
|
1423
|
-
|
|
1324
|
+
k.value = !1;
|
|
1424
1325
|
}
|
|
1425
1326
|
}
|
|
1426
|
-
function
|
|
1427
|
-
if (
|
|
1428
|
-
const
|
|
1429
|
-
return
|
|
1327
|
+
function H(d) {
|
|
1328
|
+
if (d >= 0 && d < o.value.length) {
|
|
1329
|
+
const n = o.value[d];
|
|
1330
|
+
return o.value.splice(d, 1), $(`File "${n.file.name}" removed`, "warning"), !0;
|
|
1430
1331
|
}
|
|
1431
1332
|
return !1;
|
|
1432
1333
|
}
|
|
1433
|
-
function d
|
|
1434
|
-
if (
|
|
1435
|
-
const
|
|
1436
|
-
return Object.assign(
|
|
1334
|
+
function u(d, n) {
|
|
1335
|
+
if (d >= 0 && d < o.value.length) {
|
|
1336
|
+
const l = o.value[d].file;
|
|
1337
|
+
return Object.assign(l, n), $("File updated successfully", "success"), !0;
|
|
1437
1338
|
}
|
|
1438
1339
|
return !1;
|
|
1439
1340
|
}
|
|
1440
|
-
function
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1341
|
+
function f() {
|
|
1342
|
+
const d = o.value.length;
|
|
1343
|
+
o.value.splice(0), $(`${d} files cleared`, "warning");
|
|
1443
1344
|
}
|
|
1444
1345
|
return {
|
|
1445
1346
|
// State
|
|
1446
|
-
isUploading:
|
|
1447
|
-
snackbar:
|
|
1347
|
+
isUploading: k,
|
|
1348
|
+
snackbar: C,
|
|
1448
1349
|
// Computed
|
|
1449
|
-
fileCount:
|
|
1450
|
-
canAddMoreFiles:
|
|
1451
|
-
totalSize:
|
|
1350
|
+
fileCount: _,
|
|
1351
|
+
canAddMoreFiles: h,
|
|
1352
|
+
totalSize: D,
|
|
1452
1353
|
// Methods
|
|
1453
|
-
uploadFiles:
|
|
1454
|
-
removeFile:
|
|
1455
|
-
updateFileMetadata:
|
|
1456
|
-
clearAllFiles:
|
|
1457
|
-
validateFile:
|
|
1354
|
+
uploadFiles: P,
|
|
1355
|
+
removeFile: H,
|
|
1356
|
+
updateFileMetadata: u,
|
|
1357
|
+
clearAllFiles: f,
|
|
1358
|
+
validateFile: U,
|
|
1458
1359
|
showSnackbar: $
|
|
1459
1360
|
};
|
|
1460
1361
|
}
|
|
1461
|
-
function
|
|
1362
|
+
function Ct(o = {}) {
|
|
1462
1363
|
const {
|
|
1463
|
-
maxErrors:
|
|
1364
|
+
maxErrors: i = 10,
|
|
1464
1365
|
autoRemoveTimeout: e = 5e3,
|
|
1465
1366
|
logToConsole: t = !0
|
|
1466
|
-
} =
|
|
1367
|
+
} = o, c = ae([]), T = ae(!1);
|
|
1467
1368
|
function L() {
|
|
1468
1369
|
return `error_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
1469
1370
|
}
|
|
1470
|
-
function
|
|
1471
|
-
const
|
|
1371
|
+
function k(n, l = "error", p, s) {
|
|
1372
|
+
const F = {
|
|
1472
1373
|
id: L(),
|
|
1473
|
-
message:
|
|
1474
|
-
type:
|
|
1374
|
+
message: n,
|
|
1375
|
+
type: l,
|
|
1475
1376
|
timestamp: /* @__PURE__ */ new Date(),
|
|
1476
|
-
context:
|
|
1477
|
-
action:
|
|
1377
|
+
context: p,
|
|
1378
|
+
action: s
|
|
1478
1379
|
};
|
|
1479
|
-
return t && (
|
|
1480
|
-
|
|
1481
|
-
}, e),
|
|
1380
|
+
return t && (l === "error" ? console.error : l === "warning" ? console.warn : l === "info" ? console.info : console.log)(`[${l.toUpperCase()}] ${n}`, p || ""), c.value.unshift(F), c.value.length > i && (c.value = c.value.slice(0, i)), e > 0 && setTimeout(() => {
|
|
1381
|
+
C(F.id);
|
|
1382
|
+
}, e), F.id;
|
|
1482
1383
|
}
|
|
1483
|
-
function
|
|
1484
|
-
const
|
|
1485
|
-
return
|
|
1384
|
+
function C(n) {
|
|
1385
|
+
const l = c.value.findIndex((p) => p.id === n);
|
|
1386
|
+
return l !== -1 ? (c.value.splice(l, 1), !0) : !1;
|
|
1486
1387
|
}
|
|
1487
|
-
function
|
|
1488
|
-
|
|
1388
|
+
function _() {
|
|
1389
|
+
c.value = [];
|
|
1489
1390
|
}
|
|
1490
|
-
function
|
|
1491
|
-
|
|
1391
|
+
function h(n) {
|
|
1392
|
+
c.value = c.value.filter((l) => l.type !== n);
|
|
1492
1393
|
}
|
|
1493
|
-
async function
|
|
1494
|
-
|
|
1394
|
+
async function D(n, l, p) {
|
|
1395
|
+
T.value = !0;
|
|
1495
1396
|
try {
|
|
1496
|
-
return await
|
|
1497
|
-
} catch (
|
|
1498
|
-
const
|
|
1499
|
-
return
|
|
1500
|
-
...
|
|
1501
|
-
originalError:
|
|
1397
|
+
return await n();
|
|
1398
|
+
} catch (s) {
|
|
1399
|
+
const F = l || (s instanceof Error ? s.message : "An unexpected error occurred");
|
|
1400
|
+
return k(F, "error", {
|
|
1401
|
+
...p,
|
|
1402
|
+
originalError: s instanceof Error ? s.message : String(s)
|
|
1502
1403
|
}), null;
|
|
1503
1404
|
} finally {
|
|
1504
|
-
|
|
1405
|
+
T.value = !1;
|
|
1505
1406
|
}
|
|
1506
1407
|
}
|
|
1507
|
-
function $(
|
|
1508
|
-
return
|
|
1408
|
+
function $(n, l, p) {
|
|
1409
|
+
return n || k(l, "error", p), n;
|
|
1509
1410
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return
|
|
1411
|
+
function U(n, l) {
|
|
1412
|
+
return k(n, "success", l);
|
|
1512
1413
|
}
|
|
1513
|
-
function j(
|
|
1514
|
-
return
|
|
1414
|
+
function j(n, l) {
|
|
1415
|
+
return k(n, "warning", l);
|
|
1515
1416
|
}
|
|
1516
|
-
function
|
|
1517
|
-
return
|
|
1417
|
+
function P(n, l) {
|
|
1418
|
+
return k(n, "info", l);
|
|
1518
1419
|
}
|
|
1519
|
-
function
|
|
1520
|
-
return
|
|
1420
|
+
function H(n) {
|
|
1421
|
+
return c.value.filter((l) => l.type === n);
|
|
1521
1422
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1423
|
+
function u() {
|
|
1424
|
+
return c.value[0] || null;
|
|
1524
1425
|
}
|
|
1525
|
-
function
|
|
1526
|
-
return
|
|
1426
|
+
function f(n) {
|
|
1427
|
+
return n ? c.value.some((l) => l.type === n) : c.value.length > 0;
|
|
1527
1428
|
}
|
|
1528
|
-
const
|
|
1529
|
-
fileSizeExceeded: (
|
|
1530
|
-
`File "${
|
|
1429
|
+
const d = {
|
|
1430
|
+
fileSizeExceeded: (n, l) => k(
|
|
1431
|
+
`File "${n}" exceeds maximum size of ${(l / (1024 * 1024)).toFixed(1)}MB`,
|
|
1531
1432
|
"error",
|
|
1532
|
-
{ fileName:
|
|
1433
|
+
{ fileName: n, maxSize: l, category: "file-upload" }
|
|
1533
1434
|
),
|
|
1534
|
-
fileCountExceeded: (
|
|
1535
|
-
`Maximum file count of ${
|
|
1435
|
+
fileCountExceeded: (n) => k(
|
|
1436
|
+
`Maximum file count of ${n} reached`,
|
|
1536
1437
|
"error",
|
|
1537
|
-
{ maxCount:
|
|
1438
|
+
{ maxCount: n, category: "file-upload" }
|
|
1538
1439
|
),
|
|
1539
|
-
invalidFileType: (
|
|
1540
|
-
`File "${
|
|
1440
|
+
invalidFileType: (n, l) => k(
|
|
1441
|
+
`File "${n}" type not allowed. Accepted types: ${l}`,
|
|
1541
1442
|
"error",
|
|
1542
|
-
{ fileName:
|
|
1443
|
+
{ fileName: n, allowedTypes: l, category: "file-upload" }
|
|
1543
1444
|
),
|
|
1544
|
-
uploadFailed: (
|
|
1545
|
-
`Failed to upload "${
|
|
1445
|
+
uploadFailed: (n, l) => k(
|
|
1446
|
+
`Failed to upload "${n}"${l ? `: ${l}` : ""}`,
|
|
1546
1447
|
"error",
|
|
1547
|
-
{ fileName:
|
|
1448
|
+
{ fileName: n, reason: l, category: "file-upload" }
|
|
1548
1449
|
),
|
|
1549
|
-
compressionFailed: (
|
|
1550
|
-
`Image compression failed for "${
|
|
1450
|
+
compressionFailed: (n) => k(
|
|
1451
|
+
`Image compression failed for "${n}", using original file`,
|
|
1551
1452
|
"warning",
|
|
1552
|
-
{ fileName:
|
|
1453
|
+
{ fileName: n, category: "file-upload" }
|
|
1553
1454
|
)
|
|
1554
1455
|
};
|
|
1555
1456
|
return {
|
|
1556
1457
|
// State
|
|
1557
|
-
errors:
|
|
1558
|
-
isLoading:
|
|
1458
|
+
errors: c,
|
|
1459
|
+
isLoading: T,
|
|
1559
1460
|
// Methods
|
|
1560
|
-
addError:
|
|
1561
|
-
removeError:
|
|
1562
|
-
clearErrors:
|
|
1563
|
-
clearErrorsByType:
|
|
1564
|
-
handleAsync:
|
|
1461
|
+
addError: k,
|
|
1462
|
+
removeError: C,
|
|
1463
|
+
clearErrors: _,
|
|
1464
|
+
clearErrorsByType: h,
|
|
1465
|
+
handleAsync: D,
|
|
1565
1466
|
validate: $,
|
|
1566
|
-
showSuccess:
|
|
1467
|
+
showSuccess: U,
|
|
1567
1468
|
showWarning: j,
|
|
1568
|
-
showInfo:
|
|
1569
|
-
getErrorsByType:
|
|
1570
|
-
getLatestError:
|
|
1571
|
-
hasErrors:
|
|
1469
|
+
showInfo: P,
|
|
1470
|
+
getErrorsByType: H,
|
|
1471
|
+
getLatestError: u,
|
|
1472
|
+
hasErrors: f,
|
|
1572
1473
|
// File upload specific
|
|
1573
|
-
fileUploadErrors:
|
|
1474
|
+
fileUploadErrors: d
|
|
1574
1475
|
};
|
|
1575
1476
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const
|
|
1578
|
-
return typeof
|
|
1477
|
+
function ut(o) {
|
|
1478
|
+
const i = ["simple", "thumbnail", "table"], e = { isValid: !0, errors: [], warnings: [] };
|
|
1479
|
+
return typeof o != "string" ? (e.isValid = !1, e.errors.push("File uploader type must be a string")) : i.includes(o) || (e.isValid = !1, e.errors.push(`File uploader type must be one of: ${i.join(", ")}`)), e;
|
|
1579
1480
|
}
|
|
1580
|
-
function
|
|
1581
|
-
const
|
|
1582
|
-
return
|
|
1481
|
+
function mt(o) {
|
|
1482
|
+
const i = ["default", "outlined", "shaped", "raised", "tile"], e = { isValid: !0, errors: [], warnings: [] };
|
|
1483
|
+
return o !== void 0 && typeof o != "string" ? (e.isValid = !1, e.errors.push("Card type must be a string")) : o && !i.includes(o) && (e.isValid = !1, e.errors.push(`Card type must be one of: ${i.join(", ")}`)), e;
|
|
1583
1484
|
}
|
|
1584
|
-
function
|
|
1585
|
-
const
|
|
1586
|
-
return typeof
|
|
1485
|
+
function ft(o) {
|
|
1486
|
+
const i = ["en", "fa", "fr", "ch", "ar"], e = { isValid: !0, errors: [], warnings: [] };
|
|
1487
|
+
return typeof o != "string" ? (e.isValid = !1, e.errors.push("Language code must be a string")) : i.includes(o) || (e.isValid = !1, e.errors.push(`Language code must be one of: ${i.join(", ")}`)), e;
|
|
1587
1488
|
}
|
|
1588
|
-
function
|
|
1589
|
-
const
|
|
1590
|
-
return typeof
|
|
1489
|
+
function pt(o) {
|
|
1490
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1491
|
+
return typeof o != "number" ? (i.isValid = !1, i.errors.push("File size must be a number")) : o <= 0 ? (i.isValid = !1, i.errors.push("File size must be greater than 0")) : o > 100 * 1024 * 1024 && i.warnings.push("File size limit is very large (>100MB), consider reducing for better performance"), i;
|
|
1591
1492
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const
|
|
1594
|
-
return typeof
|
|
1493
|
+
function gt(o) {
|
|
1494
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1495
|
+
return typeof o != "number" ? (i.isValid = !1, i.errors.push("File count must be a number")) : o < 0 ? (i.isValid = !1, i.errors.push("File count cannot be negative")) : o > 100 && i.warnings.push("File count limit is very high (>100), consider reducing for better performance"), i;
|
|
1595
1496
|
}
|
|
1596
|
-
function
|
|
1597
|
-
const
|
|
1598
|
-
return typeof
|
|
1497
|
+
function ht(o) {
|
|
1498
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1499
|
+
return typeof o != "number" ? (i.isValid = !1, i.errors.push("Compression level must be a number")) : o < 0 || o > 1 ? (i.isValid = !1, i.errors.push("Compression level must be between 0 and 1")) : o < 0.1 ? i.warnings.push("Very low compression level may result in poor image quality") : o > 0.9 && i.warnings.push("Very high compression level may not reduce file size significantly"), i;
|
|
1599
1500
|
}
|
|
1600
|
-
function
|
|
1601
|
-
const
|
|
1602
|
-
return
|
|
1501
|
+
function vt(o) {
|
|
1502
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1503
|
+
return o !== void 0 && typeof o != "string" ? (i.isValid = !1, i.errors.push("File accept pattern must be a string")) : o && o.trim() === "" && i.warnings.push("Empty file accept pattern will accept all files"), i;
|
|
1603
1504
|
}
|
|
1604
|
-
function
|
|
1605
|
-
const
|
|
1606
|
-
return typeof
|
|
1505
|
+
function bt(o) {
|
|
1506
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1507
|
+
return typeof o != "number" ? (i.isValid = !1, i.errors.push("Columns count must be a number")) : (o < 1 || o > 12) && (i.isValid = !1, i.errors.push("Columns count must be between 1 and 12")), i;
|
|
1607
1508
|
}
|
|
1608
|
-
function
|
|
1609
|
-
const
|
|
1610
|
-
return
|
|
1509
|
+
function yt(o) {
|
|
1510
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1511
|
+
return o !== void 0 && typeof o != "number" ? (i.isValid = !1, i.errors.push("Table height must be a number")) : o && o < 100 ? i.warnings.push("Table height is very small (<100px), content may not be visible") : o && o > 1e3 && i.warnings.push("Table height is very large (>1000px), consider reducing for better UX"), i;
|
|
1611
1512
|
}
|
|
1612
|
-
function
|
|
1613
|
-
const
|
|
1614
|
-
return Array.isArray(
|
|
1513
|
+
function _t(o) {
|
|
1514
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1515
|
+
return Array.isArray(o) ? (o.forEach((e, t) => {
|
|
1615
1516
|
if (!e || typeof e != "object") {
|
|
1616
|
-
|
|
1517
|
+
i.errors.push(`Attachment at index ${t} must be an object`);
|
|
1617
1518
|
return;
|
|
1618
1519
|
}
|
|
1619
1520
|
if (!e.file || typeof e.file != "object") {
|
|
1620
|
-
|
|
1521
|
+
i.errors.push(`Attachment at index ${t} must have a file property`);
|
|
1621
1522
|
return;
|
|
1622
1523
|
}
|
|
1623
|
-
const
|
|
1524
|
+
const c = e.file;
|
|
1624
1525
|
["name", "format", "base64", "size"].forEach((L) => {
|
|
1625
|
-
L in
|
|
1626
|
-
}),
|
|
1627
|
-
}),
|
|
1526
|
+
L in c || i.errors.push(`File at index ${t} is missing required field: ${L}`);
|
|
1527
|
+
}), c.name && typeof c.name != "string" && i.errors.push(`File name at index ${t} must be a string`), c.format && typeof c.format != "string" && i.errors.push(`File format at index ${t} must be a string`), c.base64 && typeof c.base64 != "string" && i.errors.push(`File base64 at index ${t} must be a string`), c.size && typeof c.size != "number" && i.errors.push(`File size at index ${t} must be a number`), c.tags && !Array.isArray(c.tags) && i.errors.push(`File tags at index ${t} must be an array`);
|
|
1528
|
+
}), i.errors.length > 0 && (i.isValid = !1), i) : (i.isValid = !1, i.errors.push("Document attachment must be an array"), i);
|
|
1628
1529
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const
|
|
1530
|
+
function xt(o) {
|
|
1531
|
+
const i = { isValid: !0, errors: [], warnings: [] };
|
|
1631
1532
|
return [
|
|
1632
|
-
{ key: "fileUploaderType", validator:
|
|
1633
|
-
{ key: "cardType", validator:
|
|
1634
|
-
{ key: "lang", validator:
|
|
1635
|
-
{ key: "maxFileSize", validator:
|
|
1636
|
-
{ key: "maxFileCount", validator:
|
|
1637
|
-
{ key: "imageCompressLevel", validator:
|
|
1638
|
-
{ key: "fileAccept", validator:
|
|
1639
|
-
{ key: "cols", validator:
|
|
1640
|
-
{ key: "tableHeight", validator:
|
|
1641
|
-
{ key: "documentAttachment", validator:
|
|
1642
|
-
].forEach(({ key: t, validator:
|
|
1643
|
-
if (t in
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1533
|
+
{ key: "fileUploaderType", validator: ut },
|
|
1534
|
+
{ key: "cardType", validator: mt },
|
|
1535
|
+
{ key: "lang", validator: ft },
|
|
1536
|
+
{ key: "maxFileSize", validator: pt },
|
|
1537
|
+
{ key: "maxFileCount", validator: gt },
|
|
1538
|
+
{ key: "imageCompressLevel", validator: ht },
|
|
1539
|
+
{ key: "fileAccept", validator: vt },
|
|
1540
|
+
{ key: "cols", validator: bt },
|
|
1541
|
+
{ key: "tableHeight", validator: yt },
|
|
1542
|
+
{ key: "documentAttachment", validator: _t }
|
|
1543
|
+
].forEach(({ key: t, validator: c }) => {
|
|
1544
|
+
if (t in o) {
|
|
1545
|
+
const T = c(o[t]);
|
|
1546
|
+
i.errors.push(...T.errors.map((L) => `${t}: ${L}`)), i.warnings.push(...T.warnings.map((L) => `${t}: ${L}`)), T.isValid || (i.isValid = !1);
|
|
1646
1547
|
}
|
|
1647
|
-
}),
|
|
1548
|
+
}), i;
|
|
1648
1549
|
}
|
|
1649
|
-
const
|
|
1550
|
+
const De = /* @__PURE__ */ ee({
|
|
1650
1551
|
__name: "handyUploader",
|
|
1651
1552
|
props: {
|
|
1652
1553
|
documentAttachment: {},
|
|
@@ -1696,13 +1597,13 @@ const ye = /* @__PURE__ */ te({
|
|
|
1696
1597
|
"updateLang",
|
|
1697
1598
|
"updateDocumentAttachment"
|
|
1698
1599
|
],
|
|
1699
|
-
setup(
|
|
1700
|
-
const e =
|
|
1600
|
+
setup(o, { emit: i }) {
|
|
1601
|
+
const e = o;
|
|
1701
1602
|
if (process.env.NODE_ENV === "development") {
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1603
|
+
const u = xt(e);
|
|
1604
|
+
u.isValid || console.error("HandyUploader prop validation failed:", u.errors), u.warnings.length > 0 && console.warn("HandyUploader prop validation warnings:", u.warnings);
|
|
1704
1605
|
}
|
|
1705
|
-
const t =
|
|
1606
|
+
const t = _e({
|
|
1706
1607
|
insertDocumentDialog: !1,
|
|
1707
1608
|
editDocumentDialog: !1,
|
|
1708
1609
|
deleteDocumentDialog: !1,
|
|
@@ -1727,181 +1628,181 @@ const ye = /* @__PURE__ */ te({
|
|
|
1727
1628
|
selectedLang: {},
|
|
1728
1629
|
beforeInsertAttachments: {},
|
|
1729
1630
|
attachmentIndex: 0
|
|
1730
|
-
}),
|
|
1731
|
-
|
|
1732
|
-
L(), t.registryDocFile = e.documentAttachment, e.rtlSupport &&
|
|
1733
|
-
}),
|
|
1631
|
+
}), c = i;
|
|
1632
|
+
$e(() => {
|
|
1633
|
+
L(), t.registryDocFile = e.documentAttachment, e.rtlSupport && k(), C();
|
|
1634
|
+
}), E(
|
|
1734
1635
|
() => t.tempAttachment,
|
|
1735
|
-
(
|
|
1736
|
-
|
|
1636
|
+
(u) => {
|
|
1637
|
+
u && u.length > 0 ? j(u) : t.tempAttachmentChanged = [];
|
|
1737
1638
|
}
|
|
1738
|
-
),
|
|
1739
|
-
|
|
1740
|
-
}),
|
|
1741
|
-
|
|
1742
|
-
}),
|
|
1743
|
-
|
|
1744
|
-
}),
|
|
1745
|
-
|
|
1746
|
-
}),
|
|
1747
|
-
|
|
1748
|
-
}),
|
|
1749
|
-
|
|
1750
|
-
}),
|
|
1751
|
-
|
|
1752
|
-
}),
|
|
1753
|
-
|
|
1754
|
-
}),
|
|
1755
|
-
|
|
1756
|
-
}),
|
|
1757
|
-
|
|
1758
|
-
}),
|
|
1759
|
-
|
|
1760
|
-
}),
|
|
1761
|
-
|
|
1762
|
-
}),
|
|
1763
|
-
|
|
1764
|
-
}),
|
|
1765
|
-
|
|
1766
|
-
}),
|
|
1767
|
-
|
|
1768
|
-
}),
|
|
1769
|
-
|
|
1770
|
-
}),
|
|
1639
|
+
), E(() => e.cardType, (u) => {
|
|
1640
|
+
c("updateCardType", u), C();
|
|
1641
|
+
}), E(() => e.badgeCounter, (u) => {
|
|
1642
|
+
c("updateBadgeCounter", u);
|
|
1643
|
+
}), E(() => e.maxFileCount, (u) => {
|
|
1644
|
+
c("updateMaxFileCount", u);
|
|
1645
|
+
}), E(() => e.maxFileSize, (u) => {
|
|
1646
|
+
c("updateMaxFileSize", u);
|
|
1647
|
+
}), E(() => e.maxFileSize, (u) => {
|
|
1648
|
+
c("updateMaxFileSize", u);
|
|
1649
|
+
}), E(() => e.imageCompressor, (u) => {
|
|
1650
|
+
c("updateImageCompressor", u);
|
|
1651
|
+
}), E(() => e.imageCompressLevel, (u) => {
|
|
1652
|
+
c("updateImageCompressLevel", u);
|
|
1653
|
+
}), E(() => e.fileAccept, (u) => {
|
|
1654
|
+
c("updateFileAccept", u);
|
|
1655
|
+
}), E(() => e.thumb, (u) => {
|
|
1656
|
+
c("updateThumb", u);
|
|
1657
|
+
}), E(() => e.changeFileName, (u) => {
|
|
1658
|
+
c("updateChangeFileName", u);
|
|
1659
|
+
}), E(() => e.addFileDescription, (u) => {
|
|
1660
|
+
c("updateAddFileDescription", u);
|
|
1661
|
+
}), E(() => e.addFileTag, (u) => {
|
|
1662
|
+
c("updateAddFileDescription", u);
|
|
1663
|
+
}), E(() => e.tableThumbColumn, (u) => {
|
|
1664
|
+
c("updateTableThumbColumn", u);
|
|
1665
|
+
}), E(() => e.tableFixedHeader, (u) => {
|
|
1666
|
+
c("updateTableFixedHeader", u);
|
|
1667
|
+
}), E(() => e.tableHeight, (u) => {
|
|
1668
|
+
c("updateTableHeight", u);
|
|
1669
|
+
}), E(() => e.lang, (u) => {
|
|
1670
|
+
c("updateLang", u);
|
|
1671
|
+
}), Le(() => {
|
|
1771
1672
|
t.registryDocFile = [];
|
|
1772
1673
|
});
|
|
1773
|
-
const
|
|
1674
|
+
const T = () => {
|
|
1774
1675
|
t.btnLoader = !1, t.tempAttachment = [], t.insertDocumentDialog = !0;
|
|
1775
1676
|
}, L = () => {
|
|
1776
|
-
e.customLang !== null ? t.selectedLang = e.customLang : t.selectedLang =
|
|
1777
|
-
},
|
|
1778
|
-
},
|
|
1779
|
-
const
|
|
1677
|
+
e.customLang !== null ? t.selectedLang = e.customLang : t.selectedLang = ct;
|
|
1678
|
+
}, k = () => {
|
|
1679
|
+
}, C = () => {
|
|
1680
|
+
const f = {
|
|
1780
1681
|
default: { outlined: !1, raised: !1, shaped: !1, tile: !1 },
|
|
1781
1682
|
outlined: { outlined: !0, raised: !1, shaped: !1, tile: !1 },
|
|
1782
1683
|
shaped: { outlined: !1, raised: !1, shaped: !0, tile: !1 },
|
|
1783
1684
|
raised: { outlined: !1, raised: !0, shaped: !1, tile: !1 },
|
|
1784
1685
|
tile: { outlined: !1, raised: !1, shaped: !1, tile: !0 }
|
|
1785
1686
|
}[e.cardType || "default"];
|
|
1786
|
-
t.outlined =
|
|
1787
|
-
},
|
|
1788
|
-
|
|
1789
|
-
return new Promise(function(
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
},
|
|
1687
|
+
t.outlined = f.outlined, t.raised = f.raised, t.shaped = f.shaped, t.tile = f.tile;
|
|
1688
|
+
}, _ = (u) => {
|
|
1689
|
+
const f = new FileReader();
|
|
1690
|
+
return new Promise(function(d) {
|
|
1691
|
+
f.onloadend = () => {
|
|
1692
|
+
d(f.result);
|
|
1693
|
+
}, f.readAsDataURL(u);
|
|
1793
1694
|
});
|
|
1794
|
-
},
|
|
1695
|
+
}, h = async () => {
|
|
1795
1696
|
t.btnLoader = !0;
|
|
1796
|
-
const
|
|
1797
|
-
t.fileUploaderSnackText =
|
|
1697
|
+
const u = (f, d) => {
|
|
1698
|
+
t.fileUploaderSnackText = f, t.fileUploaderSnackBarAlertColor = d, t.fileUploaderSnackBarAlert = !0;
|
|
1798
1699
|
};
|
|
1799
|
-
for (const [
|
|
1700
|
+
for (const [f, d] of t.tempAttachmentChanged.entries()) {
|
|
1800
1701
|
if (e.documentAttachment.length >= e.maxFileCount) {
|
|
1801
|
-
|
|
1702
|
+
u(
|
|
1802
1703
|
`${t.selectedLang[e.lang].maxFileCountAlert} ${e.maxFileCount}`,
|
|
1803
1704
|
"red"
|
|
1804
1705
|
);
|
|
1805
1706
|
break;
|
|
1806
1707
|
}
|
|
1807
|
-
if (
|
|
1808
|
-
|
|
1708
|
+
if (d.file.size / 1e3 > e.maxFileSize) {
|
|
1709
|
+
u(
|
|
1809
1710
|
`${t.selectedLang[e.lang].maxFileSizeAlert} ${Math.round(e.maxFileSize / 1024)} ${t.selectedLang[e.lang].size.mb}`,
|
|
1810
1711
|
"red"
|
|
1811
1712
|
);
|
|
1812
1713
|
continue;
|
|
1813
1714
|
}
|
|
1814
|
-
let
|
|
1815
|
-
const
|
|
1816
|
-
let
|
|
1817
|
-
e.imageCompressor && ["image/png", "image/jpg", "image/jpeg", "image/webp"].includes(
|
|
1715
|
+
let n = {};
|
|
1716
|
+
const l = {}, p = d.file, s = p.format;
|
|
1717
|
+
let F = !1, y = "", S = p.base64;
|
|
1718
|
+
e.imageCompressor && ["image/png", "image/jpg", "image/jpeg", "image/webp"].includes(s) && (F = !0, y = await D(`data:${s};base64,${S}`), S = y.split(",")[1]);
|
|
1818
1719
|
try {
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1821
|
-
base64:
|
|
1822
|
-
size:
|
|
1823
|
-
name: `${
|
|
1824
|
-
tags:
|
|
1825
|
-
description:
|
|
1720
|
+
const I = S.replace(/\s/g, "");
|
|
1721
|
+
n = {
|
|
1722
|
+
base64: I,
|
|
1723
|
+
size: F ? (atob(I).length / 1024).toFixed(1) : p.size.toString(),
|
|
1724
|
+
name: `${p.name}.${p.format}`,
|
|
1725
|
+
tags: p.tags || [],
|
|
1726
|
+
description: p.description || "",
|
|
1826
1727
|
showDetailState: !1,
|
|
1827
|
-
format:
|
|
1828
|
-
},
|
|
1829
|
-
} catch (
|
|
1830
|
-
console.error("Error processing Base64 string:",
|
|
1728
|
+
format: s
|
|
1729
|
+
}, l.file = n, t.registryDocFile.push(l), c("updateDocumentAttachment", t.registryDocFile);
|
|
1730
|
+
} catch (I) {
|
|
1731
|
+
console.error("Error processing Base64 string:", I), u("File could not be processed due to an invalid format.", "red");
|
|
1831
1732
|
continue;
|
|
1832
1733
|
}
|
|
1833
1734
|
}
|
|
1834
1735
|
t.documentAttachmentAPI = [], t.tempAttachmentChanged = [], t.insertDocumentDialog = !1, t.btnLoader = !1;
|
|
1835
|
-
},
|
|
1836
|
-
const
|
|
1837
|
-
return new Promise((
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1844
|
-
},
|
|
1845
|
-
|
|
1846
|
-
},
|
|
1736
|
+
}, D = (u) => {
|
|
1737
|
+
const f = document.createElement("canvas"), d = document.createElement("img");
|
|
1738
|
+
return new Promise((n, l) => {
|
|
1739
|
+
const p = e.imageCompressLevel;
|
|
1740
|
+
d.onload = function() {
|
|
1741
|
+
const s = d.width, F = d.height;
|
|
1742
|
+
f.width = s, f.height = F;
|
|
1743
|
+
const y = f.getContext("2d");
|
|
1744
|
+
y == null || y.drawImage(d, 0, 0, s, F), n(f.toDataURL("image/jpeg", p));
|
|
1745
|
+
}, d.onerror = function(s) {
|
|
1746
|
+
l(s);
|
|
1747
|
+
}, d.src = u;
|
|
1847
1748
|
});
|
|
1848
|
-
}, $ = (
|
|
1849
|
-
t.btnLoader = !1, t.selectedIndex =
|
|
1850
|
-
},
|
|
1851
|
-
t.registryDocFile.splice(t.selectedIndex, 1),
|
|
1852
|
-
}, j = async (
|
|
1853
|
-
for (
|
|
1854
|
-
let
|
|
1749
|
+
}, $ = (u, f) => {
|
|
1750
|
+
t.btnLoader = !1, t.selectedIndex = u, t.selectedId = f, t.deleteDocumentDialog = !0;
|
|
1751
|
+
}, U = () => {
|
|
1752
|
+
t.registryDocFile.splice(t.selectedIndex, 1), c("updateDocumentAttachment", t.registryDocFile), t.deleteDocumentDialog = !1;
|
|
1753
|
+
}, j = async (u) => {
|
|
1754
|
+
for (const f of u) {
|
|
1755
|
+
let d = "";
|
|
1855
1756
|
try {
|
|
1856
|
-
|
|
1857
|
-
} catch (
|
|
1858
|
-
console.log(
|
|
1757
|
+
d = await _(f);
|
|
1758
|
+
} catch (p) {
|
|
1759
|
+
console.log(p);
|
|
1859
1760
|
continue;
|
|
1860
1761
|
}
|
|
1861
|
-
|
|
1862
|
-
name:
|
|
1863
|
-
format:
|
|
1864
|
-
base64:
|
|
1762
|
+
const l = { file: {
|
|
1763
|
+
name: f.name.split(".")[0],
|
|
1764
|
+
format: f.name.substr(f.name.lastIndexOf(".") + 1),
|
|
1765
|
+
base64: d.split(",")[1],
|
|
1865
1766
|
// Remove data:mime;base64, prefix
|
|
1866
|
-
size:
|
|
1767
|
+
size: f.size,
|
|
1867
1768
|
tags: [],
|
|
1868
1769
|
description: null,
|
|
1869
1770
|
showDetailState: !1
|
|
1870
1771
|
} };
|
|
1871
|
-
t.tempAttachmentChanged.push(
|
|
1772
|
+
t.tempAttachmentChanged.push(l);
|
|
1872
1773
|
}
|
|
1873
|
-
},
|
|
1874
|
-
t.btnLoader = !1, t.attachmentIndex =
|
|
1875
|
-
},
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1774
|
+
}, P = (u, f) => {
|
|
1775
|
+
t.btnLoader = !1, t.attachmentIndex = f, t.editDocumentDialog = !0, t.tempAttachmentChanged = [u];
|
|
1776
|
+
}, H = () => {
|
|
1777
|
+
const u = [...e.documentAttachment];
|
|
1778
|
+
u.splice(
|
|
1878
1779
|
t.attachmentIndex,
|
|
1879
1780
|
1,
|
|
1880
1781
|
t.tempAttachmentChanged[0]
|
|
1881
|
-
),
|
|
1782
|
+
), c("updateDocumentAttachment", u), t.editDocumentDialog = !1;
|
|
1882
1783
|
};
|
|
1883
|
-
return (
|
|
1884
|
-
const
|
|
1885
|
-
return
|
|
1886
|
-
default:
|
|
1887
|
-
r(
|
|
1888
|
-
default:
|
|
1889
|
-
r(
|
|
1784
|
+
return (u, f) => {
|
|
1785
|
+
const d = g("v-col"), n = g("v-row"), l = g("v-icon"), p = g("v-card-title"), s = g("v-file-input"), F = g("v-expansion-panel-title"), y = g("v-text-field"), S = g("v-textarea"), I = g("v-autocomplete"), J = g("v-img"), W = g("v-card"), N = g("v-expansion-panel-text"), K = g("v-expansion-panel"), G = g("v-expansion-panels"), te = g("v-list-item-title"), se = g("v-list-item"), oe = g("v-card-text"), z = g("v-btn"), Q = g("v-card-actions"), R = g("v-dialog"), ne = g("v-snackbar"), Ce = g("v-spacer"), Ae = g("v-container");
|
|
1786
|
+
return m(), b(Ae, null, {
|
|
1787
|
+
default: a(() => [
|
|
1788
|
+
r(n, null, {
|
|
1789
|
+
default: a(() => [
|
|
1790
|
+
r(d, {
|
|
1890
1791
|
cols: "12",
|
|
1891
1792
|
md: "12",
|
|
1892
1793
|
xs: "12"
|
|
1893
1794
|
}, {
|
|
1894
|
-
default:
|
|
1895
|
-
r(
|
|
1795
|
+
default: a(() => [
|
|
1796
|
+
r(be, {
|
|
1896
1797
|
documentAttachment: e.documentAttachment,
|
|
1897
1798
|
selectedLang: t.selectedLang,
|
|
1898
1799
|
lang: e.lang,
|
|
1899
1800
|
badgeCounter: e.badgeCounter,
|
|
1900
1801
|
btnColor: e.btnColor,
|
|
1901
1802
|
maxFileCount: e.maxFileCount,
|
|
1902
|
-
onOpenInputDocumentModal:
|
|
1803
|
+
onOpenInputDocumentModal: T
|
|
1903
1804
|
}, null, 8, ["documentAttachment", "selectedLang", "lang", "badgeCounter", "btnColor", "maxFileCount"]),
|
|
1904
|
-
e.fileUploaderType === "simple" ? (
|
|
1805
|
+
e.fileUploaderType === "simple" ? (m(), b(ve, {
|
|
1905
1806
|
key: 0,
|
|
1906
1807
|
documentAttachment: e.documentAttachment,
|
|
1907
1808
|
cols: e.cols,
|
|
@@ -1915,11 +1816,11 @@ const ye = /* @__PURE__ */ te({
|
|
|
1915
1816
|
deletePermission: e.deletePermission,
|
|
1916
1817
|
editPermission: e.editPermission,
|
|
1917
1818
|
selectedLang: t.selectedLang,
|
|
1918
|
-
onSetCardTheme:
|
|
1819
|
+
onSetCardTheme: C,
|
|
1919
1820
|
onOpenDeleteDialog: $,
|
|
1920
|
-
onOpenEditDocumentDialog:
|
|
1921
|
-
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) :
|
|
1922
|
-
e.fileUploaderType === "thumbnail" ? (
|
|
1821
|
+
onOpenEditDocumentDialog: P
|
|
1822
|
+
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : B("", !0),
|
|
1823
|
+
e.fileUploaderType === "thumbnail" ? (m(), b(ge, {
|
|
1923
1824
|
key: 1,
|
|
1924
1825
|
documentAttachment: e.documentAttachment,
|
|
1925
1826
|
cols: e.cols,
|
|
@@ -1933,11 +1834,11 @@ const ye = /* @__PURE__ */ te({
|
|
|
1933
1834
|
deletePermission: e.deletePermission,
|
|
1934
1835
|
editPermission: e.editPermission,
|
|
1935
1836
|
selectedLang: t.selectedLang,
|
|
1936
|
-
onSetCardTheme:
|
|
1937
|
-
onOpenDeleteDialog:
|
|
1938
|
-
onOpenEditDocumentDialog:
|
|
1939
|
-
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) :
|
|
1940
|
-
e.fileUploaderType === "table" ? (
|
|
1837
|
+
onSetCardTheme: C,
|
|
1838
|
+
onOpenDeleteDialog: f[0] || (f[0] = (v, q) => $(v, q)),
|
|
1839
|
+
onOpenEditDocumentDialog: f[1] || (f[1] = (v, q) => P(v, q))
|
|
1840
|
+
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : B("", !0),
|
|
1841
|
+
e.fileUploaderType === "table" ? (m(), b(he, {
|
|
1941
1842
|
key: 2,
|
|
1942
1843
|
documentAttachment: e.documentAttachment,
|
|
1943
1844
|
cols: e.cols,
|
|
@@ -1954,131 +1855,131 @@ const ye = /* @__PURE__ */ te({
|
|
|
1954
1855
|
deletePermission: e.deletePermission,
|
|
1955
1856
|
editPermission: e.editPermission,
|
|
1956
1857
|
selectedLang: t.selectedLang,
|
|
1957
|
-
onSetCardTheme:
|
|
1858
|
+
onSetCardTheme: C,
|
|
1958
1859
|
onOpenDeleteDialog: $,
|
|
1959
|
-
onOpenEditDocumentDialog:
|
|
1960
|
-
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "tableThumbColumn", "tableFixedHeader", "tableHeight", "cardType", "deletePermission", "editPermission", "selectedLang"])) :
|
|
1860
|
+
onOpenEditDocumentDialog: P
|
|
1861
|
+
}, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "tableThumbColumn", "tableFixedHeader", "tableHeight", "cardType", "deletePermission", "editPermission", "selectedLang"])) : B("", !0)
|
|
1961
1862
|
]),
|
|
1962
1863
|
_: 1
|
|
1963
1864
|
})
|
|
1964
1865
|
]),
|
|
1965
1866
|
_: 1
|
|
1966
1867
|
}),
|
|
1967
|
-
r(
|
|
1968
|
-
default:
|
|
1969
|
-
r(
|
|
1868
|
+
r(n, { justify: "center" }, {
|
|
1869
|
+
default: a(() => [
|
|
1870
|
+
r(R, {
|
|
1970
1871
|
modelValue: t.insertDocumentDialog,
|
|
1971
|
-
"onUpdate:modelValue":
|
|
1872
|
+
"onUpdate:modelValue": f[5] || (f[5] = (v) => t.insertDocumentDialog = v),
|
|
1972
1873
|
scrollable: !1,
|
|
1973
1874
|
persistent: "",
|
|
1974
1875
|
width: "50%"
|
|
1975
1876
|
}, {
|
|
1976
|
-
default:
|
|
1977
|
-
r(
|
|
1978
|
-
default:
|
|
1979
|
-
r(
|
|
1980
|
-
default:
|
|
1981
|
-
r(
|
|
1982
|
-
onClick:
|
|
1877
|
+
default: a(() => [
|
|
1878
|
+
r(W, null, {
|
|
1879
|
+
default: a(() => [
|
|
1880
|
+
r(p, null, {
|
|
1881
|
+
default: a(() => [
|
|
1882
|
+
r(l, {
|
|
1883
|
+
onClick: f[2] || (f[2] = (v) => t.insertDocumentDialog = !1)
|
|
1983
1884
|
}, {
|
|
1984
|
-
default:
|
|
1985
|
-
|
|
1986
|
-
])),
|
|
1885
|
+
default: a(() => [...f[12] || (f[12] = [
|
|
1886
|
+
w("mdi-close", -1)
|
|
1887
|
+
])]),
|
|
1987
1888
|
_: 1
|
|
1988
1889
|
})
|
|
1989
1890
|
]),
|
|
1990
1891
|
_: 1
|
|
1991
1892
|
}),
|
|
1992
1893
|
r(oe, null, {
|
|
1993
|
-
default:
|
|
1994
|
-
t.tempAttachment.length === 0 ? (
|
|
1995
|
-
e.fileAccept !== "" ? (
|
|
1894
|
+
default: a(() => [
|
|
1895
|
+
t.tempAttachment.length === 0 ? (m(), V(O, { key: 0 }, [
|
|
1896
|
+
e.fileAccept !== "" ? (m(), b(s, {
|
|
1996
1897
|
key: 0,
|
|
1997
1898
|
multiple: "",
|
|
1998
1899
|
accept: e.fileAccept,
|
|
1999
1900
|
chip: "",
|
|
2000
1901
|
modelValue: t.tempAttachment,
|
|
2001
|
-
"onUpdate:modelValue":
|
|
2002
|
-
label: t.selectedLang[
|
|
2003
|
-
}, null, 8, ["accept", "modelValue", "label"])) : (
|
|
1902
|
+
"onUpdate:modelValue": f[3] || (f[3] = (v) => t.tempAttachment = v),
|
|
1903
|
+
label: t.selectedLang[o.lang].insertNewFile
|
|
1904
|
+
}, null, 8, ["accept", "modelValue", "label"])) : (m(), b(s, {
|
|
2004
1905
|
key: 1,
|
|
2005
1906
|
multiple: "",
|
|
2006
1907
|
modelValue: t.tempAttachment,
|
|
2007
|
-
"onUpdate:modelValue":
|
|
2008
|
-
label: t.selectedLang[
|
|
1908
|
+
"onUpdate:modelValue": f[4] || (f[4] = (v) => t.tempAttachment = v),
|
|
1909
|
+
label: t.selectedLang[o.lang].insertNewFile
|
|
2009
1910
|
}, null, 8, ["modelValue", "label"]))
|
|
2010
|
-
], 64)) : (
|
|
2011
|
-
e.addFileTag || e.addFileDescription || e.changeFileName ? (
|
|
2012
|
-
default:
|
|
2013
|
-
(
|
|
2014
|
-
key: `attachment-${
|
|
1911
|
+
], 64)) : (m(), V(O, { key: 1 }, [
|
|
1912
|
+
e.addFileTag || e.addFileDescription || e.changeFileName ? (m(), b(G, { key: 0 }, {
|
|
1913
|
+
default: a(() => [
|
|
1914
|
+
(m(!0), V(O, null, X(t.tempAttachmentChanged, (v, q) => (m(), b(K, {
|
|
1915
|
+
key: `attachment-${q}`
|
|
2015
1916
|
}, {
|
|
2016
|
-
default:
|
|
2017
|
-
r(
|
|
2018
|
-
default:
|
|
2019
|
-
|
|
1917
|
+
default: a(() => [
|
|
1918
|
+
r(F, null, {
|
|
1919
|
+
default: a(() => [
|
|
1920
|
+
w(x(v.file.name), 1)
|
|
2020
1921
|
]),
|
|
2021
1922
|
_: 2
|
|
2022
1923
|
}, 1024),
|
|
2023
|
-
r(
|
|
2024
|
-
default:
|
|
2025
|
-
r(
|
|
1924
|
+
r(N, null, {
|
|
1925
|
+
default: a(() => [
|
|
1926
|
+
r(n, {
|
|
2026
1927
|
align: "center",
|
|
2027
1928
|
justify: "center"
|
|
2028
1929
|
}, {
|
|
2029
|
-
default:
|
|
2030
|
-
r(
|
|
1930
|
+
default: a(() => [
|
|
1931
|
+
r(d, {
|
|
2031
1932
|
cols: "12",
|
|
2032
1933
|
lg: "9",
|
|
2033
1934
|
md: "9",
|
|
2034
1935
|
xs: "12"
|
|
2035
1936
|
}, {
|
|
2036
|
-
default:
|
|
2037
|
-
e.changeFileName ? (
|
|
1937
|
+
default: a(() => [
|
|
1938
|
+
e.changeFileName ? (m(), b(y, {
|
|
2038
1939
|
key: 0,
|
|
2039
|
-
label: t.selectedLang[
|
|
2040
|
-
modelValue:
|
|
2041
|
-
"onUpdate:modelValue": (
|
|
2042
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) :
|
|
2043
|
-
e.addFileDescription ? (
|
|
1940
|
+
label: t.selectedLang[o.lang].fileName,
|
|
1941
|
+
modelValue: v.file.name,
|
|
1942
|
+
"onUpdate:modelValue": (M) => v.file.name = M
|
|
1943
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
|
|
1944
|
+
e.addFileDescription ? (m(), b(S, {
|
|
2044
1945
|
key: 1,
|
|
2045
|
-
label: t.selectedLang[
|
|
1946
|
+
label: t.selectedLang[o.lang].fileDescription,
|
|
2046
1947
|
"auto-grow": "",
|
|
2047
1948
|
"row-height": "1",
|
|
2048
|
-
modelValue:
|
|
2049
|
-
"onUpdate:modelValue": (
|
|
2050
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) :
|
|
2051
|
-
e.addFileTag ? (
|
|
1949
|
+
modelValue: v.file.description,
|
|
1950
|
+
"onUpdate:modelValue": (M) => v.file.description = M
|
|
1951
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
|
|
1952
|
+
e.addFileTag ? (m(), b(I, {
|
|
2052
1953
|
key: 2,
|
|
2053
|
-
modelValue:
|
|
2054
|
-
"onUpdate:modelValue": (
|
|
1954
|
+
modelValue: v.file.tags,
|
|
1955
|
+
"onUpdate:modelValue": (M) => v.file.tags = M,
|
|
2055
1956
|
items: e.tags,
|
|
2056
1957
|
dense: "",
|
|
2057
1958
|
chips: "",
|
|
2058
|
-
label: t.selectedLang[
|
|
1959
|
+
label: t.selectedLang[o.lang].fileTags,
|
|
2059
1960
|
multiple: ""
|
|
2060
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) :
|
|
1961
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) : B("", !0)
|
|
2061
1962
|
]),
|
|
2062
1963
|
_: 2
|
|
2063
1964
|
}, 1024),
|
|
2064
|
-
r(
|
|
1965
|
+
r(d, {
|
|
2065
1966
|
align: "center",
|
|
2066
1967
|
cols: "12",
|
|
2067
1968
|
lg: "3",
|
|
2068
1969
|
md: "3",
|
|
2069
1970
|
xs: "12"
|
|
2070
1971
|
}, {
|
|
2071
|
-
default:
|
|
2072
|
-
|
|
2073
|
-
default:
|
|
2074
|
-
r(
|
|
2075
|
-
src: "data:" +
|
|
1972
|
+
default: a(() => [
|
|
1973
|
+
v.file.format === "jpg" || v.file.format === "jpeg" || v.file.format === "png" || v.file.format === "tif" || v.file.format === "bmp" ? (m(), b(W, { key: 0 }, {
|
|
1974
|
+
default: a(() => [
|
|
1975
|
+
r(J, {
|
|
1976
|
+
src: "data:" + v.file.format + ";base64," + v.file.base64
|
|
2076
1977
|
}, null, 8, ["src"])
|
|
2077
1978
|
]),
|
|
2078
1979
|
_: 2
|
|
2079
|
-
}, 1024)) : (
|
|
1980
|
+
}, 1024)) : (m(), b(ie, {
|
|
2080
1981
|
key: 1,
|
|
2081
|
-
"file-format":
|
|
1982
|
+
"file-format": v.file.format,
|
|
2082
1983
|
size: 60
|
|
2083
1984
|
}, null, 8, ["file-format"]))
|
|
2084
1985
|
]),
|
|
@@ -2095,24 +1996,24 @@ const ye = /* @__PURE__ */ te({
|
|
|
2095
1996
|
}, 1024))), 128))
|
|
2096
1997
|
]),
|
|
2097
1998
|
_: 1
|
|
2098
|
-
})) : (
|
|
1999
|
+
})) : (m(), b(W, {
|
|
2099
2000
|
key: 1,
|
|
2100
2001
|
class: "mx-auto",
|
|
2101
2002
|
tile: ""
|
|
2102
2003
|
}, {
|
|
2103
|
-
default:
|
|
2104
|
-
(
|
|
2105
|
-
key: `attachment-${
|
|
2004
|
+
default: a(() => [
|
|
2005
|
+
(m(!0), V(O, null, X(t.tempAttachmentChanged, (v, q) => (m(), b(se, {
|
|
2006
|
+
key: `attachment-${q}`,
|
|
2106
2007
|
style: { "border-bottom": "1px solid #E0E0E0" }
|
|
2107
2008
|
}, {
|
|
2108
|
-
default:
|
|
2109
|
-
r(
|
|
2110
|
-
default:
|
|
2111
|
-
r(
|
|
2112
|
-
"file-format":
|
|
2009
|
+
default: a(() => [
|
|
2010
|
+
r(te, null, {
|
|
2011
|
+
default: a(() => [
|
|
2012
|
+
r(ie, {
|
|
2013
|
+
"file-format": v.file.format,
|
|
2113
2014
|
size: 24
|
|
2114
2015
|
}, null, 8, ["file-format"]),
|
|
2115
|
-
|
|
2016
|
+
w(" " + x(v.file.name) + "." + x(v.file.format), 1)
|
|
2116
2017
|
]),
|
|
2117
2018
|
_: 2
|
|
2118
2019
|
}, 1024)
|
|
@@ -2127,15 +2028,15 @@ const ye = /* @__PURE__ */ te({
|
|
|
2127
2028
|
_: 1
|
|
2128
2029
|
}),
|
|
2129
2030
|
r(Q, null, {
|
|
2130
|
-
default:
|
|
2131
|
-
r(
|
|
2031
|
+
default: a(() => [
|
|
2032
|
+
r(z, {
|
|
2132
2033
|
disabled: t.tempAttachment == null || t.btnLoader,
|
|
2133
2034
|
loading: t.btnLoader,
|
|
2134
2035
|
color: e.btnColor,
|
|
2135
|
-
onClick:
|
|
2036
|
+
onClick: h
|
|
2136
2037
|
}, {
|
|
2137
|
-
default:
|
|
2138
|
-
|
|
2038
|
+
default: a(() => [
|
|
2039
|
+
w(x(t.selectedLang[o.lang].add), 1)
|
|
2139
2040
|
]),
|
|
2140
2041
|
_: 1
|
|
2141
2042
|
}, 8, ["disabled", "loading", "color"])
|
|
@@ -2151,96 +2052,96 @@ const ye = /* @__PURE__ */ te({
|
|
|
2151
2052
|
]),
|
|
2152
2053
|
_: 1
|
|
2153
2054
|
}),
|
|
2154
|
-
r(
|
|
2155
|
-
default:
|
|
2156
|
-
r(
|
|
2055
|
+
r(n, { justify: "center" }, {
|
|
2056
|
+
default: a(() => [
|
|
2057
|
+
r(R, {
|
|
2157
2058
|
modelValue: t.editDocumentDialog,
|
|
2158
|
-
"onUpdate:modelValue":
|
|
2059
|
+
"onUpdate:modelValue": f[7] || (f[7] = (v) => t.editDocumentDialog = v),
|
|
2159
2060
|
scrollable: !1,
|
|
2160
2061
|
persistent: "",
|
|
2161
2062
|
width: "50%"
|
|
2162
2063
|
}, {
|
|
2163
|
-
default:
|
|
2164
|
-
r(
|
|
2165
|
-
default:
|
|
2166
|
-
r(
|
|
2167
|
-
default:
|
|
2168
|
-
r(
|
|
2169
|
-
onClick:
|
|
2064
|
+
default: a(() => [
|
|
2065
|
+
r(W, null, {
|
|
2066
|
+
default: a(() => [
|
|
2067
|
+
r(p, null, {
|
|
2068
|
+
default: a(() => [
|
|
2069
|
+
r(l, {
|
|
2070
|
+
onClick: f[6] || (f[6] = (v) => t.editDocumentDialog = !1)
|
|
2170
2071
|
}, {
|
|
2171
|
-
default:
|
|
2172
|
-
|
|
2173
|
-
])),
|
|
2072
|
+
default: a(() => [...f[13] || (f[13] = [
|
|
2073
|
+
w("mdi-close", -1)
|
|
2074
|
+
])]),
|
|
2174
2075
|
_: 1
|
|
2175
2076
|
})
|
|
2176
2077
|
]),
|
|
2177
2078
|
_: 1
|
|
2178
2079
|
}),
|
|
2179
|
-
(
|
|
2180
|
-
key: `attachment-${
|
|
2080
|
+
(m(!0), V(O, null, X(t.tempAttachmentChanged, (v, q) => (m(), b(oe, {
|
|
2081
|
+
key: `attachment-${q}`
|
|
2181
2082
|
}, {
|
|
2182
|
-
default:
|
|
2183
|
-
r(
|
|
2083
|
+
default: a(() => [
|
|
2084
|
+
r(n, {
|
|
2184
2085
|
align: "center",
|
|
2185
2086
|
justify: "center"
|
|
2186
2087
|
}, {
|
|
2187
|
-
default:
|
|
2188
|
-
r(
|
|
2088
|
+
default: a(() => [
|
|
2089
|
+
r(d, {
|
|
2189
2090
|
cols: "12",
|
|
2190
2091
|
lg: "9",
|
|
2191
2092
|
md: "9",
|
|
2192
2093
|
xs: "12"
|
|
2193
2094
|
}, {
|
|
2194
|
-
default:
|
|
2195
|
-
e.changeFileName ? (
|
|
2095
|
+
default: a(() => [
|
|
2096
|
+
e.changeFileName ? (m(), b(y, {
|
|
2196
2097
|
key: 0,
|
|
2197
|
-
label: t.selectedLang[
|
|
2198
|
-
modelValue:
|
|
2199
|
-
"onUpdate:modelValue": (
|
|
2200
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) :
|
|
2201
|
-
e.addFileDescription ? (
|
|
2098
|
+
label: t.selectedLang[o.lang].fileName,
|
|
2099
|
+
modelValue: v.file.name,
|
|
2100
|
+
"onUpdate:modelValue": (M) => v.file.name = M
|
|
2101
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
|
|
2102
|
+
e.addFileDescription ? (m(), b(S, {
|
|
2202
2103
|
key: 1,
|
|
2203
|
-
label: t.selectedLang[
|
|
2104
|
+
label: t.selectedLang[o.lang].fileDescription,
|
|
2204
2105
|
"auto-grow": "",
|
|
2205
2106
|
"row-height": "1",
|
|
2206
|
-
modelValue:
|
|
2207
|
-
"onUpdate:modelValue": (
|
|
2208
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) :
|
|
2209
|
-
e.addFileTag ? (
|
|
2107
|
+
modelValue: v.file.description,
|
|
2108
|
+
"onUpdate:modelValue": (M) => v.file.description = M
|
|
2109
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
|
|
2110
|
+
e.addFileTag ? (m(), b(I, {
|
|
2210
2111
|
key: 2,
|
|
2211
|
-
modelValue:
|
|
2212
|
-
"onUpdate:modelValue": (
|
|
2112
|
+
modelValue: v.file.tags,
|
|
2113
|
+
"onUpdate:modelValue": (M) => v.file.tags = M,
|
|
2213
2114
|
items: e.tags,
|
|
2214
2115
|
dense: "",
|
|
2215
2116
|
chips: "",
|
|
2216
|
-
label: t.selectedLang[
|
|
2117
|
+
label: t.selectedLang[o.lang].fileTags,
|
|
2217
2118
|
multiple: ""
|
|
2218
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) :
|
|
2119
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) : B("", !0)
|
|
2219
2120
|
]),
|
|
2220
2121
|
_: 2
|
|
2221
2122
|
}, 1024),
|
|
2222
|
-
r(
|
|
2123
|
+
r(d, {
|
|
2223
2124
|
align: "center",
|
|
2224
2125
|
cols: "12",
|
|
2225
2126
|
lg: "3",
|
|
2226
2127
|
md: "3",
|
|
2227
2128
|
xs: "12"
|
|
2228
2129
|
}, {
|
|
2229
|
-
default:
|
|
2230
|
-
var
|
|
2130
|
+
default: a(() => {
|
|
2131
|
+
var M;
|
|
2231
2132
|
return [
|
|
2232
|
-
|
|
2233
|
-
((
|
|
2234
|
-
) ? (
|
|
2235
|
-
default:
|
|
2236
|
-
r(
|
|
2237
|
-
src: "data:" +
|
|
2133
|
+
v.file.name && ["jpg", "jpeg", "png", "tif", "bmp"].includes(
|
|
2134
|
+
((M = v.file.name.split(".").pop()) == null ? void 0 : M.toLowerCase()) || ""
|
|
2135
|
+
) ? (m(), b(W, { key: 0 }, {
|
|
2136
|
+
default: a(() => [
|
|
2137
|
+
r(J, {
|
|
2138
|
+
src: "data:" + v.file.format + ";base64," + v.file.base64
|
|
2238
2139
|
}, null, 8, ["src"])
|
|
2239
2140
|
]),
|
|
2240
2141
|
_: 2
|
|
2241
|
-
}, 1024)) : (
|
|
2142
|
+
}, 1024)) : (m(), b(ie, {
|
|
2242
2143
|
key: 1,
|
|
2243
|
-
"file-format":
|
|
2144
|
+
"file-format": v.file.format,
|
|
2244
2145
|
size: 60
|
|
2245
2146
|
}, null, 8, ["file-format"]))
|
|
2246
2147
|
];
|
|
@@ -2254,15 +2155,15 @@ const ye = /* @__PURE__ */ te({
|
|
|
2254
2155
|
_: 2
|
|
2255
2156
|
}, 1024))), 128)),
|
|
2256
2157
|
r(Q, null, {
|
|
2257
|
-
default:
|
|
2258
|
-
r(
|
|
2158
|
+
default: a(() => [
|
|
2159
|
+
r(z, {
|
|
2259
2160
|
disabled: t.tempAttachment === null || t.btnLoader,
|
|
2260
2161
|
loading: t.btnLoader,
|
|
2261
2162
|
color: e.btnColor,
|
|
2262
|
-
onClick:
|
|
2163
|
+
onClick: H
|
|
2263
2164
|
}, {
|
|
2264
|
-
default:
|
|
2265
|
-
|
|
2165
|
+
default: a(() => [
|
|
2166
|
+
w(x(t.selectedLang[o.lang].edit), 1)
|
|
2266
2167
|
]),
|
|
2267
2168
|
_: 1
|
|
2268
2169
|
}, 8, ["disabled", "loading", "color"])
|
|
@@ -2278,26 +2179,26 @@ const ye = /* @__PURE__ */ te({
|
|
|
2278
2179
|
]),
|
|
2279
2180
|
_: 1
|
|
2280
2181
|
}),
|
|
2281
|
-
r(
|
|
2182
|
+
r(ne, {
|
|
2282
2183
|
modelValue: t.fileUploaderSnackBarAlert,
|
|
2283
|
-
"onUpdate:modelValue":
|
|
2184
|
+
"onUpdate:modelValue": f[9] || (f[9] = (v) => t.fileUploaderSnackBarAlert = v),
|
|
2284
2185
|
right: "",
|
|
2285
2186
|
bottom: "",
|
|
2286
2187
|
color: t.fileUploaderSnackBarAlertColor,
|
|
2287
2188
|
timeout: 3e3
|
|
2288
2189
|
}, {
|
|
2289
|
-
default:
|
|
2290
|
-
|
|
2291
|
-
r(
|
|
2190
|
+
default: a(() => [
|
|
2191
|
+
w(x(t.fileUploaderSnackText) + " ", 1),
|
|
2192
|
+
r(z, {
|
|
2292
2193
|
color: "white",
|
|
2293
2194
|
text: "",
|
|
2294
|
-
onClick:
|
|
2195
|
+
onClick: f[8] || (f[8] = (v) => t.fileUploaderSnackBarAlert = !1)
|
|
2295
2196
|
}, {
|
|
2296
|
-
default:
|
|
2297
|
-
r(
|
|
2298
|
-
default:
|
|
2299
|
-
|
|
2300
|
-
])),
|
|
2197
|
+
default: a(() => [
|
|
2198
|
+
r(l, null, {
|
|
2199
|
+
default: a(() => [...f[14] || (f[14] = [
|
|
2200
|
+
w("mdi-close", -1)
|
|
2201
|
+
])]),
|
|
2301
2202
|
_: 1
|
|
2302
2203
|
})
|
|
2303
2204
|
]),
|
|
@@ -2306,50 +2207,50 @@ const ye = /* @__PURE__ */ te({
|
|
|
2306
2207
|
]),
|
|
2307
2208
|
_: 1
|
|
2308
2209
|
}, 8, ["modelValue", "color"]),
|
|
2309
|
-
r(
|
|
2310
|
-
default:
|
|
2311
|
-
r(
|
|
2210
|
+
r(n, { justify: "center" }, {
|
|
2211
|
+
default: a(() => [
|
|
2212
|
+
r(R, {
|
|
2312
2213
|
modelValue: t.deleteDocumentDialog,
|
|
2313
|
-
"onUpdate:modelValue":
|
|
2214
|
+
"onUpdate:modelValue": f[11] || (f[11] = (v) => t.deleteDocumentDialog = v),
|
|
2314
2215
|
persistent: "",
|
|
2315
2216
|
width: "30%"
|
|
2316
2217
|
}, {
|
|
2317
|
-
default:
|
|
2318
|
-
r(
|
|
2319
|
-
default:
|
|
2320
|
-
r(
|
|
2321
|
-
default:
|
|
2322
|
-
r(
|
|
2218
|
+
default: a(() => [
|
|
2219
|
+
r(W, null, {
|
|
2220
|
+
default: a(() => [
|
|
2221
|
+
r(p, null, {
|
|
2222
|
+
default: a(() => [
|
|
2223
|
+
r(l, { color: "red" })
|
|
2323
2224
|
]),
|
|
2324
2225
|
_: 1
|
|
2325
2226
|
}),
|
|
2326
2227
|
r(oe, null, {
|
|
2327
|
-
default:
|
|
2328
|
-
|
|
2228
|
+
default: a(() => [
|
|
2229
|
+
w(x(t.selectedLang[o.lang].deleteDialog.message), 1)
|
|
2329
2230
|
]),
|
|
2330
2231
|
_: 1
|
|
2331
2232
|
}),
|
|
2332
2233
|
r(Q, null, {
|
|
2333
|
-
default:
|
|
2334
|
-
r(
|
|
2335
|
-
r(
|
|
2234
|
+
default: a(() => [
|
|
2235
|
+
r(Ce),
|
|
2236
|
+
r(z, {
|
|
2336
2237
|
color: "green darken-1",
|
|
2337
2238
|
text: "",
|
|
2338
|
-
onClick:
|
|
2239
|
+
onClick: f[10] || (f[10] = (v) => t.deleteDocumentDialog = !1)
|
|
2339
2240
|
}, {
|
|
2340
|
-
default:
|
|
2341
|
-
|
|
2241
|
+
default: a(() => [
|
|
2242
|
+
w(x(t.selectedLang[o.lang].deleteDialog.cancel), 1)
|
|
2342
2243
|
]),
|
|
2343
2244
|
_: 1
|
|
2344
2245
|
}),
|
|
2345
|
-
r(
|
|
2246
|
+
r(z, {
|
|
2346
2247
|
color: "primary",
|
|
2347
2248
|
disabled: t.btnLoader,
|
|
2348
2249
|
loading: t.btnLoader,
|
|
2349
|
-
onClick:
|
|
2250
|
+
onClick: U
|
|
2350
2251
|
}, {
|
|
2351
|
-
default:
|
|
2352
|
-
|
|
2252
|
+
default: a(() => [
|
|
2253
|
+
w(x(t.selectedLang[o.lang].delete), 1)
|
|
2353
2254
|
]),
|
|
2354
2255
|
_: 1
|
|
2355
2256
|
}, 8, ["disabled", "loading"])
|
|
@@ -2370,38 +2271,38 @@ const ye = /* @__PURE__ */ te({
|
|
|
2370
2271
|
});
|
|
2371
2272
|
};
|
|
2372
2273
|
}
|
|
2373
|
-
}),
|
|
2374
|
-
ThumbnailUploader:
|
|
2375
|
-
TableUploader:
|
|
2376
|
-
SimpleUploader:
|
|
2377
|
-
HandyUploader:
|
|
2378
|
-
InsertButton:
|
|
2379
|
-
SelectFileIconType:
|
|
2274
|
+
}), At = {
|
|
2275
|
+
ThumbnailUploader: ge,
|
|
2276
|
+
TableUploader: he,
|
|
2277
|
+
SimpleUploader: ve,
|
|
2278
|
+
HandyUploader: De,
|
|
2279
|
+
InsertButton: be,
|
|
2280
|
+
SelectFileIconType: ie
|
|
2380
2281
|
};
|
|
2381
|
-
function
|
|
2382
|
-
|
|
2282
|
+
function wt(o) {
|
|
2283
|
+
o.component("ThumbnailUploader", ge), o.component("TableUploader", he), o.component("SimpleUploader", ve), o.component("HandyUploader", De), o.component("InsertButton", be), o.component("SelectFileIconType", ie);
|
|
2383
2284
|
}
|
|
2384
|
-
typeof window < "u" && window.Vue &&
|
|
2285
|
+
typeof window < "u" && window.Vue && wt(window.Vue);
|
|
2385
2286
|
export {
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2287
|
+
De as HandyUploader,
|
|
2288
|
+
be as InsertButton,
|
|
2289
|
+
ie as SelectFileIconType,
|
|
2290
|
+
ve as SimpleUploader,
|
|
2291
|
+
he as TableUploader,
|
|
2292
|
+
ge as ThumbnailUploader,
|
|
2293
|
+
Ie as compressImage,
|
|
2294
|
+
Se as constructImageDataUrl,
|
|
2295
|
+
At as default,
|
|
2296
|
+
ye as fileToBase64,
|
|
2297
|
+
ce as formatFileSize,
|
|
2298
|
+
kt as getFileIcon,
|
|
2398
2299
|
re as getFileType,
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2300
|
+
Fe as getMimeTypeFromExtension,
|
|
2301
|
+
wt as install,
|
|
2302
|
+
pe as isImageFile,
|
|
2303
|
+
ct as languageData,
|
|
2304
|
+
Ct as useErrorHandler,
|
|
2305
|
+
Dt as useFileUpload,
|
|
2306
|
+
Be as validateFileCount,
|
|
2307
|
+
Ve as validateFileSize
|
|
2407
2308
|
};
|