wizards 0.2.5 → 0.2.7

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.
Files changed (58) hide show
  1. package/apps/runtime/dist/agents/project-assistant.js +3 -3
  2. package/apps/runtime/dist/app.js +7 -2
  3. package/apps/runtime/dist/routes/delivery.js +6 -14
  4. package/apps/runtime/dist/routes/runs.js +28 -1
  5. package/apps/runtime/dist/services/engenty-shapes.js +71 -0
  6. package/apps/runtime/dist/services/wizard-icon.js +145 -0
  7. package/apps/web/dist/assets/Account-DLLeEwJL.js +1 -0
  8. package/apps/web/dist/assets/{ChangelogDialog-CYQC4l57.js → ChangelogDialog-DEfZRDK3.js} +1 -1
  9. package/apps/web/dist/assets/ChatPanel-CNiFyu_w.js +1 -0
  10. package/apps/web/dist/assets/{CreditsDialog-7nLXWFvP.js → CreditsDialog-CUvc2iPM.js} +1 -1
  11. package/apps/web/dist/assets/EditorPage-CZuCz7lB.js +2 -0
  12. package/apps/web/dist/assets/{FlowPreview-BT4i-qIF.js → FlowPreview-BC25OUH0.js} +1 -1
  13. package/apps/web/dist/assets/HomePage-DQKuhMFZ.js +1 -0
  14. package/apps/web/dist/assets/{ImportWizard-Cg0l6q88.js → ImportWizard-BockXJXm.js} +1 -1
  15. package/apps/web/dist/assets/{LocalRuntime-BoVnl1ga.js → LocalRuntime-C199bg_B.js} +1 -1
  16. package/apps/web/dist/assets/NewWizardPage-C4cde8FO.js +2 -0
  17. package/apps/web/dist/assets/ProjectPage-DJC1K4w_.js +2 -0
  18. package/apps/web/dist/assets/PublicRunner-BCrmXPkr.js +1 -0
  19. package/apps/web/dist/assets/ReadOnly-CvmN9XW4.js +1 -0
  20. package/apps/web/dist/assets/RunnerView-CCe8-k9Q.js +2 -0
  21. package/apps/web/dist/assets/SettingsPage-BuocMkLt.js +1 -0
  22. package/apps/web/dist/assets/{SetupPage-BzZMf7Oz.js → SetupPage-o6Jim2Pu.js} +1 -1
  23. package/apps/web/dist/assets/{SharePage-CONXJnOU.js → SharePage-BqwqI3Ga.js} +1 -1
  24. package/apps/web/dist/assets/{api-BC3K8Na8.js → api-Bf-l9Sd8.js} +1 -1
  25. package/apps/web/dist/assets/changelog-CFeEzKqb.js +1 -0
  26. package/apps/web/dist/assets/chevron-down-DymW-2BP.js +1 -0
  27. package/apps/web/dist/assets/globe-ffVj8XwO.js +1 -0
  28. package/apps/web/dist/assets/index-B8n2AYO0.css +1 -0
  29. package/apps/web/dist/assets/index-BR5ELbeZ.js +10 -0
  30. package/apps/web/dist/assets/lock-CzNXAYdi.js +1 -0
  31. package/apps/web/dist/assets/meta-CKE9QceT.js +1 -0
  32. package/apps/web/dist/assets/{oss-credits-Hu4LieLA.js → oss-credits-C-U2Tlpn.js} +1 -1
  33. package/apps/web/dist/assets/outputs-CsESg-Eg.js +69 -0
  34. package/apps/web/dist/assets/{session-_w8H5O_d.js → session-C7LDDcj7.js} +1 -1
  35. package/apps/web/dist/assets/trash-0IafyhZB.js +1 -0
  36. package/apps/web/dist/assets/type-BqbppSsp.js +1 -0
  37. package/apps/web/dist/assets/ui-BT0Y_Hci.js +1 -0
  38. package/apps/web/dist/assets/wand-sparkles-Clj3VRB5.js +1 -0
  39. package/apps/web/dist/index.html +5 -6
  40. package/apps/web/dist/mcp/flow.html +2 -2
  41. package/package.json +2 -1
  42. package/apps/web/dist/assets/Account-BKribBzW.js +0 -1
  43. package/apps/web/dist/assets/ChatPanel-Cnd_dfF2.js +0 -1
  44. package/apps/web/dist/assets/EditorPage-BjFAF_4T.js +0 -2
  45. package/apps/web/dist/assets/HomePage-F04N9Y1Q.js +0 -1
  46. package/apps/web/dist/assets/NewWizardPage-DumPEWtE.js +0 -2
  47. package/apps/web/dist/assets/PublicRunner-CllgpTeL.js +0 -1
  48. package/apps/web/dist/assets/RunnerView-adkYnOSi.js +0 -2
  49. package/apps/web/dist/assets/SettingsPage-7EG_dMSP.js +0 -2
  50. package/apps/web/dist/assets/changelog-C0GmxRP2.js +0 -1
  51. package/apps/web/dist/assets/index-CJ3iuK8-.js +0 -10
  52. package/apps/web/dist/assets/index-mpjxO44v.css +0 -1
  53. package/apps/web/dist/assets/meta-BeYxDfVN.js +0 -1
  54. package/apps/web/dist/assets/outputs-DLmQMIUm.js +0 -69
  55. package/apps/web/dist/assets/plug-CLjyCoHB.js +0 -1
  56. package/apps/web/dist/assets/type-DnfgUhpM.js +0 -1
  57. package/apps/web/dist/assets/ui-Cj3EzOCA.js +0 -1
  58. package/apps/web/dist/assets/wand-sparkles-CKxArWPY.js +0 -1
@@ -11,12 +11,12 @@ import { brandColorSchema, ownedProject, updateProject } from "../services/proje
11
11
  import { safeFetch } from "../tools/net-guard.js";
12
12
  import { readWebsite } from "./website.js";
13
13
  const MAX_STEPS = 24;
14
- const SYSTEM = `You help the admin of "engenty wizards" set up a PROJECT: what every wizard of the project draws on — who they are (title, about), the brand (logos, colours), assets (images, graphics, videos), documents, and facts (label → value: address, VAT id, phone, opening hours — anything).
14
+ const SYSTEM = `You help the admin of "engenty wizards" set up a SPACE: what every wizard of the space draws on — who they are (title, about), the brand (logos, colours), assets (images, graphics, videos), documents, and facts (label → value: address, VAT id, phone, opening hours — anything).
15
15
 
16
- You talk to the admin. Answer in the admin's language, briefly and warmly. Never mention JSON, ids, keys or tool names.
16
+ You talk to the admin. Answer in the admin's language, briefly and warmly. Never mention JSON, ids, keys or tool names. Call it a space (German „Space“), never a project: the tools say project, the app says space.
17
17
 
18
18
  HOW YOU WORK
19
- - The project as it is now comes with every message. You change it ONLY through tools.
19
+ - The space as it is now comes with every message. You change it ONLY through tools.
20
20
  - A website: read_website it first. You get the page's text, colours from its stylesheet, logo candidates and the links to imprint / contact / about. Read those pages too (at most four more) for address, VAT id, register number, phone, email, bank details, who runs it.
21
21
  - Facts: one fact per thing, a short label in the admin's language ("Adresse", "UID", "Telefon"), the value on one line where it fits. Only what a source or the admin states — never guess, never invent. Keep the facts that are there; a fact with a known label is updated.
22
22
  - About: two to five sentences — what they do, for whom, what sets them apart, the tone they write in. Rewrite it only when you learned something new or the admin asks.
@@ -218,10 +218,15 @@ if (existsSync(webDir)) {
218
218
  }
219
219
  const html = await readFile(join(webDir, "index.html"), "utf8");
220
220
  const preview = await previewFor(c.req.path).catch(() => null);
221
- // A wizard's link installs as that wizard: its own name and start address on the home screen.
221
+ // A wizard's link installs as that wizard: its own name, start address and icon on the home
222
+ // screen; a bookmark keeps its engenty too.
222
223
  const token = c.req.path.match(/^\/w\/([A-Za-z0-9_-]{6,64})(?:\/|$)/)?.[1];
224
+ const own = `${basePath}/api/public/wizards/${token}`;
223
225
  const page = token
224
- ? html.replace(/href="[^"]*manifest\.webmanifest"/, `href="${basePath}/api/public/wizards/${token}/manifest.webmanifest"`)
226
+ ? html
227
+ .replace(/href="[^"]*manifest\.webmanifest"/, `href="${own}/manifest.webmanifest"`)
228
+ .replace(/<link rel="apple-touch-icon"[^>]*>/, `<link rel="apple-touch-icon" href="${own}/icons/apple-touch-icon.png" />`)
229
+ .replace(/<link rel="icon"[^>]*>/, `<link rel="icon" href="${own}/icons/favicon.png" type="image/png" />`)
225
230
  : html;
