@beeintel/batch-image 1.0.1 → 1.1.1
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/README.md +188 -184
- package/dist/chunks/{AdjustToolPanel-BELqYSUR.js → AdjustToolPanel-BEqQFYEO.js} +30 -29
- package/dist/chunks/BackgroundToolPanel-Dw3uT7S-.js +43 -0
- package/dist/chunks/{BatchMaterials-niGKrga3.js → BatchMaterials-HiK3VQc3.js} +1 -1
- package/dist/chunks/BatchModeChoices-BAslK92y.js +118 -0
- package/dist/chunks/{BatchOutputColorPicker-CCvmIF-b.js → BatchOutputColorPicker-CgtnQBA3.js} +1 -1
- package/dist/chunks/BatchReferenceFields-DbjXtKC4.js +308 -0
- package/dist/chunks/BeautifyToolPanel-imF6jnTG.js +220 -0
- package/dist/chunks/{BrandMarkToolPanel-FKxXth_3.js → BrandMarkToolPanel-C-gouhaT.js} +319 -333
- package/dist/chunks/{ContentTrimControl-BQfigZPq.js → ContentTrimControl-LgNIZbXa.js} +2 -2
- package/dist/chunks/{CropToolPanel-BhSuHkYm.js → CropToolPanel-DsPgFUWI.js} +60 -56
- package/dist/chunks/CutoutToolPanel-BhJngz89.js +78 -0
- package/dist/chunks/DisclosureToolPanel-DOaWm-im.js +72 -0
- package/dist/chunks/ExpandToolPanel-CuufFNiC.js +69 -0
- package/dist/chunks/{ImageEffectsToolPanel-BRLPIt4q.js → ImageEffectsToolPanel-BsfBZdYp.js} +63 -52
- package/dist/chunks/{IpAuditToolPanel-DfY-mBSe.js → IpAuditToolPanel-DOB7TEoI.js} +15 -13
- package/dist/chunks/{ListingToolPanel-B9Yh3LBK.js → ListingToolPanel-Dapetiw-.js} +170 -184
- package/dist/chunks/{MaterialSelectionPlate-DhioUjdW.js → MaterialSelectionPlate-BjNttUh8.js} +4 -4
- package/dist/chunks/MetadataToolPanel-G56L-VTi.js +116 -0
- package/dist/chunks/{OrientToolPanel-BTrwaWBm.js → OrientToolPanel-BJHfMixX.js} +3 -3
- package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-DI8W37RA.js +122 -0
- package/dist/chunks/ResizeToolPanel-HDDArzWx.js +1171 -0
- package/dist/chunks/RetouchToolPanel-Drei3Dj7.js +358 -0
- package/dist/chunks/ShadowToolPanel-BM5MRfYB.js +258 -0
- package/dist/chunks/SvgExportToolPanel-D3KNi5AS.js +208 -0
- package/dist/chunks/TranslationToolPanel-DbNO3IKA.js +104 -0
- package/dist/chunks/{UpscaleToolPanel-D0H-j2Tr.js → UpscaleToolPanel-5kT1uUl0.js} +44 -39
- package/dist/chunks/arrow-up-DT1zSe8a.js +18 -0
- package/dist/chunks/{engine-D-T-1RSx.js → engine-BZ0nkcqj.js} +1 -1
- package/dist/chunks/{entry-DK9FjQZ_.js → entry-FNjvjYxd.js} +7512 -7395
- package/dist/chunks/{hosted-resources-COzZ7nZY.js → hosted-resources-C3iu_zn4.js} +2 -2
- package/dist/chunks/{loader-circle-UFoEem2a.js → loader-circle-pki8gM3_.js} +1 -1
- package/dist/chunks/{motionFeatures-D4miwXxc.js → motionFeatures-Cp11tdeb.js} +1 -1
- package/dist/chunks/{search-BjTSm1KS.js → search-BNwQCPna.js} +1 -1
- package/dist/chunks/{standard-cutout-vPpP6xBc.js → standard-cutout-iIOMfl6q.js} +1 -1
- package/dist/chunks/{static-logo-2F9ORZWc.js → static-logo-7HK4ubmZ.js} +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/dist/processing.js +3 -3
- package/dist/resources.json +113 -103
- package/dist/slots.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/tool-links.d.ts +10 -0
- package/dist/types/batch/public/config.d.ts +6 -0
- package/package.json +95 -95
- package/dist/chunks/BackgroundToolPanel-Dy_l8KFl.js +0 -41
- package/dist/chunks/BatchModeChoices-BRqn6zNI.js +0 -111
- package/dist/chunks/BatchReferenceFields-C4t7OSTw.js +0 -316
- package/dist/chunks/BeautifyToolPanel-Dc-ddaBC.js +0 -215
- package/dist/chunks/CutoutToolPanel-BfaZZSE_.js +0 -73
- package/dist/chunks/DisclosureToolPanel-B_oc5fld.js +0 -76
- package/dist/chunks/ExpandToolPanel-D_ZODTUZ.js +0 -67
- package/dist/chunks/MetadataToolPanel-KVrtb3K0.js +0 -104
- package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js +0 -102
- package/dist/chunks/ResizeToolPanel-Ch_-WR74.js +0 -1178
- package/dist/chunks/RetouchToolPanel-BTS33Dsd.js +0 -350
- package/dist/chunks/ShadowToolPanel-DxJE4eyV.js +0 -254
- package/dist/chunks/SvgExportToolPanel-RHmuQARH.js +0 -219
- package/dist/chunks/TranslationToolPanel-B_qTA1hM.js +0 -125
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, inject as ee, ref as R, computed as P, watch as B, onUnmounted as ae, openBlock as m, createElementBlock as v, unref as a, normalizeClass as te, createElementVNode as n, toDisplayString as u, Fragment as T, renderList as A, createCommentVNode as y, createVNode as V, createTextVNode as L, nextTick as M } from "vue";
|
|
2
|
-
import { J as S, aQ as le, F as re, aa as ne, aR as oe, aw as se, aj as ce, ah as ie, ay as ue, _ as de } from "./entry-DK9FjQZ_.js";
|
|
3
|
-
import { L as fe } from "./loader-circle-UFoEem2a.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license @lucide/vue v1.47.0 - ISC
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the ISC license.
|
|
8
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
const me = {
|
|
11
|
-
name: "arrow-down",
|
|
12
|
-
size: 24,
|
|
13
|
-
node: [
|
|
14
|
-
["path", { d: "M12 5v14", key: "s699le" }],
|
|
15
|
-
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
16
|
-
]
|
|
17
|
-
}, ve = S(me);
|
|
18
|
-
/**
|
|
19
|
-
* @license @lucide/vue v1.47.0 - ISC
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the ISC license.
|
|
22
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/
|
|
24
|
-
const be = {
|
|
25
|
-
name: "arrow-up",
|
|
26
|
-
size: 24,
|
|
27
|
-
node: [
|
|
28
|
-
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
29
|
-
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
30
|
-
]
|
|
31
|
-
}, pe = S(be), he = ["aria-label"], ge = { class: "retouch-reference-heading" }, we = { class: "hint" }, ye = ["aria-label", "disabled"], ke = { class: "retouch-reference-list" }, Fe = { class: "retouch-reference-title" }, Re = ["src", "alt"], Ve = { class: "reference-number" }, _e = ["aria-label", "disabled", "onClick"], Ce = ["title"], Le = { class: "reference-settings" }, Ue = { class: "reference-order" }, Ie = ["aria-label", "disabled", "onClick"], Ee = ["aria-label", "disabled", "onClick"], Ne = { key: 0 }, Oe = ["aria-label", "value", "disabled", "onChange"], $e = { value: "" }, ze = ["value"], De = ["aria-label", "value", "disabled", "placeholder", "onInput"], je = {
|
|
32
|
-
key: 0,
|
|
33
|
-
class: "reference-pending",
|
|
34
|
-
role: "status"
|
|
35
|
-
}, Pe = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "reference-add"
|
|
38
|
-
}, Be = ["aria-label", "disabled"], Te = { class: "reference-upload-copy" }, Ae = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "tool-note",
|
|
41
|
-
role: "alert"
|
|
42
|
-
}, Me = ["aria-label", "disabled"], Se = {
|
|
43
|
-
key: 1,
|
|
44
|
-
role: "alert",
|
|
45
|
-
class: "retouch-error"
|
|
46
|
-
}, qe = /* @__PURE__ */ x({
|
|
47
|
-
__name: "BatchReferenceFields",
|
|
48
|
-
props: {
|
|
49
|
-
modelValue: {},
|
|
50
|
-
writer: { type: Boolean },
|
|
51
|
-
candidates: { default: () => [] },
|
|
52
|
-
roles: { default: () => [] },
|
|
53
|
-
defaultRoleLabel: { default: "" },
|
|
54
|
-
maxCount: { default: le },
|
|
55
|
-
title: { default: "共用参考图" },
|
|
56
|
-
description: { default: "整批共用同一组。每张待改图为图 1,参考依顺序为图 2–11;用途可选,具体修改以文字要求为准。" },
|
|
57
|
-
numberOffset: { default: 2 },
|
|
58
|
-
uploadLabel: { default: "上传参考图" },
|
|
59
|
-
confirmLabel: { default: "确认当前参考集合" },
|
|
60
|
-
purposePlaceholder: { default: "例如:只参考颜色,不复制商品" }
|
|
61
|
-
},
|
|
62
|
-
emits: ["update:modelValue", "busy"],
|
|
63
|
-
setup(t, { emit: q }) {
|
|
64
|
-
const { ui: i, uiText: f } = re(), { uploadLocal: W } = ne(), X = ee(
|
|
65
|
-
oe,
|
|
66
|
-
(e) => W(e, e.name)
|
|
67
|
-
), o = t, I = q, H = se(() => o.modelValue.references), E = R(), d = R(0), p = R(""), J = P(() => p.value ? i({
|
|
68
|
-
capacity: "common.referenceFields_5f066788",
|
|
69
|
-
format: "common.referenceFields_7bf5d70a",
|
|
70
|
-
upload: "common.referenceFields_dc2e4820"
|
|
71
|
-
}[p.value], {
|
|
72
|
-
p0: p.value === "capacity" ? o.maxCount : f(o.title)
|
|
73
|
-
}) : ""), _ = R(!1), h = R(/* @__PURE__ */ new Map());
|
|
74
|
-
let w = !1, k = 0;
|
|
75
|
-
const F = (e) => `${e.assetId}:${e.assetVersionId}`, C = P(
|
|
76
|
-
() => Math.max(0, o.maxCount - o.modelValue.references.length - d.value)
|
|
77
|
-
);
|
|
78
|
-
B(d, (e) => I("busy", e > 0), { immediate: !0 }), B(
|
|
79
|
-
() => o.writer,
|
|
80
|
-
(e) => {
|
|
81
|
-
e || k++;
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
function g(e) {
|
|
85
|
-
!o.writer || w || I("update:modelValue", {
|
|
86
|
-
references: o.modelValue.references,
|
|
87
|
-
referenceUploadNeedsReview: o.modelValue.referenceUploadNeedsReview,
|
|
88
|
-
...e
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function N(e, s) {
|
|
92
|
-
g({
|
|
93
|
-
references: o.modelValue.references.map(
|
|
94
|
-
(l, r) => r === e ? { ...l, ...s } : l
|
|
95
|
-
)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function O(e, s) {
|
|
99
|
-
const l = [...o.modelValue.references], r = e + s;
|
|
100
|
-
r < 0 || r >= l.length || ([l[e], l[r]] = [l[r], l[e]], g({ references: l }));
|
|
101
|
-
}
|
|
102
|
-
function K(e) {
|
|
103
|
-
if (!o.writer) return;
|
|
104
|
-
const s = o.modelValue.references[e];
|
|
105
|
-
if (!s) return;
|
|
106
|
-
const l = F(s), r = h.value.get(l);
|
|
107
|
-
o.modelValue.references.some((c, b) => b !== e && F(c) === l) || (r && URL.revokeObjectURL(r), h.value.delete(l)), g({ references: o.modelValue.references.filter((c, b) => b !== e) });
|
|
108
|
-
}
|
|
109
|
-
function $(e) {
|
|
110
|
-
return H.get(e) || h.value.get(F(e)) || "";
|
|
111
|
-
}
|
|
112
|
-
async function Q(e) {
|
|
113
|
-
const s = e.target, l = [...s.files ?? []];
|
|
114
|
-
s.value = "", await U(l);
|
|
115
|
-
}
|
|
116
|
-
function G(e) {
|
|
117
|
-
e.dataTransfer?.types.includes("Files") && (e.preventDefault(), e.stopPropagation(), _.value = o.writer && !d.value && !!C.value);
|
|
118
|
-
}
|
|
119
|
-
async function Y(e) {
|
|
120
|
-
e.dataTransfer?.types.includes("Files") && (e.preventDefault(), e.stopPropagation(), _.value = !1, await U([...e.dataTransfer.files ?? []]));
|
|
121
|
-
}
|
|
122
|
-
function Z(e) {
|
|
123
|
-
const s = ue(e);
|
|
124
|
-
s.length && (e.preventDefault(), e.stopPropagation(), U(s));
|
|
125
|
-
}
|
|
126
|
-
async function U(e) {
|
|
127
|
-
if (!e.length || !o.writer || d.value) return;
|
|
128
|
-
if (p.value = "", e.length > C.value) {
|
|
129
|
-
p.value = "capacity";
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (e.some(
|
|
133
|
-
(c) => !["image/png", "image/jpeg", "image/webp"].includes(c.type) || !c.size || c.size > 25 * 1024 * 1024
|
|
134
|
-
)) {
|
|
135
|
-
p.value = "format";
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
const s = !!o.modelValue.referenceUploadNeedsReview, l = k;
|
|
139
|
-
let r = !1;
|
|
140
|
-
g({ referenceUploadNeedsReview: !0 }), d.value = e.length;
|
|
141
|
-
try {
|
|
142
|
-
for (const c of e) {
|
|
143
|
-
if (w || !o.writer || l !== k) return;
|
|
144
|
-
try {
|
|
145
|
-
const b = await X(c);
|
|
146
|
-
if (w || !o.writer || l !== k) return;
|
|
147
|
-
if (!b.assetId || !b.assetVersionId || !/^[a-fA-F0-9]{64}$/.test(b.sha256))
|
|
148
|
-
throw new Error("Invalid upload receipt");
|
|
149
|
-
const z = {
|
|
150
|
-
assetId: b.assetId,
|
|
151
|
-
assetVersionId: b.assetVersionId,
|
|
152
|
-
sha256: b.sha256,
|
|
153
|
-
name: c.name
|
|
154
|
-
}, D = F(z), j = h.value.get(D);
|
|
155
|
-
j && URL.revokeObjectURL(j), h.value.set(D, URL.createObjectURL(c)), g({ references: [...o.modelValue.references, z] }), await M();
|
|
156
|
-
} catch {
|
|
157
|
-
r = !0, w || (p.value = "upload");
|
|
158
|
-
} finally {
|
|
159
|
-
d.value--;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
await M(), !w && o.writer && l === k && !r && !s && g({ referenceUploadNeedsReview: !1 });
|
|
163
|
-
} finally {
|
|
164
|
-
d.value = 0;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return ae(() => {
|
|
168
|
-
w = !0;
|
|
169
|
-
for (const e of h.value.values()) URL.revokeObjectURL(e);
|
|
170
|
-
h.value.clear();
|
|
171
|
-
}), (e, s) => (m(), v("section", {
|
|
172
|
-
tabindex: "0",
|
|
173
|
-
onPaste: Z,
|
|
174
|
-
class: te(["retouch-references", { dragging: _.value }]),
|
|
175
|
-
"aria-label": a(f)(t.title),
|
|
176
|
-
onDragover: G,
|
|
177
|
-
onDragleave: s[2] || (s[2] = (l) => _.value = !1),
|
|
178
|
-
onDrop: Y
|
|
179
|
-
}, [
|
|
180
|
-
n("div", ge, [
|
|
181
|
-
n("strong", null, u(a(f)(t.title)), 1),
|
|
182
|
-
n("span", null, u(t.modelValue.references.length) + " / " + u(t.maxCount), 1)
|
|
183
|
-
]),
|
|
184
|
-
n("p", we, u(a(f)(t.description)), 1),
|
|
185
|
-
n("input", {
|
|
186
|
-
ref_key: "fileInput",
|
|
187
|
-
ref: E,
|
|
188
|
-
type: "file",
|
|
189
|
-
accept: "image/png,image/jpeg,image/webp",
|
|
190
|
-
multiple: "",
|
|
191
|
-
class: "retouch-file-input",
|
|
192
|
-
"aria-label": a(f)(t.uploadLabel),
|
|
193
|
-
disabled: !t.writer || d.value > 0 || !C.value,
|
|
194
|
-
onChange: Q
|
|
195
|
-
}, null, 40, ye),
|
|
196
|
-
n("ol", ke, [
|
|
197
|
-
(m(!0), v(T, null, A(t.modelValue.references, (l, r) => (m(), v("li", {
|
|
198
|
-
key: `${F(l)}:${r}`,
|
|
199
|
-
class: "retouch-reference batch-reference"
|
|
200
|
-
}, [
|
|
201
|
-
n("div", Fe, [
|
|
202
|
-
$(l) ? (m(), v("img", {
|
|
203
|
-
key: 0,
|
|
204
|
-
src: $(l),
|
|
205
|
-
alt: l.name,
|
|
206
|
-
loading: "lazy"
|
|
207
|
-
}, null, 8, Re)) : y("", !0),
|
|
208
|
-
n("strong", Ve, u(a(i)("common.referenceFields_d7084142", { p0: r + t.numberOffset })), 1),
|
|
209
|
-
n("button", {
|
|
210
|
-
type: "button",
|
|
211
|
-
"aria-label": a(i)("common.referenceFields_405c85b2", { p0: r + t.numberOffset }),
|
|
212
|
-
disabled: !t.writer,
|
|
213
|
-
onClick: (c) => K(r)
|
|
214
|
-
}, [
|
|
215
|
-
V(a(ce), { size: 14 })
|
|
216
|
-
], 8, _e)
|
|
217
|
-
]),
|
|
218
|
-
n("small", {
|
|
219
|
-
class: "reference-name",
|
|
220
|
-
title: l.name
|
|
221
|
-
}, u(l.name), 9, Ce),
|
|
222
|
-
n("details", Le, [
|
|
223
|
-
n("summary", null, u(a(i)("common.referenceFields_75359a48")), 1),
|
|
224
|
-
n("div", Ue, [
|
|
225
|
-
n("button", {
|
|
226
|
-
type: "button",
|
|
227
|
-
"aria-label": a(i)("common.referenceFields_8aa5f1b3", { p0: r + t.numberOffset }),
|
|
228
|
-
disabled: !t.writer || r === 0 || d.value > 0,
|
|
229
|
-
onClick: (c) => O(r, -1)
|
|
230
|
-
}, [
|
|
231
|
-
V(a(pe), { size: 14 }),
|
|
232
|
-
L(u(a(i)("common.referenceFields_708c9687")), 1)
|
|
233
|
-
], 8, Ie),
|
|
234
|
-
n("button", {
|
|
235
|
-
type: "button",
|
|
236
|
-
"aria-label": a(i)("common.referenceFields_18e2d946", { p0: r + t.numberOffset }),
|
|
237
|
-
disabled: !t.writer || r === t.modelValue.references.length - 1 || d.value > 0,
|
|
238
|
-
onClick: (c) => O(r, 1)
|
|
239
|
-
}, [
|
|
240
|
-
V(a(ve), { size: 14 }),
|
|
241
|
-
L(u(a(i)("common.referenceFields_c0714215")), 1)
|
|
242
|
-
], 8, Ee)
|
|
243
|
-
]),
|
|
244
|
-
t.roles.length ? (m(), v("label", Ne, [
|
|
245
|
-
L(u(a(i)("common.referenceFields_76335454")), 1),
|
|
246
|
-
n("select", {
|
|
247
|
-
"aria-label": a(i)("common.referenceFields_1e100229", { p0: r + t.numberOffset }),
|
|
248
|
-
value: l.role ?? "",
|
|
249
|
-
disabled: !t.writer,
|
|
250
|
-
onChange: (c) => N(r, {
|
|
251
|
-
role: c.target.value || void 0
|
|
252
|
-
})
|
|
253
|
-
}, [
|
|
254
|
-
n("option", $e, u(t.defaultRoleLabel ? a(i)("common.referenceFields_0acbcb84", {
|
|
255
|
-
p0: a(f)(t.defaultRoleLabel)
|
|
256
|
-
}) : a(i)("common.referenceFields_f91a63a1")), 1),
|
|
257
|
-
(m(!0), v(T, null, A(t.roles, (c) => (m(), v("option", {
|
|
258
|
-
key: c.value,
|
|
259
|
-
value: c.value
|
|
260
|
-
}, u(a(f)(c.label)), 9, ze))), 128))
|
|
261
|
-
], 40, Oe)
|
|
262
|
-
])) : y("", !0),
|
|
263
|
-
n("label", null, [
|
|
264
|
-
L(u(a(i)("common.referenceFields_d59f7895")), 1),
|
|
265
|
-
n("input", {
|
|
266
|
-
"aria-label": a(i)("common.referenceFields_17d29b80", { p0: r + t.numberOffset }),
|
|
267
|
-
value: l.purpose,
|
|
268
|
-
disabled: !t.writer,
|
|
269
|
-
maxlength: "500",
|
|
270
|
-
placeholder: a(f)(t.purposePlaceholder),
|
|
271
|
-
onInput: (c) => N(r, { purpose: c.target.value })
|
|
272
|
-
}, null, 40, De)
|
|
273
|
-
])
|
|
274
|
-
])
|
|
275
|
-
]))), 128)),
|
|
276
|
-
d.value ? (m(), v("li", je, [
|
|
277
|
-
V(a(fe), { size: 22 }),
|
|
278
|
-
n("span", null, u(a(i)("common.referenceFields_d8690492", { p0: d.value })), 1)
|
|
279
|
-
])) : y("", !0),
|
|
280
|
-
!d.value && C.value ? (m(), v("li", Pe, [
|
|
281
|
-
n("button", {
|
|
282
|
-
type: "button",
|
|
283
|
-
class: "retouch-add-card",
|
|
284
|
-
"aria-label": a(i)("common.referenceFields_bdb86a11", { p0: a(f)(t.title) }),
|
|
285
|
-
disabled: !t.writer,
|
|
286
|
-
onClick: s[0] || (s[0] = (l) => E.value?.click())
|
|
287
|
-
}, [
|
|
288
|
-
V(a(ie), { size: 25 }),
|
|
289
|
-
n("span", Te, [
|
|
290
|
-
n("strong", null, u(a(i)("common.app_9f0d4e46")), 1),
|
|
291
|
-
n("small", null, u(a(i)("common.referenceFields_e4eea1f1")), 1)
|
|
292
|
-
])
|
|
293
|
-
], 8, Be)
|
|
294
|
-
])) : y("", !0)
|
|
295
|
-
]),
|
|
296
|
-
t.modelValue.referenceUploadNeedsReview && !d.value ? (m(), v("div", Ae, [
|
|
297
|
-
n("p", null, u(a(i)("common.referenceFields_20637ce7", {
|
|
298
|
-
p0: a(f)(t.title),
|
|
299
|
-
p1: t.modelValue.references.length
|
|
300
|
-
})), 1),
|
|
301
|
-
n("button", {
|
|
302
|
-
type: "button",
|
|
303
|
-
"aria-label": a(f)(t.confirmLabel),
|
|
304
|
-
disabled: !t.writer || d.value > 0,
|
|
305
|
-
onClick: s[1] || (s[1] = (l) => {
|
|
306
|
-
g({ referenceUploadNeedsReview: !1 }), p.value = "";
|
|
307
|
-
})
|
|
308
|
-
}, u(a(i)("common.referenceFields_850fe99f")), 9, Me)
|
|
309
|
-
])) : y("", !0),
|
|
310
|
-
p.value ? (m(), v("p", Se, u(J.value), 1)) : y("", !0)
|
|
311
|
-
], 42, he));
|
|
312
|
-
}
|
|
313
|
-
}), Je = /* @__PURE__ */ de(qe, [["__scopeId", "data-v-677a7f55"]]);
|
|
314
|
-
export {
|
|
315
|
-
Je as B
|
|
316
|
-
};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, ref as U, computed as v, watch as $, openBlock as u, createElementBlock as b, createTextVNode as k, toDisplayString as n, unref as e, createElementVNode as s, Fragment as I, renderList as z, createCommentVNode as m, createBlock as h, createVNode as F, withCtx as N } from "vue";
|
|
2
|
-
import { F as G, aN as R, aO as A, aP as Y, aA as x, _ as j, G as H } from "./entry-DK9FjQZ_.js";
|
|
3
|
-
import { B as E } from "./BatchReferenceFields-C4t7OSTw.js";
|
|
4
|
-
import { B as M } from "./BatchModeChoices-BRqn6zNI.js";
|
|
5
|
-
import { u as J, a as K, b as C, _ as Q } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js";
|
|
6
|
-
const W = { class: "beautification-fields tool-fields" }, X = { key: 0 }, Z = ["aria-label", "value", "disabled"], _ = ["value", "disabled"], ee = { class: "hint" }, ae = { class: "tool-note" }, te = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "hint"
|
|
9
|
-
}, le = ["aria-label", "value", "disabled", "placeholder"], oe = {
|
|
10
|
-
key: 4,
|
|
11
|
-
class: "hint",
|
|
12
|
-
role: "alert"
|
|
13
|
-
}, ie = { class: "tool-note" }, de = /* @__PURE__ */ T({
|
|
14
|
-
__name: "BeautificationFields",
|
|
15
|
-
props: {
|
|
16
|
-
modelValue: {},
|
|
17
|
-
writer: { type: Boolean },
|
|
18
|
-
available: { type: Boolean, default: !0 },
|
|
19
|
-
candidates: { default: () => [] },
|
|
20
|
-
beautificationModes: { default: () => [] },
|
|
21
|
-
fixedMode: {}
|
|
22
|
-
},
|
|
23
|
-
emits: ["update:modelValue", "ready"],
|
|
24
|
-
setup(a, { emit: w }) {
|
|
25
|
-
const { ui: t, uiText: y, uiNotice: B } = G(), d = a, g = w, r = U(!1), V = U(!1), P = v(
|
|
26
|
-
() => R.find((o) => o.value === d.modelValue.mode)
|
|
27
|
-
), O = v(
|
|
28
|
-
() => A.find((o) => o.value === P.value?.role)?.label ?? ""
|
|
29
|
-
), c = v(
|
|
30
|
-
() => d.modelValue.mode === "staging" && d.modelValue.stagingMode === "shared_product"
|
|
31
|
-
), S = v(() => ({
|
|
32
|
-
references: d.modelValue.productImages ?? [],
|
|
33
|
-
referenceUploadNeedsReview: d.modelValue.productUploadNeedsReview
|
|
34
|
-
})), p = v(() => {
|
|
35
|
-
try {
|
|
36
|
-
return Y(d.modelValue, d.beautificationModes), "";
|
|
37
|
-
} catch (o) {
|
|
38
|
-
return o.message;
|
|
39
|
-
}
|
|
40
|
-
}), D = v(
|
|
41
|
-
() => d.writer && d.available && !r.value && !V.value && !p.value
|
|
42
|
-
);
|
|
43
|
-
$(D, (o) => g("ready", o), { immediate: !0 });
|
|
44
|
-
function f(o) {
|
|
45
|
-
d.writer && g("update:modelValue", { ...d.modelValue, ...o });
|
|
46
|
-
}
|
|
47
|
-
function L(o) {
|
|
48
|
-
f(o);
|
|
49
|
-
}
|
|
50
|
-
function q(o) {
|
|
51
|
-
f({
|
|
52
|
-
productImages: o.references,
|
|
53
|
-
productUploadNeedsReview: o.referenceUploadNeedsReview
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return (o, i) => (u(), b("div", W, [
|
|
57
|
-
a.fixedMode ? m("", !0) : (u(), b("label", X, [
|
|
58
|
-
k(n(e(t)("tools.beautify.beautificationFields_ee800328")), 1),
|
|
59
|
-
s("select", {
|
|
60
|
-
"aria-label": e(t)("tools.beautify.beautificationFields_ee800328"),
|
|
61
|
-
value: a.modelValue.mode,
|
|
62
|
-
disabled: !a.writer,
|
|
63
|
-
onChange: i[0] || (i[0] = (l) => f({ mode: l.target.value }))
|
|
64
|
-
}, [
|
|
65
|
-
(u(!0), b(I, null, z(e(R), (l) => (u(), b("option", {
|
|
66
|
-
key: l.value,
|
|
67
|
-
value: l.value,
|
|
68
|
-
disabled: !a.beautificationModes.includes(l.value)
|
|
69
|
-
}, n(e(y)(l.label)) + n(a.beautificationModes.includes(l.value) ? "" : e(t)("common.toolPanel_14a718cd")), 9, _))), 128))
|
|
70
|
-
], 40, Z)
|
|
71
|
-
])),
|
|
72
|
-
s("p", ee, n(e(y)(P.value?.description)), 1),
|
|
73
|
-
a.modelValue.mode === "ghost" ? (u(), h(M, {
|
|
74
|
-
key: 1,
|
|
75
|
-
label: e(t)("tools.beautify.beautificationFields_9aaa3a96"),
|
|
76
|
-
"model-value": a.modelValue.viewAngle ?? "front",
|
|
77
|
-
disabled: !a.writer || !a.available,
|
|
78
|
-
options: [
|
|
79
|
-
{
|
|
80
|
-
value: "front",
|
|
81
|
-
label: e(t)("tools.beautify.nested_740f5e81"),
|
|
82
|
-
image: e(x)("mode-cards-v3/ghost-front.webp")
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
value: "three_quarter",
|
|
86
|
-
label: e(t)("tools.beautify.nested_b81b0bc4"),
|
|
87
|
-
image: e(x)("mode-cards-v3/ghost-three-quarter.webp")
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"onUpdate:modelValue": i[1] || (i[1] = (l) => f({ viewAngle: l }))
|
|
91
|
-
}, null, 8, ["label", "model-value", "disabled", "options"])) : m("", !0),
|
|
92
|
-
a.modelValue.mode === "flatlay" ? (u(), h(M, {
|
|
93
|
-
key: 2,
|
|
94
|
-
label: e(t)("tools.beautify.beautificationFields_bf266893"),
|
|
95
|
-
"model-value": a.modelValue.arrangement ?? "natural",
|
|
96
|
-
disabled: !a.writer || !a.available,
|
|
97
|
-
options: [
|
|
98
|
-
{
|
|
99
|
-
value: "natural",
|
|
100
|
-
label: e(t)("tools.beautify.nested_ff6b653a"),
|
|
101
|
-
image: e(x)("mode-cards-v3/flatlay-open.webp")
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
value: "sleeves_in",
|
|
105
|
-
label: e(t)("tools.beautify.nested_d2b60c60"),
|
|
106
|
-
image: e(x)("mode-cards-v3/flatlay-fold.webp")
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"onUpdate:modelValue": i[2] || (i[2] = (l) => f({ arrangement: l }))
|
|
110
|
-
}, null, 8, ["label", "model-value", "disabled", "options"])) : m("", !0),
|
|
111
|
-
a.modelValue.mode === "staging" ? (u(), b(I, { key: 3 }, [
|
|
112
|
-
F(M, {
|
|
113
|
-
label: e(t)("tools.beautify.beautificationFields_422660c5"),
|
|
114
|
-
"model-value": a.modelValue.stagingMode ?? "shared_scene",
|
|
115
|
-
disabled: !a.writer || !a.available || V.value || r.value,
|
|
116
|
-
options: [
|
|
117
|
-
{
|
|
118
|
-
value: "shared_product",
|
|
119
|
-
label: e(t)("tools.beautify.nested_619f09ba"),
|
|
120
|
-
flow: "one-to-many"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
value: "shared_scene",
|
|
124
|
-
label: e(t)("tools.beautify.nested_e2351240"),
|
|
125
|
-
flow: "many-to-one"
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
|
-
"onUpdate:modelValue": i[3] || (i[3] = (l) => f({ stagingMode: l }))
|
|
129
|
-
}, null, 8, ["label", "model-value", "disabled", "options"]),
|
|
130
|
-
s("p", ae, n(c.value ? e(t)("tools.beautify.beautificationFields_c1417394") : e(t)("tools.beautify.beautificationFields_5456e3c8")), 1),
|
|
131
|
-
c.value ? (u(), h(E, {
|
|
132
|
-
key: "products",
|
|
133
|
-
"model-value": S.value,
|
|
134
|
-
writer: a.writer && !r.value,
|
|
135
|
-
candidates: a.candidates,
|
|
136
|
-
"max-count": Math.min(4, Math.max(0, 10 - a.modelValue.references.length)),
|
|
137
|
-
title: e(t)("tools.beautify.beautificationFields_d432b440"),
|
|
138
|
-
"purpose-placeholder": "例如:正面主图,另一张提供背面细节",
|
|
139
|
-
"upload-label": "上传商品图",
|
|
140
|
-
"confirm-label": "确认当前商品集合",
|
|
141
|
-
description: e(t)("tools.beautify.beautificationFields_4065f2d3"),
|
|
142
|
-
"onUpdate:modelValue": q,
|
|
143
|
-
onBusy: i[4] || (i[4] = (l) => V.value = l)
|
|
144
|
-
}, null, 8, ["model-value", "writer", "candidates", "max-count", "title", "description"])) : m("", !0),
|
|
145
|
-
!c.value && a.modelValue.productUploadNeedsReview ? (u(), b("p", te, n(e(t)("tools.beautify.beautificationFields_a4d4d704")), 1)) : m("", !0)
|
|
146
|
-
], 64)) : m("", !0),
|
|
147
|
-
s("details", null, [
|
|
148
|
-
s("summary", null, n(e(t)("common.toolPanel_40c2f529")), 1),
|
|
149
|
-
s("label", null, [
|
|
150
|
-
k(n(e(t)("tools.beautify.beautificationFields_2cd79953")), 1),
|
|
151
|
-
s("textarea", {
|
|
152
|
-
"aria-label": e(t)("tools.beautify.beautificationFields_e1274129"),
|
|
153
|
-
value: a.modelValue.instructions,
|
|
154
|
-
disabled: !a.writer,
|
|
155
|
-
maxlength: "8000",
|
|
156
|
-
rows: "3",
|
|
157
|
-
placeholder: e(t)("tools.beautify.beautificationFields_f1fbcc5d"),
|
|
158
|
-
onInput: i[5] || (i[5] = (l) => f({ instructions: l.target.value }))
|
|
159
|
-
}, null, 40, le)
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
F(E, {
|
|
163
|
-
key: "references",
|
|
164
|
-
"model-value": a.modelValue,
|
|
165
|
-
writer: a.writer && !V.value,
|
|
166
|
-
candidates: a.candidates,
|
|
167
|
-
roles: e(A),
|
|
168
|
-
"default-role-label": O.value,
|
|
169
|
-
"max-count": c.value ? Math.max(0, 10 - (a.modelValue.productImages?.length ?? 0)) : 10,
|
|
170
|
-
"number-offset": c.value ? 2 + (a.modelValue.productImages?.length ?? 0) : 2,
|
|
171
|
-
title: c.value ? e(t)("tools.beautify.beautificationFields_95a5b7ca") : e(t)("tools.beautify.beautificationFields_ba115652"),
|
|
172
|
-
description: c.value ? e(t)("tools.beautify.beautificationFields_359388b6") : e(t)("tools.beautify.beautificationFields_9d5eff9a"),
|
|
173
|
-
"onUpdate:modelValue": L,
|
|
174
|
-
onBusy: i[6] || (i[6] = (l) => r.value = l)
|
|
175
|
-
}, null, 8, ["model-value", "writer", "candidates", "roles", "default-role-label", "max-count", "number-offset", "title", "description"]),
|
|
176
|
-
p.value && !r.value && !V.value ? (u(), b("p", oe, n(e(B)(p.value)), 1)) : m("", !0),
|
|
177
|
-
s("p", ie, n(e(t)("tools.beautify.beautificationFields_154226a1")), 1)
|
|
178
|
-
]));
|
|
179
|
-
}
|
|
180
|
-
}), ue = /* @__PURE__ */ j(de, [["__scopeId", "data-v-3d736997"]]), be = /* @__PURE__ */ T({
|
|
181
|
-
__name: "BeautifyToolPanel",
|
|
182
|
-
props: {
|
|
183
|
-
context: {}
|
|
184
|
-
},
|
|
185
|
-
setup(a) {
|
|
186
|
-
const w = a, t = J(() => w.context), y = U(!1), B = K(() => w.context, "beautify");
|
|
187
|
-
return (d, g) => (u(), h(H, {
|
|
188
|
-
context: a.context,
|
|
189
|
-
layout: "contained"
|
|
190
|
-
}, {
|
|
191
|
-
actions: N(() => [
|
|
192
|
-
F(Q, {
|
|
193
|
-
context: a.context,
|
|
194
|
-
available: e(C)(a.context),
|
|
195
|
-
ready: y.value
|
|
196
|
-
}, null, 8, ["context", "available", "ready"])
|
|
197
|
-
]),
|
|
198
|
-
default: N(() => [
|
|
199
|
-
F(ue, {
|
|
200
|
-
"model-value": e(t).beautify,
|
|
201
|
-
writer: !a.context.readonly,
|
|
202
|
-
available: e(C)(a.context),
|
|
203
|
-
"beautification-modes": a.context.view.beautificationModes,
|
|
204
|
-
"fixed-mode": a.context.entryId ? e(t).beautify.mode : void 0,
|
|
205
|
-
"onUpdate:modelValue": e(B),
|
|
206
|
-
onReady: g[0] || (g[0] = (r) => y.value = r)
|
|
207
|
-
}, null, 8, ["model-value", "writer", "available", "beautification-modes", "fixed-mode", "onUpdate:modelValue"])
|
|
208
|
-
]),
|
|
209
|
-
_: 1
|
|
210
|
-
}, 8, ["context"]));
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
export {
|
|
214
|
-
be as default
|
|
215
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, useId as C, ref as g, computed as P, openBlock as c, createBlock as T, withCtx as x, createElementVNode as l, unref as t, createElementBlock as b, Fragment as y, renderList as k, toDisplayString as r, createVNode as s } from "vue";
|
|
2
|
-
import { F as D, G as h, a3 as B, _ as M } from "./entry-DK9FjQZ_.js";
|
|
3
|
-
import { u as w, _ as V } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js";
|
|
4
|
-
import { B as E } from "./BatchOutputColorPicker-CCvmIF-b.js";
|
|
5
|
-
import { C as I } from "./ContentTrimControl-BQfigZPq.js";
|
|
6
|
-
const U = ["disabled"], F = ["aria-label"], O = ["name", "value", "checked", "disabled", "onChange"], S = { class: "output-color-field" }, A = /* @__PURE__ */ p({
|
|
7
|
-
__name: "CutoutToolPanel",
|
|
8
|
-
props: {
|
|
9
|
-
context: {}
|
|
10
|
-
},
|
|
11
|
-
setup(o) {
|
|
12
|
-
const { ui: d, uiText: u } = D(), v = C(), m = o, n = w(() => m.context), f = g(!0), i = P(() => m.context.view.availableCutoutModes ?? ["isnet_fp16"]);
|
|
13
|
-
return (G, a) => (c(), T(h, { context: o.context }, {
|
|
14
|
-
actions: x(() => [
|
|
15
|
-
s(V, {
|
|
16
|
-
context: o.context,
|
|
17
|
-
available: i.value.includes(t(n).cutoutModel),
|
|
18
|
-
ready: f.value,
|
|
19
|
-
"unavailable-reason": o.context.view.aiAvailable === !1 ? void 0 : t(d)("common.toolPanel_d6b2b599")
|
|
20
|
-
}, null, 8, ["context", "available", "ready", "unavailable-reason"])
|
|
21
|
-
]),
|
|
22
|
-
default: x(() => [
|
|
23
|
-
l("fieldset", {
|
|
24
|
-
class: "tool-fields plugin-fields",
|
|
25
|
-
disabled: o.context.readonly
|
|
26
|
-
}, [
|
|
27
|
-
l("div", {
|
|
28
|
-
class: "mode-cards",
|
|
29
|
-
role: "radiogroup",
|
|
30
|
-
"aria-label": t(d)("common.toolPanel_4fcda57d")
|
|
31
|
-
}, [
|
|
32
|
-
(c(!0), b(y, null, k(t(B).filter((e) => o.context.modeAllowed?.(e.model) !== !1), (e) => (c(), b("label", {
|
|
33
|
-
class: "mode-card",
|
|
34
|
-
key: e.model
|
|
35
|
-
}, [
|
|
36
|
-
l("input", {
|
|
37
|
-
type: "radio",
|
|
38
|
-
name: t(v),
|
|
39
|
-
value: e.model,
|
|
40
|
-
checked: t(n).cutoutModel === e.model,
|
|
41
|
-
disabled: !i.value.includes(e.model),
|
|
42
|
-
onChange: (N) => o.context.updateDraft({ cutoutModel: e.model })
|
|
43
|
-
}, null, 40, O),
|
|
44
|
-
l("span", null, r(t(u)(e.label)) + r(i.value.includes(e.model) ? "" : t(d)("common.toolPanel_14a718cd")), 1)
|
|
45
|
-
]))), 128))
|
|
46
|
-
], 8, F),
|
|
47
|
-
l("div", S, [
|
|
48
|
-
l("span", null, r(t(d)("common.toolPanel_243779ee")), 1),
|
|
49
|
-
s(E, {
|
|
50
|
-
"model-value": t(n).outputColor,
|
|
51
|
-
disabled: o.context.readonly,
|
|
52
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) => o.context.updateDraft({ outputColor: e }))
|
|
53
|
-
}, null, 8, ["model-value", "disabled"])
|
|
54
|
-
]),
|
|
55
|
-
s(I, {
|
|
56
|
-
enabled: t(n).cutoutTrimTransparent === !0,
|
|
57
|
-
padding: t(n).cutoutTrimPadding ?? 0,
|
|
58
|
-
disabled: o.context.readonly,
|
|
59
|
-
source: o.context.view.currentImageSource,
|
|
60
|
-
help: t(u)("默认保留画布;开启后先裁透明边,再填底色,新增边距保持透明。") + " " + t(u)("预览当前图边距;抠图后的内容范围以实际结果为准。新增边距保持透明。"),
|
|
61
|
-
onEnabled: a[1] || (a[1] = (e) => o.context.updateDraft({ cutoutTrimTransparent: e })),
|
|
62
|
-
onPadding: a[2] || (a[2] = (e) => o.context.updateDraft({ cutoutTrimPadding: e })),
|
|
63
|
-
onValidity: a[3] || (a[3] = (e) => f.value = e)
|
|
64
|
-
}, null, 8, ["enabled", "padding", "disabled", "source", "help"])
|
|
65
|
-
], 8, U)
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["context"]));
|
|
69
|
-
}
|
|
70
|
-
}), H = /* @__PURE__ */ M(A, [["__scopeId", "data-v-40a534d4"]]);
|
|
71
|
-
export {
|
|
72
|
-
H as default
|
|
73
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, computed as d, useId as P, openBlock as a, createBlock as g, withCtx as v, createElementVNode as c, createElementBlock as s, toDisplayString as u, unref as e, createCommentVNode as m, Fragment as k, renderList as y, createTextVNode as w, createVNode as D } from "vue";
|
|
2
|
-
import { F as N, G as V, _ as C } from "./entry-DK9FjQZ_.js";
|
|
3
|
-
import { u as M, b as B, _ as I } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-C2kJCYeA.js";
|
|
4
|
-
const T = ["disabled"], F = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "disclosure-state",
|
|
7
|
-
role: "status"
|
|
8
|
-
}, A = { key: 0 }, E = ["aria-label"], G = ["name", "value", "checked", "onChange"], $ = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "hint"
|
|
11
|
-
}, L = {
|
|
12
|
-
key: 2,
|
|
13
|
-
class: "hint"
|
|
14
|
-
}, S = { key: 3 }, U = ["value"], j = /* @__PURE__ */ p({
|
|
15
|
-
__name: "DisclosureToolPanel",
|
|
16
|
-
props: {
|
|
17
|
-
context: {}
|
|
18
|
-
},
|
|
19
|
-
setup(l) {
|
|
20
|
-
const { ui: t, uiText: x } = N(), i = l, r = M(() => i.context), f = d(() => i.context.view.currentName), n = d(() => i.context.view.currentDisclosure), h = P(), b = d(() => r.value.disclosureMode === "manual" || B(i.context));
|
|
21
|
-
return (q, _) => (a(), g(V, { context: l.context }, {
|
|
22
|
-
actions: v(() => [
|
|
23
|
-
D(I, {
|
|
24
|
-
context: l.context,
|
|
25
|
-
available: b.value
|
|
26
|
-
}, null, 8, ["context", "available"])
|
|
27
|
-
]),
|
|
28
|
-
default: v(() => [
|
|
29
|
-
c("fieldset", {
|
|
30
|
-
class: "tool-fields plugin-fields",
|
|
31
|
-
disabled: l.context.readonly
|
|
32
|
-
}, [
|
|
33
|
-
n.value ? (a(), s("div", F, [
|
|
34
|
-
c("p", null, u(n.value?.status === "verified" ? n.value.method === "manual" ? e(t)("common.toolPanel_30447085") : e(t)("common.imageViewer_91b98855") : n.value?.status === "review" ? e(t)("common.imageViewer_7d383a32") : n.value?.status === "unchanged" ? e(t)("common.toolPanel_f9be9593") : f.value ? e(t)("common.toolPanel_3ec579b3") : e(t)("common.toolPanel_cb6df471")), 1),
|
|
35
|
-
n.value ? (a(), s("small", A, u(e(x)(n.value.reason)), 1)) : m("", !0)
|
|
36
|
-
])) : m("", !0),
|
|
37
|
-
c("div", {
|
|
38
|
-
class: "mode-cards",
|
|
39
|
-
role: "radiogroup",
|
|
40
|
-
"aria-label": e(t)("common.toolPanel_171d09fa")
|
|
41
|
-
}, [
|
|
42
|
-
(a(!0), s(k, null, y(["manual", "ai"].filter(
|
|
43
|
-
(o) => l.context.modeAllowed?.(o) !== !1
|
|
44
|
-
), (o) => (a(), s("label", {
|
|
45
|
-
key: o,
|
|
46
|
-
class: "mode-card"
|
|
47
|
-
}, [
|
|
48
|
-
c("input", {
|
|
49
|
-
type: "radio",
|
|
50
|
-
name: e(h),
|
|
51
|
-
value: o,
|
|
52
|
-
checked: e(r).disclosureMode === o,
|
|
53
|
-
onChange: (z) => l.context.updateDraft({ disclosureMode: o })
|
|
54
|
-
}, null, 40, G),
|
|
55
|
-
c("span", null, u(e(t)(o === "manual" ? "common.toolPanel_a88eb6b9" : "common.toolPanel_09794da0")), 1)
|
|
56
|
-
]))), 128))
|
|
57
|
-
], 8, E),
|
|
58
|
-
e(r).disclosureMode === "manual" ? (a(), s("p", $, u(e(t)("common.toolPanel_290eab0a")), 1)) : (a(), s("p", L, u(e(t)("common.toolPanel_2c0993e5")), 1)),
|
|
59
|
-
e(r).disclosureMode === "ai" ? (a(), s("label", S, [
|
|
60
|
-
w(u(e(t)("common.toolPanel_6d793364")), 1),
|
|
61
|
-
c("textarea", {
|
|
62
|
-
value: e(r).context,
|
|
63
|
-
maxlength: "2000",
|
|
64
|
-
rows: "3",
|
|
65
|
-
onInput: _[0] || (_[0] = (o) => l.context.updateDraft({ context: o.target.value }))
|
|
66
|
-
}, null, 40, U)
|
|
67
|
-
])) : m("", !0)
|
|
68
|
-
], 8, T)
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
}, 8, ["context"]));
|
|
72
|
-
}
|
|
73
|
-
}), O = /* @__PURE__ */ C(j, [["__scopeId", "data-v-e564a010"]]);
|
|
74
|
-
export {
|
|
75
|
-
O as default
|
|
76
|
-
};
|