@rslsp1/fa-app-tools 5.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-TW4IDHAN.mjs → chunk-3MUI4ZV7.mjs} +1299 -784
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1711 -1198
- package/dist/index.mjs +3 -3
- package/dist/szenen.d.mts +8 -0
- package/dist/szenen.d.ts +8 -0
- package/dist/szenen.js +1311 -796
- package/dist/szenen.mjs +1 -1
- package/package.json +1 -1
|
@@ -149,15 +149,15 @@ function resolveRef(ref, baseId, schemas) {
|
|
|
149
149
|
const target = hash === -1 ? ref : ref.slice(0, hash);
|
|
150
150
|
const pointer = hash === -1 ? "" : ref.slice(hash + 1);
|
|
151
151
|
const documentId = target === "" ? baseId : new URL(target, baseId).href;
|
|
152
|
-
const
|
|
153
|
-
if (!
|
|
152
|
+
const document2 = schemas.byId.get(documentId);
|
|
153
|
+
if (!document2) {
|
|
154
154
|
throw new UnsupportedSchemaError(`Referenz "${ref}" zeigt auf unbekanntes Schema ${documentId}.`);
|
|
155
155
|
}
|
|
156
|
-
if (pointer === "" || pointer === "/") return { schema:
|
|
156
|
+
if (pointer === "" || pointer === "/") return { schema: document2, baseId: documentId };
|
|
157
157
|
if (!pointer.startsWith("/")) {
|
|
158
158
|
throw new UnsupportedSchemaError(`Referenz "${ref}": nur JSON-Pointer werden aufgeloest.`);
|
|
159
159
|
}
|
|
160
|
-
let node =
|
|
160
|
+
let node = document2;
|
|
161
161
|
for (const rawSegment of pointer.slice(1).split("/")) {
|
|
162
162
|
const segment = unescapePointer(rawSegment);
|
|
163
163
|
if (!isObject(node) || !(segment in node)) {
|
|
@@ -5241,6 +5241,7 @@ async function ladeVorschauen(port, mediaRefs, fertig, optionen = {}) {
|
|
|
5241
5241
|
const ergebnis = await laden.call(port, ref);
|
|
5242
5242
|
if (lauf?.abgebrochen) return;
|
|
5243
5243
|
if (ergebnis.kind === "ok") fertig(ref, ergebnis.value);
|
|
5244
|
+
else optionen.gescheitert?.(ref, ergebnis.message);
|
|
5244
5245
|
}
|
|
5245
5246
|
}
|
|
5246
5247
|
await Promise.all(
|
|
@@ -6206,10 +6207,10 @@ async function runSceneDerivation(input, port, userPrompt) {
|
|
|
6206
6207
|
}
|
|
6207
6208
|
|
|
6208
6209
|
// src/features/szenen/SzenenView.tsx
|
|
6209
|
-
import { useMemo as useMemo4, useState as
|
|
6210
|
+
import { useMemo as useMemo4, useState as useState17 } from "react";
|
|
6210
6211
|
|
|
6211
6212
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
6212
|
-
import { useState as
|
|
6213
|
+
import { useState as useState12 } from "react";
|
|
6213
6214
|
|
|
6214
6215
|
// src/features/szenen/areas/usePortQuery.ts
|
|
6215
6216
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -6241,7 +6242,7 @@ function usePortQuery(frage, abhaengigkeiten) {
|
|
|
6241
6242
|
}
|
|
6242
6243
|
|
|
6243
6244
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
6244
|
-
import { useEffect as
|
|
6245
|
+
import { useEffect as useEffect5, useMemo as useMemo2, useState as useState10 } from "react";
|
|
6245
6246
|
|
|
6246
6247
|
// src/features/szenen/elementLabels.ts
|
|
6247
6248
|
var LABELS = {
|
|
@@ -6601,6 +6602,9 @@ var LABELS2 = {
|
|
|
6601
6602
|
user_instruction: "Nutzeranweisung",
|
|
6602
6603
|
prompt_render_settings: "Prompt-Erzeugung",
|
|
6603
6604
|
blender_render_settings: "Blender-Ausgabe",
|
|
6605
|
+
// Nur Darstellung, keine Schemaaenderung (A4): Der Schluessel bleibt
|
|
6606
|
+
// `overrides`, und er steht als `<code>` weiterhin daneben.
|
|
6607
|
+
overrides: "Render-Abweichungen",
|
|
6604
6608
|
camera_rig: "Kamera-Rig",
|
|
6605
6609
|
media_refs: "Medien",
|
|
6606
6610
|
external_refs: "Externe Referenzen",
|
|
@@ -7579,41 +7583,91 @@ var FeldControl = (props) => {
|
|
|
7579
7583
|
);
|
|
7580
7584
|
}
|
|
7581
7585
|
};
|
|
7586
|
+
var LANGE_ERKLAERUNG = 120;
|
|
7587
|
+
function ersterSatz(text) {
|
|
7588
|
+
const ende = /[.!?](\s|$)/.exec(text);
|
|
7589
|
+
return ende ? text.slice(0, ende.index + 1) : text;
|
|
7590
|
+
}
|
|
7591
|
+
var Erklaerung = ({ text, testId }) => {
|
|
7592
|
+
const ganz = text.trim();
|
|
7593
|
+
const kern = ersterSatz(ganz);
|
|
7594
|
+
const rest = ganz.slice(kern.length).trim();
|
|
7595
|
+
if (ganz.length <= LANGE_ERKLAERUNG || !rest) {
|
|
7596
|
+
return /* @__PURE__ */ jsx("small", { "data-testid": `erklaerung-${testId}`, children: ganz });
|
|
7597
|
+
}
|
|
7598
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7599
|
+
/* @__PURE__ */ jsx("small", { "data-testid": `erklaerung-${testId}`, children: kern }),
|
|
7600
|
+
/* @__PURE__ */ jsxs("details", { className: "szenen-detail__warum", "data-testid": `warum-${testId}`, children: [
|
|
7601
|
+
/* @__PURE__ */ jsx("summary", { children: "Warum?" }),
|
|
7602
|
+
/* @__PURE__ */ jsx("small", { children: rest })
|
|
7603
|
+
] })
|
|
7604
|
+
] });
|
|
7605
|
+
};
|
|
7606
|
+
function gruppeKonfiguriert(feld, formular) {
|
|
7607
|
+
return Object.keys(payloadFromForm([feld], formular)).length > 0;
|
|
7608
|
+
}
|
|
7582
7609
|
var SchemaFieldRow = (props) => {
|
|
7583
7610
|
const { feld, elementType, formular } = props;
|
|
7584
7611
|
const label = feldLabel(elementType, feld.path, feld.name);
|
|
7585
7612
|
if (feld.kind === "group") {
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7613
|
+
const konfiguriert = gruppeKonfiguriert(feld, formular);
|
|
7614
|
+
return /* @__PURE__ */ jsxs(
|
|
7615
|
+
"details",
|
|
7616
|
+
{
|
|
7617
|
+
className: "szenen-detail__group",
|
|
7618
|
+
"data-testid": `gruppe-${feld.path}`,
|
|
7619
|
+
"data-konfiguriert": konfiguriert ? "ja" : "nein",
|
|
7620
|
+
open: feld.required,
|
|
7621
|
+
children: [
|
|
7622
|
+
/* @__PURE__ */ jsxs("summary", { children: [
|
|
7623
|
+
/* @__PURE__ */ jsx("span", { className: "szenen-detail__group-titel", children: label }),
|
|
7624
|
+
feld.required ? /* @__PURE__ */ jsx("strong", { title: "Pflichtfeld", children: " *" }) : (
|
|
7625
|
+
// A2: Dass hier schon etwas steht, muss man im
|
|
7626
|
+
// geschlossenen Zustand sehen — sonst übersieht man
|
|
7627
|
+
// eine gesetzte Blender-Ausgabe genau so lange, bis
|
|
7628
|
+
// sie im Ergebnis auftaucht.
|
|
7629
|
+
/* @__PURE__ */ jsx(
|
|
7630
|
+
"span",
|
|
7631
|
+
{
|
|
7632
|
+
className: "szenen-detail__group-status",
|
|
7633
|
+
"data-testid": `gruppe-${feld.path}-status`,
|
|
7634
|
+
children: konfiguriert ? "konfiguriert" : "optional"
|
|
7635
|
+
}
|
|
7636
|
+
)
|
|
7637
|
+
)
|
|
7638
|
+
] }),
|
|
7639
|
+
/* @__PURE__ */ jsxs("div", { className: "szenen-detail__group-inhalt", children: [
|
|
7640
|
+
feld.description && /* @__PURE__ */ jsx(Erklaerung, { text: feld.description, testId: `gruppe-${feld.path}` }),
|
|
7641
|
+
(feld.children ?? []).map((kind) => /* @__PURE__ */ jsx(SchemaFieldRow, { ...props, feld: kind }, kind.path))
|
|
7642
|
+
] })
|
|
7643
|
+
]
|
|
7644
|
+
}
|
|
7645
|
+
);
|
|
7594
7646
|
}
|
|
7595
7647
|
const wert = formular[feld.path] ?? "";
|
|
7596
|
-
return /* @__PURE__ */ jsxs("
|
|
7597
|
-
/* @__PURE__ */ jsxs("
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7648
|
+
return /* @__PURE__ */ jsxs("div", { className: "szenen-detail__fieldrow", "data-feld": feld.path, children: [
|
|
7649
|
+
/* @__PURE__ */ jsxs("label", { className: "szenen-detail__field", children: [
|
|
7650
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
7651
|
+
/* @__PURE__ */ jsx("span", { className: "szenen-detail__field-label", children: label }),
|
|
7652
|
+
feld.required && /* @__PURE__ */ jsx("strong", { title: "Pflichtfeld", children: " *" }),
|
|
7653
|
+
label !== feld.name && /* @__PURE__ */ jsx("code", { className: "szenen-detail__field-key", children: feld.name }),
|
|
7654
|
+
feld.complexHint && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ jsxs("em", { children: [
|
|
7655
|
+
" \u2014 ",
|
|
7656
|
+
feld.complexHint
|
|
7657
|
+
] })
|
|
7658
|
+
] }),
|
|
7659
|
+
/* @__PURE__ */ jsx(FeldControl, { ...props, wert }),
|
|
7660
|
+
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ jsx(
|
|
7661
|
+
NullSchalter,
|
|
7662
|
+
{
|
|
7663
|
+
feld,
|
|
7664
|
+
wert,
|
|
7665
|
+
onChange: props.onChange,
|
|
7666
|
+
readOnly: props.readOnly
|
|
7667
|
+
}
|
|
7668
|
+
)
|
|
7605
7669
|
] }),
|
|
7606
|
-
/* @__PURE__ */ jsx(
|
|
7607
|
-
feld.nullable && feld.kind !== "complex" && !hatFachlicheBedienung(elementType, feld) && /* @__PURE__ */ jsx(
|
|
7608
|
-
NullSchalter,
|
|
7609
|
-
{
|
|
7610
|
-
feld,
|
|
7611
|
-
wert,
|
|
7612
|
-
onChange: props.onChange,
|
|
7613
|
-
readOnly: props.readOnly
|
|
7614
|
-
}
|
|
7615
|
-
),
|
|
7616
|
-
feld.description && /* @__PURE__ */ jsx("small", { children: feld.description })
|
|
7670
|
+
feld.description && /* @__PURE__ */ jsx(Erklaerung, { text: feld.description, testId: feld.path })
|
|
7617
7671
|
] });
|
|
7618
7672
|
};
|
|
7619
7673
|
|
|
@@ -8280,11 +8334,162 @@ var VersionNavigator = ({
|
|
|
8280
8334
|
};
|
|
8281
8335
|
|
|
8282
8336
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
8283
|
-
import { useState as
|
|
8337
|
+
import { useState as useState9 } from "react";
|
|
8284
8338
|
|
|
8285
8339
|
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
8286
|
-
import { useState as
|
|
8340
|
+
import { useEffect as useEffect4, useRef as useRef2, useState as useState8 } from "react";
|
|
8341
|
+
|
|
8342
|
+
// src/features/szenen/areas/Bildbausteine.tsx
|
|
8343
|
+
import { useCallback, useEffect as useEffect3, useState as useState7 } from "react";
|
|
8287
8344
|
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
8345
|
+
var Kachel = ({
|
|
8346
|
+
quelle,
|
|
8347
|
+
alt,
|
|
8348
|
+
leerText
|
|
8349
|
+
}) => /* @__PURE__ */ jsx7("span", { className: "szenen-bildkachel", children: quelle ? /* @__PURE__ */ jsx7("img", { src: quelle, alt, loading: "lazy" }) : /* @__PURE__ */ jsx7("span", { className: "szenen-bildkachel__leer", title: leerText ?? alt, children: leerText ? /* @__PURE__ */ jsx7("span", { className: "szenen-bildkachel__zeichen", children: "?" }) : null }) });
|
|
8350
|
+
var BildViewer = ({
|
|
8351
|
+
bilder,
|
|
8352
|
+
position,
|
|
8353
|
+
onWechseln,
|
|
8354
|
+
onSchliessen,
|
|
8355
|
+
satzTitel,
|
|
8356
|
+
testId
|
|
8357
|
+
}) => {
|
|
8358
|
+
const anzahl = bilder.length;
|
|
8359
|
+
const bild = bilder[position];
|
|
8360
|
+
const blaettern = useCallback((schritt) => {
|
|
8361
|
+
if (anzahl === 0) return;
|
|
8362
|
+
onWechseln((position + schritt + anzahl) % anzahl);
|
|
8363
|
+
}, [anzahl, position, onWechseln]);
|
|
8364
|
+
useEffect3(() => {
|
|
8365
|
+
const taste = (e) => {
|
|
8366
|
+
if (e.key === "Escape") onSchliessen();
|
|
8367
|
+
else if (e.key === "ArrowLeft") blaettern(-1);
|
|
8368
|
+
else if (e.key === "ArrowRight") blaettern(1);
|
|
8369
|
+
};
|
|
8370
|
+
document.addEventListener("keydown", taste);
|
|
8371
|
+
return () => document.removeEventListener("keydown", taste);
|
|
8372
|
+
}, [blaettern, onSchliessen]);
|
|
8373
|
+
if (!bild) return null;
|
|
8374
|
+
return /* @__PURE__ */ jsxs7(
|
|
8375
|
+
"div",
|
|
8376
|
+
{
|
|
8377
|
+
className: "szenen-bildviewer",
|
|
8378
|
+
"data-testid": testId,
|
|
8379
|
+
role: "dialog",
|
|
8380
|
+
"aria-modal": "true",
|
|
8381
|
+
"aria-label": satzTitel ? `${satzTitel} \u2014 ${bild.titel}` : bild.titel,
|
|
8382
|
+
children: [
|
|
8383
|
+
/* @__PURE__ */ jsxs7("header", { className: "szenen-bildviewer__kopf", children: [
|
|
8384
|
+
/* @__PURE__ */ jsxs7("span", { className: "szenen-bildviewer__titel", children: [
|
|
8385
|
+
satzTitel ? `${satzTitel} \xB7 ` : "",
|
|
8386
|
+
bild.titel
|
|
8387
|
+
] }),
|
|
8388
|
+
/* @__PURE__ */ jsxs7("span", { className: "szenen-bildviewer__zaehler", "data-testid": `${testId}-zaehler`, children: [
|
|
8389
|
+
position + 1,
|
|
8390
|
+
" / ",
|
|
8391
|
+
anzahl
|
|
8392
|
+
] }),
|
|
8393
|
+
/* @__PURE__ */ jsx7(
|
|
8394
|
+
"button",
|
|
8395
|
+
{
|
|
8396
|
+
type: "button",
|
|
8397
|
+
className: "szenen-bildviewer__schliessen",
|
|
8398
|
+
onClick: onSchliessen,
|
|
8399
|
+
"data-testid": `${testId}-schliessen`,
|
|
8400
|
+
children: "Schliessen"
|
|
8401
|
+
}
|
|
8402
|
+
)
|
|
8403
|
+
] }),
|
|
8404
|
+
/* @__PURE__ */ jsxs7("div", { className: "szenen-bildviewer__buehne", children: [
|
|
8405
|
+
anzahl > 1 && /* @__PURE__ */ jsx7(
|
|
8406
|
+
"button",
|
|
8407
|
+
{
|
|
8408
|
+
type: "button",
|
|
8409
|
+
className: "szenen-bildviewer__blaettern",
|
|
8410
|
+
onClick: () => blaettern(-1),
|
|
8411
|
+
"aria-label": "Vorheriges Bild",
|
|
8412
|
+
"data-testid": `${testId}-zurueck`,
|
|
8413
|
+
children: "\u2039"
|
|
8414
|
+
}
|
|
8415
|
+
),
|
|
8416
|
+
/* @__PURE__ */ jsx7("span", { className: "szenen-bildviewer__rahmen", children: bild.quelle ? /* @__PURE__ */ jsx7(
|
|
8417
|
+
"img",
|
|
8418
|
+
{
|
|
8419
|
+
className: "szenen-bildviewer__bild",
|
|
8420
|
+
src: bild.quelle,
|
|
8421
|
+
alt: bild.titel,
|
|
8422
|
+
"data-testid": `${testId}-bild`
|
|
8423
|
+
}
|
|
8424
|
+
) : (
|
|
8425
|
+
// Auch gross bleibt eine fehlende Quelle eine Auskunft
|
|
8426
|
+
// und kein Textblock (R12.3).
|
|
8427
|
+
/* @__PURE__ */ jsx7("span", { className: "szenen-bildviewer__leer", "data-testid": `${testId}-leer`, children: bild.leerText ?? "F\xFCr dieses Bild gibt es keine anzeigbare Quelle." })
|
|
8428
|
+
) }),
|
|
8429
|
+
anzahl > 1 && /* @__PURE__ */ jsx7(
|
|
8430
|
+
"button",
|
|
8431
|
+
{
|
|
8432
|
+
type: "button",
|
|
8433
|
+
className: "szenen-bildviewer__blaettern",
|
|
8434
|
+
onClick: () => blaettern(1),
|
|
8435
|
+
"aria-label": "N\xE4chstes Bild",
|
|
8436
|
+
"data-testid": `${testId}-weiter`,
|
|
8437
|
+
children: "\u203A"
|
|
8438
|
+
}
|
|
8439
|
+
)
|
|
8440
|
+
] }),
|
|
8441
|
+
bild.details && /* @__PURE__ */ jsx7("div", { className: "szenen-bildviewer__details", "data-testid": `${testId}-details`, children: bild.details })
|
|
8442
|
+
]
|
|
8443
|
+
}
|
|
8444
|
+
);
|
|
8445
|
+
};
|
|
8446
|
+
var BildGalerie = ({ bilder, testId, satzTitel }) => {
|
|
8447
|
+
const [offen, setOffen] = useState7(null);
|
|
8448
|
+
useEffect3(() => {
|
|
8449
|
+
setOffen((vorher) => vorher !== null && vorher >= bilder.length ? null : vorher);
|
|
8450
|
+
}, [bilder.length]);
|
|
8451
|
+
if (bilder.length === 0) return null;
|
|
8452
|
+
return /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
8453
|
+
/* @__PURE__ */ jsx7("ul", { className: "szenen-bildgalerie", "data-testid": testId, children: bilder.map((bild, position) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs7(
|
|
8454
|
+
"button",
|
|
8455
|
+
{
|
|
8456
|
+
type: "button",
|
|
8457
|
+
className: "szenen-bildgalerie__kachel",
|
|
8458
|
+
onClick: () => setOffen(position),
|
|
8459
|
+
"data-testid": `${testId}-oeffnen-${bild.id}`,
|
|
8460
|
+
title: bild.titel,
|
|
8461
|
+
children: [
|
|
8462
|
+
/* @__PURE__ */ jsx7(
|
|
8463
|
+
Kachel,
|
|
8464
|
+
{
|
|
8465
|
+
quelle: bild.quelle,
|
|
8466
|
+
alt: bild.titel,
|
|
8467
|
+
...bild.leerText ? { leerText: bild.leerText } : {}
|
|
8468
|
+
}
|
|
8469
|
+
),
|
|
8470
|
+
/* @__PURE__ */ jsxs7("span", { className: "szenen-bildgalerie__nummer", children: [
|
|
8471
|
+
"#",
|
|
8472
|
+
position + 1
|
|
8473
|
+
] })
|
|
8474
|
+
]
|
|
8475
|
+
}
|
|
8476
|
+
) }, bild.id)) }),
|
|
8477
|
+
offen !== null && /* @__PURE__ */ jsx7(
|
|
8478
|
+
BildViewer,
|
|
8479
|
+
{
|
|
8480
|
+
bilder,
|
|
8481
|
+
position: offen,
|
|
8482
|
+
onWechseln: setOffen,
|
|
8483
|
+
onSchliessen: () => setOffen(null),
|
|
8484
|
+
testId: `${testId}-viewer`,
|
|
8485
|
+
...satzTitel ? { satzTitel } : {}
|
|
8486
|
+
}
|
|
8487
|
+
)
|
|
8488
|
+
] });
|
|
8489
|
+
};
|
|
8490
|
+
|
|
8491
|
+
// src/features/szenen/areas/RunImagesPanel.tsx
|
|
8492
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
8288
8493
|
var AUFTRAG_TEXT = {
|
|
8289
8494
|
// „gestartet/unterbrochen" in einem: Aus dem Log allein ist beides nicht
|
|
8290
8495
|
// unterscheidbar, und genau das ist beabsichtigt — es gibt keinen
|
|
@@ -8296,8 +8501,10 @@ var AUFTRAG_TEXT = {
|
|
|
8296
8501
|
};
|
|
8297
8502
|
var RunImagesPanel = ({ port, lauf }) => {
|
|
8298
8503
|
const faehig = capabilitiesOf(port);
|
|
8299
|
-
const [nachladen, setNachladen] =
|
|
8504
|
+
const [nachladen, setNachladen] = useState8(0);
|
|
8300
8505
|
const neuLesen = () => setNachladen((n) => n + 1);
|
|
8506
|
+
const [erzeugenOffen, setErzeugenOffen] = useState8(null);
|
|
8507
|
+
const [zuordnenOffen, setZuordnenOffen] = useState8(null);
|
|
8301
8508
|
const quelle = sourceOf(lauf);
|
|
8302
8509
|
const [wahlPhase] = usePortQuery(
|
|
8303
8510
|
() => port.imageGeneration ? port.imageGeneration.imageModelChoiceForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
@@ -8314,38 +8521,40 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
8314
8521
|
);
|
|
8315
8522
|
const auftraege = auftraegePhase.status === "ready" ? auftraegePhase.value : [];
|
|
8316
8523
|
const batches = batchesPhase.status === "ready" ? batchesPhase.value : [];
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8524
|
+
const auffaellige = auftraege.filter((a) => a.status !== "succeeded");
|
|
8525
|
+
const erzeugenAuf = erzeugenOffen ?? batches.length === 0;
|
|
8526
|
+
return /* @__PURE__ */ jsxs8("div", { className: "szenen-bilder", "data-testid": `bilder-${lauf.run_id}`, children: [
|
|
8527
|
+
/* @__PURE__ */ jsxs8("section", { className: "szenen-bilder__eingang", "data-testid": `eingang-${lauf.run_id}`, children: [
|
|
8528
|
+
/* @__PURE__ */ jsx8("h5", { children: "Eingang \u2014 woraus dieser Prompt entstand" }),
|
|
8529
|
+
/* @__PURE__ */ jsxs8("p", { className: "szenen-bilder__ids", children: [
|
|
8530
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8322
8531
|
"Lauf ",
|
|
8323
|
-
/* @__PURE__ */
|
|
8532
|
+
/* @__PURE__ */ jsx8("code", { "data-testid": `eingang-lauf-${lauf.run_id}`, children: lauf.run_id })
|
|
8324
8533
|
] }),
|
|
8325
|
-
quelle.kind === "published" && /* @__PURE__ */
|
|
8534
|
+
quelle.kind === "published" && /* @__PURE__ */ jsxs8("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
8326
8535
|
"ver\xF6ffentlichte Shot-Version ",
|
|
8327
|
-
/* @__PURE__ */
|
|
8536
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.shot_version_id })
|
|
8328
8537
|
] }),
|
|
8329
|
-
quelle.kind === "draft_chain" && /* @__PURE__ */
|
|
8538
|
+
quelle.kind === "draft_chain" && /* @__PURE__ */ jsxs8("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
8330
8539
|
"Draft-Kette ",
|
|
8331
|
-
/* @__PURE__ */
|
|
8540
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.chain_id })
|
|
8332
8541
|
] }),
|
|
8333
|
-
quelle.kind === "scene_direct" && /* @__PURE__ */
|
|
8542
|
+
quelle.kind === "scene_direct" && /* @__PURE__ */ jsxs8("span", { "data-testid": `eingang-herkunft-${lauf.run_id}`, children: [
|
|
8334
8543
|
"Szene ",
|
|
8335
|
-
/* @__PURE__ */
|
|
8336
|
-
quelle.scene.draft_id ? /* @__PURE__ */
|
|
8544
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.scene.element_id }),
|
|
8545
|
+
quelle.scene.draft_id ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8337
8546
|
" \xB7 Entwurf ",
|
|
8338
|
-
/* @__PURE__ */
|
|
8547
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.scene.draft_id }),
|
|
8339
8548
|
" (Revision ",
|
|
8340
8549
|
quelle.scene.revision,
|
|
8341
8550
|
")"
|
|
8342
|
-
] }) : /* @__PURE__ */
|
|
8551
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8343
8552
|
" \xB7 Version ",
|
|
8344
|
-
/* @__PURE__ */
|
|
8553
|
+
/* @__PURE__ */ jsx8("code", { children: quelle.scene.version_id })
|
|
8345
8554
|
] })
|
|
8346
8555
|
] })
|
|
8347
8556
|
] }),
|
|
8348
|
-
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */
|
|
8557
|
+
quelle.kind === "draft_chain" && quelle.derivation_run_id ? /* @__PURE__ */ jsx8(
|
|
8349
8558
|
InputBilder,
|
|
8350
8559
|
{
|
|
8351
8560
|
port,
|
|
@@ -8356,67 +8565,148 @@ var RunImagesPanel = ({ port, lauf }) => {
|
|
|
8356
8565
|
// Nichts raten: Ein Lauf vor 6.7 trägt die
|
|
8357
8566
|
// Rekonstruktionsherkunft nicht, und ein veröffentlichter
|
|
8358
8567
|
// Lauf hat keine (D-123).
|
|
8359
|
-
/* @__PURE__ */
|
|
8568
|
+
/* @__PURE__ */ jsx8("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." })
|
|
8360
8569
|
)
|
|
8361
8570
|
] }),
|
|
8362
|
-
/* @__PURE__ */
|
|
8363
|
-
/* @__PURE__ */
|
|
8364
|
-
!faehig.
|
|
8365
|
-
|
|
8571
|
+
/* @__PURE__ */ jsxs8("section", { className: "szenen-bilder__ausgang", "data-testid": `ausgang-${lauf.run_id}`, children: [
|
|
8572
|
+
/* @__PURE__ */ jsx8("h5", { children: "Ausgang \u2014 die Bilder aus diesem Prompt" }),
|
|
8573
|
+
!faehig.imageBatchHistory && /* @__PURE__ */ jsx8("p", { "data-testid": `batches-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bild-Batches. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
8574
|
+
batchesPhase.status === "error" && /* @__PURE__ */ jsxs8("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8575
|
+
"Batches konnten nicht geladen werden: ",
|
|
8576
|
+
batchesPhase.message
|
|
8577
|
+
] }),
|
|
8578
|
+
faehig.imageBatchHistory && batchesPhase.status === "ready" && batches.length === 0 && /* @__PURE__ */ jsx8("p", { "data-testid": `keine-batches-${lauf.run_id}`, children: "Zu diesem Lauf ist noch kein Bild gespeichert." }),
|
|
8579
|
+
batches.map((batch) => /* @__PURE__ */ jsx8(BatchKachel, { port, batch }, batch.item_id)),
|
|
8580
|
+
!faehig.imageOrderHistory && /* @__PURE__ */ jsx8("p", { "data-testid": `auftraege-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bildgenerierungsauftr\xE4ge. Bereits gespeicherte Batches sind oben trotzdem sichtbar." }),
|
|
8581
|
+
auftraegePhase.status === "error" && /* @__PURE__ */ jsxs8("p", { "data-testid": `auftraege-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8366
8582
|
"Auftr\xE4ge konnten nicht geladen werden: ",
|
|
8367
8583
|
auftraegePhase.message
|
|
8368
8584
|
] }),
|
|
8369
|
-
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */
|
|
8370
|
-
|
|
8371
|
-
"
|
|
8585
|
+
faehig.imageOrderHistory && auftraegePhase.status === "ready" && auftraege.length === 0 && /* @__PURE__ */ jsx8("p", { "data-testid": `keine-auftraege-${lauf.run_id}`, children: "F\xFCr diesen Lauf wurde noch kein Bildauftrag gestartet." }),
|
|
8586
|
+
auffaellige.length > 0 && /* @__PURE__ */ jsxs8(
|
|
8587
|
+
"p",
|
|
8372
8588
|
{
|
|
8373
|
-
"
|
|
8374
|
-
"data-
|
|
8589
|
+
className: "szenen-bilder__auffaellig",
|
|
8590
|
+
"data-testid": `auftraege-auffaellig-${lauf.run_id}`,
|
|
8591
|
+
role: "alert",
|
|
8375
8592
|
children: [
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
"
|
|
8393
|
-
/* @__PURE__ */ jsx7("code", { children: auftrag.item_id })
|
|
8593
|
+
auffaellige.length === 1 ? `Ein Bildauftrag ist ${AUFTRAG_TEXT[auffaellige[0].status]}.` : `${auffaellige.length} Bildauftr\xE4ge sind nicht sauber durchgelaufen.`,
|
|
8594
|
+
" ",
|
|
8595
|
+
"Einzelheiten im Verlauf."
|
|
8596
|
+
]
|
|
8597
|
+
}
|
|
8598
|
+
),
|
|
8599
|
+
auftraege.length > 0 && /* @__PURE__ */ jsxs8(
|
|
8600
|
+
"details",
|
|
8601
|
+
{
|
|
8602
|
+
className: "szenen-bilder__verlauf",
|
|
8603
|
+
"data-testid": `auftraege-verlauf-${lauf.run_id}`,
|
|
8604
|
+
open: auffaellige.length > 0,
|
|
8605
|
+
children: [
|
|
8606
|
+
/* @__PURE__ */ jsxs8("summary", { children: [
|
|
8607
|
+
"Bildauftr\xE4ge / Verlauf (",
|
|
8608
|
+
auftraege.length,
|
|
8609
|
+
")"
|
|
8394
8610
|
] }),
|
|
8395
|
-
|
|
8396
|
-
|
|
8611
|
+
/* @__PURE__ */ jsx8("ul", { className: "szenen-bilder__auftraege", "data-testid": `auftraege-${lauf.run_id}`, children: auftraege.map((auftrag) => /* @__PURE__ */ jsxs8(
|
|
8612
|
+
"li",
|
|
8613
|
+
{
|
|
8614
|
+
"data-testid": `auftrag-${auftrag.generation_batch_id}`,
|
|
8615
|
+
"data-status": auftrag.status,
|
|
8616
|
+
children: [
|
|
8617
|
+
/* @__PURE__ */ jsx8("strong", { children: AUFTRAG_TEXT[auftrag.status] }),
|
|
8618
|
+
/* @__PURE__ */ jsxs8("span", { "data-testid": `auftrag-modell-${auftrag.generation_batch_id}`, children: [
|
|
8619
|
+
auftrag.request?.image_count ?? "?",
|
|
8620
|
+
" Bild(er) \xB7",
|
|
8621
|
+
" ",
|
|
8622
|
+
auftrag.request?.callable_model_id ?? "Modell unbekannt",
|
|
8623
|
+
auftrag.request?.provider ? ` bei ${auftrag.request.provider}` : ""
|
|
8624
|
+
] }),
|
|
8625
|
+
auftrag.request?.prompt_target_model_key && auftrag.request.target_model_matched === false && /* @__PURE__ */ jsxs8("span", { "data-testid": `auftrag-abweichung-${auftrag.generation_batch_id}`, children: [
|
|
8626
|
+
"abweichend \u2014 Prompt optimiert f\xFCr",
|
|
8627
|
+
" ",
|
|
8628
|
+
/* @__PURE__ */ jsx8("code", { children: auftrag.request.prompt_target_model_key })
|
|
8629
|
+
] }),
|
|
8630
|
+
auftrag.request?.negative_prompt_transmitted === false && /* @__PURE__ */ jsx8("span", { "data-testid": `auftrag-negativ-${auftrag.generation_batch_id}`, children: "Ein negativer Prompt lief \xFCber dieses Profil nicht mit." }),
|
|
8631
|
+
auftrag.item_id && /* @__PURE__ */ jsxs8("span", { "data-testid": `auftrag-item-${auftrag.generation_batch_id}`, children: [
|
|
8632
|
+
"Item ",
|
|
8633
|
+
/* @__PURE__ */ jsx8("code", { children: auftrag.item_id })
|
|
8634
|
+
] }),
|
|
8635
|
+
auftrag.status === "started" && /* @__PURE__ */ jsx8("span", { "data-testid": `auftrag-hinweis-${auftrag.generation_batch_id}`, children: "Kein automatischer neuer Versuch \u2014 ob noch einmal erzeugt wird, entscheiden Sie." }),
|
|
8636
|
+
auftrag.diagnostic && /* @__PURE__ */ jsx8("span", { "data-testid": `auftrag-diagnose-${auftrag.generation_batch_id}`, children: auftrag.diagnostic }),
|
|
8637
|
+
/* @__PURE__ */ jsx8("code", { className: "szenen-bilder__auftragskennung", children: auftrag.generation_batch_id })
|
|
8638
|
+
]
|
|
8639
|
+
},
|
|
8640
|
+
auftrag.generation_batch_id
|
|
8641
|
+
)) })
|
|
8397
8642
|
]
|
|
8398
|
-
}
|
|
8399
|
-
|
|
8400
|
-
)) }),
|
|
8401
|
-
!faehig.imageBatchHistory && /* @__PURE__ */ jsx7("p", { "data-testid": `batches-unsupported-${lauf.run_id}`, children: "Dieser Host liest keine Bild-Batches. Das ist kein Fehler und kein vor\xFCbergehender Zustand." }),
|
|
8402
|
-
batchesPhase.status === "error" && /* @__PURE__ */ jsxs7("p", { "data-testid": `batches-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8403
|
-
"Batches konnten nicht geladen werden: ",
|
|
8404
|
-
batchesPhase.message
|
|
8405
|
-
] }),
|
|
8406
|
-
faehig.imageBatchHistory && batchesPhase.status === "ready" && batches.length === 0 && /* @__PURE__ */ jsx7("p", { "data-testid": `keine-batches-${lauf.run_id}`, children: "Zu diesem Lauf ist noch kein Bild gespeichert." }),
|
|
8407
|
-
batches.map((batch) => /* @__PURE__ */ jsx7(BatchKachel, { port, batch }, batch.item_id))
|
|
8643
|
+
}
|
|
8644
|
+
)
|
|
8408
8645
|
] }),
|
|
8409
|
-
/* @__PURE__ */
|
|
8410
|
-
|
|
8646
|
+
/* @__PURE__ */ jsxs8(
|
|
8647
|
+
"details",
|
|
8411
8648
|
{
|
|
8412
|
-
|
|
8413
|
-
lauf
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8649
|
+
className: "szenen-bilder__aktion",
|
|
8650
|
+
"data-testid": `erzeugen-bereich-${lauf.run_id}`,
|
|
8651
|
+
open: erzeugenAuf,
|
|
8652
|
+
children: [
|
|
8653
|
+
/* @__PURE__ */ jsx8(
|
|
8654
|
+
"summary",
|
|
8655
|
+
{
|
|
8656
|
+
onClick: (e) => {
|
|
8657
|
+
e.preventDefault();
|
|
8658
|
+
setErzeugenOffen(!erzeugenAuf);
|
|
8659
|
+
},
|
|
8660
|
+
children: "Bilder aus diesem Prompt erzeugen"
|
|
8661
|
+
}
|
|
8662
|
+
),
|
|
8663
|
+
/* @__PURE__ */ jsx8(
|
|
8664
|
+
ErzeugenAktion,
|
|
8665
|
+
{
|
|
8666
|
+
port,
|
|
8667
|
+
lauf,
|
|
8668
|
+
wahl,
|
|
8669
|
+
wahlFehler: wahlPhase.status === "error" ? wahlPhase.message : null,
|
|
8670
|
+
onFertig: () => {
|
|
8671
|
+
setErzeugenOffen(true);
|
|
8672
|
+
neuLesen();
|
|
8673
|
+
}
|
|
8674
|
+
}
|
|
8675
|
+
)
|
|
8676
|
+
]
|
|
8417
8677
|
}
|
|
8418
8678
|
),
|
|
8419
|
-
/* @__PURE__ */
|
|
8679
|
+
/* @__PURE__ */ jsxs8(
|
|
8680
|
+
"details",
|
|
8681
|
+
{
|
|
8682
|
+
className: "szenen-bilder__aktion",
|
|
8683
|
+
"data-testid": `zuordnen-bereich-${lauf.run_id}`,
|
|
8684
|
+
open: zuordnenOffen ?? false,
|
|
8685
|
+
children: [
|
|
8686
|
+
/* @__PURE__ */ jsx8(
|
|
8687
|
+
"summary",
|
|
8688
|
+
{
|
|
8689
|
+
onClick: (e) => {
|
|
8690
|
+
e.preventDefault();
|
|
8691
|
+
setZuordnenOffen(!(zuordnenOffen ?? false));
|
|
8692
|
+
},
|
|
8693
|
+
children: "Externe Bilder diesem Lauf zuordnen"
|
|
8694
|
+
}
|
|
8695
|
+
),
|
|
8696
|
+
/* @__PURE__ */ jsx8(
|
|
8697
|
+
ZuordnenAktion,
|
|
8698
|
+
{
|
|
8699
|
+
port,
|
|
8700
|
+
lauf,
|
|
8701
|
+
onFertig: () => {
|
|
8702
|
+
setZuordnenOffen(true);
|
|
8703
|
+
neuLesen();
|
|
8704
|
+
}
|
|
8705
|
+
}
|
|
8706
|
+
)
|
|
8707
|
+
]
|
|
8708
|
+
}
|
|
8709
|
+
)
|
|
8420
8710
|
] });
|
|
8421
8711
|
};
|
|
8422
8712
|
var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
@@ -8424,9 +8714,9 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
8424
8714
|
() => port.derivation ? port.derivation.getDerivation(derivationRunId) : Promise.resolve({ kind: "ok", value: null }),
|
|
8425
8715
|
[port, derivationRunId]
|
|
8426
8716
|
);
|
|
8427
|
-
if (phase.status === "loading") return /* @__PURE__ */
|
|
8717
|
+
if (phase.status === "loading") return /* @__PURE__ */ jsx8("p", { children: "Rekonstruktionslauf wird geladen \u2026" });
|
|
8428
8718
|
if (phase.status === "error") {
|
|
8429
|
-
return /* @__PURE__ */
|
|
8719
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `eingang-fehler-${runId}`, role: "alert", children: [
|
|
8430
8720
|
"Der Rekonstruktionslauf ",
|
|
8431
8721
|
derivationRunId,
|
|
8432
8722
|
" konnte nicht geladen werden: ",
|
|
@@ -8434,22 +8724,22 @@ var InputBilder = ({ port, runId, derivationRunId }) => {
|
|
|
8434
8724
|
] });
|
|
8435
8725
|
}
|
|
8436
8726
|
if (!phase.value) {
|
|
8437
|
-
return /* @__PURE__ */
|
|
8727
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `eingang-unbekannt-${runId}`, children: [
|
|
8438
8728
|
"Der Rekonstruktionslauf ",
|
|
8439
|
-
/* @__PURE__ */
|
|
8729
|
+
/* @__PURE__ */ jsx8("code", { children: derivationRunId }),
|
|
8440
8730
|
" ist in diesem Host nicht auffindbar."
|
|
8441
8731
|
] });
|
|
8442
8732
|
}
|
|
8443
8733
|
const bilder = phase.value.input.images;
|
|
8444
|
-
return /* @__PURE__ */
|
|
8445
|
-
/* @__PURE__ */
|
|
8734
|
+
return /* @__PURE__ */ jsxs8("div", { "data-testid": `eingang-bilder-${runId}`, children: [
|
|
8735
|
+
/* @__PURE__ */ jsxs8("p", { children: [
|
|
8446
8736
|
"aus Rekonstruktionslauf ",
|
|
8447
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ jsx8("code", { children: derivationRunId }),
|
|
8448
8738
|
phase.value.input.prompt_text ? " \xB7 mit Referenzprompt" : ""
|
|
8449
8739
|
] }),
|
|
8450
|
-
bilder.length === 0 ? /* @__PURE__ */
|
|
8740
|
+
bilder.length === 0 ? /* @__PURE__ */ jsx8("p", { children: "Der Rekonstruktionslauf lief ohne Eingangsbild." }) : /* @__PURE__ */ jsx8("ul", { className: "szenen-bilder__eingangsliste", children: bilder.map((bild, index) => /* @__PURE__ */ jsx8("li", { "data-kind": bild.kind, children: bild.kind === "library" ? /* @__PURE__ */ jsx8(BestandsBild, { port, mediaRef: bild.media_ref }) : /* @__PURE__ */ jsxs8("span", { children: [
|
|
8451
8741
|
"Upload, nur \xFCber seinen Digest belegt (",
|
|
8452
|
-
/* @__PURE__ */
|
|
8742
|
+
/* @__PURE__ */ jsxs8("code", { children: [
|
|
8453
8743
|
bild.sha256.slice(0, 12),
|
|
8454
8744
|
"\u2026"
|
|
8455
8745
|
] }),
|
|
@@ -8467,113 +8757,177 @@ var BestandsBild = ({ port, mediaRef }) => {
|
|
|
8467
8757
|
() => port.imageLibrary ? port.imageLibrary.resolveImage(mediaRef) : Promise.resolve({ kind: "ok", value: null }),
|
|
8468
8758
|
[port, mediaRef]
|
|
8469
8759
|
);
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8760
|
+
const quelle = phase.status === "ready" && phase.value ? `data:${phase.value.mime_type};base64,${phase.value.data}` : null;
|
|
8761
|
+
return /* @__PURE__ */ jsxs8("span", { "data-testid": `eingangsbild-${mediaRef}`, children: [
|
|
8762
|
+
/* @__PURE__ */ jsx8(
|
|
8763
|
+
Kachel,
|
|
8473
8764
|
{
|
|
8474
|
-
|
|
8475
|
-
alt: `Eingangsbild ${mediaRef}
|
|
8765
|
+
quelle,
|
|
8766
|
+
alt: `Eingangsbild ${mediaRef}`,
|
|
8767
|
+
...phase.status === "error" ? { leerText: "Nicht ladbar" } : {}
|
|
8476
8768
|
}
|
|
8477
8769
|
),
|
|
8478
8770
|
phase.status === "error" && // Verzeichnet, aber nicht lesbar ist etwas anderes als
|
|
8479
8771
|
// unbekannt — der Unterschied gehoert sichtbar.
|
|
8480
|
-
/* @__PURE__ */
|
|
8481
|
-
/* @__PURE__ */
|
|
8772
|
+
/* @__PURE__ */ jsx8("em", { "data-testid": `eingangsbild-fehler-${mediaRef}`, children: phase.message }),
|
|
8773
|
+
/* @__PURE__ */ jsx8("code", { children: mediaRef })
|
|
8482
8774
|
] });
|
|
8483
8775
|
};
|
|
8484
|
-
|
|
8485
|
-
const [
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
);
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8776
|
+
function useBildQuellen(port, bilder) {
|
|
8777
|
+
const [stand, setStand] = useState8(() => ({ quellen: /* @__PURE__ */ new Map(), fehler: /* @__PURE__ */ new Map() }));
|
|
8778
|
+
const gehalten = useRef2(/* @__PURE__ */ new Map());
|
|
8779
|
+
const gescheitert = useRef2(/* @__PURE__ */ new Map());
|
|
8780
|
+
const schluessel = bilder.map((b) => `${b.media_ref}|${b.mime_type ?? ""}`).join(" ");
|
|
8781
|
+
useEffect4(() => {
|
|
8782
|
+
const bestand = port.imageLibrary;
|
|
8783
|
+
if (!bestand) return void 0;
|
|
8784
|
+
let abgebrochen = false;
|
|
8785
|
+
void (async () => {
|
|
8786
|
+
for (const bild of bilder) {
|
|
8787
|
+
if (abgebrochen) return;
|
|
8788
|
+
if (gehalten.current.has(bild.media_ref) || gescheitert.current.has(bild.media_ref)) continue;
|
|
8789
|
+
const ergebnis = await bestand.resolveImage(bild.media_ref, bild.mime_type ?? null);
|
|
8790
|
+
if (abgebrochen) return;
|
|
8791
|
+
if (ergebnis.kind === "ok" && ergebnis.value) {
|
|
8792
|
+
gehalten.current.set(
|
|
8793
|
+
bild.media_ref,
|
|
8794
|
+
`data:${ergebnis.value.mime_type};base64,${ergebnis.value.data}`
|
|
8795
|
+
);
|
|
8796
|
+
} else if (ergebnis.kind === "error") {
|
|
8797
|
+
gescheitert.current.set(bild.media_ref, ergebnis.message);
|
|
8798
|
+
}
|
|
8799
|
+
setStand({
|
|
8800
|
+
quellen: new Map(gehalten.current),
|
|
8801
|
+
fehler: new Map(gescheitert.current)
|
|
8802
|
+
});
|
|
8803
|
+
}
|
|
8804
|
+
})();
|
|
8805
|
+
return () => {
|
|
8806
|
+
abgebrochen = true;
|
|
8807
|
+
};
|
|
8808
|
+
}, [port, schluessel]);
|
|
8809
|
+
return stand;
|
|
8810
|
+
}
|
|
8811
|
+
var BildDetails = ({ bild, fehler: fehler4, aufloesbar }) => /* @__PURE__ */ jsxs8("span", { className: "szenen-bilder__meta", "data-testid": `batchbild-${bild.media_ref}`, children: [
|
|
8812
|
+
/* @__PURE__ */ jsx8("code", { children: bild.media_ref }),
|
|
8813
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8814
|
+
"Position ",
|
|
8815
|
+
bild.position
|
|
8816
|
+
] }),
|
|
8817
|
+
/* @__PURE__ */ jsx8("span", { children: bild.model || "Modell unbekannt" }),
|
|
8818
|
+
/* @__PURE__ */ jsx8("span", { children: bild.seed === null || bild.seed === void 0 || bild.seed === -1 ? "ohne Seed" : `Seed ${bild.seed}` }),
|
|
8819
|
+
bild.width && bild.height ? /* @__PURE__ */ jsxs8("span", { children: [
|
|
8820
|
+
bild.width,
|
|
8821
|
+
"\xD7",
|
|
8822
|
+
bild.height
|
|
8823
|
+
] }) : null,
|
|
8824
|
+
fehler4 && /* @__PURE__ */ jsx8("em", { "data-testid": `batchbild-fehler-${bild.media_ref}`, children: fehler4 }),
|
|
8825
|
+
!aufloesbar && // Capability-Grenze, kein Fehler: Dieser Host kann Batches lesen,
|
|
8826
|
+
// aber keine Bilder auflösen (E). Kein erfundener Fallback auf eine
|
|
8827
|
+
// Serverroute (A6).
|
|
8828
|
+
/* @__PURE__ */ jsx8("em", { "data-testid": `batchbild-unsupported-${bild.media_ref}`, children: "Dieser Host l\xF6st keine Bilder auf \u2014 nur die Metadaten sind bekannt." })
|
|
8829
|
+
] });
|
|
8830
|
+
var BatchKachel = ({ port, batch }) => {
|
|
8831
|
+
const { quellen, fehler: fehler4 } = useBildQuellen(port, batch.images);
|
|
8832
|
+
const aufloesbar = Boolean(port.imageLibrary);
|
|
8833
|
+
const bilder = batch.images.map((bild) => ({
|
|
8834
|
+
id: bild.media_ref,
|
|
8835
|
+
quelle: quellen.get(bild.media_ref) ?? null,
|
|
8836
|
+
titel: `Bild ${bild.position + 1}`,
|
|
8837
|
+
...fehler4.get(bild.media_ref) ? { leerText: "Nicht ladbar" } : {},
|
|
8838
|
+
details: /* @__PURE__ */ jsx8(
|
|
8839
|
+
BildDetails,
|
|
8492
8840
|
{
|
|
8493
|
-
|
|
8494
|
-
|
|
8841
|
+
bild,
|
|
8842
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
8843
|
+
aufloesbar
|
|
8495
8844
|
}
|
|
8496
|
-
)
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
bild.width,
|
|
8514
|
-
"\xD7",
|
|
8515
|
-
bild.height
|
|
8516
|
-
] }) : null
|
|
8517
|
-
] });
|
|
8518
|
-
};
|
|
8519
|
-
var BatchKachel = ({ port, batch }) => /* @__PURE__ */ jsxs7(
|
|
8520
|
-
"div",
|
|
8521
|
-
{
|
|
8522
|
-
className: "szenen-bilder__batch",
|
|
8523
|
-
"data-testid": `batch-${batch.item_id}`,
|
|
8524
|
-
"data-source-kind": batch.source_kind,
|
|
8525
|
-
children: [
|
|
8526
|
-
/* @__PURE__ */ jsxs7("p", { className: "szenen-bilder__ids", children: [
|
|
8527
|
-
/* @__PURE__ */ jsx7("strong", { children: batch.title }),
|
|
8528
|
-
/* @__PURE__ */ jsx7("span", { children: batch.source_kind === "generated_in_app" ? "in der App erzeugt" : "extern importiert" }),
|
|
8529
|
-
/* @__PURE__ */ jsxs7("span", { children: [
|
|
8530
|
-
"Item ",
|
|
8531
|
-
/* @__PURE__ */ jsx7("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
8845
|
+
)
|
|
8846
|
+
}));
|
|
8847
|
+
return /* @__PURE__ */ jsxs8(
|
|
8848
|
+
"section",
|
|
8849
|
+
{
|
|
8850
|
+
className: "szenen-bilder__batch",
|
|
8851
|
+
"data-testid": `batch-${batch.item_id}`,
|
|
8852
|
+
"data-source-kind": batch.source_kind,
|
|
8853
|
+
children: [
|
|
8854
|
+
/* @__PURE__ */ jsxs8("header", { className: "szenen-bilder__batchkopf", children: [
|
|
8855
|
+
/* @__PURE__ */ jsx8("strong", { children: batch.title }),
|
|
8856
|
+
/* @__PURE__ */ jsxs8("span", { className: "szenen-bilder__herkunft", children: [
|
|
8857
|
+
batch.source_kind === "generated_in_app" ? "in der App erzeugt" : "extern importiert",
|
|
8858
|
+
" \xB7 ",
|
|
8859
|
+
batch.images.length,
|
|
8860
|
+
" Bild(er)"
|
|
8861
|
+
] })
|
|
8532
8862
|
] }),
|
|
8533
|
-
/* @__PURE__ */
|
|
8534
|
-
|
|
8535
|
-
|
|
8863
|
+
/* @__PURE__ */ jsx8(
|
|
8864
|
+
BildGalerie,
|
|
8865
|
+
{
|
|
8866
|
+
bilder,
|
|
8867
|
+
testId: `batchgalerie-${batch.item_id}`,
|
|
8868
|
+
satzTitel: batch.title
|
|
8869
|
+
}
|
|
8870
|
+
),
|
|
8871
|
+
/* @__PURE__ */ jsxs8("details", { className: "szenen-bilder__technik", "data-testid": `batch-technik-${batch.item_id}`, children: [
|
|
8872
|
+
/* @__PURE__ */ jsx8("summary", { children: "Technische Details" }),
|
|
8873
|
+
/* @__PURE__ */ jsxs8("p", { className: "szenen-bilder__ids", children: [
|
|
8874
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8875
|
+
"Item ",
|
|
8876
|
+
/* @__PURE__ */ jsx8("code", { "data-testid": `batch-item-${batch.item_id}`, children: batch.item_id })
|
|
8877
|
+
] }),
|
|
8878
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8879
|
+
"Batches ",
|
|
8880
|
+
/* @__PURE__ */ jsx8("code", { children: batch.generation_batch_ids.join(", ") })
|
|
8881
|
+
] })
|
|
8882
|
+
] }),
|
|
8883
|
+
/* @__PURE__ */ jsx8("ul", { className: "szenen-bilder__batchliste", children: batch.images.map((bild) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(
|
|
8884
|
+
BildDetails,
|
|
8885
|
+
{
|
|
8886
|
+
bild,
|
|
8887
|
+
fehler: fehler4.get(bild.media_ref) ?? null,
|
|
8888
|
+
aufloesbar
|
|
8889
|
+
}
|
|
8890
|
+
) }, bild.media_ref)) })
|
|
8536
8891
|
] })
|
|
8537
|
-
]
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
);
|
|
8892
|
+
]
|
|
8893
|
+
}
|
|
8894
|
+
);
|
|
8895
|
+
};
|
|
8542
8896
|
var ProfilBefunde = ({ wahl, runId }) => {
|
|
8543
8897
|
if (wahl.invalid_profiles.length === 0) return null;
|
|
8544
|
-
return /* @__PURE__ */
|
|
8898
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-profilbefunde-${runId}`, role: "alert", children: [
|
|
8545
8899
|
"Nicht angeboten, weil das Profil unvollst\xE4ndig ist:",
|
|
8546
8900
|
" ",
|
|
8547
8901
|
wahl.invalid_profiles.join(" \xB7 ")
|
|
8548
8902
|
] });
|
|
8549
8903
|
};
|
|
8550
8904
|
var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
8551
|
-
const [modellWahl, setModellWahl] =
|
|
8552
|
-
const [anzahlText, setAnzahlText] =
|
|
8553
|
-
const [seitenverhaeltnis, setSeitenverhaeltnis] =
|
|
8554
|
-
const [laeuft, setLaeuft] =
|
|
8555
|
-
const [notiz, setNotiz] =
|
|
8905
|
+
const [modellWahl, setModellWahl] = useState8(null);
|
|
8906
|
+
const [anzahlText, setAnzahlText] = useState8("1");
|
|
8907
|
+
const [seitenverhaeltnis, setSeitenverhaeltnis] = useState8("");
|
|
8908
|
+
const [laeuft, setLaeuft] = useState8(false);
|
|
8909
|
+
const [notiz, setNotiz] = useState8(null);
|
|
8556
8910
|
if (!port.imageGeneration) {
|
|
8557
|
-
return /* @__PURE__ */
|
|
8911
|
+
return /* @__PURE__ */ jsx8("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." });
|
|
8558
8912
|
}
|
|
8559
8913
|
if (wahlFehler) {
|
|
8560
|
-
return /* @__PURE__ */
|
|
8914
|
+
return /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-fehler-${lauf.run_id}`, role: "alert", children: [
|
|
8561
8915
|
"Die F\xE4higkeitsauskunft schlug fehl: ",
|
|
8562
8916
|
wahlFehler
|
|
8563
8917
|
] });
|
|
8564
8918
|
}
|
|
8565
|
-
if (!wahl) return /* @__PURE__ */
|
|
8919
|
+
if (!wahl) return /* @__PURE__ */ jsx8("p", { children: "Bildf\xE4higkeit wird gepr\xFCft \u2026" });
|
|
8566
8920
|
if (wahl.models.length === 0) {
|
|
8567
8921
|
return (
|
|
8568
8922
|
// Kein Fehler und kein Grund, den Lauf zu sperren: Der externe
|
|
8569
8923
|
// Importweg bleibt daneben stehen (D-104.5).
|
|
8570
|
-
/* @__PURE__ */
|
|
8571
|
-
/* @__PURE__ */
|
|
8924
|
+
/* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8925
|
+
/* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-unsupported-modell-${lauf.run_id}`, children: [
|
|
8572
8926
|
"Hier kann derzeit kein Bild erzeugt werden:",
|
|
8573
8927
|
" ",
|
|
8574
8928
|
wahl.reason ?? "Kein sichtbares Zielmodell tr\xE4gt ein ausf\xFChrbares Profil."
|
|
8575
8929
|
] }),
|
|
8576
|
-
/* @__PURE__ */
|
|
8930
|
+
/* @__PURE__ */ jsx8(ProfilBefunde, { wahl, runId: lauf.run_id })
|
|
8577
8931
|
] })
|
|
8578
8932
|
);
|
|
8579
8933
|
}
|
|
@@ -8622,22 +8976,21 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8622
8976
|
onFertig();
|
|
8623
8977
|
};
|
|
8624
8978
|
const negativVorhanden = Boolean(lauf.output?.negative && lauf.output.negative.trim());
|
|
8625
|
-
return /* @__PURE__ */
|
|
8626
|
-
/* @__PURE__ */
|
|
8627
|
-
/* @__PURE__ */
|
|
8628
|
-
/* @__PURE__ */ jsx7("p", { "data-testid": `erzeugen-zielmodell-${lauf.run_id}`, children: wahl.prompt_target_model_key ? /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
8979
|
+
return /* @__PURE__ */ jsxs8("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `erzeugen-${lauf.run_id}`, children: [
|
|
8980
|
+
/* @__PURE__ */ jsx8(ProfilBefunde, { wahl, runId: lauf.run_id }),
|
|
8981
|
+
/* @__PURE__ */ jsx8("p", { "data-testid": `erzeugen-zielmodell-${lauf.run_id}`, children: wahl.prompt_target_model_key ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
8629
8982
|
"Prompt optimiert f\xFCr ",
|
|
8630
|
-
/* @__PURE__ */
|
|
8983
|
+
/* @__PURE__ */ jsx8("code", { children: wahl.prompt_target_model_key })
|
|
8631
8984
|
] }) : "Dieser Lauf tr\xE4gt keine Optimierungsabsicht (kein target_model)." }),
|
|
8632
|
-
/* @__PURE__ */
|
|
8985
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8633
8986
|
"Bildmodell",
|
|
8634
|
-
/* @__PURE__ */
|
|
8987
|
+
/* @__PURE__ */ jsx8(
|
|
8635
8988
|
"select",
|
|
8636
8989
|
{
|
|
8637
8990
|
value: aktiv.selection_id,
|
|
8638
8991
|
"data-testid": `erzeugen-modellwahl-${lauf.run_id}`,
|
|
8639
8992
|
onChange: (e) => modellWechseln(e.target.value),
|
|
8640
|
-
children: wahl.models.map((m) => /* @__PURE__ */
|
|
8993
|
+
children: wahl.models.map((m) => /* @__PURE__ */ jsxs8("option", { value: m.selection_id, children: [
|
|
8641
8994
|
m.display_name,
|
|
8642
8995
|
" (",
|
|
8643
8996
|
m.provider,
|
|
@@ -8647,7 +9000,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8647
9000
|
}
|
|
8648
9001
|
)
|
|
8649
9002
|
] }),
|
|
8650
|
-
/* @__PURE__ */
|
|
9003
|
+
/* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-modell-${lauf.run_id}`, children: [
|
|
8651
9004
|
aktiv.display_name,
|
|
8652
9005
|
" bei ",
|
|
8653
9006
|
aktiv.provider,
|
|
@@ -8656,26 +9009,26 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8656
9009
|
aktiv.max_images,
|
|
8657
9010
|
" Bilder je Auftrag"
|
|
8658
9011
|
] }),
|
|
8659
|
-
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */
|
|
9012
|
+
wahl.prompt_target_model_key && !aktiv.is_prompt_target && /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-abweichung-${lauf.run_id}`, children: [
|
|
8660
9013
|
"Hinweis: Prompt optimiert f\xFCr ",
|
|
8661
|
-
/* @__PURE__ */
|
|
9014
|
+
/* @__PURE__ */ jsx8("code", { children: wahl.prompt_target_model_key }),
|
|
8662
9015
|
", Bilder werden mit ",
|
|
8663
|
-
/* @__PURE__ */
|
|
9016
|
+
/* @__PURE__ */ jsx8("code", { children: aktiv.display_name }),
|
|
8664
9017
|
" erzeugt. Das ist zul\xE4ssig \u2014 ein abweichendes Ergebnis liegt dann nicht zwingend am Prompt."
|
|
8665
9018
|
] }),
|
|
8666
9019
|
negativVorhanden && !aktiv.accepts_negative_prompt && // Nicht still verlieren: Der eingefrorene Lauf trägt einen
|
|
8667
9020
|
// negativen Prompt, den dieser Modellweg nicht führt. Wer das
|
|
8668
9021
|
// weiß, kann ihn in den positiven Prompt einarbeiten — wer es
|
|
8669
9022
|
// nicht weiß, wundert sich über das Bild.
|
|
8670
|
-
/* @__PURE__ */
|
|
9023
|
+
/* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-negativ-hinweis-${lauf.run_id}`, children: [
|
|
8671
9024
|
"Achtung: Dieser Lauf tr\xE4gt einen negativen Prompt.",
|
|
8672
9025
|
" ",
|
|
8673
9026
|
aktiv.display_name,
|
|
8674
9027
|
" f\xFChrt diesen Promptkanal nicht \u2014 der negative Prompt l\xE4uft nicht mit."
|
|
8675
9028
|
] }),
|
|
8676
|
-
/* @__PURE__ */
|
|
9029
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8677
9030
|
"Anzahl",
|
|
8678
|
-
/* @__PURE__ */
|
|
9031
|
+
/* @__PURE__ */ jsx8(
|
|
8679
9032
|
"input",
|
|
8680
9033
|
{
|
|
8681
9034
|
type: "number",
|
|
@@ -8687,27 +9040,27 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8687
9040
|
}
|
|
8688
9041
|
)
|
|
8689
9042
|
] }),
|
|
8690
|
-
/* @__PURE__ */
|
|
9043
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8691
9044
|
"Seitenverh\xE4ltnis",
|
|
8692
|
-
/* @__PURE__ */
|
|
9045
|
+
/* @__PURE__ */ jsxs8(
|
|
8693
9046
|
"select",
|
|
8694
9047
|
{
|
|
8695
9048
|
value: seitenverhaeltnis,
|
|
8696
9049
|
"data-testid": `erzeugen-format-${lauf.run_id}`,
|
|
8697
9050
|
onChange: (e) => setSeitenverhaeltnis(e.target.value),
|
|
8698
9051
|
children: [
|
|
8699
|
-
/* @__PURE__ */
|
|
8700
|
-
aktiv.aspect_ratios.map((v) => /* @__PURE__ */
|
|
9052
|
+
/* @__PURE__ */ jsx8("option", { value: "", children: "(Vorgabe des Modells)" }),
|
|
9053
|
+
aktiv.aspect_ratios.map((v) => /* @__PURE__ */ jsx8("option", { value: v, children: v }, v))
|
|
8701
9054
|
]
|
|
8702
9055
|
}
|
|
8703
9056
|
)
|
|
8704
9057
|
] }),
|
|
8705
|
-
!aktiv.accepts_seed && /* @__PURE__ */
|
|
9058
|
+
!aktiv.accepts_seed && /* @__PURE__ */ jsxs8("p", { "data-testid": `erzeugen-ohne-seed-${lauf.run_id}`, children: [
|
|
8706
9059
|
aktiv.display_name,
|
|
8707
9060
|
" kennt keinen Seed \u2014 er wird deshalb weder angeboten noch protokolliert."
|
|
8708
9061
|
] }),
|
|
8709
|
-
parameterBefunde.length > 0 && /* @__PURE__ */
|
|
8710
|
-
/* @__PURE__ */
|
|
9062
|
+
parameterBefunde.length > 0 && /* @__PURE__ */ jsx8("p", { "data-testid": `erzeugen-parameterbefund-${lauf.run_id}`, role: "alert", children: parameterBefunde.join(" ") }),
|
|
9063
|
+
/* @__PURE__ */ jsx8(
|
|
8711
9064
|
"button",
|
|
8712
9065
|
{
|
|
8713
9066
|
type: "button",
|
|
@@ -8717,7 +9070,7 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8717
9070
|
children: laeuft ? "Bilder werden erzeugt \u2026" : "Bilder erzeugen"
|
|
8718
9071
|
}
|
|
8719
9072
|
),
|
|
8720
|
-
notiz && /* @__PURE__ */
|
|
9073
|
+
notiz && /* @__PURE__ */ jsx8(
|
|
8721
9074
|
"p",
|
|
8722
9075
|
{
|
|
8723
9076
|
"data-testid": `erzeugen-notiz-${lauf.run_id}`,
|
|
@@ -8729,14 +9082,14 @@ var ErzeugenAktion = ({ port, lauf, wahl, wahlFehler, onFertig }) => {
|
|
|
8729
9082
|
] });
|
|
8730
9083
|
};
|
|
8731
9084
|
var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
8732
|
-
const [dateien, setDateien] =
|
|
8733
|
-
const [seeds, setSeeds] =
|
|
8734
|
-
const [modell, setModell] =
|
|
8735
|
-
const [itemId, setItemId] =
|
|
8736
|
-
const [laeuft, setLaeuft] =
|
|
8737
|
-
const [notiz, setNotiz] =
|
|
9085
|
+
const [dateien, setDateien] = useState8([]);
|
|
9086
|
+
const [seeds, setSeeds] = useState8({});
|
|
9087
|
+
const [modell, setModell] = useState8("");
|
|
9088
|
+
const [itemId, setItemId] = useState8("");
|
|
9089
|
+
const [laeuft, setLaeuft] = useState8(false);
|
|
9090
|
+
const [notiz, setNotiz] = useState8(null);
|
|
8738
9091
|
if (!port.imageBatchWrite) {
|
|
8739
|
-
return /* @__PURE__ */
|
|
9092
|
+
return /* @__PURE__ */ jsx8("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." });
|
|
8740
9093
|
}
|
|
8741
9094
|
const importieren = async () => {
|
|
8742
9095
|
setLaeuft(true);
|
|
@@ -8791,11 +9144,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8791
9144
|
setLaeuft(false);
|
|
8792
9145
|
onFertig();
|
|
8793
9146
|
};
|
|
8794
|
-
return /* @__PURE__ */
|
|
8795
|
-
/* @__PURE__ */
|
|
8796
|
-
/* @__PURE__ */ jsxs7("label", { children: [
|
|
9147
|
+
return /* @__PURE__ */ jsxs8("div", { className: "szenen-bilder__aktion-inhalt", "data-testid": `zuordnen-${lauf.run_id}`, children: [
|
|
9148
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8797
9149
|
"Bilddateien",
|
|
8798
|
-
/* @__PURE__ */
|
|
9150
|
+
/* @__PURE__ */ jsx8(
|
|
8799
9151
|
"input",
|
|
8800
9152
|
{
|
|
8801
9153
|
type: "file",
|
|
@@ -8809,10 +9161,10 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8809
9161
|
}
|
|
8810
9162
|
)
|
|
8811
9163
|
] }),
|
|
8812
|
-
dateien.length > 0 && /* @__PURE__ */
|
|
8813
|
-
/* @__PURE__ */
|
|
9164
|
+
dateien.length > 0 && /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
9165
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8814
9166
|
"Modell (f\xFCr alle Bilder, leer = unbekannt)",
|
|
8815
|
-
/* @__PURE__ */
|
|
9167
|
+
/* @__PURE__ */ jsx8(
|
|
8816
9168
|
"input",
|
|
8817
9169
|
{
|
|
8818
9170
|
value: modell,
|
|
@@ -8821,16 +9173,16 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8821
9173
|
}
|
|
8822
9174
|
)
|
|
8823
9175
|
] }),
|
|
8824
|
-
/* @__PURE__ */
|
|
8825
|
-
/* @__PURE__ */
|
|
9176
|
+
/* @__PURE__ */ jsx8("ol", { "data-testid": `zuordnen-vorschau-${lauf.run_id}`, children: dateien.map((datei, index) => /* @__PURE__ */ jsxs8("li", { children: [
|
|
9177
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
8826
9178
|
"Position ",
|
|
8827
9179
|
index,
|
|
8828
9180
|
": ",
|
|
8829
9181
|
datei.name
|
|
8830
9182
|
] }),
|
|
8831
|
-
/* @__PURE__ */
|
|
9183
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8832
9184
|
"Seed (leer = unbekannt)",
|
|
8833
|
-
/* @__PURE__ */
|
|
9185
|
+
/* @__PURE__ */ jsx8(
|
|
8834
9186
|
"input",
|
|
8835
9187
|
{
|
|
8836
9188
|
"data-testid": `zuordnen-seed-${lauf.run_id}-${index}`,
|
|
@@ -8840,7 +9192,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8840
9192
|
)
|
|
8841
9193
|
] })
|
|
8842
9194
|
] }, `${datei.name}-${index}`)) }),
|
|
8843
|
-
/* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ jsxs8(
|
|
8844
9196
|
"button",
|
|
8845
9197
|
{
|
|
8846
9198
|
type: "button",
|
|
@@ -8854,9 +9206,9 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8854
9206
|
}
|
|
8855
9207
|
)
|
|
8856
9208
|
] }),
|
|
8857
|
-
/* @__PURE__ */
|
|
9209
|
+
/* @__PURE__ */ jsxs8("label", { children: [
|
|
8858
9210
|
"Oder ein bestehendes Library-Item",
|
|
8859
|
-
/* @__PURE__ */
|
|
9211
|
+
/* @__PURE__ */ jsx8(
|
|
8860
9212
|
"input",
|
|
8861
9213
|
{
|
|
8862
9214
|
value: itemId,
|
|
@@ -8866,7 +9218,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8866
9218
|
}
|
|
8867
9219
|
)
|
|
8868
9220
|
] }),
|
|
8869
|
-
/* @__PURE__ */
|
|
9221
|
+
/* @__PURE__ */ jsx8(
|
|
8870
9222
|
"button",
|
|
8871
9223
|
{
|
|
8872
9224
|
type: "button",
|
|
@@ -8876,7 +9228,7 @@ var ZuordnenAktion = ({ port, lauf, onFertig }) => {
|
|
|
8876
9228
|
children: "Bestehendes Item zuordnen"
|
|
8877
9229
|
}
|
|
8878
9230
|
),
|
|
8879
|
-
notiz && /* @__PURE__ */
|
|
9231
|
+
notiz && /* @__PURE__ */ jsx8(
|
|
8880
9232
|
"p",
|
|
8881
9233
|
{
|
|
8882
9234
|
"data-testid": `zuordnen-notiz-${lauf.run_id}`,
|
|
@@ -8901,12 +9253,12 @@ function readAsBase64(datei) {
|
|
|
8901
9253
|
}
|
|
8902
9254
|
|
|
8903
9255
|
// src/features/szenen/areas/RunsPanel.tsx
|
|
8904
|
-
import { jsx as
|
|
9256
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
8905
9257
|
var RunsPanel = ({ port, source, contextId }) => {
|
|
8906
|
-
const [anweisung, setAnweisung] =
|
|
8907
|
-
const [laeuft, setLaeuft] =
|
|
8908
|
-
const [notiz, setNotiz] =
|
|
8909
|
-
const [nachladen, setNachladen] =
|
|
9258
|
+
const [anweisung, setAnweisung] = useState9("");
|
|
9259
|
+
const [laeuft, setLaeuft] = useState9(false);
|
|
9260
|
+
const [notiz, setNotiz] = useState9(null);
|
|
9261
|
+
const [nachladen, setNachladen] = useState9(0);
|
|
8910
9262
|
const faehig = capabilitiesOf(port);
|
|
8911
9263
|
const quellSchluessel = source.kind === "published" ? source.shotVersionId : source.kind === "draft_chain" ? source.chainId : source.sceneElementId;
|
|
8912
9264
|
const [phase, neuLaden] = usePortQuery(
|
|
@@ -8931,12 +9283,15 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
8931
9283
|
neuLaden();
|
|
8932
9284
|
};
|
|
8933
9285
|
const laeufe = phase.status === "ready" ? phase.value : [];
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
9286
|
+
const [gewaehlteRunde, setGewaehlteRunde] = useState9(void 0);
|
|
9287
|
+
const neueste = laeufe.length > 0 ? laeufe[laeufe.length - 1].run_id : null;
|
|
9288
|
+
const offeneRunde = gewaehlteRunde === void 0 ? neueste : gewaehlteRunde;
|
|
9289
|
+
return /* @__PURE__ */ jsxs9("div", { className: "szenen-runs", "data-testid": "laeufe-bereich", "data-shot-version": quellSchluessel, children: [
|
|
9290
|
+
/* @__PURE__ */ jsx9("h4", { children: "Prompt-L\xE4ufe" }),
|
|
9291
|
+
source.kind === "published" && /* @__PURE__ */ jsxs9("div", { className: "szenen-runs__start", children: [
|
|
9292
|
+
/* @__PURE__ */ jsxs9("label", { children: [
|
|
8938
9293
|
"Anweisung (optional)",
|
|
8939
|
-
/* @__PURE__ */
|
|
9294
|
+
/* @__PURE__ */ jsx9(
|
|
8940
9295
|
"input",
|
|
8941
9296
|
{
|
|
8942
9297
|
"data-testid": "lauf-anweisung",
|
|
@@ -8945,21 +9300,25 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
8945
9300
|
}
|
|
8946
9301
|
)
|
|
8947
9302
|
] }),
|
|
8948
|
-
/* @__PURE__ */
|
|
9303
|
+
/* @__PURE__ */ jsx9("button", { type: "button", "data-testid": "lauf-starten", disabled: laeuft, onClick: starten, children: "Prompt-Lauf starten" })
|
|
8949
9304
|
] }),
|
|
8950
|
-
notiz && /* @__PURE__ */
|
|
8951
|
-
phase.status === "loading" && /* @__PURE__ */
|
|
8952
|
-
phase.status === "error" && /* @__PURE__ */
|
|
9305
|
+
notiz && /* @__PURE__ */ jsx9("p", { "data-testid": "lauf-notiz", "data-tone": notiz.tone, role: notiz.tone === "error" ? "alert" : "status", children: notiz.text }),
|
|
9306
|
+
phase.status === "loading" && /* @__PURE__ */ jsx9("p", { "data-testid": "laeufe-laden", children: "L\xE4ufe werden geladen \u2026" }),
|
|
9307
|
+
phase.status === "error" && /* @__PURE__ */ jsxs9("p", { "data-testid": "laeufe-fehler", role: "alert", children: [
|
|
8953
9308
|
"L\xE4ufe konnten nicht geladen werden: ",
|
|
8954
9309
|
phase.message
|
|
8955
9310
|
] }),
|
|
8956
|
-
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */
|
|
8957
|
-
/* @__PURE__ */
|
|
9311
|
+
phase.status === "ready" && laeufe.length === 0 && /* @__PURE__ */ jsx9("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." }),
|
|
9312
|
+
/* @__PURE__ */ jsx9("ol", { "data-testid": "runden-liste", children: laeufe.map((lauf) => /* @__PURE__ */ jsx9(
|
|
8958
9313
|
RundenEintrag,
|
|
8959
9314
|
{
|
|
8960
9315
|
port,
|
|
8961
9316
|
lauf,
|
|
8962
9317
|
runde: roundOfRun(lauf, laeufe),
|
|
9318
|
+
offen: lauf.run_id === offeneRunde,
|
|
9319
|
+
onUmschalten: () => setGewaehlteRunde(
|
|
9320
|
+
lauf.run_id === offeneRunde ? null : lauf.run_id
|
|
9321
|
+
),
|
|
8963
9322
|
itemMoeglich: faehig.saveRunAsItem,
|
|
8964
9323
|
onItemGespeichert: () => setNachladen((n) => n + 1)
|
|
8965
9324
|
},
|
|
@@ -8967,13 +9326,43 @@ var RunsPanel = ({ port, source, contextId }) => {
|
|
|
8967
9326
|
)) })
|
|
8968
9327
|
] });
|
|
8969
9328
|
};
|
|
8970
|
-
var
|
|
8971
|
-
|
|
8972
|
-
const
|
|
8973
|
-
|
|
9329
|
+
var AUSZUG = 90;
|
|
9330
|
+
function auszug(text, laenge = AUSZUG) {
|
|
9331
|
+
const sauber = text.replace(/\s+/g, " ").trim();
|
|
9332
|
+
if (sauber.length <= laenge) return sauber;
|
|
9333
|
+
const schnitt = sauber.lastIndexOf(" ", laenge);
|
|
9334
|
+
return `${sauber.slice(0, schnitt > laenge / 2 ? schnitt : laenge)} \u2026`;
|
|
9335
|
+
}
|
|
9336
|
+
var STATUS_TEXT = {
|
|
9337
|
+
succeeded: "erfolgreich",
|
|
9338
|
+
failed: "fehlgeschlagen"
|
|
9339
|
+
};
|
|
9340
|
+
var LANGER_TEXT = 240;
|
|
9341
|
+
var Sekundaertext = ({ titel, text, testId }) => {
|
|
9342
|
+
const [ganz, setGanz] = useState9(false);
|
|
9343
|
+
const lang = text.length > LANGER_TEXT;
|
|
9344
|
+
return /* @__PURE__ */ jsxs9("section", { className: "szenen-runs__sekundaer", children: [
|
|
9345
|
+
/* @__PURE__ */ jsx9("h5", { children: titel }),
|
|
9346
|
+
/* @__PURE__ */ jsx9("p", { "data-testid": testId, children: lang && !ganz ? auszug(text, LANGER_TEXT) : text }),
|
|
9347
|
+
lang && /* @__PURE__ */ jsx9(
|
|
9348
|
+
"button",
|
|
9349
|
+
{
|
|
9350
|
+
type: "button",
|
|
9351
|
+
className: "szenen-runs__mehr",
|
|
9352
|
+
onClick: () => setGanz(!ganz),
|
|
9353
|
+
"data-testid": `${testId}-mehr`,
|
|
9354
|
+
children: ganz ? "weniger anzeigen" : "vollst\xE4ndig anzeigen"
|
|
9355
|
+
}
|
|
9356
|
+
)
|
|
9357
|
+
] });
|
|
9358
|
+
};
|
|
9359
|
+
var RundenEintrag = ({ port, lauf, runde, offen, onUmschalten, itemMoeglich, onItemGespeichert }) => {
|
|
9360
|
+
const [notiz, setNotiz] = useState9(null);
|
|
9361
|
+
const [laeuft, setLaeuft] = useState9(false);
|
|
9362
|
+
const [nachladen, setNachladen] = useState9(0);
|
|
8974
9363
|
const [itemPhase] = usePortQuery(
|
|
8975
|
-
() => port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
8976
|
-
[port, lauf.run_id, nachladen]
|
|
9364
|
+
() => offen && port.items ? port.items.getItemForRun(lauf.run_id) : Promise.resolve({ kind: "ok", value: null }),
|
|
9365
|
+
[port, lauf.run_id, nachladen, offen]
|
|
8977
9366
|
);
|
|
8978
9367
|
const item = itemPhase.status === "ready" ? itemPhase.value : null;
|
|
8979
9368
|
const speichern = async () => {
|
|
@@ -8987,75 +9376,121 @@ var RundenEintrag = ({ port, lauf, runde, itemMoeglich, onItemGespeichert }) =>
|
|
|
8987
9376
|
setNachladen((n) => n + 1);
|
|
8988
9377
|
onItemGespeichert();
|
|
8989
9378
|
};
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
9379
|
+
const zusammenfassung = lauf.status === "succeeded" && lauf.output ? auszug(lauf.output.positive) : null;
|
|
9380
|
+
return /* @__PURE__ */ jsxs9("li", { "data-testid": `runde-${lauf.run_id}`, "data-runde": runde, "data-status": lauf.status, children: [
|
|
9381
|
+
/* @__PURE__ */ jsxs9(
|
|
9382
|
+
"button",
|
|
9383
|
+
{
|
|
9384
|
+
type: "button",
|
|
9385
|
+
className: "szenen-runs__kopf",
|
|
9386
|
+
onClick: onUmschalten,
|
|
9387
|
+
"aria-expanded": offen,
|
|
9388
|
+
"data-testid": `runde-umschalten-${lauf.run_id}`,
|
|
9389
|
+
children: [
|
|
9390
|
+
/* @__PURE__ */ jsxs9("span", { className: "szenen-runs__marke", children: [
|
|
9391
|
+
"Runde ",
|
|
9392
|
+
runde
|
|
9393
|
+
] }),
|
|
9394
|
+
/* @__PURE__ */ jsx9(
|
|
9395
|
+
"span",
|
|
9396
|
+
{
|
|
9397
|
+
className: "szenen-runs__status",
|
|
9398
|
+
"data-status": lauf.status,
|
|
9399
|
+
"data-testid": `status-${lauf.run_id}`,
|
|
9400
|
+
children: STATUS_TEXT[lauf.status]
|
|
9401
|
+
}
|
|
9402
|
+
),
|
|
9403
|
+
/* @__PURE__ */ jsxs9("span", { className: "szenen-runs__modell", "data-testid": `provider-${lauf.run_id}`, children: [
|
|
9404
|
+
lauf.provider,
|
|
9405
|
+
" \xB7 ",
|
|
9406
|
+
lauf.model_id
|
|
9407
|
+
] }),
|
|
9408
|
+
zusammenfassung && /* @__PURE__ */ jsx9(
|
|
9409
|
+
"span",
|
|
9410
|
+
{
|
|
9411
|
+
className: "szenen-runs__auszug",
|
|
9412
|
+
"data-testid": `auszug-${lauf.run_id}`,
|
|
9413
|
+
children: zusammenfassung
|
|
9414
|
+
}
|
|
9415
|
+
)
|
|
9416
|
+
]
|
|
9417
|
+
}
|
|
9418
|
+
),
|
|
9419
|
+
lauf.status === "failed" && lauf.failure && /* @__PURE__ */ jsxs9("div", { className: "szenen-runs__fehler", "data-testid": `fehler-${lauf.run_id}`, role: "alert", children: [
|
|
9420
|
+
/* @__PURE__ */ jsxs9("strong", { children: [
|
|
9421
|
+
"Fehlgeschlagen \u2014 ",
|
|
9422
|
+
lauf.failure.class
|
|
8995
9423
|
] }),
|
|
8996
|
-
/* @__PURE__ */
|
|
8997
|
-
/* @__PURE__ */ jsx8("span", { "data-testid": `status-${lauf.run_id}`, children: lauf.status }),
|
|
8998
|
-
/* @__PURE__ */ jsxs8("span", { "data-testid": `provider-${lauf.run_id}`, children: [
|
|
8999
|
-
lauf.provider,
|
|
9000
|
-
" \xB7 ",
|
|
9001
|
-
lauf.model_id
|
|
9002
|
-
] })
|
|
9424
|
+
/* @__PURE__ */ jsx9("p", { children: lauf.failure.message })
|
|
9003
9425
|
] }),
|
|
9004
|
-
|
|
9005
|
-
/* @__PURE__ */
|
|
9006
|
-
/* @__PURE__ */
|
|
9007
|
-
|
|
9426
|
+
offen && /* @__PURE__ */ jsxs9("div", { className: "szenen-runs__inhalt", "data-testid": `runde-inhalt-${lauf.run_id}`, children: [
|
|
9427
|
+
lauf.status === "succeeded" && lauf.output && /* @__PURE__ */ jsxs9("div", { "data-testid": `ausgabe-${lauf.run_id}`, children: [
|
|
9428
|
+
/* @__PURE__ */ jsxs9("section", { className: "szenen-runs__prompt", children: [
|
|
9429
|
+
/* @__PURE__ */ jsx9("h5", { children: "Positiver Prompt" }),
|
|
9430
|
+
/* @__PURE__ */ jsx9("p", { "data-testid": `positiv-${lauf.run_id}`, children: lauf.output.positive })
|
|
9431
|
+
] }),
|
|
9432
|
+
/* @__PURE__ */ jsxs9("section", { className: "szenen-runs__prompt szenen-runs__prompt--negativ", children: [
|
|
9433
|
+
/* @__PURE__ */ jsx9("h5", { children: "Negativer Prompt" }),
|
|
9434
|
+
/* @__PURE__ */ jsx9("p", { "data-testid": `negativ-${lauf.run_id}`, children: lauf.output.negative ?? "(keiner)" })
|
|
9435
|
+
] }),
|
|
9436
|
+
/* @__PURE__ */ jsx9(
|
|
9437
|
+
Sekundaertext,
|
|
9438
|
+
{
|
|
9439
|
+
titel: "Erl\xE4uterung",
|
|
9440
|
+
text: lauf.output.feedback,
|
|
9441
|
+
testId: `feedback-${lauf.run_id}`
|
|
9442
|
+
}
|
|
9443
|
+
),
|
|
9444
|
+
lauf.output.visibility.assumptions.length > 0 && /* @__PURE__ */ jsxs9("section", { className: "szenen-runs__sekundaer", children: [
|
|
9445
|
+
/* @__PURE__ */ jsx9("h5", { children: "Annahmen" }),
|
|
9446
|
+
/* @__PURE__ */ jsx9("ul", { "data-testid": `annahmen-${lauf.run_id}`, children: lauf.output.visibility.assumptions.map((a, i) => /* @__PURE__ */ jsx9("li", { children: a }, i)) })
|
|
9447
|
+
] }),
|
|
9448
|
+
lauf.output.notes.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "szenen-runs__notizen", "data-testid": `notizen-${lauf.run_id}`, children: lauf.output.notes.map((n, i) => /* @__PURE__ */ jsx9("li", { children: n }, i)) })
|
|
9008
9449
|
] }),
|
|
9009
|
-
/* @__PURE__ */
|
|
9010
|
-
/* @__PURE__ */
|
|
9011
|
-
/* @__PURE__ */
|
|
9450
|
+
lauf.raw_output && /* @__PURE__ */ jsxs9("details", { "data-testid": `diagnose-${lauf.run_id}`, children: [
|
|
9451
|
+
/* @__PURE__ */ jsx9("summary", { children: "Rohantwort (Diagnose)" }),
|
|
9452
|
+
/* @__PURE__ */ jsx9("pre", { children: lauf.raw_output })
|
|
9012
9453
|
] }),
|
|
9013
|
-
/* @__PURE__ */
|
|
9014
|
-
/* @__PURE__ */
|
|
9015
|
-
/* @__PURE__ */
|
|
9454
|
+
/* @__PURE__ */ jsxs9("details", { className: "szenen-runs__technisch", "data-testid": `technisch-${lauf.run_id}`, children: [
|
|
9455
|
+
/* @__PURE__ */ jsx9("summary", { children: "Technische Informationen" }),
|
|
9456
|
+
/* @__PURE__ */ jsxs9("p", { children: [
|
|
9457
|
+
"Lauf-ID: ",
|
|
9458
|
+
/* @__PURE__ */ jsx9("code", { "data-testid": `run-id-${lauf.run_id}`, children: lauf.run_id })
|
|
9459
|
+
] }),
|
|
9460
|
+
/* @__PURE__ */ jsxs9("p", { children: [
|
|
9461
|
+
"Modell: ",
|
|
9462
|
+
/* @__PURE__ */ jsx9("code", { children: lauf.model_id }),
|
|
9463
|
+
" bei ",
|
|
9464
|
+
/* @__PURE__ */ jsx9("code", { children: lauf.provider })
|
|
9465
|
+
] }),
|
|
9466
|
+
/* @__PURE__ */ jsxs9("p", { children: [
|
|
9467
|
+
"erzeugt: ",
|
|
9468
|
+
/* @__PURE__ */ jsx9("code", { children: lauf.created_at })
|
|
9469
|
+
] })
|
|
9016
9470
|
] }),
|
|
9017
|
-
lauf.
|
|
9018
|
-
|
|
9019
|
-
|
|
9471
|
+
lauf.status === "succeeded" && itemMoeglich && !item && /* @__PURE__ */ jsx9("button", { type: "button", "data-testid": `als-item-${lauf.run_id}`, disabled: laeuft, onClick: speichern, children: "als Item speichern" }),
|
|
9472
|
+
item && /* @__PURE__ */ jsxs9("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
9473
|
+
"Bereits als Item gespeichert: ",
|
|
9474
|
+
/* @__PURE__ */ jsx9("code", { children: item.itemId })
|
|
9020
9475
|
] }),
|
|
9021
|
-
lauf.
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
/* @__PURE__ */ jsxs8("h5", { children: [
|
|
9025
|
-
"Fehlgeschlagen \u2014 ",
|
|
9026
|
-
lauf.failure.class
|
|
9027
|
-
] }),
|
|
9028
|
-
/* @__PURE__ */ jsx8("p", { children: lauf.failure.message })
|
|
9029
|
-
] }),
|
|
9030
|
-
lauf.raw_output && /* @__PURE__ */ jsxs8("details", { "data-testid": `diagnose-${lauf.run_id}`, children: [
|
|
9031
|
-
/* @__PURE__ */ jsx8("summary", { children: "Rohantwort (Diagnose)" }),
|
|
9032
|
-
/* @__PURE__ */ jsx8("pre", { children: lauf.raw_output })
|
|
9033
|
-
] }),
|
|
9034
|
-
lauf.status === "succeeded" && itemMoeglich && !item && /* @__PURE__ */ jsx8("button", { type: "button", "data-testid": `als-item-${lauf.run_id}`, disabled: laeuft, onClick: speichern, children: "als Item speichern" }),
|
|
9035
|
-
item && /* @__PURE__ */ jsxs8("p", { "data-testid": `item-${lauf.run_id}`, children: [
|
|
9036
|
-
"Bereits als Item gespeichert: ",
|
|
9037
|
-
/* @__PURE__ */ jsx8("code", { children: item.itemId })
|
|
9038
|
-
] }),
|
|
9039
|
-
lauf.status === "succeeded" && !itemMoeglich && /* @__PURE__ */ jsx8("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." }),
|
|
9040
|
-
notiz && /* @__PURE__ */ jsx8("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
9041
|
-
lauf.status === "succeeded" && /* @__PURE__ */ jsxs8("details", { "data-testid": `bilder-bereich-${lauf.run_id}`, children: [
|
|
9042
|
-
/* @__PURE__ */ jsx8("summary", { children: "Bilder zu diesem Lauf" }),
|
|
9043
|
-
/* @__PURE__ */ jsx8(RunImagesPanel, { port, lauf })
|
|
9476
|
+
lauf.status === "succeeded" && !itemMoeglich && /* @__PURE__ */ jsx9("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." }),
|
|
9477
|
+
notiz && /* @__PURE__ */ jsx9("p", { "data-testid": `item-notiz-${lauf.run_id}`, "data-tone": notiz.tone, children: notiz.text }),
|
|
9478
|
+
lauf.status === "succeeded" && /* @__PURE__ */ jsx9(RunImagesPanel, { port, lauf })
|
|
9044
9479
|
] })
|
|
9045
9480
|
] });
|
|
9046
9481
|
};
|
|
9047
9482
|
|
|
9048
9483
|
// src/features/szenen/areas/ElementDetail.tsx
|
|
9049
|
-
import { Fragment as
|
|
9484
|
+
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
9050
9485
|
var STRUKTURELL_BEDIENT = {
|
|
9051
9486
|
scene: ["nodes", "relations"]
|
|
9052
9487
|
};
|
|
9053
9488
|
var AbgeleitetesBildmodell = ({ schluessel }) => {
|
|
9054
9489
|
if (!schluessel) return null;
|
|
9055
|
-
return /* @__PURE__ */
|
|
9056
|
-
/* @__PURE__ */
|
|
9057
|
-
/* @__PURE__ */
|
|
9058
|
-
/* @__PURE__ */
|
|
9490
|
+
return /* @__PURE__ */ jsxs10("section", { className: "szenen-detail__derived", "data-testid": "abgeleitetes-bildmodell", children: [
|
|
9491
|
+
/* @__PURE__ */ jsx10("h4", { children: "Bildgenerierung \u2014 wo das Modell entschieden wird" }),
|
|
9492
|
+
/* @__PURE__ */ jsxs10("p", { "data-testid": "bildmodell-hinweis", children: [
|
|
9493
|
+
/* @__PURE__ */ jsx10("code", { children: schluessel }),
|
|
9059
9494
|
" 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)."
|
|
9060
9495
|
] })
|
|
9061
9496
|
] });
|
|
@@ -9067,16 +9502,16 @@ var ElementDetail = ({
|
|
|
9067
9502
|
author,
|
|
9068
9503
|
onChanged
|
|
9069
9504
|
}) => {
|
|
9070
|
-
const [nachladen, setNachladen] =
|
|
9505
|
+
const [nachladen, setNachladen] = useState10(0);
|
|
9071
9506
|
const [phase] = usePortQuery(
|
|
9072
9507
|
() => port.elements.getElement(elementId),
|
|
9073
9508
|
[port, elementId, nachladen]
|
|
9074
9509
|
);
|
|
9075
|
-
const [entwurf, setEntwurf] =
|
|
9076
|
-
const [notiz, setNotiz] =
|
|
9077
|
-
const [laeuft, setLaeuft] =
|
|
9078
|
-
const [wahl, setWahl] =
|
|
9079
|
-
const [basiswechsel, setBasiswechsel] =
|
|
9510
|
+
const [entwurf, setEntwurf] = useState10({});
|
|
9511
|
+
const [notiz, setNotiz] = useState10(null);
|
|
9512
|
+
const [laeuft, setLaeuft] = useState10(false);
|
|
9513
|
+
const [wahl, setWahl] = useState10(null);
|
|
9514
|
+
const [basiswechsel, setBasiswechsel] = useState10(null);
|
|
9080
9515
|
const [kettenPhase] = usePortQuery(
|
|
9081
9516
|
() => port.context.chainFor(contextId),
|
|
9082
9517
|
[port, contextId]
|
|
@@ -9098,7 +9533,7 @@ var ElementDetail = ({
|
|
|
9098
9533
|
() => schnappschuss ? fieldsForType(schnappschuss.element.type) : [],
|
|
9099
9534
|
[schnappschuss?.element.type]
|
|
9100
9535
|
);
|
|
9101
|
-
|
|
9536
|
+
useEffect5(() => {
|
|
9102
9537
|
setWahl(null);
|
|
9103
9538
|
setBasiswechsel(null);
|
|
9104
9539
|
setNotiz(null);
|
|
@@ -9129,7 +9564,7 @@ var ElementDetail = ({
|
|
|
9129
9564
|
return {};
|
|
9130
9565
|
}, [schnappschuss, angezeigt]);
|
|
9131
9566
|
const anzeigeSchluessel = angezeigt.kind === "version" ? `v:${angezeigt.versionId}` : angezeigt.kind;
|
|
9132
|
-
|
|
9567
|
+
useEffect5(() => {
|
|
9133
9568
|
if (!schnappschuss) return;
|
|
9134
9569
|
setEntwurf(formFromPayload(felder, angezeigtePayload));
|
|
9135
9570
|
}, [
|
|
@@ -9188,9 +9623,9 @@ var ElementDetail = ({
|
|
|
9188
9623
|
return { valid: false, errors: [{ instancePath: "", message: String(e) }] };
|
|
9189
9624
|
}
|
|
9190
9625
|
}, [entwurf, felder, schnappschuss?.element.type, kettenfeld]);
|
|
9191
|
-
if (phase.status === "loading") return /* @__PURE__ */
|
|
9626
|
+
if (phase.status === "loading") return /* @__PURE__ */ jsx10("p", { "data-testid": "element-laden", children: "Element wird geladen \u2026" });
|
|
9192
9627
|
if (phase.status === "error") {
|
|
9193
|
-
return /* @__PURE__ */
|
|
9628
|
+
return /* @__PURE__ */ jsxs10("p", { "data-testid": "element-fehler", role: "alert", children: [
|
|
9194
9629
|
"Element ",
|
|
9195
9630
|
elementId,
|
|
9196
9631
|
" konnte nicht geladen werden: ",
|
|
@@ -9198,7 +9633,7 @@ var ElementDetail = ({
|
|
|
9198
9633
|
] });
|
|
9199
9634
|
}
|
|
9200
9635
|
if (!schnappschuss) {
|
|
9201
|
-
return /* @__PURE__ */
|
|
9636
|
+
return /* @__PURE__ */ jsxs10("p", { "data-testid": "element-unbekannt", children: [
|
|
9202
9637
|
"Element ",
|
|
9203
9638
|
elementId,
|
|
9204
9639
|
" ist unbekannt."
|
|
@@ -9304,28 +9739,28 @@ var ElementDetail = ({
|
|
|
9304
9739
|
formular: entwurf
|
|
9305
9740
|
};
|
|
9306
9741
|
const laufVersionId = angezeigt.kind === "version" ? angezeigt.versionId : usableHeadVersionId(kopfAufloesung);
|
|
9307
|
-
return /* @__PURE__ */
|
|
9308
|
-
/* @__PURE__ */
|
|
9309
|
-
/* @__PURE__ */
|
|
9310
|
-
/* @__PURE__ */
|
|
9311
|
-
/* @__PURE__ */
|
|
9312
|
-
schnappschuss.element.retired && /* @__PURE__ */
|
|
9742
|
+
return /* @__PURE__ */ jsxs10("div", { className: "szenen-detail", "data-testid": "element-detail", "data-element-id": elementId, children: [
|
|
9743
|
+
/* @__PURE__ */ jsxs10("header", { children: [
|
|
9744
|
+
/* @__PURE__ */ jsx10("h3", { children: schnappschuss.metadata?.title ?? "(ohne Titel)" }),
|
|
9745
|
+
/* @__PURE__ */ jsxs10("p", { className: "szenen-detail__ids", children: [
|
|
9746
|
+
/* @__PURE__ */ jsx10("span", { "data-testid": "element-typ", children: elementTypLabel(typ) }),
|
|
9747
|
+
schnappschuss.element.retired && /* @__PURE__ */ jsx10("span", { "data-testid": "ist-stillgelegt", children: "stillgelegt" })
|
|
9313
9748
|
] })
|
|
9314
9749
|
] }),
|
|
9315
|
-
kontextkette.status === "error" && /* @__PURE__ */
|
|
9750
|
+
kontextkette.status === "error" && /* @__PURE__ */ jsxs10("p", { role: "alert", "data-testid": "kontextkette-fehler", className: "szenen-detail__hint", children: [
|
|
9316
9751
|
"Die Kontextkette konnte nicht gelesen werden: ",
|
|
9317
9752
|
kontextkette.message,
|
|
9318
9753
|
". Solange das so ist, lassen sich weder der bevorzugte Kopf noch die ausw\xE4hlbaren Referenzen bestimmen \u2014 sie sind ",
|
|
9319
|
-
/* @__PURE__ */
|
|
9754
|
+
/* @__PURE__ */ jsx10("strong", { children: "unbekannt" }),
|
|
9320
9755
|
", nicht leer."
|
|
9321
9756
|
] }),
|
|
9322
|
-
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */
|
|
9757
|
+
kopfErgebnis?.kind === "dag_fehler" && /* @__PURE__ */ jsxs10("p", { role: "alert", "data-testid": "versionsgraph-fehler", className: "szenen-detail__hint", children: [
|
|
9323
9758
|
"Der Versionsgraph dieses Elements ist nicht aufbaubar:",
|
|
9324
9759
|
" ",
|
|
9325
9760
|
kopfErgebnis.message,
|
|
9326
9761
|
". Die Versionen bleiben einzeln anzeigbar; ein bevorzugter Kopf l\xE4sst sich daraus nicht ableiten."
|
|
9327
9762
|
] }),
|
|
9328
|
-
/* @__PURE__ */
|
|
9763
|
+
/* @__PURE__ */ jsx10(
|
|
9329
9764
|
VersionNavigator,
|
|
9330
9765
|
{
|
|
9331
9766
|
versions: schnappschuss.versions,
|
|
@@ -9348,22 +9783,22 @@ var ElementDetail = ({
|
|
|
9348
9783
|
}
|
|
9349
9784
|
}
|
|
9350
9785
|
),
|
|
9351
|
-
basiswechsel && draft && /* @__PURE__ */
|
|
9352
|
-
/* @__PURE__ */
|
|
9786
|
+
basiswechsel && draft && /* @__PURE__ */ jsxs10("div", { className: "szenen-detail__confirm", "data-testid": "basiswechsel-bestaetigung", role: "alertdialog", children: [
|
|
9787
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
9353
9788
|
"Es gibt bereits einen Entwurf (Revision ",
|
|
9354
9789
|
draft.revision,
|
|
9355
|
-
draft.base_version_id ? /* @__PURE__ */
|
|
9790
|
+
draft.base_version_id ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9356
9791
|
" auf Basis ",
|
|
9357
|
-
/* @__PURE__ */
|
|
9358
|
-
] }) : /* @__PURE__ */
|
|
9792
|
+
/* @__PURE__ */ jsx10("code", { children: draft.base_version_id })
|
|
9793
|
+
] }) : /* @__PURE__ */ jsx10(Fragment5, { children: " ohne Basis" }),
|
|
9359
9794
|
"). Ihn auf Version ",
|
|
9360
|
-
/* @__PURE__ */
|
|
9795
|
+
/* @__PURE__ */ jsx10("code", { children: basiswechsel }),
|
|
9361
9796
|
" neu aufzusetzen",
|
|
9362
9797
|
" ",
|
|
9363
|
-
/* @__PURE__ */
|
|
9798
|
+
/* @__PURE__ */ jsx10("strong", { children: "ersetzt seinen Inhalt" }),
|
|
9364
9799
|
" durch die Payload dieser Version."
|
|
9365
9800
|
] }),
|
|
9366
|
-
/* @__PURE__ */
|
|
9801
|
+
/* @__PURE__ */ jsx10(
|
|
9367
9802
|
"button",
|
|
9368
9803
|
{
|
|
9369
9804
|
type: "button",
|
|
@@ -9375,7 +9810,7 @@ var ElementDetail = ({
|
|
|
9375
9810
|
children: "Entwurf auf diese Version neu aufsetzen"
|
|
9376
9811
|
}
|
|
9377
9812
|
),
|
|
9378
|
-
/* @__PURE__ */
|
|
9813
|
+
/* @__PURE__ */ jsx10(
|
|
9379
9814
|
"button",
|
|
9380
9815
|
{
|
|
9381
9816
|
type: "button",
|
|
@@ -9386,26 +9821,26 @@ var ElementDetail = ({
|
|
|
9386
9821
|
}
|
|
9387
9822
|
)
|
|
9388
9823
|
] }),
|
|
9389
|
-
/* @__PURE__ */
|
|
9390
|
-
/* @__PURE__ */
|
|
9824
|
+
/* @__PURE__ */ jsxs10("section", { className: "szenen-detail__draft", "data-testid": "draft-bereich", children: [
|
|
9825
|
+
/* @__PURE__ */ jsx10("h4", { children: bearbeitbar ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9391
9826
|
"Entwurf",
|
|
9392
|
-
draft && /* @__PURE__ */
|
|
9827
|
+
draft && /* @__PURE__ */ jsxs10("span", { children: [
|
|
9393
9828
|
" \xB7 Revision ",
|
|
9394
9829
|
draft.revision
|
|
9395
9830
|
] })
|
|
9396
|
-
] }) : /* @__PURE__ */
|
|
9397
|
-
angezeigt.kind === "keiner" && /* @__PURE__ */
|
|
9831
|
+
] }) : /* @__PURE__ */ jsx10(Fragment5, { children: "Ver\xF6ffentlichte Version \u2014 nur Ansicht" }) }),
|
|
9832
|
+
angezeigt.kind === "keiner" && /* @__PURE__ */ jsxs10("p", { "data-testid": "nichts-angezeigt", children: [
|
|
9398
9833
|
"Es ist kein Stand ausgew\xE4hlt. Oben eine Version anzeigen oder \xFCber ",
|
|
9399
|
-
/* @__PURE__ */
|
|
9834
|
+
/* @__PURE__ */ jsx10("strong", { children: "als Grundlage bearbeiten" }),
|
|
9400
9835
|
" einen Entwurf beginnen."
|
|
9401
9836
|
] }),
|
|
9402
|
-
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */
|
|
9837
|
+
!bearbeitbar && angezeigt.kind === "version" && /* @__PURE__ */ jsxs10("p", { "data-testid": "nur-ansicht", className: "szenen-detail__hint", children: [
|
|
9403
9838
|
"Ver\xF6ffentlichte Versionen sind unver\xE4nderlich (D-02). Zum Bearbeiten oben ",
|
|
9404
|
-
/* @__PURE__ */
|
|
9839
|
+
/* @__PURE__ */ jsx10("strong", { children: "als Grundlage bearbeiten" }),
|
|
9405
9840
|
" w\xE4hlen \u2014 das erzeugt einen Entwurf mit genau dieser Version als Basis."
|
|
9406
9841
|
] }),
|
|
9407
|
-
angezeigt.kind !== "keiner" && /* @__PURE__ */
|
|
9408
|
-
typ === "scene" && /* @__PURE__ */
|
|
9842
|
+
angezeigt.kind !== "keiner" && /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9843
|
+
typ === "scene" && /* @__PURE__ */ jsx10(
|
|
9409
9844
|
SceneEditor,
|
|
9410
9845
|
{
|
|
9411
9846
|
port,
|
|
@@ -9419,57 +9854,57 @@ var ElementDetail = ({
|
|
|
9419
9854
|
}))
|
|
9420
9855
|
}
|
|
9421
9856
|
),
|
|
9422
|
-
felder.length === 0 && /* @__PURE__ */
|
|
9857
|
+
felder.length === 0 && /* @__PURE__ */ jsxs10("p", { "data-testid": "kein-schema", children: [
|
|
9423
9858
|
"F\xFCr den Typ ",
|
|
9424
9859
|
typ,
|
|
9425
9860
|
" liegt kein Payload-Schema vor."
|
|
9426
9861
|
] }),
|
|
9427
|
-
primaer.map((feld) => /* @__PURE__ */
|
|
9428
|
-
advanced.length > 0 && /* @__PURE__ */
|
|
9429
|
-
/* @__PURE__ */
|
|
9862
|
+
primaer.map((feld) => /* @__PURE__ */ jsx10(SchemaFieldRow, { ...feldProps, feld }, feld.path)),
|
|
9863
|
+
advanced.length > 0 && /* @__PURE__ */ jsxs10("details", { className: "szenen-detail__technical", "data-testid": "technische-felder", children: [
|
|
9864
|
+
/* @__PURE__ */ jsxs10("summary", { children: [
|
|
9430
9865
|
"Technische Felder / JSON (",
|
|
9431
9866
|
advanced.length,
|
|
9432
9867
|
")"
|
|
9433
9868
|
] }),
|
|
9434
|
-
advanced.map((feld) => /* @__PURE__ */
|
|
9869
|
+
advanced.map((feld) => /* @__PURE__ */ jsx10(SchemaFieldRow, { ...feldProps, feld }, feld.path))
|
|
9435
9870
|
] }),
|
|
9436
|
-
/* @__PURE__ */
|
|
9437
|
-
/* @__PURE__ */
|
|
9438
|
-
/* @__PURE__ */
|
|
9871
|
+
/* @__PURE__ */ jsxs10("details", { className: "szenen-detail__technical", "data-testid": "technische-informationen", children: [
|
|
9872
|
+
/* @__PURE__ */ jsx10("summary", { children: "Technische Informationen" }),
|
|
9873
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
9439
9874
|
"Element-ID: ",
|
|
9440
|
-
/* @__PURE__ */
|
|
9875
|
+
/* @__PURE__ */ jsx10("code", { children: schnappschuss.element.element_id })
|
|
9441
9876
|
] }),
|
|
9442
|
-
/* @__PURE__ */
|
|
9877
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
9443
9878
|
"angezeigter Stand:",
|
|
9444
9879
|
" ",
|
|
9445
|
-
/* @__PURE__ */
|
|
9880
|
+
/* @__PURE__ */ jsx10("code", { "data-testid": "angezeigter-stand", children: angezeigt.kind === "version" ? angezeigt.versionId : "Entwurf" })
|
|
9446
9881
|
] }),
|
|
9447
|
-
draft && /* @__PURE__ */
|
|
9882
|
+
draft && /* @__PURE__ */ jsxs10("p", { children: [
|
|
9448
9883
|
"Basis des Entwurfs:",
|
|
9449
9884
|
" ",
|
|
9450
|
-
/* @__PURE__ */
|
|
9885
|
+
/* @__PURE__ */ jsx10("code", { children: draft.base_version_id ?? "(keine)" })
|
|
9451
9886
|
] })
|
|
9452
9887
|
] })
|
|
9453
9888
|
] }),
|
|
9454
|
-
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */
|
|
9889
|
+
bearbeitbar && vorschau && !vorschau.valid && /* @__PURE__ */ jsx10("ul", { "data-testid": "vorschau-befunde", className: "szenen-detail__preview-errors", children: vorschau.errors.map((f, i) => /* @__PURE__ */ jsxs10("li", { children: [
|
|
9455
9890
|
f.instancePath || "/",
|
|
9456
9891
|
": ",
|
|
9457
9892
|
f.message
|
|
9458
9893
|
] }, i)) }),
|
|
9459
|
-
kettenfeld && /* @__PURE__ */
|
|
9894
|
+
kettenfeld && /* @__PURE__ */ jsxs10("p", { "data-testid": "kettenfeld-hinweis", className: "szenen-detail__hint", children: [
|
|
9460
9895
|
"Der Verweis ",
|
|
9461
|
-
/* @__PURE__ */
|
|
9896
|
+
/* @__PURE__ */ jsx10("code", { children: kettenfeld }),
|
|
9462
9897
|
" steht in den Kettenmetadaten, nicht in der Payload (D-96) \u2014 f\xFCr den Prompt-Lauf aus der Kette gen\xFCgt das. Zum",
|
|
9463
9898
|
" ",
|
|
9464
|
-
/* @__PURE__ */
|
|
9899
|
+
/* @__PURE__ */ jsx10("strong", { children: "Ver\xF6ffentlichen" }),
|
|
9465
9900
|
" muss er als regul\xE4re Referenz auf eine ver\xF6ffentlichte Version gesetzt werden."
|
|
9466
9901
|
] }),
|
|
9467
|
-
bearbeitbar && /* @__PURE__ */
|
|
9468
|
-
/* @__PURE__ */
|
|
9469
|
-
/* @__PURE__ */
|
|
9902
|
+
bearbeitbar && /* @__PURE__ */ jsxs10("div", { className: "szenen-detail__actions", children: [
|
|
9903
|
+
/* @__PURE__ */ jsx10("button", { type: "button", "data-testid": "draft-speichern", disabled: laeuft, onClick: speichern, children: "Entwurf speichern" }),
|
|
9904
|
+
/* @__PURE__ */ jsx10("button", { type: "button", "data-testid": "veroeffentlichen", disabled: laeuft, onClick: veroeffentlichen, children: "ver\xF6ffentlichen" })
|
|
9470
9905
|
] })
|
|
9471
9906
|
] }),
|
|
9472
|
-
typ === "target_model" && /* @__PURE__ */
|
|
9907
|
+
typ === "target_model" && /* @__PURE__ */ jsx10(
|
|
9473
9908
|
AbgeleitetesBildmodell,
|
|
9474
9909
|
{
|
|
9475
9910
|
schluessel: (() => {
|
|
@@ -9484,8 +9919,8 @@ var ElementDetail = ({
|
|
|
9484
9919
|
// einer Draft-Kette, fuehrt der Weg ueber das Einfrieren —
|
|
9485
9920
|
// der alte Satz „setzen eine veroeffentlichte Version
|
|
9486
9921
|
// voraus" gilt nur noch fuer den Einzel-Shot.
|
|
9487
|
-
draft?.chain ? /* @__PURE__ */
|
|
9488
|
-
/* @__PURE__ */
|
|
9922
|
+
draft?.chain ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9923
|
+
/* @__PURE__ */ jsx10(
|
|
9489
9924
|
PromptStartAction,
|
|
9490
9925
|
{
|
|
9491
9926
|
port,
|
|
@@ -9495,7 +9930,7 @@ var ElementDetail = ({
|
|
|
9495
9930
|
}
|
|
9496
9931
|
}
|
|
9497
9932
|
),
|
|
9498
|
-
/* @__PURE__ */
|
|
9933
|
+
/* @__PURE__ */ jsx10(
|
|
9499
9934
|
RunsPanel,
|
|
9500
9935
|
{
|
|
9501
9936
|
port,
|
|
@@ -9503,17 +9938,17 @@ var ElementDetail = ({
|
|
|
9503
9938
|
source: { kind: "draft_chain", chainId: draft.chain.chain_id }
|
|
9504
9939
|
}
|
|
9505
9940
|
)
|
|
9506
|
-
] }) : /* @__PURE__ */
|
|
9507
|
-
) : laufVersionId ? /* @__PURE__ */
|
|
9941
|
+
] }) : /* @__PURE__ */ jsx10("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." })
|
|
9942
|
+
) : laufVersionId ? /* @__PURE__ */ jsx10(
|
|
9508
9943
|
RunsPanel,
|
|
9509
9944
|
{
|
|
9510
9945
|
port,
|
|
9511
9946
|
contextId,
|
|
9512
9947
|
source: { kind: "published", shotVersionId: laufVersionId }
|
|
9513
9948
|
}
|
|
9514
|
-
) : /* @__PURE__ */
|
|
9515
|
-
typ === "scene" && /* @__PURE__ */
|
|
9516
|
-
/* @__PURE__ */
|
|
9949
|
+
) : /* @__PURE__ */ jsx10("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." })),
|
|
9950
|
+
typ === "scene" && /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
9951
|
+
/* @__PURE__ */ jsx10(
|
|
9517
9952
|
PromptStartAction,
|
|
9518
9953
|
{
|
|
9519
9954
|
port,
|
|
@@ -9527,7 +9962,7 @@ var ElementDetail = ({
|
|
|
9527
9962
|
onLauf: () => setNachladen((n) => n + 1)
|
|
9528
9963
|
}
|
|
9529
9964
|
),
|
|
9530
|
-
/* @__PURE__ */
|
|
9965
|
+
/* @__PURE__ */ jsx10(
|
|
9531
9966
|
RunsPanel,
|
|
9532
9967
|
{
|
|
9533
9968
|
port,
|
|
@@ -9536,7 +9971,7 @@ var ElementDetail = ({
|
|
|
9536
9971
|
}
|
|
9537
9972
|
)
|
|
9538
9973
|
] }),
|
|
9539
|
-
typ === "scene_setup" && /* @__PURE__ */
|
|
9974
|
+
typ === "scene_setup" && /* @__PURE__ */ jsx10(
|
|
9540
9975
|
CapabilityPanel,
|
|
9541
9976
|
{
|
|
9542
9977
|
port,
|
|
@@ -9544,7 +9979,7 @@ var ElementDetail = ({
|
|
|
9544
9979
|
setupPayload: payloadAusFormular()
|
|
9545
9980
|
}
|
|
9546
9981
|
),
|
|
9547
|
-
notiz && /* @__PURE__ */
|
|
9982
|
+
notiz && /* @__PURE__ */ jsxs10(
|
|
9548
9983
|
"div",
|
|
9549
9984
|
{
|
|
9550
9985
|
className: `szenen-detail__notice szenen-detail__notice--${notiz.tone}`,
|
|
@@ -9552,8 +9987,8 @@ var ElementDetail = ({
|
|
|
9552
9987
|
"data-tone": notiz.tone,
|
|
9553
9988
|
role: notiz.tone === "error" ? "alert" : "status",
|
|
9554
9989
|
children: [
|
|
9555
|
-
/* @__PURE__ */
|
|
9556
|
-
notiz.details && notiz.details.length > 0 && /* @__PURE__ */
|
|
9990
|
+
/* @__PURE__ */ jsx10("p", { children: notiz.text }),
|
|
9991
|
+
notiz.details && notiz.details.length > 0 && /* @__PURE__ */ jsx10("ul", { "data-testid": "notiz-befunde", children: notiz.details.map((d, i) => /* @__PURE__ */ jsx10("li", { children: d }, i)) })
|
|
9557
9992
|
]
|
|
9558
9993
|
}
|
|
9559
9994
|
)
|
|
@@ -9561,15 +9996,15 @@ var ElementDetail = ({
|
|
|
9561
9996
|
};
|
|
9562
9997
|
|
|
9563
9998
|
// src/features/szenen/areas/useSchmalesDisplay.ts
|
|
9564
|
-
import { useEffect as
|
|
9999
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
9565
10000
|
var SCHMALE_ANSICHT = "(max-width: 760px)";
|
|
9566
10001
|
function messen(abfrage) {
|
|
9567
10002
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
9568
10003
|
return window.matchMedia(abfrage).matches;
|
|
9569
10004
|
}
|
|
9570
10005
|
function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
9571
|
-
const [schmal, setSchmal] =
|
|
9572
|
-
|
|
10006
|
+
const [schmal, setSchmal] = useState11(() => messen(abfrage));
|
|
10007
|
+
useEffect6(() => {
|
|
9573
10008
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
9574
10009
|
const liste = window.matchMedia(abfrage);
|
|
9575
10010
|
const aktualisieren = () => setSchmal(liste.matches);
|
|
@@ -9581,7 +10016,7 @@ function useSchmalesDisplay(abfrage = SCHMALE_ANSICHT) {
|
|
|
9581
10016
|
}
|
|
9582
10017
|
|
|
9583
10018
|
// src/features/szenen/areas/ElementsArea.tsx
|
|
9584
|
-
import { jsx as
|
|
10019
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
9585
10020
|
var ElementsArea = ({
|
|
9586
10021
|
port,
|
|
9587
10022
|
contextId,
|
|
@@ -9596,16 +10031,16 @@ var ElementsArea = ({
|
|
|
9596
10031
|
const gemischt = auswahlTypen.length > 1;
|
|
9597
10032
|
const ueberschrift = listTitle ?? (einzelTyp ? elementTypPlural(einzelTyp) : "Bausteine");
|
|
9598
10033
|
const einzahl = einzelTyp ? elementTypLabel(einzelTyp) : "Objekt";
|
|
9599
|
-
const [typ, setTyp] =
|
|
9600
|
-
const [zeigeStillgelegte, setZeigeStillgelegte] =
|
|
9601
|
-
const [gewaehlt, setGewaehlt] =
|
|
9602
|
-
const [neuerTitel, setNeuerTitel] =
|
|
9603
|
-
const [neuerTyp, setNeuerTyp] =
|
|
9604
|
-
const [notiz, setNotiz] =
|
|
9605
|
-
const [anlegend, setAnlegend] =
|
|
9606
|
-
const [anlageOffen, setAnlageOffen] =
|
|
10034
|
+
const [typ, setTyp] = useState12(einzelTyp ?? "");
|
|
10035
|
+
const [zeigeStillgelegte, setZeigeStillgelegte] = useState12(false);
|
|
10036
|
+
const [gewaehlt, setGewaehlt] = useState12(null);
|
|
10037
|
+
const [neuerTitel, setNeuerTitel] = useState12("");
|
|
10038
|
+
const [neuerTyp, setNeuerTyp] = useState12(auswahlTypen[0]);
|
|
10039
|
+
const [notiz, setNotiz] = useState12(null);
|
|
10040
|
+
const [anlegend, setAnlegend] = useState12(false);
|
|
10041
|
+
const [anlageOffen, setAnlageOffen] = useState12(false);
|
|
9607
10042
|
const schmal = useSchmalesDisplay();
|
|
9608
|
-
const [ansicht, setAnsicht] =
|
|
10043
|
+
const [ansicht, setAnsicht] = useState12("liste");
|
|
9609
10044
|
const zeigeListe = !schmal || ansicht === "liste";
|
|
9610
10045
|
const zeigeDetail = !schmal || ansicht === "detail";
|
|
9611
10046
|
const waehle = (elementId) => {
|
|
@@ -9625,17 +10060,17 @@ var ElementsArea = ({
|
|
|
9625
10060
|
setAnlageOffen(false);
|
|
9626
10061
|
setNeuerTitel("");
|
|
9627
10062
|
};
|
|
9628
|
-
return /* @__PURE__ */
|
|
10063
|
+
return /* @__PURE__ */ jsxs11(
|
|
9629
10064
|
"div",
|
|
9630
10065
|
{
|
|
9631
10066
|
className: "szenen-elements",
|
|
9632
10067
|
"data-testid": "bereich-elemente",
|
|
9633
10068
|
"data-ansicht": schmal ? ansicht : "beide",
|
|
9634
10069
|
children: [
|
|
9635
|
-
zeigeListe && /* @__PURE__ */
|
|
9636
|
-
/* @__PURE__ */
|
|
9637
|
-
/* @__PURE__ */
|
|
9638
|
-
/* @__PURE__ */
|
|
10070
|
+
zeigeListe && /* @__PURE__ */ jsxs11("div", { className: "szenen-elements__master", "data-testid": "elemente-master", children: [
|
|
10071
|
+
/* @__PURE__ */ jsxs11("div", { className: "szenen-elements__toolbar", children: [
|
|
10072
|
+
/* @__PURE__ */ jsx11("h3", { className: "szenen-elements__heading", children: ueberschrift }),
|
|
10073
|
+
/* @__PURE__ */ jsx11(
|
|
9639
10074
|
"button",
|
|
9640
10075
|
{
|
|
9641
10076
|
type: "button",
|
|
@@ -9651,22 +10086,22 @@ var ElementsArea = ({
|
|
|
9651
10086
|
}
|
|
9652
10087
|
)
|
|
9653
10088
|
] }),
|
|
9654
|
-
gemischt && /* @__PURE__ */
|
|
10089
|
+
gemischt && /* @__PURE__ */ jsxs11("label", { className: "szenen-elements__scope", children: [
|
|
9655
10090
|
"Art",
|
|
9656
|
-
/* @__PURE__ */
|
|
10091
|
+
/* @__PURE__ */ jsxs11(
|
|
9657
10092
|
"select",
|
|
9658
10093
|
{
|
|
9659
10094
|
"data-testid": "filter-typ",
|
|
9660
10095
|
value: typ,
|
|
9661
10096
|
onChange: (e) => setTyp(e.target.value),
|
|
9662
10097
|
children: [
|
|
9663
|
-
/* @__PURE__ */
|
|
9664
|
-
auswahlTypen.map((t) => /* @__PURE__ */
|
|
10098
|
+
/* @__PURE__ */ jsx11("option", { value: "", children: allTypesLabel ?? "alle Typen" }),
|
|
10099
|
+
auswahlTypen.map((t) => /* @__PURE__ */ jsx11("option", { value: t, children: elementTypPlural(t) }, t))
|
|
9665
10100
|
]
|
|
9666
10101
|
}
|
|
9667
10102
|
)
|
|
9668
10103
|
] }),
|
|
9669
|
-
anlageOffen && /* @__PURE__ */
|
|
10104
|
+
anlageOffen && /* @__PURE__ */ jsxs11(
|
|
9670
10105
|
"form",
|
|
9671
10106
|
{
|
|
9672
10107
|
className: "szenen-elements__create",
|
|
@@ -9694,9 +10129,9 @@ var ElementsArea = ({
|
|
|
9694
10129
|
}
|
|
9695
10130
|
},
|
|
9696
10131
|
children: [
|
|
9697
|
-
/* @__PURE__ */
|
|
10132
|
+
/* @__PURE__ */ jsxs11("label", { className: "szenen-elements__create-title", children: [
|
|
9698
10133
|
einzelTyp ? `Neue ${einzahl}` : "Titel",
|
|
9699
|
-
/* @__PURE__ */
|
|
10134
|
+
/* @__PURE__ */ jsx11(
|
|
9700
10135
|
"input",
|
|
9701
10136
|
{
|
|
9702
10137
|
"data-testid": "neuer-titel",
|
|
@@ -9707,20 +10142,20 @@ var ElementsArea = ({
|
|
|
9707
10142
|
}
|
|
9708
10143
|
)
|
|
9709
10144
|
] }),
|
|
9710
|
-
gemischt && /* @__PURE__ */
|
|
10145
|
+
gemischt && /* @__PURE__ */ jsxs11("label", { className: "szenen-elements__create-type", children: [
|
|
9711
10146
|
"Art",
|
|
9712
|
-
/* @__PURE__ */
|
|
10147
|
+
/* @__PURE__ */ jsx11(
|
|
9713
10148
|
"select",
|
|
9714
10149
|
{
|
|
9715
10150
|
"data-testid": "neuer-typ",
|
|
9716
10151
|
value: neuerTyp,
|
|
9717
10152
|
onChange: (e) => setNeuerTyp(e.target.value),
|
|
9718
|
-
children: auswahlTypen.map((t) => /* @__PURE__ */
|
|
10153
|
+
children: auswahlTypen.map((t) => /* @__PURE__ */ jsx11("option", { value: t, children: elementTypLabel(t) }, t))
|
|
9719
10154
|
}
|
|
9720
10155
|
)
|
|
9721
10156
|
] }),
|
|
9722
|
-
/* @__PURE__ */
|
|
9723
|
-
/* @__PURE__ */
|
|
10157
|
+
/* @__PURE__ */ jsxs11("div", { className: "szenen-elements__create-actions", children: [
|
|
10158
|
+
/* @__PURE__ */ jsx11(
|
|
9724
10159
|
"button",
|
|
9725
10160
|
{
|
|
9726
10161
|
type: "submit",
|
|
@@ -9729,7 +10164,7 @@ var ElementsArea = ({
|
|
|
9729
10164
|
children: "anlegen"
|
|
9730
10165
|
}
|
|
9731
10166
|
),
|
|
9732
|
-
/* @__PURE__ */
|
|
10167
|
+
/* @__PURE__ */ jsx11(
|
|
9733
10168
|
"button",
|
|
9734
10169
|
{
|
|
9735
10170
|
type: "button",
|
|
@@ -9742,19 +10177,19 @@ var ElementsArea = ({
|
|
|
9742
10177
|
]
|
|
9743
10178
|
}
|
|
9744
10179
|
),
|
|
9745
|
-
notiz && /* @__PURE__ */
|
|
9746
|
-
phase.status === "loading" && /* @__PURE__ */
|
|
9747
|
-
phase.status === "error" && /* @__PURE__ */
|
|
10180
|
+
notiz && /* @__PURE__ */ jsx11("p", { "data-testid": "anlegen-notiz", "data-tone": notiz.tone, children: notiz.text }),
|
|
10181
|
+
phase.status === "loading" && /* @__PURE__ */ jsx11("p", { "data-testid": "elemente-laden", children: "Elemente werden geladen \u2026" }),
|
|
10182
|
+
phase.status === "error" && /* @__PURE__ */ jsxs11("p", { "data-testid": "elemente-fehler", role: "alert", children: [
|
|
9748
10183
|
"Elemente konnten nicht geladen werden: ",
|
|
9749
10184
|
phase.message,
|
|
9750
10185
|
phase.retryable && " \u2014 ein erneuter Versuch kann helfen."
|
|
9751
10186
|
] }),
|
|
9752
|
-
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */
|
|
10187
|
+
phase.status === "ready" && phase.value.length === 0 && /* @__PURE__ */ jsxs11("p", { "data-testid": "elemente-leer", children: [
|
|
9753
10188
|
typ ? `Keine ${elementTypPlural(typ)} in diesem Kontext.` : "Nichts in diesem Kontext.",
|
|
9754
10189
|
" ",
|
|
9755
10190
|
'Mit \u201E+ Neu" anlegen.'
|
|
9756
10191
|
] }),
|
|
9757
|
-
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */
|
|
10192
|
+
phase.status === "ready" && phase.value.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "szenen-elements__list", "data-testid": "elemente-liste", children: phase.value.map((element) => /* @__PURE__ */ jsx11("li", { "data-element-id": element.element_id, children: /* @__PURE__ */ jsxs11(
|
|
9758
10193
|
"button",
|
|
9759
10194
|
{
|
|
9760
10195
|
type: "button",
|
|
@@ -9763,18 +10198,18 @@ var ElementsArea = ({
|
|
|
9763
10198
|
className: element.element_id === gewaehlt ? "is-selected" : void 0,
|
|
9764
10199
|
onClick: () => waehle(element.element_id),
|
|
9765
10200
|
children: [
|
|
9766
|
-
/* @__PURE__ */
|
|
9767
|
-
gemischt && /* @__PURE__ */
|
|
9768
|
-
element.subtype && /* @__PURE__ */
|
|
9769
|
-
element.retired && /* @__PURE__ */
|
|
10201
|
+
/* @__PURE__ */ jsx11("strong", { className: "szenen-elements__title", children: element.title || "Unbenanntes Element" }),
|
|
10202
|
+
gemischt && /* @__PURE__ */ jsx11("span", { className: "szenen-elements__type", children: elementTypLabel(element.type) }),
|
|
10203
|
+
element.subtype && /* @__PURE__ */ jsx11("span", { className: "szenen-elements__subtype", children: element.subtype }),
|
|
10204
|
+
element.retired && /* @__PURE__ */ jsx11("span", { className: "szenen-elements__retired", children: "stillgelegt" })
|
|
9770
10205
|
]
|
|
9771
10206
|
}
|
|
9772
10207
|
) }, element.element_id)) }),
|
|
9773
|
-
/* @__PURE__ */
|
|
9774
|
-
/* @__PURE__ */
|
|
9775
|
-
/* @__PURE__ */
|
|
9776
|
-
/* @__PURE__ */
|
|
9777
|
-
/* @__PURE__ */
|
|
10208
|
+
/* @__PURE__ */ jsxs11("details", { className: "szenen-elements__options", "data-testid": "listen-optionen", children: [
|
|
10209
|
+
/* @__PURE__ */ jsx11("summary", { children: "Listenoptionen" }),
|
|
10210
|
+
/* @__PURE__ */ jsxs11("div", { className: "szenen-elements__filter", children: [
|
|
10211
|
+
/* @__PURE__ */ jsxs11("label", { children: [
|
|
10212
|
+
/* @__PURE__ */ jsx11(
|
|
9778
10213
|
"input",
|
|
9779
10214
|
{
|
|
9780
10215
|
type: "checkbox",
|
|
@@ -9785,12 +10220,12 @@ var ElementsArea = ({
|
|
|
9785
10220
|
),
|
|
9786
10221
|
"stillgelegte Elemente einblenden"
|
|
9787
10222
|
] }),
|
|
9788
|
-
/* @__PURE__ */
|
|
10223
|
+
/* @__PURE__ */ jsx11("button", { type: "button", "data-testid": "neu-laden", onClick: neuLaden, children: "neu laden" })
|
|
9789
10224
|
] })
|
|
9790
10225
|
] })
|
|
9791
10226
|
] }),
|
|
9792
|
-
zeigeDetail && /* @__PURE__ */
|
|
9793
|
-
schmal && /* @__PURE__ */
|
|
10227
|
+
zeigeDetail && /* @__PURE__ */ jsxs11("div", { className: "szenen-elements__detail", "data-testid": "elemente-detail-spalte", children: [
|
|
10228
|
+
schmal && /* @__PURE__ */ jsx11(
|
|
9794
10229
|
"button",
|
|
9795
10230
|
{
|
|
9796
10231
|
type: "button",
|
|
@@ -9800,7 +10235,7 @@ var ElementsArea = ({
|
|
|
9800
10235
|
children: "\u2190 Zur\xFCck zur Liste"
|
|
9801
10236
|
}
|
|
9802
10237
|
),
|
|
9803
|
-
gewaehlt ? /* @__PURE__ */
|
|
10238
|
+
gewaehlt ? /* @__PURE__ */ jsx11(
|
|
9804
10239
|
ElementDetail,
|
|
9805
10240
|
{
|
|
9806
10241
|
port,
|
|
@@ -9809,7 +10244,7 @@ var ElementsArea = ({
|
|
|
9809
10244
|
author,
|
|
9810
10245
|
onChanged: neuLaden
|
|
9811
10246
|
}
|
|
9812
|
-
) : /* @__PURE__ */
|
|
10247
|
+
) : /* @__PURE__ */ jsx11("p", { className: "szenen-elements__empty-detail", "data-testid": "keine-auswahl", children: "Nichts ausgew\xE4hlt. Ein Eintrag aus der Liste \xF6ffnet die Bearbeitung." })
|
|
9813
10248
|
] })
|
|
9814
10249
|
]
|
|
9815
10250
|
}
|
|
@@ -9817,17 +10252,17 @@ var ElementsArea = ({
|
|
|
9817
10252
|
};
|
|
9818
10253
|
|
|
9819
10254
|
// src/features/szenen/areas/SceneArea.tsx
|
|
9820
|
-
import { jsx as
|
|
9821
|
-
var SceneArea = ({ port, contextId }) => /* @__PURE__ */
|
|
9822
|
-
/* @__PURE__ */
|
|
9823
|
-
/* @__PURE__ */
|
|
10255
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
10256
|
+
var SceneArea = ({ port, contextId }) => /* @__PURE__ */ jsxs12("div", { className: "szenen-scene", "data-testid": "bereich-szene", children: [
|
|
10257
|
+
/* @__PURE__ */ jsx12("p", { className: "szenen-area__lead", children: "Szenen dieses Kontexts. Auswahl \xF6ffnet die Bearbeitung der Nodes und Beziehungen." }),
|
|
10258
|
+
/* @__PURE__ */ jsx12(ElementsArea, { port, contextId, restrictToTypes: ["scene"] })
|
|
9824
10259
|
] });
|
|
9825
10260
|
|
|
9826
10261
|
// src/features/szenen/areas/SetupArea.tsx
|
|
9827
|
-
import { jsx as
|
|
9828
|
-
var SetupArea = ({ port, contextId }) => /* @__PURE__ */
|
|
9829
|
-
/* @__PURE__ */
|
|
9830
|
-
/* @__PURE__ */
|
|
10262
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10263
|
+
var SetupArea = ({ port, contextId }) => /* @__PURE__ */ jsxs13("div", { className: "szenen-setup", "data-testid": "bereich-setup", children: [
|
|
10264
|
+
/* @__PURE__ */ jsx13("p", { className: "szenen-area__lead", children: "Bildaufbauten, Kameras und Stile dieses Kontexts." }),
|
|
10265
|
+
/* @__PURE__ */ jsx13(
|
|
9831
10266
|
ElementsArea,
|
|
9832
10267
|
{
|
|
9833
10268
|
port,
|
|
@@ -9840,10 +10275,10 @@ var SetupArea = ({ port, contextId }) => /* @__PURE__ */ jsxs12("div", { classNa
|
|
|
9840
10275
|
] });
|
|
9841
10276
|
|
|
9842
10277
|
// src/features/szenen/areas/ShotArea.tsx
|
|
9843
|
-
import { jsx as
|
|
9844
|
-
var ShotArea = ({ port, contextId }) => /* @__PURE__ */
|
|
9845
|
-
/* @__PURE__ */
|
|
9846
|
-
/* @__PURE__ */
|
|
10278
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10279
|
+
var ShotArea = ({ port, contextId }) => /* @__PURE__ */ jsxs14("div", { className: "szenen-shot", "data-testid": "bereich-shot", children: [
|
|
10280
|
+
/* @__PURE__ */ jsx14("p", { className: "szenen-area__lead", children: "Prompts dieses Kontexts. Auswahl zeigt Runden und startet Prompt-L\xE4ufe." }),
|
|
10281
|
+
/* @__PURE__ */ jsx14(
|
|
9847
10282
|
ElementsArea,
|
|
9848
10283
|
{
|
|
9849
10284
|
port,
|
|
@@ -9856,21 +10291,21 @@ var ShotArea = ({ port, contextId }) => /* @__PURE__ */ jsxs13("div", { classNam
|
|
|
9856
10291
|
] });
|
|
9857
10292
|
|
|
9858
10293
|
// src/features/szenen/areas/MediaArea.tsx
|
|
9859
|
-
import { useState as
|
|
9860
|
-
import { jsx as
|
|
10294
|
+
import { useState as useState13 } from "react";
|
|
10295
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9861
10296
|
var leer = async () => ({ kind: "ok", value: [] });
|
|
9862
10297
|
var MediaArea = ({ port }) => {
|
|
9863
10298
|
const media = port.media;
|
|
9864
|
-
const [versionInput, setVersionInput] =
|
|
9865
|
-
const [versionId, setVersionId] =
|
|
9866
|
-
const [itemInput, setItemInput] =
|
|
9867
|
-
const [itemId, setItemId] =
|
|
9868
|
-
const [assetId, setAssetId] =
|
|
9869
|
-
const [role, setRole] =
|
|
9870
|
-
const [position, setPosition] =
|
|
9871
|
-
const [notiz, setNotiz] =
|
|
9872
|
-
const [busy, setBusy] =
|
|
9873
|
-
const [refresh, setRefresh] =
|
|
10299
|
+
const [versionInput, setVersionInput] = useState13("");
|
|
10300
|
+
const [versionId, setVersionId] = useState13("");
|
|
10301
|
+
const [itemInput, setItemInput] = useState13("");
|
|
10302
|
+
const [itemId, setItemId] = useState13("");
|
|
10303
|
+
const [assetId, setAssetId] = useState13("");
|
|
10304
|
+
const [role, setRole] = useState13("reference");
|
|
10305
|
+
const [position, setPosition] = useState13("0");
|
|
10306
|
+
const [notiz, setNotiz] = useState13(null);
|
|
10307
|
+
const [busy, setBusy] = useState13(false);
|
|
10308
|
+
const [refresh, setRefresh] = useState13(0);
|
|
9874
10309
|
const [versionPhase] = usePortQuery(
|
|
9875
10310
|
() => versionId ? media.listVersionMedia(versionId) : leer(),
|
|
9876
10311
|
[media, versionId, refresh]
|
|
@@ -9916,145 +10351,145 @@ var MediaArea = ({ port }) => {
|
|
|
9916
10351
|
};
|
|
9917
10352
|
const versionMedien = versionPhase.status === "ready" ? versionPhase.value : [];
|
|
9918
10353
|
const itemMedien = itemPhase.status === "ready" ? itemPhase.value : [];
|
|
9919
|
-
return /* @__PURE__ */
|
|
9920
|
-
/* @__PURE__ */
|
|
9921
|
-
/* @__PURE__ */
|
|
9922
|
-
/* @__PURE__ */
|
|
9923
|
-
/* @__PURE__ */
|
|
9924
|
-
/* @__PURE__ */
|
|
10354
|
+
return /* @__PURE__ */ jsxs15("div", { className: "szenen-media", "data-testid": "bereich-medien", children: [
|
|
10355
|
+
/* @__PURE__ */ jsx15("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." }),
|
|
10356
|
+
/* @__PURE__ */ jsxs15("section", { children: [
|
|
10357
|
+
/* @__PURE__ */ jsx15("h3", { children: "Version" }),
|
|
10358
|
+
/* @__PURE__ */ jsxs15("div", { className: "szenen-media__lookup", children: [
|
|
10359
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9925
10360
|
"Version-ID",
|
|
9926
|
-
/* @__PURE__ */
|
|
10361
|
+
/* @__PURE__ */ jsx15("input", { value: versionInput, onChange: (event) => setVersionInput(event.target.value) })
|
|
9927
10362
|
] }),
|
|
9928
|
-
/* @__PURE__ */
|
|
10363
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => setVersionId(versionInput.trim()), children: "Medien laden" })
|
|
9929
10364
|
] }),
|
|
9930
|
-
/* @__PURE__ */
|
|
9931
|
-
/* @__PURE__ */
|
|
10365
|
+
/* @__PURE__ */ jsxs15("div", { className: "szenen-media__attach", children: [
|
|
10366
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9932
10367
|
"Asset-ID",
|
|
9933
|
-
/* @__PURE__ */
|
|
10368
|
+
/* @__PURE__ */ jsx15("input", { value: assetId, onChange: (event) => setAssetId(event.target.value) })
|
|
9934
10369
|
] }),
|
|
9935
|
-
/* @__PURE__ */
|
|
10370
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9936
10371
|
"Rolle",
|
|
9937
|
-
/* @__PURE__ */
|
|
9938
|
-
/* @__PURE__ */
|
|
9939
|
-
/* @__PURE__ */
|
|
9940
|
-
/* @__PURE__ */
|
|
9941
|
-
/* @__PURE__ */
|
|
10372
|
+
/* @__PURE__ */ jsxs15("select", { value: role, onChange: (event) => setRole(event.target.value), children: [
|
|
10373
|
+
/* @__PURE__ */ jsx15("option", { value: "reference", children: "reference" }),
|
|
10374
|
+
/* @__PURE__ */ jsx15("option", { value: "mask", children: "mask" }),
|
|
10375
|
+
/* @__PURE__ */ jsx15("option", { value: "palette", children: "palette" }),
|
|
10376
|
+
/* @__PURE__ */ jsx15("option", { value: "example", children: "example" })
|
|
9942
10377
|
] })
|
|
9943
10378
|
] }),
|
|
9944
|
-
/* @__PURE__ */
|
|
10379
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9945
10380
|
"Position",
|
|
9946
|
-
/* @__PURE__ */
|
|
10381
|
+
/* @__PURE__ */ jsx15("input", { type: "number", min: "0", value: position, onChange: (event) => setPosition(event.target.value) })
|
|
9947
10382
|
] }),
|
|
9948
|
-
/* @__PURE__ */
|
|
10383
|
+
/* @__PURE__ */ jsx15("button", { type: "button", disabled: busy, onClick: zuordnen, children: "zuordnen" })
|
|
9949
10384
|
] }),
|
|
9950
|
-
versionPhase.status === "loading" && versionId && /* @__PURE__ */
|
|
9951
|
-
versionPhase.status === "error" && /* @__PURE__ */
|
|
10385
|
+
versionPhase.status === "loading" && versionId && /* @__PURE__ */ jsx15("p", { children: "Versionsmedien werden geladen \u2026" }),
|
|
10386
|
+
versionPhase.status === "error" && /* @__PURE__ */ jsxs15("p", { role: "alert", children: [
|
|
9952
10387
|
"Versionsmedien konnten nicht geladen werden: ",
|
|
9953
10388
|
versionPhase.message
|
|
9954
10389
|
] }),
|
|
9955
|
-
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */
|
|
10390
|
+
versionPhase.status === "ready" && versionId && versionMedien.length === 0 && /* @__PURE__ */ jsxs15("p", { children: [
|
|
9956
10391
|
"Version ",
|
|
9957
10392
|
versionId,
|
|
9958
10393
|
" hat keine Medien."
|
|
9959
10394
|
] }),
|
|
9960
|
-
/* @__PURE__ */
|
|
9961
|
-
/* @__PURE__ */
|
|
9962
|
-
/* @__PURE__ */
|
|
10395
|
+
/* @__PURE__ */ jsx15("ul", { className: "szenen-media__list", children: versionMedien.map((medium) => /* @__PURE__ */ jsxs15("li", { children: [
|
|
10396
|
+
/* @__PURE__ */ jsx15("code", { children: medium.assetId }),
|
|
10397
|
+
/* @__PURE__ */ jsxs15("span", { children: [
|
|
9963
10398
|
medium.role,
|
|
9964
10399
|
" \xB7 Position ",
|
|
9965
10400
|
medium.position
|
|
9966
10401
|
] }),
|
|
9967
|
-
medium.url && /* @__PURE__ */
|
|
9968
|
-
/* @__PURE__ */
|
|
10402
|
+
medium.url && /* @__PURE__ */ jsx15("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" }),
|
|
10403
|
+
/* @__PURE__ */ jsx15("button", { type: "button", disabled: busy, onClick: () => entfernen(medium), children: "entfernen" })
|
|
9969
10404
|
] }, `${medium.assetId}:${medium.role}`)) })
|
|
9970
10405
|
] }),
|
|
9971
|
-
/* @__PURE__ */
|
|
9972
|
-
/* @__PURE__ */
|
|
9973
|
-
/* @__PURE__ */
|
|
9974
|
-
/* @__PURE__ */
|
|
10406
|
+
/* @__PURE__ */ jsxs15("section", { children: [
|
|
10407
|
+
/* @__PURE__ */ jsx15("h3", { children: "Item-Medien" }),
|
|
10408
|
+
/* @__PURE__ */ jsxs15("div", { className: "szenen-media__lookup", children: [
|
|
10409
|
+
/* @__PURE__ */ jsxs15("label", { children: [
|
|
9975
10410
|
"Item-ID",
|
|
9976
|
-
/* @__PURE__ */
|
|
10411
|
+
/* @__PURE__ */ jsx15("input", { value: itemInput, onChange: (event) => setItemInput(event.target.value) })
|
|
9977
10412
|
] }),
|
|
9978
|
-
/* @__PURE__ */
|
|
10413
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => setItemId(itemInput.trim()), children: "Item-Medien laden" })
|
|
9979
10414
|
] }),
|
|
9980
|
-
itemPhase.status === "error" && /* @__PURE__ */
|
|
10415
|
+
itemPhase.status === "error" && /* @__PURE__ */ jsxs15("p", { role: "alert", children: [
|
|
9981
10416
|
"Item-Medien konnten nicht geladen werden: ",
|
|
9982
10417
|
itemPhase.message
|
|
9983
10418
|
] }),
|
|
9984
|
-
/* @__PURE__ */
|
|
9985
|
-
/* @__PURE__ */
|
|
9986
|
-
/* @__PURE__ */
|
|
10419
|
+
/* @__PURE__ */ jsx15("ul", { className: "szenen-media__list", children: itemMedien.map((medium) => /* @__PURE__ */ jsxs15("li", { children: [
|
|
10420
|
+
/* @__PURE__ */ jsx15("code", { children: medium.assetId }),
|
|
10421
|
+
/* @__PURE__ */ jsxs15("span", { children: [
|
|
9987
10422
|
medium.role,
|
|
9988
10423
|
" \xB7 Position ",
|
|
9989
10424
|
medium.position
|
|
9990
10425
|
] }),
|
|
9991
|
-
medium.url && /* @__PURE__ */
|
|
10426
|
+
medium.url && /* @__PURE__ */ jsx15("a", { href: medium.url, target: "_blank", rel: "noreferrer", children: "\xF6ffnen" })
|
|
9992
10427
|
] }, `${medium.assetId}:${medium.role}:${medium.position}`)) })
|
|
9993
10428
|
] }),
|
|
9994
|
-
notiz && /* @__PURE__ */
|
|
10429
|
+
notiz && /* @__PURE__ */ jsx15("p", { role: notiz.tone === "error" ? "alert" : "status", "data-tone": notiz.tone, children: notiz.text })
|
|
9995
10430
|
] });
|
|
9996
10431
|
};
|
|
9997
10432
|
|
|
9998
10433
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
9999
|
-
import { useEffect as
|
|
10434
|
+
import { useEffect as useEffect7, useMemo as useMemo3, useRef as useRef3, useState as useState16 } from "react";
|
|
10000
10435
|
|
|
10001
10436
|
// src/features/szenen/areas/RecoveryPanel.tsx
|
|
10002
|
-
import { useState as
|
|
10003
|
-
import { Fragment as
|
|
10437
|
+
import { useState as useState14 } from "react";
|
|
10438
|
+
import { Fragment as Fragment6, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10004
10439
|
var Diagnosen = ({ befunde, testId }) => {
|
|
10005
10440
|
if (befunde.length === 0) return null;
|
|
10006
|
-
return /* @__PURE__ */
|
|
10007
|
-
/* @__PURE__ */
|
|
10008
|
-
d.proposal_type && /* @__PURE__ */
|
|
10441
|
+
return /* @__PURE__ */ jsx16("ul", { className: "szenen-diagnose__liste", "data-testid": testId, children: befunde.map((d, i) => /* @__PURE__ */ jsxs16("li", { "data-severity": d.severity, children: [
|
|
10442
|
+
/* @__PURE__ */ jsx16("code", { children: d.code }),
|
|
10443
|
+
d.proposal_type && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10009
10444
|
" \xB7 ",
|
|
10010
|
-
/* @__PURE__ */
|
|
10445
|
+
/* @__PURE__ */ jsx16("strong", { children: d.proposal_type })
|
|
10011
10446
|
] }),
|
|
10012
|
-
d.pointer && /* @__PURE__ */
|
|
10447
|
+
d.pointer && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10013
10448
|
" \xB7 ",
|
|
10014
|
-
/* @__PURE__ */
|
|
10449
|
+
/* @__PURE__ */ jsx16("code", { children: d.pointer })
|
|
10015
10450
|
] }),
|
|
10016
|
-
typeof d.line === "number" && /* @__PURE__ */
|
|
10451
|
+
typeof d.line === "number" && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10017
10452
|
" \xB7 Zeile ",
|
|
10018
10453
|
d.line,
|
|
10019
10454
|
", Spalte ",
|
|
10020
10455
|
d.column
|
|
10021
10456
|
] }),
|
|
10022
|
-
/* @__PURE__ */
|
|
10457
|
+
/* @__PURE__ */ jsx16("div", { children: d.message })
|
|
10023
10458
|
] }, i)) });
|
|
10024
10459
|
};
|
|
10025
|
-
var Ausbeute = ({ bewertung }) => /* @__PURE__ */
|
|
10026
|
-
/* @__PURE__ */
|
|
10460
|
+
var Ausbeute = ({ bewertung }) => /* @__PURE__ */ jsxs16("div", { className: "szenen-diagnose", "data-testid": "rettung-ergebnis", children: [
|
|
10461
|
+
/* @__PURE__ */ jsxs16("p", { "data-testid": "rettung-status", children: [
|
|
10027
10462
|
bewertung.status === "usable" && "Diese Fassung ist vollst\xE4ndig verwertbar.",
|
|
10028
10463
|
bewertung.status === "partial" && "Diese Fassung ist teilweise verwertbar \u2014 nicht alles kommt durch.",
|
|
10029
10464
|
bewertung.status === "invalid" && "Aus dieser Fassung ist nichts zu \xFCbernehmen."
|
|
10030
10465
|
] }),
|
|
10031
|
-
bewertung.proposals.length > 0 && /* @__PURE__ */
|
|
10032
|
-
/* @__PURE__ */
|
|
10033
|
-
/* @__PURE__ */
|
|
10034
|
-
/* @__PURE__ */
|
|
10466
|
+
bewertung.proposals.length > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10467
|
+
/* @__PURE__ */ jsx16("h5", { children: "Verwertbar" }),
|
|
10468
|
+
/* @__PURE__ */ jsx16("ul", { "data-testid": "rettung-verwertbar", children: bewertung.proposals.map((p) => /* @__PURE__ */ jsxs16("li", { "data-testid": `rettung-verwertbar-${p.type}`, children: [
|
|
10469
|
+
/* @__PURE__ */ jsx16("strong", { children: p.type }),
|
|
10035
10470
|
" \u2014 ",
|
|
10036
10471
|
p.status === "complete" ? "vollst\xE4ndig" : "teilweise; vor dem Ver\xF6ffentlichen zu erg\xE4nzen",
|
|
10037
|
-
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */
|
|
10038
|
-
/* @__PURE__ */
|
|
10472
|
+
p.status === "partial" && p.gaps && p.gaps.length > 0 && /* @__PURE__ */ jsx16("ul", { children: p.gaps.map((l, i) => /* @__PURE__ */ jsxs16("li", { children: [
|
|
10473
|
+
/* @__PURE__ */ jsx16("code", { children: l.pointer }),
|
|
10039
10474
|
": ",
|
|
10040
10475
|
l.reason
|
|
10041
10476
|
] }, i)) })
|
|
10042
10477
|
] }, p.type)) })
|
|
10043
10478
|
] }),
|
|
10044
|
-
bewertung.rejected.length > 0 && /* @__PURE__ */
|
|
10045
|
-
/* @__PURE__ */
|
|
10046
|
-
/* @__PURE__ */
|
|
10047
|
-
/* @__PURE__ */
|
|
10048
|
-
/* @__PURE__ */
|
|
10479
|
+
bewertung.rejected.length > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
10480
|
+
/* @__PURE__ */ jsx16("h5", { children: "Nicht verwertbar" }),
|
|
10481
|
+
/* @__PURE__ */ jsx16("ul", { "data-testid": "rettung-abgelehnt", children: bewertung.rejected.map((r) => /* @__PURE__ */ jsxs16("li", { "data-testid": `rettung-abgelehnt-${r.type}`, children: [
|
|
10482
|
+
/* @__PURE__ */ jsx16("strong", { children: r.type }),
|
|
10483
|
+
/* @__PURE__ */ jsx16(Diagnosen, { befunde: r.diagnostics, testId: `rettung-grund-${r.type}` })
|
|
10049
10484
|
] }, r.type)) })
|
|
10050
10485
|
] })
|
|
10051
10486
|
] });
|
|
10052
10487
|
var RecoveryPanel = ({ port, lauf }) => {
|
|
10053
|
-
const [arbeitskopie, setArbeitskopie] =
|
|
10054
|
-
const [bewertung, setBewertung] =
|
|
10055
|
-
const [gesichert, setGesichert] =
|
|
10056
|
-
const [meldung, setMeldung] =
|
|
10057
|
-
const [laeuft, setLaeuft] =
|
|
10488
|
+
const [arbeitskopie, setArbeitskopie] = useState14(null);
|
|
10489
|
+
const [bewertung, setBewertung] = useState14(null);
|
|
10490
|
+
const [gesichert, setGesichert] = useState14(null);
|
|
10491
|
+
const [meldung, setMeldung] = useState14(null);
|
|
10492
|
+
const [laeuft, setLaeuft] = useState14(false);
|
|
10058
10493
|
if (!port.derivation) return null;
|
|
10059
10494
|
if (typeof lauf.raw_output !== "string" || lauf.raw_output.length === 0) return null;
|
|
10060
10495
|
const derivation = port.derivation;
|
|
@@ -10090,16 +10525,16 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10090
10525
|
setLaeuft(false);
|
|
10091
10526
|
}
|
|
10092
10527
|
}
|
|
10093
|
-
return /* @__PURE__ */
|
|
10094
|
-
/* @__PURE__ */
|
|
10095
|
-
/* @__PURE__ */
|
|
10528
|
+
return /* @__PURE__ */ jsxs16("section", { className: "szenen-rettung", "data-testid": "rettung", children: [
|
|
10529
|
+
/* @__PURE__ */ jsx16("h4", { children: "Antwort retten" }),
|
|
10530
|
+
/* @__PURE__ */ jsxs16("p", { className: "szenen-area__lead", children: [
|
|
10096
10531
|
"Der Lauf ist bezahlt und seine Antwort liegt vor. Sie l\xE4sst sich hier pr\xFCfen und korrigieren \u2014 ",
|
|
10097
|
-
/* @__PURE__ */
|
|
10532
|
+
/* @__PURE__ */ jsx16("strong", { children: "ohne" }),
|
|
10098
10533
|
" einen weiteren Modellaufruf. Das Original bleibt unver\xE4ndert."
|
|
10099
10534
|
] }),
|
|
10100
|
-
/* @__PURE__ */
|
|
10101
|
-
/* @__PURE__ */
|
|
10102
|
-
/* @__PURE__ */
|
|
10535
|
+
/* @__PURE__ */ jsxs16("label", { className: "szenen-field", children: [
|
|
10536
|
+
/* @__PURE__ */ jsx16("span", { children: "Original der Modellantwort (unver\xE4nderlich)" }),
|
|
10537
|
+
/* @__PURE__ */ jsx16(
|
|
10103
10538
|
"textarea",
|
|
10104
10539
|
{
|
|
10105
10540
|
readOnly: true,
|
|
@@ -10110,12 +10545,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10110
10545
|
}
|
|
10111
10546
|
)
|
|
10112
10547
|
] }),
|
|
10113
|
-
/* @__PURE__ */
|
|
10114
|
-
/* @__PURE__ */
|
|
10548
|
+
/* @__PURE__ */ jsxs16("label", { className: "szenen-field", children: [
|
|
10549
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
10115
10550
|
"Arbeitskopie",
|
|
10116
10551
|
bearbeitet ? " (bearbeitet)" : ""
|
|
10117
10552
|
] }),
|
|
10118
|
-
/* @__PURE__ */
|
|
10553
|
+
/* @__PURE__ */ jsx16(
|
|
10119
10554
|
"textarea",
|
|
10120
10555
|
{
|
|
10121
10556
|
rows: 8,
|
|
@@ -10125,8 +10560,8 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10125
10560
|
}
|
|
10126
10561
|
)
|
|
10127
10562
|
] }),
|
|
10128
|
-
/* @__PURE__ */
|
|
10129
|
-
/* @__PURE__ */
|
|
10563
|
+
/* @__PURE__ */ jsxs16("div", { className: "szenen-rettung__aktionen", children: [
|
|
10564
|
+
/* @__PURE__ */ jsx16(
|
|
10130
10565
|
"button",
|
|
10131
10566
|
{
|
|
10132
10567
|
type: "button",
|
|
@@ -10136,7 +10571,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10136
10571
|
children: "Arbeitskopie pr\xFCfen (kein Modellaufruf)"
|
|
10137
10572
|
}
|
|
10138
10573
|
),
|
|
10139
|
-
/* @__PURE__ */
|
|
10574
|
+
/* @__PURE__ */ jsx16(
|
|
10140
10575
|
"button",
|
|
10141
10576
|
{
|
|
10142
10577
|
type: "button",
|
|
@@ -10146,7 +10581,7 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10146
10581
|
children: "Arbeitsfassung speichern"
|
|
10147
10582
|
}
|
|
10148
10583
|
),
|
|
10149
|
-
arbeitskopie !== null && /* @__PURE__ */
|
|
10584
|
+
arbeitskopie !== null && /* @__PURE__ */ jsx16(
|
|
10150
10585
|
"button",
|
|
10151
10586
|
{
|
|
10152
10587
|
type: "button",
|
|
@@ -10161,15 +10596,15 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10161
10596
|
}
|
|
10162
10597
|
)
|
|
10163
10598
|
] }),
|
|
10164
|
-
meldung && /* @__PURE__ */
|
|
10165
|
-
bewertung && /* @__PURE__ */
|
|
10166
|
-
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */
|
|
10167
|
-
/* @__PURE__ */
|
|
10168
|
-
/* @__PURE__ */
|
|
10599
|
+
meldung && /* @__PURE__ */ jsx16("p", { className: "szenen-error", role: "alert", "data-testid": "rettung-meldung", children: meldung }),
|
|
10600
|
+
bewertung && /* @__PURE__ */ jsx16(Ausbeute, { bewertung }),
|
|
10601
|
+
bewertung && bewertung.diagnostics.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "szenen-diagnose", children: [
|
|
10602
|
+
/* @__PURE__ */ jsx16("h5", { children: "Befunde an dieser Fassung" }),
|
|
10603
|
+
/* @__PURE__ */ jsx16(Diagnosen, { befunde: bewertung.diagnostics, testId: "rettung-befunde" })
|
|
10169
10604
|
] }),
|
|
10170
|
-
gesichert && /* @__PURE__ */
|
|
10605
|
+
gesichert && /* @__PURE__ */ jsxs16("p", { "data-testid": "rettung-gesichert", children: [
|
|
10171
10606
|
"Gespeichert als Arbeitsfassung ",
|
|
10172
|
-
/* @__PURE__ */
|
|
10607
|
+
/* @__PURE__ */ jsx16("code", { children: gesichert.recovery_id }),
|
|
10173
10608
|
gesichert.edited ? " (bearbeitet)" : " (unver\xE4ndert)",
|
|
10174
10609
|
". Das Original des Laufs ist davon unber\xFChrt."
|
|
10175
10610
|
] })
|
|
@@ -10177,12 +10612,12 @@ var RecoveryPanel = ({ port, lauf }) => {
|
|
|
10177
10612
|
};
|
|
10178
10613
|
|
|
10179
10614
|
// src/features/szenen/areas/ChainActions.tsx
|
|
10180
|
-
import { useState as
|
|
10181
|
-
import { Fragment as
|
|
10615
|
+
import { useState as useState15 } from "react";
|
|
10616
|
+
import { Fragment as Fragment7, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
10182
10617
|
var ChainActions = ({ port, runId, recoveryId }) => {
|
|
10183
|
-
const [graph, setGraph] =
|
|
10184
|
-
const [meldung, setMeldung] =
|
|
10185
|
-
const [laeuft, setLaeuft] =
|
|
10618
|
+
const [graph, setGraph] = useState15(null);
|
|
10619
|
+
const [meldung, setMeldung] = useState15(null);
|
|
10620
|
+
const [laeuft, setLaeuft] = useState15(false);
|
|
10186
10621
|
if (!port.derivation) return null;
|
|
10187
10622
|
const derivation = port.derivation;
|
|
10188
10623
|
const runs = port.runs;
|
|
@@ -10204,14 +10639,14 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
10204
10639
|
setLaeuft(false);
|
|
10205
10640
|
}
|
|
10206
10641
|
}
|
|
10207
|
-
return /* @__PURE__ */
|
|
10208
|
-
/* @__PURE__ */
|
|
10209
|
-
/* @__PURE__ */
|
|
10642
|
+
return /* @__PURE__ */ jsxs17("section", { className: "szenen-kette", "data-testid": "kette", children: [
|
|
10643
|
+
/* @__PURE__ */ jsx17("h4", { children: "Draft-Kette" }),
|
|
10644
|
+
/* @__PURE__ */ jsxs17("p", { className: "szenen-area__lead", children: [
|
|
10210
10645
|
"Szene, Aufbau und Shot entstehen als zusammenh\xE4ngende Entw\xFCrfe. Daraus l\xE4sst sich sofort ein Prompt erzeugen \u2014 ",
|
|
10211
|
-
/* @__PURE__ */
|
|
10646
|
+
/* @__PURE__ */ jsx17("strong", { children: "ohne" }),
|
|
10212
10647
|
" vorher etwas zu ver\xF6ffentlichen."
|
|
10213
10648
|
] }),
|
|
10214
|
-
!graph && /* @__PURE__ */
|
|
10649
|
+
!graph && /* @__PURE__ */ jsx17(
|
|
10215
10650
|
"button",
|
|
10216
10651
|
{
|
|
10217
10652
|
type: "button",
|
|
@@ -10221,34 +10656,34 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
10221
10656
|
children: "Als Draft-Kette \xFCbernehmen"
|
|
10222
10657
|
}
|
|
10223
10658
|
),
|
|
10224
|
-
graph && /* @__PURE__ */
|
|
10225
|
-
/* @__PURE__ */
|
|
10659
|
+
graph && /* @__PURE__ */ jsxs17("div", { "data-testid": "kette-ergebnis", children: [
|
|
10660
|
+
/* @__PURE__ */ jsxs17("p", { children: [
|
|
10226
10661
|
"Kette ",
|
|
10227
|
-
/* @__PURE__ */
|
|
10662
|
+
/* @__PURE__ */ jsx17("code", { children: graph.chainId }),
|
|
10228
10663
|
" angelegt. Kein Knoten ist ver\xF6ffentlicht."
|
|
10229
10664
|
] }),
|
|
10230
|
-
/* @__PURE__ */
|
|
10231
|
-
/* @__PURE__ */
|
|
10665
|
+
/* @__PURE__ */ jsx17("ul", { "data-testid": "kette-knoten", children: graph.created.map((k) => /* @__PURE__ */ jsxs17("li", { "data-testid": `kette-knoten-${k.type}`, children: [
|
|
10666
|
+
/* @__PURE__ */ jsx17("strong", { children: k.type }),
|
|
10232
10667
|
" \u2014 Element ",
|
|
10233
|
-
/* @__PURE__ */
|
|
10668
|
+
/* @__PURE__ */ jsx17("code", { children: k.elementId }),
|
|
10234
10669
|
", Entwurf ",
|
|
10235
|
-
/* @__PURE__ */
|
|
10670
|
+
/* @__PURE__ */ jsx17("code", { children: k.draftId }),
|
|
10236
10671
|
" (Revision ",
|
|
10237
10672
|
k.revision,
|
|
10238
10673
|
")"
|
|
10239
10674
|
] }, k.type)) }),
|
|
10240
|
-
graph.missing.length > 0 && /* @__PURE__ */
|
|
10241
|
-
/* @__PURE__ */
|
|
10242
|
-
/* @__PURE__ */
|
|
10243
|
-
/* @__PURE__ */
|
|
10675
|
+
graph.missing.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "szenen-diagnose", "data-testid": "kette-fehlend", children: [
|
|
10676
|
+
/* @__PURE__ */ jsx17("h5", { children: "Unvollst\xE4ndig erzeugt" }),
|
|
10677
|
+
/* @__PURE__ */ jsx17("ul", { children: graph.missing.map((m) => /* @__PURE__ */ jsxs17("li", { children: [
|
|
10678
|
+
/* @__PURE__ */ jsx17("strong", { children: m.type }),
|
|
10244
10679
|
": ",
|
|
10245
10680
|
m.reason
|
|
10246
10681
|
] }, m.type)) })
|
|
10247
10682
|
] })
|
|
10248
10683
|
] }),
|
|
10249
|
-
shotKnoten && /* @__PURE__ */
|
|
10250
|
-
/* @__PURE__ */
|
|
10251
|
-
/* @__PURE__ */
|
|
10684
|
+
shotKnoten && /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
10685
|
+
/* @__PURE__ */ jsx17("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".' }),
|
|
10686
|
+
/* @__PURE__ */ jsx17(
|
|
10252
10687
|
PromptStartAction,
|
|
10253
10688
|
{
|
|
10254
10689
|
port,
|
|
@@ -10256,20 +10691,20 @@ var ChainActions = ({ port, runId, recoveryId }) => {
|
|
|
10256
10691
|
}
|
|
10257
10692
|
)
|
|
10258
10693
|
] }),
|
|
10259
|
-
meldung && /* @__PURE__ */
|
|
10694
|
+
meldung && /* @__PURE__ */ jsx17("p", { className: "szenen-error", role: "alert", "data-testid": "kette-meldung", children: meldung })
|
|
10260
10695
|
] });
|
|
10261
10696
|
};
|
|
10262
10697
|
|
|
10263
10698
|
// src/features/szenen/areas/DeriveArea.tsx
|
|
10264
|
-
import { Fragment as
|
|
10699
|
+
import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10265
10700
|
var MODUS_TEXT = {
|
|
10266
10701
|
prompt: "Nur Prompt",
|
|
10267
10702
|
image: "Nur Bild",
|
|
10268
10703
|
image_prompt: "Bild und Prompt"
|
|
10269
10704
|
};
|
|
10270
10705
|
var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
10271
|
-
const [kopiert, setKopiert] =
|
|
10272
|
-
const feld =
|
|
10706
|
+
const [kopiert, setKopiert] = useState16(false);
|
|
10707
|
+
const feld = useRef3(null);
|
|
10273
10708
|
async function kopieren() {
|
|
10274
10709
|
try {
|
|
10275
10710
|
await navigator.clipboard.writeText(text);
|
|
@@ -10279,15 +10714,15 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
10279
10714
|
setKopiert(false);
|
|
10280
10715
|
}
|
|
10281
10716
|
}
|
|
10282
|
-
return /* @__PURE__ */
|
|
10283
|
-
/* @__PURE__ */
|
|
10717
|
+
return /* @__PURE__ */ jsxs18("details", { open: offen, "data-testid": `belege-${testId}`, children: [
|
|
10718
|
+
/* @__PURE__ */ jsxs18("summary", { children: [
|
|
10284
10719
|
titel,
|
|
10285
10720
|
" (",
|
|
10286
10721
|
text.length,
|
|
10287
10722
|
" Zeichen)"
|
|
10288
10723
|
] }),
|
|
10289
|
-
/* @__PURE__ */
|
|
10290
|
-
/* @__PURE__ */
|
|
10724
|
+
/* @__PURE__ */ jsxs18("div", { className: "szenen-beleg__kopf", children: [
|
|
10725
|
+
/* @__PURE__ */ jsx18(
|
|
10291
10726
|
"button",
|
|
10292
10727
|
{
|
|
10293
10728
|
type: "button",
|
|
@@ -10296,9 +10731,9 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
10296
10731
|
children: "Kopieren"
|
|
10297
10732
|
}
|
|
10298
10733
|
),
|
|
10299
|
-
kopiert && /* @__PURE__ */
|
|
10734
|
+
kopiert && /* @__PURE__ */ jsx18("span", { "data-testid": `kopiert-${testId}`, children: "Kopiert." })
|
|
10300
10735
|
] }),
|
|
10301
|
-
/* @__PURE__ */
|
|
10736
|
+
/* @__PURE__ */ jsx18(
|
|
10302
10737
|
"textarea",
|
|
10303
10738
|
{
|
|
10304
10739
|
ref: feld,
|
|
@@ -10312,8 +10747,8 @@ var BelegFeld = ({ titel, text, testId, offen }) => {
|
|
|
10312
10747
|
)
|
|
10313
10748
|
] });
|
|
10314
10749
|
};
|
|
10315
|
-
var Belege = ({ lauf }) => /* @__PURE__ */
|
|
10316
|
-
lauf.raw_output ? /* @__PURE__ */
|
|
10750
|
+
var Belege = ({ lauf }) => /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "belege", children: [
|
|
10751
|
+
lauf.raw_output ? /* @__PURE__ */ jsx18(
|
|
10317
10752
|
BelegFeld,
|
|
10318
10753
|
{
|
|
10319
10754
|
titel: "Rohantwort des Modells",
|
|
@@ -10324,9 +10759,9 @@ var Belege = ({ lauf }) => /* @__PURE__ */ jsxs17("div", { className: "szenen-di
|
|
|
10324
10759
|
) : (
|
|
10325
10760
|
/* Kein Text ist auch eine Auskunft: Der Provider hat nichts geliefert,
|
|
10326
10761
|
das Modell hat also nicht „falsch geantwortet". */
|
|
10327
|
-
/* @__PURE__ */
|
|
10762
|
+
/* @__PURE__ */ jsx18("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)." })
|
|
10328
10763
|
),
|
|
10329
|
-
/* @__PURE__ */
|
|
10764
|
+
/* @__PURE__ */ jsx18(
|
|
10330
10765
|
BelegFeld,
|
|
10331
10766
|
{
|
|
10332
10767
|
titel: "Systemprompt dieses Laufs",
|
|
@@ -10338,18 +10773,18 @@ var Belege = ({ lauf }) => /* @__PURE__ */ jsxs17("div", { className: "szenen-di
|
|
|
10338
10773
|
] });
|
|
10339
10774
|
var Herkunft = ({ lauf }) => {
|
|
10340
10775
|
if (!lauf.follows) return null;
|
|
10341
|
-
return /* @__PURE__ */
|
|
10776
|
+
return /* @__PURE__ */ jsxs18("p", { className: "szenen-run__herkunft", "data-testid": "folgt-auf", children: [
|
|
10342
10777
|
"Folgt auf Lauf ",
|
|
10343
|
-
/* @__PURE__ */
|
|
10778
|
+
/* @__PURE__ */ jsx18("code", { children: lauf.follows.run_id }),
|
|
10344
10779
|
".",
|
|
10345
10780
|
lauf.status === "succeeded" && " Im Folgelauf gelungen."
|
|
10346
10781
|
] });
|
|
10347
10782
|
};
|
|
10348
10783
|
var Widerspruch = ({ lauf }) => {
|
|
10349
10784
|
if (!lauf.reply) return null;
|
|
10350
|
-
return /* @__PURE__ */
|
|
10351
|
-
/* @__PURE__ */
|
|
10352
|
-
/* @__PURE__ */
|
|
10785
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose szenen-diagnose--antwort", "data-testid": "modell-antwort", children: [
|
|
10786
|
+
/* @__PURE__ */ jsx18("h4", { children: "Das Modell antwortet auf die Beanstandung" }),
|
|
10787
|
+
/* @__PURE__ */ jsx18("p", { children: lauf.reply })
|
|
10353
10788
|
] });
|
|
10354
10789
|
};
|
|
10355
10790
|
function readAsBase642(datei) {
|
|
@@ -10364,11 +10799,33 @@ function readAsBase642(datei) {
|
|
|
10364
10799
|
leser.readAsDataURL(datei);
|
|
10365
10800
|
});
|
|
10366
10801
|
}
|
|
10802
|
+
var ERSTE_KACHELN = 12;
|
|
10803
|
+
function useSichtbareKacheln(alle, wurzel) {
|
|
10804
|
+
const [gesehen, setGesehen] = useState16([]);
|
|
10805
|
+
const schluessel = alle.join(" ");
|
|
10806
|
+
useEffect7(() => {
|
|
10807
|
+
const ziel = wurzel.current;
|
|
10808
|
+
if (!ziel || typeof IntersectionObserver === "undefined") return void 0;
|
|
10809
|
+
const beobachter = new IntersectionObserver((eintraege) => {
|
|
10810
|
+
const neue = eintraege.filter((e) => e.isIntersecting).map((e) => e.target.dataset.mediaRef).filter((r) => Boolean(r));
|
|
10811
|
+
if (neue.length === 0) return;
|
|
10812
|
+
setGesehen((bisher) => [.../* @__PURE__ */ new Set([...bisher, ...neue])]);
|
|
10813
|
+
for (const e of eintraege) if (e.isIntersecting) beobachter.unobserve(e.target);
|
|
10814
|
+
}, { root: ziel, rootMargin: "200px" });
|
|
10815
|
+
ziel.querySelectorAll("[data-media-ref]").forEach((el) => beobachter.observe(el));
|
|
10816
|
+
return () => beobachter.disconnect();
|
|
10817
|
+
}, [wurzel, schluessel]);
|
|
10818
|
+
return useMemo3(
|
|
10819
|
+
() => [.../* @__PURE__ */ new Set([...alle.slice(0, ERSTE_KACHELN), ...gesehen])],
|
|
10820
|
+
[schluessel, gesehen]
|
|
10821
|
+
);
|
|
10822
|
+
}
|
|
10367
10823
|
function useVorschauen(port, mediaRefs) {
|
|
10368
|
-
const [
|
|
10369
|
-
const gehalten =
|
|
10824
|
+
const [stand, setStand] = useState16(() => ({ quellen: /* @__PURE__ */ new Map(), gescheitert: /* @__PURE__ */ new Set() }));
|
|
10825
|
+
const gehalten = useRef3(/* @__PURE__ */ new Map());
|
|
10826
|
+
const ohneBild = useRef3(/* @__PURE__ */ new Set());
|
|
10370
10827
|
const schluessel = mediaRefs.join(" ");
|
|
10371
|
-
|
|
10828
|
+
useEffect7(() => {
|
|
10372
10829
|
const bestand = port.imageLibrary;
|
|
10373
10830
|
if (!bestand?.loadPreview) return void 0;
|
|
10374
10831
|
const refs = schluessel ? schluessel.split(" ") : [];
|
|
@@ -10377,53 +10834,67 @@ function useVorschauen(port, mediaRefs) {
|
|
|
10377
10834
|
bestand,
|
|
10378
10835
|
refs,
|
|
10379
10836
|
(mediaRef, quelle) => {
|
|
10380
|
-
gehalten.current.set(mediaRef, quelle);
|
|
10381
|
-
|
|
10837
|
+
if (quelle) gehalten.current.set(mediaRef, quelle);
|
|
10838
|
+
else ohneBild.current.add(mediaRef);
|
|
10839
|
+
setStand({
|
|
10840
|
+
quellen: new Map(gehalten.current),
|
|
10841
|
+
gescheitert: new Set(ohneBild.current)
|
|
10842
|
+
});
|
|
10382
10843
|
},
|
|
10383
|
-
{
|
|
10844
|
+
{
|
|
10845
|
+
parallel: 4,
|
|
10846
|
+
hat: (ref) => gehalten.current.has(ref) || ohneBild.current.has(ref),
|
|
10847
|
+
lauf,
|
|
10848
|
+
// Ein Fehlschlag ist eine Auskunft, kein Grund weiterzuprobieren:
|
|
10849
|
+
// Die Kachel bekommt einen Platzhalter, das Werk bleibt wählbar.
|
|
10850
|
+
gescheitert: (ref) => {
|
|
10851
|
+
ohneBild.current.add(ref);
|
|
10852
|
+
setStand({
|
|
10853
|
+
quellen: new Map(gehalten.current),
|
|
10854
|
+
gescheitert: new Set(ohneBild.current)
|
|
10855
|
+
});
|
|
10856
|
+
}
|
|
10857
|
+
}
|
|
10384
10858
|
);
|
|
10385
10859
|
return () => {
|
|
10386
10860
|
lauf.abgebrochen = true;
|
|
10387
10861
|
};
|
|
10388
10862
|
}, [port, schluessel]);
|
|
10389
|
-
return
|
|
10863
|
+
return stand;
|
|
10390
10864
|
}
|
|
10391
|
-
var Kachel = ({ quelle, alt }) => /* @__PURE__ */ jsx17("span", { className: "szenen-bildkachel", children: quelle ? /* @__PURE__ */ jsx17("img", { src: quelle, alt, loading: "lazy" }) : /* @__PURE__ */ jsx17("span", { className: "szenen-bildkachel__leer", "aria-hidden": "true" }) });
|
|
10392
10865
|
var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
10393
|
-
const [suche, setSuche] =
|
|
10394
|
-
const [
|
|
10866
|
+
const [suche, setSuche] = useState16("");
|
|
10867
|
+
const [fokus, setFokus] = useState16(null);
|
|
10868
|
+
const browser = useRef3(null);
|
|
10395
10869
|
const [items] = usePortQuery(
|
|
10396
10870
|
() => port.imageLibrary.listItems({ search: suche.trim() || void 0, limit: 60 }),
|
|
10397
10871
|
[port, suche]
|
|
10398
10872
|
);
|
|
10399
|
-
const
|
|
10400
|
-
const
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10873
|
+
const werke = items.status === "ready" ? items.value : [];
|
|
10874
|
+
const werk = werke.find((i) => i.itemRef === fokus) ?? null;
|
|
10875
|
+
const deckbilder = useMemo3(
|
|
10876
|
+
() => werke.map((i) => i.images[0]?.mediaRef).filter((r) => Boolean(r)),
|
|
10877
|
+
[werke]
|
|
10878
|
+
);
|
|
10879
|
+
const sichtbareDeckbilder = useSichtbareKacheln(deckbilder, browser);
|
|
10880
|
+
const anzufordern = useMemo3(() => [.../* @__PURE__ */ new Set([
|
|
10881
|
+
...sichtbareDeckbilder,
|
|
10882
|
+
...werk ? werk.images.map((b) => b.mediaRef) : [],
|
|
10883
|
+
...gewaehlt.map((b) => b.mediaRef)
|
|
10884
|
+
])], [sichtbareDeckbilder, werk, gewaehlt]);
|
|
10885
|
+
const { quellen, gescheitert } = useVorschauen(port, anzufordern);
|
|
10405
10886
|
const quelleVon = (bild) => bild.thumbUrl || quellen.get(bild.mediaRef) || null;
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
),
|
|
10418
|
-
/* @__PURE__ */ jsxs17("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
10419
|
-
werk.title,
|
|
10420
|
-
" \xB7 ",
|
|
10421
|
-
werk.images.length,
|
|
10422
|
-
" Bilder"
|
|
10423
|
-
] })
|
|
10424
|
-
] }) : /* @__PURE__ */ jsxs17("label", { className: "szenen-field", children: [
|
|
10425
|
-
/* @__PURE__ */ jsx17("span", { children: "Bild aus dem Bestand" }),
|
|
10426
|
-
/* @__PURE__ */ jsx17(
|
|
10887
|
+
const istGewaehlt = (mediaRef) => gewaehlt.some((b) => b.mediaRef === mediaRef);
|
|
10888
|
+
function werkAntippen(item) {
|
|
10889
|
+
const deckbild = item.images[0];
|
|
10890
|
+
if (!deckbild) return;
|
|
10891
|
+
if (item.images.length === 1) onWaehlen(deckbild);
|
|
10892
|
+
else setFokus(item.itemRef === fokus ? null : item.itemRef);
|
|
10893
|
+
}
|
|
10894
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-bildwahl", "data-testid": "bildwahl", children: [
|
|
10895
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
10896
|
+
/* @__PURE__ */ jsx18("span", { children: "Bild aus dem Bestand" }),
|
|
10897
|
+
/* @__PURE__ */ jsx18(
|
|
10427
10898
|
"input",
|
|
10428
10899
|
{
|
|
10429
10900
|
type: "search",
|
|
@@ -10437,63 +10908,107 @@ var BildWaehler = ({ port, gewaehlt, onWaehlen, onEntfernen }) => {
|
|
|
10437
10908
|
}
|
|
10438
10909
|
)
|
|
10439
10910
|
] }),
|
|
10440
|
-
items.status === "loading" && /* @__PURE__ */
|
|
10441
|
-
items.status === "error" && /* @__PURE__ */
|
|
10911
|
+
items.status === "loading" && /* @__PURE__ */ jsx18("p", { children: "Bilder werden geladen \u2026" }),
|
|
10912
|
+
items.status === "error" && /* @__PURE__ */ jsxs18("p", { className: "szenen-error", role: "alert", children: [
|
|
10442
10913
|
"Der Bildbestand ist nicht lesbar: ",
|
|
10443
10914
|
items.message
|
|
10444
10915
|
] }),
|
|
10445
|
-
items.status === "ready" &&
|
|
10446
|
-
|
|
10447
|
-
"
|
|
10916
|
+
items.status === "ready" && werke.length === 0 && /* @__PURE__ */ jsx18("p", { className: "szenen-empty", "data-testid": "bildwahl-leer", children: "Zu dieser Suche gibt es kein Bild. Ohne Treffer bleibt der Upload." }),
|
|
10917
|
+
werke.length > 0 && /* @__PURE__ */ jsx18(
|
|
10918
|
+
"div",
|
|
10448
10919
|
{
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10920
|
+
className: "szenen-bildwahl__browser",
|
|
10921
|
+
ref: browser,
|
|
10922
|
+
"data-testid": "bildwahl-werke",
|
|
10923
|
+
children: /* @__PURE__ */ jsx18("ul", { className: "szenen-bildwahl__raster", children: werke.map((item) => {
|
|
10924
|
+
const deckbild = item.images[0];
|
|
10925
|
+
if (!deckbild) return null;
|
|
10926
|
+
const fokussiert = item.itemRef === fokus;
|
|
10927
|
+
return /* @__PURE__ */ jsx18("li", { "data-media-ref": deckbild.mediaRef, children: /* @__PURE__ */ jsxs18(
|
|
10928
|
+
"button",
|
|
10929
|
+
{
|
|
10930
|
+
type: "button",
|
|
10931
|
+
className: `szenen-bildwahl__karte${fokussiert ? " is-fokus" : ""}`,
|
|
10932
|
+
onClick: () => werkAntippen(item),
|
|
10933
|
+
"aria-pressed": fokussiert,
|
|
10934
|
+
"data-testid": `item-waehlen-${item.itemRef}`,
|
|
10935
|
+
title: item.title,
|
|
10936
|
+
children: [
|
|
10937
|
+
/* @__PURE__ */ jsx18(
|
|
10938
|
+
Kachel,
|
|
10939
|
+
{
|
|
10940
|
+
quelle: quelleVon(deckbild),
|
|
10941
|
+
alt: item.title,
|
|
10942
|
+
...gescheitert.has(deckbild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
10943
|
+
}
|
|
10944
|
+
),
|
|
10945
|
+
item.images.length > 1 && /* @__PURE__ */ jsxs18(
|
|
10946
|
+
"span",
|
|
10947
|
+
{
|
|
10948
|
+
className: "szenen-bildwahl__anzahl",
|
|
10949
|
+
"data-testid": `item-anzahl-${item.itemRef}`,
|
|
10950
|
+
children: [
|
|
10951
|
+
item.images.length,
|
|
10952
|
+
"x"
|
|
10953
|
+
]
|
|
10954
|
+
}
|
|
10955
|
+
),
|
|
10956
|
+
/* @__PURE__ */ jsx18("span", { className: "szenen-bildwahl__kacheltitel", children: item.title })
|
|
10957
|
+
]
|
|
10958
|
+
}
|
|
10959
|
+
) }, item.itemRef);
|
|
10960
|
+
}) })
|
|
10463
10961
|
}
|
|
10464
|
-
)
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10962
|
+
),
|
|
10963
|
+
werk && /* @__PURE__ */ jsxs18("section", { className: "szenen-bildwahl__inspector", "data-testid": "bildwahl-galerie", children: [
|
|
10964
|
+
/* @__PURE__ */ jsxs18("header", { className: "szenen-bildwahl__inspektorkopf", children: [
|
|
10965
|
+
/* @__PURE__ */ jsxs18("span", { className: "szenen-bildwahl__werktitel", "data-testid": "bildwahl-werktitel", children: [
|
|
10966
|
+
werk.title,
|
|
10967
|
+
" \xB7 ",
|
|
10968
|
+
werk.images.length,
|
|
10969
|
+
" Bilder"
|
|
10970
|
+
] }),
|
|
10971
|
+
/* @__PURE__ */ jsx18(
|
|
10972
|
+
"button",
|
|
10973
|
+
{
|
|
10974
|
+
type: "button",
|
|
10975
|
+
className: "szenen-bildwahl__zurueck",
|
|
10976
|
+
onClick: () => setFokus(null),
|
|
10977
|
+
"data-testid": "bildwahl-zurueck",
|
|
10978
|
+
children: "Schliessen"
|
|
10979
|
+
}
|
|
10980
|
+
)
|
|
10981
|
+
] }),
|
|
10982
|
+
/* @__PURE__ */ jsx18("ul", { className: "szenen-bildwahl__streifen", children: werk.images.map((bild, position) => /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs18(
|
|
10469
10983
|
"button",
|
|
10470
10984
|
{
|
|
10471
10985
|
type: "button",
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10986
|
+
className: `szenen-bildwahl__variante${istGewaehlt(bild.mediaRef) ? " is-gewaehlt" : ""}`,
|
|
10987
|
+
onClick: () => onWaehlen(bild),
|
|
10988
|
+
"aria-pressed": istGewaehlt(bild.mediaRef),
|
|
10989
|
+
"data-testid": `bild-waehlen-${bild.mediaRef}`,
|
|
10990
|
+
title: bild.title,
|
|
10475
10991
|
children: [
|
|
10476
|
-
/* @__PURE__ */
|
|
10477
|
-
|
|
10478
|
-
"span",
|
|
10992
|
+
/* @__PURE__ */ jsx18(
|
|
10993
|
+
Kachel,
|
|
10479
10994
|
{
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
item.images.length,
|
|
10484
|
-
"x"
|
|
10485
|
-
]
|
|
10995
|
+
quelle: quelleVon(bild),
|
|
10996
|
+
alt: bild.title,
|
|
10997
|
+
...gescheitert.has(bild.mediaRef) ? { leerText: "Vorschau fehlt" } : {}
|
|
10486
10998
|
}
|
|
10487
10999
|
),
|
|
10488
|
-
/* @__PURE__ */
|
|
11000
|
+
/* @__PURE__ */ jsxs18("span", { className: "szenen-bildwahl__nummer", children: [
|
|
11001
|
+
"#",
|
|
11002
|
+
position + 1
|
|
11003
|
+
] })
|
|
10489
11004
|
]
|
|
10490
11005
|
}
|
|
10491
|
-
) },
|
|
10492
|
-
|
|
10493
|
-
gewaehlt.length > 0 && /* @__PURE__ */
|
|
10494
|
-
/* @__PURE__ */
|
|
10495
|
-
/* @__PURE__ */
|
|
10496
|
-
/* @__PURE__ */
|
|
11006
|
+
) }, bild.mediaRef)) })
|
|
11007
|
+
] }),
|
|
11008
|
+
gewaehlt.length > 0 && /* @__PURE__ */ jsx18("ul", { className: "szenen-bildwahl__gewaehlt", "data-testid": "bilder-gewaehlt", children: gewaehlt.map((bild) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
11009
|
+
/* @__PURE__ */ jsx18(Kachel, { quelle: quelleVon(bild), alt: bild.title }),
|
|
11010
|
+
/* @__PURE__ */ jsx18("span", { className: "szenen-bildwahl__kacheltitel", children: bild.title }),
|
|
11011
|
+
/* @__PURE__ */ jsx18(
|
|
10497
11012
|
"button",
|
|
10498
11013
|
{
|
|
10499
11014
|
type: "button",
|
|
@@ -10512,19 +11027,19 @@ async function digestOf(datei) {
|
|
|
10512
11027
|
return [...new Uint8Array(hash)].map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
10513
11028
|
}
|
|
10514
11029
|
var DeriveArea = ({ port, contextId }) => {
|
|
10515
|
-
const [policyVersionId, setPolicyVersionId] =
|
|
10516
|
-
const [modus, setModus] =
|
|
10517
|
-
const [promptText, setPromptText] =
|
|
10518
|
-
const [dateien, setDateien] =
|
|
10519
|
-
const [bestandsbilder, setBestandsbilder] =
|
|
10520
|
-
const [laeuft, setLaeuft] =
|
|
10521
|
-
const [lauf, setLauf] =
|
|
10522
|
-
const [meldung, setMeldung] =
|
|
10523
|
-
const [uebernommen, setUebernommen] =
|
|
10524
|
-
const [titel, setTitel] =
|
|
10525
|
-
const [referenzen, setReferenzen] =
|
|
10526
|
-
const [beanstandung, setBeanstandung] =
|
|
10527
|
-
const [zusatz, setZusatz] =
|
|
11030
|
+
const [policyVersionId, setPolicyVersionId] = useState16("");
|
|
11031
|
+
const [modus, setModus] = useState16("prompt");
|
|
11032
|
+
const [promptText, setPromptText] = useState16("");
|
|
11033
|
+
const [dateien, setDateien] = useState16([]);
|
|
11034
|
+
const [bestandsbilder, setBestandsbilder] = useState16([]);
|
|
11035
|
+
const [laeuft, setLaeuft] = useState16(false);
|
|
11036
|
+
const [lauf, setLauf] = useState16(null);
|
|
11037
|
+
const [meldung, setMeldung] = useState16(null);
|
|
11038
|
+
const [uebernommen, setUebernommen] = useState16({});
|
|
11039
|
+
const [titel, setTitel] = useState16({});
|
|
11040
|
+
const [referenzen, setReferenzen] = useState16({});
|
|
11041
|
+
const [beanstandung, setBeanstandung] = useState16(null);
|
|
11042
|
+
const [zusatz, setZusatz] = useState16("");
|
|
10528
11043
|
const [regeln] = usePortQuery(
|
|
10529
11044
|
() => port.derivation.listPolicies(contextId),
|
|
10530
11045
|
[port, contextId]
|
|
@@ -10605,12 +11120,12 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10605
11120
|
const text = beanstandung ?? vorgabeBeanstandung(satz);
|
|
10606
11121
|
const bilderFehlen = satz.input.images.some((bild) => bild.kind !== "library");
|
|
10607
11122
|
const bereit = Boolean(text.trim()) && !bilderFehlen && !laeuft;
|
|
10608
|
-
return /* @__PURE__ */
|
|
10609
|
-
/* @__PURE__ */
|
|
10610
|
-
/* @__PURE__ */
|
|
10611
|
-
/* @__PURE__ */
|
|
10612
|
-
/* @__PURE__ */
|
|
10613
|
-
/* @__PURE__ */
|
|
11123
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-folgelauf", "data-testid": "folgelauf", children: [
|
|
11124
|
+
/* @__PURE__ */ jsx18("h4", { children: "Korrektur- oder Erg\xE4nzungslauf" }),
|
|
11125
|
+
/* @__PURE__ */ jsx18("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." }),
|
|
11126
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11127
|
+
/* @__PURE__ */ jsx18("span", { children: "Beanstandung" }),
|
|
11128
|
+
/* @__PURE__ */ jsx18(
|
|
10614
11129
|
"textarea",
|
|
10615
11130
|
{
|
|
10616
11131
|
rows: 4,
|
|
@@ -10620,9 +11135,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10620
11135
|
}
|
|
10621
11136
|
)
|
|
10622
11137
|
] }),
|
|
10623
|
-
/* @__PURE__ */
|
|
10624
|
-
/* @__PURE__ */
|
|
10625
|
-
/* @__PURE__ */
|
|
11138
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11139
|
+
/* @__PURE__ */ jsx18("span", { children: "Zus\xE4tzliche Anweisung (optional)" }),
|
|
11140
|
+
/* @__PURE__ */ jsx18(
|
|
10626
11141
|
"textarea",
|
|
10627
11142
|
{
|
|
10628
11143
|
rows: 2,
|
|
@@ -10633,8 +11148,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10633
11148
|
}
|
|
10634
11149
|
)
|
|
10635
11150
|
] }),
|
|
10636
|
-
bilderFehlen && /* @__PURE__ */
|
|
10637
|
-
/* @__PURE__ */
|
|
11151
|
+
bilderFehlen && /* @__PURE__ */ jsx18("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." }),
|
|
11152
|
+
/* @__PURE__ */ jsx18(
|
|
10638
11153
|
"button",
|
|
10639
11154
|
{
|
|
10640
11155
|
type: "button",
|
|
@@ -10676,19 +11191,19 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10676
11191
|
setMeldung(ergebnis.message);
|
|
10677
11192
|
}
|
|
10678
11193
|
}
|
|
10679
|
-
return /* @__PURE__ */
|
|
10680
|
-
/* @__PURE__ */
|
|
10681
|
-
regeln.status === "loading" && /* @__PURE__ */
|
|
10682
|
-
regeln.status === "error" && /* @__PURE__ */
|
|
11194
|
+
return /* @__PURE__ */ jsxs18("div", { className: "szenen-derive", "data-testid": "bereich-rekonstruktion", children: [
|
|
11195
|
+
/* @__PURE__ */ jsx18("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." }),
|
|
11196
|
+
regeln.status === "loading" && /* @__PURE__ */ jsx18("p", { children: "Regeln werden geladen \u2026" }),
|
|
11197
|
+
regeln.status === "error" && /* @__PURE__ */ jsxs18("p", { className: "szenen-error", role: "alert", children: [
|
|
10683
11198
|
"Die Regeln konnten nicht gelesen werden: ",
|
|
10684
11199
|
regeln.message
|
|
10685
11200
|
] }),
|
|
10686
|
-
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */
|
|
11201
|
+
regeln.status === "ready" && regeln.value.length === 0 && /* @__PURE__ */ jsxs18("p", { className: "szenen-empty", children: [
|
|
10687
11202
|
"In diesem Kontext ist keine Rekonstruktionsregel (",
|
|
10688
|
-
/* @__PURE__ */
|
|
11203
|
+
/* @__PURE__ */ jsx18("code", { children: "scene_derivation_policy" }),
|
|
10689
11204
|
') 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.'
|
|
10690
11205
|
] }),
|
|
10691
|
-
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */
|
|
11206
|
+
regeln.status === "ready" && regeln.value.length > 0 && /* @__PURE__ */ jsxs18(
|
|
10692
11207
|
"form",
|
|
10693
11208
|
{
|
|
10694
11209
|
className: "szenen-form",
|
|
@@ -10697,17 +11212,17 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10697
11212
|
void starten();
|
|
10698
11213
|
},
|
|
10699
11214
|
children: [
|
|
10700
|
-
/* @__PURE__ */
|
|
10701
|
-
/* @__PURE__ */
|
|
10702
|
-
/* @__PURE__ */
|
|
11215
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11216
|
+
/* @__PURE__ */ jsx18("span", { children: "Regel" }),
|
|
11217
|
+
/* @__PURE__ */ jsxs18(
|
|
10703
11218
|
"select",
|
|
10704
11219
|
{
|
|
10705
11220
|
value: policyVersionId,
|
|
10706
11221
|
onChange: (e) => setPolicyVersionId(e.target.value),
|
|
10707
11222
|
"data-testid": "regel-auswahl",
|
|
10708
11223
|
children: [
|
|
10709
|
-
/* @__PURE__ */
|
|
10710
|
-
regeln.value.map((regel) => /* @__PURE__ */
|
|
11224
|
+
/* @__PURE__ */ jsx18("option", { value: "", children: "\u2014 bitte w\xE4hlen \u2014" }),
|
|
11225
|
+
regeln.value.map((regel) => /* @__PURE__ */ jsxs18("option", { value: regel.versionId, children: [
|
|
10711
11226
|
regel.title,
|
|
10712
11227
|
" (",
|
|
10713
11228
|
regel.produces.join(", "),
|
|
@@ -10717,21 +11232,21 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10717
11232
|
}
|
|
10718
11233
|
)
|
|
10719
11234
|
] }),
|
|
10720
|
-
/* @__PURE__ */
|
|
10721
|
-
/* @__PURE__ */
|
|
10722
|
-
/* @__PURE__ */
|
|
11235
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11236
|
+
/* @__PURE__ */ jsx18("span", { children: "Eingang" }),
|
|
11237
|
+
/* @__PURE__ */ jsx18(
|
|
10723
11238
|
"select",
|
|
10724
11239
|
{
|
|
10725
11240
|
value: modus,
|
|
10726
11241
|
onChange: (e) => setModus(e.target.value),
|
|
10727
11242
|
"data-testid": "modus-auswahl",
|
|
10728
|
-
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */
|
|
11243
|
+
children: (gewaehlt ? gewaehlt.inputModes : ["prompt", "image", "image_prompt"]).map((m) => /* @__PURE__ */ jsx18("option", { value: m, children: MODUS_TEXT[m] }, m))
|
|
10729
11244
|
}
|
|
10730
11245
|
)
|
|
10731
11246
|
] }),
|
|
10732
|
-
modus !== "image" && /* @__PURE__ */
|
|
10733
|
-
/* @__PURE__ */
|
|
10734
|
-
/* @__PURE__ */
|
|
11247
|
+
modus !== "image" && /* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11248
|
+
/* @__PURE__ */ jsx18("span", { children: "Referenzprompt" }),
|
|
11249
|
+
/* @__PURE__ */ jsx18(
|
|
10735
11250
|
"textarea",
|
|
10736
11251
|
{
|
|
10737
11252
|
value: promptText,
|
|
@@ -10741,8 +11256,8 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10741
11256
|
}
|
|
10742
11257
|
)
|
|
10743
11258
|
] }),
|
|
10744
|
-
modus !== "prompt" && /* @__PURE__ */
|
|
10745
|
-
port.imageLibrary && /* @__PURE__ */
|
|
11259
|
+
modus !== "prompt" && /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
11260
|
+
port.imageLibrary && /* @__PURE__ */ jsx18(
|
|
10746
11261
|
BildWaehler,
|
|
10747
11262
|
{
|
|
10748
11263
|
port,
|
|
@@ -10751,9 +11266,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10751
11266
|
onEntfernen: (ref) => setBestandsbilder((v) => v.filter((b) => b.mediaRef !== ref))
|
|
10752
11267
|
}
|
|
10753
11268
|
),
|
|
10754
|
-
/* @__PURE__ */
|
|
10755
|
-
/* @__PURE__ */
|
|
10756
|
-
/* @__PURE__ */
|
|
11269
|
+
/* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11270
|
+
/* @__PURE__ */ jsx18("span", { children: port.imageLibrary ? "Oder hochladen" : "Referenzbild" }),
|
|
11271
|
+
/* @__PURE__ */ jsx18(
|
|
10757
11272
|
"input",
|
|
10758
11273
|
{
|
|
10759
11274
|
type: "file",
|
|
@@ -10763,40 +11278,40 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10763
11278
|
"data-testid": "bild-eingabe"
|
|
10764
11279
|
}
|
|
10765
11280
|
),
|
|
10766
|
-
port.imageLibrary && /* @__PURE__ */
|
|
11281
|
+
port.imageLibrary && /* @__PURE__ */ jsx18("small", { "data-testid": "upload-hinweis", children: "Hochgeladene Bilder werden im Bestand abgelegt \u2014 nur so ist sp\xE4ter ein Folgelauf damit m\xF6glich." })
|
|
10767
11282
|
] })
|
|
10768
11283
|
] }),
|
|
10769
|
-
/* @__PURE__ */
|
|
11284
|
+
/* @__PURE__ */ jsx18("button", { type: "submit", disabled: !gewaehlt || laeuft, "data-testid": "lauf-starten", children: laeuft ? "Rekonstruiert \u2026" : "Rekonstruieren" })
|
|
10770
11285
|
]
|
|
10771
11286
|
}
|
|
10772
11287
|
),
|
|
10773
|
-
meldung && /* @__PURE__ */
|
|
10774
|
-
lauf && lauf.status === "failed" && /* @__PURE__ */
|
|
10775
|
-
/* @__PURE__ */
|
|
10776
|
-
/* @__PURE__ */
|
|
10777
|
-
/* @__PURE__ */
|
|
11288
|
+
meldung && /* @__PURE__ */ jsx18("p", { className: "szenen-error", role: "alert", "data-testid": "derive-meldung", children: meldung }),
|
|
11289
|
+
lauf && lauf.status === "failed" && /* @__PURE__ */ jsxs18("section", { className: "szenen-run szenen-run--failed", "data-testid": "lauf-fehler", children: [
|
|
11290
|
+
/* @__PURE__ */ jsx18("h3", { children: "Der Lauf ist gescheitert" }),
|
|
11291
|
+
/* @__PURE__ */ jsxs18("p", { children: [
|
|
11292
|
+
/* @__PURE__ */ jsx18("strong", { children: lauf.failure?.class }),
|
|
10778
11293
|
" \u2014 ",
|
|
10779
11294
|
lauf.failure?.message
|
|
10780
11295
|
] }),
|
|
10781
|
-
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */
|
|
10782
|
-
/* @__PURE__ */
|
|
10783
|
-
/* @__PURE__ */
|
|
11296
|
+
lauf.failure?.diagnostics && lauf.failure.diagnostics.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "lauf-diagnosen", children: [
|
|
11297
|
+
/* @__PURE__ */ jsx18("h4", { children: "Befunde" }),
|
|
11298
|
+
/* @__PURE__ */ jsx18(Diagnosen, { befunde: lauf.failure.diagnostics, testId: "lauf-befunde" })
|
|
10784
11299
|
] }),
|
|
10785
|
-
/* @__PURE__ */
|
|
10786
|
-
/* @__PURE__ */
|
|
10787
|
-
/* @__PURE__ */
|
|
10788
|
-
/* @__PURE__ */
|
|
11300
|
+
/* @__PURE__ */ jsx18(Herkunft, { lauf }),
|
|
11301
|
+
/* @__PURE__ */ jsx18(Widerspruch, { lauf }),
|
|
11302
|
+
/* @__PURE__ */ jsx18(Belege, { lauf }),
|
|
11303
|
+
/* @__PURE__ */ jsx18(RecoveryPanel, { port, lauf }),
|
|
10789
11304
|
folgeblock(lauf)
|
|
10790
11305
|
] }),
|
|
10791
|
-
lauf && lauf.status === "succeeded" && /* @__PURE__ */
|
|
10792
|
-
/* @__PURE__ */
|
|
10793
|
-
/* @__PURE__ */
|
|
10794
|
-
/* @__PURE__ */
|
|
10795
|
-
/* @__PURE__ */
|
|
10796
|
-
lauf.conflicts.length > 0 && /* @__PURE__ */
|
|
10797
|
-
/* @__PURE__ */
|
|
10798
|
-
/* @__PURE__ */
|
|
10799
|
-
/* @__PURE__ */
|
|
11306
|
+
lauf && lauf.status === "succeeded" && /* @__PURE__ */ jsxs18("section", { className: "szenen-run", "data-testid": "lauf-ergebnis", children: [
|
|
11307
|
+
/* @__PURE__ */ jsx18("h3", { children: "Vorschlag" }),
|
|
11308
|
+
/* @__PURE__ */ jsx18(Herkunft, { lauf }),
|
|
11309
|
+
/* @__PURE__ */ jsx18(Widerspruch, { lauf }),
|
|
11310
|
+
/* @__PURE__ */ jsx18("p", { className: "szenen-run__feedback", children: lauf.feedback }),
|
|
11311
|
+
lauf.conflicts.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose szenen-diagnose--konflikt", "data-testid": "konflikte", children: [
|
|
11312
|
+
/* @__PURE__ */ jsx18("h4", { children: "Widerspr\xFCche zwischen Bild und Prompt" }),
|
|
11313
|
+
/* @__PURE__ */ jsx18("ul", { children: lauf.conflicts.map((k, i) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
11314
|
+
/* @__PURE__ */ jsx18("code", { children: k.field }),
|
|
10800
11315
|
": Bild sagt \u201E",
|
|
10801
11316
|
k.from_image,
|
|
10802
11317
|
'", Prompt sagt \u201E',
|
|
@@ -10804,31 +11319,31 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10804
11319
|
'". Nichts davon wurde \xFCbernommen.'
|
|
10805
11320
|
] }, i)) })
|
|
10806
11321
|
] }),
|
|
10807
|
-
lauf.not_derivable.length > 0 && /* @__PURE__ */
|
|
10808
|
-
/* @__PURE__ */
|
|
10809
|
-
/* @__PURE__ */
|
|
10810
|
-
/* @__PURE__ */
|
|
11322
|
+
lauf.not_derivable.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "nicht-ableitbar", children: [
|
|
11323
|
+
/* @__PURE__ */ jsx18("h4", { children: "Nicht ableitbar" }),
|
|
11324
|
+
/* @__PURE__ */ jsx18("ul", { children: lauf.not_derivable.map((n, i) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
11325
|
+
/* @__PURE__ */ jsx18("code", { children: n.field }),
|
|
10811
11326
|
": ",
|
|
10812
11327
|
n.reason
|
|
10813
11328
|
] }, i)) })
|
|
10814
11329
|
] }),
|
|
10815
|
-
lauf.assumptions.length > 0 && /* @__PURE__ */
|
|
10816
|
-
/* @__PURE__ */
|
|
10817
|
-
/* @__PURE__ */
|
|
11330
|
+
lauf.assumptions.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "szenen-diagnose", "data-testid": "annahmen", children: [
|
|
11331
|
+
/* @__PURE__ */ jsx18("h4", { children: "Erschlossen, nicht belegt" }),
|
|
11332
|
+
/* @__PURE__ */ jsx18("ul", { children: lauf.assumptions.map((a, i) => /* @__PURE__ */ jsx18("li", { children: a }, i)) })
|
|
10818
11333
|
] }),
|
|
10819
11334
|
lauf.proposals.map((vorschlag) => {
|
|
10820
11335
|
const bezug = REFERENCE_FIELD[vorschlag.type];
|
|
10821
11336
|
const fertig = uebernommen[vorschlag.type];
|
|
10822
|
-
return /* @__PURE__ */
|
|
11337
|
+
return /* @__PURE__ */ jsxs18(
|
|
10823
11338
|
"article",
|
|
10824
11339
|
{
|
|
10825
11340
|
className: "szenen-proposal",
|
|
10826
11341
|
"data-testid": `vorschlag-${vorschlag.type}`,
|
|
10827
11342
|
children: [
|
|
10828
|
-
/* @__PURE__ */
|
|
10829
|
-
!fertig && /* @__PURE__ */
|
|
10830
|
-
/* @__PURE__ */
|
|
10831
|
-
/* @__PURE__ */
|
|
11343
|
+
/* @__PURE__ */ jsx18("h4", { children: vorschlag.type }),
|
|
11344
|
+
!fertig && /* @__PURE__ */ jsxs18("label", { className: "szenen-field", children: [
|
|
11345
|
+
/* @__PURE__ */ jsx18("span", { children: "Titel" }),
|
|
11346
|
+
/* @__PURE__ */ jsx18(
|
|
10832
11347
|
"input",
|
|
10833
11348
|
{
|
|
10834
11349
|
type: "text",
|
|
@@ -10842,9 +11357,9 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10842
11357
|
}
|
|
10843
11358
|
)
|
|
10844
11359
|
] }),
|
|
10845
|
-
/* @__PURE__ */
|
|
10846
|
-
bezug && !fertig && /* @__PURE__ */
|
|
10847
|
-
/* @__PURE__ */
|
|
11360
|
+
/* @__PURE__ */ jsx18("pre", { className: "szenen-proposal__payload", children: JSON.stringify(vorschlag.payload, null, 2) }),
|
|
11361
|
+
bezug && !fertig && /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
11362
|
+
/* @__PURE__ */ jsx18(
|
|
10848
11363
|
ReferencePicker,
|
|
10849
11364
|
{
|
|
10850
11365
|
port,
|
|
@@ -10858,30 +11373,30 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10858
11373
|
}))
|
|
10859
11374
|
}
|
|
10860
11375
|
),
|
|
10861
|
-
referenzen[vorschlag.type] ? /* @__PURE__ */
|
|
11376
|
+
referenzen[vorschlag.type] ? /* @__PURE__ */ jsxs18("p", { "data-testid": `referenz-gewaehlt-${vorschlag.type}`, children: [
|
|
10862
11377
|
"Zeigt auf Version ",
|
|
10863
|
-
/* @__PURE__ */
|
|
11378
|
+
/* @__PURE__ */ jsx18("code", { children: referenzen[vorschlag.type] }),
|
|
10864
11379
|
"."
|
|
10865
11380
|
] }) : (
|
|
10866
11381
|
/* Der Grund steht **vor** der Handlung. Den Nutzer erst
|
|
10867
11382
|
auf einen Knopf drücken zu lassen, um ihm dann eine
|
|
10868
11383
|
Ablehnung zu zeigen, ist keine Auskunft. */
|
|
10869
|
-
/* @__PURE__ */
|
|
11384
|
+
/* @__PURE__ */ jsxs18("p", { "data-testid": `referenz-fehlt-${vorschlag.type}`, children: [
|
|
10870
11385
|
"Diese ",
|
|
10871
|
-
/* @__PURE__ */
|
|
11386
|
+
/* @__PURE__ */ jsx18("strong", { children: "Einzel\xFCbernahme" }),
|
|
10872
11387
|
" braucht eine ver\xF6ffentlichte ",
|
|
10873
11388
|
bezug.refersTo,
|
|
10874
11389
|
"-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 ",
|
|
10875
|
-
/* @__PURE__ */
|
|
11390
|
+
/* @__PURE__ */ jsx18("strong", { children: "Draft-Kette" }),
|
|
10876
11391
|
": Dort entstehen Szene, Aufbau und Shot zusammenh\xE4ngend, und es muss nichts ver\xF6ffentlicht werden."
|
|
10877
11392
|
] })
|
|
10878
11393
|
)
|
|
10879
11394
|
] }),
|
|
10880
|
-
fertig ? /* @__PURE__ */
|
|
11395
|
+
fertig ? /* @__PURE__ */ jsxs18("p", { className: "szenen-proposal__done", children: [
|
|
10881
11396
|
"Als Entwurf \xFCbernommen: ",
|
|
10882
|
-
/* @__PURE__ */
|
|
11397
|
+
/* @__PURE__ */ jsx18("code", { children: fertig }),
|
|
10883
11398
|
". Er ist noch nicht ver\xF6ffentlicht."
|
|
10884
|
-
] }) : /* @__PURE__ */
|
|
11399
|
+
] }) : /* @__PURE__ */ jsx18(
|
|
10885
11400
|
"button",
|
|
10886
11401
|
{
|
|
10887
11402
|
type: "button",
|
|
@@ -10896,15 +11411,15 @@ ${teile.map((t) => `- ${t}`).join("\n")}`;
|
|
|
10896
11411
|
vorschlag.type
|
|
10897
11412
|
);
|
|
10898
11413
|
}),
|
|
10899
|
-
/* @__PURE__ */
|
|
10900
|
-
/* @__PURE__ */
|
|
11414
|
+
/* @__PURE__ */ jsx18(ChainActions, { port, runId: lauf.run_id }),
|
|
11415
|
+
/* @__PURE__ */ jsx18(Belege, { lauf }),
|
|
10901
11416
|
folgeblock(lauf)
|
|
10902
11417
|
] })
|
|
10903
11418
|
] });
|
|
10904
11419
|
};
|
|
10905
11420
|
|
|
10906
11421
|
// src/features/szenen/SzenenView.tsx
|
|
10907
|
-
import { jsx as
|
|
11422
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10908
11423
|
var SzenenView = ({
|
|
10909
11424
|
port,
|
|
10910
11425
|
contextId = null,
|
|
@@ -10913,22 +11428,22 @@ var SzenenView = ({
|
|
|
10913
11428
|
}) => {
|
|
10914
11429
|
const bereiche = useMemo4(() => areasFor(port), [port]);
|
|
10915
11430
|
const faehig = useMemo4(() => capabilitiesOf(port), [port]);
|
|
10916
|
-
const [aktiv, setAktiv] =
|
|
11431
|
+
const [aktiv, setAktiv] = useState17(() => resolveArea(port, initialArea));
|
|
10917
11432
|
const wechsle = (id) => {
|
|
10918
11433
|
setAktiv(id);
|
|
10919
11434
|
onAreaChange?.(id);
|
|
10920
11435
|
};
|
|
10921
11436
|
const aktuellerBereich = bereiche.find((b) => b.id === aktiv) ?? bereiche[0];
|
|
10922
|
-
return /* @__PURE__ */
|
|
10923
|
-
/* @__PURE__ */
|
|
10924
|
-
/* @__PURE__ */
|
|
10925
|
-
/* @__PURE__ */
|
|
10926
|
-
/* @__PURE__ */
|
|
10927
|
-
/* @__PURE__ */
|
|
11437
|
+
return /* @__PURE__ */ jsxs19("div", { className: "szenen-view", "data-testid": "szenen-view", children: [
|
|
11438
|
+
/* @__PURE__ */ jsxs19("header", { className: "szenen-view__intro", children: [
|
|
11439
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
11440
|
+
/* @__PURE__ */ jsx19("p", { className: "szenen-view__eyebrow", children: "Vom Motiv zum Bild" }),
|
|
11441
|
+
/* @__PURE__ */ jsx19("h2", { children: "Bildprompt aus einer Szene" }),
|
|
11442
|
+
/* @__PURE__ */ jsx19("p", { children: "Bausteine w\xE4hlen, Szene und Bildaufbau festlegen und daraus einen wiederholbaren Prompt erzeugen." })
|
|
10928
11443
|
] }),
|
|
10929
|
-
/* @__PURE__ */
|
|
11444
|
+
/* @__PURE__ */ jsx19("span", { className: "szenen-view__step", children: aktuellerBereich.title })
|
|
10930
11445
|
] }),
|
|
10931
|
-
/* @__PURE__ */
|
|
11446
|
+
/* @__PURE__ */ jsx19("nav", { className: "szenen-view__nav", "aria-label": "Szenen-Bereiche", children: bereiche.map((bereich) => /* @__PURE__ */ jsx19(
|
|
10932
11447
|
"button",
|
|
10933
11448
|
{
|
|
10934
11449
|
type: "button",
|
|
@@ -10942,9 +11457,9 @@ var SzenenView = ({
|
|
|
10942
11457
|
},
|
|
10943
11458
|
bereich.id
|
|
10944
11459
|
)) }),
|
|
10945
|
-
/* @__PURE__ */
|
|
10946
|
-
aktiv === "derive" && port.derivation && /* @__PURE__ */
|
|
10947
|
-
aktiv === "elements" && /* @__PURE__ */
|
|
11460
|
+
/* @__PURE__ */ jsxs19("section", { className: "szenen-view__area", "aria-label": aktuellerBereich.title, children: [
|
|
11461
|
+
aktiv === "derive" && port.derivation && /* @__PURE__ */ jsx19(DeriveArea, { port, contextId }),
|
|
11462
|
+
aktiv === "elements" && /* @__PURE__ */ jsx19(
|
|
10948
11463
|
ElementsArea,
|
|
10949
11464
|
{
|
|
10950
11465
|
port,
|
|
@@ -10954,15 +11469,15 @@ var SzenenView = ({
|
|
|
10954
11469
|
listTitle: "Bausteine"
|
|
10955
11470
|
}
|
|
10956
11471
|
),
|
|
10957
|
-
aktiv === "scene" && /* @__PURE__ */
|
|
10958
|
-
aktiv === "setup" && /* @__PURE__ */
|
|
10959
|
-
aktiv === "shot" && /* @__PURE__ */
|
|
10960
|
-
aktiv === "media" && port.media && /* @__PURE__ */
|
|
11472
|
+
aktiv === "scene" && /* @__PURE__ */ jsx19(SceneArea, { port, contextId }),
|
|
11473
|
+
aktiv === "setup" && /* @__PURE__ */ jsx19(SetupArea, { port, contextId }),
|
|
11474
|
+
aktiv === "shot" && /* @__PURE__ */ jsx19(ShotArea, { port, contextId }),
|
|
11475
|
+
aktiv === "media" && port.media && /* @__PURE__ */ jsx19(MediaArea, { port, contextId })
|
|
10961
11476
|
] }),
|
|
10962
|
-
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */
|
|
10963
|
-
/* @__PURE__ */
|
|
10964
|
-
!faehig.saveRunAsItem && /* @__PURE__ */
|
|
10965
|
-
!faehig.media && /* @__PURE__ */
|
|
11477
|
+
(!faehig.saveRunAsItem || !faehig.media) && /* @__PURE__ */ jsxs19("details", { className: "szenen-view__host-notes", children: [
|
|
11478
|
+
/* @__PURE__ */ jsx19("summary", { children: "Funktionen dieses Hosts" }),
|
|
11479
|
+
!faehig.saveRunAsItem && /* @__PURE__ */ jsx19("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-kein-item", children: "Runden k\xF6nnen hier nicht als Library-Item gespeichert werden." }),
|
|
11480
|
+
!faehig.media && /* @__PURE__ */ jsx19("p", { className: "szenen-view__capability-note", "data-testid": "hinweis-keine-medien", children: "Referenzmedien werden in diesem Host nicht verwaltet." })
|
|
10966
11481
|
] })
|
|
10967
11482
|
] });
|
|
10968
11483
|
};
|