226
231
  return c.html(preview
227
232
  ? page.replace(/<title>[^<]*<\/title>/, "").replace("</head>", `${preview}\n</head>`)
@@ -3,8 +3,10 @@ import { basePath } from "../env.js";
3
3
  export function uploadLimit(mime) {
4
4
  return mime.startsWith("video/") ? 40_000_000 : 15_000_000;
5
5
  }
6
- export function wizardManifest(token, title, description) {
6
+ /** `version`: the published one, so a new engenty or name reaches icons a phone has kept. */
7
+ export function wizardManifest(token, title, description, version = 0) {
7
8
  const start = `${basePath}/w/${token}`;
9
+ const icon = (file) => `${basePath}/api/public/wizards/${token}/icons/${file}?v=${version}`;
8
10
  return {
9
11
  id: start,
10
12
  name: title,
@@ -16,20 +18,10 @@ export function wizardManifest(token, title, description) {
16
18
  background_color: "#faf8f5",
17
19
  theme_color: "#faf8f5",
18
20
  icons: [
21
+ { src: icon("icon-192.png"), sizes: "192x192", type: "image/png", purpose: "any" },
22
+ { src: icon("icon-512.png"), sizes: "512x512", type: "image/png", purpose: "any" },
19
23
  {
20
- src: `${basePath}/studio/icons/icon-192.png`,
21
- sizes: "192x192",
22
- type: "image/png",
23
- purpose: "any",
24
- },
25
- {
26
- src: `${basePath}/studio/icons/icon-512.png`,
27
- sizes: "512x512",
28
- type: "image/png",
29
- purpose: "any",
30
- },
31
- {
32
- src: `${basePath}/studio/icons/icon-maskable-512.png`,
24
+ src: icon("icon-maskable-512.png"),
33
25
  sizes: "512x512",
34
26
  type: "image/png",
35
27
  purpose: "maskable",
@@ -26,6 +26,7 @@ import { runTicketValid, verifySignedUrl } from "../secrets/signing.js";
26
26
  import { brandView } from "../services/brand.js";
27
27
  import { ServiceError } from "../services/errors.js";
28
28
  import { sharedRun, shareImage, shareRun, shareView, unshareRun } from "../services/shares.js";
29
+ import { isIconFile, wizardIcon } from "../services/wizard-icon.js";
29
30
  import { clearStore, deleteRows, listRows, listSecrets, readStoreFile, StoreError, saveRows, scopeOf, storeFiles, updateRow, } from "../store/index.js";
30
31
  import { tenantOfLink, tenantOfRun, tenantStatus, tokenOfCode, visitorOverLimit, } from "../tenants/control.js";
31
32
  import { byteRange, uploadLimit, wizardManifest } from "./delivery.js";
@@ -250,10 +251,36 @@ export const publicRoutes = new Hono()
250
251
  where: and(eq(schema.wizardVersion.wizardId, w.id), eq(schema.wizardVersion.version, w.publishedVersion)),
251
252
  });
252
253
  const def = version.definition;
253
- return c.body(JSON.stringify(wizardManifest(w.shareToken, def.title, def.description)), 200, {
254
+ const manifest = wizardManifest(w.shareToken, def.title, def.description, w.publishedVersion);
255
+ return c.body(JSON.stringify(manifest), 200, {
254
256
  "content-type": "application/manifest+json; charset=utf-8",
255
257
  "cache-control": "public, max-age=300",
256
258
  });
259
+ })
260
+ // Its icon: the wizard's engenty on its hue with its name; the studio's where none can be drawn.
261
+ .get("/wizards/:token/icons/:file", async (c) => {
262
+ const file = c.req.param("file");
263
+ if (!isIconFile(file)) {
264
+ return c.notFound();
265
+ }
266
+ const w = await db.query.wizard.findFirst({
267
+ where: eq(schema.wizard.shareToken, c.req.param("token")),
268
+ });
269
+ if (!w || w.publishedVersion === null) {
270
+ return c.notFound();
271
+ }
272
+ const version = await db.query.wizardVersion.findFirst({
273
+ where: and(eq(schema.wizardVersion.wizardId, w.id), eq(schema.wizardVersion.version, w.publishedVersion)),
274
+ });
275
+ const def = version.definition;
276
+ const png = await wizardIcon(file, def.avatar, def.title);
277
+ if (!png) {
278
+ return c.redirect(`${basePath}/studio/${file === "favicon.png" ? "favicon.svg" : `icons/${file}`}`);
279
+ }
280
+ return c.body(png, 200, {
281
+ "content-type": "image/png",
282
+ "cache-control": "public, max-age=3600",
283
+ });
257
284
  })
258
285
  .get("/logos/:id", async (c) => {
259
286
  const found = await loadAsset(c.req.param("id"));
@@ -0,0 +1,71 @@
1
+ // Written by apps/mobile/scripts/engenty-shapes.tsx from apps/web/src/engenty — do not edit by hand.
2
+ export const ENGENTY_KINDS = ["round", "drop", "dome", "flame", "oval", "bean", "pebble", "sprout", "tower", "wedge"];
3
+ /** Each kind's fill in oklch, as the web writes it: the stage of a wizard takes its hue. */
4
+ export const ENGENTY_FILL_OKLCH = {
5
+ "round": "oklch(60% 0.23 262)",
6
+ "drop": "oklch(82% 0.17 78)",
7
+ "dome": "oklch(72% 0.22 145)",
8
+ "flame": "oklch(64% 0.25 18)",
9
+ "oval": "oklch(70% 0.21 42)",
10
+ "bean": "oklch(74% 0.16 192)",
11
+ "pebble": "oklch(66% 0.13 235)",
12
+ "sprout": "oklch(89% 0.2 118)",
13
+ "tower": "oklch(60% 0.25 300)",
14
+ "wedge": "oklch(65% 0.28 345)"
15
+ };
16
+ /** Still SVG, 120 × 120. */
17
+ export const ENGENTY_SVG = {
18
+ "round": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#2873ff\" d=\"M60 22 Q96 26 96 62 Q96 96 60 100 Q24 96 24 62 Q24 26 60 22 Z\"></path><circle cx=\"97\" cy=\"34\" fill=\"#2873ff\" opacity=\"0.5\" r=\"6\"></circle><circle cx=\"106\" cy=\"24\" fill=\"#2873ff\" opacity=\"0.35\" r=\"3.5\"></circle><g><ellipse cx=\"68\" cy=\"58\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"68\" cy=\"59\" fill=\"#000e34\" r=\"3.84\"></circle><circle cx=\"66\" cy=\"55.6\" fill=\"#fff\" r=\"1.44\"></circle></g></g></svg>",
19
+ "drop": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#ffb407\" d=\"M60 16 Q90 34 90 66 Q90 96 60 98 Q30 96 30 66 Q30 34 60 16 Z\"></path><g><ellipse cx=\"60\" cy=\"56\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"60\" cy=\"57\" fill=\"#501c00\" r=\"3.84\"></circle><circle cx=\"58\" cy=\"53.6\" fill=\"#fff\" r=\"1.44\"></circle></g><path d=\"M48 76 Q54 72 60 76 Q66 80 72 76\" fill=\"none\" stroke=\"#511a00\" stroke-linecap=\"round\" stroke-width=\"2.6\"></path></g></svg>",
20
+ "dome": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#19c63c\" d=\"M60 20 Q92 30 92 70 Q92 96 60 96 Q28 96 28 70 Q28 30 60 20 Z\"></path><path d=\"M46 90 L46 80 M60 92 L60 82 M74 90 L74 80\" opacity=\"0.5\" stroke=\"#003610\" stroke-linecap=\"round\" stroke-width=\"2.4\"></path><circle cx=\"60\" cy=\"6\" fill=\"#19c63c\" r=\"3\"></circle><g><ellipse cx=\"60\" cy=\"54\" fill=\"#fff\" rx=\"8.5\" ry=\"9.774999999999999\"></ellipse><circle cx=\"60\" cy=\"55\" fill=\"#001602\" r=\"4.08\"></circle><circle cx=\"57.875\" cy=\"51.45\" fill=\"#fff\" r=\"1.53\"></circle></g></g></svg>",
21
+ "flame": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#ff154f\" d=\"M60 14 Q84 44 80 76 Q78 98 60 98 Q42 98 40 76 Q36 44 60 14 Z\"></path><path d=\"M40 20 Q60 6 80 20\" fill=\"none\" opacity=\"0.55\" stroke=\"#ff154f\" stroke-linecap=\"round\" stroke-width=\"3\"></path><g><ellipse cx=\"60\" cy=\"62\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"60\" cy=\"63\" fill=\"#3d0007\" r=\"3.84\"></circle><circle cx=\"58\" cy=\"59.6\" fill=\"#fff\" r=\"1.44\"></circle></g><circle cx=\"60\" cy=\"82\" fill=\"#3d0007\" r=\"2.6\"></circle></g></svg>",
22
+ "oval": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#ff6404\" d=\"M60 34 Q100 38 100 64 Q100 92 60 94 Q20 92 20 64 Q20 38 60 34 Z\"></path><g fill=\"none\" opacity=\"0.45\" stroke=\"#8a0700\" stroke-width=\"2.2\"><path d=\"M28 54 Q60 48 92 54\"></path><path d=\"M26 70 Q60 64 94 70\"></path></g><g><ellipse cx=\"66\" cy=\"58\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"66\" cy=\"59\" fill=\"#430000\" r=\"3.84\"></circle><circle cx=\"64\" cy=\"55.6\" fill=\"#fff\" r=\"1.44\"></circle></g></g></svg>",
23
+ "bean": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#00c9c5\" d=\"M48 96 Q24 92 26 68 Q28 44 52 38 Q78 32 88 50 Q98 66 84 84 Q70 100 48 96 Z\"></path><circle cx=\"32\" cy=\"94\" fill=\"#00c9c5\" opacity=\"0.4\" r=\"4\"></circle><g><ellipse cx=\"70\" cy=\"58\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"70\" cy=\"59\" fill=\"#001a1f\" r=\"3.84\"></circle><circle cx=\"68\" cy=\"55.6\" fill=\"#fff\" r=\"1.44\"></circle></g></g></svg>",
24
+ "pebble": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#259ed6\" d=\"M60 96 Q20 96 18 78 Q16 60 46 56 Q78 52 98 62 Q110 72 104 86 Q98 96 60 96 Z\"></path><g fill=\"#163045\" opacity=\"0.32\"><circle cx=\"42\" cy=\"76\" r=\"3\"></circle><circle cx=\"56\" cy=\"86\" r=\"2.2\"></circle><circle cx=\"86\" cy=\"80\" r=\"2.6\"></circle></g><g><ellipse cx=\"68\" cy=\"72\" fill=\"#fff\" rx=\"7.5\" ry=\"8.625\"></ellipse><circle cx=\"68\" cy=\"73\" fill=\"#00182f\" r=\"3.5999999999999996\"></circle><circle cx=\"66.125\" cy=\"69.75\" fill=\"#fff\" r=\"1.3499999999999999\"></circle></g></g></svg>",
25
+ "sprout": "<svg viewBox=\"0 0 120 120\"><g><g fill=\"#d0eb24\"><ellipse cx=\"48\" cy=\"34\" rx=\"6\" ry=\"10\"></ellipse><ellipse cx=\"72\" cy=\"32\" rx=\"5.5\" ry=\"9\"></ellipse></g><path fill=\"#d0eb24\" d=\"M60 100 Q28 98 28 72 Q28 46 60 44 Q92 46 92 72 Q92 98 60 100 Z\"></path><g><ellipse cx=\"60\" cy=\"68\" fill=\"#fff\" rx=\"8.5\" ry=\"9.774999999999999\"></ellipse><circle cx=\"60\" cy=\"69\" fill=\"#242100\" r=\"4.08\"></circle><circle cx=\"57.875\" cy=\"65.45\" fill=\"#fff\" r=\"1.53\"></circle></g></g></svg>",
26
+ "tower": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#9b48fb\" d=\"M60 102 Q36 100 38 78 Q40 58 42 44 Q44 26 60 24 Q76 26 78 44 Q80 58 82 78 Q84 100 60 102 Z\"></path><g fill=\"none\" opacity=\"0.4\" stroke=\"#37164e\" stroke-linecap=\"round\" stroke-width=\"2.2\"><path d=\"M42 74 Q60 70 78 74\"></path><path d=\"M40 88 Q60 84 80 88\"></path></g><g><ellipse cx=\"60\" cy=\"52\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"60\" cy=\"53\" fill=\"#210434\" r=\"3.84\"></circle><circle cx=\"58\" cy=\"49.6\" fill=\"#fff\" r=\"1.44\"></circle></g></g></svg>",
27
+ "wedge": "<svg viewBox=\"0 0 120 120\"><g><path fill=\"#f800b5\" d=\"M60 30 Q74 40 86 70 Q96 92 78 98 Q60 102 42 98 Q24 92 34 70 Q46 40 60 30 Z\"></path><path d=\"M52 22 Q60 14 68 22\" fill=\"none\" opacity=\"0.5\" stroke=\"#f800b5\" stroke-linecap=\"round\" stroke-width=\"3\"></path><g><ellipse cx=\"60\" cy=\"70\" fill=\"#fff\" rx=\"8\" ry=\"9.2\"></ellipse><circle cx=\"60\" cy=\"71\" fill=\"#370025\" r=\"3.84\"></circle><circle cx=\"58\" cy=\"67.6\" fill=\"#fff\" r=\"1.44\"></circle></g></g></svg>"
28
+ };
29
+ /** The line each kind stands on (`cy`) and its shadow's half width, in the same 120 × 120. */
30
+ export const ENGENTY_SHADOW = {
31
+ "round": {
32
+ "cy": 108,
33
+ "rx": 26
34
+ },
35
+ "drop": {
36
+ "cy": 106,
37
+ "rx": 24
38
+ },
39
+ "dome": {
40
+ "cy": 104,
41
+ "rx": 27
42
+ },
43
+ "flame": {
44
+ "cy": 106,
45
+ "rx": 22
46
+ },
47
+ "oval": {
48
+ "cy": 102,
49
+ "rx": 32
50
+ },
51
+ "bean": {
52
+ "cy": 102,
53
+ "rx": 26
54
+ },
55
+ "pebble": {
56
+ "cy": 102,
57
+ "rx": 34
58
+ },
59
+ "sprout": {
60
+ "cy": 106,
61
+ "rx": 26
62
+ },
63
+ "tower": {
64
+ "cy": 108,
65
+ "rx": 20
66
+ },
67
+ "wedge": {
68
+ "cy": 106,
69
+ "rx": 28
70
+ }
71
+ };
@@ -0,0 +1,145 @@
1
+ import { ENGENTY_FILL_OKLCH, ENGENTY_SHADOW, ENGENTY_SVG, } from "./engenty-shapes.js";
2
+ /**
3
+ * The files a wizard's app icon comes as: the manifest's, the one an iPhone puts on its home
4
+ * screen, and the favicon a bookmark keeps. `safe`: the share of the square the picture may use;
5
+ * a maskable icon is cut to a circle, a squircle or a drop by the phone.
6
+ */
7
+ const ICON_FILES = {
8
+ "icon-192.png": { size: 192, safe: 1 },
9
+ "icon-512.png": { size: 512, safe: 1 },
10
+ "icon-maskable-512.png": { size: 512, safe: 0.72 },
11
+ "apple-touch-icon.png": { size: 180, safe: 1 },
12
+ "favicon.png": { size: 64, safe: 1 },
13
+ };
14
+ export const isIconFile = (file) => Object.hasOwn(ICON_FILES, file);
15
+ /** Below this the name is noise: a favicon is the engenty alone. */
16
+ const LABEL_FROM = 128;
17
+ /** oklch as the web writes it → hex for the canvas, out-of-gamut clipped to sRGB. */
18
+ function oklchHex(l, c, h) {
19
+ const rad = (h * Math.PI) / 180;
20
+ const a = c * Math.cos(rad);
21
+ const b = c * Math.sin(rad);
22
+ const l_ = (l + 0.396_337_777_4 * a + 0.215_803_757_3 * b) ** 3;
23
+ const m_ = (l - 0.105_561_345_8 * a - 0.063_854_172_8 * b) ** 3;
24
+ const s_ = (l - 0.089_484_177_5 * a - 1.291_485_548 * b) ** 3;
25
+ const rgb = [
26
+ 4.076_741_662_1 * l_ - 3.307_711_591_3 * m_ + 0.230_969_929_2 * s_,
27
+ -1.268_438_004_6 * l_ + 2.609_757_401_1 * m_ - 0.341_319_396_5 * s_,
28
+ -0.004_196_086_3 * l_ - 0.703_418_614_7 * m_ + 1.707_614_701 * s_,
29
+ ];
30
+ const byte = (x) => {
31
+ const v = Math.min(1, Math.max(0, x));
32
+ const g = v <= 0.003_130_8 ? 12.92 * v : 1.055 * v ** (1 / 2.4) - 0.055;
33
+ return Math.round(g * 255)
34
+ .toString(16)
35
+ .padStart(2, "0");
36
+ };
37
+ return `#${rgb.map(byte).join("")}`;
38
+ }
39
+ /**
40
+ * The ground in the engenty's hue: a pale tint, so the engenty in its own full colour stands out
41
+ * on it, lit from above; the name in the deep shade of the dark theme's stage.
42
+ */
43
+ function palette(kind) {
44
+ const m = ENGENTY_FILL_OKLCH[kind].match(/oklch\(([\d.]+)%\s+([\d.]+)\s+([\d.]+)\)/);
45
+ const c = Number(m?.[2] ?? 0.23);
46
+ const h = Number(m?.[3] ?? 262);
47
+ return {
48
+ top: oklchHex(0.97, c * 0.1, h),
49
+ bottom: oklchHex(0.9, c * 0.2, h),
50
+ ink: oklchHex(0.34, c * 0.6, h),
51
+ };
52
+ }
53
+ /**
54
+ * The engenty in the 120 × 120 of the shapes, `scale` of it, its feet on its shadow. A favicon is
55
+ * the engenty alone, as large as it goes: the tab or bookmark list it sits in is the ground.
56
+ */
57
+ function engentySvg(kind, labelled, safe, size) {
58
+ const inner = ENGENTY_SVG[kind].replace(/^<svg[^>]*>/, "").replace(/<\/svg>$/, "");
59
+ const open = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="${size}" height="${size}">`;
60
+ if (size < LABEL_FROM) {
61
+ return `${open}${inner}</svg>`;
62
+ }
63
+ const { top, bottom } = palette(kind);
64
+ const shadow = ENGENTY_SHADOW[kind];
65
+ // With a name below, the engenty moves up and gives it the lower fifth.
66
+ const scale = (labelled ? 0.74 : 0.88) * safe;
67
+ const s = 120 * scale;
68
+ const x = (120 - s) / 2;
69
+ const y = labelled ? 60 - 46 * safe - 0.08 * s : (120 - s) / 2 - 1.5 * scale;
70
+ return `${open}<defs><linearGradient id="bg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="${top}"/><stop offset="1" stop-color="${bottom}"/></linearGradient></defs><rect width="120" height="120" fill="url(#bg)"/><g transform="translate(${x} ${y}) scale(${scale})"><ellipse cx="60" cy="${shadow.cy}" rx="${shadow.rx}" ry="4.5" fill="#000" opacity="0.14"/>${inner}</g></svg>`;
71
+ }
72
+ /**
73
+ * The name in capitals, as many whole words as fit; a lone long word gets a smaller font, then
74
+ * an ellipsis. A cut never ends on a short filler word ("aus", "für").
75
+ */
76
+ export function iconLabel(title, width, px, ctx, font) {
77
+ const words = title.toLocaleUpperCase("de-DE").split(/\s+/).filter(Boolean);
78
+ const fits = (text, size) => {
79
+ ctx.font = font(size);
80
+ return ctx.measureText(text).width <= width;
81
+ };
82
+ let kept = 0;
83
+ while (kept < words.length && fits(words.slice(0, kept + 1).join(" "), px)) {
84
+ kept += 1;
85
+ }
86
+ while (kept > 1 && kept < words.length && words[kept - 1].length <= 3) {
87
+ kept -= 1;
88
+ }
89
+ if (kept > 0) {
90
+ return { text: words.slice(0, kept).join(" "), px };
91
+ }
92
+ const first = words[0] ?? "";
93
+ for (let size = px; size >= px * 0.7; size -= 1) {
94
+ if (fits(first, size)) {
95
+ return { text: first, px: size };
96
+ }
97
+ }
98
+ const small = Math.ceil(px * 0.7);
99
+ let cut = first;
100
+ while (cut.length > 1 && !fits(`${cut}…`, small)) {
101
+ cut = cut.slice(0, -1);
102
+ }
103
+ return { text: `${cut}…`, px: small };
104
+ }
105
+ const FONT = (px) => `700 ${px}px Inter, "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif`;
106
+ const drawn = new Map();
107
+ /**
108
+ * A wizard's app icon: its engenty on a pale ground of its hue, the name in small capitals below. `null` where
109
+ * the canvas cannot load (a platform without its binary); the studio's icon stands in then.
110
+ */
111
+ export async function wizardIcon(file, avatar, title) {
112
+ const kind = Object.hasOwn(ENGENTY_SVG, avatar) ? avatar : "round";
113
+ const key = `${file}|${kind}|${title}`;
114
+ const known = drawn.get(key);
115
+ if (known) {
116
+ return known;
117
+ }
118
+ const { size, safe } = ICON_FILES[file];
119
+ const labelled = size >= LABEL_FROM && title.trim().length > 0;
120
+ let png;
121
+ try {
122
+ const { createCanvas, loadImage } = await import("@napi-rs/canvas");
123
+ const canvas = createCanvas(size, size);
124
+ const ctx = canvas.getContext("2d");
125
+ ctx.drawImage(await loadImage(Buffer.from(engentySvg(kind, labelled, safe, size))), 0, 0, size, size);
126
+ if (labelled) {
127
+ const u = size / 120;
128
+ const label = iconLabel(title, 94 * safe * u, Math.round(7.4 * safe * u), ctx, FONT);
129
+ ctx.font = FONT(label.px);
130
+ ctx.letterSpacing = `${(label.px * 0.06).toFixed(2)}px`;
131
+ ctx.textAlign = "center";
132
+ ctx.fillStyle = palette(kind).ink;
133
+ ctx.fillText(label.text, size / 2, (60 + 44 * safe) * u);
134
+ }
135
+ png = new Uint8Array(await canvas.encode("png"));
136
+ }
137
+ catch {
138
+ return null;
139
+ }
140
+ if (drawn.size >= 300) {
141
+ drawn.delete(drawn.keys().next().value);
142
+ }
143
+ drawn.set(key, png);
144
+ return png;
145
+ }
@@ -0,0 +1 @@
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{c as r,j as i,n as a,nt as o}from"./api-Bf-l9Sd8.js";import{f as s,t as c}from"./session-C7LDDcj7.js";import{t as l}from"./createLucideIcon-q3MZMmnf.js";import{t as u}from"./check-CUpby_J9.js";import{n as d,r as f}from"./upload-DNRENWzQ.js";import{t as p}from"./external-link-MAL7vJYj.js";import{_ as m,c as h,d as g,h as _,m as ee,n as v,o as y,r as b,s as x,t as S,y as C}from"./ui-BT0Y_Hci.js";import{_ as w,b as T,c as E,d as D,i as O,u as k}from"./index-BR5ELbeZ.js";import{r as A}from"./LocalRuntime-C199bg_B.js";var j={name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]};j.node;var M=l(j),N={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};N.node;var P=l(N),F={name:`list`,size:24,node:[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]};F.node;var I=l(F),L=e(t(),1),R=e=>[`project-files`,e];function z(e){return i({queryKey:R(e),queryFn:()=>a.get(`/api/studio/projects/${e}/files`),refetchInterval:e=>e.state.data?.files.some(e=>e.status===`pending`)?2e3:!1})}function B(e,t){return r(`/api/studio/projects/${e}/files/${t}/content`)}function V(e,t=!1){let n=o(),[r,i]=(0,L.useState)(!1),[s,c]=(0,L.useState)(null),l=()=>n.invalidateQueries({queryKey:R(e)}),u=async e=>{c(null);try{await e()}catch(e){c(e.message)}finally{await l()}};return{busy:r,error:s,readOnly:t,upload:async(t,n)=>{i(!0),await u(async()=>{for(let r of n)await a.upload(`/api/studio/projects/${e}/files?kind=${t}`,r),await l()}),i(!1)},describe:(t,n)=>u(()=>a.patch(`/api/studio/projects/${e}/files/${t}`,{description:n})),remove:t=>u(()=>a.del(`/api/studio/projects/${e}/files/${t}`)),reindex:t=>u(()=>a.post(`/api/studio/projects/${e}/files/${t}/reindex`)),order:(t,n)=>u(()=>a.put(`/api/studio/projects/${e}/files/order`,{kind:t,ids:n}))}}function H(e,t){let n=`wz.layout.${e}`,[r,i]=(0,L.useState)(()=>{try{let e=localStorage.getItem(n);return e===`list`||e===`cards`?e:t}catch{return t}});return[r,()=>i(e=>{let t=e===`list`?`cards`:`list`;try{localStorage.setItem(n,t)}catch{}return t})]}function U(e,t,n=700){let[r,i]=(0,L.useState)(`idle`),[a,o]=(0,L.useState)(null),s=JSON.stringify(e),c=(0,L.useRef)(s),l=(0,L.useRef)({value:e,json:s,save:t});l.current={value:e,json:s,save:t};let u=(0,L.useRef)(Promise.resolve()),d=(0,L.useCallback)(()=>{let e=l.current;e.json!==c.current&&(c.current=e.json,i(`saving`),u.current=u.current.then(async()=>{try{await e.save(e.value),o(null),i(`saved`)}catch(e){c.current=``,o(e.message),i(`error`)}}))},[]);return(0,L.useEffect)(()=>{if(s===c.current)return;let e=setTimeout(d,n);return()=>clearTimeout(e)},[s,n,d]),(0,L.useEffect)(()=>d,[d]),{state:r,error:a}}function W(e){return e<1e6?`${Math.max(1,Math.round(e/1e3))} KB`:`${(e/1e6).toFixed(1)} MB`}var G=e(n(),1);function K({title:e,hint:t,save:n,action:r,locked:i,children:a}){return(0,G.jsxs)(`section`,{className:`flex flex-col gap-2.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-1`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`h2`,{className:`font-display font-semibold text-lg leading-tight`,children:e}),n?.state===`saving`?(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[12px] text-ink-3`,children:[(0,G.jsx)(g,{className:`size-3`}),` `,C(`project.saving`)]}):n?.state===`saved`?(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[12px] text-moss`,children:[(0,G.jsx)(u,{className:`size-3.5`}),` `,C(`settings.saved`)]}):null]}),t?(0,G.jsx)(`p`,{className:`mt-1 text-[14px] text-ink-3 leading-snug`,children:t}):null]}),r?(0,G.jsx)(`div`,{className:`shrink-0`,children:r}):null]}),(0,G.jsxs)(v,{className:`p-5`,children:[i?(0,G.jsx)(`fieldset`,{disabled:!0,className:`min-w-0`,children:a}):a,n?.state===`error`&&n.error?(0,G.jsx)(`p`,{className:`mt-4 text-[14px] text-rose`,children:n.error}):null]})]})}function q({children:e,layout:t,onToggle:n}){return(0,G.jsxs)(`div`,{className:`mb-3 flex items-start gap-2`,children:[(0,G.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,G.jsx)(`div`,{className:`w-56 max-w-full transition-[width] duration-200 focus-within:w-full has-[input:not(:placeholder-shown)]:w-full`,children:e})}),(0,G.jsx)(y,{label:C(t===`list`?`project.viewCards`:`project.viewList`),onClick:n,children:t===`list`?(0,G.jsx)(P,{className:`size-4`}):(0,G.jsx)(I,{className:`size-4`})})]})}function J({value:e,onChange:t,onEnter:n,placeholder:r,busy:i}){return(0,G.jsxs)(`div`,{className:`relative`,children:[(0,G.jsx)(d,{className:`-translate-y-1/2 pointer-events-none absolute top-1/2 left-3 size-4 text-ink-4`}),(0,G.jsx)(`input`,{type:`search`,value:e,placeholder:r,onChange:e=>t(e.target.value),onKeyDown:e=>e.key===`Enter`&&n?.(),className:`h-9 w-full rounded-lg border border-input bg-card pr-3 pl-9 text-[14px] text-ink outline-none transition placeholder:text-ink-4 focus:border-focus focus:ring-4 focus:ring-focus-glow`}),i?(0,G.jsx)(g,{className:`-translate-y-1/2 absolute top-1/2 right-3 size-4 text-ink-3`}):null]})}function Y({onFiles:e,accept:t,multiple:n=!0,className:r,children:i}){return(0,G.jsxs)(`label`,{onDragOver:e=>{e.preventDefault(),e.currentTarget.dataset.over=`1`},onDragLeave:e=>{delete e.currentTarget.dataset.over},onDrop:t=>{t.preventDefault(),delete t.currentTarget.dataset.over;let r=Array.from(t.dataTransfer.files);r.length&&e(n?r:r.slice(0,1))},className:_(`flex cursor-pointer items-center justify-center gap-2 rounded-lg border border-input border-dashed text-[14px] text-ink-3 transition focus-within:border-focus focus-within:ring-4 focus-within:ring-focus-glow hover:border-ink-4 hover:text-ink data-[over]:border-focus data-[over]:bg-paper-2 data-[over]:text-ink`,r),children:[i,(0,G.jsx)(`input`,{className:`sr-only`,type:`file`,accept:t,multiple:n,onChange:t=>{let n=Array.from(t.target.files??[]);t.target.value=``,n.length&&e(n)}})]})}var X=`mt-1.5 text-[13px] text-ink-3`;function Z(e){let t=o(),[n,r]=(0,L.useState)(!1),i=s({mutationFn:e=>a.post(`/api/studio/account/link`,e),onSuccess:({url:e})=>{A(e),r(!0)}});return(0,L.useEffect)(()=>{if(!n)return;let e=setInterval(()=>void t.invalidateQueries({queryKey:[`me`]}),2e3),i=setTimeout(()=>r(!1),3e5);return()=>{clearInterval(e),clearTimeout(i)}},[n,t]),(0,L.useEffect)(()=>{e&&r(!1)},[e]),{link:i,waiting:n}}function Q({link:e,waiting:t}){return e.isError?(0,G.jsx)(`p`,{className:`text-[13px] text-rose`,children:C(`local.accountFailed`)}):t?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] text-ink-3`,children:[(0,G.jsx)(g,{className:`size-3.5`}),` `,C(`local.accountWaiting`)]}):null}function te(){let e=Z(!1),{link:t}=e,[n,r]=(0,L.useState)(``);return(0,G.jsxs)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:[(0,G.jsxs)(`div`,{className:`flex items-start gap-4 py-5 first:pt-0 last:pb-0`,children:[(0,G.jsx)(`div`,{className:`flex size-11 shrink-0 items-center justify-center rounded-full bg-paper-2 text-ink-2`,children:(0,G.jsx)(M,{className:`size-5`})}),(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`font-medium text-[15px]`,children:C(`account.local`)}),(0,G.jsx)(`p`,{className:`mt-1 text-[14px] text-ink-3 leading-relaxed`,children:C(`account.localText`)})]})]}),D.account?(0,G.jsxs)(`div`,{className:`flex flex-col gap-4 py-5 last:pb-0`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-medium text-[15px]`,children:C(`account.with`)}),(0,G.jsxs)(`ul`,{className:`mt-2 flex flex-col gap-2 text-[14px] text-ink-2 leading-snug`,children:[(0,G.jsxs)(`li`,{className:`flex items-start gap-2.5`,children:[(0,G.jsx)(f,{className:`mt-0.5 size-4 shrink-0 text-amber`}),C(`account.withCredits`)]}),(0,G.jsxs)(`li`,{className:`flex items-start gap-2.5`,children:[(0,G.jsx)(T,{className:`mt-0.5 size-4 shrink-0 text-cobalt`}),C(`account.withCloud`)]})]})]}),(0,G.jsx)(`div`,{children:(0,G.jsx)(S,{busy:t.isPending&&!t.variables?.signup,onClick:()=>t.mutate({}),children:C(`account.signIn`)})})]}):null,D.account?(0,G.jsxs)(`form`,{className:`flex flex-col gap-3 py-5 last:pb-0`,onSubmit:e=>{e.preventDefault(),t.mutate({signup:!0,code:n.trim()||void 0})},children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`font-medium text-[15px]`,children:C(`account.new`)}),(0,G.jsx)(`p`,{className:`mt-1 text-[14px] text-ink-3 leading-relaxed`,children:C(`account.newHint`)})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,G.jsx)(x,{value:n,maxLength:64,autoComplete:`off`,spellCheck:!1,placeholder:C(`account.code`),"aria-label":C(`account.code`),onChange:e=>r(e.target.value),className:`w-56 font-mono text-[14px]`}),(0,G.jsx)(S,{type:`submit`,variant:`secondary`,className:`h-11`,busy:t.isPending&&!!t.variables?.signup,children:C(`account.create`)})]}),(0,G.jsx)(Q,{...e})]}):null]})}var $={start:`account.kind.start`,monthly:`account.kind.monthly`,gift:`account.kind.gift`};function ne({account:e}){let t=o(),n=Z(e.signedIn),r=s({mutationFn:()=>a.del(`/api/studio/account`),onSuccess:()=>t.invalidateQueries({queryKey:[`me`]})}),i=new Intl.DateTimeFormat(m,{dateStyle:`medium`});return(0,G.jsxs)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-3 py-5 first:pt-0`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate font-medium text-[15px]`,children:e.name||e.email}),e.signedIn?(0,G.jsx)(b,{tone:`live`,children:C(`account.linked`)}):null]}),(0,G.jsx)(`div`,{className:`truncate text-[14px] text-ink-3`,children:e.email})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsxs)(S,{variant:`secondary`,onClick:()=>A(e.url),children:[C(`setup.openAccount`),` `,(0,G.jsx)(p,{className:`size-4`})]}),(0,G.jsxs)(S,{variant:`ghost`,busy:r.isPending,onClick:()=>r.mutate(),children:[(0,G.jsx)(w,{className:`size-4`}),` `,C(`nav.logout`)]})]})]}),e.signedIn?null:(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 py-5`,children:[(0,G.jsx)(`p`,{className:`text-[14px] text-ink-2`,children:C(`local.accountExpired`)}),(0,G.jsx)(`div`,{children:(0,G.jsx)(S,{busy:n.link.isPending,onClick:()=>n.link.mutate({}),children:C(`account.signInAgain`)})}),(0,G.jsx)(Q,{...n})]}),e.credits===null?null:(0,G.jsxs)(`div`,{className:`py-5`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-3`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`text-[13px] text-ink-3`,children:C(`account.credits`)}),(0,G.jsx)(`div`,{className:`font-display font-semibold text-[22px] tabular-nums leading-tight`,children:C(`nav.credits`,{n:Math.floor(e.credits).toLocaleString()})})]}),(0,G.jsxs)(S,{variant:`secondary`,onClick:()=>A(`${e.url}/billing`),children:[C(`account.topUp`),` `,(0,G.jsx)(p,{className:`size-4`})]})]}),e.expiring.length?(0,G.jsx)(`ul`,{className:`mt-3 flex flex-col gap-1 text-[13px] text-ink-3 tabular-nums`,children:e.expiring.map(e=>(0,G.jsxs)(`li`,{children:[C(`account.expires`,{n:Math.floor(e.credits).toLocaleString(),date:i.format(new Date(e.expiresAt))}),$[e.kind]?(0,G.jsxs)(`span`,{className:`text-ink-4`,children:[` · `,C($[e.kind])]}):null]},`${e.kind}:${e.expiresAt}`))}):null]}),(0,G.jsxs)(`div`,{className:`flex items-start gap-2.5 py-5 text-[14px] text-ink-2 leading-snug last:pb-0`,children:[(0,G.jsx)(T,{className:`mt-0.5 size-4 shrink-0 text-cobalt`}),(0,G.jsx)(`p`,{children:C(`account.cloud`,{host:O(e.cloudUrl)})})]})]})}function re({me:e,fromAccount:t}){let n=o(),[r,i]=(0,L.useState)(e.profile),s=e=>i(t=>({...t,...e})),l=U(r,async e=>{await a.put(`/api/studio/profile`,e),await n.invalidateQueries({queryKey:[`me`]})});return(0,G.jsx)(K,{title:C(`account.profile`),hint:C(`account.hint`),save:l,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-6 sm:flex-row sm:gap-8`,children:[(0,G.jsxs)(`div`,{className:`flex shrink-0 flex-col items-center gap-2 sm:w-32`,children:[(0,G.jsx)(`div`,{className:`flex size-20 items-center justify-center overflow-hidden rounded-full bg-ember-tint font-semibold text-[28px] text-ember-strong ring-1 ring-border-soft`,children:e.user.image?(0,G.jsx)(`img`,{src:e.user.image,alt:``,className:`size-full object-cover`}):c(r.name)||`?`}),(0,G.jsx)(`p`,{className:`text-center text-[12px] text-ink-3 leading-snug`,children:C(`account.initials`)})]}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-5`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(h,{children:C(`account.name`)}),(0,G.jsx)(x,{value:r.name,maxLength:80,disabled:t,onChange:e=>s({name:e.target.value})}),(0,G.jsx)(`p`,{className:X,children:C(t?`account.fromAccount`:`account.nameHint`)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(h,{children:C(`account.about`)}),(0,G.jsx)(ee,{minRows:3,maxLength:2e3,value:r.about,onChange:e=>s({about:e.target.value})}),(0,G.jsx)(`p`,{className:X,children:C(`account.aboutHint`)})]}),(0,G.jsxs)(`div`,{className:`grid gap-5 sm:grid-cols-2`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(h,{children:C(`account.email`)}),(0,G.jsx)(x,{type:`email`,value:r.email,maxLength:200,disabled:t,onChange:e=>s({email:e.target.value})})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(h,{children:C(`account.phone`)}),(0,G.jsx)(x,{type:`tel`,value:r.phone,maxLength:40,onChange:e=>s({phone:e.target.value})})]})]})]})]})})}function ie({me:e}){let t=e.mode===`managed`,n=t||!!e.account;return(0,G.jsxs)(`div`,{className:`flex flex-col gap-9`,children:[(0,G.jsx)(K,{title:C(`account.connection`),hint:C(`account.connectionHint`),children:t?(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate font-medium text-[15px]`,children:e.user.name}),(0,G.jsx)(b,{tone:`live`,children:C(`account.linked`)})]}),(0,G.jsx)(`div`,{className:`truncate text-[14px] text-ink-3`,children:e.user.email})]}),e.manageUrl?(0,G.jsxs)(S,{variant:`secondary`,onClick:()=>A(`${e.manageUrl}/account`),children:[C(`setup.openAccount`),` `,(0,G.jsx)(p,{className:`size-4`})]}):null]}):e.account?(0,G.jsx)(ne,{account:e.account}):(0,G.jsx)(te,{})}),(0,G.jsx)(re,{me:e,fromAccount:n},n?`account`:`own`),(0,G.jsx)(K,{title:C(`account.look`),hint:C(`account.lookHint`),children:(0,G.jsxs)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 pb-4`,children:[(0,G.jsx)(`span`,{className:`font-medium text-[14px]`,children:C(`nav.language`)}),(0,G.jsx)(k,{tone:`surface`})]}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-4 pt-4`,children:[(0,G.jsx)(`span`,{className:`font-medium text-[14px]`,children:C(`nav.theme`)}),(0,G.jsx)(E,{})]})]})})]})}export{q as a,W as c,V as d,H as f,Y as i,B as l,Q as n,J as o,z as p,Z as r,K as s,ie as t,U as u};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{a as i,d as a,h as o,i as s,s as c,y as l}from"./ui-Cj3EzOCA.js";var u=e(t(),1),d=e(n(),1);function f(e){switch(e.group){case`Added`:return{label:`NEW`,dot:`bg-moss`};case`Fixed`:return{label:`FIXED`,dot:`bg-amber`};case`Changed`:return{label:`CHANGED`,dot:`bg-cobalt`};case`Performance`:return{label:`PERFORMANCE`,dot:`bg-ember`};case`Deploy`:return{label:`DEPLOY`,dot:`bg-ink-4`};case`Docs`:return{label:`DOCS`,dot:`bg-ink-4`};default:return{label:`OTHER`,dot:`bg-ink-4`}}}var p=e=>e.version?e.version.replace(/^v/,``):l(`about.unreleased`),m=e=>e.timestamp?new Date(e.timestamp*1e3).toISOString().slice(0,10):``,h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=[];for(let t of e){if(`${p(t)} ${m(t)}`.toLowerCase().includes(n)){r.push(t);continue}let e=t.commits.filter(e=>`${f(e).label} ${e.scope??``} ${e.message}`.toLowerCase().includes(n));e.length>0&&r.push({...t,commits:e})}return r}function _({open:e,onClose:t}){let[n,_]=(0,u.useState)(null),[v,y]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||n)return;let t=!1;return r(()=>import(`./changelog-C0GmxRP2.js`).then(e=>{t||_(e.default)}),[]),()=>{t=!0}},[e,n]),(0,u.useEffect)(()=>{e||y(``)},[e]);let b=n?g(n,v):[];return(0,d.jsxs)(s,{open:e,onClose:t,title:l(`about.changelog`),wide:!0,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[14px] text-ink-3`,children:l(`about.changelogHint`)}),n===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(a,{})}):n.length===0?(0,d.jsx)(i,{children:l(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c,{type:`search`,value:v,placeholder:l(`about.search`),onChange:e=>y(e.target.value)}),b.length===0?(0,d.jsx)(i,{children:l(`about.noMatches`)}):null,b.map(e=>(0,d.jsxs)(`section`,{className:`mt-6`,children:[(0,d.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[16px]`,children:[p(e),(0,d.jsx)(`span`,{className:`font-normal font-sans text-[13px] text-ink-3 tabular-nums`,children:m(e)})]}),(0,d.jsx)(`ul`,{className:`mt-3 flex flex-col gap-2`,children:e.commits.map(e=>{let t=f(e);return(0,d.jsxs)(`li`,{className:`flex items-start gap-2.5 text-[14px]`,children:[(0,d.jsx)(`span`,{className:o(`mt-[7px] size-1.5 shrink-0 rounded-full`,t.dot)}),(0,d.jsxs)(`span`,{className:`min-w-0 text-ink-2`,children:[(0,d.jsxs)(`span`,{className:`font-semibold text-[12px] text-ink tracking-wide`,children:[t.label,e.scope?` [${e.scope}]`:``]}),` `,h(e.message),e.breaking?(0,d.jsx)(`span`,{className:`ml-1.5 rounded-full bg-rose-tint px-1.5 py-0.5 font-medium text-[12px] text-rose`,children:l(`about.breaking`)}):null]})]},e.id)})})]},e.version??`unreleased`))]})]})}export{_ as ChangelogDialog};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{a as i,d as a,h as o,i as s,s as c,y as l}from"./ui-BT0Y_Hci.js";var u=e(t(),1),d=e(n(),1);function f(e){switch(e.group){case`Added`:return{label:`NEW`,dot:`bg-moss`};case`Fixed`:return{label:`FIXED`,dot:`bg-amber`};case`Changed`:return{label:`CHANGED`,dot:`bg-cobalt`};case`Performance`:return{label:`PERFORMANCE`,dot:`bg-ember`};case`Deploy`:return{label:`DEPLOY`,dot:`bg-ink-4`};case`Docs`:return{label:`DOCS`,dot:`bg-ink-4`};default:return{label:`OTHER`,dot:`bg-ink-4`}}}var p=e=>e.version?e.version.replace(/^v/,``):l(`about.unreleased`),m=e=>e.timestamp?new Date(e.timestamp*1e3).toISOString().slice(0,10):``,h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=[];for(let t of e){if(`${p(t)} ${m(t)}`.toLowerCase().includes(n)){r.push(t);continue}let e=t.commits.filter(e=>`${f(e).label} ${e.scope??``} ${e.message}`.toLowerCase().includes(n));e.length>0&&r.push({...t,commits:e})}return r}function _({open:e,onClose:t}){let[n,_]=(0,u.useState)(null),[v,y]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||n)return;let t=!1;return r(()=>import(`./changelog-CFeEzKqb.js`).then(e=>{t||_(e.default)}),[]),()=>{t=!0}},[e,n]),(0,u.useEffect)(()=>{e||y(``)},[e]);let b=n?g(n,v):[];return(0,d.jsxs)(s,{open:e,onClose:t,title:l(`about.changelog`),wide:!0,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[14px] text-ink-3`,children:l(`about.changelogHint`)}),n===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(a,{})}):n.length===0?(0,d.jsx)(i,{children:l(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c,{type:`search`,value:v,placeholder:l(`about.search`),onChange:e=>y(e.target.value)}),b.length===0?(0,d.jsx)(i,{children:l(`about.noMatches`)}):null,b.map(e=>(0,d.jsxs)(`section`,{className:`mt-6`,children:[(0,d.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[16px]`,children:[p(e),(0,d.jsx)(`span`,{className:`font-normal font-sans text-[13px] text-ink-3 tabular-nums`,children:m(e)})]}),(0,d.jsx)(`ul`,{className:`mt-3 flex flex-col gap-2`,children:e.commits.map(e=>{let t=f(e);return(0,d.jsxs)(`li`,{className:`flex items-start gap-2.5 text-[14px]`,children:[(0,d.jsx)(`span`,{className:o(`mt-[7px] size-1.5 shrink-0 rounded-full`,t.dot)}),(0,d.jsxs)(`span`,{className:`min-w-0 text-ink-2`,children:[(0,d.jsxs)(`span`,{className:`font-semibold text-[12px] text-ink tracking-wide`,children:[t.label,e.scope?` [${e.scope}]`:``]}),` `,h(e.message),e.breaking?(0,d.jsx)(`span`,{className:`ml-1.5 rounded-full bg-rose-tint px-1.5 py-0.5 font-medium text-[12px] text-rose`,children:l(`about.breaking`)}):null]})]},e.id)})})]},e.version??`unreleased`))]})]})}export{_ as ChangelogDialog};
@@ -0,0 +1 @@
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{c as r,d as i,i as a,n as o,nt as s}from"./api-Bf-l9Sd8.js";import{t as c}from"./createLucideIcon-q3MZMmnf.js";import{S as l,T as u,b as d,r as f,y as p}from"./outputs-CsESg-Eg.js";import{t as m}from"./chevron-down-DymW-2BP.js";import{t as h}from"./plus-Du-Jx8aI.js";import{t as g}from"./mic-Bvz4mA2j.js";import{_,d as v,h as y,o as b,y as x}from"./ui-BT0Y_Hci.js";import{g as S,h as C}from"./index-BR5ELbeZ.js";var w={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};w.node;var T=c(w),E=e(t(),1),D=!1;function O(){if(!(typeof window>`u`||D))return window.SpeechRecognition??window.webkitSpeechRecognition}var k=typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia&&typeof MediaRecorder<`u`;function A(e,t){let n=e.trimEnd(),r=t.trim();return n&&r?`${n} ${r}`:n||r}function j(e,t){let[n,r]=(0,E.useState)(!1),[i,a]=(0,E.useState)(!1),[s,c]=(0,E.useState)(null),l=(0,E.useRef)(e);l.current=e;let u=(0,E.useRef)(t);u.current=t;let d=(0,E.useRef)(null);(0,E.useEffect)(()=>()=>d.current?.stop(),[]);let f=async()=>{let e=l.current,t;try{t=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{c(`denied`);return}let n=[],i=new MediaRecorder(t);i.ondataavailable=e=>e.data.size&&n.push(e.data),i.onstop=async()=>{for(let e of t.getTracks())e.stop();d.current=null,r(!1);let s=(i.mimeType||`audio/webm`).split(`;`)[0],l=new File(n,`dictation`,{type:s});if(l.size){a(!0);try{let{text:t}=await o.upload(`/api/studio/transcribe`,l);t.trim()&&u.current(A(e,t))}catch(e){c(e.message)}finally{a(!1)}}},d.current={stop:()=>i.state!==`inactive`&&i.stop()},i.start(),r(!0)},p=e=>{let t=l.current,n=``,i=new e;i.continuous=!0,i.interimResults=!0,i.lang=_===`de`?`de-DE`:`en-US`,i.onresult=e=>{let r=``;for(let t=Math.max(0,e.resultIndex);t<e.results.length;t++){let i=e.results[t],a=i[0]?.transcript??``;i.isFinal?n=A(n,a):r+=a}u.current(A(t,A(n,r)))},i.onerror=e=>{if(e.error!==`aborted`&&e.error!==`no-speech`){if(e.error===`not-allowed`){c(`denied`);return}D=!0,k&&!n?(i.onend=null,d.current=null,f()):c(e.error)}},i.onend=()=>{d.current=null,r(!1)},d.current={stop:()=>i.stop()},i.start(),r(!0)};return{supported:!!O()||k,listening:n,processing:i,error:s,toggle:()=>{if(i)return;if(d.current){d.current.stop();return}c(null);let e=O();e?p(e):f()}}}var M=e(n(),1),N=/\.(png|jpe?g|gif|webp|avif|svg)$/i;function P(e){let t=e.filter(e=>e.type.startsWith(`image/`));return t.length?Object.fromEntries(t.map(e=>[e.name,URL.createObjectURL(e)])):void 0}function F(e){let t=e.match(/(?:^|\n\n)(?:Angehängt|Attached): ([^\n]+)$/);return t?{text:e.slice(0,t.index).trim(),names:t[1].split(`, `).filter(Boolean)}:{text:e,names:[]}}function I(e,t){if(e.name&&e.name!==`image.png`)return e;let n=e.type.split(`/`)[1]?.replace(`jpeg`,`jpg`)||`png`,r=new Date().toISOString().slice(0,19).replace(/[-:]/g,``).replace(`T`,`-`);return new File([e],`paste-${r}${t?`-${t+1}`:``}.${n}`,{type:e.type})}function L({url:e,label:t,children:n}){return(0,M.jsxs)(`div`,{className:`group relative`,title:t,children:[(0,M.jsx)(`img`,{src:e,alt:t,width:64,height:64,className:`size-16 rounded-lg bg-paper-2 object-cover ring-1 ring-border`}),n]})}function R({names:e,previews:t,fileUrl:n}){let r=e.filter(e=>t?.[e]||n&&N.test(e)),i=e.filter(e=>!r.includes(e));return(0,M.jsxs)(`div`,{className:`flex flex-col items-end gap-1.5`,children:[r.map(e=>{let r=t?.[e]??n?.(e)??``;return(0,M.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,title:e,children:(0,M.jsx)(`img`,{src:r,alt:e,className:`max-h-60 w-auto max-w-full rounded-xl bg-paper-2 object-contain ring-1 ring-border`})},e)}),i.length?(0,M.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1.5`,children:i.map(e=>(0,M.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-full bg-paper-2 px-2.5 py-1 text-[12px] text-ink-2`,children:[(0,M.jsx)(l,{className:`size-3 shrink-0 text-ink-4`}),(0,M.jsx)(`span`,{className:`truncate`,children:e})]},e))}):null]})}function z(e,t){let n=s(),[i,o]=(0,E.useState)([]),[c,l]=(0,E.useState)(`idle`),[u,d]=(0,E.useState)(null),[f,p]=(0,E.useState)(null),[m,h]=(0,E.useState)(null),[g,_]=(0,E.useState)(null),v=(0,E.useRef)(null);return(0,E.useEffect)(()=>{if(e){if(v.current!==e.id){v.current=e.id,o(e.messages);return}c===`idle`&&o(t=>e.messages.length>=t.length?e.messages:t)}},[e,c]),{messages:i,phase:c,activity:f,thought:m,startedAt:g,error:u,send:async(i,s=[])=>{if(!e||!(i.trim()||s.length)||c!==`idle`)return!1;if(d(null),_(Date.now()),h(null),s.length){l(`thinking`);try{for(let t of s){let n=await fetch(r(`/api/studio/wizards/${e.id}/files/${encodeURIComponent(t.name)}`),{method:`PUT`,credentials:`include`,headers:{"content-type":t.type||`application/octet-stream`},body:t});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??n.statusText)}}}catch(t){return d(t.message),l(`idle`),_(null),await n.invalidateQueries({queryKey:[`wizard`,e.id]}),!1}let t=`${x(`editor.attached`)}: ${s.map(e=>e.name).join(`, `)}`;i=i.trim()?`${i}\n\n${t}`:t}let u=`p-${Date.now()}`;o(e=>[...e,{id:`u-${Date.now()}`,role:`user`,content:i,previews:P(s)},{id:u,role:`assistant`,content:``,pending:!0}]),l(`thinking`),p(null);let f=!1;try{await a(`/api/studio/wizards/${e.id}/chat`,{message:i},(e,n)=>{if(e===`text`){let e=JSON.parse(n);o(t=>t.map(t=>t.id===u?{...t,content:t.content+e}:t))}else if(e===`activity`)p(JSON.parse(n));else if(e===`thought`)h(JSON.parse(n));else if(e===`building`)l(`building`);else if(e===`done`){f=!0;let e=JSON.parse(n);o(t=>t.map(t=>t.id===u?{...t,content:e.reply,changed:e.changed,pending:!1}:t)),e.changed&&t(e.draft,e.revision)}else e===`error`&&(f=!0,d(JSON.parse(n).message))}),f||d(x(`editor.chatBroken`))}catch(e){d(e.message)}finally{p(null),h(null),_(null),o(e=>e.filter(e=>!(e.id===u&&!e.content)).map(e=>({...e,pending:!1}))),l(`idle`),await n.invalidateQueries({queryKey:[`wizard`,e.id]}),await n.invalidateQueries({queryKey:[`me`]})}return!0},fileUrl:t=>r(`/api/studio/wizards/${e?.id}/files/${encodeURIComponent(t)}`)}}function B(e){let[t,n]=(0,E.useState)(()=>Date.now());return(0,E.useEffect)(()=>{if(e===null)return;n(Date.now());let t=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(t)},[e]),e===null?null:Math.max(0,Math.floor((t-e)/1e3))}function V(e){return e<60?`${e} s`:`${Math.floor(e/60)}:${String(e%60).padStart(2,`0`)} min`}function H({chat:e,thought:t,className:n,spinner:r=`size-3.5`}){let i=B(e.startedAt);return(0,M.jsxs)(`div`,{className:y(`min-w-0`,n),children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(v,{className:y(`shrink-0`,r)}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:e.activity??(e.phase===`building`?x(`editor.building`):x(`editor.thinking`))}),i===null?null:(0,M.jsx)(`span`,{className:`shrink-0 text-ink-4 tabular-nums`,children:V(i)})]}),t&&e.thought?(0,M.jsx)(`p`,{className:`mt-0.5 truncate pl-5.5 text-[12px] text-ink-4`,children:e.thought}):null]})}function U({message:e,fileUrl:t}){let{text:n,names:r}=F(e.content);return(0,M.jsxs)(`div`,{className:`ml-8 flex flex-col items-end gap-1.5 self-end`,children:[r.length?(0,M.jsx)(R,{names:r,previews:e.previews,fileUrl:t}):null,n?(0,M.jsx)(`div`,{className:`rounded-xl rounded-br-md bg-paper-2 px-4 py-2.5 text-[14px] leading-relaxed`,children:(0,M.jsx)(`span`,{className:`whitespace-pre-wrap`,children:n})}):null]})}function W({chat:e,avatar:t,hello:n=x(`editor.chatHello`),placeholder:r=x(`editor.composer`),changedLabel:a=`Ablauf aktualisiert`,compact:o,intro:s,closed:c}){let[_,w]=(0,E.useState)(!1),[D,O]=(0,E.useState)(``),[k,A]=(0,E.useState)([]),N=(0,E.useRef)(null),P=(0,E.useRef)(null),F=(0,E.useRef)(null),R=j(D,O);(0,E.useEffect)(()=>{N.current?.scrollTo({top:N.current.scrollHeight,behavior:`smooth`})},[e.messages,e.phase]),(0,E.useEffect)(()=>{let e=P.current;if(!e)return;let t=()=>{e.style.height=`auto`,e.style.height=D?`${Math.min(e.scrollHeight,200)}px`:``};t();let n=e.clientWidth,r=new ResizeObserver(()=>{e.clientWidth!==n&&(n=e.clientWidth,t())});return r.observe(e),()=>r.disconnect()},[D]);let z=(D.trim()||k.length>0)&&e.phase===`idle`,B=e=>A(t=>[...t.filter(t=>!e.some(e=>e.name===t.name)),...e]),[V,W]=(0,E.useState)(new Map);(0,E.useEffect)(()=>{let e=new Map(k.filter(e=>e.type.startsWith(`image/`)).map(e=>[e,URL.createObjectURL(e)]));return W(e),()=>{for(let t of e.values())URL.revokeObjectURL(t)}},[k]);let G=async()=>{if(!z)return;R.listening&&R.toggle();let t={text:D,files:k};O(``),A([]),await e.send(t.text.trim(),t.files)||(O(t.text),A(t.files))},K=!o||_,q=e.messages.at(-1);return(0,M.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[o&&(q||e.error)?(0,M.jsxs)(`button`,{type:`button`,"aria-expanded":_,"aria-label":x(`editor.thread`),onClick:()=>w(e=>!e),className:`flex items-center gap-2 px-4 pt-2.5 pb-0.5 text-left text-[13px] text-ink-3 transition hover:text-ink`,children:[!(e.error||_)&&q?.pending?(0,M.jsx)(H,{chat:e,className:`flex-1`}):(0,M.jsx)(`span`,{className:y(`min-w-0 flex-1 truncate`,e.error&&`text-rose`),children:e.error??(_?x(`editor.thread`):q?.content)}),_?(0,M.jsx)(m,{className:`size-4 shrink-0`}):(0,M.jsx)(T,{className:`size-4 shrink-0`})]}):null,(0,M.jsxs)(`div`,{ref:N,className:y(`min-h-0 flex-1 overflow-y-auto px-5 py-5`,!K&&`hidden`),children:[e.messages.length===0&&!c?s??(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(i,{kind:t,size:32,interactive:!1}),(0,M.jsx)(`p`,{className:`pt-1 text-[14px] text-ink-2 leading-relaxed`,children:n})]}):null,(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.messages.map(n=>n.role===`user`?(0,M.jsx)(U,{message:n,fileUrl:e.fileUrl},n.id):(0,M.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,M.jsx)(`div`,{className:`shrink-0`,children:(0,M.jsx)(i,{kind:t,size:28,interactive:!1})}),(0,M.jsxs)(`div`,{className:`min-w-0 pt-0.5 text-[14px]`,children:[n.source===`mcp`?(0,M.jsxs)(`div`,{className:`mb-1 inline-flex items-center gap-1.5 text-[12px] text-ink-3`,children:[(0,M.jsx)(S,{className:`size-3`}),` `,x(`editor.viaClient`,{client:n.client??`MCP`})]}):null,n.content?(0,M.jsx)(f,{text:n.content,className:`text-[14px]`}):null,n.pending?(0,M.jsx)(H,{chat:e,thought:!0,className:`mt-1 text-[13px] text-ink-3`}):null,n.changed?(0,M.jsxs)(`div`,{className:`mt-2 inline-flex items-center gap-1.5 rounded-full bg-ember-tint px-2.5 py-0.5 text-[12px] text-ember-strong`,children:[(0,M.jsx)(d,{className:`size-3`}),` `,a]}):null]})]},n.id))}),e.error?(0,M.jsx)(`div`,{className:`mt-4 rounded-lg bg-rose-tint px-3 py-2 text-[13px] text-rose`,children:e.error}):null]}),c?(0,M.jsx)(`p`,{className:`m-3 rounded-xl bg-paper-2 px-4 py-3 text-[13px] text-ink-2 leading-relaxed`,children:c}):(0,M.jsxs)(`div`,{className:o?`p-2`:`p-3`,children:[(0,M.jsxs)(`div`,{className:`rounded-xl bg-card p-1.5 shadow-soft ring-1 ring-border focus-within:ring-focus`,children:[V.size?(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2 px-1 pt-1 pb-1.5`,children:k.map((e,t)=>{let n=V.get(e);return n?(0,M.jsx)(L,{url:n,label:e.name,children:(0,M.jsx)(`button`,{type:`button`,"aria-label":x(`editor.detach`),onClick:()=>A(e=>e.filter((e,n)=>n!==t)),className:`-top-1.5 -right-1.5 absolute flex size-5 items-center justify-center rounded-full bg-ink text-paper opacity-0 shadow-soft transition focus-visible:opacity-100 group-hover:opacity-100`,children:(0,M.jsx)(C,{className:`size-3`})})},`${e.name}-${t}`):null})}):null,k.some(e=>!V.has(e))?(0,M.jsx)(`ul`,{className:`flex flex-wrap gap-1.5 px-1 pt-1 pb-1.5`,children:k.map((e,t)=>V.has(e)?null:(0,M.jsxs)(`li`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-full bg-paper-2 py-1 pr-1 pl-2.5 text-[12px] text-ink-2`,children:[(0,M.jsx)(l,{className:`size-3 shrink-0 text-ink-4`}),(0,M.jsx)(`span`,{className:`truncate`,children:e.name}),(0,M.jsx)(`button`,{type:`button`,"aria-label":x(`editor.detach`),onClick:()=>A(e=>e.filter((e,n)=>n!==t)),className:`inline-flex size-5 shrink-0 items-center justify-center rounded-full text-ink-3 hover:bg-paper-3 hover:text-ink`,children:(0,M.jsx)(C,{className:`size-3`})})]},`${e.name}-${t}`))}):null,(0,M.jsxs)(`div`,{className:`flex items-end gap-1`,children:[(0,M.jsx)(b,{label:x(`editor.attach`),onClick:()=>F.current?.click(),children:(0,M.jsx)(h,{className:`size-4`})}),(0,M.jsx)(`input`,{ref:F,type:`file`,multiple:!0,hidden:!0,onChange:e=>{let t=Array.from(e.target.files??[]);e.target.value=``,B(t)}}),(0,M.jsx)(`textarea`,{ref:P,rows:1,value:D,onChange:e=>O(e.target.value),onPaste:e=>{let t=Array.from(e.clipboardData.files);t.length&&(e.preventDefault(),B(t.map(I)))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),G())},placeholder:R.listening?x(`editor.listening`):r,className:`max-h-[200px] min-h-[40px] flex-1 resize-none bg-transparent px-1.5 py-2 text-[14px] outline-none placeholder:text-ink-4`}),R.supported?(0,M.jsx)(b,{label:R.processing?x(`editor.transcribing`):R.listening?x(`editor.voiceStop`):x(`editor.voice`),"aria-pressed":R.listening,disabled:R.processing,onClick:R.toggle,className:y(R.listening&&`bg-rose-tint text-rose hover:bg-rose-tint hover:text-rose`),children:R.processing?(0,M.jsx)(v,{className:`size-4`}):R.listening?(0,M.jsx)(p,{className:`size-3.5 animate-pulse-dot fill-current`}):(0,M.jsx)(g,{className:`size-4`})}):null,(0,M.jsx)(`button`,{type:`button`,onClick:()=>void G(),disabled:!z,className:y(`inline-flex size-9 shrink-0 items-center justify-center rounded-full transition`,z?`bg-primary text-primary-foreground`:`bg-paper-2 text-ink-4`),"aria-label":`Send`,children:(0,M.jsx)(u,{className:`size-4`})})]})]}),R.error?(0,M.jsx)(`p`,{className:`mt-2 px-1 text-[12px] text-rose`,children:R.error===`denied`?x(`editor.micDenied`):R.error}):null]})]})}export{z as i,H as n,P as r,W as t};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{t as i}from"./external-link-MAL7vJYj.js";import{_ as a,a as o,d as s,i as c,s as l,y as u}from"./ui-Cj3EzOCA.js";var d=e(t(),1),f=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/engenty-wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],p=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],m=e(n(),1),h=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function g({name:e,homepage:t,version:n,license:r,description:a}){return(0,m.jsxs)(`li`,{className:`py-2.5`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,m.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[14px] text-ink underline-offset-4 hover:underline`,children:[e,(0,m.jsx)(i,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,m.jsx)(`span`,{className:`font-medium text-[14px] text-ink`,children:e}),n?(0,m.jsx)(`span`,{className:`text-[12px] text-ink-3 tabular-nums`,children:n}):null,(0,m.jsx)(`span`,{className:`text-[12px] text-ink-3`,children:r})]}),a?(0,m.jsx)(`p`,{className:`mt-0.5 text-[13px] text-ink-3`,children:a}):null]})}function _({title:e,hint:t,children:n}){return(0,m.jsxs)(`section`,{className:`mt-6`,children:[(0,m.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[16px]`,children:e}),t?(0,m.jsx)(`p`,{className:`mt-2 text-[13px] text-ink-3`,children:t}):null,n]})}function v({credits:e}){return(0,m.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,m.jsx)(g,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[a]},e.name))})}function y({label:e,packages:t}){return(0,m.jsxs)(`div`,{className:`mt-4`,children:[(0,m.jsx)(`h4`,{className:`font-medium text-[12px] text-ink-3 tracking-wide`,children:e}),(0,m.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,m.jsx)(g,{...e},e.name))})]})}function b({open:e,onClose:t}){let[n,i]=(0,d.useState)(null),[a,g]=(0,d.useState)(``);(0,d.useEffect)(()=>{if(!e||n)return;let t=!1;return r(()=>import(`./oss-credits-Hu4LieLA.js`).then(e=>{t||i(e.default)}),[]),()=>{t=!0}},[e,n]),(0,d.useEffect)(()=>{e||g(``)},[e]);let b=a.trim().toLowerCase(),x=e=>b?e.filter(e=>h(b,e.name,e.license,e.description.de,e.description.en)):e,S=e=>b?e.filter(e=>h(b,e.name,e.license,e.version)):e,C=x(f),w=x(p),T=n?[{id:`shared`,label:u(`about.creditsShared`),packages:S(n.shared)},...n.groups.map(e=>({id:e.id,label:e.label,packages:S(e.packages)}))].filter(e=>e.packages.length>0):[],E=C.length===0&&w.length===0&&T.length===0;return(0,m.jsxs)(c,{open:e,onClose:t,title:u(`about.credits`),wide:!0,children:[(0,m.jsx)(`p`,{className:`-mt-3 mb-4 text-[14px] text-ink-3`,children:u(`about.creditsHint`)}),(0,m.jsx)(l,{type:`search`,value:a,placeholder:u(`about.search`),onChange:e=>g(e.target.value)}),C.length>0?(0,m.jsx)(_,{title:u(`about.creditsProduct`),children:(0,m.jsx)(v,{credits:C})}):null,w.length>0?(0,m.jsx)(_,{title:u(`about.creditsBuiltWith`),children:(0,m.jsx)(v,{credits:w})}):null,n===null?(0,m.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,m.jsx)(s,{})}):T.length>0?(0,m.jsx)(_,{title:u(`about.creditsDeps`),hint:b?void 0:u(`about.creditsDepsHint`),children:T.map(e=>(0,m.jsx)(y,{label:e.label,packages:e.packages},e.id))}):null,n!==null&&E?(0,m.jsx)(o,{children:u(`about.noMatches`)}):null]})}export{b as CreditsDialog};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{t as i}from"./external-link-MAL7vJYj.js";import{_ as a,a as o,d as s,i as c,s as l,y as u}from"./ui-BT0Y_Hci.js";var d=e(t(),1),f=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/engenty-wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],p=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],m=e(n(),1),h=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function g({name:e,homepage:t,version:n,license:r,description:a}){return(0,m.jsxs)(`li`,{className:`py-2.5`,children:[(0,m.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,m.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[14px] text-ink underline-offset-4 hover:underline`,children:[e,(0,m.jsx)(i,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,m.jsx)(`span`,{className:`font-medium text-[14px] text-ink`,children:e}),n?(0,m.jsx)(`span`,{className:`text-[12px] text-ink-3 tabular-nums`,children:n}):null,(0,m.jsx)(`span`,{className:`text-[12px] text-ink-3`,children:r})]}),a?(0,m.jsx)(`p`,{className:`mt-0.5 text-[13px] text-ink-3`,children:a}):null]})}function _({title:e,hint:t,children:n}){return(0,m.jsxs)(`section`,{className:`mt-6`,children:[(0,m.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[16px]`,children:e}),t?(0,m.jsx)(`p`,{className:`mt-2 text-[13px] text-ink-3`,children:t}):null,n]})}function v({credits:e}){return(0,m.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,m.jsx)(g,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[a]},e.name))})}function y({label:e,packages:t}){return(0,m.jsxs)(`div`,{className:`mt-4`,children:[(0,m.jsx)(`h4`,{className:`font-medium text-[12px] text-ink-3 tracking-wide`,children:e}),(0,m.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,m.jsx)(g,{...e},e.name))})]})}function b({open:e,onClose:t}){let[n,i]=(0,d.useState)(null),[a,g]=(0,d.useState)(``);(0,d.useEffect)(()=>{if(!e||n)return;let t=!1;return r(()=>import(`./oss-credits-C-U2Tlpn.js`).then(e=>{t||i(e.default)}),[]),()=>{t=!0}},[e,n]),(0,d.useEffect)(()=>{e||g(``)},[e]);let b=a.trim().toLowerCase(),x=e=>b?e.filter(e=>h(b,e.name,e.license,e.description.de,e.description.en)):e,S=e=>b?e.filter(e=>h(b,e.name,e.license,e.version)):e,C=x(f),w=x(p),T=n?[{id:`shared`,label:u(`about.creditsShared`),packages:S(n.shared)},...n.groups.map(e=>({id:e.id,label:e.label,packages:S(e.packages)}))].filter(e=>e.packages.length>0):[],E=C.length===0&&w.length===0&&T.length===0;return(0,m.jsxs)(c,{open:e,onClose:t,title:u(`about.credits`),wide:!0,children:[(0,m.jsx)(`p`,{className:`-mt-3 mb-4 text-[14px] text-ink-3`,children:u(`about.creditsHint`)}),(0,m.jsx)(l,{type:`search`,value:a,placeholder:u(`about.search`),onChange:e=>g(e.target.value)}),C.length>0?(0,m.jsx)(_,{title:u(`about.creditsProduct`),children:(0,m.jsx)(v,{credits:C})}):null,w.length>0?(0,m.jsx)(_,{title:u(`about.creditsBuiltWith`),children:(0,m.jsx)(v,{credits:w})}):null,n===null?(0,m.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,m.jsx)(s,{})}):T.length>0?(0,m.jsx)(_,{title:u(`about.creditsDeps`),hint:b?void 0:u(`about.creditsDepsHint`),children:T.map(e=>(0,m.jsx)(y,{label:e.label,packages:e.packages},e.id))}):null,n!==null&&E?(0,m.jsx)(o,{children:u(`about.noMatches`)}):null]})}export{b as CreditsDialog};