import { invalidateProjects } from "@/lib/projects"; import { withEditNotes } from "@/lib/report/guard"; import { StaleToken, StructureRefused, duplicateEntry, insertEntry, manifestToken, moveEntry, removeEntry, removePost, undoStructural, updateFactcheck, updateTeaser, upsertPost, } from "@/lib/report/manifest.mjs"; import { resolveReport } from "@/lib/report/serve.mjs"; import { deckOn } from "umtool-report-to-video/deck"; import { VERDICTS, resolveFactcheck } from "umtool-report-to-video/factcheck"; export const dynamic = "force-dynamic"; // The STRUCTURE of the cut: what is in the timeline and in what order, a // teaser's lines, the posts, the fact-check's labels (lib/report/manifest.mjs, // "STRUCTURE"). The window route deliberately cannot move an entry; this is // the different button it points at. // // GET ?project= the token, the timeline's ids in order, the // teasers, the posts and the fact-check block // POST { project, token, op, ... } one op: // move { id, at?, toIndex } toIndex is the index AFTER the move // remove { id, at? } // duplicate { id, at? } // insert { afterId: id | null, at?, entry: "/