@rslsp1/fa-app-tools 5.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-TW4IDHAN.mjs → chunk-GHKN2VX3.mjs} +1868 -821
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2271 -1239
- package/dist/index.mjs +3 -3
- package/dist/szenen.d.mts +203 -2
- package/dist/szenen.d.ts +203 -2
- package/dist/szenen.js +1996 -899
- package/dist/szenen.mjs +63 -3
- package/package.json +1 -1
package/dist/szenen.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(szenen_exports, {
|
|
|
36
36
|
CHAIN_LINK_FIELDS: () => CHAIN_LINK_FIELDS,
|
|
37
37
|
CapabilityAnchorError: () => CapabilityAnchorError,
|
|
38
38
|
ContractViolation: () => ContractViolation,
|
|
39
|
+
DEFAULT_SEED_VORLAGE: () => DEFAULT_SEED_VORLAGE,
|
|
39
40
|
DERIVABLE_TYPES: () => DERIVABLE_TYPES,
|
|
40
41
|
ELEMENT_VERSION_SCHEMA_FILE: () => ELEMENT_VERSION_SCHEMA_FILE,
|
|
41
42
|
FLOW_EXECUTION_PATH: () => FLOW_EXECUTION_PATH,
|
|
@@ -55,6 +56,7 @@ __export(szenen_exports, {
|
|
|
55
56
|
SZENEN_SCHEMAS: () => SZENEN_SCHEMAS,
|
|
56
57
|
SzenenView: () => SzenenView,
|
|
57
58
|
UNCHECKED_PUBLISH_RULES: () => UNCHECKED_PUBLISH_RULES,
|
|
59
|
+
UPLOAD_MAX_BYTES: () => UPLOAD_MAX_BYTES,
|
|
58
60
|
UnsupportedSchemaError: () => UnsupportedSchemaError,
|
|
59
61
|
VersionDagError: () => VersionDagError,
|
|
60
62
|
areasFor: () => areasFor,
|
|
@@ -143,8 +145,10 @@ __export(szenen_exports, {
|
|
|
143
145
|
findSceneDerivationRecovery: () => findSceneDerivationRecovery,
|
|
144
146
|
firstError: () => firstError,
|
|
145
147
|
formatSchemaErrors: () => formatSchemaErrors,
|
|
148
|
+
formatSeedListe: () => formatSeedListe,
|
|
146
149
|
freezeDraftChain: () => freezeDraftChain,
|
|
147
150
|
freezeSceneWorkingState: () => freezeSceneWorkingState,
|
|
151
|
+
gesamtHerkunft: () => gesamtHerkunft,
|
|
148
152
|
getSzenenSchemas: () => getSzenenSchemas,
|
|
149
153
|
gruppiereZuItems: () => gruppiereZuItems,
|
|
150
154
|
hasPlacementCapability: () => hasPlacementCapability,
|
|
@@ -152,16 +156,21 @@ __export(szenen_exports, {
|
|
|
152
156
|
isOk: () => isOk,
|
|
153
157
|
isProjectionCurrent: () => isProjectionCurrent,
|
|
154
158
|
isSzenenItemId: () => isSzenenItemId,
|
|
159
|
+
istZipDatei: () => istZipDatei,
|
|
155
160
|
itemIdForRun: () => itemIdForRun,
|
|
156
161
|
ladeVorschauen: () => ladeVorschauen,
|
|
162
|
+
leseBilderAusZip: () => leseBilderAusZip,
|
|
157
163
|
linkFor: () => linkFor,
|
|
158
164
|
locatorTeile: () => locatorTeile,
|
|
159
165
|
logRevisionOf: () => logRevisionOf,
|
|
160
166
|
mergeSzenenBatchOrigin: () => mergeSzenenBatchOrigin,
|
|
167
|
+
mitDefaultVorlage: () => mitDefaultVorlage,
|
|
161
168
|
noticeFor: () => noticeFor,
|
|
162
169
|
ordersForPromptRun: () => ordersForPromptRun,
|
|
170
|
+
ordneSeedsZu: () => ordneSeedsZu,
|
|
163
171
|
parseDerivationResponse: () => parseDerivationResponse,
|
|
164
172
|
parseRunResponse: () => parseRunResponse,
|
|
173
|
+
parseSeedListe: () => parseSeedListe,
|
|
165
174
|
preferredHeadRevisionOf: () => preferredHeadRevisionOf,
|
|
166
175
|
preferredVersionId: () => preferredVersionId,
|
|
167
176
|
promptDiagnosticsOf: () => promptDiagnosticsOf,
|
|
@@ -185,6 +194,7 @@ __export(szenen_exports, {
|
|
|
185
194
|
runStoreDifferential: () => runStoreDifferential,
|
|
186
195
|
sceneOnlyCapabilities: () => sceneOnlyCapabilities,
|
|
187
196
|
scopeOfPath: () => scopeOfPath,
|
|
197
|
+
seedFehlerText: () => seedFehlerText,
|
|
188
198
|
selectableTargetModels: () => selectableTargetModels,
|
|
189
199
|
showChain: () => showChain,
|
|
190
200
|
simulatedAnswerFor: () => simulatedAnswerFor,
|
|
@@ -310,15 +320,15 @@ function resolveRef(ref, baseId, schemas) {
|
|
|
310
320
|
const target = hash === -1 ? ref : ref.slice(0, hash);
|
|
311
321
|
const pointer = hash === -1 ? "" : ref.slice(hash + 1);
|
|
312
322
|
const documentId = target === "" ? baseId : new URL(target, baseId).href;
|
|
313
|
-
const
|
|
314
|
-
if (!
|
|
323
|
+
const document2 = schemas.byId.get(documentId);
|
|
324
|
+
if (!document2) {
|
|
315
325
|
throw new UnsupportedSchemaError(`Referenz "${ref}" zeigt auf unbekanntes Schema ${documentId}.`);
|
|
316
326
|
}
|
|
317
|
-
if (pointer === "" || pointer === "/") return { schema:
|
|
327
|
+
if (pointer === "" || pointer === "/") return { schema: document2, baseId: documentId };
|
|
318
328
|
if (!pointer.startsWith("/")) {
|
|
319
329
|
throw new UnsupportedSchemaError(`Referenz "${ref}": nur JSON-Pointer werden aufgeloest.`);
|
|
320
330
|
}
|
|
321
|
-
let node =
|
|
331
|
+
let node = document2;
|
|
322
332
|
for (const rawSegment of pointer.slice(1).split("/")) {
|
|
323
333
|
const segment = unescapePointer(rawSegment);
|
|
324
334
|
if (!isObject(node) || !(segment in node)) {
|
|
@@ -10459,6 +10469,7 @@ async function ladeVorschauen(port, mediaRefs, fertig, optionen = {}) {
|
|
|
10459
10469
|
const ergebnis = await laden.call(port, ref);
|
|
10460
10470
|
if (lauf?.abgebrochen) return;
|
|
10461
10471
|
if (ergebnis.kind === "ok") fertig(ref, ergebnis.value);
|
|
10472
|
+
else optionen.gescheitert?.(ref, ergebnis.message);
|
|
10462
10473
|
}
|
|
10463
10474
|
}
|
|
10464
10475
|
await Promise.all(
|
|
@@ -10466,23 +10477,94 @@ async function ladeVorschauen(port, mediaRefs, fertig, optionen = {}) {
|
|
|
10466
10477
|
);
|
|
10467
10478
|
}
|
|
10468
10479
|
|
|
10480
|
+
// src/lib/szenen/imageBatchStore.ts
|
|
10481
|
+
var istText5 = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
10482
|
+
function alsBilder(rohe, generationBatchId) {
|
|
10483
|
+
if (!Array.isArray(rohe)) return [];
|
|
10484
|
+
return rohe.filter((b) => !!b && typeof b === "object").filter((b) => istText5(b.media_ref) && typeof b.position === "number").map((b) => ({
|
|
10485
|
+
media_ref: b.media_ref,
|
|
10486
|
+
position: b.position,
|
|
10487
|
+
// Welcher Provideraufruf dieses Bild geliefert hat (§8) — aus dem
|
|
10488
|
+
// Ereignis, in dem es steht, nicht aus seiner Position abgeleitet.
|
|
10489
|
+
generation_batch_id: generationBatchId,
|
|
10490
|
+
...istText5(b.asset_id) ? { asset_id: b.asset_id } : {},
|
|
10491
|
+
// Der bestätigte MIME-Typ (Review 2026-08-18 §5 P2) muss durch das
|
|
10492
|
+
// Rücklesen hindurch: Genau hier braucht ihn der Lesepfad, um den
|
|
10493
|
+
// Dateipfad `images/<id>.<ext>` zu bilden, statt ihn zu erraten. Nur
|
|
10494
|
+
// gesetzt, wenn er im Ereignis steht — ältere Batches tragen ihn nicht.
|
|
10495
|
+
...istText5(b.mime_type) ? { mime_type: b.mime_type } : {},
|
|
10496
|
+
model: b.model ?? null,
|
|
10497
|
+
seed: b.seed ?? null,
|
|
10498
|
+
width: b.width ?? null,
|
|
10499
|
+
height: b.height ?? null
|
|
10500
|
+
}));
|
|
10501
|
+
}
|
|
10502
|
+
function gesamtHerkunft(origins) {
|
|
10503
|
+
const vertreten = new Set(origins.map((o) => o.source_kind));
|
|
10504
|
+
if (vertreten.size === 1) return [...vertreten][0];
|
|
10505
|
+
return "mixed";
|
|
10506
|
+
}
|
|
10507
|
+
function collectImageBatches(events) {
|
|
10508
|
+
const byItemId = /* @__PURE__ */ new Map();
|
|
10509
|
+
for (const event of events) {
|
|
10510
|
+
if (event.type !== SZENEN_EVENT_TYPES.imageBatchPersisted) continue;
|
|
10511
|
+
const payload = event.payload;
|
|
10512
|
+
if (!payload || !istText5(payload.item_id) || !istText5(payload.prompt_run_id) || !istText5(payload.generation_batch_id)) continue;
|
|
10513
|
+
if (payload.source_kind !== "generated_in_app" && payload.source_kind !== "external_import") continue;
|
|
10514
|
+
const bestehend = byItemId.get(payload.item_id);
|
|
10515
|
+
if (bestehend?.generation_batch_ids.includes(payload.generation_batch_id)) continue;
|
|
10516
|
+
const bilder = alsBilder(payload.images, payload.generation_batch_id);
|
|
10517
|
+
const herkunft = {
|
|
10518
|
+
generation_batch_id: payload.generation_batch_id,
|
|
10519
|
+
source_kind: payload.source_kind
|
|
10520
|
+
};
|
|
10521
|
+
if (!bestehend) {
|
|
10522
|
+
byItemId.set(payload.item_id, {
|
|
10523
|
+
item_id: payload.item_id,
|
|
10524
|
+
prompt_run_id: payload.prompt_run_id,
|
|
10525
|
+
generation_batch_ids: [payload.generation_batch_id],
|
|
10526
|
+
source_kind: payload.source_kind,
|
|
10527
|
+
origins: [herkunft],
|
|
10528
|
+
title: istText5(payload.title) ? payload.title : `Batch aus Lauf ${payload.prompt_run_id}`,
|
|
10529
|
+
images: bilder
|
|
10530
|
+
});
|
|
10531
|
+
continue;
|
|
10532
|
+
}
|
|
10533
|
+
const origins = [...bestehend.origins, herkunft];
|
|
10534
|
+
byItemId.set(payload.item_id, {
|
|
10535
|
+
...bestehend,
|
|
10536
|
+
generation_batch_ids: [...bestehend.generation_batch_ids, payload.generation_batch_id],
|
|
10537
|
+
origins,
|
|
10538
|
+
source_kind: gesamtHerkunft(origins),
|
|
10539
|
+
images: [...bestehend.images, ...bilder]
|
|
10540
|
+
});
|
|
10541
|
+
}
|
|
10542
|
+
return [...byItemId.values()];
|
|
10543
|
+
}
|
|
10544
|
+
function batchesForPromptRun(events, runId) {
|
|
10545
|
+
return collectImageBatches(events).filter((b) => b.prompt_run_id === runId);
|
|
10546
|
+
}
|
|
10547
|
+
function findImageBatch(events, batchId) {
|
|
10548
|
+
return collectImageBatches(events).find((b) => b.generation_batch_ids.includes(batchId)) ?? null;
|
|
10549
|
+
}
|
|
10550
|
+
|
|
10469
10551
|
// src/lib/szenen/imageGenerationCapability.ts
|
|
10470
10552
|
var isObject11 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
10471
|
-
var
|
|
10553
|
+
var istText6 = (v) => typeof v === "string" && v.trim().length > 0;
|
|
10472
10554
|
function checkImageExecutionProfile(profile) {
|
|
10473
10555
|
const befunde = [];
|
|
10474
10556
|
if (!isObject11(profile)) return ["Das Ausfuehrungsprofil ist kein Objekt."];
|
|
10475
10557
|
for (const feld of ["profile_id", "execution_path", "execution_model_id"]) {
|
|
10476
|
-
if (!
|
|
10558
|
+
if (!istText6(profile[feld])) befunde.push(`"${feld}" fehlt als nicht-leerer Text.`);
|
|
10477
10559
|
}
|
|
10478
10560
|
if (typeof profile.enabled !== "boolean") befunde.push('"enabled" fehlt als Boolean.');
|
|
10479
|
-
if (!Array.isArray(profile.environments) || profile.environments.length === 0 || !profile.environments.every(
|
|
10561
|
+
if (!Array.isArray(profile.environments) || profile.environments.length === 0 || !profile.environments.every(istText6)) {
|
|
10480
10562
|
befunde.push('"environments" fehlt als nicht-leere Liste von Umgebungskennungen.');
|
|
10481
10563
|
}
|
|
10482
10564
|
if (!Number.isInteger(profile.max_images) || profile.max_images < 1) {
|
|
10483
10565
|
befunde.push(`"max_images" ist ${JSON.stringify(profile.max_images)}; erwartet eine ganze Zahl >= 1.`);
|
|
10484
10566
|
}
|
|
10485
|
-
if (!Array.isArray(profile.aspect_ratios) || !profile.aspect_ratios.every(
|
|
10567
|
+
if (!Array.isArray(profile.aspect_ratios) || !profile.aspect_ratios.every(istText6)) {
|
|
10486
10568
|
befunde.push('"aspect_ratios" fehlt als Liste von Seitenverhaeltnissen (darf leer sein).');
|
|
10487
10569
|
}
|
|
10488
10570
|
if (typeof profile.accepts_seed !== "boolean") befunde.push('"accepts_seed" fehlt als Boolean.');
|
|
@@ -10494,12 +10576,12 @@ function checkImageExecutionProfile(profile) {
|
|
|
10494
10576
|
function checkImageExecutionProfiles(profiles) {
|
|
10495
10577
|
const anzahlJeKennung = /* @__PURE__ */ new Map();
|
|
10496
10578
|
for (const profil of profiles ?? []) {
|
|
10497
|
-
if (!isObject11(profil) || !
|
|
10579
|
+
if (!isObject11(profil) || !istText6(profil.profile_id)) continue;
|
|
10498
10580
|
anzahlJeKennung.set(profil.profile_id, (anzahlJeKennung.get(profil.profile_id) ?? 0) + 1);
|
|
10499
10581
|
}
|
|
10500
10582
|
return (profiles ?? []).map((profil) => {
|
|
10501
10583
|
const befunde = [...checkImageExecutionProfile(profil)];
|
|
10502
|
-
if (isObject11(profil) &&
|
|
10584
|
+
if (isObject11(profil) && istText6(profil.profile_id) && (anzahlJeKennung.get(profil.profile_id) ?? 0) > 1) {
|
|
10503
10585
|
befunde.push(
|
|
10504
10586
|
`Die profile_id "${profil.profile_id}" kommt in diesem Zielmodell mehrfach vor \u2014 die Auswahl waere nicht mehr eindeutig aufloesbar.`
|
|
10505
10587
|
);
|
|
@@ -10510,7 +10592,7 @@ function checkImageExecutionProfiles(profiles) {
|
|
|
10510
10592
|
function executableImageModels(promptTargetModelKey, targets, capability) {
|
|
10511
10593
|
const models = [];
|
|
10512
10594
|
const invalid = [];
|
|
10513
|
-
if (!
|
|
10595
|
+
if (!istText6(capability?.environment_id) || !Array.isArray(capability?.execution_paths)) {
|
|
10514
10596
|
return {
|
|
10515
10597
|
prompt_target_model_key: promptTargetModelKey,
|
|
10516
10598
|
models: [],
|
|
@@ -10524,7 +10606,7 @@ function executableImageModels(promptTargetModelKey, targets, capability) {
|
|
|
10524
10606
|
for (const [index, roh] of (target.executionProfiles ?? []).entries()) {
|
|
10525
10607
|
const befunde = profilBefunde[index] ?? [];
|
|
10526
10608
|
if (befunde.length > 0) {
|
|
10527
|
-
const kennung = isObject11(roh) &&
|
|
10609
|
+
const kennung = isObject11(roh) && istText6(roh.profile_id) ? roh.profile_id : "(ohne profile_id)";
|
|
10528
10610
|
invalid.push(`${target.key}/${kennung}: ${befunde.join(" ")}`);
|
|
10529
10611
|
continue;
|
|
10530
10612
|
}
|
|
@@ -11225,11 +11307,16 @@ function createMemoryViewPort(options = {}) {
|
|
|
11225
11307
|
const neueBilder = input.images.map((bild, offset) => ({
|
|
11226
11308
|
media_ref: `${input.generationBatchId}-${startPosition + offset}`,
|
|
11227
11309
|
position: startPosition + offset,
|
|
11310
|
+
generation_batch_id: input.generationBatchId,
|
|
11228
11311
|
model: bild.model ?? null,
|
|
11229
11312
|
seed: bild.seed ?? null,
|
|
11230
11313
|
width: bild.width ?? null,
|
|
11231
11314
|
height: bild.height ?? null
|
|
11232
11315
|
}));
|
|
11316
|
+
const importOrigins = [
|
|
11317
|
+
...vorhandenesItem?.origins ?? [],
|
|
11318
|
+
{ generation_batch_id: input.generationBatchId, source_kind: "external_import" }
|
|
11319
|
+
];
|
|
11233
11320
|
const neu = {
|
|
11234
11321
|
item_id: vorhandenesItem?.item_id ?? `szn-mem-batch-${input.generationBatchId}`,
|
|
11235
11322
|
prompt_run_id: input.runId,
|
|
@@ -11237,7 +11324,8 @@ function createMemoryViewPort(options = {}) {
|
|
|
11237
11324
|
...vorhandenesItem?.generation_batch_ids ?? [],
|
|
11238
11325
|
input.generationBatchId
|
|
11239
11326
|
],
|
|
11240
|
-
source_kind:
|
|
11327
|
+
source_kind: gesamtHerkunft(importOrigins),
|
|
11328
|
+
origins: importOrigins,
|
|
11241
11329
|
title: vorhandenesItem?.title ?? input.title ?? `Batch aus Lauf ${input.runId}`,
|
|
11242
11330
|
images: [...vorhandenesItem?.images ?? [], ...neueBilder]
|
|
11243
11331
|
};
|
|
@@ -11291,11 +11379,16 @@ function createMemoryViewPort(options = {}) {
|
|
|
11291
11379
|
const neueBilder = input.images.map((bild, offset) => ({
|
|
11292
11380
|
media_ref: `${input.generationBatchId}-${startPosition + offset}`,
|
|
11293
11381
|
position: startPosition + offset,
|
|
11382
|
+
generation_batch_id: input.generationBatchId,
|
|
11294
11383
|
model: bild.model ?? null,
|
|
11295
11384
|
seed: bild.seed ?? null,
|
|
11296
11385
|
width: bild.width ?? null,
|
|
11297
11386
|
height: bild.height ?? null
|
|
11298
11387
|
}));
|
|
11388
|
+
const genOrigins = [
|
|
11389
|
+
...vorhandenesItem?.origins ?? [],
|
|
11390
|
+
{ generation_batch_id: input.generationBatchId, source_kind: "generated_in_app" }
|
|
11391
|
+
];
|
|
11299
11392
|
const neu = {
|
|
11300
11393
|
item_id: vorhandenesItem?.item_id ?? `szn-mem-gen-${input.generationBatchId}`,
|
|
11301
11394
|
prompt_run_id: input.runId,
|
|
@@ -11303,7 +11396,8 @@ function createMemoryViewPort(options = {}) {
|
|
|
11303
11396
|
...vorhandenesItem?.generation_batch_ids ?? [],
|
|
11304
11397
|
input.generationBatchId
|
|
11305
11398
|
],
|
|
11306
|
-
source_kind:
|
|
11399
|
+
source_kind: gesamtHerkunft(genOrigins),
|
|
11400
|
+
origins: genOrigins,
|
|
11307
11401
|
title: vorhandenesItem?.title ?? `Batch aus Lauf ${input.runId}`,
|
|
11308
11402
|
images: [...vorhandenesItem?.images ?? [], ...neueBilder]
|
|
11309
11403
|
};
|
|
@@ -11334,6 +11428,31 @@ function createMemoryViewPort(options = {}) {
|
|
|
11334
11428
|
}
|
|
11335
11429
|
}
|
|
11336
11430
|
});
|
|
11431
|
+
const seedVorlagen = [...options.seedTemplates ?? []];
|
|
11432
|
+
let seedVorlagenZaehler = 0;
|
|
11433
|
+
const seedTemplatePort = {
|
|
11434
|
+
async listSeedTemplates() {
|
|
11435
|
+
if (options.seedTemplatesFehler) {
|
|
11436
|
+
return { kind: "error", message: "Vorlagenbestand nicht lesbar (Simulation).", retryable: true };
|
|
11437
|
+
}
|
|
11438
|
+
return ok2(seedVorlagen);
|
|
11439
|
+
},
|
|
11440
|
+
async saveSeedTemplate(input) {
|
|
11441
|
+
const vorlage = {
|
|
11442
|
+
id: `seedtpl-${seedVorlagenZaehler += 1}`,
|
|
11443
|
+
name: input.name,
|
|
11444
|
+
seeds: input.seeds
|
|
11445
|
+
};
|
|
11446
|
+
seedVorlagen.push(vorlage);
|
|
11447
|
+
return done(vorlage);
|
|
11448
|
+
},
|
|
11449
|
+
async deleteSeedTemplate(id) {
|
|
11450
|
+
const index = seedVorlagen.findIndex((v) => String(v.id) === String(id));
|
|
11451
|
+
if (index < 0) return { kind: "error", message: `Seed-Vorlage nicht gefunden: ${id}`, retryable: false };
|
|
11452
|
+
seedVorlagen.splice(index, 1);
|
|
11453
|
+
return done(null);
|
|
11454
|
+
}
|
|
11455
|
+
};
|
|
11337
11456
|
const port = {
|
|
11338
11457
|
elements,
|
|
11339
11458
|
context: {
|
|
@@ -11351,6 +11470,9 @@ function createMemoryViewPort(options = {}) {
|
|
|
11351
11470
|
if (options.derivation !== false) port.derivation = derivationPort;
|
|
11352
11471
|
if (options.imageBatchHistory !== false) port.imageBatchHistory = imageBatchHistoryPort;
|
|
11353
11472
|
if (options.imageBatchWrite !== false) port.imageBatchWrite = imageBatchWritePort;
|
|
11473
|
+
if (options.seedTemplates !== void 0 || options.seedTemplatesFehler) {
|
|
11474
|
+
port.seedTemplates = seedTemplatePort;
|
|
11475
|
+
}
|
|
11354
11476
|
if (options.imageGeneration !== false) port.imageGeneration = imageGenerationPort;
|
|
11355
11477
|
return port;
|
|
11356
11478
|
}
|
|
@@ -12453,61 +12575,6 @@ function createFlowImageProvider(generateImage) {
|
|
|
12453
12575
|
};
|
|
12454
12576
|
}
|
|
12455
12577
|
|
|
12456
|
-
// src/lib/szenen/imageBatchStore.ts
|
|
12457
|
-
var istText6 = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
12458
|
-
function alsBilder(rohe) {
|
|
12459
|
-
if (!Array.isArray(rohe)) return [];
|
|
12460
|
-
return rohe.filter((b) => !!b && typeof b === "object").filter((b) => istText6(b.media_ref) && typeof b.position === "number").map((b) => ({
|
|
12461
|
-
media_ref: b.media_ref,
|
|
12462
|
-
position: b.position,
|
|
12463
|
-
...istText6(b.asset_id) ? { asset_id: b.asset_id } : {},
|
|
12464
|
-
// Der bestätigte MIME-Typ (Review 2026-08-18 §5 P2) muss durch das
|
|
12465
|
-
// Rücklesen hindurch: Genau hier braucht ihn der Lesepfad, um den
|
|
12466
|
-
// Dateipfad `images/<id>.<ext>` zu bilden, statt ihn zu erraten. Nur
|
|
12467
|
-
// gesetzt, wenn er im Ereignis steht — ältere Batches tragen ihn nicht.
|
|
12468
|
-
...istText6(b.mime_type) ? { mime_type: b.mime_type } : {},
|
|
12469
|
-
model: b.model ?? null,
|
|
12470
|
-
seed: b.seed ?? null,
|
|
12471
|
-
width: b.width ?? null,
|
|
12472
|
-
height: b.height ?? null
|
|
12473
|
-
}));
|
|
12474
|
-
}
|
|
12475
|
-
function collectImageBatches(events) {
|
|
12476
|
-
const byItemId = /* @__PURE__ */ new Map();
|
|
12477
|
-
for (const event of events) {
|
|
12478
|
-
if (event.type !== SZENEN_EVENT_TYPES.imageBatchPersisted) continue;
|
|
12479
|
-
const payload = event.payload;
|
|
12480
|
-
if (!payload || !istText6(payload.item_id) || !istText6(payload.prompt_run_id) || !istText6(payload.generation_batch_id)) continue;
|
|
12481
|
-
if (payload.source_kind !== "generated_in_app" && payload.source_kind !== "external_import") continue;
|
|
12482
|
-
const bestehend = byItemId.get(payload.item_id);
|
|
12483
|
-
if (bestehend?.generation_batch_ids.includes(payload.generation_batch_id)) continue;
|
|
12484
|
-
const bilder = alsBilder(payload.images);
|
|
12485
|
-
if (!bestehend) {
|
|
12486
|
-
byItemId.set(payload.item_id, {
|
|
12487
|
-
item_id: payload.item_id,
|
|
12488
|
-
prompt_run_id: payload.prompt_run_id,
|
|
12489
|
-
generation_batch_ids: [payload.generation_batch_id],
|
|
12490
|
-
source_kind: payload.source_kind,
|
|
12491
|
-
title: istText6(payload.title) ? payload.title : `Batch aus Lauf ${payload.prompt_run_id}`,
|
|
12492
|
-
images: bilder
|
|
12493
|
-
});
|
|
12494
|
-
continue;
|
|
12495
|
-
}
|
|
12496
|
-
byItemId.set(payload.item_id, {
|
|
12497
|
-
...bestehend,
|
|
12498
|
-
generation_batch_ids: [...bestehend.generation_batch_ids, payload.generation_batch_id],
|
|
12499
|
-
images: [...bestehend.images, ...bilder]
|
|
12500
|
-
});
|
|
12501
|
-
}
|
|
12502
|
-
return [...byItemId.values()];
|
|
12503
|
-
}
|
|
12504
|
-
function batchesForPromptRun(events, runId) {
|
|
12505
|
-
return collectImageBatches(events).filter((b) => b.prompt_run_id === runId);
|
|
12506
|
-
}
|
|
12507
|
-
function findImageBatch(events, batchId) {
|
|
12508
|
-
return collectImageBatches(events).find((b) => b.generation_batch_ids.includes(batchId)) ?? null;
|
|
12509
|
-
}
|
|
12510
|
-
|
|
12511
12578
|
// src/lib/szenen/hfImageBatchHistory.ts
|
|
12512
12579
|
function lesefehler(aktion, error) {
|
|
12513
12580
|
return {
|
|
@@ -12614,13 +12681,21 @@ async function legeBatchAb(options, input) {
|
|
|
12614
12681
|
`Die Batch-Metadaten fuer ${input.generationBatchId} konnten nicht protokolliert werden, obwohl die Bilder bereits im Bestand liegen: ${error instanceof Error ? error.message : String(error)}`
|
|
12615
12682
|
);
|
|
12616
12683
|
}
|
|
12684
|
+
const origins = [
|
|
12685
|
+
...bestehend?.origins ?? [],
|
|
12686
|
+
{ generation_batch_id: input.generationBatchId, source_kind: input.sourceKind }
|
|
12687
|
+
];
|
|
12617
12688
|
const zusammengefuehrt = {
|
|
12618
12689
|
item_id: itemId,
|
|
12619
12690
|
prompt_run_id: input.runId,
|
|
12620
12691
|
generation_batch_ids: bestehend ? [...bestehend.generation_batch_ids, input.generationBatchId] : [input.generationBatchId],
|
|
12621
|
-
source_kind:
|
|
12692
|
+
source_kind: gesamtHerkunft(origins),
|
|
12693
|
+
origins,
|
|
12622
12694
|
title: titel,
|
|
12623
|
-
images: [
|
|
12695
|
+
images: [
|
|
12696
|
+
...bestehend?.images ?? [],
|
|
12697
|
+
...abgelegt.map((bild) => ({ ...bild, generation_batch_id: input.generationBatchId }))
|
|
12698
|
+
]
|
|
12624
12699
|
};
|
|
12625
12700
|
return { kind: "ok", value: zusammengefuehrt };
|
|
12626
12701
|
}
|
|
@@ -13439,8 +13514,135 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
13439
13514
|
return { ok: true };
|
|
13440
13515
|
}
|
|
13441
13516
|
|
|
13517
|
+
// src/lib/szenen/seedListe.ts
|
|
13518
|
+
var DEFAULT_SEED_VORLAGE = {
|
|
13519
|
+
name: "Default",
|
|
13520
|
+
seeds: "1; 10; 100; 1000",
|
|
13521
|
+
builtin: true
|
|
13522
|
+
};
|
|
13523
|
+
function parseSeedListe(eingabe) {
|
|
13524
|
+
if (!eingabe) return [];
|
|
13525
|
+
return eingabe.split(/[,;]/).map((teil) => teil.trim()).filter((teil) => teil.length > 0);
|
|
13526
|
+
}
|
|
13527
|
+
function formatSeedListe(tokens) {
|
|
13528
|
+
return tokens.join("; ");
|
|
13529
|
+
}
|
|
13530
|
+
var GANZZAHL = /^-?\d+$/;
|
|
13531
|
+
function ordneSeedsZu(eingabe, anzahl) {
|
|
13532
|
+
const tokens = Array.isArray(eingabe) ? [...eingabe] : parseSeedListe(eingabe);
|
|
13533
|
+
const eintraege = [];
|
|
13534
|
+
for (let position = 0; position < anzahl; position++) {
|
|
13535
|
+
const roh = tokens[position] ?? null;
|
|
13536
|
+
if (roh === null) {
|
|
13537
|
+
eintraege.push({ position, roh: null, seed: null, ungueltig: false });
|
|
13538
|
+
continue;
|
|
13539
|
+
}
|
|
13540
|
+
const zahl = GANZZAHL.test(roh) ? Number(roh) : Number.NaN;
|
|
13541
|
+
const gueltig = Number.isSafeInteger(zahl);
|
|
13542
|
+
eintraege.push({
|
|
13543
|
+
position,
|
|
13544
|
+
roh,
|
|
13545
|
+
seed: gueltig ? zahl : null,
|
|
13546
|
+
ungueltig: !gueltig
|
|
13547
|
+
});
|
|
13548
|
+
}
|
|
13549
|
+
return {
|
|
13550
|
+
eintraege,
|
|
13551
|
+
ungueltige: eintraege.filter((e) => e.ungueltig),
|
|
13552
|
+
ueberzaehlig: Math.max(0, tokens.length - anzahl)
|
|
13553
|
+
};
|
|
13554
|
+
}
|
|
13555
|
+
function seedFehlerText(ungueltige) {
|
|
13556
|
+
const teile = ungueltige.map((e) => `Bild ${e.position + 1}: "${e.roh}"`);
|
|
13557
|
+
return `Die Seedliste enth\xE4lt keine ganze Zahl an ${teile.length === 1 ? "Position" : "Positionen"} \u2014 ${teile.join(", ")}. Kein Bild wurde importiert.`;
|
|
13558
|
+
}
|
|
13559
|
+
function mitDefaultVorlage(custom) {
|
|
13560
|
+
return [DEFAULT_SEED_VORLAGE, ...custom.filter((v) => !v.builtin)];
|
|
13561
|
+
}
|
|
13562
|
+
|
|
13563
|
+
// src/lib/szenen/zipBilder.ts
|
|
13564
|
+
var BILD_ENDUNGEN = {
|
|
13565
|
+
png: "image/png",
|
|
13566
|
+
jpg: "image/jpeg",
|
|
13567
|
+
jpeg: "image/jpeg",
|
|
13568
|
+
webp: "image/webp"
|
|
13569
|
+
};
|
|
13570
|
+
var UPLOAD_MAX_BYTES = 45 * 1024 * 1024;
|
|
13571
|
+
function byteLaenge(base64) {
|
|
13572
|
+
const fuellzeichen = base64.endsWith("==") ? 2 : base64.endsWith("=") ? 1 : 0;
|
|
13573
|
+
return Math.floor(base64.length * 3 / 4) - fuellzeichen;
|
|
13574
|
+
}
|
|
13575
|
+
function angekuendigteGroesse(eintrag) {
|
|
13576
|
+
const roh = eintrag._data?.uncompressedSize;
|
|
13577
|
+
return typeof roh === "number" && Number.isFinite(roh) && roh >= 0 ? roh : null;
|
|
13578
|
+
}
|
|
13579
|
+
function bildGroesseVerdikt(archiv, pfad, bytes) {
|
|
13580
|
+
if (bytes === null || bytes <= UPLOAD_MAX_BYTES) return null;
|
|
13581
|
+
return `${archiv}: Das Bild ${pfad} ist entpackt ${mb(bytes)} MB gro\xDF \u2014 die Grenze f\xFCr eine einzelne Bilddatei liegt bei ${UPLOAD_MAX_BYTES / 1024 / 1024} MB. Kein Bild wurde importiert.`;
|
|
13582
|
+
}
|
|
13583
|
+
function mb(bytes) {
|
|
13584
|
+
return (bytes / 1024 / 1024).toFixed(1);
|
|
13585
|
+
}
|
|
13586
|
+
function istZipDatei(datei) {
|
|
13587
|
+
return /\.zip$/i.test(datei.name);
|
|
13588
|
+
}
|
|
13589
|
+
function endungVon(pfad) {
|
|
13590
|
+
const punkt = pfad.lastIndexOf(".");
|
|
13591
|
+
return punkt >= 0 ? pfad.slice(punkt + 1).toLowerCase() : "";
|
|
13592
|
+
}
|
|
13593
|
+
function istImportierbar(pfad, istVerzeichnis) {
|
|
13594
|
+
if (istVerzeichnis) return false;
|
|
13595
|
+
if (pfad.startsWith("__MACOSX/")) return false;
|
|
13596
|
+
const datei = pfad.slice(pfad.lastIndexOf("/") + 1);
|
|
13597
|
+
if (datei.startsWith(".")) return false;
|
|
13598
|
+
return endungVon(datei) in BILD_ENDUNGEN;
|
|
13599
|
+
}
|
|
13600
|
+
function nachPfad(a, b) {
|
|
13601
|
+
return a.localeCompare(b, "en", { numeric: true, sensitivity: "base" }) || (a < b ? -1 : a > b ? 1 : 0);
|
|
13602
|
+
}
|
|
13603
|
+
async function leseBilderAusZip(datei) {
|
|
13604
|
+
const name = datei.name ?? "Archiv";
|
|
13605
|
+
if (datei.size > UPLOAD_MAX_BYTES) {
|
|
13606
|
+
throw new Error(
|
|
13607
|
+
`${name} ist ${mb(datei.size)} MB gro\xDF \u2014 die Grenze liegt bei ${UPLOAD_MAX_BYTES / 1024 / 1024} MB.`
|
|
13608
|
+
);
|
|
13609
|
+
}
|
|
13610
|
+
const { default: JSZip2 } = await import("jszip");
|
|
13611
|
+
const archiv = await JSZip2.loadAsync(datei).catch((fehler4) => {
|
|
13612
|
+
throw new Error(
|
|
13613
|
+
`${name} konnte nicht als ZIP gelesen werden: ${fehler4 instanceof Error ? fehler4.message : String(fehler4)}`
|
|
13614
|
+
);
|
|
13615
|
+
});
|
|
13616
|
+
const pfade = [];
|
|
13617
|
+
archiv.forEach((pfad, eintrag) => {
|
|
13618
|
+
if (istImportierbar(pfad, eintrag.dir)) pfade.push(pfad);
|
|
13619
|
+
});
|
|
13620
|
+
pfade.sort(nachPfad);
|
|
13621
|
+
if (pfade.length === 0) {
|
|
13622
|
+
throw new Error(
|
|
13623
|
+
`${name} enth\xE4lt kein unterst\xFCtztes Bild (erwartet: ${Object.keys(BILD_ENDUNGEN).map((e) => `.${e}`).join(", ")}).`
|
|
13624
|
+
);
|
|
13625
|
+
}
|
|
13626
|
+
const bilder = [];
|
|
13627
|
+
for (const pfad of pfade) {
|
|
13628
|
+
const eintrag = archiv.file(pfad);
|
|
13629
|
+
if (!eintrag) continue;
|
|
13630
|
+
const angekuendigt = bildGroesseVerdikt(name, pfad, angekuendigteGroesse(eintrag));
|
|
13631
|
+
if (angekuendigt) throw new Error(angekuendigt);
|
|
13632
|
+
const base64 = await eintrag.async("base64");
|
|
13633
|
+
const nachgemessen = bildGroesseVerdikt(name, pfad, byteLaenge(base64));
|
|
13634
|
+
if (nachgemessen) throw new Error(nachgemessen);
|
|
13635
|
+
bilder.push({
|
|
13636
|
+
name: pfad,
|
|
13637
|
+
base64,
|
|
13638
|
+
mimeType: BILD_ENDUNGEN[endungVon(pfad)]
|
|
13639
|
+
});
|
|
13640
|
+
}
|
|
13641
|
+
return bilder;
|
|
13642
|
+
}
|
|
13643
|
+
|
|
13442
13644
|
// src/features/szenen/SzenenView.tsx
|
|
13443
|
-
var
|
|
13645
|
+
var import_react17 = require("react");
|
|
13444
13646
|
|
|
13445
13647
|
// src/features/szenen/szenenViewModel.ts
|
|
13446
13648
|
var KEINE_BAUSTEINE = [
|
|
@@ -13533,7 +13735,7 @@ function noticeFor(ergebnis, was) {
|
|
|
13533
13735
|
}
|
|
13534
13736
|
|
|
13535
13737
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
13536
|
-
var
|
|
13738
|
+
var import_react12 = require("react");
|
|
13537
13739
|
|
|
13538
13740
|
// src/features/szenen/areas/usePortQuery.ts
|
|
13539
13741
|
var import_react = require("react");
|
|
@@ -13565,7 +13767,7 @@ function usePortQuery(frage, abhaengigkeiten) {
|
|
|
13565
13767
|
}
|
|
13566
13768
|
|
|
13567
13769
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
13568
|
-
var
|
|
13770
|
+
var import_react10 = require("react");
|
|
13569
13771
|
|
|
13570
13772
|
// src/features/szenen/elementLabels.ts
|
|
13571
13773
|
var LABELS = {
|
|
@@ -13925,6 +14127,9 @@ var LABELS2 = {
|
|
|
13925
14127
|
user_instruction: "Nutzeranweisung",
|
|
13926
14128
|
prompt_render_settings: "Prompt-Erzeugung",
|
|
13927
14129
|
blender_render_settings: "Blender-Ausgabe",
|
|
14130
|
+
// Nur Darstellung, keine Schemaaenderung (A4): Der Schluessel bleibt
|
|
14131
|
+
// `overrides`, und er steht als `<code>` weiterhin daneben.
|
|
14132
|
+
overrides: "Render-Abweichungen",
|
|
13928
14133
|
camera_rig: "Kamera-Rig",
|
|
13929
14134
|
media_refs: "Medien",
|
|
13930
14135
|
external_refs: "Externe Referenzen",
|
|
@@ -14903,41 +15108,91 @@ var FeldControl = (props) => {
|
|
|
14903
15108
|
);
|
|
14904
15109
|
}
|
|
14905
15110
|
};
|
|
15111
|
+
var LANGE_ERKLAERUNG = 120;
|
|
15112
|
+
function ersterSatz(text) {
|
|
15113
|
+
const ende = /[.!?](\s|$)/.exec(text);
|
|
15114
|
+
return ende ? text.slice(0, ende.index + 1) : text;
|
|
15115
|
+
}
|
|
15116
|
+
var Erklaerung = ({ text, testId }) => {
|
|
15117
|
+
const ganz = text.trim();
|
|
15118
|
+
const kern = ersterSatz(ganz);
|
|
15119
|
+
const rest = ganz.slice(kern.length).trim();
|
|
15120
|
+
if (ganz.length <= LANGE_ERKLAERUNG || !rest) {
|
|
15121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { "data-testid": `erklaerung-${testId}`, children: ganz });
|
|
15122
|
+
}
|
|
15123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
15124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { "data-testid": `erklaerung-${testId}`, children: kern }),
|
|
15125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", { className: "szenen-detail__warum", "data-testid": `warum-${testId}`, children: [
|
|
15126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", { children: "Warum?" }),
|
|
15127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: rest })
|
|
15128
|
+
] })
|
|
15129
|
+
] });
|
|
15130
|
+
};
|
|
15131
|
+
function gruppeKonfiguriert(feld, formular) {
|
|
15132
|
+
return Object.keys(payloadFromForm([feld], formular)).length > 0;
|
|
15133
|
+
}
|
|
14906
15134
|
var SchemaFieldRow = (props) => {
|
|
14907
15135
|
const { feld, elementType, formular } = props;
|
|
14908
15136
|
const label = feldLabel(elementType, feld.path, feld.name);
|
|
14909
15137
|
if (feld.kind === "group") {
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
15138
|
+
const konfiguriert = gruppeKonfiguriert(feld, formular);
|
|
15139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
15140
|
+
"details",
|
|
15141
|
+
{
|
|
15142
|
+
className: "szenen-detail__group",
|
|
15143
|
+
"data-testid": `gruppe-${feld.path}`,
|
|
15144
|
+
"data-konfiguriert": konfiguriert ? "ja" : "nein",
|
|
15145
|
+
open: feld.required,
|
|
15146
|
+
children: [
|
|
15147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("summary", { children: [
|
|
15148
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "szenen-detail__group-titel", children: label }),
|
|
15149
|
+
feld.required ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { title: "Pflichtfeld", children: " *" }) : (
|
|
15150
|
+
// A2: Dass hier schon etwas steht, muss man im
|
|
15151
|
+
// geschlossenen Zustand sehen — sonst übersieht man
|
|
15152
|
+
// eine gesetzte Blender-Ausgabe genau so lange, bis
|
|
15153
|
+
// sie im Ergebnis auftaucht.
|
|
15154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
15155
|
+
"span",
|
|
15156
|
+
{
|
|
15157
|
+
className: "szenen-detail__group-status",
|
|
15158
|
+
"data-testid": `gruppe-${feld.path}-status`,
|
|
15159
|
+
children: konfiguriert ? "konfiguriert" : "optional"
|
|
15160
|
+
}
|
|
15161
|
+
)
|
|
15162
|
+
)
|
|
15163
|
+
] }),
|
|
15164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-detail__group-inhalt", children: [
|
|
15165
|
+
feld.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Erklaerung, { text: feld.description, testId: `gruppe-${feld.path}` }),
|
|
15166
|
+
(feld.children ?? []).map((kind) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SchemaFieldRow, { ...props, feld: kind }, kind.path))
|
|
15167
|
+
] })
|
|
15168
|
+
]
|
|
15169
|
+
}
|
|
15170
|
+
);
|
|
14918
15171
|
}
|
|
14919
15172
|
const wert = formular[feld.path] ?? "";
|
|
14920
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("
|
|
14921
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
15173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-detail__fieldrow", "data-feld": feld.path, children: [
|
|
15174
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "szenen-detail__field", children: [
|
|
15175
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
15176
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "szenen-detail__field-label", children: label }),
|
|
15177
|
+
feld.required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { title: "Pflichtfeld", children: " *" }),
|
|
15178
|
+
label !== feld.name && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: "szenen-detail__field-key", children: feld.name }),
|
|
15179
|
+
feld.complexHint && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("em", { children: [
|
|
15180
|
+
" \u2014 ",
|
|
15181
|
+
feld.complexHint
|
|
15182
|
+
] })
|
|
15183
|
+
] }),
|
|
15184
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FeldControl, { ...props, wert }),
|
|
15185
|
+
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
15186
|
+
NullSchalter,
|
|
15187
|
+
{
|
|
15188
|
+
feld,
|
|
15189
|
+
wert,
|
|
15190
|
+
onChange: props.onChange,
|
|
15191
|
+
readOnly: props.readOnly
|
|
15192
|
+
}
|
|
15193
|
+
)
|
|
14929
15194
|
] }),
|
|
14930
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
14931
|
-
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
14932
|
-
NullSchalter,
|
|
14933
|
-
{
|
|
14934
|
-
feld,
|
|
14935
|
-
wert,
|
|
14936
|
-
onChange: props.onChange,
|
|
14937
|
-
readOnly: props.readOnly
|
|
14938
|
-
}
|
|
14939
|
-
),
|
|
14940
|
-
feld.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: feld.description })
|
|
15195
|
+
feld.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Erklaerung, { text: feld.description, testId: feld.path })
|
|
14941
15196
|
] });
|
|
14942
15197
|
};
|
|
14943
15198
|
|
|
@@ -15604,11 +15859,162 @@ var VersionNavigator = ({
|
|
|
15604
15859
|
};
|
|
15605
15860
|
|
|
15606
15861
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
15607
|
-
var
|
|
15862
|
+
var import_react9 = require("react");
|
|
15608
15863
|
|
|
15609
15864
|
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
15865
|
+
var import_react8 = __toESM(require("react"));
|
|
15866
|
+
|
|
15867
|
+
// src/features/szenen/areas/Bildbausteine.tsx
|
|
15610
15868
|
var import_react7 = require("react");
|
|
15611
15869
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
15870
|
+
var Kachel = ({
|
|
15871
|
+
quelle,
|
|
15872
|
+
alt,
|
|
15873
|
+
leerText
|
|
15874
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildkachel", children: quelle ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: quelle, alt, loading: "lazy" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildkachel__leer", title: leerText ?? alt, children: leerText ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildkachel__zeichen", children: "?" }) : null }) });
|
|
15875
|
+
var BildViewer = ({
|
|
15876
|
+
bilder,
|
|
15877
|
+
position,
|
|
15878
|
+
onWechseln,
|
|
15879
|
+
onSchliessen,
|
|
15880
|
+
satzTitel,
|
|
15881
|
+
testId
|
|
15882
|
+
}) => {
|
|
15883
|
+
const anzahl = bilder.length;
|
|
15884
|
+
const bild = bilder[position];
|
|
15885
|
+
const blaettern = (0, import_react7.useCallback)((schritt) => {
|
|
15886
|
+
if (anzahl === 0) return;
|
|
15887
|
+
onWechseln((position + schritt + anzahl) % anzahl);
|
|
15888
|
+
}, [anzahl, position, onWechseln]);
|
|
15889
|
+
(0, import_react7.useEffect)(() => {
|
|
15890
|
+
const taste = (e) => {
|
|
15891
|
+
if (e.key === "Escape") onSchliessen();
|
|
15892
|
+
else if (e.key === "ArrowLeft") blaettern(-1);
|
|
15893
|
+
else if (e.key === "ArrowRight") blaettern(1);
|
|
15894
|
+
};
|
|
15895
|
+
document.addEventListener("keydown", taste);
|
|
15896
|
+
return () => document.removeEventListener("keydown", taste);
|
|
15897
|
+
}, [blaettern, onSchliessen]);
|
|
15898
|
+
if (!bild) return null;
|
|
15899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15900
|
+
"div",
|
|
15901
|
+
{
|
|
15902
|
+
className: "szenen-bildviewer",
|
|
15903
|
+
"data-testid": testId,
|
|
15904
|
+
role: "dialog",
|
|
15905
|
+
"aria-modal": "true",
|
|
15906
|
+
"aria-label": satzTitel ? `${satzTitel} \u2014 ${bild.titel}` : bild.titel,
|
|
15907
|
+
children: [
|
|
15908
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "szenen-bildviewer__kopf", children: [
|
|
15909
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "szenen-bildviewer__titel", children: [
|
|
15910
|
+
satzTitel ? `${satzTitel} \xB7 ` : "",
|
|
15911
|
+
bild.titel
|
|
15912
|
+
] }),
|
|
15913
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "szenen-bildviewer__zaehler", "data-testid": `${testId}-zaehler`, children: [
|
|
15914
|
+
position + 1,
|
|
15915
|
+
" / ",
|
|
15916
|
+
anzahl
|
|
15917
|
+
] }),
|
|
15918
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15919
|
+
"button",
|
|
15920
|
+
{
|
|
15921
|
+
type: "button",
|
|
15922
|
+
className: "szenen-bildviewer__schliessen",
|
|
15923
|
+
onClick: onSchliessen,
|
|
15924
|
+
"data-testid": `${testId}-schliessen`,
|
|
15925
|
+
children: "Schliessen"
|
|
15926
|
+
}
|
|
15927
|
+
)
|
|
15928
|
+
] }),
|
|
15929
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "szenen-bildviewer__buehne", children: [
|
|
15930
|
+
anzahl > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15931
|
+
"button",
|
|
15932
|
+
{
|
|
15933
|
+
type: "button",
|
|
15934
|
+
className: "szenen-bildviewer__blaettern",
|
|
15935
|
+
onClick: () => blaettern(-1),
|
|
15936
|
+
"aria-label": "Vorheriges Bild",
|
|
15937
|
+
"data-testid": `${testId}-zurueck`,
|
|
15938
|
+
children: "\u2039"
|
|
15939
|
+
}
|
|
15940
|
+
),
|
|
15941
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildviewer__rahmen", children: bild.quelle ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15942
|
+
"img",
|
|
15943
|
+
{
|
|
15944
|
+
className: "szenen-bildviewer__bild",
|
|
15945
|
+
src: bild.quelle,
|
|
15946
|
+
alt: bild.titel,
|
|
15947
|
+
"data-testid": `${testId}-bild`
|
|
15948
|
+
}
|
|
15949
|
+
) : (
|
|
15950
|
+
// Auch gross bleibt eine fehlende Quelle eine Auskunft
|
|
15951
|
+
// und kein Textblock (R12.3).
|
|
15952
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildviewer__leer", "data-testid": `${testId}-leer`, children: bild.leerText ?? "F\xFCr dieses Bild gibt es keine anzeigbare Quelle." })
|
|
15953
|
+
) }),
|
|
15954
|
+
anzahl > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15955
|
+
"button",
|
|
15956
|
+
{
|
|
15957
|
+
type: "button",
|
|
15958
|
+
className: "szenen-bildviewer__blaettern",
|
|
15959
|
+
onClick: () => blaettern(1),
|
|
15960
|
+
"aria-label": "N\xE4chstes Bild",
|
|
15961
|
+
"data-testid": `${testId}-weiter`,
|
|
15962
|
+
children: "\u203A"
|
|
15963
|
+
}
|
|
15964
|
+
)
|
|
15965
|
+
] }),
|
|
15966
|
+
bild.details && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "szenen-bildviewer__details", "data-testid": `${testId}-details`, children: bild.details })
|
|
15967
|
+
]
|
|
15968
|
+
}
|
|
15969
|
+
);
|
|
15970
|
+
};
|
|
15971
|
+
var BildGalerie = ({ bilder, testId, satzTitel }) => {
|
|
15972
|
+
const [offen, setOffen] = (0, import_react7.useState)(null);
|
|
15973
|
+
(0, import_react7.useEffect)(() => {
|
|
15974
|
+
setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
|
|
15975
|
+
}, [bilder.length]);
|
|
15976
|
+
if (bilder.length === 0) return null;
|
|
15977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
15978
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "szenen-bildgalerie", "data-testid": testId, children: bilder.map((bild, position) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15979
|
+
"button",
|
|
15980
|
+
{
|
|
15981
|
+
type: "button",
|
|
15982
|
+
className: "szenen-bildgalerie__kachel",
|
|
15983
|
+
onClick: () => setOffen(position),
|
|
15984
|
+
"data-testid": `${testId}-oeffnen-${bild.id}`,
|
|
15985
|
+
title: bild.titel,
|
|
15986
|
+
children: [
|
|
15987
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15988
|
+
Kachel,
|
|
15989
|
+
{
|
|
15990
|
+
quelle: bild.quelle,
|
|
15991
|
+
alt: bild.titel,
|
|
15992
|
+
...bild.leerText ? { leerText: bild.leerText } : {}
|
|
15993
|
+
}
|
|
15994
|
+
),
|
|
15995
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "szenen-bildgalerie__nummer", children: [
|
|
15996
|
+
"#",
|
|
15997
|
+
position + 1
|
|
15998
|
+
] })
|
|
15999
|
+
]
|
|
16000
|
+
}
|
|
16001
|
+
) }, bild.id)) }),
|
|
16002
|
+
offen !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
16003
|
+
BildViewer,
|
|
16004
|
+
{
|
|
16005
|
+
bilder,
|
|
16006
|
+
position: offen,
|
|
16007
|
+
onWechseln: setOffen,
|
|
16008
|
+
onSchliessen: () => setOffen(null),
|
|
16009
|
+
testId: `${testId}-viewer`,
|
|
16010
|
+
...satzTitel ? { satzTitel } : {}
|
|
16011
|
+
}
|
|
16012
|
+
)
|
|
16013
|
+
] });
|
|
16014
|
+
};
|
|
16015
|
+
|
|
16016
|
+
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
16017
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
15612
16018
|
var AUFTRAG_TEXT = {
|
|
15613
16019
|
// „gestartet/unterbrochen" in einem: Aus dem Log allein ist beides nicht
|
|
15614
16020
|
// unterscheidbar, und genau das ist beabsichtigt — es gibt keinen
|
|
@@ -15620,8 +16026,10 @@ var AUFTRAG_TEXT = {
|
|
|
15620
16026
|
};
|
|
15621
16027
|
var RunImagesPanel = ({ port, lauf }) => {
|
|
15622
16028
|
const faehig = capabilitiesOf(port);
|
|
15623
|
-
const [nachladen, setNachladen] = (0,
|
|
16029
|
+
const [nachladen, setNachladen] = (0, import_react8.useState)(0);
|
|
15624
16030
|
const neuLesen = () => setNachladen((n) => n + 1);
|
|
16031
|
+
const [erzeugenOffen, setErzeugenOffen] = (0, import_react8.useState)(null);
|
|
16032
|
+
const [zuordnenOffen, setZuordnenOffen] = (0, import_react8.useState)(null);
|
|
15625
16033
|
const quelle = sourceOf(lauf);
|
|
15626
16034
|
const [wahlPhase] = usePortQuery(
|
|
15627
16035
|
() => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
@@ -15638,38 +16046,40 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
15638
16046
|
);
|
|
15639
16047
|
const auftraege = auftraegePhase.status === "ready" ? auftraegePhase.value : [];
|
|
15640
16048
|
const batches = batchesPhase.status === "ready" ? batchesPhase.value : [];
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
16049
|
+
const auffaellige = auftraege.filter((a) => a.status !== "succeeded");
|
|
16050
|
+
const erzeugenAuf = erzeugenOffen ?? batches.length === 0;
|
|
16051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder", "data-testid": `bilder-${lauf.run_id}`, children: [
|
|
16052
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "szenen-bilder__eingang", "data-testid": `eingang-${lauf.run_id}`, children: [
|
|
16053
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { children: "Eingang \u2014 woraus dieser Prompt entstand" }),
|
|
16054
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__ids", children: [
|
|
16055
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
15646
16056
|
"Lauf ",
|
|
15647
|
-
/* @__PURE__ */ (0,
|
|
16057
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { "data-testid": `eingang-lauf-${lauf.run_id}`, children: lauf.run_id })
|
|
15648
16058
|
] }),
|
|
15649
|
-
quelle.kind === "published" && /* @__PURE__ */ (0,
|
|
16059
|
+
quelle.kind === "published" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
15650
16060
|
"ver\xF6ffentlichte Shot-Version ",
|
|
15651
|
-
/* @__PURE__ */ (0,
|
|
16061
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.shot_version_id })
|
|
15652
16062
|
] }),
|
|
15653
|
-
quelle.kind === "draft_chain" && /* @__PURE__ */ (0,
|
|
16063
|
+
quelle.kind === "draft_chain" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
15654
16064
|
"Draft-Kette ",
|
|
15655
|
-
/* @__PURE__ */ (0,
|
|
16065
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.chain_id })
|
|
15656
16066
|
] }),
|
|
15657
|
-
quelle.kind === "scene_direct" && /* @__PURE__ */ (0,
|
|
16067
|
+
quelle.kind === "scene_direct" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
15658
16068
|
"Szene ",
|
|
15659
|
-
/* @__PURE__ */ (0,
|
|
15660
|
-
quelle.scene.draft_id ? /* @__PURE__ */ (0,
|
|
16069
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.scene.element_id }),
|
|
16070
|
+
quelle.scene.draft_id ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15661
16071
|
" \xB7 Entwurf ",
|
|
15662
|
-
/* @__PURE__ */ (0,
|
|
16072
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.scene.draft_id }),
|
|
15663
16073
|
" (Revision ",
|
|
15664
16074
|
quelle.scene.revision,
|
|
15665
16075
|
")"
|
|
15666
|
-
] }) : /* @__PURE__ */ (0,
|
|
16076
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15667
16077
|
" \xB7 Version ",
|
|
15668
|
-
/* @__PURE__ */ (0,
|
|
16078
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.scene.version_id })
|
|
15669
16079
|
] })
|
|
15670
16080
|
] })
|
|
15671
16081
|
] }),
|
|
15672
|
-
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */ (0,
|
|
16082
|
+
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15673
16083
|
InputBilder,
|
|
15674
16084
|
{
|
|
15675
16085
|
port,
|
|
@@ -15680,77 +16090,158 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
15680
16090
|
// Nichts raten: Ein Lauf vor 6.7 trägt die
|
|
15681
16091
|
// Rekonstruktionsherkunft nicht, und ein veröffentlichter
|
|
15682
16092
|
// Lauf hat keine (D-123).
|
|
15683
|
-
/* @__PURE__ */ (0,
|
|
16093
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `eingang-ohne-bilder-${lauf.run_id}`, children: "Zu diesem Lauf ist kein Rekonstruktionslauf hinterlegt \u2014 die Eingangsbilder sind darum nicht sicher aufl\xF6sbar und werden nicht geraten." })
|
|
15684
16094
|
)
|
|
15685
16095
|
] }),
|
|
15686
|
-
/* @__PURE__ */ (0,
|
|
15687
|
-
/* @__PURE__ */ (0,
|
|
15688
|
-
!faehig.
|
|
15689
|
-
|
|
16096
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "szenen-bilder__ausgang", "data-testid": `ausgang-${lauf.run_id}`, children: [
|
|
16097
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { children: "Ausgang \u2014 die Bilder aus diesem Prompt" }),
|
|
16098
|
+
!faehig.imageBatchHistory && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `batches-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bild-Batches. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
16099
|
+
batchesPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
16100
|
+
"Batches konnten nicht geladen werden: ",
|
|
16101
|
+
batchesPhase.message
|
|
16102
|
+
] }),
|
|
16103
|
+
faehig.imageBatchHistory && batchesPhase.status === "ready" && batches.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `keine-batches-${lauf.run_id}`, children: "Zu diesem Lauf ist noch kein Bild gespeichert." }),
|
|
16104
|
+
batches.map((batch) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BatchKachel, { port, batch }, batch.item_id)),
|
|
16105
|
+
!faehig.imageOrderHistory && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `auftraege-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bildgenerierungsauftr\xE4ge. Bereits gespeicherte Batches sind oben trotzdem sichtbar." }),
|
|
16106
|
+
auftraegePhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `auftraege-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15690
16107
|
"Auftr\xE4ge konnten nicht geladen werden: ",
|
|
15691
16108
|
auftraegePhase.message
|
|
15692
16109
|
] }),
|
|
15693
|
-
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */ (0,
|
|
15694
|
-
|
|
15695
|
-
"
|
|
16110
|
+
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `keine-auftraege-${lauf.run_id}`, children: "F\xFCr diesen Lauf wurde noch kein Bildauftrag gestartet." }),
|
|
16111
|
+
auffaellige.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16112
|
+
"p",
|
|
15696
16113
|
{
|
|
15697
|
-
"
|
|
15698
|
-
"data-
|
|
16114
|
+
className: "szenen-bilder__auffaellig",
|
|
16115
|
+
"data-testid": `auftraege-auffaellig-${lauf.run_id}`,
|
|
16116
|
+
role: "alert",
|
|
15699
16117
|
children: [
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
|
|
15712
|
-
|
|
15713
|
-
|
|
15714
|
-
|
|
15715
|
-
|
|
15716
|
-
"
|
|
15717
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: auftrag.item_id })
|
|
16118
|
+
auffaellige.length === 1 ? `Ein Bildauftrag ist ${AUFTRAG_TEXT[auffaellige[0].status]}.` : `${auffaellige.length} Bildauftr\xE4ge sind nicht sauber durchgelaufen.`,
|
|
16119
|
+
" ",
|
|
16120
|
+
"Einzelheiten im Verlauf."
|
|
16121
|
+
]
|
|
16122
|
+
}
|
|
16123
|
+
),
|
|
16124
|
+
auftraege.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16125
|
+
"details",
|
|
16126
|
+
{
|
|
16127
|
+
className: "szenen-bilder__verlauf",
|
|
16128
|
+
"data-testid": `auftraege-verlauf-${lauf.run_id}`,
|
|
16129
|
+
open: auffaellige.length > 0,
|
|
16130
|
+
children: [
|
|
16131
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("summary", { children: [
|
|
16132
|
+
"Bildauftr\xE4ge / Verlauf (",
|
|
16133
|
+
auftraege.length,
|
|
16134
|
+
")"
|
|
15718
16135
|
] }),
|
|
15719
|
-
|
|
15720
|
-
|
|
16136
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "szenen-bilder__auftraege", "data-testid": `auftraege-${lauf.run_id}`, children: auftraege.map((auftrag) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16137
|
+
"li",
|
|
16138
|
+
{
|
|
16139
|
+
"data-testid": `auftrag-${auftrag.generation_batch_id}`,
|
|
16140
|
+
"data-status": auftrag.status,
|
|
16141
|
+
children: [
|
|
16142
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: AUFTRAG_TEXT[auftrag.status] }),
|
|
16143
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `auftrag-modell-${auftrag.generation_batch_id}`, children: [
|
|
16144
|
+
auftrag.request?.image_count ?? "?",
|
|
16145
|
+
" Bild(er) \xB7",
|
|
16146
|
+
" ",
|
|
16147
|
+
auftrag.request?.callable_model_id ?? "Modell unbekannt",
|
|
16148
|
+
auftrag.request?.provider ? ` bei ${auftrag.request.provider}` : ""
|
|
16149
|
+
] }),
|
|
16150
|
+
auftrag.request?.prompt_target_model_key && auftrag.request.target_model_matched === false && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `auftrag-abweichung-${auftrag.generation_batch_id}`, children: [
|
|
16151
|
+
"abweichend \u2014 Prompt optimiert f\xFCr",
|
|
16152
|
+
" ",
|
|
16153
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: auftrag.request.prompt_target_model_key })
|
|
16154
|
+
] }),
|
|
16155
|
+
auftrag.request?.negative_prompt_transmitted === false && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-testid": `auftrag-negativ-${auftrag.generation_batch_id}`, children: "Ein negativer Prompt lief \xFCber dieses Profil nicht mit." }),
|
|
16156
|
+
auftrag.item_id && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `auftrag-item-${auftrag.generation_batch_id}`, children: [
|
|
16157
|
+
"Item ",
|
|
16158
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: auftrag.item_id })
|
|
16159
|
+
] }),
|
|
16160
|
+
auftrag.status === "started" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-testid": `auftrag-hinweis-${auftrag.generation_batch_id}`, children: "Kein automatischer neuer Versuch \u2014 ob noch einmal erzeugt wird, entscheiden Sie." }),
|
|
16161
|
+
auftrag.diagnostic && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-testid": `auftrag-diagnose-${auftrag.generation_batch_id}`, children: auftrag.diagnostic }),
|
|
16162
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { className: "szenen-bilder__auftragskennung", children: auftrag.generation_batch_id })
|
|
16163
|
+
]
|
|
16164
|
+
},
|
|
16165
|
+
auftrag.generation_batch_id
|
|
16166
|
+
)) })
|
|
15721
16167
|
]
|
|
15722
|
-
}
|
|
15723
|
-
|
|
15724
|
-
)) }),
|
|
15725
|
-
!faehig.imageBatchHistory && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { "data-testid": `batches-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bild-Batches. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
15726
|
-
batchesPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15727
|
-
"Batches konnten nicht geladen werden: ",
|
|
15728
|
-
batchesPhase.message
|
|
15729
|
-
] }),
|
|
15730
|
-
faehig.imageBatchHistory && batchesPhase.status === "ready" && batches.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { "data-testid": `keine-batches-${lauf.run_id}`, children: "Zu diesem Lauf ist noch kein Bild gespeichert." }),
|
|
15731
|
-
batches.map((batch) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BatchKachel, { port, batch }, batch.item_id))
|
|
16168
|
+
}
|
|
16169
|
+
)
|
|
15732
16170
|
] }),
|
|
15733
|
-
/* @__PURE__ */ (0,
|
|
15734
|
-
|
|
16171
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16172
|
+
"details",
|
|
15735
16173
|
{
|
|
15736
|
-
|
|
15737
|
-
lauf
|
|
15738
|
-
|
|
15739
|
-
|
|
15740
|
-
|
|
15741
|
-
|
|
15742
|
-
|
|
15743
|
-
|
|
15744
|
-
|
|
16174
|
+
className: "szenen-bilder__aktion",
|
|
16175
|
+
"data-testid": `erzeugen-bereich-${lauf.run_id}`,
|
|
16176
|
+
open: erzeugenAuf,
|
|
16177
|
+
children: [
|
|
16178
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16179
|
+
"summary",
|
|
16180
|
+
{
|
|
16181
|
+
onClick: (e) => {
|
|
16182
|
+
e.preventDefault();
|
|
16183
|
+
setErzeugenOffen(!erzeugenAuf);
|
|
16184
|
+
},
|
|
16185
|
+
children: "Bilder aus diesem Prompt erzeugen"
|
|
16186
|
+
}
|
|
16187
|
+
),
|
|
16188
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16189
|
+
ErzeugenAktion,
|
|
16190
|
+
{
|
|
16191
|
+
port,
|
|
16192
|
+
lauf,
|
|
16193
|
+
wahl,
|
|
16194
|
+
wahlFehler: wahlPhase.status === "error" ? wahlPhase.message : null,
|
|
16195
|
+
onFertig: () => {
|
|
16196
|
+
setErzeugenOffen(true);
|
|
16197
|
+
neuLesen();
|
|
16198
|
+
}
|
|
16199
|
+
}
|
|
16200
|
+
)
|
|
16201
|
+
]
|
|
16202
|
+
}
|
|
16203
|
+
),
|
|
16204
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16205
|
+
"details",
|
|
16206
|
+
{
|
|
16207
|
+
className: "szenen-bilder__aktion",
|
|
16208
|
+
"data-testid": `zuordnen-bereich-${lauf.run_id}`,
|
|
16209
|
+
open: zuordnenOffen ?? false,
|
|
16210
|
+
children: [
|
|
16211
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16212
|
+
"summary",
|
|
16213
|
+
{
|
|
16214
|
+
onClick: (e) => {
|
|
16215
|
+
e.preventDefault();
|
|
16216
|
+
setZuordnenOffen(!(zuordnenOffen ?? false));
|
|
16217
|
+
},
|
|
16218
|
+
children: "Externe Bilder diesem Lauf zuordnen"
|
|
16219
|
+
}
|
|
16220
|
+
),
|
|
16221
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16222
|
+
ZuordnenAktion,
|
|
16223
|
+
{
|
|
16224
|
+
port,
|
|
16225
|
+
lauf,
|
|
16226
|
+
onFertig: () => {
|
|
16227
|
+
setZuordnenOffen(true);
|
|
16228
|
+
neuLesen();
|
|
16229
|
+
}
|
|
16230
|
+
}
|
|
16231
|
+
)
|
|
16232
|
+
]
|
|
16233
|
+
}
|
|
16234
|
+
)
|
|
16235
|
+
] });
|
|
15745
16236
|
};
|
|
15746
16237
|
var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
15747
16238
|
const [phase] = usePortQuery(
|
|
15748
16239
|
() => port.derivation ? port.derivation.getDerivation(derivationRunId) : Promise.resolve({ kind: "ok", value: null }),
|
|
15749
16240
|
[port, derivationRunId]
|
|
15750
16241
|
);
|
|
15751
|
-
if (phase.status === "loading") return /* @__PURE__ */ (0,
|
|
16242
|
+
if (phase.status === "loading") return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Rekonstruktionslauf wird geladen \u2026" });
|
|
15752
16243
|
if (phase.status === "error") {
|
|
15753
|
-
return /* @__PURE__ */ (0,
|
|
16244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `eingang-fehler-${runId}`, role: "alert", children: [
|
|
15754
16245
|
"Der Rekonstruktionslauf ",
|
|
15755
16246
|
derivationRunId,
|
|
15756
16247
|
" konnte nicht geladen werden: ",
|
|
@@ -15758,22 +16249,22 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
15758
16249
|
] });
|
|
15759
16250
|
}
|
|
15760
16251
|
if (!phase.value) {
|
|
15761
|
-
return /* @__PURE__ */ (0,
|
|
16252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `eingang-unbekannt-${runId}`, children: [
|
|
15762
16253
|
"Der Rekonstruktionslauf ",
|
|
15763
|
-
/* @__PURE__ */ (0,
|
|
16254
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: derivationRunId }),
|
|
15764
16255
|
" ist in diesem Host nicht auffindbar."
|
|
15765
16256
|
] });
|
|
15766
16257
|
}
|
|
15767
16258
|
const bilder = phase.value.input.images;
|
|
15768
|
-
return /* @__PURE__ */ (0,
|
|
15769
|
-
/* @__PURE__ */ (0,
|
|
16259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { "data-testid": `eingang-bilder-${runId}`, children: [
|
|
16260
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { children: [
|
|
15770
16261
|
"aus Rekonstruktionslauf ",
|
|
15771
|
-
/* @__PURE__ */ (0,
|
|
16262
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: derivationRunId }),
|
|
15772
16263
|
phase.value.input.prompt_text ? " \xB7 mit Referenzprompt" : ""
|
|
15773
16264
|
] }),
|
|
15774
|
-
bilder.length === 0 ? /* @__PURE__ */ (0,
|
|
16265
|
+
bilder.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Der Rekonstruktionslauf lief ohne Eingangsbild." }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "szenen-bilder__eingangsliste", children: bilder.map((bild, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { "data-kind": bild.kind, children: bild.kind === "library" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BestandsBild, { port, mediaRef: bild.media_ref }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
15775
16266
|
"Upload, nur \xFCber seinen Digest belegt (",
|
|
15776
|
-
/* @__PURE__ */ (0,
|
|
16267
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("code", { children: [
|
|
15777
16268
|
bild.sha256.slice(0, 12),
|
|
15778
16269
|
"\u2026"
|
|
15779
16270
|
] }),
|
|
@@ -15791,113 +16282,219 @@ var BestandsBild = ({ port, mediaRef }) => {
|
|
|
15791
16282
|
() => port.imageLibrary ? port.imageLibrary.resolveImage(mediaRef) : Promise.resolve({ kind: "ok", value: null }),
|
|
15792
16283
|
[port, mediaRef]
|
|
15793
16284
|
);
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
16285
|
+
const quelle = phase.status === "ready" && phase.value ? `data:${phase.value.mime_type};base64,${phase.value.data}` : null;
|
|
16286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingangsbild-${mediaRef}`, children: [
|
|
16287
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16288
|
+
Kachel,
|
|
15797
16289
|
{
|
|
15798
|
-
|
|
15799
|
-
alt: `Eingangsbild ${mediaRef}
|
|
16290
|
+
quelle,
|
|
16291
|
+
alt: `Eingangsbild ${mediaRef}`,
|
|
16292
|
+
...phase.status === "error" ? { leerText: "Nicht ladbar" } : {}
|
|
15800
16293
|
}
|
|
15801
16294
|
),
|
|
15802
16295
|
phase.status === "error" && // Verzeichnet, aber nicht lesbar ist etwas anderes als
|
|
15803
16296
|
// unbekannt — der Unterschied gehoert sichtbar.
|
|
15804
|
-
/* @__PURE__ */ (0,
|
|
15805
|
-
/* @__PURE__ */ (0,
|
|
16297
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { "data-testid": `eingangsbild-fehler-${mediaRef}`, children: phase.message }),
|
|
16298
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: mediaRef })
|
|
15806
16299
|
] });
|
|
15807
16300
|
};
|
|
15808
|
-
|
|
15809
|
-
const [
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
);
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
16301
|
+
function useBildQuellen(port, bilder) {
|
|
16302
|
+
const [stand, setStand] = (0, import_react8.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
|
|
16303
|
+
const gehalten = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
|
|
16304
|
+
const gescheitert = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
|
|
16305
|
+
const [versuch, setVersuch] = (0, import_react8.useState)(0);
|
|
16306
|
+
const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
|
|
16307
|
+
(0, import_react8.useEffect)(() => {
|
|
16308
|
+
const bestand = port.imageLibrary;
|
|
16309
|
+
if (!bestand) return void 0;
|
|
16310
|
+
let abgebrochen = false;
|
|
16311
|
+
void (async () => {
|
|
16312
|
+
for (const bild of bilder) {
|
|
16313
|
+
if (abgebrochen) return;
|
|
16314
|
+
const vorher = gescheitert.current.get(bild.media_ref);
|
|
16315
|
+
const endgueltig = vorher !== void 0 && !vorher.retryable;
|
|
16316
|
+
if (gehalten.current.has(bild.media_ref) || endgueltig) continue;
|
|
16317
|
+
const ergebnis = await bestand.resolveImage(bild.media_ref, bild.mime_type ?? null);
|
|
16318
|
+
if (abgebrochen) return;
|
|
16319
|
+
if (ergebnis.kind === "ok" && ergebnis.value) {
|
|
16320
|
+
gehalten.current.set(
|
|
16321
|
+
bild.media_ref,
|
|
16322
|
+
`data:${ergebnis.value.mime_type};base64,${ergebnis.value.data}`
|
|
16323
|
+
);
|
|
16324
|
+
gescheitert.current.delete(bild.media_ref);
|
|
16325
|
+
} else if (ergebnis.kind === "error") {
|
|
16326
|
+
gescheitert.current.set(bild.media_ref, {
|
|
16327
|
+
message: ergebnis.message,
|
|
16328
|
+
retryable: ergebnis.retryable
|
|
16329
|
+
});
|
|
16330
|
+
}
|
|
16331
|
+
setStand({
|
|
16332
|
+
quellen: new Map(gehalten.current),
|
|
16333
|
+
fehler: new Map(gescheitert.current)
|
|
16334
|
+
});
|
|
15819
16335
|
}
|
|
15820
|
-
)
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15825
|
-
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
|
|
16336
|
+
})();
|
|
16337
|
+
return () => {
|
|
16338
|
+
abgebrochen = true;
|
|
16339
|
+
};
|
|
16340
|
+
}, [port, schluessel, versuch]);
|
|
16341
|
+
const fehlerNachricht = /* @__PURE__ */ new Map();
|
|
16342
|
+
let wiederholbar = false;
|
|
16343
|
+
for (const [ref, f] of stand.fehler) {
|
|
16344
|
+
fehlerNachricht.set(ref, f.message);
|
|
16345
|
+
if (f.retryable) wiederholbar = true;
|
|
16346
|
+
}
|
|
16347
|
+
return {
|
|
16348
|
+
quellen: stand.quellen,
|
|
16349
|
+
fehler: fehlerNachricht,
|
|
16350
|
+
wiederholbar,
|
|
16351
|
+
erneutVersuchen: () => setVersuch((n) => n + 1)
|
|
16352
|
+
};
|
|
16353
|
+
}
|
|
16354
|
+
var BildDetails = ({ bild, fehler: fehler4, aufloesbar }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "szenen-bilder__meta", "data-testid": `batchbild-${bild.media_ref}`, children: [
|
|
16355
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: bild.media_ref }),
|
|
16356
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16357
|
+
"Position ",
|
|
16358
|
+
bild.position
|
|
16359
|
+
] }),
|
|
16360
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: bild.model || "Modell unbekannt" }),
|
|
16361
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: bild.seed === null || bild.seed === void 0 || bild.seed === -1 ? "ohne Seed" : `Seed ${bild.seed}` }),
|
|
16362
|
+
bild.width && bild.height ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16363
|
+
bild.width,
|
|
16364
|
+
"\xD7",
|
|
16365
|
+
bild.height
|
|
16366
|
+
] }) : null,
|
|
16367
|
+
fehler4 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { "data-testid": `batchbild-fehler-${bild.media_ref}`, children: fehler4 }),
|
|
16368
|
+
!aufloesbar && // Capability-Grenze, kein Fehler: Dieser Host kann Batches lesen,
|
|
16369
|
+
// aber keine Bilder auflösen (E). Kein erfundener Fallback auf eine
|
|
16370
|
+
// Serverroute (A6).
|
|
16371
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { "data-testid": `batchbild-unsupported-${bild.media_ref}`, children: "Dieser Host l\xF6st keine Bilder auf \u2014 nur die Metadaten sind bekannt." })
|
|
16372
|
+
] });
|
|
16373
|
+
var HERKUNFT_TEXT = {
|
|
16374
|
+
generated_in_app: "in der App erzeugt",
|
|
16375
|
+
external_import: "extern importiert",
|
|
16376
|
+
mixed: "gemischte Herkunft"
|
|
15842
16377
|
};
|
|
15843
|
-
var
|
|
15844
|
-
"
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
|
|
15852
|
-
|
|
15853
|
-
|
|
15854
|
-
|
|
15855
|
-
|
|
16378
|
+
var HERKUNFT_KURZ = {
|
|
16379
|
+
generated_in_app: "in der App erzeugt",
|
|
16380
|
+
external_import: "extern importiert"
|
|
16381
|
+
};
|
|
16382
|
+
var BatchKachel = ({ port, batch }) => {
|
|
16383
|
+
const { quellen, fehler: fehler4, wiederholbar, erneutVersuchen } = useBildQuellen(port, batch.images);
|
|
16384
|
+
const aufloesbar = Boolean(port.imageLibrary);
|
|
16385
|
+
const bilder = batch.images.map((bild) => ({
|
|
16386
|
+
id: bild.media_ref,
|
|
16387
|
+
quelle: quellen.get(bild.media_ref) ?? null,
|
|
16388
|
+
titel: `Bild ${bild.position + 1}`,
|
|
16389
|
+
...fehler4.get(bild.media_ref) ? { leerText: "Nicht ladbar" } : {},
|
|
16390
|
+
details: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16391
|
+
BildDetails,
|
|
16392
|
+
{
|
|
16393
|
+
bild,
|
|
16394
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
16395
|
+
aufloesbar
|
|
16396
|
+
}
|
|
16397
|
+
)
|
|
16398
|
+
}));
|
|
16399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16400
|
+
"section",
|
|
16401
|
+
{
|
|
16402
|
+
className: "szenen-bilder__batch",
|
|
16403
|
+
"data-testid": `batch-${batch.item_id}`,
|
|
16404
|
+
"data-source-kind": batch.source_kind,
|
|
16405
|
+
children: [
|
|
16406
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "szenen-bilder__batchkopf", children: [
|
|
16407
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: batch.title }),
|
|
16408
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "szenen-bilder__herkunft", children: [
|
|
16409
|
+
HERKUNFT_TEXT[batch.source_kind],
|
|
16410
|
+
" \xB7 ",
|
|
16411
|
+
batch.images.length,
|
|
16412
|
+
" Bild(er)"
|
|
16413
|
+
] })
|
|
15856
16414
|
] }),
|
|
15857
|
-
/* @__PURE__ */ (0,
|
|
15858
|
-
|
|
15859
|
-
|
|
16415
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16416
|
+
BildGalerie,
|
|
16417
|
+
{
|
|
16418
|
+
bilder,
|
|
16419
|
+
testId: `batchgalerie-${batch.item_id}`,
|
|
16420
|
+
satzTitel: batch.title
|
|
16421
|
+
}
|
|
16422
|
+
),
|
|
16423
|
+
wiederholbar && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16424
|
+
"button",
|
|
16425
|
+
{
|
|
16426
|
+
type: "button",
|
|
16427
|
+
className: "szenen-bilder__retry",
|
|
16428
|
+
onClick: erneutVersuchen,
|
|
16429
|
+
"data-testid": `batch-retry-${batch.item_id}`,
|
|
16430
|
+
children: "Bilder erneut laden"
|
|
16431
|
+
}
|
|
16432
|
+
),
|
|
16433
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { className: "szenen-bilder__technik", "data-testid": `batch-technik-${batch.item_id}`, children: [
|
|
16434
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: "Technische Details" }),
|
|
16435
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__ids", children: [
|
|
16436
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16437
|
+
"Item ",
|
|
16438
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
16439
|
+
] }),
|
|
16440
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16441
|
+
"Batches",
|
|
16442
|
+
" ",
|
|
16443
|
+
batch.origins.length > 0 ? batch.origins.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react8.default.Fragment, { children: [
|
|
16444
|
+
i > 0 ? ", " : "",
|
|
16445
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: h.generation_batch_id }),
|
|
16446
|
+
` (${HERKUNFT_KURZ[h.source_kind]})`
|
|
16447
|
+
] }, h.generation_batch_id)) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: batch.generation_batch_ids.join(", ") })
|
|
16448
|
+
] })
|
|
16449
|
+
] }),
|
|
16450
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "szenen-bilder__batchliste", children: batch.images.map((bild) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16451
|
+
BildDetails,
|
|
16452
|
+
{
|
|
16453
|
+
bild,
|
|
16454
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
16455
|
+
aufloesbar
|
|
16456
|
+
}
|
|
16457
|
+
) }, bild.media_ref)) })
|
|
15860
16458
|
] })
|
|
15861
|
-
]
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
|
|
15865
|
-
);
|
|
16459
|
+
]
|
|
16460
|
+
}
|
|
16461
|
+
);
|
|
16462
|
+
};
|
|
15866
16463
|
var ProfilBefunde = ({ wahl, runId }) => {
|
|
15867
16464
|
if (wahl.invalid_profiles.length === 0) return null;
|
|
15868
|
-
return /* @__PURE__ */ (0,
|
|
16465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-profilbefunde-${runId}`, role: "alert", children: [
|
|
15869
16466
|
"Nicht angeboten, weil das Profil unvollst\xE4ndig ist:",
|
|
15870
16467
|
" ",
|
|
15871
16468
|
wahl.invalid_profiles.join(" \xB7 ")
|
|
15872
16469
|
] });
|
|
15873
16470
|
};
|
|
15874
16471
|
var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
15875
|
-
const [modellWahl, setModellWahl] = (0,
|
|
15876
|
-
const [anzahlText, setAnzahlText] = (0,
|
|
15877
|
-
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0,
|
|
15878
|
-
const [laeuft, setLaeuft] = (0,
|
|
15879
|
-
const [notiz, setNotiz] = (0,
|
|
16472
|
+
const [modellWahl, setModellWahl] = (0, import_react8.useState)(null);
|
|
16473
|
+
const [anzahlText, setAnzahlText] = (0, import_react8.useState)("1");
|
|
16474
|
+
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0, import_react8.useState)("");
|
|
16475
|
+
const [laeuft, setLaeuft] = (0, import_react8.useState)(false);
|
|
16476
|
+
const [notiz, setNotiz] = (0, import_react8.useState)(null);
|
|
15880
16477
|
if (!port.imageGeneration) {
|
|
15881
|
-
return /* @__PURE__ */ (0,
|
|
16478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `erzeugen-unsupported-${lauf.run_id}`, children: "Dieser Host erzeugt keine Bilder \u2014 entweder fehlt der Providerzugang oder der gesicherte Speicherweg. Externe Bilder lassen sich trotzdem zuordnen." });
|
|
15882
16479
|
}
|
|
15883
16480
|
if (wahlFehler) {
|
|
15884
|
-
return /* @__PURE__ */ (0,
|
|
16481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15885
16482
|
"Die F\xE4higkeitsauskunft schlug fehl: ",
|
|
15886
16483
|
wahlFehler
|
|
15887
16484
|
] });
|
|
15888
16485
|
}
|
|
15889
|
-
if (!wahl) return /* @__PURE__ */ (0,
|
|
16486
|
+
if (!wahl) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Bildf\xE4higkeit wird gepr\xFCft \u2026" });
|
|
15890
16487
|
if (wahl.models.length === 0) {
|
|
15891
16488
|
return (
|
|
15892
16489
|
// Kein Fehler und kein Grund, den Lauf zu sperren: Der externe
|
|
15893
16490
|
// Importweg bleibt daneben stehen (D-104.5).
|
|
15894
|
-
/* @__PURE__ */ (0,
|
|
15895
|
-
/* @__PURE__ */ (0,
|
|
16491
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16492
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-unsupported-modell-${lauf.run_id}`, children: [
|
|
15896
16493
|
"Hier kann derzeit kein Bild erzeugt werden:",
|
|
15897
16494
|
" ",
|
|
15898
16495
|
wahl.reason ?? "Kein sichtbares Zielmodell tr\xE4gt ein ausf\xFChrbares Profil."
|
|
15899
16496
|
] }),
|
|
15900
|
-
/* @__PURE__ */ (0,
|
|
16497
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ProfilBefunde, { wahl, runId: lauf.run_id })
|
|
15901
16498
|
] })
|
|
15902
16499
|
);
|
|
15903
16500
|
}
|
|
@@ -15946,22 +16543,21 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15946
16543
|
onFertig();
|
|
15947
16544
|
};
|
|
15948
16545
|
const negativVorhanden = Boolean(lauf.output?.negative && lauf.output.negative.trim());
|
|
15949
|
-
return /* @__PURE__ */ (0,
|
|
15950
|
-
/* @__PURE__ */ (0,
|
|
15951
|
-
/* @__PURE__ */ (0,
|
|
15952
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { "data-testid": `erzeugen-zielmodell-${lauf.run_id}`, children: wahl.prompt_target_model_key ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
16546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `erzeugen-${lauf.run_id}`, children: [
|
|
16547
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ProfilBefunde, { wahl, runId: lauf.run_id }),
|
|
16548
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `erzeugen-zielmodell-${lauf.run_id}`, children: wahl.prompt_target_model_key ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15953
16549
|
"Prompt optimiert f\xFCr ",
|
|
15954
|
-
/* @__PURE__ */ (0,
|
|
16550
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: wahl.prompt_target_model_key })
|
|
15955
16551
|
] }) : "Dieser Lauf tr\xE4gt keine Optimierungsabsicht (kein target_model)." }),
|
|
15956
|
-
/* @__PURE__ */ (0,
|
|
16552
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
15957
16553
|
"Bildmodell",
|
|
15958
|
-
/* @__PURE__ */ (0,
|
|
16554
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15959
16555
|
"select",
|
|
15960
16556
|
{
|
|
15961
16557
|
value: aktiv.selection_id,
|
|
15962
16558
|
"data-testid": `erzeugen-modellwahl-${lauf.run_id}`,
|
|
15963
16559
|
onChange: (e) => modellWechseln(e.target.value),
|
|
15964
|
-
children: wahl.models.map((m) => /* @__PURE__ */ (0,
|
|
16560
|
+
children: wahl.models.map((m) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("option", { value: m.selection_id, children: [
|
|
15965
16561
|
m.display_name,
|
|
15966
16562
|
" (",
|
|
15967
16563
|
m.provider,
|
|
@@ -15971,7 +16567,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15971
16567
|
}
|
|
15972
16568
|
)
|
|
15973
16569
|
] }),
|
|
15974
|
-
/* @__PURE__ */ (0,
|
|
16570
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-modell-${lauf.run_id}`, children: [
|
|
15975
16571
|
aktiv.display_name,
|
|
15976
16572
|
" bei ",
|
|
15977
16573
|
aktiv.provider,
|
|
@@ -15980,26 +16576,26 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15980
16576
|
aktiv.max_images,
|
|
15981
16577
|
" Bilder je Auftrag"
|
|
15982
16578
|
] }),
|
|
15983
|
-
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */ (0,
|
|
16579
|
+
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-abweichung-${lauf.run_id}`, children: [
|
|
15984
16580
|
"Hinweis: Prompt optimiert f\xFCr ",
|
|
15985
|
-
/* @__PURE__ */ (0,
|
|
16581
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: wahl.prompt_target_model_key }),
|
|
15986
16582
|
", Bilder werden mit ",
|
|
15987
|
-
/* @__PURE__ */ (0,
|
|
16583
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: aktiv.display_name }),
|
|
15988
16584
|
" erzeugt. Das ist zul\xE4ssig \u2014 ein abweichendes Ergebnis liegt dann nicht zwingend am Prompt."
|
|
15989
16585
|
] }),
|
|
15990
16586
|
negativVorhanden && !aktiv.accepts_negative_prompt && // Nicht still verlieren: Der eingefrorene Lauf trägt einen
|
|
15991
16587
|
// negativen Prompt, den dieser Modellweg nicht führt. Wer das
|
|
15992
16588
|
// weiß, kann ihn in den positiven Prompt einarbeiten — wer es
|
|
15993
16589
|
// nicht weiß, wundert sich über das Bild.
|
|
15994
|
-
/* @__PURE__ */ (0,
|
|
16590
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-negativ-hinweis-${lauf.run_id}`, children: [
|
|
15995
16591
|
"Achtung: Dieser Lauf tr\xE4gt einen negativen Prompt.",
|
|
15996
16592
|
" ",
|
|
15997
16593
|
aktiv.display_name,
|
|
15998
16594
|
" f\xFChrt diesen Promptkanal nicht \u2014 der negative Prompt l\xE4uft nicht mit."
|
|
15999
16595
|
] }),
|
|
16000
|
-
/* @__PURE__ */ (0,
|
|
16596
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16001
16597
|
"Anzahl",
|
|
16002
|
-
/* @__PURE__ */ (0,
|
|
16598
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16003
16599
|
"input",
|
|
16004
16600
|
{
|
|
16005
16601
|
type: "number",
|
|
@@ -16011,27 +16607,27 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
16011
16607
|
}
|
|
16012
16608
|
)
|
|
16013
16609
|
] }),
|
|
16014
|
-
/* @__PURE__ */ (0,
|
|
16610
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16015
16611
|
"Seitenverh\xE4ltnis",
|
|
16016
|
-
/* @__PURE__ */ (0,
|
|
16612
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16017
16613
|
"select",
|
|
16018
16614
|
{
|
|
16019
16615
|
value: seitenverhaeltnis,
|
|
16020
16616
|
"data-testid": `erzeugen-format-${lauf.run_id}`,
|
|
16021
16617
|
onChange: (e) => setSeitenverhaeltnis(e.target.value),
|
|
16022
16618
|
children: [
|
|
16023
|
-
/* @__PURE__ */ (0,
|
|
16024
|
-
aktiv.aspect_ratios.map((v) => /* @__PURE__ */ (0,
|
|
16619
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "(Vorgabe des Modells)" }),
|
|
16620
|
+
aktiv.aspect_ratios.map((v) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: v, children: v }, v))
|
|
16025
16621
|
]
|
|
16026
16622
|
}
|
|
16027
16623
|
)
|
|
16028
16624
|
] }),
|
|
16029
|
-
!aktiv.accepts_seed && /* @__PURE__ */ (0,
|
|
16625
|
+
!aktiv.accepts_seed && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-ohne-seed-${lauf.run_id}`, children: [
|
|
16030
16626
|
aktiv.display_name,
|
|
16031
16627
|
" kennt keinen Seed \u2014 er wird deshalb weder angeboten noch protokolliert."
|
|
16032
16628
|
] }),
|
|
16033
|
-
parameterBefunde.length > 0 && /* @__PURE__ */ (0,
|
|
16034
|
-
/* @__PURE__ */ (0,
|
|
16629
|
+
parameterBefunde.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `erzeugen-parameterbefund-${lauf.run_id}`, role: "alert", children: parameterBefunde.join(" ") }),
|
|
16630
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16035
16631
|
"button",
|
|
16036
16632
|
{
|
|
16037
16633
|
type: "button",
|
|
@@ -16041,7 +16637,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
16041
16637
|
children: laeuft ? "Bilder werden erzeugt \u2026" : "Bilder erzeugen"
|
|
16042
16638
|
}
|
|
16043
16639
|
),
|
|
16044
|
-
notiz && /* @__PURE__ */ (0,
|
|
16640
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16045
16641
|
"p",
|
|
16046
16642
|
{
|
|
16047
16643
|
"data-testid": `erzeugen-notiz-${lauf.run_id}`,
|
|
@@ -16052,21 +16648,114 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
16052
16648
|
)
|
|
16053
16649
|
] });
|
|
16054
16650
|
};
|
|
16651
|
+
var DEFAULT_VORLAGE_KEY = "__default__";
|
|
16055
16652
|
var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
16056
|
-
const [dateien, setDateien] = (0,
|
|
16057
|
-
const [seeds, setSeeds] = (0,
|
|
16058
|
-
const [
|
|
16059
|
-
const [
|
|
16060
|
-
const [
|
|
16061
|
-
const [
|
|
16653
|
+
const [dateien, setDateien] = (0, import_react8.useState)([]);
|
|
16654
|
+
const [seeds, setSeeds] = (0, import_react8.useState)({});
|
|
16655
|
+
const [zip, setZip] = (0, import_react8.useState)(null);
|
|
16656
|
+
const [zipLaedt, setZipLaedt] = (0, import_react8.useState)(false);
|
|
16657
|
+
const [seedListe, setSeedListe] = (0, import_react8.useState)("");
|
|
16658
|
+
const [vorlagen, setVorlagen] = (0, import_react8.useState)([DEFAULT_SEED_VORLAGE]);
|
|
16659
|
+
const [vorlageKey, setVorlageKey] = (0, import_react8.useState)(DEFAULT_VORLAGE_KEY);
|
|
16660
|
+
const [vorlagenStand, setVorlagenStand] = (0, import_react8.useState)(0);
|
|
16661
|
+
const [vorlageBenennen, setVorlageBenennen] = (0, import_react8.useState)(false);
|
|
16662
|
+
const [vorlageName, setVorlageName] = (0, import_react8.useState)("");
|
|
16663
|
+
const [modell, setModell] = (0, import_react8.useState)("");
|
|
16664
|
+
const [itemId, setItemId] = (0, import_react8.useState)("");
|
|
16665
|
+
const [laeuft, setLaeuft] = (0, import_react8.useState)(false);
|
|
16666
|
+
const [notiz, setNotiz] = (0, import_react8.useState)(null);
|
|
16667
|
+
const auswahlMarke = (0, import_react8.useRef)(0);
|
|
16668
|
+
const zipAktiv = zip !== null;
|
|
16669
|
+
(0, import_react8.useEffect)(() => {
|
|
16670
|
+
if (!zipAktiv) return;
|
|
16671
|
+
let abgebrochen = false;
|
|
16672
|
+
void (async () => {
|
|
16673
|
+
const gelesen = port.seedTemplates ? await port.seedTemplates.listSeedTemplates() : null;
|
|
16674
|
+
if (abgebrochen) return;
|
|
16675
|
+
setVorlagen(mitDefaultVorlage(
|
|
16676
|
+
gelesen && gelesen.kind === "ok" ? gelesen.value : []
|
|
16677
|
+
));
|
|
16678
|
+
})();
|
|
16679
|
+
return () => {
|
|
16680
|
+
abgebrochen = true;
|
|
16681
|
+
};
|
|
16682
|
+
}, [zipAktiv, port, vorlagenStand]);
|
|
16062
16683
|
if (!port.imageBatchWrite) {
|
|
16063
|
-
return /* @__PURE__ */ (0,
|
|
16064
|
-
}
|
|
16065
|
-
const
|
|
16684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `zuordnen-unsupported-${lauf.run_id}`, children: "Dieser Host ordnet keine externen Bilder zu \u2014 er hat keinen gesicherten Batch-Schreibweg. Die Historie oben bleibt trotzdem sichtbar." });
|
|
16685
|
+
}
|
|
16686
|
+
const zuordnung = zip ? ordneSeedsZu(seedListe, zip.bilder.length) : null;
|
|
16687
|
+
const dateiWahl = async (liste) => {
|
|
16688
|
+
const gewaehlt = [...liste ?? []];
|
|
16689
|
+
const warZip = zip !== null;
|
|
16690
|
+
const meine = auswahlMarke.current += 1;
|
|
16691
|
+
const veraltet = () => auswahlMarke.current !== meine;
|
|
16692
|
+
const zips = gewaehlt.filter(istZipDatei);
|
|
16693
|
+
const nurEinZip = zips.length === 1 && gewaehlt.length === 1;
|
|
16694
|
+
setNotiz(null);
|
|
16695
|
+
setSeeds({});
|
|
16696
|
+
setZip(null);
|
|
16697
|
+
setDateien(zips.length === 0 ? gewaehlt : []);
|
|
16698
|
+
setZipLaedt(nurEinZip);
|
|
16699
|
+
if (zips.length > 0 && zips.length !== gewaehlt.length) {
|
|
16700
|
+
setNotiz({
|
|
16701
|
+
tone: "error",
|
|
16702
|
+
text: `Die Auswahl enth\xE4lt ${zips.length} ZIP-Datei(en) und ${gewaehlt.length - zips.length} Bilddatei(en). Bitte entweder ein ZIP oder einzelne Bilder w\xE4hlen \u2014 nicht beides in einem Import.`
|
|
16703
|
+
});
|
|
16704
|
+
return;
|
|
16705
|
+
}
|
|
16706
|
+
if (zips.length > 1) {
|
|
16707
|
+
setNotiz({
|
|
16708
|
+
tone: "error",
|
|
16709
|
+
text: `${zips.length} ZIP-Dateien gew\xE4hlt (${zips.map((z) => z.name).join(", ")}). Ein Import nimmt genau ein ZIP.`
|
|
16710
|
+
});
|
|
16711
|
+
return;
|
|
16712
|
+
}
|
|
16713
|
+
if (!nurEinZip) return;
|
|
16714
|
+
const datei = zips[0];
|
|
16715
|
+
try {
|
|
16716
|
+
const bilder = await leseBilderAusZip(datei);
|
|
16717
|
+
if (veraltet()) return;
|
|
16718
|
+
setZip({ datei, bilder });
|
|
16719
|
+
if (!warZip) {
|
|
16720
|
+
setSeedListe(DEFAULT_SEED_VORLAGE.seeds);
|
|
16721
|
+
setVorlageKey(DEFAULT_VORLAGE_KEY);
|
|
16722
|
+
}
|
|
16723
|
+
} catch (fehler4) {
|
|
16724
|
+
if (veraltet()) return;
|
|
16725
|
+
setNotiz({
|
|
16726
|
+
tone: "error",
|
|
16727
|
+
text: fehler4 instanceof Error ? fehler4.message : String(fehler4)
|
|
16728
|
+
});
|
|
16729
|
+
}
|
|
16730
|
+
if (veraltet()) return;
|
|
16731
|
+
setZipLaedt(false);
|
|
16732
|
+
};
|
|
16733
|
+
const schreiben = async (bilder, generationBatchId, titel) => {
|
|
16066
16734
|
setLaeuft(true);
|
|
16067
16735
|
setNotiz(null);
|
|
16068
16736
|
try {
|
|
16069
|
-
const
|
|
16737
|
+
const ergebnis = await port.imageBatchWrite.importBatch({
|
|
16738
|
+
runId: lauf.run_id,
|
|
16739
|
+
generationBatchId,
|
|
16740
|
+
images: bilder,
|
|
16741
|
+
title: titel
|
|
16742
|
+
});
|
|
16743
|
+
setNotiz(
|
|
16744
|
+
ergebnis.kind === "ok" ? { tone: "ok", text: `Importiert als Item ${ergebnis.value.item_id} mit ${bilder.length} Bild(ern).` } : noticeFor(ergebnis, "Externe Bilder importieren")
|
|
16745
|
+
);
|
|
16746
|
+
} catch (fehler4) {
|
|
16747
|
+
setNotiz({
|
|
16748
|
+
tone: "error",
|
|
16749
|
+
text: `Externe Bilder importieren: ${fehler4 instanceof Error ? fehler4.message : String(fehler4)}`
|
|
16750
|
+
});
|
|
16751
|
+
}
|
|
16752
|
+
setLaeuft(false);
|
|
16753
|
+
onFertig();
|
|
16754
|
+
};
|
|
16755
|
+
const importieren = async () => {
|
|
16756
|
+
let bilder;
|
|
16757
|
+
try {
|
|
16758
|
+
bilder = [];
|
|
16070
16759
|
for (let index = 0; index < dateien.length; index++) {
|
|
16071
16760
|
const roh = (seeds[index] ?? "").trim();
|
|
16072
16761
|
const seed = roh === "" ? void 0 : Number.parseInt(roh, 10);
|
|
@@ -16079,25 +16768,42 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16079
16768
|
...seed !== void 0 ? { seed } : {}
|
|
16080
16769
|
});
|
|
16081
16770
|
}
|
|
16082
|
-
const ergebnis = await port.imageBatchWrite.importBatch({
|
|
16083
|
-
runId: lauf.run_id,
|
|
16084
|
-
// Vor dem Aufruf gebildet und stabil (D-113): eine Wiederholung
|
|
16085
|
-
// derselben Einreichung erzeugt kein zweites Item.
|
|
16086
|
-
generationBatchId: `imp-${lauf.run_id}-${dateien.length}-${dateien.map((d) => d.size).join("_")}`,
|
|
16087
|
-
images: bilder,
|
|
16088
|
-
title: `Externer Import zu Lauf ${lauf.run_id}`
|
|
16089
|
-
});
|
|
16090
|
-
setNotiz(
|
|
16091
|
-
ergebnis.kind === "ok" ? { tone: "ok", text: `Importiert als Item ${ergebnis.value.item_id} mit ${bilder.length} Bild(ern).` } : noticeFor(ergebnis, "Externe Bilder importieren")
|
|
16092
|
-
);
|
|
16093
16771
|
} catch (fehler4) {
|
|
16094
16772
|
setNotiz({
|
|
16095
16773
|
tone: "error",
|
|
16096
16774
|
text: `Externe Bilder importieren: ${fehler4 instanceof Error ? fehler4.message : String(fehler4)}`
|
|
16097
16775
|
});
|
|
16776
|
+
return;
|
|
16098
16777
|
}
|
|
16099
|
-
|
|
16100
|
-
|
|
16778
|
+
await schreiben(
|
|
16779
|
+
bilder,
|
|
16780
|
+
// Vor dem Aufruf gebildet und stabil (D-113): eine Wiederholung
|
|
16781
|
+
// derselben Einreichung erzeugt kein zweites Item.
|
|
16782
|
+
`imp-${lauf.run_id}-${dateien.length}-${dateien.map((d) => d.size).join("_")}`,
|
|
16783
|
+
`Externer Import zu Lauf ${lauf.run_id}`
|
|
16784
|
+
);
|
|
16785
|
+
};
|
|
16786
|
+
const zipImportieren = async () => {
|
|
16787
|
+
if (!zip || !zuordnung) return;
|
|
16788
|
+
if (zuordnung.ungueltige.length > 0) {
|
|
16789
|
+
setNotiz({ tone: "error", text: seedFehlerText(zuordnung.ungueltige) });
|
|
16790
|
+
return;
|
|
16791
|
+
}
|
|
16792
|
+
const bilder = zip.bilder.map((bild, index) => {
|
|
16793
|
+
const seed = zuordnung.eintraege[index]?.seed ?? null;
|
|
16794
|
+
return {
|
|
16795
|
+
imageBase64: bild.base64,
|
|
16796
|
+
...modell.trim() ? { model: modell.trim() } : {},
|
|
16797
|
+
// Unbekannt bleibt unbekannt: kein Feld statt eines erfundenen
|
|
16798
|
+
// Werts (§6.1).
|
|
16799
|
+
...seed !== null ? { seed } : {}
|
|
16800
|
+
};
|
|
16801
|
+
});
|
|
16802
|
+
await schreiben(
|
|
16803
|
+
bilder,
|
|
16804
|
+
`imp-${lauf.run_id}-zip-${zip.datei.size}-${bilder.length}`,
|
|
16805
|
+
`Externer Import zu Lauf ${lauf.run_id} (${zip.datei.name})`
|
|
16806
|
+
);
|
|
16101
16807
|
};
|
|
16102
16808
|
const zuordnen = async () => {
|
|
16103
16809
|
setLaeuft(true);
|
|
@@ -16115,46 +16821,73 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16115
16821
|
setLaeuft(false);
|
|
16116
16822
|
onFertig();
|
|
16117
16823
|
};
|
|
16118
|
-
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16122
|
-
|
|
16824
|
+
const vorlageWaehlen = (key) => {
|
|
16825
|
+
setVorlageKey(key);
|
|
16826
|
+
const vorlage = key === DEFAULT_VORLAGE_KEY ? DEFAULT_SEED_VORLAGE : vorlagen.find((v) => String(v.id) === key);
|
|
16827
|
+
if (vorlage) setSeedListe(vorlage.seeds);
|
|
16828
|
+
};
|
|
16829
|
+
const vorlageSpeichern = async () => {
|
|
16830
|
+
const name = vorlageName.trim();
|
|
16831
|
+
if (!name || !seedListe.trim() || !port.seedTemplates?.saveSeedTemplate) return;
|
|
16832
|
+
const ergebnis = await port.seedTemplates.saveSeedTemplate({ name, seeds: seedListe.trim() });
|
|
16833
|
+
if (ergebnis.kind !== "ok") {
|
|
16834
|
+
setNotiz(noticeFor(ergebnis, "Seed-Vorlage speichern"));
|
|
16835
|
+
return;
|
|
16836
|
+
}
|
|
16837
|
+
setVorlageBenennen(false);
|
|
16838
|
+
setVorlageName("");
|
|
16839
|
+
if (ergebnis.value.id !== void 0) setVorlageKey(String(ergebnis.value.id));
|
|
16840
|
+
setVorlagenStand((n) => n + 1);
|
|
16841
|
+
};
|
|
16842
|
+
const vorlageLoeschen = async () => {
|
|
16843
|
+
if (vorlageKey === DEFAULT_VORLAGE_KEY || !port.seedTemplates?.deleteSeedTemplate) return;
|
|
16844
|
+
const ergebnis = await port.seedTemplates.deleteSeedTemplate(vorlageKey);
|
|
16845
|
+
if (ergebnis.kind !== "ok") {
|
|
16846
|
+
setNotiz(noticeFor(ergebnis, "Seed-Vorlage l\xF6schen"));
|
|
16847
|
+
return;
|
|
16848
|
+
}
|
|
16849
|
+
setVorlageKey(DEFAULT_VORLAGE_KEY);
|
|
16850
|
+
setVorlagenStand((n) => n + 1);
|
|
16851
|
+
};
|
|
16852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `zuordnen-${lauf.run_id}`, children: [
|
|
16853
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16854
|
+
"Bilddateien oder ein ZIP",
|
|
16855
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16123
16856
|
"input",
|
|
16124
16857
|
{
|
|
16125
16858
|
type: "file",
|
|
16126
|
-
accept: "image
|
|
16859
|
+
accept: "image/*,.zip",
|
|
16127
16860
|
multiple: true,
|
|
16128
16861
|
"data-testid": `zuordnen-dateien-${lauf.run_id}`,
|
|
16129
16862
|
onChange: (e) => {
|
|
16130
|
-
|
|
16131
|
-
setSeeds({});
|
|
16863
|
+
void dateiWahl(e.target.files);
|
|
16132
16864
|
}
|
|
16133
16865
|
}
|
|
16134
16866
|
)
|
|
16135
16867
|
] }),
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
|
|
16148
|
-
|
|
16149
|
-
|
|
16868
|
+
zipLaedt && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `zuordnen-zip-laedt-${lauf.run_id}`, children: "ZIP wird gelesen \u2026" }),
|
|
16869
|
+
(dateien.length > 0 || zip) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16870
|
+
"Modell (f\xFCr alle Bilder, leer = unbekannt)",
|
|
16871
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16872
|
+
"input",
|
|
16873
|
+
{
|
|
16874
|
+
value: modell,
|
|
16875
|
+
"data-testid": `zuordnen-modell-${lauf.run_id}`,
|
|
16876
|
+
onChange: (e) => setModell(e.target.value)
|
|
16877
|
+
}
|
|
16878
|
+
)
|
|
16879
|
+
] }),
|
|
16880
|
+
dateien.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16881
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ol", { "data-testid": `zuordnen-vorschau-${lauf.run_id}`, children: dateien.map((datei, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("li", { children: [
|
|
16882
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16150
16883
|
"Position ",
|
|
16151
16884
|
index,
|
|
16152
16885
|
": ",
|
|
16153
16886
|
datei.name
|
|
16154
16887
|
] }),
|
|
16155
|
-
/* @__PURE__ */ (0,
|
|
16888
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16156
16889
|
"Seed (leer = unbekannt)",
|
|
16157
|
-
/* @__PURE__ */ (0,
|
|
16890
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16158
16891
|
"input",
|
|
16159
16892
|
{
|
|
16160
16893
|
"data-testid": `zuordnen-seed-${lauf.run_id}-${index}`,
|
|
@@ -16164,7 +16897,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16164
16897
|
)
|
|
16165
16898
|
] })
|
|
16166
16899
|
] }, `${datei.name}-${index}`)) }),
|
|
16167
|
-
/* @__PURE__ */ (0,
|
|
16900
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16168
16901
|
"button",
|
|
16169
16902
|
{
|
|
16170
16903
|
type: "button",
|
|
@@ -16178,9 +16911,160 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16178
16911
|
}
|
|
16179
16912
|
)
|
|
16180
16913
|
] }),
|
|
16181
|
-
/* @__PURE__ */ (0,
|
|
16914
|
+
zip && zuordnung && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder__zip", "data-testid": `zuordnen-zip-${lauf.run_id}`, children: [
|
|
16915
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__zipkopf", children: [
|
|
16916
|
+
"ZIP ",
|
|
16917
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: zip.datei.name }),
|
|
16918
|
+
" \u2014 ",
|
|
16919
|
+
zip.bilder.length,
|
|
16920
|
+
" Bild(er) erkannt"
|
|
16921
|
+
] }),
|
|
16922
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16923
|
+
"Seeds (pro Bild ein Seed, Trenner , oder ;)",
|
|
16924
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16925
|
+
"input",
|
|
16926
|
+
{
|
|
16927
|
+
"data-testid": `zuordnen-seedliste-${lauf.run_id}`,
|
|
16928
|
+
value: seedListe,
|
|
16929
|
+
placeholder: "z. B. 1; 10; 100; 1000",
|
|
16930
|
+
onChange: (e) => setSeedListe(e.target.value)
|
|
16931
|
+
}
|
|
16932
|
+
)
|
|
16933
|
+
] }),
|
|
16934
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16935
|
+
"Seed-Vorlage",
|
|
16936
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16937
|
+
"select",
|
|
16938
|
+
{
|
|
16939
|
+
"data-testid": `zuordnen-seedvorlage-${lauf.run_id}`,
|
|
16940
|
+
value: vorlageKey,
|
|
16941
|
+
onChange: (e) => vorlageWaehlen(e.target.value),
|
|
16942
|
+
children: [
|
|
16943
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("option", { value: DEFAULT_VORLAGE_KEY, children: [
|
|
16944
|
+
"Default (",
|
|
16945
|
+
DEFAULT_SEED_VORLAGE.seeds,
|
|
16946
|
+
")"
|
|
16947
|
+
] }),
|
|
16948
|
+
vorlagen.filter((v) => !v.builtin).map((v) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("option", { value: String(v.id), children: [
|
|
16949
|
+
v.name,
|
|
16950
|
+
" (",
|
|
16951
|
+
v.seeds,
|
|
16952
|
+
")"
|
|
16953
|
+
] }, String(v.id)))
|
|
16954
|
+
]
|
|
16955
|
+
}
|
|
16956
|
+
)
|
|
16957
|
+
] }),
|
|
16958
|
+
(port.seedTemplates?.saveSeedTemplate || port.seedTemplates?.deleteSeedTemplate) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__zipvorlagen", children: [
|
|
16959
|
+
port.seedTemplates?.saveSeedTemplate && !vorlageBenennen && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16960
|
+
"button",
|
|
16961
|
+
{
|
|
16962
|
+
type: "button",
|
|
16963
|
+
"data-testid": `zuordnen-vorlage-neu-${lauf.run_id}`,
|
|
16964
|
+
disabled: !seedListe.trim(),
|
|
16965
|
+
onClick: () => {
|
|
16966
|
+
setVorlageName("");
|
|
16967
|
+
setVorlageBenennen(true);
|
|
16968
|
+
},
|
|
16969
|
+
children: "Als Vorlage speichern"
|
|
16970
|
+
}
|
|
16971
|
+
),
|
|
16972
|
+
port.seedTemplates?.deleteSeedTemplate && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16973
|
+
"button",
|
|
16974
|
+
{
|
|
16975
|
+
type: "button",
|
|
16976
|
+
"data-testid": `zuordnen-vorlage-loeschen-${lauf.run_id}`,
|
|
16977
|
+
disabled: vorlageKey === DEFAULT_VORLAGE_KEY,
|
|
16978
|
+
onClick: () => {
|
|
16979
|
+
void vorlageLoeschen();
|
|
16980
|
+
},
|
|
16981
|
+
children: "Vorlage l\xF6schen"
|
|
16982
|
+
}
|
|
16983
|
+
)
|
|
16984
|
+
] }),
|
|
16985
|
+
vorlageBenennen && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16986
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16987
|
+
"Name der Vorlage",
|
|
16988
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16989
|
+
"input",
|
|
16990
|
+
{
|
|
16991
|
+
"data-testid": `zuordnen-vorlage-name-${lauf.run_id}`,
|
|
16992
|
+
value: vorlageName,
|
|
16993
|
+
onChange: (e) => setVorlageName(e.target.value)
|
|
16994
|
+
}
|
|
16995
|
+
)
|
|
16996
|
+
] }),
|
|
16997
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__zipvorlagen", children: [
|
|
16998
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16999
|
+
"button",
|
|
17000
|
+
{
|
|
17001
|
+
type: "button",
|
|
17002
|
+
"data-testid": `zuordnen-vorlage-sichern-${lauf.run_id}`,
|
|
17003
|
+
disabled: !vorlageName.trim(),
|
|
17004
|
+
onClick: () => {
|
|
17005
|
+
void vorlageSpeichern();
|
|
17006
|
+
},
|
|
17007
|
+
children: "Speichern"
|
|
17008
|
+
}
|
|
17009
|
+
),
|
|
17010
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
17011
|
+
"button",
|
|
17012
|
+
{
|
|
17013
|
+
type: "button",
|
|
17014
|
+
"data-testid": `zuordnen-vorlage-abbrechen-${lauf.run_id}`,
|
|
17015
|
+
onClick: () => setVorlageBenennen(false),
|
|
17016
|
+
children: "Abbrechen"
|
|
17017
|
+
}
|
|
17018
|
+
)
|
|
17019
|
+
] })
|
|
17020
|
+
] }),
|
|
17021
|
+
zuordnung.ueberzaehlig > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `zuordnen-ueberzaehlig-${lauf.run_id}`, children: [
|
|
17022
|
+
zuordnung.ueberzaehlig,
|
|
17023
|
+
" Seed(s) mehr als Bilder \u2014 die \xFCberz\xE4hligen werden nicht geschrieben."
|
|
17024
|
+
] }),
|
|
17025
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
17026
|
+
"ol",
|
|
17027
|
+
{
|
|
17028
|
+
className: "szenen-bilder__zipliste",
|
|
17029
|
+
"data-testid": `zuordnen-zip-vorschau-${lauf.run_id}`,
|
|
17030
|
+
children: zip.bilder.map((bild, index) => {
|
|
17031
|
+
const eintrag = zuordnung.eintraege[index];
|
|
17032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("li", { children: [
|
|
17033
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
17034
|
+
"Position ",
|
|
17035
|
+
index,
|
|
17036
|
+
": ",
|
|
17037
|
+
bild.name
|
|
17038
|
+
] }),
|
|
17039
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
17040
|
+
"span",
|
|
17041
|
+
{
|
|
17042
|
+
"data-testid": `zuordnen-zip-seed-${lauf.run_id}-${index}`,
|
|
17043
|
+
"data-seed": eintrag.seed === null ? "" : String(eintrag.seed),
|
|
17044
|
+
children: eintrag.ungueltig ? `Seed ung\xFCltig: "${eintrag.roh}"` : eintrag.seed === null ? "Seed unbekannt" : `Seed ${eintrag.seed}`
|
|
17045
|
+
}
|
|
17046
|
+
)
|
|
17047
|
+
] }, `${bild.name}-${index}`);
|
|
17048
|
+
})
|
|
17049
|
+
}
|
|
17050
|
+
),
|
|
17051
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
17052
|
+
"button",
|
|
17053
|
+
{
|
|
17054
|
+
type: "button",
|
|
17055
|
+
"data-testid": `zuordnen-zip-import-${lauf.run_id}`,
|
|
17056
|
+
disabled: laeuft || zipLaedt,
|
|
17057
|
+
onClick: zipImportieren,
|
|
17058
|
+
children: [
|
|
17059
|
+
zip.bilder.length,
|
|
17060
|
+
" Bild(er) aus ZIP importieren"
|
|
17061
|
+
]
|
|
17062
|
+
}
|
|
17063
|
+
)
|
|
17064
|
+
] }),
|
|
17065
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16182
17066
|
"Oder ein bestehendes Library-Item",
|
|
16183
|
-
/* @__PURE__ */ (0,
|
|
17067
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16184
17068
|
"input",
|
|
16185
17069
|
{
|
|
16186
17070
|
value: itemId,
|
|
@@ -16190,7 +17074,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16190
17074
|
}
|
|
16191
17075
|
)
|
|
16192
17076
|
] }),
|
|
16193
|
-
/* @__PURE__ */ (0,
|
|
17077
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16194
17078
|
"button",
|
|
16195
17079
|
{
|
|
16196
17080
|
type: "button",
|
|
@@ -16200,7 +17084,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16200
17084
|
children: "Bestehendes Item zuordnen"
|
|
16201
17085
|
}
|
|
16202
17086
|
),
|
|
16203
|
-
notiz && /* @__PURE__ */ (0,
|
|
17087
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16204
17088
|
"p",
|
|
16205
17089
|
{
|
|
16206
17090
|
"data-testid": `zuordnen-notiz-${lauf.run_id}`,
|
|
@@ -16225,14 +17109,16 @@ function readAsBase64(datei) {
|
|
|
16225
17109
|
}
|
|
16226
17110
|
|
|
16227
17111
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
16228
|
-
var
|
|
17112
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
16229
17113
|
var RunsPanel = ({ port, source, contextId }) => {
|
|
16230
|
-
const [anweisung, setAnweisung] = (0,
|
|
16231
|
-
const [laeuft, setLaeuft] = (0,
|
|
16232
|
-
const [notiz, setNotiz] = (0,
|
|
16233
|
-
const [nachladen, setNachladen] = (0,
|
|
17114
|
+
const [anweisung, setAnweisung] = (0, import_react9.useState)("");
|
|
17115
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
17116
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
17117
|
+
const [nachladen, setNachladen] = (0, import_react9.useState)(0);
|
|
16234
17118
|
const faehig = capabilitiesOf(port);
|
|
16235
17119
|
const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
|
|
17120
|
+
const aktuelleQuelle = (0, import_react9.useRef)({ kind: source.kind, id: quellSchluessel });
|
|
17121
|
+
aktuelleQuelle.current = { kind: source.kind, id: quellSchluessel };
|
|
16236
17122
|
const [phase, neuLaden] = usePortQuery(
|
|
16237
17123
|
() => {
|
|
16238
17124
|
if (source.kind === "published") return port.runs.listRunsForShot(source.shotVersionId);
|
|
@@ -16243,24 +17129,37 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
16243
17129
|
);
|
|
16244
17130
|
const starten = async () => {
|
|
16245
17131
|
if (source.kind !== "published") return;
|
|
17132
|
+
const gestartetFuer = { kind: source.kind, id: source.shotVersionId };
|
|
16246
17133
|
setLaeuft(true);
|
|
16247
17134
|
const ergebnis = await port.runs.startRun({
|
|
16248
17135
|
shotVersionId: source.shotVersionId,
|
|
16249
17136
|
...anweisung.trim() ? { userInstruction: anweisung.trim() } : {},
|
|
16250
17137
|
contextId
|
|
16251
17138
|
});
|
|
17139
|
+
if (aktuelleQuelle.current.kind !== gestartetFuer.kind || aktuelleQuelle.current.id !== gestartetFuer.id) {
|
|
17140
|
+
return;
|
|
17141
|
+
}
|
|
16252
17142
|
setNotiz(noticeFor(ergebnis, "Prompt-Lauf starten"));
|
|
16253
17143
|
setLaeuft(false);
|
|
16254
17144
|
setNachladen((n) => n + 1);
|
|
16255
17145
|
neuLaden();
|
|
16256
17146
|
};
|
|
16257
17147
|
const laeufe = phase.status === "ready" ? phase.value : [];
|
|
16258
|
-
|
|
16259
|
-
|
|
16260
|
-
|
|
16261
|
-
|
|
17148
|
+
const [gewaehlteRunde, setGewaehlteRunde] = (0, import_react9.useState)(void 0);
|
|
17149
|
+
const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
|
|
17150
|
+
const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
|
|
17151
|
+
(0, import_react9.useEffect)(() => {
|
|
17152
|
+
setGewaehlteRunde(void 0);
|
|
17153
|
+
setAnweisung("");
|
|
17154
|
+
setNotiz(null);
|
|
17155
|
+
setLaeuft(false);
|
|
17156
|
+
}, [source.kind, quellSchluessel]);
|
|
17157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs", "data-testid": "laeufe-bereich", "data-shot-version": quellSchluessel, children: [
|
|
17158
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h4", { children: "Prompt-L\xE4ufe" }),
|
|
17159
|
+
source.kind === "published" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs__start", children: [
|
|
17160
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { children: [
|
|
16262
17161
|
"Anweisung (optional)",
|
|
16263
|
-
/* @__PURE__ */ (0,
|
|
17162
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16264
17163
|
"input",
|
|
16265
17164
|
{
|
|
16266
17165
|
"data-testid": "lauf-anweisung",
|
|
@@ -16269,21 +17168,25 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
16269
17168
|
}
|
|
16270
17169
|
)
|
|
16271
17170
|
] }),
|
|
16272
|
-
/* @__PURE__ */ (0,
|
|
17171
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", "data-testid": "lauf-starten", disabled: laeuft, onClick: starten, children: "Prompt-Lauf starten" })
|
|
16273
17172
|
] }),
|
|
16274
|
-
notiz && /* @__PURE__ */ (0,
|
|
16275
|
-
phase.status === "loading" && /* @__PURE__ */ (0,
|
|
16276
|
-
phase.status === "error" && /* @__PURE__ */ (0,
|
|
17173
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": "lauf-notiz", "data-tone": notiz.tone, role: notiz.tone === "error" ? "alert" : "status", children: notiz.text }),
|
|
17174
|
+
phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": "laeufe-laden", children: "L\xE4ufe werden geladen \u2026" }),
|
|
17175
|
+
phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { "data-testid": "laeufe-fehler", role: "alert", children: [
|
|
16277
17176
|
"L\xE4ufe konnten nicht geladen werden: ",
|
|
16278
17177
|
phase.message
|
|
16279
17178
|
] }),
|
|
16280
|
-
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */ (0,
|
|
16281
|
-
/* @__PURE__ */ (0,
|
|
17179
|
+
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": "keine-laeufe", children: source.kind === "published" ? "F\xFCr diese Shot-Version gibt es noch keinen Lauf." : source.kind === "draft_chain" ? "F\xFCr diese Draft-Kette gibt es noch keinen Lauf." : "F\xFCr diese Szene gibt es noch keinen direkten Lauf." }),
|
|
17180
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ol", { "data-testid": "runden-liste", children: laeufe.map((lauf) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16282
17181
|
RundenEintrag,
|
|
16283
17182
|
{
|
|
16284
17183
|
port,
|
|
16285
17184
|
lauf,
|
|
16286
17185
|
runde: roundOfRun(lauf, laeufe),
|
|
17186
|
+
offen: lauf.run_id === offeneRunde,
|
|
17187
|
+
onUmschalten: () => setGewaehlteRunde(
|
|
17188
|
+
lauf.run_id === offeneRunde ? null : lauf.run_id
|
|
17189
|
+
),
|
|
16287
17190
|
itemMoeglich: faehig.saveRunAsItem,
|
|
16288
17191
|
onItemGespeichert: () => setNachladen((n) => n + 1)
|
|
16289
17192
|
},
|
|
@@ -16291,13 +17194,63 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
16291
17194
|
)) })
|
|
16292
17195
|
] });
|
|
16293
17196
|
};
|
|
16294
|
-
var
|
|
16295
|
-
|
|
16296
|
-
const
|
|
16297
|
-
|
|
17197
|
+
var AUSZUG = 90;
|
|
17198
|
+
function auszug(text, laenge = AUSZUG) {
|
|
17199
|
+
const sauber = text.replace(/\s+/g, " ").trim();
|
|
17200
|
+
if (sauber.length <= laenge) return sauber;
|
|
17201
|
+
const schnitt = sauber.lastIndexOf(" ", laenge);
|
|
17202
|
+
return `${sauber.slice(0, schnitt > laenge / 2 ? schnitt : laenge)} \u2026`;
|
|
17203
|
+
}
|
|
17204
|
+
var STATUS_TEXT = {
|
|
17205
|
+
succeeded: "erfolgreich",
|
|
17206
|
+
failed: "fehlgeschlagen"
|
|
17207
|
+
};
|
|
17208
|
+
var LANGER_TEXT = 240;
|
|
17209
|
+
var Sekundaertext = ({ titel, text, testId }) => {
|
|
17210
|
+
const [ganz, setGanz] = (0, import_react9.useState)(false);
|
|
17211
|
+
const lang = text.length > LANGER_TEXT;
|
|
17212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
17213
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: titel }),
|
|
17214
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": testId, children: lang && !ganz ? auszug(text, LANGER_TEXT) : text }),
|
|
17215
|
+
lang && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17216
|
+
"button",
|
|
17217
|
+
{
|
|
17218
|
+
type: "button",
|
|
17219
|
+
className: "szenen-runs__mehr",
|
|
17220
|
+
onClick: () => setGanz(!ganz),
|
|
17221
|
+
"data-testid": `${testId}-mehr`,
|
|
17222
|
+
children: ganz ? "weniger anzeigen" : "vollst\xE4ndig anzeigen"
|
|
17223
|
+
}
|
|
17224
|
+
)
|
|
17225
|
+
] });
|
|
17226
|
+
};
|
|
17227
|
+
var LISTE_ANFANG = 3;
|
|
17228
|
+
var SekundaerListe = ({ titel, eintraege, testId, className }) => {
|
|
17229
|
+
const [alle, setAlle] = (0, import_react9.useState)(false);
|
|
17230
|
+
const lang = eintraege.length > LISTE_ANFANG;
|
|
17231
|
+
const gezeigt = lang && !alle ? eintraege.slice(0, LISTE_ANFANG) : eintraege;
|
|
17232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
17233
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: titel }),
|
|
17234
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { className, "data-testid": testId, children: gezeigt.map((eintrag, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: eintrag }, i)) }),
|
|
17235
|
+
lang && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17236
|
+
"button",
|
|
17237
|
+
{
|
|
17238
|
+
type: "button",
|
|
17239
|
+
className: "szenen-runs__mehr",
|
|
17240
|
+
onClick: () => setAlle(!alle),
|
|
17241
|
+
"data-testid": `${testId}-mehr`,
|
|
17242
|
+
children: alle ? "weniger anzeigen" : `${eintraege.length - LISTE_ANFANG} weitere anzeigen`
|
|
17243
|
+
}
|
|
17244
|
+
)
|
|
17245
|
+
] });
|
|
17246
|
+
};
|
|
17247
|
+
var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
17248
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
17249
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
17250
|
+
const [nachladen, setNachladen] = (0, import_react9.useState)(0);
|
|
16298
17251
|
const [itemPhase] = usePortQuery(
|
|
16299
|
-
() => port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
16300
|
-
[port, lauf.run_id, nachladen]
|
|
17252
|
+
() => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
17253
|
+
[port, lauf.run_id, nachladen, offen]
|
|
16301
17254
|
);
|
|
16302
17255
|
const item = itemPhase.status === "ready" ? itemPhase.value : null;
|
|
16303
17256
|
const speichern = async () => {
|
|
@@ -16311,75 +17264,133 @@ var RundenEintrag = ({ port, lauf, runde, itemMoeglich, onItemGespeichert }) =>
|
|
|
16311
17264
|
setNachladen((n) => n + 1);
|
|
16312
17265
|
onItemGespeichert();
|
|
16313
17266
|
};
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
17267
|
+
const zusammenfassung = lauf.status === "succeeded" && lauf.output ? auszug(lauf.output.positive) : null;
|
|
17268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { "data-testid": `runde-${lauf.run_id}`, "data-runde": runde, "data-status": lauf.status, children: [
|
|
17269
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
17270
|
+
"button",
|
|
17271
|
+
{
|
|
17272
|
+
type: "button",
|
|
17273
|
+
className: "szenen-runs__kopf",
|
|
17274
|
+
onClick: onUmschalten,
|
|
17275
|
+
"aria-expanded": offen,
|
|
17276
|
+
"data-testid": `runde-umschalten-${lauf.run_id}`,
|
|
17277
|
+
children: [
|
|
17278
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "szenen-runs__marke", children: [
|
|
17279
|
+
"Runde ",
|
|
17280
|
+
runde
|
|
17281
|
+
] }),
|
|
17282
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17283
|
+
"span",
|
|
17284
|
+
{
|
|
17285
|
+
className: "szenen-runs__status",
|
|
17286
|
+
"data-status": lauf.status,
|
|
17287
|
+
"data-testid": `status-${lauf.run_id}`,
|
|
17288
|
+
children: STATUS_TEXT[lauf.status]
|
|
17289
|
+
}
|
|
17290
|
+
),
|
|
17291
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "szenen-runs__modell", "data-testid": `provider-${lauf.run_id}`, children: [
|
|
17292
|
+
lauf.provider,
|
|
17293
|
+
" \xB7 ",
|
|
17294
|
+
lauf.model_id
|
|
17295
|
+
] }),
|
|
17296
|
+
zusammenfassung && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17297
|
+
"span",
|
|
17298
|
+
{
|
|
17299
|
+
className: "szenen-runs__auszug",
|
|
17300
|
+
"data-testid": `auszug-${lauf.run_id}`,
|
|
17301
|
+
children: zusammenfassung
|
|
17302
|
+
}
|
|
17303
|
+
)
|
|
17304
|
+
]
|
|
17305
|
+
}
|
|
17306
|
+
),
|
|
17307
|
+
lauf.status === "failed" && lauf.failure && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs__fehler", "data-testid": `fehler-${lauf.run_id}`, role: "alert", children: [
|
|
17308
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("strong", { children: [
|
|
17309
|
+
"Fehlgeschlagen \u2014 ",
|
|
17310
|
+
lauf.failure.class
|
|
16319
17311
|
] }),
|
|
16320
|
-
/* @__PURE__ */ (0,
|
|
16321
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-testid": `status-${lauf.run_id}`, children: lauf.status }),
|
|
16322
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `provider-${lauf.run_id}`, children: [
|
|
16323
|
-
lauf.provider,
|
|
16324
|
-
" \xB7 ",
|
|
16325
|
-
lauf.model_id
|
|
16326
|
-
] })
|
|
17312
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { children: lauf.failure.message })
|
|
16327
17313
|
] }),
|
|
16328
|
-
|
|
16329
|
-
/* @__PURE__ */ (0,
|
|
16330
|
-
/* @__PURE__ */ (0,
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
|
|
16334
|
-
/* @__PURE__ */ (0,
|
|
16335
|
-
|
|
17314
|
+
offen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs__inhalt", "data-testid": `runde-inhalt-${lauf.run_id}`, children: [
|
|
17315
|
+
lauf.status === "succeeded" && lauf.output && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { "data-testid": `ausgabe-${lauf.run_id}`, children: [
|
|
17316
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__prompt", children: [
|
|
17317
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: "Positiver Prompt" }),
|
|
17318
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `positiv-${lauf.run_id}`, children: lauf.output.positive })
|
|
17319
|
+
] }),
|
|
17320
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__prompt szenen-runs__prompt--negativ", children: [
|
|
17321
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: "Negativer Prompt" }),
|
|
17322
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `negativ-${lauf.run_id}`, children: lauf.output.negative ?? "(keiner)" })
|
|
17323
|
+
] }),
|
|
17324
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17325
|
+
Sekundaertext,
|
|
17326
|
+
{
|
|
17327
|
+
titel: "Erl\xE4uterung",
|
|
17328
|
+
text: lauf.output.feedback,
|
|
17329
|
+
testId: `feedback-${lauf.run_id}`
|
|
17330
|
+
}
|
|
17331
|
+
),
|
|
17332
|
+
lauf.output.visibility.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17333
|
+
SekundaerListe,
|
|
17334
|
+
{
|
|
17335
|
+
titel: "Annahmen",
|
|
17336
|
+
eintraege: lauf.output.visibility.assumptions,
|
|
17337
|
+
testId: `annahmen-${lauf.run_id}`
|
|
17338
|
+
}
|
|
17339
|
+
),
|
|
17340
|
+
lauf.output.notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17341
|
+
SekundaerListe,
|
|
17342
|
+
{
|
|
17343
|
+
titel: "Notizen",
|
|
17344
|
+
eintraege: lauf.output.notes,
|
|
17345
|
+
testId: `notizen-${lauf.run_id}`,
|
|
17346
|
+
className: "szenen-runs__notizen"
|
|
17347
|
+
}
|
|
17348
|
+
)
|
|
16336
17349
|
] }),
|
|
16337
|
-
/* @__PURE__ */ (0,
|
|
16338
|
-
/* @__PURE__ */ (0,
|
|
16339
|
-
/* @__PURE__ */ (0,
|
|
17350
|
+
lauf.raw_output && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("details", { "data-testid": `diagnose-${lauf.run_id}`, children: [
|
|
17351
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("summary", { children: "Rohantwort (Diagnose)" }),
|
|
17352
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("pre", { children: lauf.raw_output })
|
|
16340
17353
|
] }),
|
|
16341
|
-
|
|
16342
|
-
/* @__PURE__ */ (0,
|
|
16343
|
-
/* @__PURE__ */ (0,
|
|
17354
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("details", { className: "szenen-runs__technisch", "data-testid": `technisch-${lauf.run_id}`, children: [
|
|
17355
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("summary", { children: "Technische Informationen" }),
|
|
17356
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { children: [
|
|
17357
|
+
"Lauf-ID: ",
|
|
17358
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { "data-testid": `run-id-${lauf.run_id}`, children: lauf.run_id })
|
|
17359
|
+
] }),
|
|
17360
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { children: [
|
|
17361
|
+
"Modell: ",
|
|
17362
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: lauf.model_id }),
|
|
17363
|
+
" bei ",
|
|
17364
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: lauf.provider })
|
|
17365
|
+
] }),
|
|
17366
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { children: [
|
|
17367
|
+
"erzeugt: ",
|
|
17368
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: lauf.created_at })
|
|
17369
|
+
] })
|
|
16344
17370
|
] }),
|
|
16345
|
-
lauf.
|
|
16346
|
-
|
|
16347
|
-
|
|
16348
|
-
|
|
16349
|
-
"Fehlgeschlagen \u2014 ",
|
|
16350
|
-
lauf.failure.class
|
|
17371
|
+
lauf.status === "succeeded" && itemMoeglich && !item && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", "data-testid": `als-item-${lauf.run_id}`, disabled: laeuft, onClick: speichern, children: "als Item speichern" }),
|
|
17372
|
+
item && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
17373
|
+
"Bereits als Item gespeichert: ",
|
|
17374
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: item.itemId })
|
|
16351
17375
|
] }),
|
|
16352
|
-
/* @__PURE__ */ (0,
|
|
16353
|
-
|
|
16354
|
-
|
|
16355
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: "Rohantwort (Diagnose)" }),
|
|
16356
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { children: lauf.raw_output })
|
|
16357
|
-
] }),
|
|
16358
|
-
lauf.status === "succeeded" && itemMoeglich && !item && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-testid": `als-item-${lauf.run_id}`, disabled: laeuft, onClick: speichern, children: "als Item speichern" }),
|
|
16359
|
-
item && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
16360
|
-
"Bereits als Item gespeichert: ",
|
|
16361
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: item.itemId })
|
|
16362
|
-
] }),
|
|
16363
|
-
lauf.status === "succeeded" && !itemMoeglich && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `item-unsupported-${lauf.run_id}`, children: "Dieser Host speichert keine Runden als Item. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
16364
|
-
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
16365
|
-
lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { "data-testid": `bilder-bereich-${lauf.run_id}`, children: [
|
|
16366
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: "Bilder zu diesem Lauf" }),
|
|
16367
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RunImagesPanel, { port, lauf })
|
|
17376
|
+
lauf.status === "succeeded" && !itemMoeglich && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `item-unsupported-${lauf.run_id}`, children: "Dieser Host speichert keine Runden als Item. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
17377
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
17378
|
+
lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RunImagesPanel, { port, lauf })
|
|
16368
17379
|
] })
|
|
16369
17380
|
] });
|
|
16370
17381
|
};
|
|
16371
17382
|
|
|
16372
17383
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
16373
|
-
var
|
|
17384
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
16374
17385
|
var STRUKTURELL_BEDIENT = {
|
|
16375
17386
|
scene: ["nodes", "relations"]
|
|
16376
17387
|
};
|
|
16377
17388
|
var AbgeleitetesBildmodell = ({ schluessel }) => {
|
|
16378
17389
|
if (!schluessel) return null;
|
|
16379
|
-
return /* @__PURE__ */ (0,
|
|
16380
|
-
/* @__PURE__ */ (0,
|
|
16381
|
-
/* @__PURE__ */ (0,
|
|
16382
|
-
/* @__PURE__ */ (0,
|
|
17390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "szenen-detail__derived", "data-testid": "abgeleitetes-bildmodell", children: [
|
|
17391
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { children: "Bildgenerierung \u2014 wo das Modell entschieden wird" }),
|
|
17392
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "bildmodell-hinweis", children: [
|
|
17393
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: schluessel }),
|
|
16383
17394
|
" beschreibt, wof\xFCr dieser Prompt optimiert wird \u2014 nicht, mit welchem Bildmodell er ausgef\xFChrt wird. Welche Bildmodelle wirklich ausf\xFChrbar sind, ist Konfiguration der jeweiligen Umgebung und wird an der Bildaktion eines Laufs gew\xE4hlt (D-129)."
|
|
16384
17395
|
] })
|
|
16385
17396
|
] });
|
|
@@ -16391,43 +17402,43 @@ var ElementDetail = ({
|
|
|
16391
17402
|
author,
|
|
16392
17403
|
onChanged
|
|
16393
17404
|
}) => {
|
|
16394
|
-
const [nachladen, setNachladen] = (0,
|
|
17405
|
+
const [nachladen, setNachladen] = (0, import_react10.useState)(0);
|
|
16395
17406
|
const [phase] = usePortQuery(
|
|
16396
17407
|
() => port.elements.getElement(elementId),
|
|
16397
17408
|
[port, elementId, nachladen]
|
|
16398
17409
|
);
|
|
16399
|
-
const [entwurf, setEntwurf] = (0,
|
|
16400
|
-
const [notiz, setNotiz] = (0,
|
|
16401
|
-
const [laeuft, setLaeuft] = (0,
|
|
16402
|
-
const [wahl, setWahl] = (0,
|
|
16403
|
-
const [basiswechsel, setBasiswechsel] = (0,
|
|
17410
|
+
const [entwurf, setEntwurf] = (0, import_react10.useState)({});
|
|
17411
|
+
const [notiz, setNotiz] = (0, import_react10.useState)(null);
|
|
17412
|
+
const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
|
|
17413
|
+
const [wahl, setWahl] = (0, import_react10.useState)(null);
|
|
17414
|
+
const [basiswechsel, setBasiswechsel] = (0, import_react10.useState)(null);
|
|
16404
17415
|
const [kettenPhase] = usePortQuery(
|
|
16405
17416
|
() => port.context.chainFor(contextId),
|
|
16406
17417
|
[port, contextId]
|
|
16407
17418
|
);
|
|
16408
|
-
const kontextkette = (0,
|
|
17419
|
+
const kontextkette = (0, import_react10.useMemo)(() => {
|
|
16409
17420
|
if (kettenPhase.status === "ready") return { status: "ready", chain: kettenPhase.value };
|
|
16410
17421
|
if (kettenPhase.status === "error") return { status: "error", message: kettenPhase.message };
|
|
16411
17422
|
return { status: "loading" };
|
|
16412
17423
|
}, [kettenPhase]);
|
|
16413
17424
|
const kette = kontextkette.status === "ready" ? kontextkette.chain : null;
|
|
16414
17425
|
const schnappschuss = phase.status === "ready" ? phase.value : null;
|
|
16415
|
-
const kopfErgebnis = (0,
|
|
17426
|
+
const kopfErgebnis = (0, import_react10.useMemo)(
|
|
16416
17427
|
() => schnappschuss && kette ? effectivePreferredHeadSafe(schnappschuss, kette) : null,
|
|
16417
17428
|
[schnappschuss, kette]
|
|
16418
17429
|
);
|
|
16419
17430
|
const kopfAufloesung = resolutionOf(kopfErgebnis);
|
|
16420
17431
|
const bevorzugteVersion = selectedHeadVersionId(kopfAufloesung);
|
|
16421
|
-
const felder = (0,
|
|
17432
|
+
const felder = (0, import_react10.useMemo)(
|
|
16422
17433
|
() => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
|
|
16423
17434
|
[schnappschuss?.element.type]
|
|
16424
17435
|
);
|
|
16425
|
-
(0,
|
|
17436
|
+
(0, import_react10.useEffect)(() => {
|
|
16426
17437
|
setWahl(null);
|
|
16427
17438
|
setBasiswechsel(null);
|
|
16428
17439
|
setNotiz(null);
|
|
16429
17440
|
}, [elementId]);
|
|
16430
|
-
const automatisch = (0,
|
|
17441
|
+
const automatisch = (0, import_react10.useMemo)(() => {
|
|
16431
17442
|
if (!schnappschuss) return { kind: "keiner" };
|
|
16432
17443
|
if (schnappschuss.draft) return { kind: "draft" };
|
|
16433
17444
|
if (bevorzugteVersion) return { kind: "version", versionId: bevorzugteVersion };
|
|
@@ -16437,14 +17448,14 @@ var ElementDetail = ({
|
|
|
16437
17448
|
if (schnappschuss.versions.length === 0) return { kind: "draft" };
|
|
16438
17449
|
return { kind: "keiner" };
|
|
16439
17450
|
}, [schnappschuss, bevorzugteVersion]);
|
|
16440
|
-
const angezeigt = (0,
|
|
17451
|
+
const angezeigt = (0, import_react10.useMemo)(() => {
|
|
16441
17452
|
if (!wahl) return automatisch;
|
|
16442
17453
|
if (wahl.kind === "version" && !schnappschuss?.versions.some((v) => v.version_id === wahl.versionId)) {
|
|
16443
17454
|
return automatisch;
|
|
16444
17455
|
}
|
|
16445
17456
|
return wahl;
|
|
16446
17457
|
}, [wahl, automatisch, schnappschuss]);
|
|
16447
|
-
const angezeigtePayload = (0,
|
|
17458
|
+
const angezeigtePayload = (0, import_react10.useMemo)(() => {
|
|
16448
17459
|
if (!schnappschuss) return {};
|
|
16449
17460
|
if (angezeigt.kind === "draft") return schnappschuss.draft?.payload ?? {};
|
|
16450
17461
|
if (angezeigt.kind === "version") {
|
|
@@ -16453,7 +17464,7 @@ var ElementDetail = ({
|
|
|
16453
17464
|
return {};
|
|
16454
17465
|
}, [schnappschuss, angezeigt]);
|
|
16455
17466
|
const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
|
|
16456
|
-
(0,
|
|
17467
|
+
(0, import_react10.useEffect)(() => {
|
|
16457
17468
|
if (!schnappschuss) return;
|
|
16458
17469
|
setEntwurf(formFromPayload(felder, angezeigtePayload));
|
|
16459
17470
|
}, [
|
|
@@ -16466,7 +17477,7 @@ var ElementDetail = ({
|
|
|
16466
17477
|
const bearbeitbar = angezeigt.kind === "draft";
|
|
16467
17478
|
const setzeFeld = (pfad, wert) => setEntwurf((vorher) => ({ ...vorher, [pfad]: wert }));
|
|
16468
17479
|
const payloadAusFormular = () => payloadFromForm(felder, entwurf);
|
|
16469
|
-
const strukturPayload = (0,
|
|
17480
|
+
const strukturPayload = (0, import_react10.useMemo)(() => {
|
|
16470
17481
|
const lies = (name) => {
|
|
16471
17482
|
try {
|
|
16472
17483
|
const roh = JSON.parse(entwurf[name] || "[]");
|
|
@@ -16477,19 +17488,19 @@ var ElementDetail = ({
|
|
|
16477
17488
|
};
|
|
16478
17489
|
return { nodes: lies("nodes"), relations: lies("relations") };
|
|
16479
17490
|
}, [entwurf.nodes, entwurf.relations]);
|
|
16480
|
-
const kettenfeld = (0,
|
|
17491
|
+
const kettenfeld = (0, import_react10.useMemo)(() => {
|
|
16481
17492
|
const kette2 = schnappschuss?.draft?.chain;
|
|
16482
17493
|
if (!kette2) return null;
|
|
16483
17494
|
return kette2.links[0]?.field ?? null;
|
|
16484
17495
|
}, [schnappschuss?.draft?.chain]);
|
|
16485
|
-
const laufStand = (0,
|
|
17496
|
+
const laufStand = (0, import_react10.useMemo)(() => {
|
|
16486
17497
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
16487
17498
|
if (schnappschuss.draft) return schnappschuss.draft.payload;
|
|
16488
17499
|
const kopf = usableHeadVersionId(kopfAufloesung);
|
|
16489
17500
|
if (!kopf) return null;
|
|
16490
17501
|
return schnappschuss.versions.find((v) => v.version_id === kopf)?.payload ?? null;
|
|
16491
17502
|
}, [schnappschuss, kopfAufloesung]);
|
|
16492
|
-
const szenenBlocker = (0,
|
|
17503
|
+
const szenenBlocker = (0, import_react10.useMemo)(() => {
|
|
16493
17504
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
16494
17505
|
if (laufStand === null) {
|
|
16495
17506
|
return schnappschuss.versions.length > 0 ? "Diese Szene hat keinen Entwurf und in diesem Kontext keinen bevorzugten Kopf. Welcher Stand gilt, entscheidet keine Reihenfolge (D-36) \u2014 bitte oben eine Version als bevorzugt setzen." : "Diese Szene hat noch keinen gespeicherten Stand. Ein Lauf friert ein, was gespeichert ist \u2014 bitte zuerst den Entwurf speichern.";
|
|
@@ -16499,7 +17510,7 @@ var ElementDetail = ({
|
|
|
16499
17510
|
const grund = flag.reasons[0];
|
|
16500
17511
|
return grund && "message" in grund ? grund.message : "Kein Lauf moeglich.";
|
|
16501
17512
|
}, [schnappschuss, laufStand]);
|
|
16502
|
-
const vorschau = (0,
|
|
17513
|
+
const vorschau = (0, import_react10.useMemo)(() => {
|
|
16503
17514
|
if (!schnappschuss) return null;
|
|
16504
17515
|
try {
|
|
16505
17516
|
const roh = validatePayload(schnappschuss.element.type, payloadAusFormular());
|
|
@@ -16512,9 +17523,9 @@ var ElementDetail = ({
|
|
|
16512
17523
|
return { valid: false, errors: [{ instancePath: "", message: String(e) }] };
|
|
16513
17524
|
}
|
|
16514
17525
|
}, [entwurf, felder, schnappschuss?.element.type, kettenfeld]);
|
|
16515
|
-
if (phase.status === "loading") return /* @__PURE__ */ (0,
|
|
17526
|
+
if (phase.status === "loading") return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { "data-testid": "element-laden", children: "Element wird geladen \u2026" });
|
|
16516
17527
|
if (phase.status === "error") {
|
|
16517
|
-
return /* @__PURE__ */ (0,
|
|
17528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "element-fehler", role: "alert", children: [
|
|
16518
17529
|
"Element ",
|
|
16519
17530
|
elementId,
|
|
16520
17531
|
" konnte nicht geladen werden: ",
|
|
@@ -16522,7 +17533,7 @@ var ElementDetail = ({
|
|
|
16522
17533
|
] });
|
|
16523
17534
|
}
|
|
16524
17535
|
if (!schnappschuss) {
|
|
16525
|
-
return /* @__PURE__ */ (0,
|
|
17536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "element-unbekannt", children: [
|
|
16526
17537
|
"Element ",
|
|
16527
17538
|
elementId,
|
|
16528
17539
|
" ist unbekannt."
|
|
@@ -16628,28 +17639,28 @@ var ElementDetail = ({
|
|
|
16628
17639
|
formular: entwurf
|
|
16629
17640
|
};
|
|
16630
17641
|
const laufVersionId = angezeigt.kind === "version" ? angezeigt.versionId : usableHeadVersionId(kopfAufloesung);
|
|
16631
|
-
return /* @__PURE__ */ (0,
|
|
16632
|
-
/* @__PURE__ */ (0,
|
|
16633
|
-
/* @__PURE__ */ (0,
|
|
16634
|
-
/* @__PURE__ */ (0,
|
|
16635
|
-
/* @__PURE__ */ (0,
|
|
16636
|
-
schnappschuss.element.retired && /* @__PURE__ */ (0,
|
|
17642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "szenen-detail", "data-testid": "element-detail", "data-element-id": elementId, children: [
|
|
17643
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("header", { children: [
|
|
17644
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { children: schnappschuss.metadata?.title ?? "(ohne Titel)" }),
|
|
17645
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "szenen-detail__ids", children: [
|
|
17646
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { "data-testid": "element-typ", children: elementTypLabel(typ) }),
|
|
17647
|
+
schnappschuss.element.retired && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { "data-testid": "ist-stillgelegt", children: "stillgelegt" })
|
|
16637
17648
|
] })
|
|
16638
17649
|
] }),
|
|
16639
|
-
kontextkette.status === "error" && /* @__PURE__ */ (0,
|
|
17650
|
+
kontextkette.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { role: "alert", "data-testid": "kontextkette-fehler", className: "szenen-detail__hint", children: [
|
|
16640
17651
|
"Die Kontextkette konnte nicht gelesen werden: ",
|
|
16641
17652
|
kontextkette.message,
|
|
16642
17653
|
". Solange das so ist, lassen sich weder der bevorzugte Kopf noch die ausw\xE4hlbaren Referenzen bestimmen \u2014 sie sind ",
|
|
16643
|
-
/* @__PURE__ */ (0,
|
|
17654
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "unbekannt" }),
|
|
16644
17655
|
", nicht leer."
|
|
16645
17656
|
] }),
|
|
16646
|
-
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */ (0,
|
|
17657
|
+
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { role: "alert", "data-testid": "versionsgraph-fehler", className: "szenen-detail__hint", children: [
|
|
16647
17658
|
"Der Versionsgraph dieses Elements ist nicht aufbaubar:",
|
|
16648
17659
|
" ",
|
|
16649
17660
|
kopfErgebnis.message,
|
|
16650
17661
|
". Die Versionen bleiben einzeln anzeigbar; ein bevorzugter Kopf l\xE4sst sich daraus nicht ableiten."
|
|
16651
17662
|
] }),
|
|
16652
|
-
/* @__PURE__ */ (0,
|
|
17663
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16653
17664
|
VersionNavigator,
|
|
16654
17665
|
{
|
|
16655
17666
|
versions: schnappschuss.versions,
|
|
@@ -16672,22 +17683,22 @@ var ElementDetail = ({
|
|
|
16672
17683
|
}
|
|
16673
17684
|
}
|
|
16674
17685
|
),
|
|
16675
|
-
basiswechsel && draft && /* @__PURE__ */ (0,
|
|
16676
|
-
/* @__PURE__ */ (0,
|
|
17686
|
+
basiswechsel && draft && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "szenen-detail__confirm", "data-testid": "basiswechsel-bestaetigung", role: "alertdialog", children: [
|
|
17687
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16677
17688
|
"Es gibt bereits einen Entwurf (Revision ",
|
|
16678
17689
|
draft.revision,
|
|
16679
|
-
draft.base_version_id ? /* @__PURE__ */ (0,
|
|
17690
|
+
draft.base_version_id ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
16680
17691
|
" auf Basis ",
|
|
16681
|
-
/* @__PURE__ */ (0,
|
|
16682
|
-
] }) : /* @__PURE__ */ (0,
|
|
17692
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: draft.base_version_id })
|
|
17693
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: " ohne Basis" }),
|
|
16683
17694
|
"). Ihn auf Version ",
|
|
16684
|
-
/* @__PURE__ */ (0,
|
|
17695
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: basiswechsel }),
|
|
16685
17696
|
" neu aufzusetzen",
|
|
16686
17697
|
" ",
|
|
16687
|
-
/* @__PURE__ */ (0,
|
|
17698
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "ersetzt seinen Inhalt" }),
|
|
16688
17699
|
" durch die Payload dieser Version."
|
|
16689
17700
|
] }),
|
|
16690
|
-
/* @__PURE__ */ (0,
|
|
17701
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16691
17702
|
"button",
|
|
16692
17703
|
{
|
|
16693
17704
|
type: "button",
|
|
@@ -16699,7 +17710,7 @@ var ElementDetail = ({
|
|
|
16699
17710
|
children: "Entwurf auf diese Version neu aufsetzen"
|
|
16700
17711
|
}
|
|
16701
17712
|
),
|
|
16702
|
-
/* @__PURE__ */ (0,
|
|
17713
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16703
17714
|
"button",
|
|
16704
17715
|
{
|
|
16705
17716
|
type: "button",
|
|
@@ -16710,26 +17721,26 @@ var ElementDetail = ({
|
|
|
16710
17721
|
}
|
|
16711
17722
|
)
|
|
16712
17723
|
] }),
|
|
16713
|
-
/* @__PURE__ */ (0,
|
|
16714
|
-
/* @__PURE__ */ (0,
|
|
17724
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "szenen-detail__draft", "data-testid": "draft-bereich", children: [
|
|
17725
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { children: bearbeitbar ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
16715
17726
|
"Entwurf",
|
|
16716
|
-
draft && /* @__PURE__ */ (0,
|
|
17727
|
+
draft && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
|
|
16717
17728
|
" \xB7 Revision ",
|
|
16718
17729
|
draft.revision
|
|
16719
17730
|
] })
|
|
16720
|
-
] }) : /* @__PURE__ */ (0,
|
|
16721
|
-
angezeigt.kind === "keiner" && /* @__PURE__ */ (0,
|
|
17731
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: "Ver\xF6ffentlichte Version \u2014 nur Ansicht" }) }),
|
|
17732
|
+
angezeigt.kind === "keiner" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "nichts-angezeigt", children: [
|
|
16722
17733
|
"Es ist kein Stand ausgew\xE4hlt. Oben eine Version anzeigen oder \xFCber ",
|
|
16723
|
-
/* @__PURE__ */ (0,
|
|
17734
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "als Grundlage bearbeiten" }),
|
|
16724
17735
|
" einen Entwurf beginnen."
|
|
16725
17736
|
] }),
|
|
16726
|
-
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */ (0,
|
|
17737
|
+
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "nur-ansicht", className: "szenen-detail__hint", children: [
|
|
16727
17738
|
"Ver\xF6ffentlichte Versionen sind unver\xE4nderlich (D-02). Zum Bearbeiten oben ",
|
|
16728
|
-
/* @__PURE__ */ (0,
|
|
17739
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "als Grundlage bearbeiten" }),
|
|
16729
17740
|
" w\xE4hlen \u2014 das erzeugt einen Entwurf mit genau dieser Version als Basis."
|
|
16730
17741
|
] }),
|
|
16731
|
-
angezeigt.kind !== "keiner" && /* @__PURE__ */ (0,
|
|
16732
|
-
typ === "scene" && /* @__PURE__ */ (0,
|
|
17742
|
+
angezeigt.kind !== "keiner" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
17743
|
+
typ === "scene" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16733
17744
|
SceneEditor,
|
|
16734
17745
|
{
|
|
16735
17746
|
port,
|
|
@@ -16743,57 +17754,57 @@ var ElementDetail = ({
|
|
|
16743
17754
|
}))
|
|
16744
17755
|
}
|
|
16745
17756
|
),
|
|
16746
|
-
felder.length === 0 && /* @__PURE__ */ (0,
|
|
17757
|
+
felder.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "kein-schema", children: [
|
|
16747
17758
|
"F\xFCr den Typ ",
|
|
16748
17759
|
typ,
|
|
16749
17760
|
" liegt kein Payload-Schema vor."
|
|
16750
17761
|
] }),
|
|
16751
|
-
primaer.map((feld) => /* @__PURE__ */ (0,
|
|
16752
|
-
advanced.length > 0 && /* @__PURE__ */ (0,
|
|
16753
|
-
/* @__PURE__ */ (0,
|
|
17762
|
+
primaer.map((feld) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SchemaFieldRow, { ...feldProps, feld }, feld.path)),
|
|
17763
|
+
advanced.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("details", { className: "szenen-detail__technical", "data-testid": "technische-felder", children: [
|
|
17764
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("summary", { children: [
|
|
16754
17765
|
"Technische Felder / JSON (",
|
|
16755
17766
|
advanced.length,
|
|
16756
17767
|
")"
|
|
16757
17768
|
] }),
|
|
16758
|
-
advanced.map((feld) => /* @__PURE__ */ (0,
|
|
17769
|
+
advanced.map((feld) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SchemaFieldRow, { ...feldProps, feld }, feld.path))
|
|
16759
17770
|
] }),
|
|
16760
|
-
/* @__PURE__ */ (0,
|
|
16761
|
-
/* @__PURE__ */ (0,
|
|
16762
|
-
/* @__PURE__ */ (0,
|
|
17771
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("details", { className: "szenen-detail__technical", "data-testid": "technische-informationen", children: [
|
|
17772
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("summary", { children: "Technische Informationen" }),
|
|
17773
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16763
17774
|
"Element-ID: ",
|
|
16764
|
-
/* @__PURE__ */ (0,
|
|
17775
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: schnappschuss.element.element_id })
|
|
16765
17776
|
] }),
|
|
16766
|
-
/* @__PURE__ */ (0,
|
|
17777
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16767
17778
|
"angezeigter Stand:",
|
|
16768
17779
|
" ",
|
|
16769
|
-
/* @__PURE__ */ (0,
|
|
17780
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { "data-testid": "angezeigter-stand", children: angezeigt.kind === "version" ? angezeigt.versionId : "Entwurf" })
|
|
16770
17781
|
] }),
|
|
16771
|
-
draft && /* @__PURE__ */ (0,
|
|
17782
|
+
draft && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16772
17783
|
"Basis des Entwurfs:",
|
|
16773
17784
|
" ",
|
|
16774
|
-
/* @__PURE__ */ (0,
|
|
17785
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: draft.base_version_id ?? "(keine)" })
|
|
16775
17786
|
] })
|
|
16776
17787
|
] })
|
|
16777
17788
|
] }),
|
|
16778
|
-
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */ (0,
|
|
17789
|
+
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { "data-testid": "vorschau-befunde", className: "szenen-detail__preview-errors", children: vorschau.errors.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { children: [
|
|
16779
17790
|
f.instancePath || "/",
|
|
16780
17791
|
": ",
|
|
16781
17792
|
f.message
|
|
16782
17793
|
] }, i)) }),
|
|
16783
|
-
kettenfeld && /* @__PURE__ */ (0,
|
|
17794
|
+
kettenfeld && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "kettenfeld-hinweis", className: "szenen-detail__hint", children: [
|
|
16784
17795
|
"Der Verweis ",
|
|
16785
|
-
/* @__PURE__ */ (0,
|
|
17796
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: kettenfeld }),
|
|
16786
17797
|
" steht in den Kettenmetadaten, nicht in der Payload (D-96) \u2014 f\xFCr den Prompt-Lauf aus der Kette gen\xFCgt das. Zum",
|
|
16787
17798
|
" ",
|
|
16788
|
-
/* @__PURE__ */ (0,
|
|
17799
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "Ver\xF6ffentlichen" }),
|
|
16789
17800
|
" muss er als regul\xE4re Referenz auf eine ver\xF6ffentlichte Version gesetzt werden."
|
|
16790
17801
|
] }),
|
|
16791
|
-
bearbeitbar && /* @__PURE__ */ (0,
|
|
16792
|
-
/* @__PURE__ */ (0,
|
|
16793
|
-
/* @__PURE__ */ (0,
|
|
17802
|
+
bearbeitbar && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "szenen-detail__actions", children: [
|
|
17803
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", "data-testid": "draft-speichern", disabled: laeuft, onClick: speichern, children: "Entwurf speichern" }),
|
|
17804
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", "data-testid": "veroeffentlichen", disabled: laeuft, onClick: veroeffentlichen, children: "ver\xF6ffentlichen" })
|
|
16794
17805
|
] })
|
|
16795
17806
|
] }),
|
|
16796
|
-
typ === "target_model" && /* @__PURE__ */ (0,
|
|
17807
|
+
typ === "target_model" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16797
17808
|
AbgeleitetesBildmodell,
|
|
16798
17809
|
{
|
|
16799
17810
|
schluessel: (() => {
|
|
@@ -16808,8 +17819,8 @@ var ElementDetail = ({
|
|
|
16808
17819
|
// einer Draft-Kette, fuehrt der Weg ueber das Einfrieren —
|
|
16809
17820
|
// der alte Satz „setzen eine veroeffentlichte Version
|
|
16810
17821
|
// voraus" gilt nur noch fuer den Einzel-Shot.
|
|
16811
|
-
draft?.chain ? /* @__PURE__ */ (0,
|
|
16812
|
-
/* @__PURE__ */ (0,
|
|
17822
|
+
draft?.chain ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
17823
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16813
17824
|
PromptStartAction,
|
|
16814
17825
|
{
|
|
16815
17826
|
port,
|
|
@@ -16819,7 +17830,7 @@ var ElementDetail = ({
|
|
|
16819
17830
|
}
|
|
16820
17831
|
}
|
|
16821
17832
|
),
|
|
16822
|
-
/* @__PURE__ */ (0,
|
|
17833
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16823
17834
|
RunsPanel,
|
|
16824
17835
|
{
|
|
16825
17836
|
port,
|
|
@@ -16827,17 +17838,17 @@ var ElementDetail = ({
|
|
|
16827
17838
|
source: { kind: "draft_chain", chainId: draft.chain.chain_id }
|
|
16828
17839
|
}
|
|
16829
17840
|
)
|
|
16830
|
-
] }) : /* @__PURE__ */ (0,
|
|
16831
|
-
) : laufVersionId ? /* @__PURE__ */ (0,
|
|
17841
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { "data-testid": "shot-ohne-version", children: "Dieser Shot ist noch nicht ver\xF6ffentlicht und geh\xF6rt zu keiner Draft-Kette. Ein Prompt-Lauf braucht hier eine ver\xF6ffentlichte Version \u2014 oder einen Shot, der aus einer Rekonstruktion als Kette entstanden ist." })
|
|
17842
|
+
) : laufVersionId ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16832
17843
|
RunsPanel,
|
|
16833
17844
|
{
|
|
16834
17845
|
port,
|
|
16835
17846
|
contextId,
|
|
16836
17847
|
source: { kind: "published", shotVersionId: laufVersionId }
|
|
16837
17848
|
}
|
|
16838
|
-
) : /* @__PURE__ */ (0,
|
|
16839
|
-
typ === "scene" && /* @__PURE__ */ (0,
|
|
16840
|
-
/* @__PURE__ */ (0,
|
|
17849
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { "data-testid": "laufquelle-unklar", children: "Dieser Shot hat mehrere ver\xF6ffentlichte Versionen und keinen bevorzugten Kopf in diesem Kontext. Welche davon einen Lauf tr\xE4gt, entscheidet keine Reihenfolge \u2014 bitte oben eine Version anzeigen oder als bevorzugt setzen." })),
|
|
17850
|
+
typ === "scene" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
17851
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16841
17852
|
PromptStartAction,
|
|
16842
17853
|
{
|
|
16843
17854
|
port,
|
|
@@ -16851,7 +17862,7 @@ var ElementDetail = ({
|
|
|
16851
17862
|
onLauf: () => setNachladen((n) => n + 1)
|
|
16852
17863
|
}
|
|
16853
17864
|
),
|
|
16854
|
-
/* @__PURE__ */ (0,
|
|
17865
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16855
17866
|
RunsPanel,
|
|
16856
17867
|
{
|
|
16857
17868
|
port,
|
|
@@ -16860,7 +17871,7 @@ var ElementDetail = ({
|
|
|
16860
17871
|
}
|
|
16861
17872
|
)
|
|
16862
17873
|
] }),
|
|
16863
|
-
typ === "scene_setup" && /* @__PURE__ */ (0,
|
|
17874
|
+
typ === "scene_setup" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16864
17875
|
CapabilityPanel,
|
|
16865
17876
|
{
|
|
16866
17877
|
port,
|
|
@@ -16868,7 +17879,7 @@ var ElementDetail = ({
|
|
|
16868
17879
|
setupPayload: payloadAusFormular()
|
|
16869
17880
|
}
|
|
16870
17881
|
),
|
|
16871
|
-
notiz && /* @__PURE__ */ (0,
|
|
17882
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
16872
17883
|
"div",
|
|
16873
17884
|
{
|
|
16874
17885
|
className: `szenen-detail__notice szenen-detail__notice--${notiz.tone}`,
|
|
@@ -16876,8 +17887,8 @@ var ElementDetail = ({
|
|
|
16876
17887
|
"data-tone": notiz.tone,
|
|
16877
17888
|
role: notiz.tone === "error" ? "alert" : "status",
|
|
16878
17889
|
children: [
|
|
16879
|
-
/* @__PURE__ */ (0,
|
|
16880
|
-
notiz.details && notiz.details.length > 0 && /* @__PURE__ */ (0,
|
|
17890
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: notiz.text }),
|
|
17891
|
+
notiz.details && notiz.details.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { "data-testid": "notiz-befunde", children: notiz.details.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { children: d }, i)) })
|
|
16881
17892
|
]
|
|
16882
17893
|
}
|
|
16883
17894
|
)
|
|
@@ -16885,15 +17896,15 @@ var ElementDetail = ({
|
|
|
16885
17896
|
};
|
|
16886
17897
|
|
|
16887
17898
|
// src/features/szenen/areas/useSchmalesDisplay.ts
|
|
16888
|
-
var
|
|
17899
|
+
var import_react11 = require("react");
|
|
16889
17900
|
var SCHMALE_ANSICHT = "(max-width: 760px)";
|
|
16890
17901
|
function messen(abfrage) {
|
|
16891
17902
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
16892
17903
|
return window.matchMedia(abfrage).matches;
|
|
16893
17904
|
}
|
|
16894
17905
|
function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
16895
|
-
const [schmal, setSchmal] = (0,
|
|
16896
|
-
(0,
|
|
17906
|
+
const [schmal, setSchmal] = (0, import_react11.useState)(() => messen(abfrage));
|
|
17907
|
+
(0, import_react11.useEffect)(() => {
|
|
16897
17908
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
16898
17909
|
const liste = window.matchMedia(abfrage);
|
|
16899
17910
|
const aktualisieren = () => setSchmal(liste.matches);
|
|
@@ -16905,7 +17916,7 @@ function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
|
16905
17916
|
}
|
|
16906
17917
|
|
|
16907
17918
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
16908
|
-
var
|
|
17919
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
16909
17920
|
var ElementsArea = ({
|
|
16910
17921
|
port,
|
|
16911
17922
|
contextId,
|
|
@@ -16920,16 +17931,16 @@ var ElementsArea = ({
|
|
|
16920
17931
|
const gemischt = auswahlTypen.length > 1;
|
|
16921
17932
|
const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
|
|
16922
17933
|
const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
|
|
16923
|
-
const [typ, setTyp] = (0,
|
|
16924
|
-
const [zeigeStillgelegte, setZeigeStillgelegte] = (0,
|
|
16925
|
-
const [gewaehlt, setGewaehlt] = (0,
|
|
16926
|
-
const [neuerTitel, setNeuerTitel] = (0,
|
|
16927
|
-
const [neuerTyp, setNeuerTyp] = (0,
|
|
16928
|
-
const [notiz, setNotiz] = (0,
|
|
16929
|
-
const [anlegend, setAnlegend] = (0,
|
|
16930
|
-
const [anlageOffen, setAnlageOffen] = (0,
|
|
17934
|
+
const [typ, setTyp] = (0, import_react12.useState)(einzelTyp ?? "");
|
|
17935
|
+
const [zeigeStillgelegte, setZeigeStillgelegte] = (0, import_react12.useState)(false);
|
|
17936
|
+
const [gewaehlt, setGewaehlt] = (0, import_react12.useState)(null);
|
|
17937
|
+
const [neuerTitel, setNeuerTitel] = (0, import_react12.useState)("");
|
|
17938
|
+
const [neuerTyp, setNeuerTyp] = (0, import_react12.useState)(auswahlTypen[0]);
|
|
17939
|
+
const [notiz, setNotiz] = (0, import_react12.useState)(null);
|
|
17940
|
+
const [anlegend, setAnlegend] = (0, import_react12.useState)(false);
|
|
17941
|
+
const [anlageOffen, setAnlageOffen] = (0, import_react12.useState)(false);
|
|
16931
17942
|
const schmal = useSchmalesDisplay();
|
|
16932
|
-
const [ansicht, setAnsicht] = (0,
|
|
17943
|
+
const [ansicht, setAnsicht] = (0, import_react12.useState)("liste");
|
|
16933
17944
|
const zeigeListe = !schmal || ansicht === "liste";
|
|
16934
17945
|
const zeigeDetail = !schmal || ansicht === "detail";
|
|
16935
17946
|
const waehle = (elementId) => {
|
|
@@ -16949,17 +17960,17 @@ var ElementsArea = ({
|
|
|
16949
17960
|
setAnlageOffen(false);
|
|
16950
17961
|
setNeuerTitel("");
|
|
16951
17962
|
};
|
|
16952
|
-
return /* @__PURE__ */ (0,
|
|
17963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
16953
17964
|
"div",
|
|
16954
17965
|
{
|
|
16955
17966
|
className: "szenen-elements",
|
|
16956
17967
|
"data-testid": "bereich-elemente",
|
|
16957
17968
|
"data-ansicht": schmal ? ansicht : "beide",
|
|
16958
17969
|
children: [
|
|
16959
|
-
zeigeListe && /* @__PURE__ */ (0,
|
|
16960
|
-
/* @__PURE__ */ (0,
|
|
16961
|
-
/* @__PURE__ */ (0,
|
|
16962
|
-
/* @__PURE__ */ (0,
|
|
17970
|
+
zeigeListe && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__master", "data-testid": "elemente-master", children: [
|
|
17971
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__toolbar", children: [
|
|
17972
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "szenen-elements__heading", children: ueberschrift }),
|
|
17973
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16963
17974
|
"button",
|
|
16964
17975
|
{
|
|
16965
17976
|
type: "button",
|
|
@@ -16975,22 +17986,22 @@ var ElementsArea = ({
|
|
|
16975
17986
|
}
|
|
16976
17987
|
)
|
|
16977
17988
|
] }),
|
|
16978
|
-
gemischt && /* @__PURE__ */ (0,
|
|
17989
|
+
gemischt && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "szenen-elements__scope", children: [
|
|
16979
17990
|
"Art",
|
|
16980
|
-
/* @__PURE__ */ (0,
|
|
17991
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
16981
17992
|
"select",
|
|
16982
17993
|
{
|
|
16983
17994
|
"data-testid": "filter-typ",
|
|
16984
17995
|
value: typ,
|
|
16985
17996
|
onChange: (e) => setTyp(e.target.value),
|
|
16986
17997
|
children: [
|
|
16987
|
-
/* @__PURE__ */ (0,
|
|
16988
|
-
auswahlTypen.map((t) => /* @__PURE__ */ (0,
|
|
17998
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", children: allTypesLabel ?? "alle Typen" }),
|
|
17999
|
+
auswahlTypen.map((t) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: t, children: elementTypPlural(t) }, t))
|
|
16989
18000
|
]
|
|
16990
18001
|
}
|
|
16991
18002
|
)
|
|
16992
18003
|
] }),
|
|
16993
|
-
anlageOffen && /* @__PURE__ */ (0,
|
|
18004
|
+
anlageOffen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
16994
18005
|
"form",
|
|
16995
18006
|
{
|
|
16996
18007
|
className: "szenen-elements__create",
|
|
@@ -17018,9 +18029,9 @@ var ElementsArea = ({
|
|
|
17018
18029
|
}
|
|
17019
18030
|
},
|
|
17020
18031
|
children: [
|
|
17021
|
-
/* @__PURE__ */ (0,
|
|
18032
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "szenen-elements__create-title", children: [
|
|
17022
18033
|
einzelTyp ? `Neue ${einzahl}` : "Titel",
|
|
17023
|
-
/* @__PURE__ */ (0,
|
|
18034
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17024
18035
|
"input",
|
|
17025
18036
|
{
|
|
17026
18037
|
"data-testid": "neuer-titel",
|
|
@@ -17031,20 +18042,20 @@ var ElementsArea = ({
|
|
|
17031
18042
|
}
|
|
17032
18043
|
)
|
|
17033
18044
|
] }),
|
|
17034
|
-
gemischt && /* @__PURE__ */ (0,
|
|
18045
|
+
gemischt && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "szenen-elements__create-type", children: [
|
|
17035
18046
|
"Art",
|
|
17036
|
-
/* @__PURE__ */ (0,
|
|
18047
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17037
18048
|
"select",
|
|
17038
18049
|
{
|
|
17039
18050
|
"data-testid": "neuer-typ",
|
|
17040
18051
|
value: neuerTyp,
|
|
17041
18052
|
onChange: (e) => setNeuerTyp(e.target.value),
|
|
17042
|
-
children: auswahlTypen.map((t) => /* @__PURE__ */ (0,
|
|
18053
|
+
children: auswahlTypen.map((t) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: t, children: elementTypLabel(t) }, t))
|
|
17043
18054
|
}
|
|
17044
18055
|
)
|
|
17045
18056
|
] }),
|
|
17046
|
-
/* @__PURE__ */ (0,
|
|
17047
|
-
/* @__PURE__ */ (0,
|
|
18057
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__create-actions", children: [
|
|
18058
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17048
18059
|
"button",
|
|
17049
18060
|
{
|
|
17050
18061
|
type: "submit",
|
|
@@ -17053,7 +18064,7 @@ var ElementsArea = ({
|
|
|
17053
18064
|
children: "anlegen"
|
|
17054
18065
|
}
|
|
17055
18066
|
),
|
|
17056
|
-
/* @__PURE__ */ (0,
|
|
18067
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17057
18068
|
"button",
|
|
17058
18069
|
{
|
|
17059
18070
|
type: "button",
|
|
@@ -17066,19 +18077,19 @@ var ElementsArea = ({
|
|
|
17066
18077
|
]
|
|
17067
18078
|
}
|
|
17068
18079
|
),
|
|
17069
|
-
notiz && /* @__PURE__ */ (0,
|
|
17070
|
-
phase.status === "loading" && /* @__PURE__ */ (0,
|
|
17071
|
-
phase.status === "error" && /* @__PURE__ */ (0,
|
|
18080
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { "data-testid": "anlegen-notiz", "data-tone": notiz.tone, children: notiz.text }),
|
|
18081
|
+
phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { "data-testid": "elemente-laden", children: "Elemente werden geladen \u2026" }),
|
|
18082
|
+
phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { "data-testid": "elemente-fehler", role: "alert", children: [
|
|
17072
18083
|
"Elemente konnten nicht geladen werden: ",
|
|
17073
18084
|
phase.message,
|
|
17074
18085
|
phase.retryable && " \u2014 ein erneuter Versuch kann helfen."
|
|
17075
18086
|
] }),
|
|
17076
|
-
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */ (0,
|
|
18087
|
+
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { "data-testid": "elemente-leer", children: [
|
|
17077
18088
|
typ ? `Keine ${elementTypPlural(typ)} in diesem Kontext.` : "Nichts in diesem Kontext.",
|
|
17078
18089
|
" ",
|
|
17079
18090
|
'Mit \u201E+ Neu" anlegen.'
|
|
17080
18091
|
] }),
|
|
17081
|
-
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */ (0,
|
|
18092
|
+
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "szenen-elements__list", "data-testid": "elemente-liste", children: phase.value.map((element) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { "data-element-id": element.element_id, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
17082
18093
|
"button",
|
|
17083
18094
|
{
|
|
17084
18095
|
type: "button",
|
|
@@ -17087,18 +18098,18 @@ var ElementsArea = ({
|
|
|
17087
18098
|
className: element.element_id === gewaehlt ? "is-selected" : void 0,
|
|
17088
18099
|
onClick: () => waehle(element.element_id),
|
|
17089
18100
|
children: [
|
|
17090
|
-
/* @__PURE__ */ (0,
|
|
17091
|
-
gemischt && /* @__PURE__ */ (0,
|
|
17092
|
-
element.subtype && /* @__PURE__ */ (0,
|
|
17093
|
-
element.retired && /* @__PURE__ */ (0,
|
|
18101
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { className: "szenen-elements__title", children: element.title || "Unbenanntes Element" }),
|
|
18102
|
+
gemischt && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "szenen-elements__type", children: elementTypLabel(element.type) }),
|
|
18103
|
+
element.subtype && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "szenen-elements__subtype", children: element.subtype }),
|
|
18104
|
+
element.retired && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "szenen-elements__retired", children: "stillgelegt" })
|
|
17094
18105
|
]
|
|
17095
18106
|
}
|
|
17096
18107
|
) }, element.element_id)) }),
|
|
17097
|
-
/* @__PURE__ */ (0,
|
|
17098
|
-
/* @__PURE__ */ (0,
|
|
17099
|
-
/* @__PURE__ */ (0,
|
|
17100
|
-
/* @__PURE__ */ (0,
|
|
17101
|
-
/* @__PURE__ */ (0,
|
|
18108
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("details", { className: "szenen-elements__options", "data-testid": "listen-optionen", children: [
|
|
18109
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("summary", { children: "Listenoptionen" }),
|
|
18110
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__filter", children: [
|
|
18111
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { children: [
|
|
18112
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17102
18113
|
"input",
|
|
17103
18114
|
{
|
|
17104
18115
|
type: "checkbox",
|
|
@@ -17109,12 +18120,12 @@ var ElementsArea = ({
|
|
|
17109
18120
|
),
|
|
17110
18121
|
"stillgelegte Elemente einblenden"
|
|
17111
18122
|
] }),
|
|
17112
|
-
/* @__PURE__ */ (0,
|
|
18123
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", "data-testid": "neu-laden", onClick: neuLaden, children: "neu laden" })
|
|
17113
18124
|
] })
|
|
17114
18125
|
] })
|
|
17115
18126
|
] }),
|
|
17116
|
-
zeigeDetail && /* @__PURE__ */ (0,
|
|
17117
|
-
schmal && /* @__PURE__ */ (0,
|
|
18127
|
+
zeigeDetail && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__detail", "data-testid": "elemente-detail-spalte", children: [
|
|
18128
|
+
schmal && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17118
18129
|
"button",
|
|
17119
18130
|
{
|
|
17120
18131
|
type: "button",
|
|
@@ -17124,7 +18135,7 @@ var ElementsArea = ({
|
|
|
17124
18135
|
children: "\u2190 Zur\xFCck zur Liste"
|
|
17125
18136
|
}
|
|
17126
18137
|
),
|
|
17127
|
-
gewaehlt ? /* @__PURE__ */ (0,
|
|
18138
|
+
gewaehlt ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
17128
18139
|
ElementDetail,
|
|
17129
18140
|
{
|
|
17130
18141
|
port,
|
|
@@ -17133,7 +18144,7 @@ var ElementsArea = ({
|
|
|
17133
18144
|
author,
|
|
17134
18145
|
onChanged: neuLaden
|
|
17135
18146
|
}
|
|
17136
|
-
) : /* @__PURE__ */ (0,
|
|
18147
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "szenen-elements__empty-detail", "data-testid": "keine-auswahl", children: "Nichts ausgew\xE4hlt. Ein Eintrag aus der Liste \xF6ffnet die Bearbeitung." })
|
|
17137
18148
|
] })
|
|
17138
18149
|
]
|
|
17139
18150
|
}
|
|
@@ -17141,17 +18152,17 @@ var ElementsArea = ({
|
|
|
17141
18152
|
};
|
|
17142
18153
|
|
|
17143
18154
|
// src/features/szenen/areas/SceneArea.tsx
|
|
17144
|
-
var
|
|
17145
|
-
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0,
|
|
17146
|
-
/* @__PURE__ */ (0,
|
|
17147
|
-
/* @__PURE__ */ (0,
|
|
18155
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
18156
|
+
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
18157
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
|
|
18158
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
17148
18159
|
] });
|
|
17149
18160
|
|
|
17150
18161
|
// src/features/szenen/areas/SetupArea.tsx
|
|
17151
|
-
var
|
|
17152
|
-
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0,
|
|
17153
|
-
/* @__PURE__ */ (0,
|
|
17154
|
-
/* @__PURE__ */ (0,
|
|
18162
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
18163
|
+
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
|
|
18164
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
|
|
18165
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
17155
18166
|
ElementsArea,
|
|
17156
18167
|
{
|
|
17157
18168
|
port,
|
|
@@ -17164,10 +18175,10 @@ var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
17164
18175
|
] });
|
|
17165
18176
|
|
|
17166
18177
|
// src/features/szenen/areas/ShotArea.tsx
|
|
17167
|
-
var
|
|
17168
|
-
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0,
|
|
17169
|
-
/* @__PURE__ */ (0,
|
|
17170
|
-
/* @__PURE__ */ (0,
|
|
18178
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
18179
|
+
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
|
|
18180
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
|
|
18181
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17171
18182
|
ElementsArea,
|
|
17172
18183
|
{
|
|
17173
18184
|
port,
|
|
@@ -17180,21 +18191,21 @@ var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13
|
|
|
17180
18191
|
] });
|
|
17181
18192
|
|
|
17182
18193
|
// src/features/szenen/areas/MediaArea.tsx
|
|
17183
|
-
var
|
|
17184
|
-
var
|
|
18194
|
+
var import_react13 = require("react");
|
|
18195
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
17185
18196
|
var leer = async () => ({ kind: "ok", value: [] });
|
|
17186
18197
|
var MediaArea = ({ port }) => {
|
|
17187
18198
|
const media = port.media;
|
|
17188
|
-
const [versionInput, setVersionInput] = (0,
|
|
17189
|
-
const [versionId, setVersionId] = (0,
|
|
17190
|
-
const [itemInput, setItemInput] = (0,
|
|
17191
|
-
const [itemId, setItemId] = (0,
|
|
17192
|
-
const [assetId, setAssetId] = (0,
|
|
17193
|
-
const [role, setRole] = (0,
|
|
17194
|
-
const [position, setPosition] = (0,
|
|
17195
|
-
const [notiz, setNotiz] = (0,
|
|
17196
|
-
const [busy, setBusy] = (0,
|
|
17197
|
-
const [refresh, setRefresh] = (0,
|
|
18199
|
+
const [versionInput, setVersionInput] = (0, import_react13.useState)("");
|
|
18200
|
+
const [versionId, setVersionId] = (0, import_react13.useState)("");
|
|
18201
|
+
const [itemInput, setItemInput] = (0, import_react13.useState)("");
|
|
18202
|
+
const [itemId, setItemId] = (0, import_react13.useState)("");
|
|
18203
|
+
const [assetId, setAssetId] = (0, import_react13.useState)("");
|
|
18204
|
+
const [role, setRole] = (0, import_react13.useState)("reference");
|
|
18205
|
+
const [position, setPosition] = (0, import_react13.useState)("0");
|
|
18206
|
+
const [notiz, setNotiz] = (0, import_react13.useState)(null);
|
|
18207
|
+
const [busy, setBusy] = (0, import_react13.useState)(false);
|
|
18208
|
+
const [refresh, setRefresh] = (0, import_react13.useState)(0);
|
|
17198
18209
|
const [versionPhase] = usePortQuery(
|
|
17199
18210
|
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
17200
18211
|
[media, versionId, refresh]
|
|
@@ -17240,145 +18251,145 @@ var MediaArea = ({ port }) => {
|
|
|
17240
18251
|
};
|
|
17241
18252
|
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
17242
18253
|
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
17243
|
-
return /* @__PURE__ */ (0,
|
|
17244
|
-
/* @__PURE__ */ (0,
|
|
17245
|
-
/* @__PURE__ */ (0,
|
|
17246
|
-
/* @__PURE__ */ (0,
|
|
17247
|
-
/* @__PURE__ */ (0,
|
|
17248
|
-
/* @__PURE__ */ (0,
|
|
18254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
18255
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "szenen-area__lead", children: "Bereits vorhandene Medien-Assets einer Elementversion zuordnen. Hochgeladen wird hier nichts \u2014 Medien entstehen \xFCber den bestehenden Speicherweg aus Stufe 5." }),
|
|
18256
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
18257
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Version" }),
|
|
18258
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
18259
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17249
18260
|
"Version-ID",
|
|
17250
|
-
/* @__PURE__ */ (0,
|
|
18261
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
17251
18262
|
] }),
|
|
17252
|
-
/* @__PURE__ */ (0,
|
|
18263
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
17253
18264
|
] }),
|
|
17254
|
-
/* @__PURE__ */ (0,
|
|
17255
|
-
/* @__PURE__ */ (0,
|
|
18265
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__attach", children: [
|
|
18266
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17256
18267
|
"Asset-ID",
|
|
17257
|
-
/* @__PURE__ */ (0,
|
|
18268
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
17258
18269
|
] }),
|
|
17259
|
-
/* @__PURE__ */ (0,
|
|
18270
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17260
18271
|
"Rolle",
|
|
17261
|
-
/* @__PURE__ */ (0,
|
|
17262
|
-
/* @__PURE__ */ (0,
|
|
17263
|
-
/* @__PURE__ */ (0,
|
|
17264
|
-
/* @__PURE__ */ (0,
|
|
17265
|
-
/* @__PURE__ */ (0,
|
|
18272
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
18273
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "reference", children: "reference" }),
|
|
18274
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "mask", children: "mask" }),
|
|
18275
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "palette", children: "palette" }),
|
|
18276
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "example", children: "example" })
|
|
17266
18277
|
] })
|
|
17267
18278
|
] }),
|
|
17268
|
-
/* @__PURE__ */ (0,
|
|
18279
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17269
18280
|
"Position",
|
|
17270
|
-
/* @__PURE__ */ (0,
|
|
18281
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
17271
18282
|
] }),
|
|
17272
|
-
/* @__PURE__ */ (0,
|
|
18283
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
17273
18284
|
] }),
|
|
17274
|
-
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0,
|
|
17275
|
-
versionPhase.status === "error" && /* @__PURE__ */ (0,
|
|
18285
|
+
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
18286
|
+
versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
17276
18287
|
"Versionsmedien konnten nicht geladen werden: ",
|
|
17277
18288
|
versionPhase.message
|
|
17278
18289
|
] }),
|
|
17279
|
-
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0,
|
|
18290
|
+
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
17280
18291
|
"Version ",
|
|
17281
18292
|
versionId,
|
|
17282
18293
|
" hat keine Medien."
|
|
17283
18294
|
] }),
|
|
17284
|
-
/* @__PURE__ */ (0,
|
|
17285
|
-
/* @__PURE__ */ (0,
|
|
17286
|
-
/* @__PURE__ */ (0,
|
|
18295
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
18296
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
18297
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
17287
18298
|
medium.role,
|
|
17288
18299
|
" \xB7 Position ",
|
|
17289
18300
|
medium.position
|
|
17290
18301
|
] }),
|
|
17291
|
-
medium.url && /* @__PURE__ */ (0,
|
|
17292
|
-
/* @__PURE__ */ (0,
|
|
18302
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
18303
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
17293
18304
|
] }, `${medium.assetId}:${medium.role}`)) })
|
|
17294
18305
|
] }),
|
|
17295
|
-
/* @__PURE__ */ (0,
|
|
17296
|
-
/* @__PURE__ */ (0,
|
|
17297
|
-
/* @__PURE__ */ (0,
|
|
17298
|
-
/* @__PURE__ */ (0,
|
|
18306
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
18307
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Item-Medien" }),
|
|
18308
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
18309
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17299
18310
|
"Item-ID",
|
|
17300
|
-
/* @__PURE__ */ (0,
|
|
18311
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
17301
18312
|
] }),
|
|
17302
|
-
/* @__PURE__ */ (0,
|
|
18313
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
17303
18314
|
] }),
|
|
17304
|
-
itemPhase.status === "error" && /* @__PURE__ */ (0,
|
|
18315
|
+
itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
17305
18316
|
"Item-Medien konnten nicht geladen werden: ",
|
|
17306
18317
|
itemPhase.message
|
|
17307
18318
|
] }),
|
|
17308
|
-
/* @__PURE__ */ (0,
|
|
17309
|
-
/* @__PURE__ */ (0,
|
|
17310
|
-
/* @__PURE__ */ (0,
|
|
18319
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
18320
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
18321
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
17311
18322
|
medium.role,
|
|
17312
18323
|
" \xB7 Position ",
|
|
17313
18324
|
medium.position
|
|
17314
18325
|
] }),
|
|
17315
|
-
medium.url && /* @__PURE__ */ (0,
|
|
18326
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
17316
18327
|
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
17317
18328
|
] }),
|
|
17318
|
-
notiz && /* @__PURE__ */ (0,
|
|
18329
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
17319
18330
|
] });
|
|
17320
18331
|
};
|
|
17321
18332
|
|
|
17322
18333
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
17323
|
-
var
|
|
18334
|
+
var import_react16 = require("react");
|
|
17324
18335
|
|
|
17325
18336
|
// src/features/szenen/areas/RecoveryPanel.tsx
|
|
17326
|
-
var
|
|
17327
|
-
var
|
|
18337
|
+
var import_react14 = require("react");
|
|
18338
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
17328
18339
|
var Diagnosen = ({ befunde, testId }) => {
|
|
17329
18340
|
if (befunde.length === 0) return null;
|
|
17330
|
-
return /* @__PURE__ */ (0,
|
|
17331
|
-
/* @__PURE__ */ (0,
|
|
17332
|
-
d.proposal_type && /* @__PURE__ */ (0,
|
|
18341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "szenen-diagnose__liste", "data-testid": testId, children: befunde.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-severity": d.severity, children: [
|
|
18342
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: d.code }),
|
|
18343
|
+
d.proposal_type && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17333
18344
|
" \xB7 ",
|
|
17334
|
-
/* @__PURE__ */ (0,
|
|
18345
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: d.proposal_type })
|
|
17335
18346
|
] }),
|
|
17336
|
-
d.pointer && /* @__PURE__ */ (0,
|
|
18347
|
+
d.pointer && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17337
18348
|
" \xB7 ",
|
|
17338
|
-
/* @__PURE__ */ (0,
|
|
18349
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: d.pointer })
|
|
17339
18350
|
] }),
|
|
17340
|
-
typeof d.line === "number" && /* @__PURE__ */ (0,
|
|
18351
|
+
typeof d.line === "number" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17341
18352
|
" \xB7 Zeile ",
|
|
17342
18353
|
d.line,
|
|
17343
18354
|
", Spalte ",
|
|
17344
18355
|
d.column
|
|
17345
18356
|
] }),
|
|
17346
|
-
/* @__PURE__ */ (0,
|
|
18357
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: d.message })
|
|
17347
18358
|
] }, i)) });
|
|
17348
18359
|
};
|
|
17349
|
-
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0,
|
|
17350
|
-
/* @__PURE__ */ (0,
|
|
18360
|
+
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
|
|
18361
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { "data-testid": "rettung-status", children: [
|
|
17351
18362
|
bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
|
|
17352
18363
|
bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
|
|
17353
18364
|
bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
|
|
17354
18365
|
] }),
|
|
17355
|
-
bewertung.proposals.length > 0 && /* @__PURE__ */ (0,
|
|
17356
|
-
/* @__PURE__ */ (0,
|
|
17357
|
-
/* @__PURE__ */ (0,
|
|
17358
|
-
/* @__PURE__ */ (0,
|
|
18366
|
+
bewertung.proposals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
18367
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Verwertbar" }),
|
|
18368
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { "data-testid": "rettung-verwertbar", children: bewertung.proposals.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-testid": `rettung-verwertbar-${p.type}`, children: [
|
|
18369
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: p.type }),
|
|
17359
18370
|
" \u2014 ",
|
|
17360
18371
|
p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
|
|
17361
|
-
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0,
|
|
17362
|
-
/* @__PURE__ */ (0,
|
|
18372
|
+
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { children: p.gaps.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { children: [
|
|
18373
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: l.pointer }),
|
|
17363
18374
|
": ",
|
|
17364
18375
|
l.reason
|
|
17365
18376
|
] }, i)) })
|
|
17366
18377
|
] }, p.type)) })
|
|
17367
18378
|
] }),
|
|
17368
|
-
bewertung.rejected.length > 0 && /* @__PURE__ */ (0,
|
|
17369
|
-
/* @__PURE__ */ (0,
|
|
17370
|
-
/* @__PURE__ */ (0,
|
|
17371
|
-
/* @__PURE__ */ (0,
|
|
17372
|
-
/* @__PURE__ */ (0,
|
|
18379
|
+
bewertung.rejected.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
18380
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Nicht verwertbar" }),
|
|
18381
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { "data-testid": "rettung-abgelehnt", children: bewertung.rejected.map((r) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-testid": `rettung-abgelehnt-${r.type}`, children: [
|
|
18382
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: r.type }),
|
|
18383
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
|
|
17373
18384
|
] }, r.type)) })
|
|
17374
18385
|
] })
|
|
17375
18386
|
] });
|
|
17376
18387
|
var RecoveryPanel = ({ port, lauf }) => {
|
|
17377
|
-
const [arbeitskopie, setArbeitskopie] = (0,
|
|
17378
|
-
const [bewertung, setBewertung] = (0,
|
|
17379
|
-
const [gesichert, setGesichert] = (0,
|
|
17380
|
-
const [meldung, setMeldung] = (0,
|
|
17381
|
-
const [laeuft, setLaeuft] = (0,
|
|
18388
|
+
const [arbeitskopie, setArbeitskopie] = (0, import_react14.useState)(null);
|
|
18389
|
+
const [bewertung, setBewertung] = (0, import_react14.useState)(null);
|
|
18390
|
+
const [gesichert, setGesichert] = (0, import_react14.useState)(null);
|
|
18391
|
+
const [meldung, setMeldung] = (0, import_react14.useState)(null);
|
|
18392
|
+
const [laeuft, setLaeuft] = (0, import_react14.useState)(false);
|
|
17382
18393
|
if (!port.derivation) return null;
|
|
17383
18394
|
if (typeof lauf.raw_output !== "string" || lauf.raw_output.length === 0) return null;
|
|
17384
18395
|
const derivation = port.derivation;
|
|
@@ -17414,16 +18425,16 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17414
18425
|
setLaeuft(false);
|
|
17415
18426
|
}
|
|
17416
18427
|
}
|
|
17417
|
-
return /* @__PURE__ */ (0,
|
|
17418
|
-
/* @__PURE__ */ (0,
|
|
17419
|
-
/* @__PURE__ */ (0,
|
|
18428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
|
|
18429
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { children: "Antwort retten" }),
|
|
18430
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
17420
18431
|
"Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
|
|
17421
|
-
/* @__PURE__ */ (0,
|
|
18432
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: "ohne" }),
|
|
17422
18433
|
" einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
|
|
17423
18434
|
] }),
|
|
17424
|
-
/* @__PURE__ */ (0,
|
|
17425
|
-
/* @__PURE__ */ (0,
|
|
17426
|
-
/* @__PURE__ */ (0,
|
|
18435
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "szenen-field", children: [
|
|
18436
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
|
|
18437
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17427
18438
|
"textarea",
|
|
17428
18439
|
{
|
|
17429
18440
|
readOnly: true,
|
|
@@ -17434,12 +18445,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17434
18445
|
}
|
|
17435
18446
|
)
|
|
17436
18447
|
] }),
|
|
17437
|
-
/* @__PURE__ */ (0,
|
|
17438
|
-
/* @__PURE__ */ (0,
|
|
18448
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "szenen-field", children: [
|
|
18449
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
|
|
17439
18450
|
"Arbeitskopie",
|
|
17440
18451
|
bearbeitet ? " (bearbeitet)" : ""
|
|
17441
18452
|
] }),
|
|
17442
|
-
/* @__PURE__ */ (0,
|
|
18453
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17443
18454
|
"textarea",
|
|
17444
18455
|
{
|
|
17445
18456
|
rows: 8,
|
|
@@ -17449,8 +18460,8 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17449
18460
|
}
|
|
17450
18461
|
)
|
|
17451
18462
|
] }),
|
|
17452
|
-
/* @__PURE__ */ (0,
|
|
17453
|
-
/* @__PURE__ */ (0,
|
|
18463
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-rettung__aktionen", children: [
|
|
18464
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17454
18465
|
"button",
|
|
17455
18466
|
{
|
|
17456
18467
|
type: "button",
|
|
@@ -17460,7 +18471,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17460
18471
|
children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
|
|
17461
18472
|
}
|
|
17462
18473
|
),
|
|
17463
|
-
/* @__PURE__ */ (0,
|
|
18474
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17464
18475
|
"button",
|
|
17465
18476
|
{
|
|
17466
18477
|
type: "button",
|
|
@@ -17470,7 +18481,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17470
18481
|
children: "Arbeitsfassung speichern"
|
|
17471
18482
|
}
|
|
17472
18483
|
),
|
|
17473
|
-
arbeitskopie !== null && /* @__PURE__ */ (0,
|
|
18484
|
+
arbeitskopie !== null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17474
18485
|
"button",
|
|
17475
18486
|
{
|
|
17476
18487
|
type: "button",
|
|
@@ -17485,15 +18496,15 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17485
18496
|
}
|
|
17486
18497
|
)
|
|
17487
18498
|
] }),
|
|
17488
|
-
meldung && /* @__PURE__ */ (0,
|
|
17489
|
-
bewertung && /* @__PURE__ */ (0,
|
|
17490
|
-
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
17491
|
-
/* @__PURE__ */ (0,
|
|
17492
|
-
/* @__PURE__ */ (0,
|
|
18499
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
|
|
18500
|
+
bewertung && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ausbeute, { bewertung }),
|
|
18501
|
+
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-diagnose", children: [
|
|
18502
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Befunde an dieser Fassung" }),
|
|
18503
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
|
|
17493
18504
|
] }),
|
|
17494
|
-
gesichert && /* @__PURE__ */ (0,
|
|
18505
|
+
gesichert && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { "data-testid": "rettung-gesichert", children: [
|
|
17495
18506
|
"Gespeichert als Arbeitsfassung ",
|
|
17496
|
-
/* @__PURE__ */ (0,
|
|
18507
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: gesichert.recovery_id }),
|
|
17497
18508
|
gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
|
|
17498
18509
|
". Das Original des Laufs ist davon unber\xFChrt."
|
|
17499
18510
|
] })
|
|
@@ -17501,12 +18512,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17501
18512
|
};
|
|
17502
18513
|
|
|
17503
18514
|
// src/features/szenen/areas/ChainActions.tsx
|
|
17504
|
-
var
|
|
17505
|
-
var
|
|
18515
|
+
var import_react15 = require("react");
|
|
18516
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
17506
18517
|
var ChainActions = ({ port, runId, recoveryId }) => {
|
|
17507
|
-
const [graph, setGraph] = (0,
|
|
17508
|
-
const [meldung, setMeldung] = (0,
|
|
17509
|
-
const [laeuft, setLaeuft] = (0,
|
|
18518
|
+
const [graph, setGraph] = (0, import_react15.useState)(null);
|
|
18519
|
+
const [meldung, setMeldung] = (0, import_react15.useState)(null);
|
|
18520
|
+
const [laeuft, setLaeuft] = (0, import_react15.useState)(false);
|
|
17510
18521
|
if (!port.derivation) return null;
|
|
17511
18522
|
const derivation = port.derivation;
|
|
17512
18523
|
const runs = port.runs;
|
|
@@ -17528,14 +18539,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
17528
18539
|
setLaeuft(false);
|
|
17529
18540
|
}
|
|
17530
18541
|
}
|
|
17531
|
-
return /* @__PURE__ */ (0,
|
|
17532
|
-
/* @__PURE__ */ (0,
|
|
17533
|
-
/* @__PURE__ */ (0,
|
|
18542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "szenen-kette", "data-testid": "kette", children: [
|
|
18543
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { children: "Draft-Kette" }),
|
|
18544
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
17534
18545
|
"Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
|
|
17535
|
-
/* @__PURE__ */ (0,
|
|
18546
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: "ohne" }),
|
|
17536
18547
|
" vorher etwas zu ver\xF6ffentlichen."
|
|
17537
18548
|
] }),
|
|
17538
|
-
!graph && /* @__PURE__ */ (0,
|
|
18549
|
+
!graph && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17539
18550
|
"button",
|
|
17540
18551
|
{
|
|
17541
18552
|
type: "button",
|
|
@@ -17545,34 +18556,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
17545
18556
|
children: "Als Draft-Kette \xFCbernehmen"
|
|
17546
18557
|
}
|
|
17547
18558
|
),
|
|
17548
|
-
graph && /* @__PURE__ */ (0,
|
|
17549
|
-
/* @__PURE__ */ (0,
|
|
18559
|
+
graph && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "data-testid": "kette-ergebnis", children: [
|
|
18560
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
17550
18561
|
"Kette ",
|
|
17551
|
-
/* @__PURE__ */ (0,
|
|
18562
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: graph.chainId }),
|
|
17552
18563
|
" angelegt. Kein Knoten ist ver\xF6ffentlicht."
|
|
17553
18564
|
] }),
|
|
17554
|
-
/* @__PURE__ */ (0,
|
|
17555
|
-
/* @__PURE__ */ (0,
|
|
18565
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { "data-testid": "kette-knoten", children: graph.created.map((k) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { "data-testid": `kette-knoten-${k.type}`, children: [
|
|
18566
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: k.type }),
|
|
17556
18567
|
" \u2014 Element ",
|
|
17557
|
-
/* @__PURE__ */ (0,
|
|
18568
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: k.elementId }),
|
|
17558
18569
|
", Entwurf ",
|
|
17559
|
-
/* @__PURE__ */ (0,
|
|
18570
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: k.draftId }),
|
|
17560
18571
|
" (Revision ",
|
|
17561
18572
|
k.revision,
|
|
17562
18573
|
")"
|
|
17563
18574
|
] }, k.type)) }),
|
|
17564
|
-
graph.missing.length > 0 && /* @__PURE__ */ (0,
|
|
17565
|
-
/* @__PURE__ */ (0,
|
|
17566
|
-
/* @__PURE__ */ (0,
|
|
17567
|
-
/* @__PURE__ */ (0,
|
|
18575
|
+
graph.missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
|
|
18576
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h5", { children: "Unvollst\xE4ndig erzeugt" }),
|
|
18577
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { children: graph.missing.map((m) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { children: [
|
|
18578
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: m.type }),
|
|
17568
18579
|
": ",
|
|
17569
18580
|
m.reason
|
|
17570
18581
|
] }, m.type)) })
|
|
17571
18582
|
] })
|
|
17572
18583
|
] }),
|
|
17573
|
-
shotKnoten && /* @__PURE__ */ (0,
|
|
17574
|
-
/* @__PURE__ */ (0,
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
18584
|
+
shotKnoten && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
18585
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: 'Die Entw\xFCrfe lassen sich jetzt unter \u201E1 \xB7 Bausteine" \xE4ndern. Der Prompt-Lauf friert den Stand ein, den er dabei vorfindet \u2014 dieselbe Aktion steht auch am Shot selbst, unter \u201E4 \xB7 Prompt".' }),
|
|
18586
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17576
18587
|
PromptStartAction,
|
|
17577
18588
|
{
|
|
17578
18589
|
port,
|
|
@@ -17580,20 +18591,20 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
17580
18591
|
}
|
|
17581
18592
|
)
|
|
17582
18593
|
] }),
|
|
17583
|
-
meldung && /* @__PURE__ */ (0,
|
|
18594
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
|
|
17584
18595
|
] });
|
|
17585
18596
|
};
|
|
17586
18597
|
|
|
17587
18598
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
17588
|
-
var
|
|
18599
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
17589
18600
|
var MODUS_TEXT = {
|
|
17590
18601
|
prompt: "Nur Prompt",
|
|
17591
18602
|
image: "Nur Bild",
|
|
17592
18603
|
image_prompt: "Bild und Prompt"
|
|
17593
18604
|
};
|
|
17594
18605
|
var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
17595
|
-
const [kopiert, setKopiert] = (0,
|
|
17596
|
-
const feld = (0,
|
|
18606
|
+
const [kopiert, setKopiert] = (0, import_react16.useState)(false);
|
|
18607
|
+
const feld = (0, import_react16.useRef)(null);
|
|
17597
18608
|
async function kopieren() {
|
|
17598
18609
|
try {
|
|
17599
18610
|
await navigator.clipboard.writeText(text);
|
|
@@ -17603,15 +18614,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
17603
18614
|
setKopiert(false);
|
|
17604
18615
|
}
|
|
17605
18616
|
}
|
|
17606
|
-
return /* @__PURE__ */ (0,
|
|
17607
|
-
/* @__PURE__ */ (0,
|
|
18617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("details", { open: offen, "data-testid": `belege-${testId}`, children: [
|
|
18618
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("summary", { children: [
|
|
17608
18619
|
titel,
|
|
17609
18620
|
" (",
|
|
17610
18621
|
text.length,
|
|
17611
18622
|
" Zeichen)"
|
|
17612
18623
|
] }),
|
|
17613
|
-
/* @__PURE__ */ (0,
|
|
17614
|
-
/* @__PURE__ */ (0,
|
|
18624
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-beleg__kopf", children: [
|
|
18625
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17615
18626
|
"button",
|
|
17616
18627
|
{
|
|
17617
18628
|
type: "button",
|
|
@@ -17620,9 +18631,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
17620
18631
|
children: "Kopieren"
|
|
17621
18632
|
}
|
|
17622
18633
|
),
|
|
17623
|
-
kopiert && /* @__PURE__ */ (0,
|
|
18634
|
+
kopiert && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
|
|
17624
18635
|
] }),
|
|
17625
|
-
/* @__PURE__ */ (0,
|
|
18636
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17626
18637
|
"textarea",
|
|
17627
18638
|
{
|
|
17628
18639
|
ref: feld,
|
|
@@ -17636,8 +18647,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
17636
18647
|
)
|
|
17637
18648
|
] });
|
|
17638
18649
|
};
|
|
17639
|
-
var Belege = ({ lauf }) => /* @__PURE__ */ (0,
|
|
17640
|
-
lauf.raw_output ? /* @__PURE__ */ (0,
|
|
18650
|
+
var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
|
|
18651
|
+
lauf.raw_output ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17641
18652
|
BelegFeld,
|
|
17642
18653
|
{
|
|
17643
18654
|
titel: "Rohantwort des Modells",
|
|
@@ -17648,9 +18659,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div",
|
|
|
17648
18659
|
) : (
|
|
17649
18660
|
/* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
|
|
17650
18661
|
das Modell hat also nicht „falsch geantwortet". */
|
|
17651
|
-
/* @__PURE__ */ (0,
|
|
18662
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { "data-testid": "roh-antwort-fehlt", children: "Es gibt keine Rohantwort \u2014 der Lauf ist gescheitert, bevor ein Text ankam (etwa Netz, Sperre oder Providerfehler)." })
|
|
17652
18663
|
),
|
|
17653
|
-
/* @__PURE__ */ (0,
|
|
18664
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17654
18665
|
BelegFeld,
|
|
17655
18666
|
{
|
|
17656
18667
|
titel: "Systemprompt dieses Laufs",
|
|
@@ -17662,18 +18673,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div",
|
|
|
17662
18673
|
] });
|
|
17663
18674
|
var Herkunft = ({ lauf }) => {
|
|
17664
18675
|
if (!lauf.follows) return null;
|
|
17665
|
-
return /* @__PURE__ */ (0,
|
|
18676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
|
|
17666
18677
|
"Folgt auf Lauf ",
|
|
17667
|
-
/* @__PURE__ */ (0,
|
|
18678
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: lauf.follows.run_id }),
|
|
17668
18679
|
".",
|
|
17669
18680
|
lauf.status === "succeeded" && " Im Folgelauf gelungen."
|
|
17670
18681
|
] });
|
|
17671
18682
|
};
|
|
17672
18683
|
var Widerspruch = ({ lauf }) => {
|
|
17673
18684
|
if (!lauf.reply) return null;
|
|
17674
|
-
return /* @__PURE__ */ (0,
|
|
17675
|
-
/* @__PURE__ */ (0,
|
|
17676
|
-
/* @__PURE__ */ (0,
|
|
18685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
|
|
18686
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
|
|
18687
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: lauf.reply })
|
|
17677
18688
|
] });
|
|
17678
18689
|
};
|
|
17679
18690
|
function readAsBase642(datei) {
|
|
@@ -17688,11 +18699,33 @@ function readAsBase642(datei) {
|
|
|
17688
18699
|
leser.readAsDataURL(datei);
|
|
17689
18700
|
});
|
|
17690
18701
|
}
|
|
18702
|
+
var ERSTE_KACHELN = 12;
|
|
18703
|
+
function useSichtbareKacheln(alle, wurzel) {
|
|
18704
|
+
const [gesehen, setGesehen] = (0, import_react16.useState)([]);
|
|
18705
|
+
const schluessel = alle.join(" ");
|
|
18706
|
+
(0, import_react16.useEffect)(() => {
|
|
18707
|
+
const ziel = wurzel.current;
|
|
18708
|
+
if (!ziel || typeof IntersectionObserver === "undefined") return void 0;
|
|
18709
|
+
const beobachter = new IntersectionObserver((eintraege) => {
|
|
18710
|
+
const neue = eintraege.filter((e) => e.isIntersecting).map((e) => e.target.dataset.mediaRef).filter((r) => Boolean(r));
|
|
18711
|
+
if (neue.length === 0) return;
|
|
18712
|
+
setGesehen((bisher) => [.../* @__PURE__ */ new Set([...bisher, ...neue])]);
|
|
18713
|
+
for (const e of eintraege) if (e.isIntersecting) beobachter.unobserve(e.target);
|
|
18714
|
+
}, { root: ziel, rootMargin: "200px" });
|
|
18715
|
+
ziel.querySelectorAll("[data-media-ref]").forEach((el) => beobachter.observe(el));
|
|
18716
|
+
return () => beobachter.disconnect();
|
|
18717
|
+
}, [wurzel, schluessel]);
|
|
18718
|
+
return (0, import_react16.useMemo)(
|
|
18719
|
+
() => [.../* @__PURE__ */ new Set([...alle.slice(0, ERSTE_KACHELN), ...gesehen])],
|
|
18720
|
+
[schluessel, gesehen]
|
|
18721
|
+
);
|
|
18722
|
+
}
|
|
17691
18723
|
function useVorschauen(port, mediaRefs) {
|
|
17692
|
-
const [
|
|
17693
|
-
const gehalten = (0,
|
|
18724
|
+
const [stand, setStand] = (0, import_react16.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), gescheitert: /* @__PURE__ */ new Set() }));
|
|
18725
|
+
const gehalten = (0, import_react16.useRef)(/* @__PURE__ */ new Map());
|
|
18726
|
+
const ohneBild = (0, import_react16.useRef)(/* @__PURE__ */ new Set());
|
|
17694
18727
|
const schluessel = mediaRefs.join(" ");
|
|
17695
|
-
(0,
|
|
18728
|
+
(0, import_react16.useEffect)(() => {
|
|
17696
18729
|
const bestand = port.imageLibrary;
|
|
17697
18730
|
if (!bestand?.loadPreview) return void 0;
|
|
17698
18731
|
const refs = schluessel ? schluessel.split(" ") : [];
|
|
@@ -17701,53 +18734,67 @@ function useVorschauen(port, mediaRefs) {
|
|
|
17701
18734
|
bestand,
|
|
17702
18735
|
refs,
|
|
17703
18736
|
(mediaRef, quelle) => {
|
|
17704
|
-
gehalten.current.set(mediaRef, quelle);
|
|
17705
|
-
|
|
18737
|
+
if (quelle) gehalten.current.set(mediaRef, quelle);
|
|
18738
|
+
else ohneBild.current.add(mediaRef);
|
|
18739
|
+
setStand({
|
|
18740
|
+
quellen: new Map(gehalten.current),
|
|
18741
|
+
gescheitert: new Set(ohneBild.current)
|
|
18742
|
+
});
|
|
17706
18743
|
},
|
|
17707
|
-
{
|
|
18744
|
+
{
|
|
18745
|
+
parallel: 4,
|
|
18746
|
+
hat: (ref) => gehalten.current.has(ref) || ohneBild.current.has(ref),
|
|
18747
|
+
lauf,
|
|
18748
|
+
// Ein Fehlschlag ist eine Auskunft, kein Grund weiterzuprobieren:
|
|
18749
|
+
// Die Kachel bekommt einen Platzhalter, das Werk bleibt wählbar.
|
|
18750
|
+
gescheitert: (ref) => {
|
|
18751
|
+
ohneBild.current.add(ref);
|
|
18752
|
+
setStand({
|
|
18753
|
+
quellen: new Map(gehalten.current),
|
|
18754
|
+
gescheitert: new Set(ohneBild.current)
|
|
18755
|
+
});
|
|
18756
|
+
}
|
|
18757
|
+
}
|
|
17708
18758
|
);
|
|
17709
18759
|
return () => {
|
|
17710
18760
|
lauf.abgebrochen = true;
|
|
17711
18761
|
};
|
|
17712
18762
|
}, [port, schluessel]);
|
|
17713
|
-
return
|
|
18763
|
+
return stand;
|
|
17714
18764
|
}
|
|
17715
|
-
var Kachel = ({ quelle, alt }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "szenen-bildkachel", children: quelle ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: quelle, alt, loading: "lazy" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "szenen-bildkachel__leer", "aria-hidden": "true" }) });
|
|
17716
18765
|
var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
17717
|
-
const [suche, setSuche] = (0,
|
|
17718
|
-
const [
|
|
18766
|
+
const [suche, setSuche] = (0, import_react16.useState)("");
|
|
18767
|
+
const [fokus, setFokus] = (0, import_react16.useState)(null);
|
|
18768
|
+
const browser = (0, import_react16.useRef)(null);
|
|
17719
18769
|
const [items] = usePortQuery(
|
|
17720
18770
|
() => port.imageLibrary.listItems({ search: suche.trim() || void 0, limit: 60 }),
|
|
17721
18771
|
[port, suche]
|
|
17722
18772
|
);
|
|
17723
|
-
const
|
|
17724
|
-
const
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
|
|
18773
|
+
const werke = items.status === "ready" ? items.value : [];
|
|
18774
|
+
const werk = werke.find((i) => i.itemRef === fokus) ?? null;
|
|
18775
|
+
const deckbilder = (0, import_react16.useMemo)(
|
|
18776
|
+
() => werke.map((i) => i.images[0]?.mediaRef).filter((r) => Boolean(r)),
|
|
18777
|
+
[werke]
|
|
18778
|
+
);
|
|
18779
|
+
const sichtbareDeckbilder = useSichtbareKacheln(deckbilder, browser);
|
|
18780
|
+
const anzufordern = (0, import_react16.useMemo)(() => [.../* @__PURE__ */ new Set([
|
|
18781
|
+
...sichtbareDeckbilder,
|
|
18782
|
+
...werk ? werk.images.map((b) => b.mediaRef) : [],
|
|
18783
|
+
...gewaehlt.map((b) => b.mediaRef)
|
|
18784
|
+
])], [sichtbareDeckbilder, werk, gewaehlt]);
|
|
18785
|
+
const { quellen, gescheitert } = useVorschauen(port, anzufordern);
|
|
17729
18786
|
const quelleVon = (bild) => bild.thumbUrl || quellen.get(bild.mediaRef) || null;
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
),
|
|
17742
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
17743
|
-
werk.title,
|
|
17744
|
-
" \xB7 ",
|
|
17745
|
-
werk.images.length,
|
|
17746
|
-
" Bilder"
|
|
17747
|
-
] })
|
|
17748
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "szenen-field", children: [
|
|
17749
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Bild aus dem Bestand" }),
|
|
17750
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
18787
|
+
const istGewaehlt = (mediaRef) => gewaehlt.some((b) => b.mediaRef === mediaRef);
|
|
18788
|
+
function werkAntippen(item) {
|
|
18789
|
+
const deckbild = item.images[0];
|
|
18790
|
+
if (!deckbild) return;
|
|
18791
|
+
if (item.images.length === 1) onWaehlen(deckbild);
|
|
18792
|
+
else setFokus(item.itemRef === fokus ? null : item.itemRef);
|
|
18793
|
+
}
|
|
18794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
|
|
18795
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18796
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Bild aus dem Bestand" }),
|
|
18797
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17751
18798
|
"input",
|
|
17752
18799
|
{
|
|
17753
18800
|
type: "search",
|
|
@@ -17761,63 +18808,107 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
17761
18808
|
}
|
|
17762
18809
|
)
|
|
17763
18810
|
] }),
|
|
17764
|
-
items.status === "loading" && /* @__PURE__ */ (0,
|
|
17765
|
-
items.status === "error" && /* @__PURE__ */ (0,
|
|
18811
|
+
items.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Bilder werden geladen \u2026" }),
|
|
18812
|
+
items.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
17766
18813
|
"Der Bildbestand ist nicht lesbar: ",
|
|
17767
18814
|
items.message
|
|
17768
18815
|
] }),
|
|
17769
|
-
items.status === "ready" &&
|
|
17770
|
-
|
|
17771
|
-
"
|
|
18816
|
+
items.status === "ready" && werke.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-empty", "data-testid": "bildwahl-leer", children: "Zu dieser Suche gibt es kein Bild. Ohne Treffer bleibt der Upload." }),
|
|
18817
|
+
werke.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18818
|
+
"div",
|
|
17772
18819
|
{
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17781
|
-
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
|
|
18820
|
+
className: "szenen-bildwahl__browser",
|
|
18821
|
+
ref: browser,
|
|
18822
|
+
"data-testid": "bildwahl-werke",
|
|
18823
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
|
|
18824
|
+
const deckbild = item.images[0];
|
|
18825
|
+
if (!deckbild) return null;
|
|
18826
|
+
const fokussiert = item.itemRef === fokus;
|
|
18827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18828
|
+
"button",
|
|
18829
|
+
{
|
|
18830
|
+
type: "button",
|
|
18831
|
+
className: `szenen-bildwahl__karte${fokussiert ? " is-fokus" : ""}`,
|
|
18832
|
+
onClick: () => werkAntippen(item),
|
|
18833
|
+
"aria-pressed": fokussiert,
|
|
18834
|
+
"data-testid": `item-waehlen-${item.itemRef}`,
|
|
18835
|
+
title: item.title,
|
|
18836
|
+
children: [
|
|
18837
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18838
|
+
Kachel,
|
|
18839
|
+
{
|
|
18840
|
+
quelle: quelleVon(deckbild),
|
|
18841
|
+
alt: item.title,
|
|
18842
|
+
...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
18843
|
+
}
|
|
18844
|
+
),
|
|
18845
|
+
item.images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18846
|
+
"span",
|
|
18847
|
+
{
|
|
18848
|
+
className: "szenen-bildwahl__anzahl",
|
|
18849
|
+
"data-testid": `item-anzahl-${item.itemRef}`,
|
|
18850
|
+
children: [
|
|
18851
|
+
item.images.length,
|
|
18852
|
+
"x"
|
|
18853
|
+
]
|
|
18854
|
+
}
|
|
18855
|
+
),
|
|
18856
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
|
|
18857
|
+
]
|
|
18858
|
+
}
|
|
18859
|
+
) }, item.itemRef);
|
|
18860
|
+
}) })
|
|
17787
18861
|
}
|
|
17788
|
-
)
|
|
17789
|
-
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
|
|
18862
|
+
),
|
|
18863
|
+
werk && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
|
|
18864
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("header", { className: "szenen-bildwahl__inspektorkopf", children: [
|
|
18865
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
18866
|
+
werk.title,
|
|
18867
|
+
" \xB7 ",
|
|
18868
|
+
werk.images.length,
|
|
18869
|
+
" Bilder"
|
|
18870
|
+
] }),
|
|
18871
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18872
|
+
"button",
|
|
18873
|
+
{
|
|
18874
|
+
type: "button",
|
|
18875
|
+
className: "szenen-bildwahl__zurueck",
|
|
18876
|
+
onClick: () => setFokus(null),
|
|
18877
|
+
"data-testid": "bildwahl-zurueck",
|
|
18878
|
+
children: "Schliessen"
|
|
18879
|
+
}
|
|
18880
|
+
)
|
|
18881
|
+
] }),
|
|
18882
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__streifen", children: werk.images.map((bild, position) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
17793
18883
|
"button",
|
|
17794
18884
|
{
|
|
17795
18885
|
type: "button",
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
18886
|
+
className: `szenen-bildwahl__variante${istGewaehlt(bild.mediaRef) ? " is-gewaehlt" : ""}`,
|
|
18887
|
+
onClick: () => onWaehlen(bild),
|
|
18888
|
+
"aria-pressed": istGewaehlt(bild.mediaRef),
|
|
18889
|
+
"data-testid": `bild-waehlen-${bild.mediaRef}`,
|
|
18890
|
+
title: bild.title,
|
|
17799
18891
|
children: [
|
|
17800
|
-
/* @__PURE__ */ (0,
|
|
17801
|
-
|
|
17802
|
-
"span",
|
|
18892
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18893
|
+
Kachel,
|
|
17803
18894
|
{
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
item.images.length,
|
|
17808
|
-
"x"
|
|
17809
|
-
]
|
|
18895
|
+
quelle: quelleVon(bild),
|
|
18896
|
+
alt: bild.title,
|
|
18897
|
+
...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
17810
18898
|
}
|
|
17811
18899
|
),
|
|
17812
|
-
/* @__PURE__ */ (0,
|
|
18900
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "szenen-bildwahl__nummer", children: [
|
|
18901
|
+
"#",
|
|
18902
|
+
position + 1
|
|
18903
|
+
] })
|
|
17813
18904
|
]
|
|
17814
18905
|
}
|
|
17815
|
-
) },
|
|
17816
|
-
|
|
17817
|
-
gewaehlt.length > 0 && /* @__PURE__ */ (0,
|
|
17818
|
-
/* @__PURE__ */ (0,
|
|
17819
|
-
/* @__PURE__ */ (0,
|
|
17820
|
-
/* @__PURE__ */ (0,
|
|
18906
|
+
) }, bild.mediaRef)) })
|
|
18907
|
+
] }),
|
|
18908
|
+
gewaehlt.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__gewaehlt", "data-testid": "bilder-gewaehlt", children: gewaehlt.map((bild) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
18909
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
|
|
18910
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
|
|
18911
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17821
18912
|
"button",
|
|
17822
18913
|
{
|
|
17823
18914
|
type: "button",
|
|
@@ -17836,19 +18927,19 @@ async function digestOf(datei) {
|
|
|
17836
18927
|
return [...new Uint8Array(hash)].map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
17837
18928
|
}
|
|
17838
18929
|
var DeriveArea = ({ port, contextId }) => {
|
|
17839
|
-
const [policyVersionId, setPolicyVersionId] = (0,
|
|
17840
|
-
const [modus, setModus] = (0,
|
|
17841
|
-
const [promptText, setPromptText] = (0,
|
|
17842
|
-
const [dateien, setDateien] = (0,
|
|
17843
|
-
const [bestandsbilder, setBestandsbilder] = (0,
|
|
17844
|
-
const [laeuft, setLaeuft] = (0,
|
|
17845
|
-
const [lauf, setLauf] = (0,
|
|
17846
|
-
const [meldung, setMeldung] = (0,
|
|
17847
|
-
const [uebernommen, setUebernommen] = (0,
|
|
17848
|
-
const [titel, setTitel] = (0,
|
|
17849
|
-
const [referenzen, setReferenzen] = (0,
|
|
17850
|
-
const [beanstandung, setBeanstandung] = (0,
|
|
17851
|
-
const [zusatz, setZusatz] = (0,
|
|
18930
|
+
const [policyVersionId, setPolicyVersionId] = (0, import_react16.useState)("");
|
|
18931
|
+
const [modus, setModus] = (0, import_react16.useState)("prompt");
|
|
18932
|
+
const [promptText, setPromptText] = (0, import_react16.useState)("");
|
|
18933
|
+
const [dateien, setDateien] = (0, import_react16.useState)([]);
|
|
18934
|
+
const [bestandsbilder, setBestandsbilder] = (0, import_react16.useState)([]);
|
|
18935
|
+
const [laeuft, setLaeuft] = (0, import_react16.useState)(false);
|
|
18936
|
+
const [lauf, setLauf] = (0, import_react16.useState)(null);
|
|
18937
|
+
const [meldung, setMeldung] = (0, import_react16.useState)(null);
|
|
18938
|
+
const [uebernommen, setUebernommen] = (0, import_react16.useState)({});
|
|
18939
|
+
const [titel, setTitel] = (0, import_react16.useState)({});
|
|
18940
|
+
const [referenzen, setReferenzen] = (0, import_react16.useState)({});
|
|
18941
|
+
const [beanstandung, setBeanstandung] = (0, import_react16.useState)(null);
|
|
18942
|
+
const [zusatz, setZusatz] = (0, import_react16.useState)("");
|
|
17852
18943
|
const [regeln] = usePortQuery(
|
|
17853
18944
|
() => port.derivation.listPolicies(contextId),
|
|
17854
18945
|
[port, contextId]
|
|
@@ -17901,8 +18992,6 @@ var DeriveArea = ({ port, contextId }) => {
|
|
|
17901
18992
|
if (ergebnis.kind === "ok") setLauf(ergebnis.value);
|
|
17902
18993
|
else if (ergebnis.kind === "unsupported") {
|
|
17903
18994
|
setMeldung(`Dieser Host bietet \u201E${ergebnis.capability}" nicht an.`);
|
|
17904
|
-
} else if (ergebnis.kind === "rejected") {
|
|
17905
|
-
setMeldung(ergebnis.errors.map((e) => e.message).join("; "));
|
|
17906
18995
|
} else {
|
|
17907
18996
|
setMeldung(ergebnis.message);
|
|
17908
18997
|
}
|
|
@@ -17929,12 +19018,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17929
19018
|
const text = beanstandung ?? vorgabeBeanstandung(satz);
|
|
17930
19019
|
const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
|
|
17931
19020
|
const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
|
|
17932
|
-
return /* @__PURE__ */ (0,
|
|
17933
|
-
/* @__PURE__ */ (0,
|
|
17934
|
-
/* @__PURE__ */ (0,
|
|
17935
|
-
/* @__PURE__ */ (0,
|
|
17936
|
-
/* @__PURE__ */ (0,
|
|
17937
|
-
/* @__PURE__ */ (0,
|
|
19021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
|
|
19022
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
|
|
19023
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-area__lead", children: satz.status === "failed" ? "Das Modell bekommt seine Antwort und die Beanstandung noch einmal vorgelegt." : "Das Ergebnis steht. Wenn etwas offen blieb, kann das Modell nachbessern." }),
|
|
19024
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19025
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Beanstandung" }),
|
|
19026
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17938
19027
|
"textarea",
|
|
17939
19028
|
{
|
|
17940
19029
|
rows: 4,
|
|
@@ -17944,9 +19033,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17944
19033
|
}
|
|
17945
19034
|
)
|
|
17946
19035
|
] }),
|
|
17947
|
-
/* @__PURE__ */ (0,
|
|
17948
|
-
/* @__PURE__ */ (0,
|
|
17949
|
-
/* @__PURE__ */ (0,
|
|
19036
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19037
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
|
|
19038
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17950
19039
|
"textarea",
|
|
17951
19040
|
{
|
|
17952
19041
|
rows: 2,
|
|
@@ -17957,8 +19046,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17957
19046
|
}
|
|
17958
19047
|
)
|
|
17959
19048
|
] }),
|
|
17960
|
-
bilderFehlen && /* @__PURE__ */ (0,
|
|
17961
|
-
/* @__PURE__ */ (0,
|
|
19049
|
+
bilderFehlen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-error", "data-testid": "folgelauf-ohne-bild", children: "Die Bilder dieses Laufs wurden nicht im Bestand abgelegt \u2014 er ist \xE4lter als diese M\xF6glichkeit. Ein Folgelauf ohne sie k\xF6nnte ein fehlendes Pflichtfeld nur erfinden. Starten Sie einen neuen Lauf mit dem Referenzbild; dessen Bilder bleiben dann erhalten." }),
|
|
19050
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17962
19051
|
"button",
|
|
17963
19052
|
{
|
|
17964
19053
|
type: "button",
|
|
@@ -17992,27 +19081,25 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17992
19081
|
});
|
|
17993
19082
|
if (ergebnis.kind === "ok") {
|
|
17994
19083
|
setUebernommen((v) => ({ ...v, [type]: ergebnis.value.elementId }));
|
|
17995
|
-
} else if (ergebnis.kind === "rejected") {
|
|
17996
|
-
setMeldung(ergebnis.errors.map((e) => e.message).join("; "));
|
|
17997
19084
|
} else if (ergebnis.kind === "unsupported") {
|
|
17998
19085
|
setMeldung(`Dieser Host bietet \u201E${ergebnis.capability}" nicht an.`);
|
|
17999
19086
|
} else {
|
|
18000
19087
|
setMeldung(ergebnis.message);
|
|
18001
19088
|
}
|
|
18002
19089
|
}
|
|
18003
|
-
return /* @__PURE__ */ (0,
|
|
18004
|
-
/* @__PURE__ */ (0,
|
|
18005
|
-
regeln.status === "loading" && /* @__PURE__ */ (0,
|
|
18006
|
-
regeln.status === "error" && /* @__PURE__ */ (0,
|
|
19090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
|
|
19091
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-area__lead", children: "Aus einem Referenzbild, einem Prompt oder beidem einen Szenenentwurf vorschlagen lassen. Der Vorschlag wird nie ver\xF6ffentlicht \u2014 er wird ein Entwurf, den Sie pr\xFCfen und \xE4ndern." }),
|
|
19092
|
+
regeln.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Regeln werden geladen \u2026" }),
|
|
19093
|
+
regeln.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
18007
19094
|
"Die Regeln konnten nicht gelesen werden: ",
|
|
18008
19095
|
regeln.message
|
|
18009
19096
|
] }),
|
|
18010
|
-
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0,
|
|
19097
|
+
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-empty", children: [
|
|
18011
19098
|
"In diesem Kontext ist keine Rekonstruktionsregel (",
|
|
18012
|
-
/* @__PURE__ */ (0,
|
|
19099
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: "scene_derivation_policy" }),
|
|
18013
19100
|
') ver\xF6ffentlicht. Ohne sie ist kein Lauf reproduzierbar \u2014 legen Sie hier eine unter \u201E1 \xB7 Bausteine" an, oder wechseln Sie in den Kontext, in dem Ihre Regel liegt. Regeln aus anderen Kontexten stehen hier bewusst nicht zur Auswahl.'
|
|
18014
19101
|
] }),
|
|
18015
|
-
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0,
|
|
19102
|
+
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18016
19103
|
"form",
|
|
18017
19104
|
{
|
|
18018
19105
|
className: "szenen-form",
|
|
@@ -18021,17 +19108,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18021
19108
|
void starten();
|
|
18022
19109
|
},
|
|
18023
19110
|
children: [
|
|
18024
|
-
/* @__PURE__ */ (0,
|
|
18025
|
-
/* @__PURE__ */ (0,
|
|
18026
|
-
/* @__PURE__ */ (0,
|
|
19111
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19112
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Regel" }),
|
|
19113
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18027
19114
|
"select",
|
|
18028
19115
|
{
|
|
18029
19116
|
value: policyVersionId,
|
|
18030
19117
|
onChange: (e) => setPolicyVersionId(e.target.value),
|
|
18031
19118
|
"data-testid": "regel-auswahl",
|
|
18032
19119
|
children: [
|
|
18033
|
-
/* @__PURE__ */ (0,
|
|
18034
|
-
regeln.value.map((regel) => /* @__PURE__ */ (0,
|
|
19120
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
|
|
19121
|
+
regeln.value.map((regel) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("option", { value: regel.versionId, children: [
|
|
18035
19122
|
regel.title,
|
|
18036
19123
|
" (",
|
|
18037
19124
|
regel.produces.join(", "),
|
|
@@ -18041,21 +19128,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18041
19128
|
}
|
|
18042
19129
|
)
|
|
18043
19130
|
] }),
|
|
18044
|
-
/* @__PURE__ */ (0,
|
|
18045
|
-
/* @__PURE__ */ (0,
|
|
18046
|
-
/* @__PURE__ */ (0,
|
|
19131
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19132
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Eingang" }),
|
|
19133
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18047
19134
|
"select",
|
|
18048
19135
|
{
|
|
18049
19136
|
value: modus,
|
|
18050
19137
|
onChange: (e) => setModus(e.target.value),
|
|
18051
19138
|
"data-testid": "modus-auswahl",
|
|
18052
|
-
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0,
|
|
19139
|
+
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: m, children: MODUS_TEXT[m] }, m))
|
|
18053
19140
|
}
|
|
18054
19141
|
)
|
|
18055
19142
|
] }),
|
|
18056
|
-
modus !== "image" && /* @__PURE__ */ (0,
|
|
18057
|
-
/* @__PURE__ */ (0,
|
|
18058
|
-
/* @__PURE__ */ (0,
|
|
19143
|
+
modus !== "image" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19144
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Referenzprompt" }),
|
|
19145
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18059
19146
|
"textarea",
|
|
18060
19147
|
{
|
|
18061
19148
|
value: promptText,
|
|
@@ -18065,8 +19152,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18065
19152
|
}
|
|
18066
19153
|
)
|
|
18067
19154
|
] }),
|
|
18068
|
-
modus !== "prompt" && /* @__PURE__ */ (0,
|
|
18069
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
19155
|
+
modus !== "prompt" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
19156
|
+
port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18070
19157
|
BildWaehler,
|
|
18071
19158
|
{
|
|
18072
19159
|
port,
|
|
@@ -18075,9 +19162,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18075
19162
|
onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
|
|
18076
19163
|
}
|
|
18077
19164
|
),
|
|
18078
|
-
/* @__PURE__ */ (0,
|
|
18079
|
-
/* @__PURE__ */ (0,
|
|
18080
|
-
/* @__PURE__ */ (0,
|
|
19165
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19166
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
|
|
19167
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18081
19168
|
"input",
|
|
18082
19169
|
{
|
|
18083
19170
|
type: "file",
|
|
@@ -18087,40 +19174,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18087
19174
|
"data-testid": "bild-eingabe"
|
|
18088
19175
|
}
|
|
18089
19176
|
),
|
|
18090
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
19177
|
+
port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { "data-testid": "upload-hinweis", children: "Hochgeladene Bilder werden im Bestand abgelegt \u2014 nur so ist sp\xE4ter ein Folgelauf damit m\xF6glich." })
|
|
18091
19178
|
] })
|
|
18092
19179
|
] }),
|
|
18093
|
-
/* @__PURE__ */ (0,
|
|
19180
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
|
|
18094
19181
|
]
|
|
18095
19182
|
}
|
|
18096
19183
|
),
|
|
18097
|
-
meldung && /* @__PURE__ */ (0,
|
|
18098
|
-
lauf && lauf.status === "failed" && /* @__PURE__ */ (0,
|
|
18099
|
-
/* @__PURE__ */ (0,
|
|
18100
|
-
/* @__PURE__ */ (0,
|
|
18101
|
-
/* @__PURE__ */ (0,
|
|
19184
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
|
|
19185
|
+
lauf && lauf.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
|
|
19186
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Der Lauf ist gescheitert" }),
|
|
19187
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
|
|
19188
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: lauf.failure?.class }),
|
|
18102
19189
|
" \u2014 ",
|
|
18103
19190
|
lauf.failure?.message
|
|
18104
19191
|
] }),
|
|
18105
|
-
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
18106
|
-
/* @__PURE__ */ (0,
|
|
18107
|
-
/* @__PURE__ */ (0,
|
|
19192
|
+
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
|
|
19193
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Befunde" }),
|
|
19194
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
|
|
18108
19195
|
] }),
|
|
18109
|
-
/* @__PURE__ */ (0,
|
|
18110
|
-
/* @__PURE__ */ (0,
|
|
18111
|
-
/* @__PURE__ */ (0,
|
|
18112
|
-
/* @__PURE__ */ (0,
|
|
19196
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Herkunft, { lauf }),
|
|
19197
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Widerspruch, { lauf }),
|
|
19198
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Belege, { lauf }),
|
|
19199
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RecoveryPanel, { port, lauf }),
|
|
18113
19200
|
folgeblock(lauf)
|
|
18114
19201
|
] }),
|
|
18115
|
-
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0,
|
|
18116
|
-
/* @__PURE__ */ (0,
|
|
18117
|
-
/* @__PURE__ */ (0,
|
|
18118
|
-
/* @__PURE__ */ (0,
|
|
18119
|
-
/* @__PURE__ */ (0,
|
|
18120
|
-
lauf.conflicts.length > 0 && /* @__PURE__ */ (0,
|
|
18121
|
-
/* @__PURE__ */ (0,
|
|
18122
|
-
/* @__PURE__ */ (0,
|
|
18123
|
-
/* @__PURE__ */ (0,
|
|
19202
|
+
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
|
|
19203
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Vorschlag" }),
|
|
19204
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Herkunft, { lauf }),
|
|
19205
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Widerspruch, { lauf }),
|
|
19206
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-run__feedback", children: lauf.feedback }),
|
|
19207
|
+
lauf.conflicts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
|
|
19208
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
|
|
19209
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
19210
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: k.field }),
|
|
18124
19211
|
": Bild sagt \u201E",
|
|
18125
19212
|
k.from_image,
|
|
18126
19213
|
'", Prompt sagt \u201E',
|
|
@@ -18128,31 +19215,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18128
19215
|
'". Nichts davon wurde \xFCbernommen.'
|
|
18129
19216
|
] }, i)) })
|
|
18130
19217
|
] }),
|
|
18131
|
-
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0,
|
|
18132
|
-
/* @__PURE__ */ (0,
|
|
18133
|
-
/* @__PURE__ */ (0,
|
|
18134
|
-
/* @__PURE__ */ (0,
|
|
19218
|
+
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
|
|
19219
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Nicht ableitbar" }),
|
|
19220
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
19221
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: n.field }),
|
|
18135
19222
|
": ",
|
|
18136
19223
|
n.reason
|
|
18137
19224
|
] }, i)) })
|
|
18138
19225
|
] }),
|
|
18139
|
-
lauf.assumptions.length > 0 && /* @__PURE__ */ (0,
|
|
18140
|
-
/* @__PURE__ */ (0,
|
|
18141
|
-
/* @__PURE__ */ (0,
|
|
19226
|
+
lauf.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
|
|
19227
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Erschlossen, nicht belegt" }),
|
|
19228
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: a }, i)) })
|
|
18142
19229
|
] }),
|
|
18143
19230
|
lauf.proposals.map((vorschlag) => {
|
|
18144
19231
|
const bezug = REFERENCE_FIELD[vorschlag.type];
|
|
18145
19232
|
const fertig = uebernommen[vorschlag.type];
|
|
18146
|
-
return /* @__PURE__ */ (0,
|
|
19233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18147
19234
|
"article",
|
|
18148
19235
|
{
|
|
18149
19236
|
className: "szenen-proposal",
|
|
18150
19237
|
"data-testid": `vorschlag-${vorschlag.type}`,
|
|
18151
19238
|
children: [
|
|
18152
|
-
/* @__PURE__ */ (0,
|
|
18153
|
-
!fertig && /* @__PURE__ */ (0,
|
|
18154
|
-
/* @__PURE__ */ (0,
|
|
18155
|
-
/* @__PURE__ */ (0,
|
|
19239
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: vorschlag.type }),
|
|
19240
|
+
!fertig && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
19241
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Titel" }),
|
|
19242
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18156
19243
|
"input",
|
|
18157
19244
|
{
|
|
18158
19245
|
type: "text",
|
|
@@ -18166,9 +19253,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18166
19253
|
}
|
|
18167
19254
|
)
|
|
18168
19255
|
] }),
|
|
18169
|
-
/* @__PURE__ */ (0,
|
|
18170
|
-
bezug && !fertig && /* @__PURE__ */ (0,
|
|
18171
|
-
/* @__PURE__ */ (0,
|
|
19256
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
|
|
19257
|
+
bezug && !fertig && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
19258
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18172
19259
|
ReferencePicker,
|
|
18173
19260
|
{
|
|
18174
19261
|
port,
|
|
@@ -18182,30 +19269,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18182
19269
|
}))
|
|
18183
19270
|
}
|
|
18184
19271
|
),
|
|
18185
|
-
referenzen[vorschlag.type] ? /* @__PURE__ */ (0,
|
|
19272
|
+
referenzen[vorschlag.type] ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
|
|
18186
19273
|
"Zeigt auf Version ",
|
|
18187
|
-
/* @__PURE__ */ (0,
|
|
19274
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: referenzen[vorschlag.type] }),
|
|
18188
19275
|
"."
|
|
18189
19276
|
] }) : (
|
|
18190
19277
|
/* Der Grund steht **vor** der Handlung. Den Nutzer erst
|
|
18191
19278
|
auf einen Knopf drücken zu lassen, um ihm dann eine
|
|
18192
19279
|
Ablehnung zu zeigen, ist keine Auskunft. */
|
|
18193
|
-
/* @__PURE__ */ (0,
|
|
19280
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
|
|
18194
19281
|
"Diese ",
|
|
18195
|
-
/* @__PURE__ */ (0,
|
|
19282
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Einzel\xFCbernahme" }),
|
|
18196
19283
|
" braucht eine ver\xF6ffentlichte ",
|
|
18197
19284
|
bezug.refersTo,
|
|
18198
19285
|
"-Version, auf die der Entwurf zeigt (D-03) \u2014 sie ist der Weg in einen bestehenden, l\xE4ngst ver\xF6ffentlichten Zusammenhang. Wollen Sie aus diesem Lauf erst einmal einen Prompt ausprobieren, nehmen Sie unten die ",
|
|
18199
|
-
/* @__PURE__ */ (0,
|
|
19286
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Draft-Kette" }),
|
|
18200
19287
|
": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
|
|
18201
19288
|
] })
|
|
18202
19289
|
)
|
|
18203
19290
|
] }),
|
|
18204
|
-
fertig ? /* @__PURE__ */ (0,
|
|
19291
|
+
fertig ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-proposal__done", children: [
|
|
18205
19292
|
"Als Entwurf \xFCbernommen: ",
|
|
18206
|
-
/* @__PURE__ */ (0,
|
|
19293
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: fertig }),
|
|
18207
19294
|
". Er ist noch nicht ver\xF6ffentlicht."
|
|
18208
|
-
] }) : /* @__PURE__ */ (0,
|
|
19295
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18209
19296
|
"button",
|
|
18210
19297
|
{
|
|
18211
19298
|
type: "button",
|
|
@@ -18220,39 +19307,39 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
18220
19307
|
vorschlag.type
|
|
18221
19308
|
);
|
|
18222
19309
|
}),
|
|
18223
|
-
/* @__PURE__ */ (0,
|
|
18224
|
-
/* @__PURE__ */ (0,
|
|
19310
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChainActions, { port, runId: lauf.run_id }),
|
|
19311
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Belege, { lauf }),
|
|
18225
19312
|
folgeblock(lauf)
|
|
18226
19313
|
] })
|
|
18227
19314
|
] });
|
|
18228
19315
|
};
|
|
18229
19316
|
|
|
18230
19317
|
// src/features/szenen/SzenenView.tsx
|
|
18231
|
-
var
|
|
19318
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
18232
19319
|
var SzenenView = ({
|
|
18233
19320
|
port,
|
|
18234
19321
|
contextId = null,
|
|
18235
19322
|
initialArea,
|
|
18236
19323
|
onAreaChange
|
|
18237
19324
|
}) => {
|
|
18238
|
-
const bereiche = (0,
|
|
18239
|
-
const faehig = (0,
|
|
18240
|
-
const [aktiv, setAktiv] = (0,
|
|
19325
|
+
const bereiche = (0, import_react17.useMemo)(() => areasFor(port), [port]);
|
|
19326
|
+
const faehig = (0, import_react17.useMemo)(() => capabilitiesOf(port), [port]);
|
|
19327
|
+
const [aktiv, setAktiv] = (0, import_react17.useState)(() => resolveArea(port, initialArea));
|
|
18241
19328
|
const wechsle = (id) => {
|
|
18242
19329
|
setAktiv(id);
|
|
18243
19330
|
onAreaChange?.(id);
|
|
18244
19331
|
};
|
|
18245
19332
|
const aktuellerBereich = bereiche.find((b) => b.id === aktiv) ?? bereiche[0];
|
|
18246
|
-
return /* @__PURE__ */ (0,
|
|
18247
|
-
/* @__PURE__ */ (0,
|
|
18248
|
-
/* @__PURE__ */ (0,
|
|
18249
|
-
/* @__PURE__ */ (0,
|
|
18250
|
-
/* @__PURE__ */ (0,
|
|
18251
|
-
/* @__PURE__ */ (0,
|
|
19333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "szenen-view", "data-testid": "szenen-view", children: [
|
|
19334
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "szenen-view__intro", children: [
|
|
19335
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
19336
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
|
|
19337
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: "Bildprompt aus einer Szene" }),
|
|
19338
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "Bausteine w\xE4hlen, Szene und Bildaufbau festlegen und daraus einen wiederholbaren Prompt erzeugen." })
|
|
18252
19339
|
] }),
|
|
18253
|
-
/* @__PURE__ */ (0,
|
|
19340
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "szenen-view__step", children: aktuellerBereich.title })
|
|
18254
19341
|
] }),
|
|
18255
|
-
/* @__PURE__ */ (0,
|
|
19342
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { className: "szenen-view__nav", "aria-label": "Szenen-Bereiche", children: bereiche.map((bereich) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18256
19343
|
"button",
|
|
18257
19344
|
{
|
|
18258
19345
|
type: "button",
|
|
@@ -18266,9 +19353,9 @@ var SzenenView = ({
|
|
|
18266
19353
|
},
|
|
18267
19354
|
bereich.id
|
|
18268
19355
|
)) }),
|
|
18269
|
-
/* @__PURE__ */ (0,
|
|
18270
|
-
aktiv === "derive" && port.derivation && /* @__PURE__ */ (0,
|
|
18271
|
-
aktiv === "elements" && /* @__PURE__ */ (0,
|
|
19356
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
|
|
19357
|
+
aktiv === "derive" && port.derivation && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DeriveArea, { port, contextId }),
|
|
19358
|
+
aktiv === "elements" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18272
19359
|
ElementsArea,
|
|
18273
19360
|
{
|
|
18274
19361
|
port,
|
|
@@ -18278,15 +19365,15 @@ var SzenenView = ({
|
|
|
18278
19365
|
listTitle: "Bausteine"
|
|
18279
19366
|
}
|
|
18280
19367
|
),
|
|
18281
|
-
aktiv === "scene" && /* @__PURE__ */ (0,
|
|
18282
|
-
aktiv === "setup" && /* @__PURE__ */ (0,
|
|
18283
|
-
aktiv === "shot" && /* @__PURE__ */ (0,
|
|
18284
|
-
aktiv === "media" && port.media && /* @__PURE__ */ (0,
|
|
19368
|
+
aktiv === "scene" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SceneArea, { port, contextId }),
|
|
19369
|
+
aktiv === "setup" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SetupArea, { port, contextId }),
|
|
19370
|
+
aktiv === "shot" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShotArea, { port, contextId }),
|
|
19371
|
+
aktiv === "media" && port.media && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MediaArea, { port, contextId })
|
|
18285
19372
|
] }),
|
|
18286
|
-
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0,
|
|
18287
|
-
/* @__PURE__ */ (0,
|
|
18288
|
-
!faehig.saveRunAsItem && /* @__PURE__ */ (0,
|
|
18289
|
-
!faehig.media && /* @__PURE__ */ (0,
|
|
19373
|
+
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "szenen-view__host-notes", children: [
|
|
19374
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("summary", { children: "Funktionen dieses Hosts" }),
|
|
19375
|
+
!faehig.saveRunAsItem && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-kein-item", children: "Runden k\xF6nnen hier nicht als Library-Item gespeichert werden." }),
|
|
19376
|
+
!faehig.media && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-keine-medien", children: "Referenzmedien werden in diesem Host nicht verwaltet." })
|
|
18290
19377
|
] })
|
|
18291
19378
|
] });
|
|
18292
19379
|
};
|
|
@@ -18298,6 +19385,7 @@ var SzenenView = ({
|
|
|
18298
19385
|
CHAIN_LINK_FIELDS,
|
|
18299
19386
|
CapabilityAnchorError,
|
|
18300
19387
|
ContractViolation,
|
|
19388
|
+
DEFAULT_SEED_VORLAGE,
|
|
18301
19389
|
DERIVABLE_TYPES,
|
|
18302
19390
|
ELEMENT_VERSION_SCHEMA_FILE,
|
|
18303
19391
|
FLOW_EXECUTION_PATH,
|
|
@@ -18317,6 +19405,7 @@ var SzenenView = ({
|
|
|
18317
19405
|
SZENEN_SCHEMAS,
|
|
18318
19406
|
SzenenView,
|
|
18319
19407
|
UNCHECKED_PUBLISH_RULES,
|
|
19408
|
+
UPLOAD_MAX_BYTES,
|
|
18320
19409
|
UnsupportedSchemaError,
|
|
18321
19410
|
VersionDagError,
|
|
18322
19411
|
areasFor,
|
|
@@ -18405,8 +19494,10 @@ var SzenenView = ({
|
|
|
18405
19494
|
findSceneDerivationRecovery,
|
|
18406
19495
|
firstError,
|
|
18407
19496
|
formatSchemaErrors,
|
|
19497
|
+
formatSeedListe,
|
|
18408
19498
|
freezeDraftChain,
|
|
18409
19499
|
freezeSceneWorkingState,
|
|
19500
|
+
gesamtHerkunft,
|
|
18410
19501
|
getSzenenSchemas,
|
|
18411
19502
|
gruppiereZuItems,
|
|
18412
19503
|
hasPlacementCapability,
|
|
@@ -18414,16 +19505,21 @@ var SzenenView = ({
|
|
|
18414
19505
|
isOk,
|
|
18415
19506
|
isProjectionCurrent,
|
|
18416
19507
|
isSzenenItemId,
|
|
19508
|
+
istZipDatei,
|
|
18417
19509
|
itemIdForRun,
|
|
18418
19510
|
ladeVorschauen,
|
|
19511
|
+
leseBilderAusZip,
|
|
18419
19512
|
linkFor,
|
|
18420
19513
|
locatorTeile,
|
|
18421
19514
|
logRevisionOf,
|
|
18422
19515
|
mergeSzenenBatchOrigin,
|
|
19516
|
+
mitDefaultVorlage,
|
|
18423
19517
|
noticeFor,
|
|
18424
19518
|
ordersForPromptRun,
|
|
19519
|
+
ordneSeedsZu,
|
|
18425
19520
|
parseDerivationResponse,
|
|
18426
19521
|
parseRunResponse,
|
|
19522
|
+
parseSeedListe,
|
|
18427
19523
|
preferredHeadRevisionOf,
|
|
18428
19524
|
preferredVersionId,
|
|
18429
19525
|
promptDiagnosticsOf,
|
|
@@ -18447,6 +19543,7 @@ var SzenenView = ({
|
|
|
18447
19543
|
runStoreDifferential,
|
|
18448
19544
|
sceneOnlyCapabilities,
|
|
18449
19545
|
scopeOfPath,
|
|
19546
|
+
seedFehlerText,
|
|
18450
19547
|
selectableTargetModels,
|
|
18451
19548
|
showChain,
|
|
18452
19549
|
simulatedAnswerFor,
|