@rslsp1/fa-app-tools 4.0.0 → 5.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-566GHYAT.mjs → chunk-3MUI4ZV7.mjs} +1484 -744
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1893 -1159
- package/dist/index.mjs +9 -8
- package/dist/szenen.d.mts +155 -7
- package/dist/szenen.d.ts +155 -7
- package/dist/szenen.js +1510 -758
- package/dist/szenen.mjs +32 -5
- package/package.json +1 -1
package/dist/szenen.js
CHANGED
|
@@ -146,13 +146,16 @@ __export(szenen_exports, {
|
|
|
146
146
|
freezeDraftChain: () => freezeDraftChain,
|
|
147
147
|
freezeSceneWorkingState: () => freezeSceneWorkingState,
|
|
148
148
|
getSzenenSchemas: () => getSzenenSchemas,
|
|
149
|
+
gruppiereZuItems: () => gruppiereZuItems,
|
|
149
150
|
hasPlacementCapability: () => hasPlacementCapability,
|
|
150
151
|
isKnownElementType: () => isKnownElementType,
|
|
151
152
|
isOk: () => isOk,
|
|
152
153
|
isProjectionCurrent: () => isProjectionCurrent,
|
|
153
154
|
isSzenenItemId: () => isSzenenItemId,
|
|
154
155
|
itemIdForRun: () => itemIdForRun,
|
|
156
|
+
ladeVorschauen: () => ladeVorschauen,
|
|
155
157
|
linkFor: () => linkFor,
|
|
158
|
+
locatorTeile: () => locatorTeile,
|
|
156
159
|
logRevisionOf: () => logRevisionOf,
|
|
157
160
|
mergeSzenenBatchOrigin: () => mergeSzenenBatchOrigin,
|
|
158
161
|
noticeFor: () => noticeFor,
|
|
@@ -307,15 +310,15 @@ function resolveRef(ref, baseId, schemas) {
|
|
|
307
310
|
const target = hash === -1 ? ref : ref.slice(0, hash);
|
|
308
311
|
const pointer = hash === -1 ? "" : ref.slice(hash + 1);
|
|
309
312
|
const documentId = target === "" ? baseId : new URL(target, baseId).href;
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
313
|
+
const document2 = schemas.byId.get(documentId);
|
|
314
|
+
if (!document2) {
|
|
312
315
|
throw new UnsupportedSchemaError(`Referenz "${ref}" zeigt auf unbekanntes Schema ${documentId}.`);
|
|
313
316
|
}
|
|
314
|
-
if (pointer === "" || pointer === "/") return { schema:
|
|
317
|
+
if (pointer === "" || pointer === "/") return { schema: document2, baseId: documentId };
|
|
315
318
|
if (!pointer.startsWith("/")) {
|
|
316
319
|
throw new UnsupportedSchemaError(`Referenz "${ref}": nur JSON-Pointer werden aufgeloest.`);
|
|
317
320
|
}
|
|
318
|
-
let node =
|
|
321
|
+
let node = document2;
|
|
319
322
|
for (const rawSegment of pointer.slice(1).split("/")) {
|
|
320
323
|
const segment = unescapePointer(rawSegment);
|
|
321
324
|
if (!isObject(node) || !(segment in node)) {
|
|
@@ -10200,6 +10203,7 @@ function createHfImageStore(options) {
|
|
|
10200
10203
|
const basisMs = options.leseBasisMs ?? 400;
|
|
10201
10204
|
const schlafen2 = options.schlafen ?? warten;
|
|
10202
10205
|
const abgelegt = /* @__PURE__ */ new Map();
|
|
10206
|
+
const vorschauen = /* @__PURE__ */ new Map();
|
|
10203
10207
|
const bekanntePfade = /* @__PURE__ */ new Set();
|
|
10204
10208
|
let gefalteterBestand = null;
|
|
10205
10209
|
let laufenderAbgleich = null;
|
|
@@ -10223,7 +10227,7 @@ function createHfImageStore(options) {
|
|
|
10223
10227
|
}
|
|
10224
10228
|
return laufenderAbgleich;
|
|
10225
10229
|
}
|
|
10226
|
-
|
|
10230
|
+
const speicher = {
|
|
10227
10231
|
bestand: bestandAbgleichen,
|
|
10228
10232
|
async putWithId(id, base64, mimeType, titel) {
|
|
10229
10233
|
const echterTyp = typAusBytes(base64, mimeType);
|
|
@@ -10242,6 +10246,38 @@ function createHfImageStore(options) {
|
|
|
10242
10246
|
}, []);
|
|
10243
10247
|
abgelegt.set(id, { data: base64, mimeType: echterTyp });
|
|
10244
10248
|
},
|
|
10249
|
+
async preview(id) {
|
|
10250
|
+
const bekannt = vorschauen.get(id);
|
|
10251
|
+
if (bekannt) return bekannt;
|
|
10252
|
+
const eben = abgelegt.get(id);
|
|
10253
|
+
if (eben) {
|
|
10254
|
+
const quelle2 = `data:${eben.mimeType};base64,${eben.data}`;
|
|
10255
|
+
vorschauen.set(id, quelle2);
|
|
10256
|
+
return quelle2;
|
|
10257
|
+
}
|
|
10258
|
+
const zustand = await bestandAbgleichen();
|
|
10259
|
+
const eintrag = zustand.metadata.find((e) => e.id === id);
|
|
10260
|
+
if (eintrag?.hasThumb && eintrag.filename) {
|
|
10261
|
+
const klein = await hfLoadImageAsBase64(
|
|
10262
|
+
id,
|
|
10263
|
+
token,
|
|
10264
|
+
void 0,
|
|
10265
|
+
eintrag.filename,
|
|
10266
|
+
void 0,
|
|
10267
|
+
eintrag.mimeType,
|
|
10268
|
+
true
|
|
10269
|
+
);
|
|
10270
|
+
if (klein) {
|
|
10271
|
+
const quelle2 = `data:${eintrag.mimeType || "image/jpeg"};base64,${klein}`;
|
|
10272
|
+
vorschauen.set(id, quelle2);
|
|
10273
|
+
return quelle2;
|
|
10274
|
+
}
|
|
10275
|
+
}
|
|
10276
|
+
const voll = await speicher.resolve(id);
|
|
10277
|
+
const quelle = `data:${voll.mimeType};base64,${voll.data}`;
|
|
10278
|
+
vorschauen.set(id, quelle);
|
|
10279
|
+
return quelle;
|
|
10280
|
+
},
|
|
10245
10281
|
async resolve(id, mimeType) {
|
|
10246
10282
|
const eben = abgelegt.get(id);
|
|
10247
10283
|
if (eben) return eben;
|
|
@@ -10279,6 +10315,47 @@ function createHfImageStore(options) {
|
|
|
10279
10315
|
);
|
|
10280
10316
|
}
|
|
10281
10317
|
};
|
|
10318
|
+
return speicher;
|
|
10319
|
+
}
|
|
10320
|
+
|
|
10321
|
+
// src/lib/szenen/libraryItems.ts
|
|
10322
|
+
var LOCATOR = /^(.+)-(\d+)$/;
|
|
10323
|
+
function locatorTeile(mediaRef) {
|
|
10324
|
+
const treffer = LOCATOR.exec(mediaRef);
|
|
10325
|
+
if (!treffer) return { stamm: mediaRef, position: null };
|
|
10326
|
+
return { stamm: treffer[1], position: Number(treffer[2]) };
|
|
10327
|
+
}
|
|
10328
|
+
function gruppiereZuItems(bilder) {
|
|
10329
|
+
const gruppen = /* @__PURE__ */ new Map();
|
|
10330
|
+
for (const bild of bilder) {
|
|
10331
|
+
const { stamm } = locatorTeile(bild.mediaRef);
|
|
10332
|
+
const vorhanden = gruppen.get(stamm);
|
|
10333
|
+
if (vorhanden) vorhanden.push(bild);
|
|
10334
|
+
else gruppen.set(stamm, [bild]);
|
|
10335
|
+
}
|
|
10336
|
+
const items = [...gruppen.entries()].map(([stamm, mitglieder]) => {
|
|
10337
|
+
const sortiert = [...mitglieder].sort((a, b) => {
|
|
10338
|
+
const pa = locatorTeile(a.mediaRef).position ?? 0;
|
|
10339
|
+
const pb = locatorTeile(b.mediaRef).position ?? 0;
|
|
10340
|
+
return pa - pb;
|
|
10341
|
+
});
|
|
10342
|
+
const erstes = sortiert[0];
|
|
10343
|
+
const itemRef = sortiert.length === 1 ? erstes.mediaRef : stamm;
|
|
10344
|
+
const juengstes = sortiert.reduce(
|
|
10345
|
+
(max, b) => Math.max(max, b.timestamp ?? 0),
|
|
10346
|
+
0
|
|
10347
|
+
);
|
|
10348
|
+
return {
|
|
10349
|
+
item: {
|
|
10350
|
+
itemRef,
|
|
10351
|
+
title: erstes.itemTitle?.trim() || erstes.title || itemRef,
|
|
10352
|
+
images: sortiert.map(({ timestamp: _t, itemTitle: _i, ...bild }) => bild)
|
|
10353
|
+
},
|
|
10354
|
+
juengstes
|
|
10355
|
+
};
|
|
10356
|
+
});
|
|
10357
|
+
items.sort((a, b) => b.juengstes - a.juengstes);
|
|
10358
|
+
return items.map((e) => e.item);
|
|
10282
10359
|
}
|
|
10283
10360
|
|
|
10284
10361
|
// src/lib/szenen/hfImageLibrary.ts
|
|
@@ -10286,13 +10363,22 @@ function fehler(nachricht, retryable = false) {
|
|
|
10286
10363
|
return { kind: "error", message: nachricht, retryable };
|
|
10287
10364
|
}
|
|
10288
10365
|
function alsBild(eintrag) {
|
|
10366
|
+
const { position } = locatorTeile(eintrag.id);
|
|
10367
|
+
const werk = eintrag.prompt?.trim() || "";
|
|
10289
10368
|
return {
|
|
10290
10369
|
mediaRef: eintrag.id,
|
|
10291
|
-
//
|
|
10292
|
-
//
|
|
10293
|
-
|
|
10370
|
+
// Innerhalb eines mehrbildigen Werkes tragen alle Einträge denselben
|
|
10371
|
+
// Prompt — der Abgleich schreibt ihn je Bild aus derselben Library-Zeile.
|
|
10372
|
+
// Deshalb bekommt die Kachel dort die Position dazu, sonst stünde
|
|
10373
|
+
// vierzehnmal derselbe Satz.
|
|
10374
|
+
title: position === null ? werk || eintrag.id : `${werk || eintrag.id} \xB7 Bild ${position + 1}`,
|
|
10294
10375
|
mimeType: eintrag.mimeType || "image/jpeg",
|
|
10295
|
-
thumbUrl
|
|
10376
|
+
// Kein `thumbUrl`: Die Datei liegt auf HF hinter einem Token, und ein
|
|
10377
|
+
// `<img src>` käme dort nicht durch. Die Quelle entsteht über
|
|
10378
|
+
// `loadPreview()` — und nur für die Kacheln, die wirklich gezeigt werden.
|
|
10379
|
+
thumbUrl: null,
|
|
10380
|
+
itemTitle: werk || null,
|
|
10381
|
+
...typeof eintrag.timestamp === "number" ? { timestamp: eintrag.timestamp } : {}
|
|
10296
10382
|
};
|
|
10297
10383
|
}
|
|
10298
10384
|
function createHfImageLibrary(options) {
|
|
@@ -10303,15 +10389,14 @@ function createHfImageLibrary(options) {
|
|
|
10303
10389
|
...options.now ? { now: options.now } : {}
|
|
10304
10390
|
});
|
|
10305
10391
|
return {
|
|
10306
|
-
async
|
|
10392
|
+
async listItems(query) {
|
|
10307
10393
|
try {
|
|
10308
10394
|
const zustand = await store.bestand();
|
|
10309
10395
|
const eintraege = zustand?.metadata ?? [];
|
|
10396
|
+
const items = gruppiereZuItems(eintraege.map(alsBild));
|
|
10310
10397
|
const gesucht = query?.search?.trim().toLowerCase();
|
|
10311
|
-
const gefiltert = gesucht ?
|
|
10312
|
-
|
|
10313
|
-
const begrenzt = query?.limit ? sortiert.slice(0, query.limit) : sortiert;
|
|
10314
|
-
return { kind: "ok", value: begrenzt.map(alsBild) };
|
|
10398
|
+
const gefiltert = gesucht ? items.filter((i) => i.title.toLowerCase().includes(gesucht) || i.itemRef.toLowerCase().includes(gesucht)) : items;
|
|
10399
|
+
return { kind: "ok", value: query?.limit ? gefiltert.slice(0, query.limit) : gefiltert };
|
|
10315
10400
|
} catch (error) {
|
|
10316
10401
|
return fehler(
|
|
10317
10402
|
`Der Bildbestand konnte nicht gelesen werden: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -10319,6 +10404,16 @@ function createHfImageLibrary(options) {
|
|
|
10319
10404
|
);
|
|
10320
10405
|
}
|
|
10321
10406
|
},
|
|
10407
|
+
async loadPreview(mediaRef) {
|
|
10408
|
+
try {
|
|
10409
|
+
return { kind: "ok", value: await store.preview(mediaRef) };
|
|
10410
|
+
} catch (error) {
|
|
10411
|
+
return fehler(
|
|
10412
|
+
`Die Vorschau von ${mediaRef} ist nicht ladbar: ${error instanceof Error ? error.message : String(error)}`,
|
|
10413
|
+
true
|
|
10414
|
+
);
|
|
10415
|
+
}
|
|
10416
|
+
},
|
|
10322
10417
|
async resolveImage(mediaRef, mimeTypeHinweis) {
|
|
10323
10418
|
try {
|
|
10324
10419
|
const bild = await store.resolve(mediaRef, mimeTypeHinweis);
|
|
@@ -10331,10 +10426,13 @@ function createHfImageLibrary(options) {
|
|
|
10331
10426
|
const id = newImageId();
|
|
10332
10427
|
try {
|
|
10333
10428
|
await store.putWithId(id, input.data, input.mime_type, input.title);
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10429
|
+
const abgelegt = {
|
|
10430
|
+
mediaRef: id,
|
|
10431
|
+
title: input.title,
|
|
10432
|
+
mimeType: input.mime_type,
|
|
10433
|
+
thumbUrl: null
|
|
10337
10434
|
};
|
|
10435
|
+
return { kind: "ok", value: abgelegt };
|
|
10338
10436
|
} catch (error) {
|
|
10339
10437
|
return fehler(
|
|
10340
10438
|
`Das Bild konnte nicht abgelegt werden: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -10345,6 +10443,30 @@ function createHfImageLibrary(options) {
|
|
|
10345
10443
|
};
|
|
10346
10444
|
}
|
|
10347
10445
|
|
|
10446
|
+
// src/lib/szenen/bildVorschau.ts
|
|
10447
|
+
async function ladeVorschauen(port, mediaRefs, fertig, optionen = {}) {
|
|
10448
|
+
const laden = port.loadPreview;
|
|
10449
|
+
if (!laden) return;
|
|
10450
|
+
const parallel = Math.max(1, optionen.parallel ?? 4);
|
|
10451
|
+
const lauf = optionen.lauf;
|
|
10452
|
+
const offen = mediaRefs.filter((ref) => !(optionen.hat?.(ref) ?? false));
|
|
10453
|
+
let naechster = 0;
|
|
10454
|
+
async function arbeiter() {
|
|
10455
|
+
while (naechster < offen.length) {
|
|
10456
|
+
if (lauf?.abgebrochen) return;
|
|
10457
|
+
const ref = offen[naechster];
|
|
10458
|
+
naechster += 1;
|
|
10459
|
+
const ergebnis = await laden.call(port, ref);
|
|
10460
|
+
if (lauf?.abgebrochen) return;
|
|
10461
|
+
if (ergebnis.kind === "ok") fertig(ref, ergebnis.value);
|
|
10462
|
+
else optionen.gescheitert?.(ref, ergebnis.message);
|
|
10463
|
+
}
|
|
10464
|
+
}
|
|
10465
|
+
await Promise.all(
|
|
10466
|
+
Array.from({ length: Math.min(parallel, offen.length) }, () => arbeiter())
|
|
10467
|
+
);
|
|
10468
|
+
}
|
|
10469
|
+
|
|
10348
10470
|
// src/lib/szenen/imageGenerationCapability.ts
|
|
10349
10471
|
var isObject11 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
10350
10472
|
var istText5 = (v) => typeof v === "string" && v.trim().length > 0;
|
|
@@ -11032,15 +11154,26 @@ function createMemoryViewPort(options = {}) {
|
|
|
11032
11154
|
}
|
|
11033
11155
|
};
|
|
11034
11156
|
const bilder = /* @__PURE__ */ new Map();
|
|
11157
|
+
const werke = [];
|
|
11035
11158
|
for (const bild of options.images ?? []) {
|
|
11036
11159
|
bilder.set(bild.mediaRef, { bild, data: "AAAA" });
|
|
11160
|
+
werke.push({ itemRef: bild.mediaRef, title: bild.title, images: [bild] });
|
|
11037
11161
|
}
|
|
11162
|
+
for (const werk of options.imageItems ?? []) {
|
|
11163
|
+
for (const bild of werk.images) bilder.set(bild.mediaRef, { bild, data: "AAAA" });
|
|
11164
|
+
werke.push(werk);
|
|
11165
|
+
}
|
|
11166
|
+
const vorschauLazy = options.imagePreviewLazy === true;
|
|
11038
11167
|
const imageLibraryPort = {
|
|
11039
|
-
async
|
|
11040
|
-
const alle = [...bilder.values()].map((e) => e.bild);
|
|
11168
|
+
async listItems(query) {
|
|
11041
11169
|
const gesucht = query?.search?.trim().toLowerCase();
|
|
11042
|
-
const gefiltert = gesucht ?
|
|
11043
|
-
|
|
11170
|
+
const gefiltert = gesucht ? werke.filter((w) => w.title.toLowerCase().includes(gesucht)) : werke;
|
|
11171
|
+
const sichtbar = query?.limit ? gefiltert.slice(0, query.limit) : gefiltert;
|
|
11172
|
+
if (!vorschauLazy) return ok2(sichtbar);
|
|
11173
|
+
return ok2(sichtbar.map((w) => ({
|
|
11174
|
+
...w,
|
|
11175
|
+
images: w.images.map((b) => ({ ...b, thumbUrl: null }))
|
|
11176
|
+
})));
|
|
11044
11177
|
},
|
|
11045
11178
|
async resolveImage(mediaRef) {
|
|
11046
11179
|
const eintrag = bilder.get(mediaRef);
|
|
@@ -11058,9 +11191,19 @@ function createMemoryViewPort(options = {}) {
|
|
|
11058
11191
|
thumbUrl: null
|
|
11059
11192
|
};
|
|
11060
11193
|
bilder.set(mediaRef, { bild, data: input.data });
|
|
11194
|
+
werke.unshift({ itemRef: mediaRef, title: bild.title, images: [bild] });
|
|
11061
11195
|
return done(bild);
|
|
11062
11196
|
}
|
|
11063
11197
|
};
|
|
11198
|
+
if (vorschauLazy) {
|
|
11199
|
+
imageLibraryPort.loadPreview = async (mediaRef) => {
|
|
11200
|
+
const eintrag = bilder.get(mediaRef);
|
|
11201
|
+
if (!eintrag) {
|
|
11202
|
+
return { kind: "error", message: `Bild ${mediaRef} ist unbekannt.`, retryable: false };
|
|
11203
|
+
}
|
|
11204
|
+
return ok2(`data:${eintrag.bild.mimeType};base64,${eintrag.data}`);
|
|
11205
|
+
};
|
|
11206
|
+
}
|
|
11064
11207
|
const batches = [...options.batches ?? []];
|
|
11065
11208
|
const imageGenerationEvents = createInMemoryEventChannel();
|
|
11066
11209
|
const imageBatchHistoryPort = {
|
|
@@ -13298,7 +13441,7 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
13298
13441
|
}
|
|
13299
13442
|
|
|
13300
13443
|
// src/features/szenen/SzenenView.tsx
|
|
13301
|
-
var
|
|
13444
|
+
var import_react17 = require("react");
|
|
13302
13445
|
|
|
13303
13446
|
// src/features/szenen/szenenViewModel.ts
|
|
13304
13447
|
var KEINE_BAUSTEINE = [
|
|
@@ -13391,7 +13534,7 @@ function noticeFor(ergebnis, was) {
|
|
|
13391
13534
|
}
|
|
13392
13535
|
|
|
13393
13536
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
13394
|
-
var
|
|
13537
|
+
var import_react12 = require("react");
|
|
13395
13538
|
|
|
13396
13539
|
// src/features/szenen/areas/usePortQuery.ts
|
|
13397
13540
|
var import_react = require("react");
|
|
@@ -13423,7 +13566,7 @@ function usePortQuery(frage, abhaengigkeiten) {
|
|
|
13423
13566
|
}
|
|
13424
13567
|
|
|
13425
13568
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
13426
|
-
var
|
|
13569
|
+
var import_react10 = require("react");
|
|
13427
13570
|
|
|
13428
13571
|
// src/features/szenen/elementLabels.ts
|
|
13429
13572
|
var LABELS = {
|
|
@@ -13783,6 +13926,9 @@ var LABELS2 = {
|
|
|
13783
13926
|
user_instruction: "Nutzeranweisung",
|
|
13784
13927
|
prompt_render_settings: "Prompt-Erzeugung",
|
|
13785
13928
|
blender_render_settings: "Blender-Ausgabe",
|
|
13929
|
+
// Nur Darstellung, keine Schemaaenderung (A4): Der Schluessel bleibt
|
|
13930
|
+
// `overrides`, und er steht als `<code>` weiterhin daneben.
|
|
13931
|
+
overrides: "Render-Abweichungen",
|
|
13786
13932
|
camera_rig: "Kamera-Rig",
|
|
13787
13933
|
media_refs: "Medien",
|
|
13788
13934
|
external_refs: "Externe Referenzen",
|
|
@@ -14761,41 +14907,91 @@ var FeldControl = (props) => {
|
|
|
14761
14907
|
);
|
|
14762
14908
|
}
|
|
14763
14909
|
};
|
|
14910
|
+
var LANGE_ERKLAERUNG = 120;
|
|
14911
|
+
function ersterSatz(text) {
|
|
14912
|
+
const ende = /[.!?](\s|$)/.exec(text);
|
|
14913
|
+
return ende ? text.slice(0, ende.index + 1) : text;
|
|
14914
|
+
}
|
|
14915
|
+
var Erklaerung = ({ text, testId }) => {
|
|
14916
|
+
const ganz = text.trim();
|
|
14917
|
+
const kern = ersterSatz(ganz);
|
|
14918
|
+
const rest = ganz.slice(kern.length).trim();
|
|
14919
|
+
if (ganz.length <= LANGE_ERKLAERUNG || !rest) {
|
|
14920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { "data-testid": `erklaerung-${testId}`, children: ganz });
|
|
14921
|
+
}
|
|
14922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
14923
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { "data-testid": `erklaerung-${testId}`, children: kern }),
|
|
14924
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", { className: "szenen-detail__warum", "data-testid": `warum-${testId}`, children: [
|
|
14925
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", { children: "Warum?" }),
|
|
14926
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: rest })
|
|
14927
|
+
] })
|
|
14928
|
+
] });
|
|
14929
|
+
};
|
|
14930
|
+
function gruppeKonfiguriert(feld, formular) {
|
|
14931
|
+
return Object.keys(payloadFromForm([feld], formular)).length > 0;
|
|
14932
|
+
}
|
|
14764
14933
|
var SchemaFieldRow = (props) => {
|
|
14765
14934
|
const { feld, elementType, formular } = props;
|
|
14766
14935
|
const label = feldLabel(elementType, feld.path, feld.name);
|
|
14767
14936
|
if (feld.kind === "group") {
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14937
|
+
const konfiguriert = gruppeKonfiguriert(feld, formular);
|
|
14938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
14939
|
+
"details",
|
|
14940
|
+
{
|
|
14941
|
+
className: "szenen-detail__group",
|
|
14942
|
+
"data-testid": `gruppe-${feld.path}`,
|
|
14943
|
+
"data-konfiguriert": konfiguriert ? "ja" : "nein",
|
|
14944
|
+
open: feld.required,
|
|
14945
|
+
children: [
|
|
14946
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("summary", { children: [
|
|
14947
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "szenen-detail__group-titel", children: label }),
|
|
14948
|
+
feld.required ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { title: "Pflichtfeld", children: " *" }) : (
|
|
14949
|
+
// A2: Dass hier schon etwas steht, muss man im
|
|
14950
|
+
// geschlossenen Zustand sehen — sonst übersieht man
|
|
14951
|
+
// eine gesetzte Blender-Ausgabe genau so lange, bis
|
|
14952
|
+
// sie im Ergebnis auftaucht.
|
|
14953
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
14954
|
+
"span",
|
|
14955
|
+
{
|
|
14956
|
+
className: "szenen-detail__group-status",
|
|
14957
|
+
"data-testid": `gruppe-${feld.path}-status`,
|
|
14958
|
+
children: konfiguriert ? "konfiguriert" : "optional"
|
|
14959
|
+
}
|
|
14960
|
+
)
|
|
14961
|
+
)
|
|
14962
|
+
] }),
|
|
14963
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-detail__group-inhalt", children: [
|
|
14964
|
+
feld.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Erklaerung, { text: feld.description, testId: `gruppe-${feld.path}` }),
|
|
14965
|
+
(feld.children ?? []).map((kind) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SchemaFieldRow, { ...props, feld: kind }, kind.path))
|
|
14966
|
+
] })
|
|
14967
|
+
]
|
|
14968
|
+
}
|
|
14969
|
+
);
|
|
14776
14970
|
}
|
|
14777
14971
|
const wert = formular[feld.path] ?? "";
|
|
14778
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("
|
|
14779
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "szenen-detail__fieldrow", "data-feld": feld.path, children: [
|
|
14973
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "szenen-detail__field", children: [
|
|
14974
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
14975
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "szenen-detail__field-label", children: label }),
|
|
14976
|
+
feld.required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { title: "Pflichtfeld", children: " *" }),
|
|
14977
|
+
label !== feld.name && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: "szenen-detail__field-key", children: feld.name }),
|
|
14978
|
+
feld.complexHint && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("em", { children: [
|
|
14979
|
+
" \u2014 ",
|
|
14980
|
+
feld.complexHint
|
|
14981
|
+
] })
|
|
14982
|
+
] }),
|
|
14983
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FeldControl, { ...props, wert }),
|
|
14984
|
+
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
14985
|
+
NullSchalter,
|
|
14986
|
+
{
|
|
14987
|
+
feld,
|
|
14988
|
+
wert,
|
|
14989
|
+
onChange: props.onChange,
|
|
14990
|
+
readOnly: props.readOnly
|
|
14991
|
+
}
|
|
14992
|
+
)
|
|
14787
14993
|
] }),
|
|
14788
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
14789
|
-
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
14790
|
-
NullSchalter,
|
|
14791
|
-
{
|
|
14792
|
-
feld,
|
|
14793
|
-
wert,
|
|
14794
|
-
onChange: props.onChange,
|
|
14795
|
-
readOnly: props.readOnly
|
|
14796
|
-
}
|
|
14797
|
-
),
|
|
14798
|
-
feld.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: feld.description })
|
|
14994
|
+
feld.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Erklaerung, { text: feld.description, testId: feld.path })
|
|
14799
14995
|
] });
|
|
14800
14996
|
};
|
|
14801
14997
|
|
|
@@ -15462,11 +15658,162 @@ var VersionNavigator = ({
|
|
|
15462
15658
|
};
|
|
15463
15659
|
|
|
15464
15660
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
15465
|
-
var
|
|
15661
|
+
var import_react9 = require("react");
|
|
15466
15662
|
|
|
15467
15663
|
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
15664
|
+
var import_react8 = require("react");
|
|
15665
|
+
|
|
15666
|
+
// src/features/szenen/areas/Bildbausteine.tsx
|
|
15468
15667
|
var import_react7 = require("react");
|
|
15469
15668
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
15669
|
+
var Kachel = ({
|
|
15670
|
+
quelle,
|
|
15671
|
+
alt,
|
|
15672
|
+
leerText
|
|
15673
|
+
}) => /* @__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 }) });
|
|
15674
|
+
var BildViewer = ({
|
|
15675
|
+
bilder,
|
|
15676
|
+
position,
|
|
15677
|
+
onWechseln,
|
|
15678
|
+
onSchliessen,
|
|
15679
|
+
satzTitel,
|
|
15680
|
+
testId
|
|
15681
|
+
}) => {
|
|
15682
|
+
const anzahl = bilder.length;
|
|
15683
|
+
const bild = bilder[position];
|
|
15684
|
+
const blaettern = (0, import_react7.useCallback)((schritt) => {
|
|
15685
|
+
if (anzahl === 0) return;
|
|
15686
|
+
onWechseln((position + schritt + anzahl) % anzahl);
|
|
15687
|
+
}, [anzahl, position, onWechseln]);
|
|
15688
|
+
(0, import_react7.useEffect)(() => {
|
|
15689
|
+
const taste = (e) => {
|
|
15690
|
+
if (e.key === "Escape") onSchliessen();
|
|
15691
|
+
else if (e.key === "ArrowLeft") blaettern(-1);
|
|
15692
|
+
else if (e.key === "ArrowRight") blaettern(1);
|
|
15693
|
+
};
|
|
15694
|
+
document.addEventListener("keydown", taste);
|
|
15695
|
+
return () => document.removeEventListener("keydown", taste);
|
|
15696
|
+
}, [blaettern, onSchliessen]);
|
|
15697
|
+
if (!bild) return null;
|
|
15698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15699
|
+
"div",
|
|
15700
|
+
{
|
|
15701
|
+
className: "szenen-bildviewer",
|
|
15702
|
+
"data-testid": testId,
|
|
15703
|
+
role: "dialog",
|
|
15704
|
+
"aria-modal": "true",
|
|
15705
|
+
"aria-label": satzTitel ? `${satzTitel} \u2014 ${bild.titel}` : bild.titel,
|
|
15706
|
+
children: [
|
|
15707
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "szenen-bildviewer__kopf", children: [
|
|
15708
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "szenen-bildviewer__titel", children: [
|
|
15709
|
+
satzTitel ? `${satzTitel} \xB7 ` : "",
|
|
15710
|
+
bild.titel
|
|
15711
|
+
] }),
|
|
15712
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "szenen-bildviewer__zaehler", "data-testid": `${testId}-zaehler`, children: [
|
|
15713
|
+
position + 1,
|
|
15714
|
+
" / ",
|
|
15715
|
+
anzahl
|
|
15716
|
+
] }),
|
|
15717
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15718
|
+
"button",
|
|
15719
|
+
{
|
|
15720
|
+
type: "button",
|
|
15721
|
+
className: "szenen-bildviewer__schliessen",
|
|
15722
|
+
onClick: onSchliessen,
|
|
15723
|
+
"data-testid": `${testId}-schliessen`,
|
|
15724
|
+
children: "Schliessen"
|
|
15725
|
+
}
|
|
15726
|
+
)
|
|
15727
|
+
] }),
|
|
15728
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "szenen-bildviewer__buehne", children: [
|
|
15729
|
+
anzahl > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15730
|
+
"button",
|
|
15731
|
+
{
|
|
15732
|
+
type: "button",
|
|
15733
|
+
className: "szenen-bildviewer__blaettern",
|
|
15734
|
+
onClick: () => blaettern(-1),
|
|
15735
|
+
"aria-label": "Vorheriges Bild",
|
|
15736
|
+
"data-testid": `${testId}-zurueck`,
|
|
15737
|
+
children: "\u2039"
|
|
15738
|
+
}
|
|
15739
|
+
),
|
|
15740
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "szenen-bildviewer__rahmen", children: bild.quelle ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15741
|
+
"img",
|
|
15742
|
+
{
|
|
15743
|
+
className: "szenen-bildviewer__bild",
|
|
15744
|
+
src: bild.quelle,
|
|
15745
|
+
alt: bild.titel,
|
|
15746
|
+
"data-testid": `${testId}-bild`
|
|
15747
|
+
}
|
|
15748
|
+
) : (
|
|
15749
|
+
// Auch gross bleibt eine fehlende Quelle eine Auskunft
|
|
15750
|
+
// und kein Textblock (R12.3).
|
|
15751
|
+
/* @__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." })
|
|
15752
|
+
) }),
|
|
15753
|
+
anzahl > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15754
|
+
"button",
|
|
15755
|
+
{
|
|
15756
|
+
type: "button",
|
|
15757
|
+
className: "szenen-bildviewer__blaettern",
|
|
15758
|
+
onClick: () => blaettern(1),
|
|
15759
|
+
"aria-label": "N\xE4chstes Bild",
|
|
15760
|
+
"data-testid": `${testId}-weiter`,
|
|
15761
|
+
children: "\u203A"
|
|
15762
|
+
}
|
|
15763
|
+
)
|
|
15764
|
+
] }),
|
|
15765
|
+
bild.details && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "szenen-bildviewer__details", "data-testid": `${testId}-details`, children: bild.details })
|
|
15766
|
+
]
|
|
15767
|
+
}
|
|
15768
|
+
);
|
|
15769
|
+
};
|
|
15770
|
+
var BildGalerie = ({ bilder, testId, satzTitel }) => {
|
|
15771
|
+
const [offen, setOffen] = (0, import_react7.useState)(null);
|
|
15772
|
+
(0, import_react7.useEffect)(() => {
|
|
15773
|
+
setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
|
|
15774
|
+
}, [bilder.length]);
|
|
15775
|
+
if (bilder.length === 0) return null;
|
|
15776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
15777
|
+
/* @__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)(
|
|
15778
|
+
"button",
|
|
15779
|
+
{
|
|
15780
|
+
type: "button",
|
|
15781
|
+
className: "szenen-bildgalerie__kachel",
|
|
15782
|
+
onClick: () => setOffen(position),
|
|
15783
|
+
"data-testid": `${testId}-oeffnen-${bild.id}`,
|
|
15784
|
+
title: bild.titel,
|
|
15785
|
+
children: [
|
|
15786
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15787
|
+
Kachel,
|
|
15788
|
+
{
|
|
15789
|
+
quelle: bild.quelle,
|
|
15790
|
+
alt: bild.titel,
|
|
15791
|
+
...bild.leerText ? { leerText: bild.leerText } : {}
|
|
15792
|
+
}
|
|
15793
|
+
),
|
|
15794
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "szenen-bildgalerie__nummer", children: [
|
|
15795
|
+
"#",
|
|
15796
|
+
position + 1
|
|
15797
|
+
] })
|
|
15798
|
+
]
|
|
15799
|
+
}
|
|
15800
|
+
) }, bild.id)) }),
|
|
15801
|
+
offen !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15802
|
+
BildViewer,
|
|
15803
|
+
{
|
|
15804
|
+
bilder,
|
|
15805
|
+
position: offen,
|
|
15806
|
+
onWechseln: setOffen,
|
|
15807
|
+
onSchliessen: () => setOffen(null),
|
|
15808
|
+
testId: `${testId}-viewer`,
|
|
15809
|
+
...satzTitel ? { satzTitel } : {}
|
|
15810
|
+
}
|
|
15811
|
+
)
|
|
15812
|
+
] });
|
|
15813
|
+
};
|
|
15814
|
+
|
|
15815
|
+
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
15816
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
15470
15817
|
var AUFTRAG_TEXT = {
|
|
15471
15818
|
// „gestartet/unterbrochen" in einem: Aus dem Log allein ist beides nicht
|
|
15472
15819
|
// unterscheidbar, und genau das ist beabsichtigt — es gibt keinen
|
|
@@ -15478,8 +15825,10 @@ var AUFTRAG_TEXT = {
|
|
|
15478
15825
|
};
|
|
15479
15826
|
var RunImagesPanel = ({ port, lauf }) => {
|
|
15480
15827
|
const faehig = capabilitiesOf(port);
|
|
15481
|
-
const [nachladen, setNachladen] = (0,
|
|
15828
|
+
const [nachladen, setNachladen] = (0, import_react8.useState)(0);
|
|
15482
15829
|
const neuLesen = () => setNachladen((n) => n + 1);
|
|
15830
|
+
const [erzeugenOffen, setErzeugenOffen] = (0, import_react8.useState)(null);
|
|
15831
|
+
const [zuordnenOffen, setZuordnenOffen] = (0, import_react8.useState)(null);
|
|
15483
15832
|
const quelle = sourceOf(lauf);
|
|
15484
15833
|
const [wahlPhase] = usePortQuery(
|
|
15485
15834
|
() => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
@@ -15496,38 +15845,40 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
15496
15845
|
);
|
|
15497
15846
|
const auftraege = auftraegePhase.status === "ready" ? auftraegePhase.value : [];
|
|
15498
15847
|
const batches = batchesPhase.status === "ready" ? batchesPhase.value : [];
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15848
|
+
const auffaellige = auftraege.filter((a) => a.status !== "succeeded");
|
|
15849
|
+
const erzeugenAuf = erzeugenOffen ?? batches.length === 0;
|
|
15850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder", "data-testid": `bilder-${lauf.run_id}`, children: [
|
|
15851
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "szenen-bilder__eingang", "data-testid": `eingang-${lauf.run_id}`, children: [
|
|
15852
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { children: "Eingang \u2014 woraus dieser Prompt entstand" }),
|
|
15853
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__ids", children: [
|
|
15854
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
15504
15855
|
"Lauf ",
|
|
15505
|
-
/* @__PURE__ */ (0,
|
|
15856
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { "data-testid": `eingang-lauf-${lauf.run_id}`, children: lauf.run_id })
|
|
15506
15857
|
] }),
|
|
15507
|
-
quelle.kind === "published" && /* @__PURE__ */ (0,
|
|
15858
|
+
quelle.kind === "published" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
15508
15859
|
"ver\xF6ffentlichte Shot-Version ",
|
|
15509
|
-
/* @__PURE__ */ (0,
|
|
15860
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.shot_version_id })
|
|
15510
15861
|
] }),
|
|
15511
|
-
quelle.kind === "draft_chain" && /* @__PURE__ */ (0,
|
|
15862
|
+
quelle.kind === "draft_chain" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
15512
15863
|
"Draft-Kette ",
|
|
15513
|
-
/* @__PURE__ */ (0,
|
|
15864
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.chain_id })
|
|
15514
15865
|
] }),
|
|
15515
|
-
quelle.kind === "scene_direct" && /* @__PURE__ */ (0,
|
|
15866
|
+
quelle.kind === "scene_direct" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
15516
15867
|
"Szene ",
|
|
15517
|
-
/* @__PURE__ */ (0,
|
|
15518
|
-
quelle.scene.draft_id ? /* @__PURE__ */ (0,
|
|
15868
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.scene.element_id }),
|
|
15869
|
+
quelle.scene.draft_id ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15519
15870
|
" \xB7 Entwurf ",
|
|
15520
|
-
/* @__PURE__ */ (0,
|
|
15871
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.scene.draft_id }),
|
|
15521
15872
|
" (Revision ",
|
|
15522
15873
|
quelle.scene.revision,
|
|
15523
15874
|
")"
|
|
15524
|
-
] }) : /* @__PURE__ */ (0,
|
|
15875
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15525
15876
|
" \xB7 Version ",
|
|
15526
|
-
/* @__PURE__ */ (0,
|
|
15877
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: quelle.scene.version_id })
|
|
15527
15878
|
] })
|
|
15528
15879
|
] })
|
|
15529
15880
|
] }),
|
|
15530
|
-
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */ (0,
|
|
15881
|
+
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15531
15882
|
InputBilder,
|
|
15532
15883
|
{
|
|
15533
15884
|
port,
|
|
@@ -15538,67 +15889,148 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
15538
15889
|
// Nichts raten: Ein Lauf vor 6.7 trägt die
|
|
15539
15890
|
// Rekonstruktionsherkunft nicht, und ein veröffentlichter
|
|
15540
15891
|
// Lauf hat keine (D-123).
|
|
15541
|
-
/* @__PURE__ */ (0,
|
|
15892
|
+
/* @__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." })
|
|
15542
15893
|
)
|
|
15543
15894
|
] }),
|
|
15544
|
-
/* @__PURE__ */ (0,
|
|
15545
|
-
/* @__PURE__ */ (0,
|
|
15546
|
-
!faehig.
|
|
15547
|
-
|
|
15895
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "szenen-bilder__ausgang", "data-testid": `ausgang-${lauf.run_id}`, children: [
|
|
15896
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { children: "Ausgang \u2014 die Bilder aus diesem Prompt" }),
|
|
15897
|
+
!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." }),
|
|
15898
|
+
batchesPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15899
|
+
"Batches konnten nicht geladen werden: ",
|
|
15900
|
+
batchesPhase.message
|
|
15901
|
+
] }),
|
|
15902
|
+
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." }),
|
|
15903
|
+
batches.map((batch) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BatchKachel, { port, batch }, batch.item_id)),
|
|
15904
|
+
!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." }),
|
|
15905
|
+
auftraegePhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `auftraege-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15548
15906
|
"Auftr\xE4ge konnten nicht geladen werden: ",
|
|
15549
15907
|
auftraegePhase.message
|
|
15550
15908
|
] }),
|
|
15551
|
-
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */ (0,
|
|
15552
|
-
|
|
15553
|
-
"
|
|
15909
|
+
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." }),
|
|
15910
|
+
auffaellige.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
15911
|
+
"p",
|
|
15554
15912
|
{
|
|
15555
|
-
"
|
|
15556
|
-
"data-
|
|
15913
|
+
className: "szenen-bilder__auffaellig",
|
|
15914
|
+
"data-testid": `auftraege-auffaellig-${lauf.run_id}`,
|
|
15915
|
+
role: "alert",
|
|
15557
15916
|
children: [
|
|
15558
|
-
|
|
15559
|
-
|
|
15560
|
-
|
|
15561
|
-
|
|
15562
|
-
|
|
15563
|
-
|
|
15564
|
-
|
|
15565
|
-
|
|
15566
|
-
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
"
|
|
15575
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: auftrag.item_id })
|
|
15917
|
+
auffaellige.length === 1 ? `Ein Bildauftrag ist ${AUFTRAG_TEXT[auffaellige[0].status]}.` : `${auffaellige.length} Bildauftr\xE4ge sind nicht sauber durchgelaufen.`,
|
|
15918
|
+
" ",
|
|
15919
|
+
"Einzelheiten im Verlauf."
|
|
15920
|
+
]
|
|
15921
|
+
}
|
|
15922
|
+
),
|
|
15923
|
+
auftraege.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
15924
|
+
"details",
|
|
15925
|
+
{
|
|
15926
|
+
className: "szenen-bilder__verlauf",
|
|
15927
|
+
"data-testid": `auftraege-verlauf-${lauf.run_id}`,
|
|
15928
|
+
open: auffaellige.length > 0,
|
|
15929
|
+
children: [
|
|
15930
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("summary", { children: [
|
|
15931
|
+
"Bildauftr\xE4ge / Verlauf (",
|
|
15932
|
+
auftraege.length,
|
|
15933
|
+
")"
|
|
15576
15934
|
] }),
|
|
15577
|
-
|
|
15578
|
-
|
|
15935
|
+
/* @__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)(
|
|
15936
|
+
"li",
|
|
15937
|
+
{
|
|
15938
|
+
"data-testid": `auftrag-${auftrag.generation_batch_id}`,
|
|
15939
|
+
"data-status": auftrag.status,
|
|
15940
|
+
children: [
|
|
15941
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: AUFTRAG_TEXT[auftrag.status] }),
|
|
15942
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `auftrag-modell-${auftrag.generation_batch_id}`, children: [
|
|
15943
|
+
auftrag.request?.image_count ?? "?",
|
|
15944
|
+
" Bild(er) \xB7",
|
|
15945
|
+
" ",
|
|
15946
|
+
auftrag.request?.callable_model_id ?? "Modell unbekannt",
|
|
15947
|
+
auftrag.request?.provider ? ` bei ${auftrag.request.provider}` : ""
|
|
15948
|
+
] }),
|
|
15949
|
+
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: [
|
|
15950
|
+
"abweichend \u2014 Prompt optimiert f\xFCr",
|
|
15951
|
+
" ",
|
|
15952
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: auftrag.request.prompt_target_model_key })
|
|
15953
|
+
] }),
|
|
15954
|
+
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." }),
|
|
15955
|
+
auftrag.item_id && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `auftrag-item-${auftrag.generation_batch_id}`, children: [
|
|
15956
|
+
"Item ",
|
|
15957
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: auftrag.item_id })
|
|
15958
|
+
] }),
|
|
15959
|
+
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." }),
|
|
15960
|
+
auftrag.diagnostic && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-testid": `auftrag-diagnose-${auftrag.generation_batch_id}`, children: auftrag.diagnostic }),
|
|
15961
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { className: "szenen-bilder__auftragskennung", children: auftrag.generation_batch_id })
|
|
15962
|
+
]
|
|
15963
|
+
},
|
|
15964
|
+
auftrag.generation_batch_id
|
|
15965
|
+
)) })
|
|
15579
15966
|
]
|
|
15580
|
-
}
|
|
15581
|
-
|
|
15582
|
-
)) }),
|
|
15583
|
-
!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." }),
|
|
15584
|
-
batchesPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15585
|
-
"Batches konnten nicht geladen werden: ",
|
|
15586
|
-
batchesPhase.message
|
|
15587
|
-
] }),
|
|
15588
|
-
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." }),
|
|
15589
|
-
batches.map((batch) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BatchKachel, { port, batch }, batch.item_id))
|
|
15967
|
+
}
|
|
15968
|
+
)
|
|
15590
15969
|
] }),
|
|
15591
|
-
/* @__PURE__ */ (0,
|
|
15592
|
-
|
|
15970
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
15971
|
+
"details",
|
|
15593
15972
|
{
|
|
15594
|
-
|
|
15595
|
-
lauf
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15973
|
+
className: "szenen-bilder__aktion",
|
|
15974
|
+
"data-testid": `erzeugen-bereich-${lauf.run_id}`,
|
|
15975
|
+
open: erzeugenAuf,
|
|
15976
|
+
children: [
|
|
15977
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15978
|
+
"summary",
|
|
15979
|
+
{
|
|
15980
|
+
onClick: (e) => {
|
|
15981
|
+
e.preventDefault();
|
|
15982
|
+
setErzeugenOffen(!erzeugenAuf);
|
|
15983
|
+
},
|
|
15984
|
+
children: "Bilder aus diesem Prompt erzeugen"
|
|
15985
|
+
}
|
|
15986
|
+
),
|
|
15987
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15988
|
+
ErzeugenAktion,
|
|
15989
|
+
{
|
|
15990
|
+
port,
|
|
15991
|
+
lauf,
|
|
15992
|
+
wahl,
|
|
15993
|
+
wahlFehler: wahlPhase.status === "error" ? wahlPhase.message : null,
|
|
15994
|
+
onFertig: () => {
|
|
15995
|
+
setErzeugenOffen(true);
|
|
15996
|
+
neuLesen();
|
|
15997
|
+
}
|
|
15998
|
+
}
|
|
15999
|
+
)
|
|
16000
|
+
]
|
|
15599
16001
|
}
|
|
15600
16002
|
),
|
|
15601
|
-
/* @__PURE__ */ (0,
|
|
16003
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16004
|
+
"details",
|
|
16005
|
+
{
|
|
16006
|
+
className: "szenen-bilder__aktion",
|
|
16007
|
+
"data-testid": `zuordnen-bereich-${lauf.run_id}`,
|
|
16008
|
+
open: zuordnenOffen ?? false,
|
|
16009
|
+
children: [
|
|
16010
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16011
|
+
"summary",
|
|
16012
|
+
{
|
|
16013
|
+
onClick: (e) => {
|
|
16014
|
+
e.preventDefault();
|
|
16015
|
+
setZuordnenOffen(!(zuordnenOffen ?? false));
|
|
16016
|
+
},
|
|
16017
|
+
children: "Externe Bilder diesem Lauf zuordnen"
|
|
16018
|
+
}
|
|
16019
|
+
),
|
|
16020
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16021
|
+
ZuordnenAktion,
|
|
16022
|
+
{
|
|
16023
|
+
port,
|
|
16024
|
+
lauf,
|
|
16025
|
+
onFertig: () => {
|
|
16026
|
+
setZuordnenOffen(true);
|
|
16027
|
+
neuLesen();
|
|
16028
|
+
}
|
|
16029
|
+
}
|
|
16030
|
+
)
|
|
16031
|
+
]
|
|
16032
|
+
}
|
|
16033
|
+
)
|
|
15602
16034
|
] });
|
|
15603
16035
|
};
|
|
15604
16036
|
var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
@@ -15606,9 +16038,9 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
15606
16038
|
() => port.derivation ? port.derivation.getDerivation(derivationRunId) : Promise.resolve({ kind: "ok", value: null }),
|
|
15607
16039
|
[port, derivationRunId]
|
|
15608
16040
|
);
|
|
15609
|
-
if (phase.status === "loading") return /* @__PURE__ */ (0,
|
|
16041
|
+
if (phase.status === "loading") return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Rekonstruktionslauf wird geladen \u2026" });
|
|
15610
16042
|
if (phase.status === "error") {
|
|
15611
|
-
return /* @__PURE__ */ (0,
|
|
16043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `eingang-fehler-${runId}`, role: "alert", children: [
|
|
15612
16044
|
"Der Rekonstruktionslauf ",
|
|
15613
16045
|
derivationRunId,
|
|
15614
16046
|
" konnte nicht geladen werden: ",
|
|
@@ -15616,22 +16048,22 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
15616
16048
|
] });
|
|
15617
16049
|
}
|
|
15618
16050
|
if (!phase.value) {
|
|
15619
|
-
return /* @__PURE__ */ (0,
|
|
16051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `eingang-unbekannt-${runId}`, children: [
|
|
15620
16052
|
"Der Rekonstruktionslauf ",
|
|
15621
|
-
/* @__PURE__ */ (0,
|
|
16053
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: derivationRunId }),
|
|
15622
16054
|
" ist in diesem Host nicht auffindbar."
|
|
15623
16055
|
] });
|
|
15624
16056
|
}
|
|
15625
16057
|
const bilder = phase.value.input.images;
|
|
15626
|
-
return /* @__PURE__ */ (0,
|
|
15627
|
-
/* @__PURE__ */ (0,
|
|
16058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { "data-testid": `eingang-bilder-${runId}`, children: [
|
|
16059
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { children: [
|
|
15628
16060
|
"aus Rekonstruktionslauf ",
|
|
15629
|
-
/* @__PURE__ */ (0,
|
|
16061
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: derivationRunId }),
|
|
15630
16062
|
phase.value.input.prompt_text ? " \xB7 mit Referenzprompt" : ""
|
|
15631
16063
|
] }),
|
|
15632
|
-
bilder.length === 0 ? /* @__PURE__ */ (0,
|
|
16064
|
+
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: [
|
|
15633
16065
|
"Upload, nur \xFCber seinen Digest belegt (",
|
|
15634
|
-
/* @__PURE__ */ (0,
|
|
16066
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("code", { children: [
|
|
15635
16067
|
bild.sha256.slice(0, 12),
|
|
15636
16068
|
"\u2026"
|
|
15637
16069
|
] }),
|
|
@@ -15649,113 +16081,177 @@ var BestandsBild = ({ port, mediaRef }) => {
|
|
|
15649
16081
|
() => port.imageLibrary ? port.imageLibrary.resolveImage(mediaRef) : Promise.resolve({ kind: "ok", value: null }),
|
|
15650
16082
|
[port, mediaRef]
|
|
15651
16083
|
);
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
16084
|
+
const quelle = phase.status === "ready" && phase.value ? `data:${phase.value.mime_type};base64,${phase.value.data}` : null;
|
|
16085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `eingangsbild-${mediaRef}`, children: [
|
|
16086
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16087
|
+
Kachel,
|
|
15655
16088
|
{
|
|
15656
|
-
|
|
15657
|
-
alt: `Eingangsbild ${mediaRef}
|
|
16089
|
+
quelle,
|
|
16090
|
+
alt: `Eingangsbild ${mediaRef}`,
|
|
16091
|
+
...phase.status === "error" ? { leerText: "Nicht ladbar" } : {}
|
|
15658
16092
|
}
|
|
15659
16093
|
),
|
|
15660
16094
|
phase.status === "error" && // Verzeichnet, aber nicht lesbar ist etwas anderes als
|
|
15661
16095
|
// unbekannt — der Unterschied gehoert sichtbar.
|
|
15662
|
-
/* @__PURE__ */ (0,
|
|
15663
|
-
/* @__PURE__ */ (0,
|
|
16096
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { "data-testid": `eingangsbild-fehler-${mediaRef}`, children: phase.message }),
|
|
16097
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: mediaRef })
|
|
15664
16098
|
] });
|
|
15665
16099
|
};
|
|
15666
|
-
|
|
15667
|
-
const [
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
);
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
16100
|
+
function useBildQuellen(port, bilder) {
|
|
16101
|
+
const [stand, setStand] = (0, import_react8.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
|
|
16102
|
+
const gehalten = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
|
|
16103
|
+
const gescheitert = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
|
|
16104
|
+
const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
|
|
16105
|
+
(0, import_react8.useEffect)(() => {
|
|
16106
|
+
const bestand = port.imageLibrary;
|
|
16107
|
+
if (!bestand) return void 0;
|
|
16108
|
+
let abgebrochen = false;
|
|
16109
|
+
void (async () => {
|
|
16110
|
+
for (const bild of bilder) {
|
|
16111
|
+
if (abgebrochen) return;
|
|
16112
|
+
if (gehalten.current.has(bild.media_ref) || gescheitert.current.has(bild.media_ref)) continue;
|
|
16113
|
+
const ergebnis = await bestand.resolveImage(bild.media_ref, bild.mime_type ?? null);
|
|
16114
|
+
if (abgebrochen) return;
|
|
16115
|
+
if (ergebnis.kind === "ok" && ergebnis.value) {
|
|
16116
|
+
gehalten.current.set(
|
|
16117
|
+
bild.media_ref,
|
|
16118
|
+
`data:${ergebnis.value.mime_type};base64,${ergebnis.value.data}`
|
|
16119
|
+
);
|
|
16120
|
+
} else if (ergebnis.kind === "error") {
|
|
16121
|
+
gescheitert.current.set(bild.media_ref, ergebnis.message);
|
|
16122
|
+
}
|
|
16123
|
+
setStand({
|
|
16124
|
+
quellen: new Map(gehalten.current),
|
|
16125
|
+
fehler: new Map(gescheitert.current)
|
|
16126
|
+
});
|
|
16127
|
+
}
|
|
16128
|
+
})();
|
|
16129
|
+
return () => {
|
|
16130
|
+
abgebrochen = true;
|
|
16131
|
+
};
|
|
16132
|
+
}, [port, schluessel]);
|
|
16133
|
+
return stand;
|
|
16134
|
+
}
|
|
16135
|
+
var BildDetails = ({ bild, fehler: fehler4, aufloesbar }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "szenen-bilder__meta", "data-testid": `batchbild-${bild.media_ref}`, children: [
|
|
16136
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: bild.media_ref }),
|
|
16137
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16138
|
+
"Position ",
|
|
16139
|
+
bild.position
|
|
16140
|
+
] }),
|
|
16141
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: bild.model || "Modell unbekannt" }),
|
|
16142
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: bild.seed === null || bild.seed === void 0 || bild.seed === -1 ? "ohne Seed" : `Seed ${bild.seed}` }),
|
|
16143
|
+
bild.width && bild.height ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16144
|
+
bild.width,
|
|
16145
|
+
"\xD7",
|
|
16146
|
+
bild.height
|
|
16147
|
+
] }) : null,
|
|
16148
|
+
fehler4 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { "data-testid": `batchbild-fehler-${bild.media_ref}`, children: fehler4 }),
|
|
16149
|
+
!aufloesbar && // Capability-Grenze, kein Fehler: Dieser Host kann Batches lesen,
|
|
16150
|
+
// aber keine Bilder auflösen (E). Kein erfundener Fallback auf eine
|
|
16151
|
+
// Serverroute (A6).
|
|
16152
|
+
/* @__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." })
|
|
16153
|
+
] });
|
|
16154
|
+
var BatchKachel = ({ port, batch }) => {
|
|
16155
|
+
const { quellen, fehler: fehler4 } = useBildQuellen(port, batch.images);
|
|
16156
|
+
const aufloesbar = Boolean(port.imageLibrary);
|
|
16157
|
+
const bilder = batch.images.map((bild) => ({
|
|
16158
|
+
id: bild.media_ref,
|
|
16159
|
+
quelle: quellen.get(bild.media_ref) ?? null,
|
|
16160
|
+
titel: `Bild ${bild.position + 1}`,
|
|
16161
|
+
...fehler4.get(bild.media_ref) ? { leerText: "Nicht ladbar" } : {},
|
|
16162
|
+
details: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16163
|
+
BildDetails,
|
|
15674
16164
|
{
|
|
15675
|
-
|
|
15676
|
-
|
|
16165
|
+
bild,
|
|
16166
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
16167
|
+
aufloesbar
|
|
15677
16168
|
}
|
|
15678
|
-
)
|
|
15679
|
-
|
|
15680
|
-
|
|
15681
|
-
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15695
|
-
bild.width,
|
|
15696
|
-
"\xD7",
|
|
15697
|
-
bild.height
|
|
15698
|
-
] }) : null
|
|
15699
|
-
] });
|
|
15700
|
-
};
|
|
15701
|
-
var BatchKachel = ({ port, batch }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15702
|
-
"div",
|
|
15703
|
-
{
|
|
15704
|
-
className: "szenen-bilder__batch",
|
|
15705
|
-
"data-testid": `batch-${batch.item_id}`,
|
|
15706
|
-
"data-source-kind": batch.source_kind,
|
|
15707
|
-
children: [
|
|
15708
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "szenen-bilder__ids", children: [
|
|
15709
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: batch.title }),
|
|
15710
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: batch.source_kind === "generated_in_app" ? "in der App erzeugt" : "extern importiert" }),
|
|
15711
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
|
|
15712
|
-
"Item ",
|
|
15713
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
16169
|
+
)
|
|
16170
|
+
}));
|
|
16171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16172
|
+
"section",
|
|
16173
|
+
{
|
|
16174
|
+
className: "szenen-bilder__batch",
|
|
16175
|
+
"data-testid": `batch-${batch.item_id}`,
|
|
16176
|
+
"data-source-kind": batch.source_kind,
|
|
16177
|
+
children: [
|
|
16178
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "szenen-bilder__batchkopf", children: [
|
|
16179
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: batch.title }),
|
|
16180
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "szenen-bilder__herkunft", children: [
|
|
16181
|
+
batch.source_kind === "generated_in_app" ? "in der App erzeugt" : "extern importiert",
|
|
16182
|
+
" \xB7 ",
|
|
16183
|
+
batch.images.length,
|
|
16184
|
+
" Bild(er)"
|
|
16185
|
+
] })
|
|
15714
16186
|
] }),
|
|
15715
|
-
/* @__PURE__ */ (0,
|
|
15716
|
-
|
|
15717
|
-
|
|
16187
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16188
|
+
BildGalerie,
|
|
16189
|
+
{
|
|
16190
|
+
bilder,
|
|
16191
|
+
testId: `batchgalerie-${batch.item_id}`,
|
|
16192
|
+
satzTitel: batch.title
|
|
16193
|
+
}
|
|
16194
|
+
),
|
|
16195
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { className: "szenen-bilder__technik", "data-testid": `batch-technik-${batch.item_id}`, children: [
|
|
16196
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: "Technische Details" }),
|
|
16197
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "szenen-bilder__ids", children: [
|
|
16198
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16199
|
+
"Item ",
|
|
16200
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
16201
|
+
] }),
|
|
16202
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16203
|
+
"Batches ",
|
|
16204
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: batch.generation_batch_ids.join(", ") })
|
|
16205
|
+
] })
|
|
16206
|
+
] }),
|
|
16207
|
+
/* @__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)(
|
|
16208
|
+
BildDetails,
|
|
16209
|
+
{
|
|
16210
|
+
bild,
|
|
16211
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
16212
|
+
aufloesbar
|
|
16213
|
+
}
|
|
16214
|
+
) }, bild.media_ref)) })
|
|
15718
16215
|
] })
|
|
15719
|
-
]
|
|
15720
|
-
|
|
15721
|
-
|
|
15722
|
-
|
|
15723
|
-
);
|
|
16216
|
+
]
|
|
16217
|
+
}
|
|
16218
|
+
);
|
|
16219
|
+
};
|
|
15724
16220
|
var ProfilBefunde = ({ wahl, runId }) => {
|
|
15725
16221
|
if (wahl.invalid_profiles.length === 0) return null;
|
|
15726
|
-
return /* @__PURE__ */ (0,
|
|
16222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-profilbefunde-${runId}`, role: "alert", children: [
|
|
15727
16223
|
"Nicht angeboten, weil das Profil unvollst\xE4ndig ist:",
|
|
15728
16224
|
" ",
|
|
15729
16225
|
wahl.invalid_profiles.join(" \xB7 ")
|
|
15730
16226
|
] });
|
|
15731
16227
|
};
|
|
15732
16228
|
var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
15733
|
-
const [modellWahl, setModellWahl] = (0,
|
|
15734
|
-
const [anzahlText, setAnzahlText] = (0,
|
|
15735
|
-
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0,
|
|
15736
|
-
const [laeuft, setLaeuft] = (0,
|
|
15737
|
-
const [notiz, setNotiz] = (0,
|
|
16229
|
+
const [modellWahl, setModellWahl] = (0, import_react8.useState)(null);
|
|
16230
|
+
const [anzahlText, setAnzahlText] = (0, import_react8.useState)("1");
|
|
16231
|
+
const [seitenverhaeltnis, setSeitenverhaeltnis] = (0, import_react8.useState)("");
|
|
16232
|
+
const [laeuft, setLaeuft] = (0, import_react8.useState)(false);
|
|
16233
|
+
const [notiz, setNotiz] = (0, import_react8.useState)(null);
|
|
15738
16234
|
if (!port.imageGeneration) {
|
|
15739
|
-
return /* @__PURE__ */ (0,
|
|
16235
|
+
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." });
|
|
15740
16236
|
}
|
|
15741
16237
|
if (wahlFehler) {
|
|
15742
|
-
return /* @__PURE__ */ (0,
|
|
16238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
15743
16239
|
"Die F\xE4higkeitsauskunft schlug fehl: ",
|
|
15744
16240
|
wahlFehler
|
|
15745
16241
|
] });
|
|
15746
16242
|
}
|
|
15747
|
-
if (!wahl) return /* @__PURE__ */ (0,
|
|
16243
|
+
if (!wahl) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Bildf\xE4higkeit wird gepr\xFCft \u2026" });
|
|
15748
16244
|
if (wahl.models.length === 0) {
|
|
15749
16245
|
return (
|
|
15750
16246
|
// Kein Fehler und kein Grund, den Lauf zu sperren: Der externe
|
|
15751
16247
|
// Importweg bleibt daneben stehen (D-104.5).
|
|
15752
|
-
/* @__PURE__ */ (0,
|
|
15753
|
-
/* @__PURE__ */ (0,
|
|
16248
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16249
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-unsupported-modell-${lauf.run_id}`, children: [
|
|
15754
16250
|
"Hier kann derzeit kein Bild erzeugt werden:",
|
|
15755
16251
|
" ",
|
|
15756
16252
|
wahl.reason ?? "Kein sichtbares Zielmodell tr\xE4gt ein ausf\xFChrbares Profil."
|
|
15757
16253
|
] }),
|
|
15758
|
-
/* @__PURE__ */ (0,
|
|
16254
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ProfilBefunde, { wahl, runId: lauf.run_id })
|
|
15759
16255
|
] })
|
|
15760
16256
|
);
|
|
15761
16257
|
}
|
|
@@ -15804,22 +16300,21 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15804
16300
|
onFertig();
|
|
15805
16301
|
};
|
|
15806
16302
|
const negativVorhanden = Boolean(lauf.output?.negative && lauf.output.negative.trim());
|
|
15807
|
-
return /* @__PURE__ */ (0,
|
|
15808
|
-
/* @__PURE__ */ (0,
|
|
15809
|
-
/* @__PURE__ */ (0,
|
|
15810
|
-
/* @__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: [
|
|
16303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `erzeugen-${lauf.run_id}`, children: [
|
|
16304
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ProfilBefunde, { wahl, runId: lauf.run_id }),
|
|
16305
|
+
/* @__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: [
|
|
15811
16306
|
"Prompt optimiert f\xFCr ",
|
|
15812
|
-
/* @__PURE__ */ (0,
|
|
16307
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: wahl.prompt_target_model_key })
|
|
15813
16308
|
] }) : "Dieser Lauf tr\xE4gt keine Optimierungsabsicht (kein target_model)." }),
|
|
15814
|
-
/* @__PURE__ */ (0,
|
|
16309
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
15815
16310
|
"Bildmodell",
|
|
15816
|
-
/* @__PURE__ */ (0,
|
|
16311
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15817
16312
|
"select",
|
|
15818
16313
|
{
|
|
15819
16314
|
value: aktiv.selection_id,
|
|
15820
16315
|
"data-testid": `erzeugen-modellwahl-${lauf.run_id}`,
|
|
15821
16316
|
onChange: (e) => modellWechseln(e.target.value),
|
|
15822
|
-
children: wahl.models.map((m) => /* @__PURE__ */ (0,
|
|
16317
|
+
children: wahl.models.map((m) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("option", { value: m.selection_id, children: [
|
|
15823
16318
|
m.display_name,
|
|
15824
16319
|
" (",
|
|
15825
16320
|
m.provider,
|
|
@@ -15829,7 +16324,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15829
16324
|
}
|
|
15830
16325
|
)
|
|
15831
16326
|
] }),
|
|
15832
|
-
/* @__PURE__ */ (0,
|
|
16327
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-modell-${lauf.run_id}`, children: [
|
|
15833
16328
|
aktiv.display_name,
|
|
15834
16329
|
" bei ",
|
|
15835
16330
|
aktiv.provider,
|
|
@@ -15838,26 +16333,26 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15838
16333
|
aktiv.max_images,
|
|
15839
16334
|
" Bilder je Auftrag"
|
|
15840
16335
|
] }),
|
|
15841
|
-
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */ (0,
|
|
16336
|
+
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-abweichung-${lauf.run_id}`, children: [
|
|
15842
16337
|
"Hinweis: Prompt optimiert f\xFCr ",
|
|
15843
|
-
/* @__PURE__ */ (0,
|
|
16338
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: wahl.prompt_target_model_key }),
|
|
15844
16339
|
", Bilder werden mit ",
|
|
15845
|
-
/* @__PURE__ */ (0,
|
|
16340
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: aktiv.display_name }),
|
|
15846
16341
|
" erzeugt. Das ist zul\xE4ssig \u2014 ein abweichendes Ergebnis liegt dann nicht zwingend am Prompt."
|
|
15847
16342
|
] }),
|
|
15848
16343
|
negativVorhanden && !aktiv.accepts_negative_prompt && // Nicht still verlieren: Der eingefrorene Lauf trägt einen
|
|
15849
16344
|
// negativen Prompt, den dieser Modellweg nicht führt. Wer das
|
|
15850
16345
|
// weiß, kann ihn in den positiven Prompt einarbeiten — wer es
|
|
15851
16346
|
// nicht weiß, wundert sich über das Bild.
|
|
15852
|
-
/* @__PURE__ */ (0,
|
|
16347
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-negativ-hinweis-${lauf.run_id}`, children: [
|
|
15853
16348
|
"Achtung: Dieser Lauf tr\xE4gt einen negativen Prompt.",
|
|
15854
16349
|
" ",
|
|
15855
16350
|
aktiv.display_name,
|
|
15856
16351
|
" f\xFChrt diesen Promptkanal nicht \u2014 der negative Prompt l\xE4uft nicht mit."
|
|
15857
16352
|
] }),
|
|
15858
|
-
/* @__PURE__ */ (0,
|
|
16353
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
15859
16354
|
"Anzahl",
|
|
15860
|
-
/* @__PURE__ */ (0,
|
|
16355
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15861
16356
|
"input",
|
|
15862
16357
|
{
|
|
15863
16358
|
type: "number",
|
|
@@ -15869,27 +16364,27 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15869
16364
|
}
|
|
15870
16365
|
)
|
|
15871
16366
|
] }),
|
|
15872
|
-
/* @__PURE__ */ (0,
|
|
16367
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
15873
16368
|
"Seitenverh\xE4ltnis",
|
|
15874
|
-
/* @__PURE__ */ (0,
|
|
16369
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
15875
16370
|
"select",
|
|
15876
16371
|
{
|
|
15877
16372
|
value: seitenverhaeltnis,
|
|
15878
16373
|
"data-testid": `erzeugen-format-${lauf.run_id}`,
|
|
15879
16374
|
onChange: (e) => setSeitenverhaeltnis(e.target.value),
|
|
15880
16375
|
children: [
|
|
15881
|
-
/* @__PURE__ */ (0,
|
|
15882
|
-
aktiv.aspect_ratios.map((v) => /* @__PURE__ */ (0,
|
|
16376
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "(Vorgabe des Modells)" }),
|
|
16377
|
+
aktiv.aspect_ratios.map((v) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: v, children: v }, v))
|
|
15883
16378
|
]
|
|
15884
16379
|
}
|
|
15885
16380
|
)
|
|
15886
16381
|
] }),
|
|
15887
|
-
!aktiv.accepts_seed && /* @__PURE__ */ (0,
|
|
16382
|
+
!aktiv.accepts_seed && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `erzeugen-ohne-seed-${lauf.run_id}`, children: [
|
|
15888
16383
|
aktiv.display_name,
|
|
15889
16384
|
" kennt keinen Seed \u2014 er wird deshalb weder angeboten noch protokolliert."
|
|
15890
16385
|
] }),
|
|
15891
|
-
parameterBefunde.length > 0 && /* @__PURE__ */ (0,
|
|
15892
|
-
/* @__PURE__ */ (0,
|
|
16386
|
+
parameterBefunde.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `erzeugen-parameterbefund-${lauf.run_id}`, role: "alert", children: parameterBefunde.join(" ") }),
|
|
16387
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15893
16388
|
"button",
|
|
15894
16389
|
{
|
|
15895
16390
|
type: "button",
|
|
@@ -15899,7 +16394,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15899
16394
|
children: laeuft ? "Bilder werden erzeugt \u2026" : "Bilder erzeugen"
|
|
15900
16395
|
}
|
|
15901
16396
|
),
|
|
15902
|
-
notiz && /* @__PURE__ */ (0,
|
|
16397
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15903
16398
|
"p",
|
|
15904
16399
|
{
|
|
15905
16400
|
"data-testid": `erzeugen-notiz-${lauf.run_id}`,
|
|
@@ -15911,14 +16406,14 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
15911
16406
|
] });
|
|
15912
16407
|
};
|
|
15913
16408
|
var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
15914
|
-
const [dateien, setDateien] = (0,
|
|
15915
|
-
const [seeds, setSeeds] = (0,
|
|
15916
|
-
const [modell, setModell] = (0,
|
|
15917
|
-
const [itemId, setItemId] = (0,
|
|
15918
|
-
const [laeuft, setLaeuft] = (0,
|
|
15919
|
-
const [notiz, setNotiz] = (0,
|
|
16409
|
+
const [dateien, setDateien] = (0, import_react8.useState)([]);
|
|
16410
|
+
const [seeds, setSeeds] = (0, import_react8.useState)({});
|
|
16411
|
+
const [modell, setModell] = (0, import_react8.useState)("");
|
|
16412
|
+
const [itemId, setItemId] = (0, import_react8.useState)("");
|
|
16413
|
+
const [laeuft, setLaeuft] = (0, import_react8.useState)(false);
|
|
16414
|
+
const [notiz, setNotiz] = (0, import_react8.useState)(null);
|
|
15920
16415
|
if (!port.imageBatchWrite) {
|
|
15921
|
-
return /* @__PURE__ */ (0,
|
|
16416
|
+
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." });
|
|
15922
16417
|
}
|
|
15923
16418
|
const importieren = async () => {
|
|
15924
16419
|
setLaeuft(true);
|
|
@@ -15973,11 +16468,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
15973
16468
|
setLaeuft(false);
|
|
15974
16469
|
onFertig();
|
|
15975
16470
|
};
|
|
15976
|
-
return /* @__PURE__ */ (0,
|
|
15977
|
-
/* @__PURE__ */ (0,
|
|
15978
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { children: [
|
|
16471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `zuordnen-${lauf.run_id}`, children: [
|
|
16472
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
15979
16473
|
"Bilddateien",
|
|
15980
|
-
/* @__PURE__ */ (0,
|
|
16474
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15981
16475
|
"input",
|
|
15982
16476
|
{
|
|
15983
16477
|
type: "file",
|
|
@@ -15991,10 +16485,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
15991
16485
|
}
|
|
15992
16486
|
)
|
|
15993
16487
|
] }),
|
|
15994
|
-
dateien.length > 0 && /* @__PURE__ */ (0,
|
|
15995
|
-
/* @__PURE__ */ (0,
|
|
16488
|
+
dateien.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
16489
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
15996
16490
|
"Modell (f\xFCr alle Bilder, leer = unbekannt)",
|
|
15997
|
-
/* @__PURE__ */ (0,
|
|
16491
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15998
16492
|
"input",
|
|
15999
16493
|
{
|
|
16000
16494
|
value: modell,
|
|
@@ -16003,16 +16497,16 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16003
16497
|
}
|
|
16004
16498
|
)
|
|
16005
16499
|
] }),
|
|
16006
|
-
/* @__PURE__ */ (0,
|
|
16007
|
-
/* @__PURE__ */ (0,
|
|
16500
|
+
/* @__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: [
|
|
16501
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { children: [
|
|
16008
16502
|
"Position ",
|
|
16009
16503
|
index,
|
|
16010
16504
|
": ",
|
|
16011
16505
|
datei.name
|
|
16012
16506
|
] }),
|
|
16013
|
-
/* @__PURE__ */ (0,
|
|
16507
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16014
16508
|
"Seed (leer = unbekannt)",
|
|
16015
|
-
/* @__PURE__ */ (0,
|
|
16509
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16016
16510
|
"input",
|
|
16017
16511
|
{
|
|
16018
16512
|
"data-testid": `zuordnen-seed-${lauf.run_id}-${index}`,
|
|
@@ -16022,7 +16516,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16022
16516
|
)
|
|
16023
16517
|
] })
|
|
16024
16518
|
] }, `${datei.name}-${index}`)) }),
|
|
16025
|
-
/* @__PURE__ */ (0,
|
|
16519
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
16026
16520
|
"button",
|
|
16027
16521
|
{
|
|
16028
16522
|
type: "button",
|
|
@@ -16036,9 +16530,9 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16036
16530
|
}
|
|
16037
16531
|
)
|
|
16038
16532
|
] }),
|
|
16039
|
-
/* @__PURE__ */ (0,
|
|
16533
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { children: [
|
|
16040
16534
|
"Oder ein bestehendes Library-Item",
|
|
16041
|
-
/* @__PURE__ */ (0,
|
|
16535
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16042
16536
|
"input",
|
|
16043
16537
|
{
|
|
16044
16538
|
value: itemId,
|
|
@@ -16048,7 +16542,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16048
16542
|
}
|
|
16049
16543
|
)
|
|
16050
16544
|
] }),
|
|
16051
|
-
/* @__PURE__ */ (0,
|
|
16545
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16052
16546
|
"button",
|
|
16053
16547
|
{
|
|
16054
16548
|
type: "button",
|
|
@@ -16058,7 +16552,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
16058
16552
|
children: "Bestehendes Item zuordnen"
|
|
16059
16553
|
}
|
|
16060
16554
|
),
|
|
16061
|
-
notiz && /* @__PURE__ */ (0,
|
|
16555
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
16062
16556
|
"p",
|
|
16063
16557
|
{
|
|
16064
16558
|
"data-testid": `zuordnen-notiz-${lauf.run_id}`,
|
|
@@ -16083,12 +16577,12 @@ function readAsBase64(datei) {
|
|
|
16083
16577
|
}
|
|
16084
16578
|
|
|
16085
16579
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
16086
|
-
var
|
|
16580
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
16087
16581
|
var RunsPanel = ({ port, source, contextId }) => {
|
|
16088
|
-
const [anweisung, setAnweisung] = (0,
|
|
16089
|
-
const [laeuft, setLaeuft] = (0,
|
|
16090
|
-
const [notiz, setNotiz] = (0,
|
|
16091
|
-
const [nachladen, setNachladen] = (0,
|
|
16582
|
+
const [anweisung, setAnweisung] = (0, import_react9.useState)("");
|
|
16583
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
16584
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
16585
|
+
const [nachladen, setNachladen] = (0, import_react9.useState)(0);
|
|
16092
16586
|
const faehig = capabilitiesOf(port);
|
|
16093
16587
|
const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
|
|
16094
16588
|
const [phase, neuLaden] = usePortQuery(
|
|
@@ -16113,12 +16607,15 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
16113
16607
|
neuLaden();
|
|
16114
16608
|
};
|
|
16115
16609
|
const laeufe = phase.status === "ready" ? phase.value : [];
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16119
|
-
|
|
16610
|
+
const [gewaehlteRunde, setGewaehlteRunde] = (0, import_react9.useState)(void 0);
|
|
16611
|
+
const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
|
|
16612
|
+
const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
|
|
16613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs", "data-testid": "laeufe-bereich", "data-shot-version": quellSchluessel, children: [
|
|
16614
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h4", { children: "Prompt-L\xE4ufe" }),
|
|
16615
|
+
source.kind === "published" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs__start", children: [
|
|
16616
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { children: [
|
|
16120
16617
|
"Anweisung (optional)",
|
|
16121
|
-
/* @__PURE__ */ (0,
|
|
16618
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16122
16619
|
"input",
|
|
16123
16620
|
{
|
|
16124
16621
|
"data-testid": "lauf-anweisung",
|
|
@@ -16127,21 +16624,25 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
16127
16624
|
}
|
|
16128
16625
|
)
|
|
16129
16626
|
] }),
|
|
16130
|
-
/* @__PURE__ */ (0,
|
|
16627
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", "data-testid": "lauf-starten", disabled: laeuft, onClick: starten, children: "Prompt-Lauf starten" })
|
|
16131
16628
|
] }),
|
|
16132
|
-
notiz && /* @__PURE__ */ (0,
|
|
16133
|
-
phase.status === "loading" && /* @__PURE__ */ (0,
|
|
16134
|
-
phase.status === "error" && /* @__PURE__ */ (0,
|
|
16629
|
+
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 }),
|
|
16630
|
+
phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": "laeufe-laden", children: "L\xE4ufe werden geladen \u2026" }),
|
|
16631
|
+
phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { "data-testid": "laeufe-fehler", role: "alert", children: [
|
|
16135
16632
|
"L\xE4ufe konnten nicht geladen werden: ",
|
|
16136
16633
|
phase.message
|
|
16137
16634
|
] }),
|
|
16138
|
-
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */ (0,
|
|
16139
|
-
/* @__PURE__ */ (0,
|
|
16635
|
+
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." }),
|
|
16636
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ol", { "data-testid": "runden-liste", children: laeufe.map((lauf) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16140
16637
|
RundenEintrag,
|
|
16141
16638
|
{
|
|
16142
16639
|
port,
|
|
16143
16640
|
lauf,
|
|
16144
16641
|
runde: roundOfRun(lauf, laeufe),
|
|
16642
|
+
offen: lauf.run_id === offeneRunde,
|
|
16643
|
+
onUmschalten: () => setGewaehlteRunde(
|
|
16644
|
+
lauf.run_id === offeneRunde ? null : lauf.run_id
|
|
16645
|
+
),
|
|
16145
16646
|
itemMoeglich: faehig.saveRunAsItem,
|
|
16146
16647
|
onItemGespeichert: () => setNachladen((n) => n + 1)
|
|
16147
16648
|
},
|
|
@@ -16149,13 +16650,43 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
16149
16650
|
)) })
|
|
16150
16651
|
] });
|
|
16151
16652
|
};
|
|
16152
|
-
var
|
|
16153
|
-
|
|
16154
|
-
const
|
|
16155
|
-
|
|
16653
|
+
var AUSZUG = 90;
|
|
16654
|
+
function auszug(text, laenge = AUSZUG) {
|
|
16655
|
+
const sauber = text.replace(/\s+/g, " ").trim();
|
|
16656
|
+
if (sauber.length <= laenge) return sauber;
|
|
16657
|
+
const schnitt = sauber.lastIndexOf(" ", laenge);
|
|
16658
|
+
return `${sauber.slice(0, schnitt > laenge / 2 ? schnitt : laenge)} \u2026`;
|
|
16659
|
+
}
|
|
16660
|
+
var STATUS_TEXT = {
|
|
16661
|
+
succeeded: "erfolgreich",
|
|
16662
|
+
failed: "fehlgeschlagen"
|
|
16663
|
+
};
|
|
16664
|
+
var LANGER_TEXT = 240;
|
|
16665
|
+
var Sekundaertext = ({ titel, text, testId }) => {
|
|
16666
|
+
const [ganz, setGanz] = (0, import_react9.useState)(false);
|
|
16667
|
+
const lang = text.length > LANGER_TEXT;
|
|
16668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
16669
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: titel }),
|
|
16670
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": testId, children: lang && !ganz ? auszug(text, LANGER_TEXT) : text }),
|
|
16671
|
+
lang && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16672
|
+
"button",
|
|
16673
|
+
{
|
|
16674
|
+
type: "button",
|
|
16675
|
+
className: "szenen-runs__mehr",
|
|
16676
|
+
onClick: () => setGanz(!ganz),
|
|
16677
|
+
"data-testid": `${testId}-mehr`,
|
|
16678
|
+
children: ganz ? "weniger anzeigen" : "vollst\xE4ndig anzeigen"
|
|
16679
|
+
}
|
|
16680
|
+
)
|
|
16681
|
+
] });
|
|
16682
|
+
};
|
|
16683
|
+
var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
16684
|
+
const [notiz, setNotiz] = (0, import_react9.useState)(null);
|
|
16685
|
+
const [laeuft, setLaeuft] = (0, import_react9.useState)(false);
|
|
16686
|
+
const [nachladen, setNachladen] = (0, import_react9.useState)(0);
|
|
16156
16687
|
const [itemPhase] = usePortQuery(
|
|
16157
|
-
() => port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
16158
|
-
[port, lauf.run_id, nachladen]
|
|
16688
|
+
() => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
16689
|
+
[port, lauf.run_id, nachladen, offen]
|
|
16159
16690
|
);
|
|
16160
16691
|
const item = itemPhase.status === "ready" ? itemPhase.value : null;
|
|
16161
16692
|
const speichern = async () => {
|
|
@@ -16169,75 +16700,121 @@ var RundenEintrag = ({ port, lauf, runde, itemMoeglich, onItemGespeichert }) =>
|
|
|
16169
16700
|
setNachladen((n) => n + 1);
|
|
16170
16701
|
onItemGespeichert();
|
|
16171
16702
|
};
|
|
16172
|
-
|
|
16173
|
-
|
|
16174
|
-
|
|
16175
|
-
|
|
16176
|
-
|
|
16703
|
+
const zusammenfassung = lauf.status === "succeeded" && lauf.output ? auszug(lauf.output.positive) : null;
|
|
16704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { "data-testid": `runde-${lauf.run_id}`, "data-runde": runde, "data-status": lauf.status, children: [
|
|
16705
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
16706
|
+
"button",
|
|
16707
|
+
{
|
|
16708
|
+
type: "button",
|
|
16709
|
+
className: "szenen-runs__kopf",
|
|
16710
|
+
onClick: onUmschalten,
|
|
16711
|
+
"aria-expanded": offen,
|
|
16712
|
+
"data-testid": `runde-umschalten-${lauf.run_id}`,
|
|
16713
|
+
children: [
|
|
16714
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "szenen-runs__marke", children: [
|
|
16715
|
+
"Runde ",
|
|
16716
|
+
runde
|
|
16717
|
+
] }),
|
|
16718
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16719
|
+
"span",
|
|
16720
|
+
{
|
|
16721
|
+
className: "szenen-runs__status",
|
|
16722
|
+
"data-status": lauf.status,
|
|
16723
|
+
"data-testid": `status-${lauf.run_id}`,
|
|
16724
|
+
children: STATUS_TEXT[lauf.status]
|
|
16725
|
+
}
|
|
16726
|
+
),
|
|
16727
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "szenen-runs__modell", "data-testid": `provider-${lauf.run_id}`, children: [
|
|
16728
|
+
lauf.provider,
|
|
16729
|
+
" \xB7 ",
|
|
16730
|
+
lauf.model_id
|
|
16731
|
+
] }),
|
|
16732
|
+
zusammenfassung && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16733
|
+
"span",
|
|
16734
|
+
{
|
|
16735
|
+
className: "szenen-runs__auszug",
|
|
16736
|
+
"data-testid": `auszug-${lauf.run_id}`,
|
|
16737
|
+
children: zusammenfassung
|
|
16738
|
+
}
|
|
16739
|
+
)
|
|
16740
|
+
]
|
|
16741
|
+
}
|
|
16742
|
+
),
|
|
16743
|
+
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: [
|
|
16744
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("strong", { children: [
|
|
16745
|
+
"Fehlgeschlagen \u2014 ",
|
|
16746
|
+
lauf.failure.class
|
|
16177
16747
|
] }),
|
|
16178
|
-
/* @__PURE__ */ (0,
|
|
16179
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-testid": `status-${lauf.run_id}`, children: lauf.status }),
|
|
16180
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { "data-testid": `provider-${lauf.run_id}`, children: [
|
|
16181
|
-
lauf.provider,
|
|
16182
|
-
" \xB7 ",
|
|
16183
|
-
lauf.model_id
|
|
16184
|
-
] })
|
|
16748
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { children: lauf.failure.message })
|
|
16185
16749
|
] }),
|
|
16186
|
-
|
|
16187
|
-
/* @__PURE__ */ (0,
|
|
16188
|
-
/* @__PURE__ */ (0,
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
/* @__PURE__ */ (0,
|
|
16193
|
-
|
|
16750
|
+
offen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "szenen-runs__inhalt", "data-testid": `runde-inhalt-${lauf.run_id}`, children: [
|
|
16751
|
+
lauf.status === "succeeded" && lauf.output && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { "data-testid": `ausgabe-${lauf.run_id}`, children: [
|
|
16752
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__prompt", children: [
|
|
16753
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: "Positiver Prompt" }),
|
|
16754
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `positiv-${lauf.run_id}`, children: lauf.output.positive })
|
|
16755
|
+
] }),
|
|
16756
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__prompt szenen-runs__prompt--negativ", children: [
|
|
16757
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: "Negativer Prompt" }),
|
|
16758
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `negativ-${lauf.run_id}`, children: lauf.output.negative ?? "(keiner)" })
|
|
16759
|
+
] }),
|
|
16760
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
16761
|
+
Sekundaertext,
|
|
16762
|
+
{
|
|
16763
|
+
titel: "Erl\xE4uterung",
|
|
16764
|
+
text: lauf.output.feedback,
|
|
16765
|
+
testId: `feedback-${lauf.run_id}`
|
|
16766
|
+
}
|
|
16767
|
+
),
|
|
16768
|
+
lauf.output.visibility.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "szenen-runs__sekundaer", children: [
|
|
16769
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { children: "Annahmen" }),
|
|
16770
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { "data-testid": `annahmen-${lauf.run_id}`, children: lauf.output.visibility.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: a }, i)) })
|
|
16771
|
+
] }),
|
|
16772
|
+
lauf.output.notes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { className: "szenen-runs__notizen", "data-testid": `notizen-${lauf.run_id}`, children: lauf.output.notes.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: n }, i)) })
|
|
16194
16773
|
] }),
|
|
16195
|
-
/* @__PURE__ */ (0,
|
|
16196
|
-
/* @__PURE__ */ (0,
|
|
16197
|
-
/* @__PURE__ */ (0,
|
|
16774
|
+
lauf.raw_output && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("details", { "data-testid": `diagnose-${lauf.run_id}`, children: [
|
|
16775
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("summary", { children: "Rohantwort (Diagnose)" }),
|
|
16776
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("pre", { children: lauf.raw_output })
|
|
16198
16777
|
] }),
|
|
16199
|
-
|
|
16200
|
-
/* @__PURE__ */ (0,
|
|
16201
|
-
/* @__PURE__ */ (0,
|
|
16778
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("details", { className: "szenen-runs__technisch", "data-testid": `technisch-${lauf.run_id}`, children: [
|
|
16779
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("summary", { children: "Technische Informationen" }),
|
|
16780
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { children: [
|
|
16781
|
+
"Lauf-ID: ",
|
|
16782
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { "data-testid": `run-id-${lauf.run_id}`, children: lauf.run_id })
|
|
16783
|
+
] }),
|
|
16784
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { children: [
|
|
16785
|
+
"Modell: ",
|
|
16786
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: lauf.model_id }),
|
|
16787
|
+
" bei ",
|
|
16788
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: lauf.provider })
|
|
16789
|
+
] }),
|
|
16790
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { children: [
|
|
16791
|
+
"erzeugt: ",
|
|
16792
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: lauf.created_at })
|
|
16793
|
+
] })
|
|
16202
16794
|
] }),
|
|
16203
|
-
lauf.
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
"Fehlgeschlagen \u2014 ",
|
|
16208
|
-
lauf.failure.class
|
|
16795
|
+
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" }),
|
|
16796
|
+
item && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
16797
|
+
"Bereits als Item gespeichert: ",
|
|
16798
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: item.itemId })
|
|
16209
16799
|
] }),
|
|
16210
|
-
/* @__PURE__ */ (0,
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: "Rohantwort (Diagnose)" }),
|
|
16214
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { children: lauf.raw_output })
|
|
16215
|
-
] }),
|
|
16216
|
-
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" }),
|
|
16217
|
-
item && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
16218
|
-
"Bereits als Item gespeichert: ",
|
|
16219
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: item.itemId })
|
|
16220
|
-
] }),
|
|
16221
|
-
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." }),
|
|
16222
|
-
notiz && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
16223
|
-
lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("details", { "data-testid": `bilder-bereich-${lauf.run_id}`, children: [
|
|
16224
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("summary", { children: "Bilder zu diesem Lauf" }),
|
|
16225
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RunImagesPanel, { port, lauf })
|
|
16800
|
+
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." }),
|
|
16801
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
16802
|
+
lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RunImagesPanel, { port, lauf })
|
|
16226
16803
|
] })
|
|
16227
16804
|
] });
|
|
16228
16805
|
};
|
|
16229
16806
|
|
|
16230
16807
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
16231
|
-
var
|
|
16808
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
16232
16809
|
var STRUKTURELL_BEDIENT = {
|
|
16233
16810
|
scene: ["nodes", "relations"]
|
|
16234
16811
|
};
|
|
16235
16812
|
var AbgeleitetesBildmodell = ({ schluessel }) => {
|
|
16236
16813
|
if (!schluessel) return null;
|
|
16237
|
-
return /* @__PURE__ */ (0,
|
|
16238
|
-
/* @__PURE__ */ (0,
|
|
16239
|
-
/* @__PURE__ */ (0,
|
|
16240
|
-
/* @__PURE__ */ (0,
|
|
16814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "szenen-detail__derived", "data-testid": "abgeleitetes-bildmodell", children: [
|
|
16815
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { children: "Bildgenerierung \u2014 wo das Modell entschieden wird" }),
|
|
16816
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "bildmodell-hinweis", children: [
|
|
16817
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: schluessel }),
|
|
16241
16818
|
" 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)."
|
|
16242
16819
|
] })
|
|
16243
16820
|
] });
|
|
@@ -16249,43 +16826,43 @@ var ElementDetail = ({
|
|
|
16249
16826
|
author,
|
|
16250
16827
|
onChanged
|
|
16251
16828
|
}) => {
|
|
16252
|
-
const [nachladen, setNachladen] = (0,
|
|
16829
|
+
const [nachladen, setNachladen] = (0, import_react10.useState)(0);
|
|
16253
16830
|
const [phase] = usePortQuery(
|
|
16254
16831
|
() => port.elements.getElement(elementId),
|
|
16255
16832
|
[port, elementId, nachladen]
|
|
16256
16833
|
);
|
|
16257
|
-
const [entwurf, setEntwurf] = (0,
|
|
16258
|
-
const [notiz, setNotiz] = (0,
|
|
16259
|
-
const [laeuft, setLaeuft] = (0,
|
|
16260
|
-
const [wahl, setWahl] = (0,
|
|
16261
|
-
const [basiswechsel, setBasiswechsel] = (0,
|
|
16834
|
+
const [entwurf, setEntwurf] = (0, import_react10.useState)({});
|
|
16835
|
+
const [notiz, setNotiz] = (0, import_react10.useState)(null);
|
|
16836
|
+
const [laeuft, setLaeuft] = (0, import_react10.useState)(false);
|
|
16837
|
+
const [wahl, setWahl] = (0, import_react10.useState)(null);
|
|
16838
|
+
const [basiswechsel, setBasiswechsel] = (0, import_react10.useState)(null);
|
|
16262
16839
|
const [kettenPhase] = usePortQuery(
|
|
16263
16840
|
() => port.context.chainFor(contextId),
|
|
16264
16841
|
[port, contextId]
|
|
16265
16842
|
);
|
|
16266
|
-
const kontextkette = (0,
|
|
16843
|
+
const kontextkette = (0, import_react10.useMemo)(() => {
|
|
16267
16844
|
if (kettenPhase.status === "ready") return { status: "ready", chain: kettenPhase.value };
|
|
16268
16845
|
if (kettenPhase.status === "error") return { status: "error", message: kettenPhase.message };
|
|
16269
16846
|
return { status: "loading" };
|
|
16270
16847
|
}, [kettenPhase]);
|
|
16271
16848
|
const kette = kontextkette.status === "ready" ? kontextkette.chain : null;
|
|
16272
16849
|
const schnappschuss = phase.status === "ready" ? phase.value : null;
|
|
16273
|
-
const kopfErgebnis = (0,
|
|
16850
|
+
const kopfErgebnis = (0, import_react10.useMemo)(
|
|
16274
16851
|
() => schnappschuss && kette ? effectivePreferredHeadSafe(schnappschuss, kette) : null,
|
|
16275
16852
|
[schnappschuss, kette]
|
|
16276
16853
|
);
|
|
16277
16854
|
const kopfAufloesung = resolutionOf(kopfErgebnis);
|
|
16278
16855
|
const bevorzugteVersion = selectedHeadVersionId(kopfAufloesung);
|
|
16279
|
-
const felder = (0,
|
|
16856
|
+
const felder = (0, import_react10.useMemo)(
|
|
16280
16857
|
() => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
|
|
16281
16858
|
[schnappschuss?.element.type]
|
|
16282
16859
|
);
|
|
16283
|
-
(0,
|
|
16860
|
+
(0, import_react10.useEffect)(() => {
|
|
16284
16861
|
setWahl(null);
|
|
16285
16862
|
setBasiswechsel(null);
|
|
16286
16863
|
setNotiz(null);
|
|
16287
16864
|
}, [elementId]);
|
|
16288
|
-
const automatisch = (0,
|
|
16865
|
+
const automatisch = (0, import_react10.useMemo)(() => {
|
|
16289
16866
|
if (!schnappschuss) return { kind: "keiner" };
|
|
16290
16867
|
if (schnappschuss.draft) return { kind: "draft" };
|
|
16291
16868
|
if (bevorzugteVersion) return { kind: "version", versionId: bevorzugteVersion };
|
|
@@ -16295,14 +16872,14 @@ var ElementDetail = ({
|
|
|
16295
16872
|
if (schnappschuss.versions.length === 0) return { kind: "draft" };
|
|
16296
16873
|
return { kind: "keiner" };
|
|
16297
16874
|
}, [schnappschuss, bevorzugteVersion]);
|
|
16298
|
-
const angezeigt = (0,
|
|
16875
|
+
const angezeigt = (0, import_react10.useMemo)(() => {
|
|
16299
16876
|
if (!wahl) return automatisch;
|
|
16300
16877
|
if (wahl.kind === "version" && !schnappschuss?.versions.some((v) => v.version_id === wahl.versionId)) {
|
|
16301
16878
|
return automatisch;
|
|
16302
16879
|
}
|
|
16303
16880
|
return wahl;
|
|
16304
16881
|
}, [wahl, automatisch, schnappschuss]);
|
|
16305
|
-
const angezeigtePayload = (0,
|
|
16882
|
+
const angezeigtePayload = (0, import_react10.useMemo)(() => {
|
|
16306
16883
|
if (!schnappschuss) return {};
|
|
16307
16884
|
if (angezeigt.kind === "draft") return schnappschuss.draft?.payload ?? {};
|
|
16308
16885
|
if (angezeigt.kind === "version") {
|
|
@@ -16311,7 +16888,7 @@ var ElementDetail = ({
|
|
|
16311
16888
|
return {};
|
|
16312
16889
|
}, [schnappschuss, angezeigt]);
|
|
16313
16890
|
const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
|
|
16314
|
-
(0,
|
|
16891
|
+
(0, import_react10.useEffect)(() => {
|
|
16315
16892
|
if (!schnappschuss) return;
|
|
16316
16893
|
setEntwurf(formFromPayload(felder, angezeigtePayload));
|
|
16317
16894
|
}, [
|
|
@@ -16324,7 +16901,7 @@ var ElementDetail = ({
|
|
|
16324
16901
|
const bearbeitbar = angezeigt.kind === "draft";
|
|
16325
16902
|
const setzeFeld = (pfad, wert) => setEntwurf((vorher) => ({ ...vorher, [pfad]: wert }));
|
|
16326
16903
|
const payloadAusFormular = () => payloadFromForm(felder, entwurf);
|
|
16327
|
-
const strukturPayload = (0,
|
|
16904
|
+
const strukturPayload = (0, import_react10.useMemo)(() => {
|
|
16328
16905
|
const lies = (name) => {
|
|
16329
16906
|
try {
|
|
16330
16907
|
const roh = JSON.parse(entwurf[name] || "[]");
|
|
@@ -16335,19 +16912,19 @@ var ElementDetail = ({
|
|
|
16335
16912
|
};
|
|
16336
16913
|
return { nodes: lies("nodes"), relations: lies("relations") };
|
|
16337
16914
|
}, [entwurf.nodes, entwurf.relations]);
|
|
16338
|
-
const kettenfeld = (0,
|
|
16915
|
+
const kettenfeld = (0, import_react10.useMemo)(() => {
|
|
16339
16916
|
const kette2 = schnappschuss?.draft?.chain;
|
|
16340
16917
|
if (!kette2) return null;
|
|
16341
16918
|
return kette2.links[0]?.field ?? null;
|
|
16342
16919
|
}, [schnappschuss?.draft?.chain]);
|
|
16343
|
-
const laufStand = (0,
|
|
16920
|
+
const laufStand = (0, import_react10.useMemo)(() => {
|
|
16344
16921
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
16345
16922
|
if (schnappschuss.draft) return schnappschuss.draft.payload;
|
|
16346
16923
|
const kopf = usableHeadVersionId(kopfAufloesung);
|
|
16347
16924
|
if (!kopf) return null;
|
|
16348
16925
|
return schnappschuss.versions.find((v) => v.version_id === kopf)?.payload ?? null;
|
|
16349
16926
|
}, [schnappschuss, kopfAufloesung]);
|
|
16350
|
-
const szenenBlocker = (0,
|
|
16927
|
+
const szenenBlocker = (0, import_react10.useMemo)(() => {
|
|
16351
16928
|
if (!schnappschuss || schnappschuss.element.type !== "scene") return null;
|
|
16352
16929
|
if (laufStand === null) {
|
|
16353
16930
|
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.";
|
|
@@ -16357,7 +16934,7 @@ var ElementDetail = ({
|
|
|
16357
16934
|
const grund = flag.reasons[0];
|
|
16358
16935
|
return grund && "message" in grund ? grund.message : "Kein Lauf moeglich.";
|
|
16359
16936
|
}, [schnappschuss, laufStand]);
|
|
16360
|
-
const vorschau = (0,
|
|
16937
|
+
const vorschau = (0, import_react10.useMemo)(() => {
|
|
16361
16938
|
if (!schnappschuss) return null;
|
|
16362
16939
|
try {
|
|
16363
16940
|
const roh = validatePayload(schnappschuss.element.type, payloadAusFormular());
|
|
@@ -16370,9 +16947,9 @@ var ElementDetail = ({
|
|
|
16370
16947
|
return { valid: false, errors: [{ instancePath: "", message: String(e) }] };
|
|
16371
16948
|
}
|
|
16372
16949
|
}, [entwurf, felder, schnappschuss?.element.type, kettenfeld]);
|
|
16373
|
-
if (phase.status === "loading") return /* @__PURE__ */ (0,
|
|
16950
|
+
if (phase.status === "loading") return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { "data-testid": "element-laden", children: "Element wird geladen \u2026" });
|
|
16374
16951
|
if (phase.status === "error") {
|
|
16375
|
-
return /* @__PURE__ */ (0,
|
|
16952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "element-fehler", role: "alert", children: [
|
|
16376
16953
|
"Element ",
|
|
16377
16954
|
elementId,
|
|
16378
16955
|
" konnte nicht geladen werden: ",
|
|
@@ -16380,7 +16957,7 @@ var ElementDetail = ({
|
|
|
16380
16957
|
] });
|
|
16381
16958
|
}
|
|
16382
16959
|
if (!schnappschuss) {
|
|
16383
|
-
return /* @__PURE__ */ (0,
|
|
16960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "element-unbekannt", children: [
|
|
16384
16961
|
"Element ",
|
|
16385
16962
|
elementId,
|
|
16386
16963
|
" ist unbekannt."
|
|
@@ -16486,28 +17063,28 @@ var ElementDetail = ({
|
|
|
16486
17063
|
formular: entwurf
|
|
16487
17064
|
};
|
|
16488
17065
|
const laufVersionId = angezeigt.kind === "version" ? angezeigt.versionId : usableHeadVersionId(kopfAufloesung);
|
|
16489
|
-
return /* @__PURE__ */ (0,
|
|
16490
|
-
/* @__PURE__ */ (0,
|
|
16491
|
-
/* @__PURE__ */ (0,
|
|
16492
|
-
/* @__PURE__ */ (0,
|
|
16493
|
-
/* @__PURE__ */ (0,
|
|
16494
|
-
schnappschuss.element.retired && /* @__PURE__ */ (0,
|
|
17066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "szenen-detail", "data-testid": "element-detail", "data-element-id": elementId, children: [
|
|
17067
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("header", { children: [
|
|
17068
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { children: schnappschuss.metadata?.title ?? "(ohne Titel)" }),
|
|
17069
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "szenen-detail__ids", children: [
|
|
17070
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { "data-testid": "element-typ", children: elementTypLabel(typ) }),
|
|
17071
|
+
schnappschuss.element.retired && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { "data-testid": "ist-stillgelegt", children: "stillgelegt" })
|
|
16495
17072
|
] })
|
|
16496
17073
|
] }),
|
|
16497
|
-
kontextkette.status === "error" && /* @__PURE__ */ (0,
|
|
17074
|
+
kontextkette.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { role: "alert", "data-testid": "kontextkette-fehler", className: "szenen-detail__hint", children: [
|
|
16498
17075
|
"Die Kontextkette konnte nicht gelesen werden: ",
|
|
16499
17076
|
kontextkette.message,
|
|
16500
17077
|
". Solange das so ist, lassen sich weder der bevorzugte Kopf noch die ausw\xE4hlbaren Referenzen bestimmen \u2014 sie sind ",
|
|
16501
|
-
/* @__PURE__ */ (0,
|
|
17078
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "unbekannt" }),
|
|
16502
17079
|
", nicht leer."
|
|
16503
17080
|
] }),
|
|
16504
|
-
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */ (0,
|
|
17081
|
+
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { role: "alert", "data-testid": "versionsgraph-fehler", className: "szenen-detail__hint", children: [
|
|
16505
17082
|
"Der Versionsgraph dieses Elements ist nicht aufbaubar:",
|
|
16506
17083
|
" ",
|
|
16507
17084
|
kopfErgebnis.message,
|
|
16508
17085
|
". Die Versionen bleiben einzeln anzeigbar; ein bevorzugter Kopf l\xE4sst sich daraus nicht ableiten."
|
|
16509
17086
|
] }),
|
|
16510
|
-
/* @__PURE__ */ (0,
|
|
17087
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16511
17088
|
VersionNavigator,
|
|
16512
17089
|
{
|
|
16513
17090
|
versions: schnappschuss.versions,
|
|
@@ -16530,22 +17107,22 @@ var ElementDetail = ({
|
|
|
16530
17107
|
}
|
|
16531
17108
|
}
|
|
16532
17109
|
),
|
|
16533
|
-
basiswechsel && draft && /* @__PURE__ */ (0,
|
|
16534
|
-
/* @__PURE__ */ (0,
|
|
17110
|
+
basiswechsel && draft && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "szenen-detail__confirm", "data-testid": "basiswechsel-bestaetigung", role: "alertdialog", children: [
|
|
17111
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16535
17112
|
"Es gibt bereits einen Entwurf (Revision ",
|
|
16536
17113
|
draft.revision,
|
|
16537
|
-
draft.base_version_id ? /* @__PURE__ */ (0,
|
|
17114
|
+
draft.base_version_id ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
16538
17115
|
" auf Basis ",
|
|
16539
|
-
/* @__PURE__ */ (0,
|
|
16540
|
-
] }) : /* @__PURE__ */ (0,
|
|
17116
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: draft.base_version_id })
|
|
17117
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: " ohne Basis" }),
|
|
16541
17118
|
"). Ihn auf Version ",
|
|
16542
|
-
/* @__PURE__ */ (0,
|
|
17119
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: basiswechsel }),
|
|
16543
17120
|
" neu aufzusetzen",
|
|
16544
17121
|
" ",
|
|
16545
|
-
/* @__PURE__ */ (0,
|
|
17122
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "ersetzt seinen Inhalt" }),
|
|
16546
17123
|
" durch die Payload dieser Version."
|
|
16547
17124
|
] }),
|
|
16548
|
-
/* @__PURE__ */ (0,
|
|
17125
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16549
17126
|
"button",
|
|
16550
17127
|
{
|
|
16551
17128
|
type: "button",
|
|
@@ -16557,7 +17134,7 @@ var ElementDetail = ({
|
|
|
16557
17134
|
children: "Entwurf auf diese Version neu aufsetzen"
|
|
16558
17135
|
}
|
|
16559
17136
|
),
|
|
16560
|
-
/* @__PURE__ */ (0,
|
|
17137
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16561
17138
|
"button",
|
|
16562
17139
|
{
|
|
16563
17140
|
type: "button",
|
|
@@ -16568,26 +17145,26 @@ var ElementDetail = ({
|
|
|
16568
17145
|
}
|
|
16569
17146
|
)
|
|
16570
17147
|
] }),
|
|
16571
|
-
/* @__PURE__ */ (0,
|
|
16572
|
-
/* @__PURE__ */ (0,
|
|
17148
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "szenen-detail__draft", "data-testid": "draft-bereich", children: [
|
|
17149
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { children: bearbeitbar ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
16573
17150
|
"Entwurf",
|
|
16574
|
-
draft && /* @__PURE__ */ (0,
|
|
17151
|
+
draft && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
|
|
16575
17152
|
" \xB7 Revision ",
|
|
16576
17153
|
draft.revision
|
|
16577
17154
|
] })
|
|
16578
|
-
] }) : /* @__PURE__ */ (0,
|
|
16579
|
-
angezeigt.kind === "keiner" && /* @__PURE__ */ (0,
|
|
17155
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: "Ver\xF6ffentlichte Version \u2014 nur Ansicht" }) }),
|
|
17156
|
+
angezeigt.kind === "keiner" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "nichts-angezeigt", children: [
|
|
16580
17157
|
"Es ist kein Stand ausgew\xE4hlt. Oben eine Version anzeigen oder \xFCber ",
|
|
16581
|
-
/* @__PURE__ */ (0,
|
|
17158
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "als Grundlage bearbeiten" }),
|
|
16582
17159
|
" einen Entwurf beginnen."
|
|
16583
17160
|
] }),
|
|
16584
|
-
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */ (0,
|
|
17161
|
+
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "nur-ansicht", className: "szenen-detail__hint", children: [
|
|
16585
17162
|
"Ver\xF6ffentlichte Versionen sind unver\xE4nderlich (D-02). Zum Bearbeiten oben ",
|
|
16586
|
-
/* @__PURE__ */ (0,
|
|
17163
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "als Grundlage bearbeiten" }),
|
|
16587
17164
|
" w\xE4hlen \u2014 das erzeugt einen Entwurf mit genau dieser Version als Basis."
|
|
16588
17165
|
] }),
|
|
16589
|
-
angezeigt.kind !== "keiner" && /* @__PURE__ */ (0,
|
|
16590
|
-
typ === "scene" && /* @__PURE__ */ (0,
|
|
17166
|
+
angezeigt.kind !== "keiner" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
17167
|
+
typ === "scene" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16591
17168
|
SceneEditor,
|
|
16592
17169
|
{
|
|
16593
17170
|
port,
|
|
@@ -16601,57 +17178,57 @@ var ElementDetail = ({
|
|
|
16601
17178
|
}))
|
|
16602
17179
|
}
|
|
16603
17180
|
),
|
|
16604
|
-
felder.length === 0 && /* @__PURE__ */ (0,
|
|
17181
|
+
felder.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "kein-schema", children: [
|
|
16605
17182
|
"F\xFCr den Typ ",
|
|
16606
17183
|
typ,
|
|
16607
17184
|
" liegt kein Payload-Schema vor."
|
|
16608
17185
|
] }),
|
|
16609
|
-
primaer.map((feld) => /* @__PURE__ */ (0,
|
|
16610
|
-
advanced.length > 0 && /* @__PURE__ */ (0,
|
|
16611
|
-
/* @__PURE__ */ (0,
|
|
17186
|
+
primaer.map((feld) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SchemaFieldRow, { ...feldProps, feld }, feld.path)),
|
|
17187
|
+
advanced.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("details", { className: "szenen-detail__technical", "data-testid": "technische-felder", children: [
|
|
17188
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("summary", { children: [
|
|
16612
17189
|
"Technische Felder / JSON (",
|
|
16613
17190
|
advanced.length,
|
|
16614
17191
|
")"
|
|
16615
17192
|
] }),
|
|
16616
|
-
advanced.map((feld) => /* @__PURE__ */ (0,
|
|
17193
|
+
advanced.map((feld) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SchemaFieldRow, { ...feldProps, feld }, feld.path))
|
|
16617
17194
|
] }),
|
|
16618
|
-
/* @__PURE__ */ (0,
|
|
16619
|
-
/* @__PURE__ */ (0,
|
|
16620
|
-
/* @__PURE__ */ (0,
|
|
17195
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("details", { className: "szenen-detail__technical", "data-testid": "technische-informationen", children: [
|
|
17196
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("summary", { children: "Technische Informationen" }),
|
|
17197
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16621
17198
|
"Element-ID: ",
|
|
16622
|
-
/* @__PURE__ */ (0,
|
|
17199
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: schnappschuss.element.element_id })
|
|
16623
17200
|
] }),
|
|
16624
|
-
/* @__PURE__ */ (0,
|
|
17201
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16625
17202
|
"angezeigter Stand:",
|
|
16626
17203
|
" ",
|
|
16627
|
-
/* @__PURE__ */ (0,
|
|
17204
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { "data-testid": "angezeigter-stand", children: angezeigt.kind === "version" ? angezeigt.versionId : "Entwurf" })
|
|
16628
17205
|
] }),
|
|
16629
|
-
draft && /* @__PURE__ */ (0,
|
|
17206
|
+
draft && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
16630
17207
|
"Basis des Entwurfs:",
|
|
16631
17208
|
" ",
|
|
16632
|
-
/* @__PURE__ */ (0,
|
|
17209
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: draft.base_version_id ?? "(keine)" })
|
|
16633
17210
|
] })
|
|
16634
17211
|
] })
|
|
16635
17212
|
] }),
|
|
16636
|
-
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */ (0,
|
|
17213
|
+
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: [
|
|
16637
17214
|
f.instancePath || "/",
|
|
16638
17215
|
": ",
|
|
16639
17216
|
f.message
|
|
16640
17217
|
] }, i)) }),
|
|
16641
|
-
kettenfeld && /* @__PURE__ */ (0,
|
|
17218
|
+
kettenfeld && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { "data-testid": "kettenfeld-hinweis", className: "szenen-detail__hint", children: [
|
|
16642
17219
|
"Der Verweis ",
|
|
16643
|
-
/* @__PURE__ */ (0,
|
|
17220
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", { children: kettenfeld }),
|
|
16644
17221
|
" steht in den Kettenmetadaten, nicht in der Payload (D-96) \u2014 f\xFCr den Prompt-Lauf aus der Kette gen\xFCgt das. Zum",
|
|
16645
17222
|
" ",
|
|
16646
|
-
/* @__PURE__ */ (0,
|
|
17223
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: "Ver\xF6ffentlichen" }),
|
|
16647
17224
|
" muss er als regul\xE4re Referenz auf eine ver\xF6ffentlichte Version gesetzt werden."
|
|
16648
17225
|
] }),
|
|
16649
|
-
bearbeitbar && /* @__PURE__ */ (0,
|
|
16650
|
-
/* @__PURE__ */ (0,
|
|
16651
|
-
/* @__PURE__ */ (0,
|
|
17226
|
+
bearbeitbar && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "szenen-detail__actions", children: [
|
|
17227
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", "data-testid": "draft-speichern", disabled: laeuft, onClick: speichern, children: "Entwurf speichern" }),
|
|
17228
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { type: "button", "data-testid": "veroeffentlichen", disabled: laeuft, onClick: veroeffentlichen, children: "ver\xF6ffentlichen" })
|
|
16652
17229
|
] })
|
|
16653
17230
|
] }),
|
|
16654
|
-
typ === "target_model" && /* @__PURE__ */ (0,
|
|
17231
|
+
typ === "target_model" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16655
17232
|
AbgeleitetesBildmodell,
|
|
16656
17233
|
{
|
|
16657
17234
|
schluessel: (() => {
|
|
@@ -16666,8 +17243,8 @@ var ElementDetail = ({
|
|
|
16666
17243
|
// einer Draft-Kette, fuehrt der Weg ueber das Einfrieren —
|
|
16667
17244
|
// der alte Satz „setzen eine veroeffentlichte Version
|
|
16668
17245
|
// voraus" gilt nur noch fuer den Einzel-Shot.
|
|
16669
|
-
draft?.chain ? /* @__PURE__ */ (0,
|
|
16670
|
-
/* @__PURE__ */ (0,
|
|
17246
|
+
draft?.chain ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
17247
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16671
17248
|
PromptStartAction,
|
|
16672
17249
|
{
|
|
16673
17250
|
port,
|
|
@@ -16677,7 +17254,7 @@ var ElementDetail = ({
|
|
|
16677
17254
|
}
|
|
16678
17255
|
}
|
|
16679
17256
|
),
|
|
16680
|
-
/* @__PURE__ */ (0,
|
|
17257
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16681
17258
|
RunsPanel,
|
|
16682
17259
|
{
|
|
16683
17260
|
port,
|
|
@@ -16685,17 +17262,17 @@ var ElementDetail = ({
|
|
|
16685
17262
|
source: { kind: "draft_chain", chainId: draft.chain.chain_id }
|
|
16686
17263
|
}
|
|
16687
17264
|
)
|
|
16688
|
-
] }) : /* @__PURE__ */ (0,
|
|
16689
|
-
) : laufVersionId ? /* @__PURE__ */ (0,
|
|
17265
|
+
] }) : /* @__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." })
|
|
17266
|
+
) : laufVersionId ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16690
17267
|
RunsPanel,
|
|
16691
17268
|
{
|
|
16692
17269
|
port,
|
|
16693
17270
|
contextId,
|
|
16694
17271
|
source: { kind: "published", shotVersionId: laufVersionId }
|
|
16695
17272
|
}
|
|
16696
|
-
) : /* @__PURE__ */ (0,
|
|
16697
|
-
typ === "scene" && /* @__PURE__ */ (0,
|
|
16698
|
-
/* @__PURE__ */ (0,
|
|
17273
|
+
) : /* @__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." })),
|
|
17274
|
+
typ === "scene" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
17275
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16699
17276
|
PromptStartAction,
|
|
16700
17277
|
{
|
|
16701
17278
|
port,
|
|
@@ -16709,7 +17286,7 @@ var ElementDetail = ({
|
|
|
16709
17286
|
onLauf: () => setNachladen((n) => n + 1)
|
|
16710
17287
|
}
|
|
16711
17288
|
),
|
|
16712
|
-
/* @__PURE__ */ (0,
|
|
17289
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16713
17290
|
RunsPanel,
|
|
16714
17291
|
{
|
|
16715
17292
|
port,
|
|
@@ -16718,7 +17295,7 @@ var ElementDetail = ({
|
|
|
16718
17295
|
}
|
|
16719
17296
|
)
|
|
16720
17297
|
] }),
|
|
16721
|
-
typ === "scene_setup" && /* @__PURE__ */ (0,
|
|
17298
|
+
typ === "scene_setup" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
16722
17299
|
CapabilityPanel,
|
|
16723
17300
|
{
|
|
16724
17301
|
port,
|
|
@@ -16726,7 +17303,7 @@ var ElementDetail = ({
|
|
|
16726
17303
|
setupPayload: payloadAusFormular()
|
|
16727
17304
|
}
|
|
16728
17305
|
),
|
|
16729
|
-
notiz && /* @__PURE__ */ (0,
|
|
17306
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
16730
17307
|
"div",
|
|
16731
17308
|
{
|
|
16732
17309
|
className: `szenen-detail__notice szenen-detail__notice--${notiz.tone}`,
|
|
@@ -16734,8 +17311,8 @@ var ElementDetail = ({
|
|
|
16734
17311
|
"data-tone": notiz.tone,
|
|
16735
17312
|
role: notiz.tone === "error" ? "alert" : "status",
|
|
16736
17313
|
children: [
|
|
16737
|
-
/* @__PURE__ */ (0,
|
|
16738
|
-
notiz.details && notiz.details.length > 0 && /* @__PURE__ */ (0,
|
|
17314
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: notiz.text }),
|
|
17315
|
+
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)) })
|
|
16739
17316
|
]
|
|
16740
17317
|
}
|
|
16741
17318
|
)
|
|
@@ -16743,15 +17320,15 @@ var ElementDetail = ({
|
|
|
16743
17320
|
};
|
|
16744
17321
|
|
|
16745
17322
|
// src/features/szenen/areas/useSchmalesDisplay.ts
|
|
16746
|
-
var
|
|
17323
|
+
var import_react11 = require("react");
|
|
16747
17324
|
var SCHMALE_ANSICHT = "(max-width: 760px)";
|
|
16748
17325
|
function messen(abfrage) {
|
|
16749
17326
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
16750
17327
|
return window.matchMedia(abfrage).matches;
|
|
16751
17328
|
}
|
|
16752
17329
|
function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
16753
|
-
const [schmal, setSchmal] = (0,
|
|
16754
|
-
(0,
|
|
17330
|
+
const [schmal, setSchmal] = (0, import_react11.useState)(() => messen(abfrage));
|
|
17331
|
+
(0, import_react11.useEffect)(() => {
|
|
16755
17332
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
16756
17333
|
const liste = window.matchMedia(abfrage);
|
|
16757
17334
|
const aktualisieren = () => setSchmal(liste.matches);
|
|
@@ -16763,7 +17340,7 @@ function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
|
16763
17340
|
}
|
|
16764
17341
|
|
|
16765
17342
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
16766
|
-
var
|
|
17343
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
16767
17344
|
var ElementsArea = ({
|
|
16768
17345
|
port,
|
|
16769
17346
|
contextId,
|
|
@@ -16778,16 +17355,16 @@ var ElementsArea = ({
|
|
|
16778
17355
|
const gemischt = auswahlTypen.length > 1;
|
|
16779
17356
|
const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
|
|
16780
17357
|
const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
|
|
16781
|
-
const [typ, setTyp] = (0,
|
|
16782
|
-
const [zeigeStillgelegte, setZeigeStillgelegte] = (0,
|
|
16783
|
-
const [gewaehlt, setGewaehlt] = (0,
|
|
16784
|
-
const [neuerTitel, setNeuerTitel] = (0,
|
|
16785
|
-
const [neuerTyp, setNeuerTyp] = (0,
|
|
16786
|
-
const [notiz, setNotiz] = (0,
|
|
16787
|
-
const [anlegend, setAnlegend] = (0,
|
|
16788
|
-
const [anlageOffen, setAnlageOffen] = (0,
|
|
17358
|
+
const [typ, setTyp] = (0, import_react12.useState)(einzelTyp ?? "");
|
|
17359
|
+
const [zeigeStillgelegte, setZeigeStillgelegte] = (0, import_react12.useState)(false);
|
|
17360
|
+
const [gewaehlt, setGewaehlt] = (0, import_react12.useState)(null);
|
|
17361
|
+
const [neuerTitel, setNeuerTitel] = (0, import_react12.useState)("");
|
|
17362
|
+
const [neuerTyp, setNeuerTyp] = (0, import_react12.useState)(auswahlTypen[0]);
|
|
17363
|
+
const [notiz, setNotiz] = (0, import_react12.useState)(null);
|
|
17364
|
+
const [anlegend, setAnlegend] = (0, import_react12.useState)(false);
|
|
17365
|
+
const [anlageOffen, setAnlageOffen] = (0, import_react12.useState)(false);
|
|
16789
17366
|
const schmal = useSchmalesDisplay();
|
|
16790
|
-
const [ansicht, setAnsicht] = (0,
|
|
17367
|
+
const [ansicht, setAnsicht] = (0, import_react12.useState)("liste");
|
|
16791
17368
|
const zeigeListe = !schmal || ansicht === "liste";
|
|
16792
17369
|
const zeigeDetail = !schmal || ansicht === "detail";
|
|
16793
17370
|
const waehle = (elementId) => {
|
|
@@ -16807,17 +17384,17 @@ var ElementsArea = ({
|
|
|
16807
17384
|
setAnlageOffen(false);
|
|
16808
17385
|
setNeuerTitel("");
|
|
16809
17386
|
};
|
|
16810
|
-
return /* @__PURE__ */ (0,
|
|
17387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
16811
17388
|
"div",
|
|
16812
17389
|
{
|
|
16813
17390
|
className: "szenen-elements",
|
|
16814
17391
|
"data-testid": "bereich-elemente",
|
|
16815
17392
|
"data-ansicht": schmal ? ansicht : "beide",
|
|
16816
17393
|
children: [
|
|
16817
|
-
zeigeListe && /* @__PURE__ */ (0,
|
|
16818
|
-
/* @__PURE__ */ (0,
|
|
16819
|
-
/* @__PURE__ */ (0,
|
|
16820
|
-
/* @__PURE__ */ (0,
|
|
17394
|
+
zeigeListe && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__master", "data-testid": "elemente-master", children: [
|
|
17395
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__toolbar", children: [
|
|
17396
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "szenen-elements__heading", children: ueberschrift }),
|
|
17397
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16821
17398
|
"button",
|
|
16822
17399
|
{
|
|
16823
17400
|
type: "button",
|
|
@@ -16833,22 +17410,22 @@ var ElementsArea = ({
|
|
|
16833
17410
|
}
|
|
16834
17411
|
)
|
|
16835
17412
|
] }),
|
|
16836
|
-
gemischt && /* @__PURE__ */ (0,
|
|
17413
|
+
gemischt && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "szenen-elements__scope", children: [
|
|
16837
17414
|
"Art",
|
|
16838
|
-
/* @__PURE__ */ (0,
|
|
17415
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
16839
17416
|
"select",
|
|
16840
17417
|
{
|
|
16841
17418
|
"data-testid": "filter-typ",
|
|
16842
17419
|
value: typ,
|
|
16843
17420
|
onChange: (e) => setTyp(e.target.value),
|
|
16844
17421
|
children: [
|
|
16845
|
-
/* @__PURE__ */ (0,
|
|
16846
|
-
auswahlTypen.map((t) => /* @__PURE__ */ (0,
|
|
17422
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", children: allTypesLabel ?? "alle Typen" }),
|
|
17423
|
+
auswahlTypen.map((t) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: t, children: elementTypPlural(t) }, t))
|
|
16847
17424
|
]
|
|
16848
17425
|
}
|
|
16849
17426
|
)
|
|
16850
17427
|
] }),
|
|
16851
|
-
anlageOffen && /* @__PURE__ */ (0,
|
|
17428
|
+
anlageOffen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
16852
17429
|
"form",
|
|
16853
17430
|
{
|
|
16854
17431
|
className: "szenen-elements__create",
|
|
@@ -16876,9 +17453,9 @@ var ElementsArea = ({
|
|
|
16876
17453
|
}
|
|
16877
17454
|
},
|
|
16878
17455
|
children: [
|
|
16879
|
-
/* @__PURE__ */ (0,
|
|
17456
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "szenen-elements__create-title", children: [
|
|
16880
17457
|
einzelTyp ? `Neue ${einzahl}` : "Titel",
|
|
16881
|
-
/* @__PURE__ */ (0,
|
|
17458
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16882
17459
|
"input",
|
|
16883
17460
|
{
|
|
16884
17461
|
"data-testid": "neuer-titel",
|
|
@@ -16889,20 +17466,20 @@ var ElementsArea = ({
|
|
|
16889
17466
|
}
|
|
16890
17467
|
)
|
|
16891
17468
|
] }),
|
|
16892
|
-
gemischt && /* @__PURE__ */ (0,
|
|
17469
|
+
gemischt && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "szenen-elements__create-type", children: [
|
|
16893
17470
|
"Art",
|
|
16894
|
-
/* @__PURE__ */ (0,
|
|
17471
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16895
17472
|
"select",
|
|
16896
17473
|
{
|
|
16897
17474
|
"data-testid": "neuer-typ",
|
|
16898
17475
|
value: neuerTyp,
|
|
16899
17476
|
onChange: (e) => setNeuerTyp(e.target.value),
|
|
16900
|
-
children: auswahlTypen.map((t) => /* @__PURE__ */ (0,
|
|
17477
|
+
children: auswahlTypen.map((t) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: t, children: elementTypLabel(t) }, t))
|
|
16901
17478
|
}
|
|
16902
17479
|
)
|
|
16903
17480
|
] }),
|
|
16904
|
-
/* @__PURE__ */ (0,
|
|
16905
|
-
/* @__PURE__ */ (0,
|
|
17481
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__create-actions", children: [
|
|
17482
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16906
17483
|
"button",
|
|
16907
17484
|
{
|
|
16908
17485
|
type: "submit",
|
|
@@ -16911,7 +17488,7 @@ var ElementsArea = ({
|
|
|
16911
17488
|
children: "anlegen"
|
|
16912
17489
|
}
|
|
16913
17490
|
),
|
|
16914
|
-
/* @__PURE__ */ (0,
|
|
17491
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16915
17492
|
"button",
|
|
16916
17493
|
{
|
|
16917
17494
|
type: "button",
|
|
@@ -16924,19 +17501,19 @@ var ElementsArea = ({
|
|
|
16924
17501
|
]
|
|
16925
17502
|
}
|
|
16926
17503
|
),
|
|
16927
|
-
notiz && /* @__PURE__ */ (0,
|
|
16928
|
-
phase.status === "loading" && /* @__PURE__ */ (0,
|
|
16929
|
-
phase.status === "error" && /* @__PURE__ */ (0,
|
|
17504
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { "data-testid": "anlegen-notiz", "data-tone": notiz.tone, children: notiz.text }),
|
|
17505
|
+
phase.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { "data-testid": "elemente-laden", children: "Elemente werden geladen \u2026" }),
|
|
17506
|
+
phase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { "data-testid": "elemente-fehler", role: "alert", children: [
|
|
16930
17507
|
"Elemente konnten nicht geladen werden: ",
|
|
16931
17508
|
phase.message,
|
|
16932
17509
|
phase.retryable && " \u2014 ein erneuter Versuch kann helfen."
|
|
16933
17510
|
] }),
|
|
16934
|
-
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */ (0,
|
|
17511
|
+
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { "data-testid": "elemente-leer", children: [
|
|
16935
17512
|
typ ? `Keine ${elementTypPlural(typ)} in diesem Kontext.` : "Nichts in diesem Kontext.",
|
|
16936
17513
|
" ",
|
|
16937
17514
|
'Mit \u201E+ Neu" anlegen.'
|
|
16938
17515
|
] }),
|
|
16939
|
-
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */ (0,
|
|
17516
|
+
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)(
|
|
16940
17517
|
"button",
|
|
16941
17518
|
{
|
|
16942
17519
|
type: "button",
|
|
@@ -16945,18 +17522,18 @@ var ElementsArea = ({
|
|
|
16945
17522
|
className: element.element_id === gewaehlt ? "is-selected" : void 0,
|
|
16946
17523
|
onClick: () => waehle(element.element_id),
|
|
16947
17524
|
children: [
|
|
16948
|
-
/* @__PURE__ */ (0,
|
|
16949
|
-
gemischt && /* @__PURE__ */ (0,
|
|
16950
|
-
element.subtype && /* @__PURE__ */ (0,
|
|
16951
|
-
element.retired && /* @__PURE__ */ (0,
|
|
17525
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { className: "szenen-elements__title", children: element.title || "Unbenanntes Element" }),
|
|
17526
|
+
gemischt && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "szenen-elements__type", children: elementTypLabel(element.type) }),
|
|
17527
|
+
element.subtype && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "szenen-elements__subtype", children: element.subtype }),
|
|
17528
|
+
element.retired && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "szenen-elements__retired", children: "stillgelegt" })
|
|
16952
17529
|
]
|
|
16953
17530
|
}
|
|
16954
17531
|
) }, element.element_id)) }),
|
|
16955
|
-
/* @__PURE__ */ (0,
|
|
16956
|
-
/* @__PURE__ */ (0,
|
|
16957
|
-
/* @__PURE__ */ (0,
|
|
16958
|
-
/* @__PURE__ */ (0,
|
|
16959
|
-
/* @__PURE__ */ (0,
|
|
17532
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("details", { className: "szenen-elements__options", "data-testid": "listen-optionen", children: [
|
|
17533
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("summary", { children: "Listenoptionen" }),
|
|
17534
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__filter", children: [
|
|
17535
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { children: [
|
|
17536
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16960
17537
|
"input",
|
|
16961
17538
|
{
|
|
16962
17539
|
type: "checkbox",
|
|
@@ -16967,12 +17544,12 @@ var ElementsArea = ({
|
|
|
16967
17544
|
),
|
|
16968
17545
|
"stillgelegte Elemente einblenden"
|
|
16969
17546
|
] }),
|
|
16970
|
-
/* @__PURE__ */ (0,
|
|
17547
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", "data-testid": "neu-laden", onClick: neuLaden, children: "neu laden" })
|
|
16971
17548
|
] })
|
|
16972
17549
|
] })
|
|
16973
17550
|
] }),
|
|
16974
|
-
zeigeDetail && /* @__PURE__ */ (0,
|
|
16975
|
-
schmal && /* @__PURE__ */ (0,
|
|
17551
|
+
zeigeDetail && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "szenen-elements__detail", "data-testid": "elemente-detail-spalte", children: [
|
|
17552
|
+
schmal && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16976
17553
|
"button",
|
|
16977
17554
|
{
|
|
16978
17555
|
type: "button",
|
|
@@ -16982,7 +17559,7 @@ var ElementsArea = ({
|
|
|
16982
17559
|
children: "\u2190 Zur\xFCck zur Liste"
|
|
16983
17560
|
}
|
|
16984
17561
|
),
|
|
16985
|
-
gewaehlt ? /* @__PURE__ */ (0,
|
|
17562
|
+
gewaehlt ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16986
17563
|
ElementDetail,
|
|
16987
17564
|
{
|
|
16988
17565
|
port,
|
|
@@ -16991,7 +17568,7 @@ var ElementsArea = ({
|
|
|
16991
17568
|
author,
|
|
16992
17569
|
onChanged: neuLaden
|
|
16993
17570
|
}
|
|
16994
|
-
) : /* @__PURE__ */ (0,
|
|
17571
|
+
) : /* @__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." })
|
|
16995
17572
|
] })
|
|
16996
17573
|
]
|
|
16997
17574
|
}
|
|
@@ -16999,17 +17576,17 @@ var ElementsArea = ({
|
|
|
16999
17576
|
};
|
|
17000
17577
|
|
|
17001
17578
|
// src/features/szenen/areas/SceneArea.tsx
|
|
17002
|
-
var
|
|
17003
|
-
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0,
|
|
17004
|
-
/* @__PURE__ */ (0,
|
|
17005
|
-
/* @__PURE__ */ (0,
|
|
17579
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
17580
|
+
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
17581
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
|
|
17582
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
17006
17583
|
] });
|
|
17007
17584
|
|
|
17008
17585
|
// src/features/szenen/areas/SetupArea.tsx
|
|
17009
|
-
var
|
|
17010
|
-
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0,
|
|
17011
|
-
/* @__PURE__ */ (0,
|
|
17012
|
-
/* @__PURE__ */ (0,
|
|
17586
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
17587
|
+
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
|
|
17588
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
|
|
17589
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
17013
17590
|
ElementsArea,
|
|
17014
17591
|
{
|
|
17015
17592
|
port,
|
|
@@ -17022,10 +17599,10 @@ var SetupArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
17022
17599
|
] });
|
|
17023
17600
|
|
|
17024
17601
|
// src/features/szenen/areas/ShotArea.tsx
|
|
17025
|
-
var
|
|
17026
|
-
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0,
|
|
17027
|
-
/* @__PURE__ */ (0,
|
|
17028
|
-
/* @__PURE__ */ (0,
|
|
17602
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
17603
|
+
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
|
|
17604
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
|
|
17605
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
17029
17606
|
ElementsArea,
|
|
17030
17607
|
{
|
|
17031
17608
|
port,
|
|
@@ -17038,21 +17615,21 @@ var ShotArea = ({ port, contextId }) => /* @__PURE__ */ (0, import_jsx_runtime13
|
|
|
17038
17615
|
] });
|
|
17039
17616
|
|
|
17040
17617
|
// src/features/szenen/areas/MediaArea.tsx
|
|
17041
|
-
var
|
|
17042
|
-
var
|
|
17618
|
+
var import_react13 = require("react");
|
|
17619
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
17043
17620
|
var leer = async () => ({ kind: "ok", value: [] });
|
|
17044
17621
|
var MediaArea = ({ port }) => {
|
|
17045
17622
|
const media = port.media;
|
|
17046
|
-
const [versionInput, setVersionInput] = (0,
|
|
17047
|
-
const [versionId, setVersionId] = (0,
|
|
17048
|
-
const [itemInput, setItemInput] = (0,
|
|
17049
|
-
const [itemId, setItemId] = (0,
|
|
17050
|
-
const [assetId, setAssetId] = (0,
|
|
17051
|
-
const [role, setRole] = (0,
|
|
17052
|
-
const [position, setPosition] = (0,
|
|
17053
|
-
const [notiz, setNotiz] = (0,
|
|
17054
|
-
const [busy, setBusy] = (0,
|
|
17055
|
-
const [refresh, setRefresh] = (0,
|
|
17623
|
+
const [versionInput, setVersionInput] = (0, import_react13.useState)("");
|
|
17624
|
+
const [versionId, setVersionId] = (0, import_react13.useState)("");
|
|
17625
|
+
const [itemInput, setItemInput] = (0, import_react13.useState)("");
|
|
17626
|
+
const [itemId, setItemId] = (0, import_react13.useState)("");
|
|
17627
|
+
const [assetId, setAssetId] = (0, import_react13.useState)("");
|
|
17628
|
+
const [role, setRole] = (0, import_react13.useState)("reference");
|
|
17629
|
+
const [position, setPosition] = (0, import_react13.useState)("0");
|
|
17630
|
+
const [notiz, setNotiz] = (0, import_react13.useState)(null);
|
|
17631
|
+
const [busy, setBusy] = (0, import_react13.useState)(false);
|
|
17632
|
+
const [refresh, setRefresh] = (0, import_react13.useState)(0);
|
|
17056
17633
|
const [versionPhase] = usePortQuery(
|
|
17057
17634
|
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
17058
17635
|
[media, versionId, refresh]
|
|
@@ -17098,145 +17675,145 @@ var MediaArea = ({ port }) => {
|
|
|
17098
17675
|
};
|
|
17099
17676
|
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
17100
17677
|
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
17101
|
-
return /* @__PURE__ */ (0,
|
|
17102
|
-
/* @__PURE__ */ (0,
|
|
17103
|
-
/* @__PURE__ */ (0,
|
|
17104
|
-
/* @__PURE__ */ (0,
|
|
17105
|
-
/* @__PURE__ */ (0,
|
|
17106
|
-
/* @__PURE__ */ (0,
|
|
17678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
17679
|
+
/* @__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." }),
|
|
17680
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
17681
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Version" }),
|
|
17682
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
17683
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17107
17684
|
"Version-ID",
|
|
17108
|
-
/* @__PURE__ */ (0,
|
|
17685
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
17109
17686
|
] }),
|
|
17110
|
-
/* @__PURE__ */ (0,
|
|
17687
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
17111
17688
|
] }),
|
|
17112
|
-
/* @__PURE__ */ (0,
|
|
17113
|
-
/* @__PURE__ */ (0,
|
|
17689
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__attach", children: [
|
|
17690
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17114
17691
|
"Asset-ID",
|
|
17115
|
-
/* @__PURE__ */ (0,
|
|
17692
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
17116
17693
|
] }),
|
|
17117
|
-
/* @__PURE__ */ (0,
|
|
17694
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17118
17695
|
"Rolle",
|
|
17119
|
-
/* @__PURE__ */ (0,
|
|
17120
|
-
/* @__PURE__ */ (0,
|
|
17121
|
-
/* @__PURE__ */ (0,
|
|
17122
|
-
/* @__PURE__ */ (0,
|
|
17123
|
-
/* @__PURE__ */ (0,
|
|
17696
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
17697
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "reference", children: "reference" }),
|
|
17698
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "mask", children: "mask" }),
|
|
17699
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "palette", children: "palette" }),
|
|
17700
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "example", children: "example" })
|
|
17124
17701
|
] })
|
|
17125
17702
|
] }),
|
|
17126
|
-
/* @__PURE__ */ (0,
|
|
17703
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17127
17704
|
"Position",
|
|
17128
|
-
/* @__PURE__ */ (0,
|
|
17705
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
17129
17706
|
] }),
|
|
17130
|
-
/* @__PURE__ */ (0,
|
|
17707
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
17131
17708
|
] }),
|
|
17132
|
-
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0,
|
|
17133
|
-
versionPhase.status === "error" && /* @__PURE__ */ (0,
|
|
17709
|
+
versionPhase.status === "loading" && versionId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
17710
|
+
versionPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
17134
17711
|
"Versionsmedien konnten nicht geladen werden: ",
|
|
17135
17712
|
versionPhase.message
|
|
17136
17713
|
] }),
|
|
17137
|
-
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0,
|
|
17714
|
+
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
17138
17715
|
"Version ",
|
|
17139
17716
|
versionId,
|
|
17140
17717
|
" hat keine Medien."
|
|
17141
17718
|
] }),
|
|
17142
|
-
/* @__PURE__ */ (0,
|
|
17143
|
-
/* @__PURE__ */ (0,
|
|
17144
|
-
/* @__PURE__ */ (0,
|
|
17719
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
17720
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
17721
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
17145
17722
|
medium.role,
|
|
17146
17723
|
" \xB7 Position ",
|
|
17147
17724
|
medium.position
|
|
17148
17725
|
] }),
|
|
17149
|
-
medium.url && /* @__PURE__ */ (0,
|
|
17150
|
-
/* @__PURE__ */ (0,
|
|
17726
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
17727
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
17151
17728
|
] }, `${medium.assetId}:${medium.role}`)) })
|
|
17152
17729
|
] }),
|
|
17153
|
-
/* @__PURE__ */ (0,
|
|
17154
|
-
/* @__PURE__ */ (0,
|
|
17155
|
-
/* @__PURE__ */ (0,
|
|
17156
|
-
/* @__PURE__ */ (0,
|
|
17730
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { children: [
|
|
17731
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: "Item-Medien" }),
|
|
17732
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "szenen-media__lookup", children: [
|
|
17733
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
|
|
17157
17734
|
"Item-ID",
|
|
17158
|
-
/* @__PURE__ */ (0,
|
|
17735
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
17159
17736
|
] }),
|
|
17160
|
-
/* @__PURE__ */ (0,
|
|
17737
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
17161
17738
|
] }),
|
|
17162
|
-
itemPhase.status === "error" && /* @__PURE__ */ (0,
|
|
17739
|
+
itemPhase.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { role: "alert", children: [
|
|
17163
17740
|
"Item-Medien konnten nicht geladen werden: ",
|
|
17164
17741
|
itemPhase.message
|
|
17165
17742
|
] }),
|
|
17166
|
-
/* @__PURE__ */ (0,
|
|
17167
|
-
/* @__PURE__ */ (0,
|
|
17168
|
-
/* @__PURE__ */ (0,
|
|
17743
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
|
|
17744
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: medium.assetId }),
|
|
17745
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
17169
17746
|
medium.role,
|
|
17170
17747
|
" \xB7 Position ",
|
|
17171
17748
|
medium.position
|
|
17172
17749
|
] }),
|
|
17173
|
-
medium.url && /* @__PURE__ */ (0,
|
|
17750
|
+
medium.url && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
17174
17751
|
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
17175
17752
|
] }),
|
|
17176
|
-
notiz && /* @__PURE__ */ (0,
|
|
17753
|
+
notiz && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
17177
17754
|
] });
|
|
17178
17755
|
};
|
|
17179
17756
|
|
|
17180
17757
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
17181
|
-
var
|
|
17758
|
+
var import_react16 = require("react");
|
|
17182
17759
|
|
|
17183
17760
|
// src/features/szenen/areas/RecoveryPanel.tsx
|
|
17184
|
-
var
|
|
17185
|
-
var
|
|
17761
|
+
var import_react14 = require("react");
|
|
17762
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
17186
17763
|
var Diagnosen = ({ befunde, testId }) => {
|
|
17187
17764
|
if (befunde.length === 0) return null;
|
|
17188
|
-
return /* @__PURE__ */ (0,
|
|
17189
|
-
/* @__PURE__ */ (0,
|
|
17190
|
-
d.proposal_type && /* @__PURE__ */ (0,
|
|
17765
|
+
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: [
|
|
17766
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: d.code }),
|
|
17767
|
+
d.proposal_type && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17191
17768
|
" \xB7 ",
|
|
17192
|
-
/* @__PURE__ */ (0,
|
|
17769
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: d.proposal_type })
|
|
17193
17770
|
] }),
|
|
17194
|
-
d.pointer && /* @__PURE__ */ (0,
|
|
17771
|
+
d.pointer && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17195
17772
|
" \xB7 ",
|
|
17196
|
-
/* @__PURE__ */ (0,
|
|
17773
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: d.pointer })
|
|
17197
17774
|
] }),
|
|
17198
|
-
typeof d.line === "number" && /* @__PURE__ */ (0,
|
|
17775
|
+
typeof d.line === "number" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17199
17776
|
" \xB7 Zeile ",
|
|
17200
17777
|
d.line,
|
|
17201
17778
|
", Spalte ",
|
|
17202
17779
|
d.column
|
|
17203
17780
|
] }),
|
|
17204
|
-
/* @__PURE__ */ (0,
|
|
17781
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: d.message })
|
|
17205
17782
|
] }, i)) });
|
|
17206
17783
|
};
|
|
17207
|
-
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0,
|
|
17208
|
-
/* @__PURE__ */ (0,
|
|
17784
|
+
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
|
|
17785
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { "data-testid": "rettung-status", children: [
|
|
17209
17786
|
bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
|
|
17210
17787
|
bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
|
|
17211
17788
|
bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
|
|
17212
17789
|
] }),
|
|
17213
|
-
bewertung.proposals.length > 0 && /* @__PURE__ */ (0,
|
|
17214
|
-
/* @__PURE__ */ (0,
|
|
17215
|
-
/* @__PURE__ */ (0,
|
|
17216
|
-
/* @__PURE__ */ (0,
|
|
17790
|
+
bewertung.proposals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17791
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Verwertbar" }),
|
|
17792
|
+
/* @__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: [
|
|
17793
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: p.type }),
|
|
17217
17794
|
" \u2014 ",
|
|
17218
17795
|
p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
|
|
17219
|
-
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ (0,
|
|
17220
|
-
/* @__PURE__ */ (0,
|
|
17796
|
+
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: [
|
|
17797
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: l.pointer }),
|
|
17221
17798
|
": ",
|
|
17222
17799
|
l.reason
|
|
17223
17800
|
] }, i)) })
|
|
17224
17801
|
] }, p.type)) })
|
|
17225
17802
|
] }),
|
|
17226
|
-
bewertung.rejected.length > 0 && /* @__PURE__ */ (0,
|
|
17227
|
-
/* @__PURE__ */ (0,
|
|
17228
|
-
/* @__PURE__ */ (0,
|
|
17229
|
-
/* @__PURE__ */ (0,
|
|
17230
|
-
/* @__PURE__ */ (0,
|
|
17803
|
+
bewertung.rejected.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
17804
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Nicht verwertbar" }),
|
|
17805
|
+
/* @__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: [
|
|
17806
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: r.type }),
|
|
17807
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
|
|
17231
17808
|
] }, r.type)) })
|
|
17232
17809
|
] })
|
|
17233
17810
|
] });
|
|
17234
17811
|
var RecoveryPanel = ({ port, lauf }) => {
|
|
17235
|
-
const [arbeitskopie, setArbeitskopie] = (0,
|
|
17236
|
-
const [bewertung, setBewertung] = (0,
|
|
17237
|
-
const [gesichert, setGesichert] = (0,
|
|
17238
|
-
const [meldung, setMeldung] = (0,
|
|
17239
|
-
const [laeuft, setLaeuft] = (0,
|
|
17812
|
+
const [arbeitskopie, setArbeitskopie] = (0, import_react14.useState)(null);
|
|
17813
|
+
const [bewertung, setBewertung] = (0, import_react14.useState)(null);
|
|
17814
|
+
const [gesichert, setGesichert] = (0, import_react14.useState)(null);
|
|
17815
|
+
const [meldung, setMeldung] = (0, import_react14.useState)(null);
|
|
17816
|
+
const [laeuft, setLaeuft] = (0, import_react14.useState)(false);
|
|
17240
17817
|
if (!port.derivation) return null;
|
|
17241
17818
|
if (typeof lauf.raw_output !== "string" || lauf.raw_output.length === 0) return null;
|
|
17242
17819
|
const derivation = port.derivation;
|
|
@@ -17272,16 +17849,16 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17272
17849
|
setLaeuft(false);
|
|
17273
17850
|
}
|
|
17274
17851
|
}
|
|
17275
|
-
return /* @__PURE__ */ (0,
|
|
17276
|
-
/* @__PURE__ */ (0,
|
|
17277
|
-
/* @__PURE__ */ (0,
|
|
17852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
|
|
17853
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { children: "Antwort retten" }),
|
|
17854
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
17278
17855
|
"Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
|
|
17279
|
-
/* @__PURE__ */ (0,
|
|
17856
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: "ohne" }),
|
|
17280
17857
|
" einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
|
|
17281
17858
|
] }),
|
|
17282
|
-
/* @__PURE__ */ (0,
|
|
17283
|
-
/* @__PURE__ */ (0,
|
|
17284
|
-
/* @__PURE__ */ (0,
|
|
17859
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "szenen-field", children: [
|
|
17860
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
|
|
17861
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17285
17862
|
"textarea",
|
|
17286
17863
|
{
|
|
17287
17864
|
readOnly: true,
|
|
@@ -17292,12 +17869,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17292
17869
|
}
|
|
17293
17870
|
)
|
|
17294
17871
|
] }),
|
|
17295
|
-
/* @__PURE__ */ (0,
|
|
17296
|
-
/* @__PURE__ */ (0,
|
|
17872
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "szenen-field", children: [
|
|
17873
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
|
|
17297
17874
|
"Arbeitskopie",
|
|
17298
17875
|
bearbeitet ? " (bearbeitet)" : ""
|
|
17299
17876
|
] }),
|
|
17300
|
-
/* @__PURE__ */ (0,
|
|
17877
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17301
17878
|
"textarea",
|
|
17302
17879
|
{
|
|
17303
17880
|
rows: 8,
|
|
@@ -17307,8 +17884,8 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17307
17884
|
}
|
|
17308
17885
|
)
|
|
17309
17886
|
] }),
|
|
17310
|
-
/* @__PURE__ */ (0,
|
|
17311
|
-
/* @__PURE__ */ (0,
|
|
17887
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-rettung__aktionen", children: [
|
|
17888
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17312
17889
|
"button",
|
|
17313
17890
|
{
|
|
17314
17891
|
type: "button",
|
|
@@ -17318,7 +17895,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17318
17895
|
children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
|
|
17319
17896
|
}
|
|
17320
17897
|
),
|
|
17321
|
-
/* @__PURE__ */ (0,
|
|
17898
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17322
17899
|
"button",
|
|
17323
17900
|
{
|
|
17324
17901
|
type: "button",
|
|
@@ -17328,7 +17905,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17328
17905
|
children: "Arbeitsfassung speichern"
|
|
17329
17906
|
}
|
|
17330
17907
|
),
|
|
17331
|
-
arbeitskopie !== null && /* @__PURE__ */ (0,
|
|
17908
|
+
arbeitskopie !== null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17332
17909
|
"button",
|
|
17333
17910
|
{
|
|
17334
17911
|
type: "button",
|
|
@@ -17343,15 +17920,15 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17343
17920
|
}
|
|
17344
17921
|
)
|
|
17345
17922
|
] }),
|
|
17346
|
-
meldung && /* @__PURE__ */ (0,
|
|
17347
|
-
bewertung && /* @__PURE__ */ (0,
|
|
17348
|
-
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
17349
|
-
/* @__PURE__ */ (0,
|
|
17350
|
-
/* @__PURE__ */ (0,
|
|
17923
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
|
|
17924
|
+
bewertung && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ausbeute, { bewertung }),
|
|
17925
|
+
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "szenen-diagnose", children: [
|
|
17926
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: "Befunde an dieser Fassung" }),
|
|
17927
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
|
|
17351
17928
|
] }),
|
|
17352
|
-
gesichert && /* @__PURE__ */ (0,
|
|
17929
|
+
gesichert && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { "data-testid": "rettung-gesichert", children: [
|
|
17353
17930
|
"Gespeichert als Arbeitsfassung ",
|
|
17354
|
-
/* @__PURE__ */ (0,
|
|
17931
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: gesichert.recovery_id }),
|
|
17355
17932
|
gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
|
|
17356
17933
|
". Das Original des Laufs ist davon unber\xFChrt."
|
|
17357
17934
|
] })
|
|
@@ -17359,12 +17936,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
17359
17936
|
};
|
|
17360
17937
|
|
|
17361
17938
|
// src/features/szenen/areas/ChainActions.tsx
|
|
17362
|
-
var
|
|
17363
|
-
var
|
|
17939
|
+
var import_react15 = require("react");
|
|
17940
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
17364
17941
|
var ChainActions = ({ port, runId, recoveryId }) => {
|
|
17365
|
-
const [graph, setGraph] = (0,
|
|
17366
|
-
const [meldung, setMeldung] = (0,
|
|
17367
|
-
const [laeuft, setLaeuft] = (0,
|
|
17942
|
+
const [graph, setGraph] = (0, import_react15.useState)(null);
|
|
17943
|
+
const [meldung, setMeldung] = (0, import_react15.useState)(null);
|
|
17944
|
+
const [laeuft, setLaeuft] = (0, import_react15.useState)(false);
|
|
17368
17945
|
if (!port.derivation) return null;
|
|
17369
17946
|
const derivation = port.derivation;
|
|
17370
17947
|
const runs = port.runs;
|
|
@@ -17386,14 +17963,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
17386
17963
|
setLaeuft(false);
|
|
17387
17964
|
}
|
|
17388
17965
|
}
|
|
17389
|
-
return /* @__PURE__ */ (0,
|
|
17390
|
-
/* @__PURE__ */ (0,
|
|
17391
|
-
/* @__PURE__ */ (0,
|
|
17966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "szenen-kette", "data-testid": "kette", children: [
|
|
17967
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { children: "Draft-Kette" }),
|
|
17968
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "szenen-area__lead", children: [
|
|
17392
17969
|
"Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
|
|
17393
|
-
/* @__PURE__ */ (0,
|
|
17970
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: "ohne" }),
|
|
17394
17971
|
" vorher etwas zu ver\xF6ffentlichen."
|
|
17395
17972
|
] }),
|
|
17396
|
-
!graph && /* @__PURE__ */ (0,
|
|
17973
|
+
!graph && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17397
17974
|
"button",
|
|
17398
17975
|
{
|
|
17399
17976
|
type: "button",
|
|
@@ -17403,34 +17980,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
17403
17980
|
children: "Als Draft-Kette \xFCbernehmen"
|
|
17404
17981
|
}
|
|
17405
17982
|
),
|
|
17406
|
-
graph && /* @__PURE__ */ (0,
|
|
17407
|
-
/* @__PURE__ */ (0,
|
|
17983
|
+
graph && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "data-testid": "kette-ergebnis", children: [
|
|
17984
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
17408
17985
|
"Kette ",
|
|
17409
|
-
/* @__PURE__ */ (0,
|
|
17986
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: graph.chainId }),
|
|
17410
17987
|
" angelegt. Kein Knoten ist ver\xF6ffentlicht."
|
|
17411
17988
|
] }),
|
|
17412
|
-
/* @__PURE__ */ (0,
|
|
17413
|
-
/* @__PURE__ */ (0,
|
|
17989
|
+
/* @__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: [
|
|
17990
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: k.type }),
|
|
17414
17991
|
" \u2014 Element ",
|
|
17415
|
-
/* @__PURE__ */ (0,
|
|
17992
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: k.elementId }),
|
|
17416
17993
|
", Entwurf ",
|
|
17417
|
-
/* @__PURE__ */ (0,
|
|
17994
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: k.draftId }),
|
|
17418
17995
|
" (Revision ",
|
|
17419
17996
|
k.revision,
|
|
17420
17997
|
")"
|
|
17421
17998
|
] }, k.type)) }),
|
|
17422
|
-
graph.missing.length > 0 && /* @__PURE__ */ (0,
|
|
17423
|
-
/* @__PURE__ */ (0,
|
|
17424
|
-
/* @__PURE__ */ (0,
|
|
17425
|
-
/* @__PURE__ */ (0,
|
|
17999
|
+
graph.missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
|
|
18000
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h5", { children: "Unvollst\xE4ndig erzeugt" }),
|
|
18001
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { children: graph.missing.map((m) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { children: [
|
|
18002
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: m.type }),
|
|
17426
18003
|
": ",
|
|
17427
18004
|
m.reason
|
|
17428
18005
|
] }, m.type)) })
|
|
17429
18006
|
] })
|
|
17430
18007
|
] }),
|
|
17431
|
-
shotKnoten && /* @__PURE__ */ (0,
|
|
17432
|
-
/* @__PURE__ */ (0,
|
|
17433
|
-
/* @__PURE__ */ (0,
|
|
18008
|
+
shotKnoten && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
18009
|
+
/* @__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".' }),
|
|
18010
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17434
18011
|
PromptStartAction,
|
|
17435
18012
|
{
|
|
17436
18013
|
port,
|
|
@@ -17438,20 +18015,20 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
17438
18015
|
}
|
|
17439
18016
|
)
|
|
17440
18017
|
] }),
|
|
17441
|
-
meldung && /* @__PURE__ */ (0,
|
|
18018
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
|
|
17442
18019
|
] });
|
|
17443
18020
|
};
|
|
17444
18021
|
|
|
17445
18022
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
17446
|
-
var
|
|
18023
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
17447
18024
|
var MODUS_TEXT = {
|
|
17448
18025
|
prompt: "Nur Prompt",
|
|
17449
18026
|
image: "Nur Bild",
|
|
17450
18027
|
image_prompt: "Bild und Prompt"
|
|
17451
18028
|
};
|
|
17452
18029
|
var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
17453
|
-
const [kopiert, setKopiert] = (0,
|
|
17454
|
-
const feld = (0,
|
|
18030
|
+
const [kopiert, setKopiert] = (0, import_react16.useState)(false);
|
|
18031
|
+
const feld = (0, import_react16.useRef)(null);
|
|
17455
18032
|
async function kopieren() {
|
|
17456
18033
|
try {
|
|
17457
18034
|
await navigator.clipboard.writeText(text);
|
|
@@ -17461,15 +18038,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
17461
18038
|
setKopiert(false);
|
|
17462
18039
|
}
|
|
17463
18040
|
}
|
|
17464
|
-
return /* @__PURE__ */ (0,
|
|
17465
|
-
/* @__PURE__ */ (0,
|
|
18041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("details", { open: offen, "data-testid": `belege-${testId}`, children: [
|
|
18042
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("summary", { children: [
|
|
17466
18043
|
titel,
|
|
17467
18044
|
" (",
|
|
17468
18045
|
text.length,
|
|
17469
18046
|
" Zeichen)"
|
|
17470
18047
|
] }),
|
|
17471
|
-
/* @__PURE__ */ (0,
|
|
17472
|
-
/* @__PURE__ */ (0,
|
|
18048
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-beleg__kopf", children: [
|
|
18049
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17473
18050
|
"button",
|
|
17474
18051
|
{
|
|
17475
18052
|
type: "button",
|
|
@@ -17478,9 +18055,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
17478
18055
|
children: "Kopieren"
|
|
17479
18056
|
}
|
|
17480
18057
|
),
|
|
17481
|
-
kopiert && /* @__PURE__ */ (0,
|
|
18058
|
+
kopiert && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
|
|
17482
18059
|
] }),
|
|
17483
|
-
/* @__PURE__ */ (0,
|
|
18060
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17484
18061
|
"textarea",
|
|
17485
18062
|
{
|
|
17486
18063
|
ref: feld,
|
|
@@ -17494,8 +18071,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
17494
18071
|
)
|
|
17495
18072
|
] });
|
|
17496
18073
|
};
|
|
17497
|
-
var Belege = ({ lauf }) => /* @__PURE__ */ (0,
|
|
17498
|
-
lauf.raw_output ? /* @__PURE__ */ (0,
|
|
18074
|
+
var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
|
|
18075
|
+
lauf.raw_output ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17499
18076
|
BelegFeld,
|
|
17500
18077
|
{
|
|
17501
18078
|
titel: "Rohantwort des Modells",
|
|
@@ -17506,9 +18083,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div",
|
|
|
17506
18083
|
) : (
|
|
17507
18084
|
/* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
|
|
17508
18085
|
das Modell hat also nicht „falsch geantwortet". */
|
|
17509
|
-
/* @__PURE__ */ (0,
|
|
18086
|
+
/* @__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)." })
|
|
17510
18087
|
),
|
|
17511
|
-
/* @__PURE__ */ (0,
|
|
18088
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17512
18089
|
BelegFeld,
|
|
17513
18090
|
{
|
|
17514
18091
|
titel: "Systemprompt dieses Laufs",
|
|
@@ -17520,18 +18097,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div",
|
|
|
17520
18097
|
] });
|
|
17521
18098
|
var Herkunft = ({ lauf }) => {
|
|
17522
18099
|
if (!lauf.follows) return null;
|
|
17523
|
-
return /* @__PURE__ */ (0,
|
|
18100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
|
|
17524
18101
|
"Folgt auf Lauf ",
|
|
17525
|
-
/* @__PURE__ */ (0,
|
|
18102
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: lauf.follows.run_id }),
|
|
17526
18103
|
".",
|
|
17527
18104
|
lauf.status === "succeeded" && " Im Folgelauf gelungen."
|
|
17528
18105
|
] });
|
|
17529
18106
|
};
|
|
17530
18107
|
var Widerspruch = ({ lauf }) => {
|
|
17531
18108
|
if (!lauf.reply) return null;
|
|
17532
|
-
return /* @__PURE__ */ (0,
|
|
17533
|
-
/* @__PURE__ */ (0,
|
|
17534
|
-
/* @__PURE__ */ (0,
|
|
18109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
|
|
18110
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
|
|
18111
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: lauf.reply })
|
|
17535
18112
|
] });
|
|
17536
18113
|
};
|
|
17537
18114
|
function readAsBase642(datei) {
|
|
@@ -17546,47 +18123,216 @@ function readAsBase642(datei) {
|
|
|
17546
18123
|
leser.readAsDataURL(datei);
|
|
17547
18124
|
});
|
|
17548
18125
|
}
|
|
18126
|
+
var ERSTE_KACHELN = 12;
|
|
18127
|
+
function useSichtbareKacheln(alle, wurzel) {
|
|
18128
|
+
const [gesehen, setGesehen] = (0, import_react16.useState)([]);
|
|
18129
|
+
const schluessel = alle.join(" ");
|
|
18130
|
+
(0, import_react16.useEffect)(() => {
|
|
18131
|
+
const ziel = wurzel.current;
|
|
18132
|
+
if (!ziel || typeof IntersectionObserver === "undefined") return void 0;
|
|
18133
|
+
const beobachter = new IntersectionObserver((eintraege) => {
|
|
18134
|
+
const neue = eintraege.filter((e) => e.isIntersecting).map((e) => e.target.dataset.mediaRef).filter((r) => Boolean(r));
|
|
18135
|
+
if (neue.length === 0) return;
|
|
18136
|
+
setGesehen((bisher) => [.../* @__PURE__ */ new Set([...bisher, ...neue])]);
|
|
18137
|
+
for (const e of eintraege) if (e.isIntersecting) beobachter.unobserve(e.target);
|
|
18138
|
+
}, { root: ziel, rootMargin: "200px" });
|
|
18139
|
+
ziel.querySelectorAll("[data-media-ref]").forEach((el) => beobachter.observe(el));
|
|
18140
|
+
return () => beobachter.disconnect();
|
|
18141
|
+
}, [wurzel, schluessel]);
|
|
18142
|
+
return (0, import_react16.useMemo)(
|
|
18143
|
+
() => [.../* @__PURE__ */ new Set([...alle.slice(0, ERSTE_KACHELN), ...gesehen])],
|
|
18144
|
+
[schluessel, gesehen]
|
|
18145
|
+
);
|
|
18146
|
+
}
|
|
18147
|
+
function useVorschauen(port, mediaRefs) {
|
|
18148
|
+
const [stand, setStand] = (0, import_react16.useState)(() => ({ quellen: /* @__PURE__ */ new Map(), gescheitert: /* @__PURE__ */ new Set() }));
|
|
18149
|
+
const gehalten = (0, import_react16.useRef)(/* @__PURE__ */ new Map());
|
|
18150
|
+
const ohneBild = (0, import_react16.useRef)(/* @__PURE__ */ new Set());
|
|
18151
|
+
const schluessel = mediaRefs.join(" ");
|
|
18152
|
+
(0, import_react16.useEffect)(() => {
|
|
18153
|
+
const bestand = port.imageLibrary;
|
|
18154
|
+
if (!bestand?.loadPreview) return void 0;
|
|
18155
|
+
const refs = schluessel ? schluessel.split(" ") : [];
|
|
18156
|
+
const lauf = { abgebrochen: false };
|
|
18157
|
+
void ladeVorschauen(
|
|
18158
|
+
bestand,
|
|
18159
|
+
refs,
|
|
18160
|
+
(mediaRef, quelle) => {
|
|
18161
|
+
if (quelle) gehalten.current.set(mediaRef, quelle);
|
|
18162
|
+
else ohneBild.current.add(mediaRef);
|
|
18163
|
+
setStand({
|
|
18164
|
+
quellen: new Map(gehalten.current),
|
|
18165
|
+
gescheitert: new Set(ohneBild.current)
|
|
18166
|
+
});
|
|
18167
|
+
},
|
|
18168
|
+
{
|
|
18169
|
+
parallel: 4,
|
|
18170
|
+
hat: (ref) => gehalten.current.has(ref) || ohneBild.current.has(ref),
|
|
18171
|
+
lauf,
|
|
18172
|
+
// Ein Fehlschlag ist eine Auskunft, kein Grund weiterzuprobieren:
|
|
18173
|
+
// Die Kachel bekommt einen Platzhalter, das Werk bleibt wählbar.
|
|
18174
|
+
gescheitert: (ref) => {
|
|
18175
|
+
ohneBild.current.add(ref);
|
|
18176
|
+
setStand({
|
|
18177
|
+
quellen: new Map(gehalten.current),
|
|
18178
|
+
gescheitert: new Set(ohneBild.current)
|
|
18179
|
+
});
|
|
18180
|
+
}
|
|
18181
|
+
}
|
|
18182
|
+
);
|
|
18183
|
+
return () => {
|
|
18184
|
+
lauf.abgebrochen = true;
|
|
18185
|
+
};
|
|
18186
|
+
}, [port, schluessel]);
|
|
18187
|
+
return stand;
|
|
18188
|
+
}
|
|
17549
18189
|
var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
17550
|
-
const [suche, setSuche] = (0,
|
|
17551
|
-
const [
|
|
17552
|
-
|
|
18190
|
+
const [suche, setSuche] = (0, import_react16.useState)("");
|
|
18191
|
+
const [fokus, setFokus] = (0, import_react16.useState)(null);
|
|
18192
|
+
const browser = (0, import_react16.useRef)(null);
|
|
18193
|
+
const [items] = usePortQuery(
|
|
18194
|
+
() => port.imageLibrary.listItems({ search: suche.trim() || void 0, limit: 60 }),
|
|
17553
18195
|
[port, suche]
|
|
17554
18196
|
);
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
|
|
18197
|
+
const werke = items.status === "ready" ? items.value : [];
|
|
18198
|
+
const werk = werke.find((i) => i.itemRef === fokus) ?? null;
|
|
18199
|
+
const deckbilder = (0, import_react16.useMemo)(
|
|
18200
|
+
() => werke.map((i) => i.images[0]?.mediaRef).filter((r) => Boolean(r)),
|
|
18201
|
+
[werke]
|
|
18202
|
+
);
|
|
18203
|
+
const sichtbareDeckbilder = useSichtbareKacheln(deckbilder, browser);
|
|
18204
|
+
const anzufordern = (0, import_react16.useMemo)(() => [.../* @__PURE__ */ new Set([
|
|
18205
|
+
...sichtbareDeckbilder,
|
|
18206
|
+
...werk ? werk.images.map((b) => b.mediaRef) : [],
|
|
18207
|
+
...gewaehlt.map((b) => b.mediaRef)
|
|
18208
|
+
])], [sichtbareDeckbilder, werk, gewaehlt]);
|
|
18209
|
+
const { quellen, gescheitert } = useVorschauen(port, anzufordern);
|
|
18210
|
+
const quelleVon = (bild) => bild.thumbUrl || quellen.get(bild.mediaRef) || null;
|
|
18211
|
+
const istGewaehlt = (mediaRef) => gewaehlt.some((b) => b.mediaRef === mediaRef);
|
|
18212
|
+
function werkAntippen(item) {
|
|
18213
|
+
const deckbild = item.images[0];
|
|
18214
|
+
if (!deckbild) return;
|
|
18215
|
+
if (item.images.length === 1) onWaehlen(deckbild);
|
|
18216
|
+
else setFokus(item.itemRef === fokus ? null : item.itemRef);
|
|
18217
|
+
}
|
|
18218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
|
|
18219
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18220
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Bild aus dem Bestand" }),
|
|
18221
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17559
18222
|
"input",
|
|
17560
18223
|
{
|
|
17561
18224
|
type: "search",
|
|
17562
18225
|
value: suche,
|
|
17563
18226
|
onChange: (e) => setSuche(e.target.value),
|
|
18227
|
+
onKeyDown: (e) => {
|
|
18228
|
+
if (e.key === "Enter") e.preventDefault();
|
|
18229
|
+
},
|
|
17564
18230
|
placeholder: "Suchen \u2026",
|
|
17565
18231
|
"data-testid": "bild-suche"
|
|
17566
18232
|
}
|
|
17567
18233
|
)
|
|
17568
18234
|
] }),
|
|
17569
|
-
|
|
17570
|
-
|
|
18235
|
+
items.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Bilder werden geladen \u2026" }),
|
|
18236
|
+
items.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
17571
18237
|
"Der Bildbestand ist nicht lesbar: ",
|
|
17572
|
-
|
|
18238
|
+
items.message
|
|
17573
18239
|
] }),
|
|
17574
|
-
|
|
17575
|
-
|
|
17576
|
-
"
|
|
18240
|
+
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." }),
|
|
18241
|
+
werke.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18242
|
+
"div",
|
|
17577
18243
|
{
|
|
17578
|
-
|
|
17579
|
-
|
|
17580
|
-
"data-testid":
|
|
17581
|
-
children:
|
|
17582
|
-
|
|
17583
|
-
|
|
17584
|
-
|
|
18244
|
+
className: "szenen-bildwahl__browser",
|
|
18245
|
+
ref: browser,
|
|
18246
|
+
"data-testid": "bildwahl-werke",
|
|
18247
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
|
|
18248
|
+
const deckbild = item.images[0];
|
|
18249
|
+
if (!deckbild) return null;
|
|
18250
|
+
const fokussiert = item.itemRef === fokus;
|
|
18251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18252
|
+
"button",
|
|
18253
|
+
{
|
|
18254
|
+
type: "button",
|
|
18255
|
+
className: `szenen-bildwahl__karte${fokussiert ? " is-fokus" : ""}`,
|
|
18256
|
+
onClick: () => werkAntippen(item),
|
|
18257
|
+
"aria-pressed": fokussiert,
|
|
18258
|
+
"data-testid": `item-waehlen-${item.itemRef}`,
|
|
18259
|
+
title: item.title,
|
|
18260
|
+
children: [
|
|
18261
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18262
|
+
Kachel,
|
|
18263
|
+
{
|
|
18264
|
+
quelle: quelleVon(deckbild),
|
|
18265
|
+
alt: item.title,
|
|
18266
|
+
...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
18267
|
+
}
|
|
18268
|
+
),
|
|
18269
|
+
item.images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
18270
|
+
"span",
|
|
18271
|
+
{
|
|
18272
|
+
className: "szenen-bildwahl__anzahl",
|
|
18273
|
+
"data-testid": `item-anzahl-${item.itemRef}`,
|
|
18274
|
+
children: [
|
|
18275
|
+
item.images.length,
|
|
18276
|
+
"x"
|
|
18277
|
+
]
|
|
18278
|
+
}
|
|
18279
|
+
),
|
|
18280
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
|
|
18281
|
+
]
|
|
18282
|
+
}
|
|
18283
|
+
) }, item.itemRef);
|
|
18284
|
+
}) })
|
|
17585
18285
|
}
|
|
17586
|
-
)
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
|
|
18286
|
+
),
|
|
18287
|
+
werk && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
|
|
18288
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("header", { className: "szenen-bildwahl__inspektorkopf", children: [
|
|
18289
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
18290
|
+
werk.title,
|
|
18291
|
+
" \xB7 ",
|
|
18292
|
+
werk.images.length,
|
|
18293
|
+
" Bilder"
|
|
18294
|
+
] }),
|
|
18295
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18296
|
+
"button",
|
|
18297
|
+
{
|
|
18298
|
+
type: "button",
|
|
18299
|
+
className: "szenen-bildwahl__zurueck",
|
|
18300
|
+
onClick: () => setFokus(null),
|
|
18301
|
+
"data-testid": "bildwahl-zurueck",
|
|
18302
|
+
children: "Schliessen"
|
|
18303
|
+
}
|
|
18304
|
+
)
|
|
18305
|
+
] }),
|
|
18306
|
+
/* @__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)(
|
|
18307
|
+
"button",
|
|
18308
|
+
{
|
|
18309
|
+
type: "button",
|
|
18310
|
+
className: `szenen-bildwahl__variante${istGewaehlt(bild.mediaRef) ? " is-gewaehlt" : ""}`,
|
|
18311
|
+
onClick: () => onWaehlen(bild),
|
|
18312
|
+
"aria-pressed": istGewaehlt(bild.mediaRef),
|
|
18313
|
+
"data-testid": `bild-waehlen-${bild.mediaRef}`,
|
|
18314
|
+
title: bild.title,
|
|
18315
|
+
children: [
|
|
18316
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
18317
|
+
Kachel,
|
|
18318
|
+
{
|
|
18319
|
+
quelle: quelleVon(bild),
|
|
18320
|
+
alt: bild.title,
|
|
18321
|
+
...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
18322
|
+
}
|
|
18323
|
+
),
|
|
18324
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "szenen-bildwahl__nummer", children: [
|
|
18325
|
+
"#",
|
|
18326
|
+
position + 1
|
|
18327
|
+
] })
|
|
18328
|
+
]
|
|
18329
|
+
}
|
|
18330
|
+
) }, bild.mediaRef)) })
|
|
18331
|
+
] }),
|
|
18332
|
+
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: [
|
|
18333
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
|
|
18334
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
|
|
18335
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17590
18336
|
"button",
|
|
17591
18337
|
{
|
|
17592
18338
|
type: "button",
|
|
@@ -17605,26 +18351,29 @@ async function digestOf(datei) {
|
|
|
17605
18351
|
return [...new Uint8Array(hash)].map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
17606
18352
|
}
|
|
17607
18353
|
var DeriveArea = ({ port, contextId }) => {
|
|
17608
|
-
const [policyVersionId, setPolicyVersionId] = (0,
|
|
17609
|
-
const [modus, setModus] = (0,
|
|
17610
|
-
const [promptText, setPromptText] = (0,
|
|
17611
|
-
const [dateien, setDateien] = (0,
|
|
17612
|
-
const [bestandsbilder, setBestandsbilder] = (0,
|
|
17613
|
-
const [laeuft, setLaeuft] = (0,
|
|
17614
|
-
const [lauf, setLauf] = (0,
|
|
17615
|
-
const [meldung, setMeldung] = (0,
|
|
17616
|
-
const [uebernommen, setUebernommen] = (0,
|
|
17617
|
-
const [titel, setTitel] = (0,
|
|
17618
|
-
const [referenzen, setReferenzen] = (0,
|
|
17619
|
-
const [beanstandung, setBeanstandung] = (0,
|
|
17620
|
-
const [zusatz, setZusatz] = (0,
|
|
18354
|
+
const [policyVersionId, setPolicyVersionId] = (0, import_react16.useState)("");
|
|
18355
|
+
const [modus, setModus] = (0, import_react16.useState)("prompt");
|
|
18356
|
+
const [promptText, setPromptText] = (0, import_react16.useState)("");
|
|
18357
|
+
const [dateien, setDateien] = (0, import_react16.useState)([]);
|
|
18358
|
+
const [bestandsbilder, setBestandsbilder] = (0, import_react16.useState)([]);
|
|
18359
|
+
const [laeuft, setLaeuft] = (0, import_react16.useState)(false);
|
|
18360
|
+
const [lauf, setLauf] = (0, import_react16.useState)(null);
|
|
18361
|
+
const [meldung, setMeldung] = (0, import_react16.useState)(null);
|
|
18362
|
+
const [uebernommen, setUebernommen] = (0, import_react16.useState)({});
|
|
18363
|
+
const [titel, setTitel] = (0, import_react16.useState)({});
|
|
18364
|
+
const [referenzen, setReferenzen] = (0, import_react16.useState)({});
|
|
18365
|
+
const [beanstandung, setBeanstandung] = (0, import_react16.useState)(null);
|
|
18366
|
+
const [zusatz, setZusatz] = (0, import_react16.useState)("");
|
|
17621
18367
|
const [regeln] = usePortQuery(
|
|
17622
18368
|
() => port.derivation.listPolicies(contextId),
|
|
17623
18369
|
[port, contextId]
|
|
17624
18370
|
);
|
|
17625
18371
|
const gewaehlt = regeln.status === "ready" ? regeln.value.find((r) => r.versionId === policyVersionId) ?? null : null;
|
|
17626
18372
|
async function starten(folgt) {
|
|
17627
|
-
if (!gewaehlt)
|
|
18373
|
+
if (!gewaehlt) {
|
|
18374
|
+
setMeldung("Bitte zuerst eine Rekonstruktionsregel waehlen \u2014 ohne sie ist kein Lauf reproduzierbar (D-03).");
|
|
18375
|
+
return;
|
|
18376
|
+
}
|
|
17628
18377
|
setLaeuft(true);
|
|
17629
18378
|
setMeldung(null);
|
|
17630
18379
|
setLauf(null);
|
|
@@ -17695,12 +18444,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17695
18444
|
const text = beanstandung ?? vorgabeBeanstandung(satz);
|
|
17696
18445
|
const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
|
|
17697
18446
|
const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
|
|
17698
|
-
return /* @__PURE__ */ (0,
|
|
17699
|
-
/* @__PURE__ */ (0,
|
|
17700
|
-
/* @__PURE__ */ (0,
|
|
17701
|
-
/* @__PURE__ */ (0,
|
|
17702
|
-
/* @__PURE__ */ (0,
|
|
17703
|
-
/* @__PURE__ */ (0,
|
|
18447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
|
|
18448
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
|
|
18449
|
+
/* @__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." }),
|
|
18450
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18451
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Beanstandung" }),
|
|
18452
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17704
18453
|
"textarea",
|
|
17705
18454
|
{
|
|
17706
18455
|
rows: 4,
|
|
@@ -17710,9 +18459,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17710
18459
|
}
|
|
17711
18460
|
)
|
|
17712
18461
|
] }),
|
|
17713
|
-
/* @__PURE__ */ (0,
|
|
17714
|
-
/* @__PURE__ */ (0,
|
|
17715
|
-
/* @__PURE__ */ (0,
|
|
18462
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18463
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
|
|
18464
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17716
18465
|
"textarea",
|
|
17717
18466
|
{
|
|
17718
18467
|
rows: 2,
|
|
@@ -17723,8 +18472,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17723
18472
|
}
|
|
17724
18473
|
)
|
|
17725
18474
|
] }),
|
|
17726
|
-
bilderFehlen && /* @__PURE__ */ (0,
|
|
17727
|
-
/* @__PURE__ */ (0,
|
|
18475
|
+
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." }),
|
|
18476
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17728
18477
|
"button",
|
|
17729
18478
|
{
|
|
17730
18479
|
type: "button",
|
|
@@ -17766,19 +18515,19 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17766
18515
|
setMeldung(ergebnis.message);
|
|
17767
18516
|
}
|
|
17768
18517
|
}
|
|
17769
|
-
return /* @__PURE__ */ (0,
|
|
17770
|
-
/* @__PURE__ */ (0,
|
|
17771
|
-
regeln.status === "loading" && /* @__PURE__ */ (0,
|
|
17772
|
-
regeln.status === "error" && /* @__PURE__ */ (0,
|
|
18518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
|
|
18519
|
+
/* @__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." }),
|
|
18520
|
+
regeln.status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Regeln werden geladen \u2026" }),
|
|
18521
|
+
regeln.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-error", role: "alert", children: [
|
|
17773
18522
|
"Die Regeln konnten nicht gelesen werden: ",
|
|
17774
18523
|
regeln.message
|
|
17775
18524
|
] }),
|
|
17776
|
-
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0,
|
|
18525
|
+
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-empty", children: [
|
|
17777
18526
|
"In diesem Kontext ist keine Rekonstruktionsregel (",
|
|
17778
|
-
/* @__PURE__ */ (0,
|
|
18527
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: "scene_derivation_policy" }),
|
|
17779
18528
|
') 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.'
|
|
17780
18529
|
] }),
|
|
17781
|
-
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0,
|
|
18530
|
+
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
17782
18531
|
"form",
|
|
17783
18532
|
{
|
|
17784
18533
|
className: "szenen-form",
|
|
@@ -17787,17 +18536,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17787
18536
|
void starten();
|
|
17788
18537
|
},
|
|
17789
18538
|
children: [
|
|
17790
|
-
/* @__PURE__ */ (0,
|
|
17791
|
-
/* @__PURE__ */ (0,
|
|
17792
|
-
/* @__PURE__ */ (0,
|
|
18539
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18540
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Regel" }),
|
|
18541
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
17793
18542
|
"select",
|
|
17794
18543
|
{
|
|
17795
18544
|
value: policyVersionId,
|
|
17796
18545
|
onChange: (e) => setPolicyVersionId(e.target.value),
|
|
17797
18546
|
"data-testid": "regel-auswahl",
|
|
17798
18547
|
children: [
|
|
17799
|
-
/* @__PURE__ */ (0,
|
|
17800
|
-
regeln.value.map((regel) => /* @__PURE__ */ (0,
|
|
18548
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
|
|
18549
|
+
regeln.value.map((regel) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("option", { value: regel.versionId, children: [
|
|
17801
18550
|
regel.title,
|
|
17802
18551
|
" (",
|
|
17803
18552
|
regel.produces.join(", "),
|
|
@@ -17807,21 +18556,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17807
18556
|
}
|
|
17808
18557
|
)
|
|
17809
18558
|
] }),
|
|
17810
|
-
/* @__PURE__ */ (0,
|
|
17811
|
-
/* @__PURE__ */ (0,
|
|
17812
|
-
/* @__PURE__ */ (0,
|
|
18559
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Eingang" }),
|
|
18561
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17813
18562
|
"select",
|
|
17814
18563
|
{
|
|
17815
18564
|
value: modus,
|
|
17816
18565
|
onChange: (e) => setModus(e.target.value),
|
|
17817
18566
|
"data-testid": "modus-auswahl",
|
|
17818
|
-
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0,
|
|
18567
|
+
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: m, children: MODUS_TEXT[m] }, m))
|
|
17819
18568
|
}
|
|
17820
18569
|
)
|
|
17821
18570
|
] }),
|
|
17822
|
-
modus !== "image" && /* @__PURE__ */ (0,
|
|
17823
|
-
/* @__PURE__ */ (0,
|
|
17824
|
-
/* @__PURE__ */ (0,
|
|
18571
|
+
modus !== "image" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18572
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Referenzprompt" }),
|
|
18573
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17825
18574
|
"textarea",
|
|
17826
18575
|
{
|
|
17827
18576
|
value: promptText,
|
|
@@ -17831,8 +18580,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17831
18580
|
}
|
|
17832
18581
|
)
|
|
17833
18582
|
] }),
|
|
17834
|
-
modus !== "prompt" && /* @__PURE__ */ (0,
|
|
17835
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
18583
|
+
modus !== "prompt" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
18584
|
+
port.imageLibrary && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17836
18585
|
BildWaehler,
|
|
17837
18586
|
{
|
|
17838
18587
|
port,
|
|
@@ -17841,9 +18590,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17841
18590
|
onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
|
|
17842
18591
|
}
|
|
17843
18592
|
),
|
|
17844
|
-
/* @__PURE__ */ (0,
|
|
17845
|
-
/* @__PURE__ */ (0,
|
|
17846
|
-
/* @__PURE__ */ (0,
|
|
18593
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18594
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
|
|
18595
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17847
18596
|
"input",
|
|
17848
18597
|
{
|
|
17849
18598
|
type: "file",
|
|
@@ -17853,40 +18602,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17853
18602
|
"data-testid": "bild-eingabe"
|
|
17854
18603
|
}
|
|
17855
18604
|
),
|
|
17856
|
-
port.imageLibrary && /* @__PURE__ */ (0,
|
|
18605
|
+
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." })
|
|
17857
18606
|
] })
|
|
17858
18607
|
] }),
|
|
17859
|
-
/* @__PURE__ */ (0,
|
|
18608
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
|
|
17860
18609
|
]
|
|
17861
18610
|
}
|
|
17862
18611
|
),
|
|
17863
|
-
meldung && /* @__PURE__ */ (0,
|
|
17864
|
-
lauf && lauf.status === "failed" && /* @__PURE__ */ (0,
|
|
17865
|
-
/* @__PURE__ */ (0,
|
|
17866
|
-
/* @__PURE__ */ (0,
|
|
17867
|
-
/* @__PURE__ */ (0,
|
|
18612
|
+
meldung && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
|
|
18613
|
+
lauf && lauf.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
|
|
18614
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Der Lauf ist gescheitert" }),
|
|
18615
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
|
|
18616
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: lauf.failure?.class }),
|
|
17868
18617
|
" \u2014 ",
|
|
17869
18618
|
lauf.failure?.message
|
|
17870
18619
|
] }),
|
|
17871
|
-
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0,
|
|
17872
|
-
/* @__PURE__ */ (0,
|
|
17873
|
-
/* @__PURE__ */ (0,
|
|
18620
|
+
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
|
|
18621
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Befunde" }),
|
|
18622
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
|
|
17874
18623
|
] }),
|
|
17875
|
-
/* @__PURE__ */ (0,
|
|
17876
|
-
/* @__PURE__ */ (0,
|
|
17877
|
-
/* @__PURE__ */ (0,
|
|
17878
|
-
/* @__PURE__ */ (0,
|
|
18624
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Herkunft, { lauf }),
|
|
18625
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Widerspruch, { lauf }),
|
|
18626
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Belege, { lauf }),
|
|
18627
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RecoveryPanel, { port, lauf }),
|
|
17879
18628
|
folgeblock(lauf)
|
|
17880
18629
|
] }),
|
|
17881
|
-
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0,
|
|
17882
|
-
/* @__PURE__ */ (0,
|
|
17883
|
-
/* @__PURE__ */ (0,
|
|
17884
|
-
/* @__PURE__ */ (0,
|
|
17885
|
-
/* @__PURE__ */ (0,
|
|
17886
|
-
lauf.conflicts.length > 0 && /* @__PURE__ */ (0,
|
|
17887
|
-
/* @__PURE__ */ (0,
|
|
17888
|
-
/* @__PURE__ */ (0,
|
|
17889
|
-
/* @__PURE__ */ (0,
|
|
18630
|
+
lauf && lauf.status === "succeeded" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
|
|
18631
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "Vorschlag" }),
|
|
18632
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Herkunft, { lauf }),
|
|
18633
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Widerspruch, { lauf }),
|
|
18634
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "szenen-run__feedback", children: lauf.feedback }),
|
|
18635
|
+
lauf.conflicts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
|
|
18636
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
|
|
18637
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
18638
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: k.field }),
|
|
17890
18639
|
": Bild sagt \u201E",
|
|
17891
18640
|
k.from_image,
|
|
17892
18641
|
'", Prompt sagt \u201E',
|
|
@@ -17894,31 +18643,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17894
18643
|
'". Nichts davon wurde \xFCbernommen.'
|
|
17895
18644
|
] }, i)) })
|
|
17896
18645
|
] }),
|
|
17897
|
-
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0,
|
|
17898
|
-
/* @__PURE__ */ (0,
|
|
17899
|
-
/* @__PURE__ */ (0,
|
|
17900
|
-
/* @__PURE__ */ (0,
|
|
18646
|
+
lauf.not_derivable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
|
|
18647
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Nicht ableitbar" }),
|
|
18648
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { children: [
|
|
18649
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: n.field }),
|
|
17901
18650
|
": ",
|
|
17902
18651
|
n.reason
|
|
17903
18652
|
] }, i)) })
|
|
17904
18653
|
] }),
|
|
17905
|
-
lauf.assumptions.length > 0 && /* @__PURE__ */ (0,
|
|
17906
|
-
/* @__PURE__ */ (0,
|
|
17907
|
-
/* @__PURE__ */ (0,
|
|
18654
|
+
lauf.assumptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
|
|
18655
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: "Erschlossen, nicht belegt" }),
|
|
18656
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: a }, i)) })
|
|
17908
18657
|
] }),
|
|
17909
18658
|
lauf.proposals.map((vorschlag) => {
|
|
17910
18659
|
const bezug = REFERENCE_FIELD[vorschlag.type];
|
|
17911
18660
|
const fertig = uebernommen[vorschlag.type];
|
|
17912
|
-
return /* @__PURE__ */ (0,
|
|
18661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
17913
18662
|
"article",
|
|
17914
18663
|
{
|
|
17915
18664
|
className: "szenen-proposal",
|
|
17916
18665
|
"data-testid": `vorschlag-${vorschlag.type}`,
|
|
17917
18666
|
children: [
|
|
17918
|
-
/* @__PURE__ */ (0,
|
|
17919
|
-
!fertig && /* @__PURE__ */ (0,
|
|
17920
|
-
/* @__PURE__ */ (0,
|
|
17921
|
-
/* @__PURE__ */ (0,
|
|
18667
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h4", { children: vorschlag.type }),
|
|
18668
|
+
!fertig && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "szenen-field", children: [
|
|
18669
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Titel" }),
|
|
18670
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17922
18671
|
"input",
|
|
17923
18672
|
{
|
|
17924
18673
|
type: "text",
|
|
@@ -17932,9 +18681,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17932
18681
|
}
|
|
17933
18682
|
)
|
|
17934
18683
|
] }),
|
|
17935
|
-
/* @__PURE__ */ (0,
|
|
17936
|
-
bezug && !fertig && /* @__PURE__ */ (0,
|
|
17937
|
-
/* @__PURE__ */ (0,
|
|
18684
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
|
|
18685
|
+
bezug && !fertig && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
18686
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17938
18687
|
ReferencePicker,
|
|
17939
18688
|
{
|
|
17940
18689
|
port,
|
|
@@ -17948,30 +18697,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17948
18697
|
}))
|
|
17949
18698
|
}
|
|
17950
18699
|
),
|
|
17951
|
-
referenzen[vorschlag.type] ? /* @__PURE__ */ (0,
|
|
18700
|
+
referenzen[vorschlag.type] ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
|
|
17952
18701
|
"Zeigt auf Version ",
|
|
17953
|
-
/* @__PURE__ */ (0,
|
|
18702
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: referenzen[vorschlag.type] }),
|
|
17954
18703
|
"."
|
|
17955
18704
|
] }) : (
|
|
17956
18705
|
/* Der Grund steht **vor** der Handlung. Den Nutzer erst
|
|
17957
18706
|
auf einen Knopf drücken zu lassen, um ihm dann eine
|
|
17958
18707
|
Ablehnung zu zeigen, ist keine Auskunft. */
|
|
17959
|
-
/* @__PURE__ */ (0,
|
|
18708
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
|
|
17960
18709
|
"Diese ",
|
|
17961
|
-
/* @__PURE__ */ (0,
|
|
18710
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Einzel\xFCbernahme" }),
|
|
17962
18711
|
" braucht eine ver\xF6ffentlichte ",
|
|
17963
18712
|
bezug.refersTo,
|
|
17964
18713
|
"-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 ",
|
|
17965
|
-
/* @__PURE__ */ (0,
|
|
18714
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Draft-Kette" }),
|
|
17966
18715
|
": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
|
|
17967
18716
|
] })
|
|
17968
18717
|
)
|
|
17969
18718
|
] }),
|
|
17970
|
-
fertig ? /* @__PURE__ */ (0,
|
|
18719
|
+
fertig ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "szenen-proposal__done", children: [
|
|
17971
18720
|
"Als Entwurf \xFCbernommen: ",
|
|
17972
|
-
/* @__PURE__ */ (0,
|
|
18721
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { children: fertig }),
|
|
17973
18722
|
". Er ist noch nicht ver\xF6ffentlicht."
|
|
17974
|
-
] }) : /* @__PURE__ */ (0,
|
|
18723
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17975
18724
|
"button",
|
|
17976
18725
|
{
|
|
17977
18726
|
type: "button",
|
|
@@ -17986,39 +18735,39 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
17986
18735
|
vorschlag.type
|
|
17987
18736
|
);
|
|
17988
18737
|
}),
|
|
17989
|
-
/* @__PURE__ */ (0,
|
|
17990
|
-
/* @__PURE__ */ (0,
|
|
18738
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChainActions, { port, runId: lauf.run_id }),
|
|
18739
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Belege, { lauf }),
|
|
17991
18740
|
folgeblock(lauf)
|
|
17992
18741
|
] })
|
|
17993
18742
|
] });
|
|
17994
18743
|
};
|
|
17995
18744
|
|
|
17996
18745
|
// src/features/szenen/SzenenView.tsx
|
|
17997
|
-
var
|
|
18746
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
17998
18747
|
var SzenenView = ({
|
|
17999
18748
|
port,
|
|
18000
18749
|
contextId = null,
|
|
18001
18750
|
initialArea,
|
|
18002
18751
|
onAreaChange
|
|
18003
18752
|
}) => {
|
|
18004
|
-
const bereiche = (0,
|
|
18005
|
-
const faehig = (0,
|
|
18006
|
-
const [aktiv, setAktiv] = (0,
|
|
18753
|
+
const bereiche = (0, import_react17.useMemo)(() => areasFor(port), [port]);
|
|
18754
|
+
const faehig = (0, import_react17.useMemo)(() => capabilitiesOf(port), [port]);
|
|
18755
|
+
const [aktiv, setAktiv] = (0, import_react17.useState)(() => resolveArea(port, initialArea));
|
|
18007
18756
|
const wechsle = (id) => {
|
|
18008
18757
|
setAktiv(id);
|
|
18009
18758
|
onAreaChange?.(id);
|
|
18010
18759
|
};
|
|
18011
18760
|
const aktuellerBereich = bereiche.find((b) => b.id === aktiv) ?? bereiche[0];
|
|
18012
|
-
return /* @__PURE__ */ (0,
|
|
18013
|
-
/* @__PURE__ */ (0,
|
|
18014
|
-
/* @__PURE__ */ (0,
|
|
18015
|
-
/* @__PURE__ */ (0,
|
|
18016
|
-
/* @__PURE__ */ (0,
|
|
18017
|
-
/* @__PURE__ */ (0,
|
|
18761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "szenen-view", "data-testid": "szenen-view", children: [
|
|
18762
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "szenen-view__intro", children: [
|
|
18763
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
18764
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
|
|
18765
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: "Bildprompt aus einer Szene" }),
|
|
18766
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "Bausteine w\xE4hlen, Szene und Bildaufbau festlegen und daraus einen wiederholbaren Prompt erzeugen." })
|
|
18018
18767
|
] }),
|
|
18019
|
-
/* @__PURE__ */ (0,
|
|
18768
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "szenen-view__step", children: aktuellerBereich.title })
|
|
18020
18769
|
] }),
|
|
18021
|
-
/* @__PURE__ */ (0,
|
|
18770
|
+
/* @__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)(
|
|
18022
18771
|
"button",
|
|
18023
18772
|
{
|
|
18024
18773
|
type: "button",
|
|
@@ -18032,9 +18781,9 @@ var SzenenView = ({
|
|
|
18032
18781
|
},
|
|
18033
18782
|
bereich.id
|
|
18034
18783
|
)) }),
|
|
18035
|
-
/* @__PURE__ */ (0,
|
|
18036
|
-
aktiv === "derive" && port.derivation && /* @__PURE__ */ (0,
|
|
18037
|
-
aktiv === "elements" && /* @__PURE__ */ (0,
|
|
18784
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
|
|
18785
|
+
aktiv === "derive" && port.derivation && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DeriveArea, { port, contextId }),
|
|
18786
|
+
aktiv === "elements" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18038
18787
|
ElementsArea,
|
|
18039
18788
|
{
|
|
18040
18789
|
port,
|
|
@@ -18044,15 +18793,15 @@ var SzenenView = ({
|
|
|
18044
18793
|
listTitle: "Bausteine"
|
|
18045
18794
|
}
|
|
18046
18795
|
),
|
|
18047
|
-
aktiv === "scene" && /* @__PURE__ */ (0,
|
|
18048
|
-
aktiv === "setup" && /* @__PURE__ */ (0,
|
|
18049
|
-
aktiv === "shot" && /* @__PURE__ */ (0,
|
|
18050
|
-
aktiv === "media" && port.media && /* @__PURE__ */ (0,
|
|
18796
|
+
aktiv === "scene" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SceneArea, { port, contextId }),
|
|
18797
|
+
aktiv === "setup" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SetupArea, { port, contextId }),
|
|
18798
|
+
aktiv === "shot" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShotArea, { port, contextId }),
|
|
18799
|
+
aktiv === "media" && port.media && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MediaArea, { port, contextId })
|
|
18051
18800
|
] }),
|
|
18052
|
-
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0,
|
|
18053
|
-
/* @__PURE__ */ (0,
|
|
18054
|
-
!faehig.saveRunAsItem && /* @__PURE__ */ (0,
|
|
18055
|
-
!faehig.media && /* @__PURE__ */ (0,
|
|
18801
|
+
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "szenen-view__host-notes", children: [
|
|
18802
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("summary", { children: "Funktionen dieses Hosts" }),
|
|
18803
|
+
!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." }),
|
|
18804
|
+
!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." })
|
|
18056
18805
|
] })
|
|
18057
18806
|
] });
|
|
18058
18807
|
};
|
|
@@ -18174,13 +18923,16 @@ var SzenenView = ({
|
|
|
18174
18923
|
freezeDraftChain,
|
|
18175
18924
|
freezeSceneWorkingState,
|
|
18176
18925
|
getSzenenSchemas,
|
|
18926
|
+
gruppiereZuItems,
|
|
18177
18927
|
hasPlacementCapability,
|
|
18178
18928
|
isKnownElementType,
|
|
18179
18929
|
isOk,
|
|
18180
18930
|
isProjectionCurrent,
|
|
18181
18931
|
isSzenenItemId,
|
|
18182
18932
|
itemIdForRun,
|
|
18933
|
+
ladeVorschauen,
|
|
18183
18934
|
linkFor,
|
|
18935
|
+
locatorTeile,
|
|
18184
18936
|
logRevisionOf,
|
|
18185
18937
|
mergeSzenenBatchOrigin,
|
|
18186
18938
|
noticeFor,
|