@teamflojo/floimg-studio-ui 0.4.3 → 0.4.4

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/index.js CHANGED
@@ -13,8 +13,8 @@ function De(r, d) {
13
13
  return {
14
14
  getItem: (a) => {
15
15
  var o;
16
- const p = (s) => s === null ? null : JSON.parse(s, void 0), c = (o = n.getItem(a)) != null ? o : null;
17
- return c instanceof Promise ? c.then(p) : p(c);
16
+ const m = (s) => s === null ? null : JSON.parse(s, void 0), c = (o = n.getItem(a)) != null ? o : null;
17
+ return c instanceof Promise ? c.then(m) : m(c);
18
18
  },
19
19
  setItem: (a, o) => n.setItem(a, JSON.stringify(o, void 0)),
20
20
  removeItem: (a) => n.removeItem(a)
@@ -51,10 +51,10 @@ const le = (r) => (d) => {
51
51
  ...y
52
52
  }),
53
53
  ...d
54
- }, p = !1;
54
+ }, m = !1;
55
55
  const c = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
56
- let m = o.storage;
57
- if (!m)
56
+ let p = o.storage;
57
+ if (!p)
58
58
  return r(
59
59
  (...y) => {
60
60
  console.warn(
@@ -66,7 +66,7 @@ const le = (r) => (d) => {
66
66
  );
67
67
  const l = () => {
68
68
  const y = o.partialize({ ...t() });
69
- return m.setItem(o.name, {
69
+ return p.setItem(o.name, {
70
70
  state: y,
71
71
  version: o.version
72
72
  });
@@ -81,13 +81,13 @@ const le = (r) => (d) => {
81
81
  let f;
82
82
  const h = () => {
83
83
  var y, v;
84
- if (!m) return;
85
- p = !1, c.forEach((u) => {
84
+ if (!p) return;
85
+ m = !1, c.forEach((u) => {
86
86
  var x;
87
87
  return u((x = t()) != null ? x : b);
88
88
  });
89
89
  const C = ((v = o.onRehydrateStorage) == null ? void 0 : v.call(o, (y = t()) != null ? y : b)) || void 0;
90
- return le(m.getItem.bind(m))(o.name).then((u) => {
90
+ return le(p.getItem.bind(p))(o.name).then((u) => {
91
91
  if (u)
92
92
  if (typeof u.version == "number" && u.version !== o.version) {
93
93
  if (o.migrate) {
@@ -105,14 +105,14 @@ const le = (r) => (d) => {
105
105
  return [!1, void 0];
106
106
  }).then((u) => {
107
107
  var x;
108
- const [N, w] = u;
108
+ const [N, k] = u;
109
109
  if (f = o.merge(
110
- w,
110
+ k,
111
111
  (x = t()) != null ? x : b
112
112
  ), n(f, !0), N)
113
113
  return l();
114
114
  }).then(() => {
115
- C == null || C(f, void 0), f = t(), p = !0, s.forEach((u) => u(f));
115
+ C == null || C(f, void 0), f = t(), m = !0, s.forEach((u) => u(f));
116
116
  }).catch((u) => {
117
117
  C == null || C(void 0, u);
118
118
  });
@@ -122,14 +122,14 @@ const le = (r) => (d) => {
122
122
  o = {
123
123
  ...o,
124
124
  ...y
125
- }, y.storage && (m = y.storage);
125
+ }, y.storage && (p = y.storage);
126
126
  },
127
127
  clearStorage: () => {
128
- m == null || m.removeItem(o.name);
128
+ p == null || p.removeItem(o.name);
129
129
  },
130
130
  getOptions: () => o,
131
131
  rehydrate: () => h(),
132
- hasHydrated: () => p,
132
+ hasHydrated: () => m,
133
133
  onHydrate: (y) => (c.add(y), () => {
134
134
  c.delete(y);
135
135
  }),
@@ -137,7 +137,7 @@ const le = (r) => (d) => {
137
137
  s.delete(y);
138
138
  })
139
139
  }, o.skipHydration || h(), f || b;
140
- }, we = $e, R = "/api";
140
+ }, ke = $e, R = "/api";
141
141
  async function $(r, d) {
142
142
  const n = await fetch(r, {
143
143
  ...d,
@@ -206,7 +206,7 @@ async function Je(r) {
206
206
  if (!d.ok)
207
207
  throw new Error(`Failed to delete upload: ${d.status}`);
208
208
  }
209
- function ke(r) {
209
+ function we(r) {
210
210
  return `${R}/uploads/${r}/blob`;
211
211
  }
212
212
  async function Qe(r) {
@@ -236,17 +236,17 @@ function ve(r, d, n) {
236
236
  signal: t.signal
237
237
  });
238
238
  if (!o.ok) {
239
- const m = await o.json().catch(() => ({ error: "Unknown error" }));
240
- throw new Error(m.error || `HTTP ${o.status}`);
239
+ const p = await o.json().catch(() => ({ error: "Unknown error" }));
240
+ throw new Error(p.error || `HTTP ${o.status}`);
241
241
  }
242
- const p = (a = o.body) == null ? void 0 : a.getReader();
243
- if (!p)
242
+ const m = (a = o.body) == null ? void 0 : a.getReader();
243
+ if (!m)
244
244
  throw new Error("Response body is not readable");
245
245
  const c = new globalThis.TextDecoder();
246
246
  let s = "";
247
247
  for (; ; ) {
248
- const { done: m, value: l } = await p.read();
249
- if (m) {
248
+ const { done: p, value: l } = await m.read();
249
+ if (p) {
250
250
  s.trim() && et(s, n);
251
251
  break;
252
252
  }
@@ -309,7 +309,7 @@ function et(r, d) {
309
309
  }
310
310
  }
311
311
  const he = "http://localhost:11434", fe = "http://localhost:1234", G = ye()(
312
- we(
312
+ ke(
313
313
  (r, d) => ({
314
314
  ai: {
315
315
  ollama: {
@@ -339,9 +339,9 @@ const he = "http://localhost:11434", fe = "http://localhost:1234", G = ye()(
339
339
  openSettings: () => r({ showSettings: !0 }),
340
340
  closeSettings: () => r({ showSettings: !1 }),
341
341
  getConfiguredProviders: () => {
342
- var a, o, p, c, s, m, l;
342
+ var a, o, m, c, s, p, l;
343
343
  const { ai: n } = d(), t = {};
344
- return (a = n.openai) != null && a.enabled && n.openai.apiKey && (t.openai = { apiKey: n.openai.apiKey }), (o = n.anthropic) != null && o.enabled && n.anthropic.apiKey && (t.anthropic = { apiKey: n.anthropic.apiKey }), (p = n.gemini) != null && p.enabled && n.gemini.apiKey && (t.gemini = { apiKey: n.gemini.apiKey }), (c = n.grok) != null && c.enabled && n.grok.apiKey && (t.grok = { apiKey: n.grok.apiKey }), (s = n.openrouter) != null && s.enabled && n.openrouter.apiKey && (t.openrouter = { apiKey: n.openrouter.apiKey }), (m = n.ollama) != null && m.enabled && (t.ollama = { baseUrl: n.ollama.baseUrl || he }), (l = n.lmstudio) != null && l.enabled && (t.lmstudio = { baseUrl: n.lmstudio.baseUrl || fe }), t;
344
+ return (a = n.openai) != null && a.enabled && n.openai.apiKey && (t.openai = { apiKey: n.openai.apiKey }), (o = n.anthropic) != null && o.enabled && n.anthropic.apiKey && (t.anthropic = { apiKey: n.anthropic.apiKey }), (m = n.gemini) != null && m.enabled && n.gemini.apiKey && (t.gemini = { apiKey: n.gemini.apiKey }), (c = n.grok) != null && c.enabled && n.grok.apiKey && (t.grok = { apiKey: n.grok.apiKey }), (s = n.openrouter) != null && s.enabled && n.openrouter.apiKey && (t.openrouter = { apiKey: n.openrouter.apiKey }), (p = n.ollama) != null && p.enabled && (t.ollama = { baseUrl: n.ollama.baseUrl || he }), (l = n.lmstudio) != null && l.enabled && (t.lmstudio = { baseUrl: n.lmstudio.baseUrl || fe }), t;
345
345
  }
346
346
  }),
347
347
  {
@@ -359,12 +359,12 @@ function be() {
359
359
  const r = Date.now(), d = Math.random().toString(36).substring(2, 8);
360
360
  return `wf_${r}_${d}`;
361
361
  }
362
- const k = ye()(
363
- we(
362
+ const w = ye()(
363
+ ke(
364
364
  (r, d) => {
365
365
  const n = (t) => {
366
366
  if (t.type === "generator") {
367
- const a = t.data, o = d().generators.find((p) => p.name === a.generatorName);
367
+ const a = t.data, o = d().generators.find((m) => m.name === a.generatorName);
368
368
  return {
369
369
  ...a,
370
370
  isAI: a.isAI ?? (o == null ? void 0 : o.isAI),
@@ -374,7 +374,7 @@ const k = ye()(
374
374
  }
375
375
  if (t.type === "transform") {
376
376
  const a = t.data, o = d().transforms.find(
377
- (p) => p.name === a.operation && p.providerName === a.providerName
377
+ (m) => m.name === a.operation && m.providerName === a.providerName
378
378
  );
379
379
  return {
380
380
  ...a,
@@ -422,17 +422,17 @@ const k = ye()(
422
422
  position: c.position,
423
423
  data: n(c)
424
424
  };
425
- }), p = t.workflow.edges.map((c) => {
426
- const s = a.get(c.source) || c.source, m = a.get(c.target) || c.target;
425
+ }), m = t.workflow.edges.map((c) => {
426
+ const s = a.get(c.source) || c.source, p = a.get(c.target) || c.target;
427
427
  return {
428
- id: `edge_${s}_${m}`,
428
+ id: `edge_${s}_${p}`,
429
429
  source: s,
430
- target: m
430
+ target: p
431
431
  };
432
432
  });
433
433
  r({
434
434
  nodes: o,
435
- edges: p,
435
+ edges: m,
436
436
  selectedNodeId: null,
437
437
  currentTemplateId: t.id,
438
438
  previewVisible: {},
@@ -477,11 +477,11 @@ const k = ye()(
477
477
  setTextProviders: (t) => r({ textProviders: t }),
478
478
  setVisionProviders: (t) => r({ visionProviders: t }),
479
479
  addNode: (t, a) => {
480
- var s, m, l;
480
+ var s, p, l;
481
481
  const o = Q();
482
- let p;
482
+ let m;
483
483
  if (t.type === "generator")
484
- p = {
484
+ m = {
485
485
  generatorName: t.name,
486
486
  params: ae(t),
487
487
  isAI: t.isAI,
@@ -490,7 +490,7 @@ const k = ye()(
490
490
  maxReferenceImages: t.maxReferenceImages
491
491
  };
492
492
  else if (t.type === "transform")
493
- p = {
493
+ m = {
494
494
  operation: t.name,
495
495
  providerName: t.providerName,
496
496
  // Track which provider this transform belongs to
@@ -501,28 +501,28 @@ const k = ye()(
501
501
  maxReferenceImages: t.maxReferenceImages
502
502
  };
503
503
  else if (t.type === "input")
504
- p = {
504
+ m = {
505
505
  uploadId: void 0,
506
506
  filename: void 0,
507
507
  mime: void 0
508
508
  };
509
509
  else if (t.type === "vision")
510
- p = {
510
+ m = {
511
511
  providerName: t.name,
512
512
  providerLabel: t.label,
513
513
  // Human-readable label (e.g., "Gemini Vision")
514
514
  params: ae(t)
515
515
  };
516
516
  else if (t.type === "text")
517
- p = {
517
+ m = {
518
518
  providerName: t.name,
519
519
  providerLabel: t.label,
520
520
  // Human-readable label (e.g., "Gemini Text")
521
521
  params: ae(t)
522
522
  };
523
523
  else {
524
- const g = ((s = t.params) == null ? void 0 : s.properties) || {}, b = ((m = g.provider) == null ? void 0 : m.default) || "filesystem";
525
- p = {
524
+ const g = ((s = t.params) == null ? void 0 : s.properties) || {}, b = ((p = g.provider) == null ? void 0 : p.default) || "filesystem";
525
+ m = {
526
526
  destination: ((l = g.destination) == null ? void 0 : l.default) || "./output/image.png",
527
527
  provider: b
528
528
  };
@@ -531,7 +531,7 @@ const k = ye()(
531
531
  id: o,
532
532
  type: t.type,
533
533
  position: a,
534
- data: p
534
+ data: m
535
535
  };
536
536
  r((g) => ({
537
537
  nodes: [...g.nodes, c]
@@ -540,7 +540,7 @@ const k = ye()(
540
540
  updateNodeData: (t, a) => {
541
541
  r((o) => ({
542
542
  nodes: o.nodes.map(
543
- (p) => p.id === t ? { ...p, data: { ...p.data, ...a } } : p
543
+ (m) => m.id === t ? { ...m, data: { ...m.data, ...a } } : m
544
544
  )
545
545
  }));
546
546
  },
@@ -554,9 +554,9 @@ const k = ye()(
554
554
  duplicateNode: (t) => {
555
555
  const a = d(), o = a.nodes.find((s) => s.id === t);
556
556
  if (!o) return;
557
- const p = Q(), c = {
557
+ const m = Q(), c = {
558
558
  ...o,
559
- id: p,
559
+ id: m,
560
560
  position: {
561
561
  x: o.position.x + 50,
562
562
  y: o.position.y + 50
@@ -567,14 +567,14 @@ const k = ye()(
567
567
  };
568
568
  r({
569
569
  nodes: [...a.nodes, c],
570
- selectedNodeId: p
570
+ selectedNodeId: m
571
571
  // Select the new node
572
572
  });
573
573
  },
574
574
  setNodes: (t) => r({ nodes: t }),
575
575
  addEdge: (t) => {
576
576
  if (!t.source || !t.target) return;
577
- const a = [t.sourceHandle, t.targetHandle].filter(Boolean).join("_"), p = {
577
+ const a = [t.sourceHandle, t.targetHandle].filter(Boolean).join("_"), m = {
578
578
  id: a ? `edge_${t.source}_${t.target}_${a}` : `edge_${t.source}_${t.target}`,
579
579
  source: t.source,
580
580
  target: t.target,
@@ -582,7 +582,7 @@ const k = ye()(
582
582
  targetHandle: t.targetHandle ?? void 0
583
583
  };
584
584
  r((c) => ({
585
- edges: [...c.edges, p]
585
+ edges: [...c.edges, m]
586
586
  }));
587
587
  },
588
588
  deleteEdge: (t) => {
@@ -593,20 +593,20 @@ const k = ye()(
593
593
  setEdges: (t) => r({ edges: t }),
594
594
  setSelectedNode: (t) => r({ selectedNodeId: t }),
595
595
  execute: async () => {
596
- const { nodes: t, edges: a } = d(), o = t.map((m) => ({
597
- id: m.id,
598
- type: m.type,
599
- position: m.position,
600
- data: m.data
601
- })), p = a.map((m) => ({
602
- id: m.id,
603
- source: m.source,
604
- target: m.target,
605
- sourceHandle: m.sourceHandle ?? void 0,
606
- targetHandle: m.targetHandle ?? void 0
596
+ const { nodes: t, edges: a } = d(), o = t.map((p) => ({
597
+ id: p.id,
598
+ type: p.type,
599
+ position: p.position,
600
+ data: p.data
601
+ })), m = a.map((p) => ({
602
+ id: p.id,
603
+ source: p.source,
604
+ target: p.target,
605
+ sourceHandle: p.sourceHandle ?? void 0,
606
+ targetHandle: p.targetHandle ?? void 0
607
607
  })), c = G.getState().getConfiguredProviders(), s = {};
608
- for (const m of t)
609
- s[m.id] = "pending";
608
+ for (const p of t)
609
+ s[p.id] = "pending";
610
610
  return r({
611
611
  execution: {
612
612
  status: "running",
@@ -616,10 +616,10 @@ const k = ye()(
616
616
  dataOutputs: {},
617
617
  nodeStatus: s
618
618
  }
619
- }), new Promise((m, l) => {
619
+ }), new Promise((p, l) => {
620
620
  J = ve(
621
621
  "/api/execute/stream",
622
- { nodes: o, edges: p, aiProviders: c },
622
+ { nodes: o, edges: m, aiProviders: c },
623
623
  {
624
624
  onMessage: (g) => {
625
625
  const b = d();
@@ -656,7 +656,7 @@ const k = ye()(
656
656
  imageUrls: g.data.imageUrls,
657
657
  nodeStatus: f
658
658
  }
659
- }), m();
659
+ }), p();
660
660
  }
661
661
  if (g.type === "execution.error") {
662
662
  const f = { ...b.execution.nodeStatus };
@@ -716,26 +716,26 @@ const k = ye()(
716
716
  type: s.type,
717
717
  position: s.position,
718
718
  data: s.data
719
- })), p = a.map((s) => ({
719
+ })), m = a.map((s) => ({
720
720
  id: s.id,
721
721
  source: s.source,
722
722
  target: s.target,
723
723
  sourceHandle: s.sourceHandle ?? void 0,
724
724
  targetHandle: s.targetHandle ?? void 0
725
725
  }));
726
- return (await Fe(o, p)).yaml;
726
+ return (await Fe(o, m)).yaml;
727
727
  },
728
728
  importFromYaml: (t, a, o) => {
729
- const p = /* @__PURE__ */ new Map(), c = t.map((m) => {
729
+ const m = /* @__PURE__ */ new Map(), c = t.map((p) => {
730
730
  const l = Q();
731
- return p.set(m.id, l), {
731
+ return m.set(p.id, l), {
732
732
  id: l,
733
- type: m.type,
734
- position: m.position,
735
- data: n(m)
733
+ type: p.type,
734
+ position: p.position,
735
+ data: n(p)
736
736
  };
737
- }), s = a.map((m) => {
738
- const l = p.get(m.source) || m.source, g = p.get(m.target) || m.target;
737
+ }), s = a.map((p) => {
738
+ const l = m.get(p.source) || p.source, g = m.get(p.target) || p.target;
739
739
  return {
740
740
  id: `edge_${l}_${g}`,
741
741
  source: l,
@@ -789,20 +789,20 @@ const k = ye()(
789
789
  const {
790
790
  nodes: a,
791
791
  edges: o,
792
- activeWorkflowId: p,
792
+ activeWorkflowId: m,
793
793
  activeWorkflowName: c,
794
794
  savedWorkflows: s,
795
- currentTemplateId: m
795
+ currentTemplateId: p
796
796
  } = d(), l = Date.now();
797
- if (p) {
797
+ if (m) {
798
798
  const g = s.map(
799
- (b) => b.id === p ? { ...b, name: t || c, nodes: a, edges: o, updatedAt: l } : b
799
+ (b) => b.id === m ? { ...b, name: t || c, nodes: a, edges: o, updatedAt: l } : b
800
800
  );
801
801
  return r({
802
802
  savedWorkflows: g,
803
803
  activeWorkflowName: t || c,
804
804
  hasUnsavedChanges: !1
805
- }), p;
805
+ }), m;
806
806
  } else {
807
807
  const g = be(), b = {
808
808
  id: g,
@@ -811,7 +811,7 @@ const k = ye()(
811
811
  edges: o,
812
812
  createdAt: l,
813
813
  updatedAt: l,
814
- templateId: m || void 0
814
+ templateId: p || void 0
815
815
  };
816
816
  return r({
817
817
  savedWorkflows: [...s, b],
@@ -824,7 +824,7 @@ const k = ye()(
824
824
  loadWorkflow: (t) => {
825
825
  const { savedWorkflows: a } = d(), o = a.find((c) => c.id === t);
826
826
  if (!o) return;
827
- const p = o.nodes.map((c) => ({
827
+ const m = o.nodes.map((c) => ({
828
828
  ...c,
829
829
  data: n({
830
830
  id: c.id,
@@ -834,7 +834,7 @@ const k = ye()(
834
834
  })
835
835
  }));
836
836
  r({
837
- nodes: p,
837
+ nodes: m,
838
838
  edges: o.edges,
839
839
  selectedNodeId: null,
840
840
  currentTemplateId: o.templateId || null,
@@ -853,9 +853,9 @@ const k = ye()(
853
853
  });
854
854
  },
855
855
  deleteWorkflow: (t) => {
856
- const { savedWorkflows: a, activeWorkflowId: o } = d(), p = a.filter((c) => c.id !== t);
856
+ const { savedWorkflows: a, activeWorkflowId: o } = d(), m = a.filter((c) => c.id !== t);
857
857
  r(o === t ? {
858
- savedWorkflows: p,
858
+ savedWorkflows: m,
859
859
  nodes: [],
860
860
  edges: [],
861
861
  selectedNodeId: null,
@@ -872,40 +872,40 @@ const k = ye()(
872
872
  dataOutputs: {},
873
873
  nodeStatus: {}
874
874
  }
875
- } : { savedWorkflows: p });
875
+ } : { savedWorkflows: m });
876
876
  },
877
877
  renameWorkflow: (t, a) => {
878
- const { savedWorkflows: o, activeWorkflowId: p } = d(), c = o.map(
878
+ const { savedWorkflows: o, activeWorkflowId: m } = d(), c = o.map(
879
879
  (s) => s.id === t ? { ...s, name: a, updatedAt: Date.now() } : s
880
880
  );
881
881
  r({
882
882
  savedWorkflows: c,
883
- ...p === t ? { activeWorkflowName: a } : {}
883
+ ...m === t ? { activeWorkflowName: a } : {}
884
884
  });
885
885
  },
886
886
  duplicateWorkflow: (t) => {
887
- const { savedWorkflows: a } = d(), o = a.find((m) => m.id === t);
887
+ const { savedWorkflows: a } = d(), o = a.find((p) => p.id === t);
888
888
  if (!o) return "";
889
- const p = Date.now(), c = be(), s = {
889
+ const m = Date.now(), c = be(), s = {
890
890
  ...o,
891
891
  id: c,
892
892
  name: `${o.name} (Copy)`,
893
- createdAt: p,
894
- updatedAt: p
893
+ createdAt: m,
894
+ updatedAt: m
895
895
  };
896
896
  return r({ savedWorkflows: [...a, s] }), c;
897
897
  },
898
898
  loadGeneratedWorkflow: (t) => {
899
- const a = /* @__PURE__ */ new Map(), o = 250, p = 150, c = 3, s = t.nodes.map((l, g) => {
899
+ const a = /* @__PURE__ */ new Map(), o = 250, m = 150, c = 3, s = t.nodes.map((l, g) => {
900
900
  const b = Q();
901
901
  a.set(l.id, b);
902
902
  const f = l.nodeType.split(":"), h = f[0], y = Math.floor(g / c), C = {
903
903
  x: 100 + g % c * o,
904
- y: 100 + y * p
904
+ y: 100 + y * m
905
905
  };
906
906
  let u;
907
907
  if (h === "generator") {
908
- const x = f.slice(1).join(":"), N = d().generators.find((w) => w.name === x);
908
+ const x = f.slice(1).join(":"), N = d().generators.find((k) => k.name === x);
909
909
  u = {
910
910
  generatorName: x,
911
911
  params: l.parameters,
@@ -915,16 +915,16 @@ const k = ye()(
915
915
  maxReferenceImages: N == null ? void 0 : N.maxReferenceImages
916
916
  };
917
917
  } else if (h === "transform") {
918
- const x = f[1], N = f.slice(2).join(":"), w = d().transforms.find(
918
+ const x = f[1], N = f.slice(2).join(":"), k = d().transforms.find(
919
919
  (W) => W.providerName === x && W.name === N
920
920
  );
921
921
  u = {
922
922
  operation: N,
923
923
  providerName: x,
924
924
  params: l.parameters,
925
- isAI: w == null ? void 0 : w.isAI,
926
- acceptsReferenceImages: w == null ? void 0 : w.acceptsReferenceImages,
927
- maxReferenceImages: w == null ? void 0 : w.maxReferenceImages
925
+ isAI: k == null ? void 0 : k.isAI,
926
+ acceptsReferenceImages: k == null ? void 0 : k.acceptsReferenceImages,
927
+ maxReferenceImages: k == null ? void 0 : k.maxReferenceImages
928
928
  };
929
929
  } else if (h === "input")
930
930
  u = {
@@ -938,7 +938,7 @@ const k = ye()(
938
938
  params: l.parameters
939
939
  };
940
940
  else if (h === "text") {
941
- const x = f.slice(1).join(":"), N = l.parameters.jsonSchema, w = N != null && N.properties ? {
941
+ const x = f.slice(1).join(":"), N = l.parameters.jsonSchema, k = N != null && N.properties ? {
942
942
  type: "object",
943
943
  properties: Object.fromEntries(
944
944
  Object.entries(N.properties).map(([W, A]) => [
@@ -953,7 +953,7 @@ const k = ye()(
953
953
  u = {
954
954
  providerName: x,
955
955
  params: l.parameters,
956
- outputSchema: w
956
+ outputSchema: k
957
957
  };
958
958
  } else
959
959
  u = {
@@ -966,7 +966,7 @@ const k = ye()(
966
966
  position: C,
967
967
  data: u
968
968
  };
969
- }), m = t.edges.map((l) => {
969
+ }), p = t.edges.map((l) => {
970
970
  const g = a.get(l.source) || l.source, b = a.get(l.target) || l.target, f = [l.sourceHandle, l.targetHandle].filter(Boolean).join("_");
971
971
  return {
972
972
  id: f ? `edge_${g}_${b}_${f}` : `edge_${g}_${b}`,
@@ -978,7 +978,7 @@ const k = ye()(
978
978
  });
979
979
  r({
980
980
  nodes: s,
981
- edges: m,
981
+ edges: p,
982
982
  selectedNodeId: null,
983
983
  currentTemplateId: null,
984
984
  previewVisible: {},
@@ -1017,8 +1017,8 @@ function ae(r) {
1017
1017
  function _(r) {
1018
1018
  return r === "pending" ? "border-gray-400 dark:border-zinc-500" : r === "running" ? "border-yellow-400 animate-pulse" : r === "completed" ? "border-green-500" : r === "error" ? "border-red-500" : "";
1019
1019
  }
1020
- function pe({ nodeId: r, color: d }) {
1021
- const n = k((a) => a.previewVisible[r] !== !1), t = k((a) => a.togglePreview);
1020
+ function me({ nodeId: r, color: d }) {
1021
+ const n = w((a) => a.previewVisible[r] !== !1), t = w((a) => a.togglePreview);
1022
1022
  return /* @__PURE__ */ e(
1023
1023
  "button",
1024
1024
  {
@@ -1052,13 +1052,13 @@ const rt = H(function({
1052
1052
  data: n,
1053
1053
  selected: t
1054
1054
  }) {
1055
- const a = k((g) => g.execution.previews[d]), o = k((g) => g.execution.nodeStatus[d]), p = k((g) => g.previewVisible[d] !== !1), s = _(o) || (t ? "border-blue-500" : "border-blue-200"), m = n.isAI, l = n.acceptsReferenceImages;
1055
+ const a = w((g) => g.execution.previews[d]), o = w((g) => g.execution.nodeStatus[d]), m = w((g) => g.previewVisible[d] !== !1), s = _(o) || (t ? "border-blue-500" : "border-blue-200"), p = n.isAI, l = n.acceptsReferenceImages;
1056
1056
  return /* @__PURE__ */ i(
1057
1057
  "div",
1058
1058
  {
1059
1059
  className: `rounded-lg border-2 bg-white dark:bg-zinc-800 shadow-md min-w-[180px] overflow-hidden ${s}`,
1060
1060
  children: [
1061
- m && /* @__PURE__ */ e(
1061
+ p && /* @__PURE__ */ e(
1062
1062
  M,
1063
1063
  {
1064
1064
  type: "target",
@@ -1079,14 +1079,14 @@ const rt = H(function({
1079
1079
  title: `Reference images (up to ${n.maxReferenceImages || 14})`
1080
1080
  }
1081
1081
  ),
1082
- a && p && /* @__PURE__ */ e("div", { className: "bg-gray-100 dark:bg-zinc-900 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ e("img", { src: a, alt: "Preview", className: "w-full h-24 object-contain" }) }),
1082
+ a && m && /* @__PURE__ */ e("div", { className: "bg-gray-100 dark:bg-zinc-900 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ e("img", { src: a, alt: "Preview", className: "w-full h-24 object-contain" }) }),
1083
1083
  /* @__PURE__ */ i("div", { className: "px-4 py-3", children: [
1084
1084
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-2", children: [
1085
1085
  /* @__PURE__ */ e("div", { className: "w-3 h-3 rounded-full bg-blue-500" }),
1086
1086
  /* @__PURE__ */ e("span", { className: "font-semibold text-sm text-blue-700 dark:text-blue-400", children: n.generatorName }),
1087
- /* @__PURE__ */ e(pe, { nodeId: d, color: "text-blue-500 dark:text-blue-400" })
1087
+ /* @__PURE__ */ e(me, { nodeId: d, color: "text-blue-500 dark:text-blue-400" })
1088
1088
  ] }),
1089
- m && /* @__PURE__ */ e("div", { className: "text-[10px] text-pink-500 dark:text-pink-400 mb-1", children: "↑ Connect text node for dynamic prompt" }),
1089
+ p && /* @__PURE__ */ e("div", { className: "text-[10px] text-pink-500 dark:text-pink-400 mb-1", children: "↑ Connect text node for dynamic prompt" }),
1090
1090
  l && /* @__PURE__ */ e("div", { className: "text-[10px] text-violet-500 dark:text-violet-400 mb-1", children: "← Connect reference images" }),
1091
1091
  /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400", children: Object.entries(n.params).filter(([, g]) => typeof g != "object" || g === null).slice(0, 2).map(([g, b]) => /* @__PURE__ */ i("div", { className: "truncate", children: [
1092
1092
  g,
@@ -1103,13 +1103,13 @@ const rt = H(function({
1103
1103
  data: n,
1104
1104
  selected: t
1105
1105
  }) {
1106
- const a = k((g) => g.execution.previews[d]), o = k((g) => g.execution.nodeStatus[d]), p = k((g) => g.previewVisible[d] !== !1), s = _(o) || (t ? "border-teal-500" : "border-teal-200"), m = n.isAI, l = n.acceptsReferenceImages;
1106
+ const a = w((g) => g.execution.previews[d]), o = w((g) => g.execution.nodeStatus[d]), m = w((g) => g.previewVisible[d] !== !1), s = _(o) || (t ? "border-teal-500" : "border-teal-200"), p = n.isAI, l = n.acceptsReferenceImages;
1107
1107
  return /* @__PURE__ */ i(
1108
1108
  "div",
1109
1109
  {
1110
1110
  className: `rounded-lg border-2 bg-white dark:bg-zinc-800 shadow-md min-w-[180px] overflow-hidden ${s}`,
1111
1111
  children: [
1112
- m && /* @__PURE__ */ e(
1112
+ p && /* @__PURE__ */ e(
1113
1113
  M,
1114
1114
  {
1115
1115
  type: "target",
@@ -1130,10 +1130,10 @@ const rt = H(function({
1130
1130
  title: `Reference images (up to ${n.maxReferenceImages || 13})`
1131
1131
  }
1132
1132
  ),
1133
- a && p && /* @__PURE__ */ e("div", { className: "bg-gray-100 dark:bg-zinc-900 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ e("img", { src: a, alt: "Preview", className: "w-full h-24 object-contain" }) }),
1133
+ a && m && /* @__PURE__ */ e("div", { className: "bg-gray-100 dark:bg-zinc-900 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ e("img", { src: a, alt: "Preview", className: "w-full h-24 object-contain" }) }),
1134
1134
  /* @__PURE__ */ i("div", { className: "px-4 py-3", children: [
1135
1135
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-2", children: [
1136
- m ? /* @__PURE__ */ i("svg", { className: "w-3 h-3 text-purple-500", fill: "currentColor", viewBox: "0 0 20 20", children: [
1136
+ p ? /* @__PURE__ */ i("svg", { className: "w-3 h-3 text-purple-500", fill: "currentColor", viewBox: "0 0 20 20", children: [
1137
1137
  /* @__PURE__ */ e("path", { d: "M13 7H7v6h6V7z" }),
1138
1138
  /* @__PURE__ */ e(
1139
1139
  "path",
@@ -1147,19 +1147,19 @@ const rt = H(function({
1147
1147
  /* @__PURE__ */ e(
1148
1148
  "span",
1149
1149
  {
1150
- className: `font-semibold text-sm ${m ? "text-purple-700 dark:text-purple-400" : "text-teal-700 dark:text-teal-400"}`,
1150
+ className: `font-semibold text-sm ${p ? "text-purple-700 dark:text-purple-400" : "text-teal-700 dark:text-teal-400"}`,
1151
1151
  children: n.operation
1152
1152
  }
1153
1153
  ),
1154
1154
  /* @__PURE__ */ e(
1155
- pe,
1155
+ me,
1156
1156
  {
1157
1157
  nodeId: d,
1158
- color: m ? "text-purple-500 dark:text-purple-400" : "text-teal-500 dark:text-teal-400"
1158
+ color: p ? "text-purple-500 dark:text-purple-400" : "text-teal-500 dark:text-teal-400"
1159
1159
  }
1160
1160
  )
1161
1161
  ] }),
1162
- m && /* @__PURE__ */ e("div", { className: "text-[10px] text-pink-500 dark:text-pink-400 mb-1", children: "↑ Connect text node for dynamic prompt" }),
1162
+ p && /* @__PURE__ */ e("div", { className: "text-[10px] text-pink-500 dark:text-pink-400 mb-1", children: "↑ Connect text node for dynamic prompt" }),
1163
1163
  l && /* @__PURE__ */ e("div", { className: "text-[10px] text-violet-500 dark:text-violet-400 mb-1", children: "↓ Connect reference images" }),
1164
1164
  /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400", children: Object.entries(n.params).filter(([, g]) => typeof g != "object" || g === null).slice(0, 2).map(([g, b]) => /* @__PURE__ */ i("div", { className: "truncate", children: [
1165
1165
  g,
@@ -1172,11 +1172,11 @@ const rt = H(function({
1172
1172
  }
1173
1173
  );
1174
1174
  }), ot = H(function({ id: d, data: n, selected: t }) {
1175
- const a = k((c) => c.execution.nodeStatus[d]), p = _(a) || (t ? "border-green-500" : "border-green-200");
1175
+ const a = w((c) => c.execution.nodeStatus[d]), m = _(a) || (t ? "border-green-500" : "border-green-200");
1176
1176
  return /* @__PURE__ */ i(
1177
1177
  "div",
1178
1178
  {
1179
- className: `px-4 py-3 rounded-lg border-2 bg-white dark:bg-zinc-800 shadow-md min-w-[180px] ${p}`,
1179
+ className: `px-4 py-3 rounded-lg border-2 bg-white dark:bg-zinc-800 shadow-md min-w-[180px] ${m}`,
1180
1180
  children: [
1181
1181
  /* @__PURE__ */ e(M, { type: "target", position: T.Left, className: "w-3 h-3 !bg-green-500" }),
1182
1182
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-2", children: [
@@ -1188,7 +1188,7 @@ const rt = H(function({
1188
1188
  }
1189
1189
  );
1190
1190
  }), nt = H(function({ id: d, data: n, selected: t }) {
1191
- const a = k((v) => v.execution.previews[d]), o = k((v) => v.execution.nodeStatus[d]), p = k((v) => v.previewVisible[d] !== !1), c = k((v) => v.updateNodeData), s = se(null), l = _(o) || (t ? "border-amber-500" : "border-amber-200"), g = L(
1191
+ const a = w((v) => v.execution.previews[d]), o = w((v) => v.execution.nodeStatus[d]), m = w((v) => v.previewVisible[d] !== !1), c = w((v) => v.updateNodeData), s = se(null), l = _(o) || (t ? "border-amber-500" : "border-amber-200"), g = L(
1192
1192
  async (v) => {
1193
1193
  try {
1194
1194
  const C = await _e(v);
@@ -1218,7 +1218,7 @@ const rt = H(function({
1218
1218
  C && g(C);
1219
1219
  },
1220
1220
  [g]
1221
- ), y = a || (n.uploadId ? ke(n.uploadId) : null);
1221
+ ), y = a || (n.uploadId ? we(n.uploadId) : null);
1222
1222
  return /* @__PURE__ */ i(
1223
1223
  "div",
1224
1224
  {
@@ -1226,7 +1226,7 @@ const rt = H(function({
1226
1226
  onDrop: b,
1227
1227
  onDragOver: f,
1228
1228
  children: [
1229
- y && p ? /* @__PURE__ */ e("div", { className: "bg-gray-100 dark:bg-zinc-900 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ e("img", { src: y, alt: "Uploaded", className: "w-full h-24 object-contain" }) }) : y ? null : /* @__PURE__ */ e(
1229
+ y && m ? /* @__PURE__ */ e("div", { className: "bg-gray-100 dark:bg-zinc-900 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ e("img", { src: y, alt: "Uploaded", className: "w-full h-24 object-contain" }) }) : y ? null : /* @__PURE__ */ e(
1230
1230
  "div",
1231
1231
  {
1232
1232
  className: "bg-amber-50 dark:bg-amber-900/30 border-b border-amber-100 dark:border-amber-800 h-24 flex items-center justify-center cursor-pointer hover:bg-amber-100 dark:hover:bg-amber-900/50 transition-colors",
@@ -1254,7 +1254,7 @@ const rt = H(function({
1254
1254
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-2", children: [
1255
1255
  /* @__PURE__ */ e("div", { className: "w-3 h-3 rounded-full bg-amber-500" }),
1256
1256
  /* @__PURE__ */ e("span", { className: "font-semibold text-sm text-amber-700 dark:text-amber-400", children: "Input" }),
1257
- /* @__PURE__ */ e(pe, { nodeId: d, color: "text-amber-500 dark:text-amber-400" })
1257
+ /* @__PURE__ */ e(me, { nodeId: d, color: "text-amber-500 dark:text-amber-400" })
1258
1258
  ] }),
1259
1259
  /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 truncate", children: n.filename || "No image selected" })
1260
1260
  ] }),
@@ -1268,10 +1268,10 @@ const rt = H(function({
1268
1268
  selected: t
1269
1269
  }) {
1270
1270
  var g, b, f;
1271
- const a = k((h) => h.execution.nodeStatus[d]), o = k((h) => {
1271
+ const a = w((h) => h.execution.nodeStatus[d]), o = w((h) => {
1272
1272
  var y;
1273
1273
  return (y = h.execution.dataOutputs) == null ? void 0 : y[d];
1274
- }), p = k((h) => h.openOutputInspector), s = _(a) || (t ? "border-cyan-500" : "border-cyan-200"), m = (g = n.outputSchema) != null && g.properties ? Object.entries(n.outputSchema.properties) : [], l = m.length > 0;
1274
+ }), m = w((h) => h.openOutputInspector), s = _(a) || (t ? "border-cyan-500" : "border-cyan-200"), p = (g = n.outputSchema) != null && g.properties ? Object.entries(n.outputSchema.properties) : [], l = p.length > 0;
1275
1275
  return /* @__PURE__ */ i(
1276
1276
  "div",
1277
1277
  {
@@ -1287,7 +1287,7 @@ const rt = H(function({
1287
1287
  "button",
1288
1288
  {
1289
1289
  onClick: (h) => {
1290
- h.stopPropagation(), p(d);
1290
+ h.stopPropagation(), m(d);
1291
1291
  },
1292
1292
  className: "mt-1 text-xs text-cyan-600 dark:text-cyan-400 hover:text-cyan-800 dark:hover:text-cyan-300 hover:underline",
1293
1293
  children: "View Full Output"
@@ -1315,7 +1315,7 @@ const rt = H(function({
1315
1315
  ] }) : null }),
1316
1316
  l && /* @__PURE__ */ i("div", { className: "mt-2 pt-2 border-t border-cyan-200 dark:border-cyan-800", children: [
1317
1317
  /* @__PURE__ */ e("div", { className: "text-[10px] text-cyan-500 dark:text-cyan-400 font-medium mb-1", children: "Outputs:" }),
1318
- m.map(([h]) => /* @__PURE__ */ i(
1318
+ p.map(([h]) => /* @__PURE__ */ i(
1319
1319
  "div",
1320
1320
  {
1321
1321
  className: "text-[10px] text-gray-500 dark:text-zinc-400 flex items-center gap-1",
@@ -1340,7 +1340,7 @@ const rt = H(function({
1340
1340
  title: "Full JSON output"
1341
1341
  }
1342
1342
  ),
1343
- m.map(([h, y], v) => /* @__PURE__ */ e(
1343
+ p.map(([h, y], v) => /* @__PURE__ */ e(
1344
1344
  M,
1345
1345
  {
1346
1346
  type: "source",
@@ -1360,10 +1360,10 @@ const rt = H(function({
1360
1360
  );
1361
1361
  }), st = H(function({ id: d, data: n, selected: t }) {
1362
1362
  var g, b, f;
1363
- const a = k((h) => h.execution.nodeStatus[d]), o = k((h) => {
1363
+ const a = w((h) => h.execution.nodeStatus[d]), o = w((h) => {
1364
1364
  var y;
1365
1365
  return (y = h.execution.dataOutputs) == null ? void 0 : y[d];
1366
- }), p = k((h) => h.openOutputInspector), s = _(a) || (t ? "border-pink-500" : "border-pink-200"), m = (g = n.outputSchema) != null && g.properties ? Object.entries(n.outputSchema.properties) : [], l = m.length > 0;
1366
+ }), m = w((h) => h.openOutputInspector), s = _(a) || (t ? "border-pink-500" : "border-pink-200"), p = (g = n.outputSchema) != null && g.properties ? Object.entries(n.outputSchema.properties) : [], l = p.length > 0;
1367
1367
  return /* @__PURE__ */ i(
1368
1368
  "div",
1369
1369
  {
@@ -1379,7 +1379,7 @@ const rt = H(function({
1379
1379
  "button",
1380
1380
  {
1381
1381
  onClick: (h) => {
1382
- h.stopPropagation(), p(d);
1382
+ h.stopPropagation(), m(d);
1383
1383
  },
1384
1384
  className: "mt-1 text-xs text-pink-600 dark:text-pink-400 hover:text-pink-800 dark:hover:text-pink-300 hover:underline",
1385
1385
  children: "View Full Output"
@@ -1404,7 +1404,7 @@ const rt = H(function({
1404
1404
  ] }) : null }),
1405
1405
  l && /* @__PURE__ */ i("div", { className: "mt-2 pt-2 border-t border-pink-200 dark:border-pink-800", children: [
1406
1406
  /* @__PURE__ */ e("div", { className: "text-[10px] text-pink-500 dark:text-pink-400 font-medium mb-1", children: "Outputs:" }),
1407
- m.map(([h]) => /* @__PURE__ */ i(
1407
+ p.map(([h]) => /* @__PURE__ */ i(
1408
1408
  "div",
1409
1409
  {
1410
1410
  className: "text-[10px] text-gray-500 dark:text-zinc-400 flex items-center gap-1",
@@ -1429,7 +1429,7 @@ const rt = H(function({
1429
1429
  title: "Full JSON output"
1430
1430
  }
1431
1431
  ),
1432
- m.map(([h, y], v) => /* @__PURE__ */ e(
1432
+ p.map(([h, y], v) => /* @__PURE__ */ e(
1433
1433
  M,
1434
1434
  {
1435
1435
  type: "source",
@@ -1471,7 +1471,7 @@ const rt = H(function({
1471
1471
  interactionWidth: 20
1472
1472
  };
1473
1473
  function ct() {
1474
- const r = k((f) => f.nodes), d = k((f) => f.edges), n = k((f) => f.setNodes), t = k((f) => f.setEdges), a = k((f) => f.addEdge), o = k((f) => f.setSelectedNode), p = de(() => dt, []), c = L(
1474
+ const r = w((f) => f.nodes), d = w((f) => f.edges), n = w((f) => f.setNodes), t = w((f) => f.setEdges), a = w((f) => f.addEdge), o = w((f) => f.setSelectedNode), m = de(() => dt, []), c = L(
1475
1475
  (f) => {
1476
1476
  const { source: h, target: y, targetHandle: v } = f;
1477
1477
  if (!h || !y) return !1;
@@ -1489,7 +1489,7 @@ function ct() {
1489
1489
  n(We(f, r));
1490
1490
  },
1491
1491
  [r, n]
1492
- ), m = L(
1492
+ ), p = L(
1493
1493
  (f) => {
1494
1494
  t(Pe(f, d));
1495
1495
  },
@@ -1524,11 +1524,11 @@ function ct() {
1524
1524
  nodes: r,
1525
1525
  edges: d,
1526
1526
  onNodesChange: s,
1527
- onEdgesChange: m,
1527
+ onEdgesChange: p,
1528
1528
  onConnect: l,
1529
1529
  onNodeClick: g,
1530
1530
  onPaneClick: b,
1531
- nodeTypes: p,
1531
+ nodeTypes: m,
1532
1532
  defaultEdgeOptions: lt,
1533
1533
  isValidConnection: c,
1534
1534
  nodesDraggable: !0,
@@ -1548,14 +1548,14 @@ function ct() {
1548
1548
  }
1549
1549
  ) });
1550
1550
  }
1551
- function pt({ onSelect: r }) {
1552
- const [d, n] = I([]), [t, a] = I(!0), [o, p] = I(null), c = async () => {
1551
+ function mt({ onSelect: r }) {
1552
+ const [d, n] = I([]), [t, a] = I(!0), [o, m] = I(null), c = async () => {
1553
1553
  try {
1554
1554
  a(!0);
1555
1555
  const l = await Ke();
1556
- n(l), p(null);
1556
+ n(l), m(null);
1557
1557
  } catch (l) {
1558
- p(l instanceof Error ? l.message : "Failed to load uploads");
1558
+ m(l instanceof Error ? l.message : "Failed to load uploads");
1559
1559
  } finally {
1560
1560
  a(!1);
1561
1561
  }
@@ -1570,7 +1570,7 @@ function pt({ onSelect: r }) {
1570
1570
  } catch (b) {
1571
1571
  console.error("Failed to delete:", b);
1572
1572
  }
1573
- }, m = (l) => l < 1024 ? `${l} B` : l < 1024 * 1024 ? `${(l / 1024).toFixed(1)} KB` : `${(l / (1024 * 1024)).toFixed(1)} MB`;
1573
+ }, p = (l) => l < 1024 ? `${l} B` : l < 1024 * 1024 ? `${(l / 1024).toFixed(1)} KB` : `${(l / (1024 * 1024)).toFixed(1)} MB`;
1574
1574
  return t ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500 dark:text-zinc-400", children: "Loading uploads..." }) : o ? /* @__PURE__ */ i("div", { className: "p-4 text-center text-red-500 dark:text-red-400", children: [
1575
1575
  o,
1576
1576
  /* @__PURE__ */ e(
@@ -1590,7 +1590,7 @@ function pt({ onSelect: r }) {
1590
1590
  /* @__PURE__ */ e(
1591
1591
  "img",
1592
1592
  {
1593
- src: ke(l.id),
1593
+ src: we(l.id),
1594
1594
  alt: l.filename,
1595
1595
  className: "w-full h-20 object-cover"
1596
1596
  }
@@ -1604,14 +1604,14 @@ function pt({ onSelect: r }) {
1604
1604
  }
1605
1605
  ) }),
1606
1606
  /* @__PURE__ */ e("div", { className: "p-1 text-xs truncate bg-white dark:bg-zinc-800 text-gray-800 dark:text-zinc-200", children: l.filename }),
1607
- /* @__PURE__ */ e("div", { className: "px-1 pb-1 text-xs text-gray-400 dark:text-zinc-500 bg-white dark:bg-zinc-800", children: m(l.size) })
1607
+ /* @__PURE__ */ e("div", { className: "px-1 pb-1 text-xs text-gray-400 dark:text-zinc-500 bg-white dark:bg-zinc-800", children: p(l.size) })
1608
1608
  ]
1609
1609
  },
1610
1610
  l.id
1611
1611
  )) }) });
1612
1612
  }
1613
- function mt() {
1614
- const r = k((w) => w.setGenerators), d = k((w) => w.setTransforms), n = k((w) => w.setTextProviders), t = k((w) => w.setVisionProviders), a = k((w) => w.generators), o = k((w) => w.transforms), p = k((w) => w.textProviders), c = k((w) => w.visionProviders), s = k((w) => w.addNode), [m, l] = I(!1), { data: g } = X({
1613
+ function pt() {
1614
+ const r = w((k) => k.setGenerators), d = w((k) => k.setTransforms), n = w((k) => k.setTextProviders), t = w((k) => k.setVisionProviders), a = w((k) => k.generators), o = w((k) => k.transforms), m = w((k) => k.textProviders), c = w((k) => k.visionProviders), s = w((k) => k.addNode), [p, l] = I(!1), { data: g } = X({
1615
1615
  queryKey: ["generators"],
1616
1616
  queryFn: Ee
1617
1617
  }), { data: b } = X({
@@ -1633,10 +1633,10 @@ function mt() {
1633
1633
  }, [f, n]), B(() => {
1634
1634
  h && t(h);
1635
1635
  }, [h, t]);
1636
- const y = (w, W) => {
1637
- w.dataTransfer.setData("application/json", JSON.stringify(W)), w.dataTransfer.effectAllowed = "move";
1638
- }, v = (w) => {
1639
- s(w, { x: 250, y: 150 + Math.random() * 100 });
1636
+ const y = (k, W) => {
1637
+ k.dataTransfer.setData("application/json", JSON.stringify(W)), k.dataTransfer.effectAllowed = "move";
1638
+ }, v = (k) => {
1639
+ s(k, { x: 250, y: 150 + Math.random() * 100 });
1640
1640
  }, C = {
1641
1641
  id: "input:upload",
1642
1642
  type: "input",
@@ -1670,15 +1670,15 @@ function mt() {
1670
1670
  }
1671
1671
  }
1672
1672
  }, x = a.reduce(
1673
- (w, W) => {
1673
+ (k, W) => {
1674
1674
  const A = W.category || "Other";
1675
- return w[A] || (w[A] = []), w[A].push(W), w;
1675
+ return k[A] || (k[A] = []), k[A].push(W), k;
1676
1676
  },
1677
1677
  {}
1678
1678
  ), N = o.reduce(
1679
- (w, W) => {
1679
+ (k, W) => {
1680
1680
  const A = W.category || "Other";
1681
- return w[A] || (w[A] = []), w[A].push(W), w;
1681
+ return k[A] || (k[A] = []), k[A].push(W), k;
1682
1682
  },
1683
1683
  {}
1684
1684
  );
@@ -1690,10 +1690,10 @@ function mt() {
1690
1690
  /* @__PURE__ */ i(
1691
1691
  "button",
1692
1692
  {
1693
- onClick: () => l(!m),
1693
+ onClick: () => l(!p),
1694
1694
  className: "text-xs text-amber-600 dark:text-amber-400 hover:text-amber-700 dark:hover:text-amber-300",
1695
1695
  children: [
1696
- m ? "Hide" : "Browse",
1696
+ p ? "Hide" : "Browse",
1697
1697
  " Uploads"
1698
1698
  ]
1699
1699
  }
@@ -1703,7 +1703,7 @@ function mt() {
1703
1703
  "div",
1704
1704
  {
1705
1705
  draggable: !0,
1706
- onDragStart: (w) => y(w, C),
1706
+ onDragStart: (k) => y(k, C),
1707
1707
  onDoubleClick: () => v(C),
1708
1708
  className: "px-3 py-2 bg-amber-50 dark:bg-amber-900/30 border border-amber-200 dark:border-amber-700 rounded cursor-grab active:cursor-grabbing hover:bg-amber-100 dark:hover:bg-amber-900/50 transition-colors",
1709
1709
  children: [
@@ -1712,12 +1712,12 @@ function mt() {
1712
1712
  ]
1713
1713
  }
1714
1714
  ),
1715
- m && /* @__PURE__ */ e("div", { className: "mt-2 border border-amber-200 dark:border-amber-700 rounded bg-white dark:bg-zinc-900 max-h-64 overflow-y-auto", children: /* @__PURE__ */ e(pt, {}) })
1715
+ p && /* @__PURE__ */ e("div", { className: "mt-2 border border-amber-200 dark:border-amber-700 rounded bg-white dark:bg-zinc-900 max-h-64 overflow-y-auto", children: /* @__PURE__ */ e(mt, {}) })
1716
1716
  ] }),
1717
1717
  /* @__PURE__ */ i("div", { className: "mb-6", children: [
1718
1718
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-blue-600 dark:text-blue-400 uppercase tracking-wide mb-2", children: "Generators" }),
1719
- Object.entries(x).map(([w, W]) => /* @__PURE__ */ i("div", { className: "mb-3", children: [
1720
- /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 mb-1", children: w }),
1719
+ Object.entries(x).map(([k, W]) => /* @__PURE__ */ i("div", { className: "mb-3", children: [
1720
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 mb-1", children: k }),
1721
1721
  W.map((A) => /* @__PURE__ */ i(
1722
1722
  "div",
1723
1723
  {
@@ -1732,12 +1732,12 @@ function mt() {
1732
1732
  },
1733
1733
  A.id
1734
1734
  ))
1735
- ] }, w))
1735
+ ] }, k))
1736
1736
  ] }),
1737
1737
  /* @__PURE__ */ i("div", { className: "mb-6", children: [
1738
1738
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-teal-600 dark:text-teal-400 uppercase tracking-wide mb-2", children: "Transforms" }),
1739
- Object.entries(N).map(([w, W]) => /* @__PURE__ */ i("div", { className: "mb-3", children: [
1740
- /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 mb-1", children: w }),
1739
+ Object.entries(N).map(([k, W]) => /* @__PURE__ */ i("div", { className: "mb-3", children: [
1740
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 mb-1", children: k }),
1741
1741
  W.map((A) => /* @__PURE__ */ i(
1742
1742
  "div",
1743
1743
  {
@@ -1752,40 +1752,40 @@ function mt() {
1752
1752
  },
1753
1753
  A.id
1754
1754
  ))
1755
- ] }, w))
1755
+ ] }, k))
1756
1756
  ] }),
1757
- p.length > 0 && /* @__PURE__ */ i("div", { className: "mb-6", children: [
1757
+ m.length > 0 && /* @__PURE__ */ i("div", { className: "mb-6", children: [
1758
1758
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-pink-600 dark:text-pink-400 uppercase tracking-wide mb-2", children: "AI Text" }),
1759
- p.map((w) => /* @__PURE__ */ i(
1759
+ m.map((k) => /* @__PURE__ */ i(
1760
1760
  "div",
1761
1761
  {
1762
1762
  draggable: !0,
1763
- onDragStart: (W) => y(W, w),
1764
- onDoubleClick: () => v(w),
1763
+ onDragStart: (W) => y(W, k),
1764
+ onDoubleClick: () => v(k),
1765
1765
  className: "px-3 py-2 bg-pink-50 dark:bg-pink-900/30 border border-pink-200 dark:border-pink-700 rounded mb-1 cursor-grab active:cursor-grabbing hover:bg-pink-100 dark:hover:bg-pink-900/50 transition-colors",
1766
1766
  children: [
1767
- /* @__PURE__ */ e("div", { className: "text-sm font-medium text-pink-700 dark:text-pink-300", children: w.label }),
1768
- w.description && /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 truncate", children: w.description })
1767
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium text-pink-700 dark:text-pink-300", children: k.label }),
1768
+ k.description && /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 truncate", children: k.description })
1769
1769
  ]
1770
1770
  },
1771
- w.id
1771
+ k.id
1772
1772
  ))
1773
1773
  ] }),
1774
1774
  c.length > 0 && /* @__PURE__ */ i("div", { className: "mb-6", children: [
1775
1775
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-cyan-600 dark:text-cyan-400 uppercase tracking-wide mb-2", children: "AI Vision" }),
1776
- c.map((w) => /* @__PURE__ */ i(
1776
+ c.map((k) => /* @__PURE__ */ i(
1777
1777
  "div",
1778
1778
  {
1779
1779
  draggable: !0,
1780
- onDragStart: (W) => y(W, w),
1781
- onDoubleClick: () => v(w),
1780
+ onDragStart: (W) => y(W, k),
1781
+ onDoubleClick: () => v(k),
1782
1782
  className: "px-3 py-2 bg-cyan-50 dark:bg-cyan-900/30 border border-cyan-200 dark:border-cyan-700 rounded mb-1 cursor-grab active:cursor-grabbing hover:bg-cyan-100 dark:hover:bg-cyan-900/50 transition-colors",
1783
1783
  children: [
1784
- /* @__PURE__ */ e("div", { className: "text-sm font-medium text-cyan-700 dark:text-cyan-300", children: w.label }),
1785
- w.description && /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 truncate", children: w.description })
1784
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium text-cyan-700 dark:text-cyan-300", children: k.label }),
1785
+ k.description && /* @__PURE__ */ e("div", { className: "text-xs text-gray-500 dark:text-zinc-400 truncate", children: k.description })
1786
1786
  ]
1787
1787
  },
1788
- w.id
1788
+ k.id
1789
1789
  ))
1790
1790
  ] }),
1791
1791
  /* @__PURE__ */ i("div", { className: "mb-6", children: [
@@ -1794,7 +1794,7 @@ function mt() {
1794
1794
  "div",
1795
1795
  {
1796
1796
  draggable: !0,
1797
- onDragStart: (w) => y(w, u),
1797
+ onDragStart: (k) => y(k, u),
1798
1798
  onDoubleClick: () => v(u),
1799
1799
  className: "px-3 py-2 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 rounded cursor-grab active:cursor-grabbing hover:bg-green-100 dark:hover:bg-green-900/50 transition-colors",
1800
1800
  children: [
@@ -1808,19 +1808,19 @@ function mt() {
1808
1808
  }
1809
1809
  function gt() {
1810
1810
  var h, y, v, C;
1811
- const r = k((u) => u.selectedNodeId), d = k((u) => u.nodes), n = k((u) => u.generators), t = k((u) => u.transforms), a = k((u) => u.textProviders), o = k((u) => u.visionProviders), p = k((u) => u.updateNodeData), c = k((u) => u.deleteNode), s = d.find((u) => u.id === r);
1811
+ const r = w((u) => u.selectedNodeId), d = w((u) => u.nodes), n = w((u) => u.generators), t = w((u) => u.transforms), a = w((u) => u.textProviders), o = w((u) => u.visionProviders), m = w((u) => u.updateNodeData), c = w((u) => u.deleteNode), s = d.find((u) => u.id === r);
1812
1812
  if (!s)
1813
1813
  return /* @__PURE__ */ e("div", { className: "w-80 bg-gray-50 dark:bg-zinc-800 border-l border-gray-200 dark:border-zinc-700 p-4", children: /* @__PURE__ */ e("div", { className: "text-gray-500 dark:text-zinc-400 text-sm", children: "Select a node to edit its properties" }) });
1814
- let m, l = "";
1814
+ let p, l = "";
1815
1815
  if (s.type === "generator") {
1816
1816
  const u = s.data, x = n.find((N) => N.name === u.generatorName);
1817
- m = (h = x == null ? void 0 : x.params) == null ? void 0 : h.properties, l = (x == null ? void 0 : x.label) || u.generatorName;
1817
+ p = (h = x == null ? void 0 : x.params) == null ? void 0 : h.properties, l = (x == null ? void 0 : x.label) || u.generatorName;
1818
1818
  } else if (s.type === "transform") {
1819
1819
  const u = s.data, x = t.find((N) => N.name === u.operation);
1820
- m = (y = x == null ? void 0 : x.params) == null ? void 0 : y.properties, l = (x == null ? void 0 : x.label) || u.operation;
1820
+ p = (y = x == null ? void 0 : x.params) == null ? void 0 : y.properties, l = (x == null ? void 0 : x.label) || u.operation;
1821
1821
  } else if (s.type === "save") {
1822
1822
  const x = s.data.provider === "floimg-cloud";
1823
- l = x ? "Save to FloImg Cloud" : "Save", m = {
1823
+ l = x ? "Save to FloImg Cloud" : "Save", p = {
1824
1824
  destination: {
1825
1825
  type: "string",
1826
1826
  title: x ? "Filename" : "Destination",
@@ -1829,32 +1829,32 @@ function gt() {
1829
1829
  };
1830
1830
  } else if (s.type === "text") {
1831
1831
  const u = s.data, x = a.find((N) => N.name === u.providerName);
1832
- m = (v = x == null ? void 0 : x.params) == null ? void 0 : v.properties, l = (x == null ? void 0 : x.label) || u.providerName;
1832
+ p = (v = x == null ? void 0 : x.params) == null ? void 0 : v.properties, l = (x == null ? void 0 : x.label) || u.providerName;
1833
1833
  } else if (s.type === "vision") {
1834
1834
  const u = s.data, x = o.find((N) => N.name === u.providerName);
1835
- m = (C = x == null ? void 0 : x.params) == null ? void 0 : C.properties, l = (x == null ? void 0 : x.label) || u.providerName;
1835
+ p = (C = x == null ? void 0 : x.params) == null ? void 0 : C.properties, l = (x == null ? void 0 : x.label) || u.providerName;
1836
1836
  }
1837
1837
  const g = (u, x) => {
1838
1838
  if (s.type === "generator") {
1839
1839
  const N = s.data;
1840
- p(s.id, {
1840
+ m(s.id, {
1841
1841
  params: { ...N.params, [u]: x }
1842
1842
  });
1843
1843
  } else if (s.type === "transform") {
1844
1844
  const N = s.data;
1845
- p(s.id, {
1845
+ m(s.id, {
1846
1846
  params: { ...N.params, [u]: x }
1847
1847
  });
1848
1848
  } else if (s.type === "save")
1849
- p(s.id, { [u]: x });
1849
+ m(s.id, { [u]: x });
1850
1850
  else if (s.type === "text") {
1851
1851
  const N = s.data;
1852
- p(s.id, {
1852
+ m(s.id, {
1853
1853
  params: { ...N.params, [u]: x }
1854
1854
  });
1855
1855
  } else if (s.type === "vision") {
1856
1856
  const N = s.data;
1857
- p(s.id, {
1857
+ m(s.id, {
1858
1858
  params: { ...N.params, [u]: x }
1859
1859
  });
1860
1860
  }
@@ -1871,15 +1871,15 @@ function gt() {
1871
1871
  return s.data.params[u];
1872
1872
  }, f = (u, x) => {
1873
1873
  if (s.type === "generator" && s.data.generatorName === "shapes") {
1874
- const N = b("shapeType") || "rectangle", w = b("fillType") || "solid";
1874
+ const N = b("shapeType") || "rectangle", k = b("fillType") || "solid";
1875
1875
  if (u === "sides") return N === "polygon";
1876
1876
  if (u === "points" || u === "innerRadius") return N === "star";
1877
1877
  if (u === "cornerRadius") return N === "rectangle";
1878
- if (u === "fillColor") return w === "solid";
1878
+ if (u === "fillColor") return k === "solid";
1879
1879
  if (u === "gradientType" || u === "gradientColor1" || u === "gradientColor2" || u === "gradientAngle")
1880
- return w === "gradient";
1880
+ return k === "gradient";
1881
1881
  if (u === "patternType" || u === "patternColor" || u === "patternBackground" || u === "patternScale")
1882
- return w === "pattern";
1882
+ return k === "pattern";
1883
1883
  }
1884
1884
  return !0;
1885
1885
  };
@@ -1895,7 +1895,7 @@ function gt() {
1895
1895
  }
1896
1896
  )
1897
1897
  ] }),
1898
- /* @__PURE__ */ e("div", { className: "space-y-4", children: m && Object.entries(m).filter(([u, x]) => f(u)).map(([u, x]) => /* @__PURE__ */ e(
1898
+ /* @__PURE__ */ e("div", { className: "space-y-4", children: p && Object.entries(p).filter(([u, x]) => f(u)).map(([u, x]) => /* @__PURE__ */ e(
1899
1899
  ut,
1900
1900
  {
1901
1901
  name: u,
@@ -1910,7 +1910,7 @@ function gt() {
1910
1910
  {
1911
1911
  nodeId: s.id,
1912
1912
  outputSchema: s.data.outputSchema,
1913
- updateNodeData: p
1913
+ updateNodeData: m
1914
1914
  }
1915
1915
  )
1916
1916
  ] }) });
@@ -1923,11 +1923,11 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
1923
1923
  "select",
1924
1924
  {
1925
1925
  value: String(n || ""),
1926
- onChange: (p) => t(p.target.value),
1926
+ onChange: (m) => t(m.target.value),
1927
1927
  className: o,
1928
1928
  children: [
1929
1929
  /* @__PURE__ */ e("option", { value: "", children: "Select..." }),
1930
- d.enum.map((p) => /* @__PURE__ */ e("option", { value: p, children: p }, p))
1930
+ d.enum.map((m) => /* @__PURE__ */ e("option", { value: m, children: m }, m))
1931
1931
  ]
1932
1932
  }
1933
1933
  ),
@@ -1939,7 +1939,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
1939
1939
  {
1940
1940
  type: "number",
1941
1941
  value: n !== void 0 ? Number(n) : "",
1942
- onChange: (p) => t(Number(p.target.value)),
1942
+ onChange: (m) => t(Number(m.target.value)),
1943
1943
  min: d.minimum,
1944
1944
  max: d.maximum,
1945
1945
  className: o
@@ -1952,7 +1952,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
1952
1952
  {
1953
1953
  type: "checkbox",
1954
1954
  checked: !!n,
1955
- onChange: (p) => t(p.target.checked),
1955
+ onChange: (m) => t(m.target.checked),
1956
1956
  className: "h-4 w-4 text-teal-600 focus:ring-teal-500 border-gray-300 dark:border-zinc-600 rounded bg-white dark:bg-zinc-900"
1957
1957
  }
1958
1958
  ),
@@ -1965,7 +1965,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
1965
1965
  {
1966
1966
  type: "color",
1967
1967
  value: String(n || "#000000"),
1968
- onChange: (p) => t(p.target.value),
1968
+ onChange: (m) => t(m.target.value),
1969
1969
  className: "h-10 w-14 p-1 border border-gray-300 dark:border-zinc-600 rounded"
1970
1970
  }
1971
1971
  ),
@@ -1974,7 +1974,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
1974
1974
  {
1975
1975
  type: "text",
1976
1976
  value: String(n || ""),
1977
- onChange: (p) => t(p.target.value),
1977
+ onChange: (m) => t(m.target.value),
1978
1978
  className: o + " flex-1"
1979
1979
  }
1980
1980
  )
@@ -1985,9 +1985,9 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
1985
1985
  "textarea",
1986
1986
  {
1987
1987
  value: n ? JSON.stringify(n, null, 2) : "{}",
1988
- onChange: (p) => {
1988
+ onChange: (m) => {
1989
1989
  try {
1990
- t(JSON.parse(p.target.value));
1990
+ t(JSON.parse(m.target.value));
1991
1991
  } catch {
1992
1992
  }
1993
1993
  },
@@ -2002,7 +2002,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
2002
2002
  "textarea",
2003
2003
  {
2004
2004
  value: String(n || ""),
2005
- onChange: (p) => t(p.target.value),
2005
+ onChange: (m) => t(m.target.value),
2006
2006
  rows: 3,
2007
2007
  className: o
2008
2008
  }
@@ -2011,7 +2011,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
2011
2011
  {
2012
2012
  type: "text",
2013
2013
  value: String(n || ""),
2014
- onChange: (p) => t(p.target.value),
2014
+ onChange: (m) => t(m.target.value),
2015
2015
  className: o
2016
2016
  }
2017
2017
  ),
@@ -2019,7 +2019,7 @@ function ut({ name: r, field: d, value: n, onChange: t }) {
2019
2019
  ] });
2020
2020
  }
2021
2021
  function ht({ nodeId: r, outputSchema: d, updateNodeData: n }) {
2022
- const [t, a] = I(""), o = (d == null ? void 0 : d.properties) || {}, p = Object.entries(o), c = () => {
2022
+ const [t, a] = I(""), o = (d == null ? void 0 : d.properties) || {}, m = Object.entries(o), c = () => {
2023
2023
  if (!t.trim()) return;
2024
2024
  const g = {
2025
2025
  type: "object",
@@ -2034,7 +2034,7 @@ function ht({ nodeId: r, outputSchema: d, updateNodeData: n }) {
2034
2034
  delete b[g], Object.keys(b).length === 0 ? n(r, { outputSchema: void 0 }) : n(r, {
2035
2035
  outputSchema: { type: "object", properties: b }
2036
2036
  });
2037
- }, m = (g, b) => {
2037
+ }, p = (g, b) => {
2038
2038
  n(r, {
2039
2039
  outputSchema: {
2040
2040
  type: "object",
@@ -2058,10 +2058,10 @@ function ht({ nodeId: r, outputSchema: d, updateNodeData: n }) {
2058
2058
  return /* @__PURE__ */ i("div", { className: "mt-6 pt-4 border-t border-gray-200 dark:border-zinc-700", children: [
2059
2059
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
2060
2060
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-gray-700 dark:text-zinc-300", children: "Output Schema" }),
2061
- /* @__PURE__ */ e("span", { className: "text-xs text-gray-500 dark:text-zinc-500", children: p.length > 0 ? `${p.length} output${p.length > 1 ? "s" : ""}` : "No outputs defined" })
2061
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-500 dark:text-zinc-500", children: m.length > 0 ? `${m.length} output${m.length > 1 ? "s" : ""}` : "No outputs defined" })
2062
2062
  ] }),
2063
2063
  /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 dark:text-zinc-400 mb-3", children: "Define output properties to enable connecting individual JSON fields to other nodes." }),
2064
- p.length > 0 && /* @__PURE__ */ e("div", { className: "space-y-2 mb-3", children: p.map(([g, b]) => /* @__PURE__ */ i(
2064
+ m.length > 0 && /* @__PURE__ */ e("div", { className: "space-y-2 mb-3", children: m.map(([g, b]) => /* @__PURE__ */ i(
2065
2065
  "div",
2066
2066
  {
2067
2067
  className: "flex items-center gap-2 p-2 bg-pink-50 dark:bg-pink-900/20 rounded border border-pink-200 dark:border-pink-800",
@@ -2073,7 +2073,7 @@ function ht({ nodeId: r, outputSchema: d, updateNodeData: n }) {
2073
2073
  "select",
2074
2074
  {
2075
2075
  value: b.type,
2076
- onChange: (f) => m(g, f.target.value),
2076
+ onChange: (f) => p(g, f.target.value),
2077
2077
  className: "text-xs px-1.5 py-0.5 rounded border border-pink-300 dark:border-pink-700 bg-white dark:bg-zinc-800 text-gray-700 dark:text-zinc-300",
2078
2078
  children: [
2079
2079
  /* @__PURE__ */ e("option", { value: "string", children: "string" }),
@@ -2139,7 +2139,7 @@ function ht({ nodeId: r, outputSchema: d, updateNodeData: n }) {
2139
2139
  }
2140
2140
  )
2141
2141
  ] }),
2142
- p.length > 0 && /* @__PURE__ */ e("p", { className: "mt-3 text-xs text-gray-500 dark:text-zinc-500", children: "Connect from the small pink handles on the right of the node to route individual properties." })
2142
+ m.length > 0 && /* @__PURE__ */ e("p", { className: "mt-3 text-xs text-gray-500 dark:text-zinc-500", children: "Connect from the small pink handles on the right of the node to route individual properties." })
2143
2143
  ] });
2144
2144
  }
2145
2145
  function ft(r, d) {
@@ -2153,17 +2153,17 @@ function ft(r, d) {
2153
2153
  const o = [];
2154
2154
  for (const [c, s] of t)
2155
2155
  s === 0 && o.push(c);
2156
- const p = [];
2156
+ const m = [];
2157
2157
  for (; o.length > 0; ) {
2158
2158
  const c = o.shift(), s = n.get(c);
2159
- s && p.push(s);
2160
- const m = a.get(c) || [];
2161
- for (const l of m) {
2159
+ s && m.push(s);
2160
+ const p = a.get(c) || [];
2161
+ for (const l of p) {
2162
2162
  const g = (t.get(l) || 1) - 1;
2163
2163
  t.set(l, g), g === 0 && o.push(l);
2164
2164
  }
2165
2165
  }
2166
- return p;
2166
+ return m;
2167
2167
  }
2168
2168
  function bt(r) {
2169
2169
  const d = r.type || "node", n = r.id.replace(/[^a-zA-Z0-9]/g, "_");
@@ -2174,17 +2174,17 @@ function Y(r) {
2174
2174
  `) ? "`" + r.replace(/`/g, "\\`").replace(/\$/g, "\\$") + "`" : JSON.stringify(r) : JSON.stringify(r, null, 2);
2175
2175
  }
2176
2176
  function xt(r, d, n) {
2177
- const t = n.get(r.id), a = [], o = d.find((c) => c.target === r.id), p = o ? n.get(o.source) : null;
2177
+ const t = n.get(r.id), a = [], o = d.find((c) => c.target === r.id), m = o ? n.get(o.source) : null;
2178
2178
  switch (r.type) {
2179
2179
  case "generator": {
2180
2180
  const c = r.data;
2181
2181
  a.push(c.generatorName);
2182
- const s = c.params || {}, m = Object.entries(s).filter(([, l]) => l !== void 0 && l !== "").map(([l, g]) => ` ${l}: ${Y(g)}`).join(`,
2182
+ const s = c.params || {}, p = Object.entries(s).filter(([, l]) => l !== void 0 && l !== "").map(([l, g]) => ` ${l}: ${Y(g)}`).join(`,
2183
2183
  `);
2184
2184
  return {
2185
2185
  code: `// Generate image using ${c.generatorName}
2186
2186
  const ${t} = await ${c.generatorName}({
2187
- ${m}
2187
+ ${p}
2188
2188
  });`,
2189
2189
  imports: a
2190
2190
  };
@@ -2196,21 +2196,21 @@ const ${t} = await flo.loadImage("./input.png");`,
2196
2196
  imports: []
2197
2197
  };
2198
2198
  case "transform": {
2199
- const c = r.data, s = c.params || {}, m = Object.entries(s).filter(([, g]) => g !== void 0 && g !== "").map(([g, b]) => `${g}: ${Y(b)}`).join(", "), l = p || "image";
2199
+ const c = r.data, s = c.params || {}, p = Object.entries(s).filter(([, g]) => g !== void 0 && g !== "").map(([g, b]) => `${g}: ${Y(b)}`).join(", "), l = m || "image";
2200
2200
  return {
2201
2201
  code: `// Apply ${c.operation} transform
2202
- const ${t} = await flo.transform(${l}, "${c.operation}"${m ? `, { ${m} }` : ""});`,
2202
+ const ${t} = await flo.transform(${l}, "${c.operation}"${p ? `, { ${p} }` : ""});`,
2203
2203
  imports: []
2204
2204
  };
2205
2205
  }
2206
2206
  case "vision": {
2207
2207
  const c = r.data;
2208
2208
  a.push(c.providerName);
2209
- const s = c.params || {}, m = p || "image", l = Object.entries(s).filter(([, g]) => g !== void 0 && g !== "").map(([g, b]) => ` ${g}: ${Y(b)}`).join(`,
2209
+ const s = c.params || {}, p = m || "image", l = Object.entries(s).filter(([, g]) => g !== void 0 && g !== "").map(([g, b]) => ` ${g}: ${Y(b)}`).join(`,
2210
2210
  `);
2211
2211
  return {
2212
2212
  code: `// Analyze image with ${c.providerName}
2213
- const ${t} = await ${c.providerName}.analyze(${m}, {
2213
+ const ${t} = await ${c.providerName}.analyze(${p}, {
2214
2214
  ${l}
2215
2215
  });`,
2216
2216
  imports: a
@@ -2219,12 +2219,12 @@ ${l}
2219
2219
  case "text": {
2220
2220
  const c = r.data;
2221
2221
  a.push(c.providerName);
2222
- const s = c.params || {}, m = Object.entries(s).filter(([, l]) => l !== void 0 && l !== "").map(([l, g]) => ` ${l}: ${Y(g)}`).join(`,
2222
+ const s = c.params || {}, p = Object.entries(s).filter(([, l]) => l !== void 0 && l !== "").map(([l, g]) => ` ${l}: ${Y(g)}`).join(`,
2223
2223
  `);
2224
2224
  return {
2225
2225
  code: `// Generate text with ${c.providerName}
2226
2226
  const ${t} = await ${c.providerName}.generate({
2227
- ${m}
2227
+ ${p}
2228
2228
  });`,
2229
2229
  imports: a
2230
2230
  };
@@ -2233,7 +2233,7 @@ ${m}
2233
2233
  const c = r.data;
2234
2234
  return {
2235
2235
  code: `// Save result
2236
- await flo.save(${p || "result"}, ${Y(c.destination)});`,
2236
+ await flo.save(${m || "result"}, ${Y(c.destination)});`,
2237
2237
  imports: []
2238
2238
  };
2239
2239
  }
@@ -2249,17 +2249,17 @@ function yt(r, d) {
2249
2249
  return `// Empty workflow
2250
2250
  // Add nodes to your canvas to generate code`;
2251
2251
  const n = ft(r, d), t = /* @__PURE__ */ new Map();
2252
- for (const m of n)
2253
- t.set(m.id, bt(m));
2252
+ for (const p of n)
2253
+ t.set(p.id, bt(p));
2254
2254
  const a = /* @__PURE__ */ new Set(), o = [];
2255
- for (const m of n) {
2256
- const { code: l, imports: g } = xt(m, d, t);
2255
+ for (const p of n) {
2256
+ const { code: l, imports: g } = xt(p, d, t);
2257
2257
  o.push(l);
2258
2258
  for (const b of g)
2259
2259
  a.add(b);
2260
2260
  }
2261
- const p = [];
2262
- a.size > 0 && p.push(`import { ${Array.from(a).join(", ")} } from "@teamflojo/floimg";`), p.push('import * as flo from "@teamflojo/floimg";');
2261
+ const m = [];
2262
+ a.size > 0 && m.push(`import { ${Array.from(a).join(", ")} } from "@teamflojo/floimg";`), m.push('import * as flo from "@teamflojo/floimg";');
2263
2263
  const c = `/**
2264
2264
  * FloImg Workflow
2265
2265
  * Generated by FloImg Studio
@@ -2269,7 +2269,7 @@ function yt(r, d) {
2269
2269
  `, s = `
2270
2270
  async function runWorkflow() {
2271
2271
  ${o.map(
2272
- (m) => m.split(`
2272
+ (p) => p.split(`
2273
2273
  `).map((l) => " " + l).join(`
2274
2274
  `)
2275
2275
  ).join(`
@@ -2280,17 +2280,17 @@ ${o.map(
2280
2280
  // Run the workflow
2281
2281
  runWorkflow().catch(console.error);
2282
2282
  `;
2283
- return c + p.join(`
2283
+ return c + m.join(`
2284
2284
  `) + `
2285
2285
  ` + s;
2286
2286
  }
2287
- function wt({ isOpen: r, onClose: d, onImport: n }) {
2288
- const [t, a] = I(""), [o, p] = I(!1), [c, s] = I(null), [m, l] = I(!1), g = L(async () => {
2287
+ function kt({ isOpen: r, onClose: d, onImport: n }) {
2288
+ const [t, a] = I(""), [o, m] = I(!1), [c, s] = I(null), [p, l] = I(!1), g = L(async () => {
2289
2289
  if (!t.trim()) {
2290
2290
  s({ message: "Please enter or paste YAML content" });
2291
2291
  return;
2292
2292
  }
2293
- p(!0), s(null);
2293
+ m(!0), s(null);
2294
2294
  try {
2295
2295
  const u = await Qe(t);
2296
2296
  u.success ? (n(u.nodes, u.edges, u.name), a(""), d()) : s({
@@ -2301,21 +2301,21 @@ function wt({ isOpen: r, onClose: d, onImport: n }) {
2301
2301
  } catch (u) {
2302
2302
  s({ message: u instanceof Error ? u.message : "Import failed" });
2303
2303
  } finally {
2304
- p(!1);
2304
+ m(!1);
2305
2305
  }
2306
2306
  }, [t, n, d]), b = L(async () => {
2307
2307
  if (!t.trim()) {
2308
2308
  s({ message: "Please enter or paste YAML content" });
2309
2309
  return;
2310
2310
  }
2311
- p(!0), s(null);
2311
+ m(!0), s(null);
2312
2312
  try {
2313
2313
  const u = await Ye(t);
2314
2314
  u.valid ? (s(null), s({ message: "Valid YAML!" }), setTimeout(() => s(null), 2e3)) : u.errors.length > 0 && s(u.errors[0]);
2315
2315
  } catch (u) {
2316
2316
  s({ message: u instanceof Error ? u.message : "Validation failed" });
2317
2317
  } finally {
2318
- p(!1);
2318
+ m(!1);
2319
2319
  }
2320
2320
  }, [t]), f = L(async (u) => {
2321
2321
  if (!u.name.endsWith(".yaml") && !u.name.endsWith(".yml")) {
@@ -2375,7 +2375,7 @@ function wt({ isOpen: r, onClose: d, onImport: n }) {
2375
2375
  onDragOver: h,
2376
2376
  onDragLeave: y,
2377
2377
  onDrop: v,
2378
- className: `border-2 border-dashed rounded-lg p-4 mb-4 text-center transition-colors ${m ? "border-teal-500 bg-teal-50 dark:bg-teal-900/20" : "border-gray-300 dark:border-zinc-600"}`,
2378
+ className: `border-2 border-dashed rounded-lg p-4 mb-4 text-center transition-colors ${p ? "border-teal-500 bg-teal-50 dark:bg-teal-900/20" : "border-gray-300 dark:border-zinc-600"}`,
2379
2379
  children: [
2380
2380
  /* @__PURE__ */ e(
2381
2381
  "input",
@@ -2515,14 +2515,14 @@ steps:
2515
2515
  ] })
2516
2516
  ] }) }) : null;
2517
2517
  }
2518
- function kt({
2518
+ function wt({
2519
2519
  brandingSlot: r,
2520
2520
  beforeActionsSlot: d,
2521
2521
  afterActionsSlot: n,
2522
2522
  hideAttribution: t = !1,
2523
2523
  hideWorkflowLibrary: a = !1
2524
2524
  } = {}) {
2525
- const o = k((z) => z.execution), p = k((z) => z.execute), c = k((z) => z.cancelExecution), s = k((z) => z.exportToYaml), m = k((z) => z.importFromYaml), l = k((z) => z.nodes), g = k((z) => z.edges), b = G((z) => z.openSettings), f = k((z) => z.activeWorkflowName), h = k((z) => z.hasUnsavedChanges), y = k((z) => z.saveWorkflow), v = k((z) => z.toggleLibrary), C = k((z) => z.setActiveWorkflowName), u = k((z) => z.selectedNodeId), x = k((z) => z.duplicateNode), [N, w] = I(!1), [W, A] = I(!1), [U, K] = I("yaml"), [F, ee] = I(""), [te, oe] = I(""), [re, E] = I(null), [S, D] = I(!1), [P, q] = I("");
2525
+ const o = w((z) => z.execution), m = w((z) => z.execute), c = w((z) => z.cancelExecution), s = w((z) => z.exportToYaml), p = w((z) => z.importFromYaml), l = w((z) => z.nodes), g = w((z) => z.edges), b = G((z) => z.openSettings), f = w((z) => z.activeWorkflowName), h = w((z) => z.hasUnsavedChanges), y = w((z) => z.saveWorkflow), v = w((z) => z.toggleLibrary), C = w((z) => z.setActiveWorkflowName), u = w((z) => z.selectedNodeId), x = w((z) => z.duplicateNode), [N, k] = I(!1), [W, A] = I(!1), [U, K] = I("yaml"), [F, ee] = I(""), [te, oe] = I(""), [re, E] = I(null), [S, D] = I(!1), [P, q] = I("");
2526
2526
  B(() => {
2527
2527
  const z = () => {
2528
2528
  E("New workflow created"), setTimeout(() => E(null), 2e3);
@@ -2546,20 +2546,20 @@ function kt({
2546
2546
  return document.addEventListener("keydown", z), () => document.removeEventListener("keydown", z);
2547
2547
  }, [ne, ue]);
2548
2548
  const ze = async () => {
2549
- await p();
2549
+ await m();
2550
2550
  }, Ce = async () => {
2551
2551
  const z = await s();
2552
2552
  ee(z);
2553
2553
  const j = yt(l, g);
2554
- oe(j), w(!0);
2554
+ oe(j), k(!0);
2555
2555
  }, Ie = () => {
2556
2556
  const z = U === "yaml" ? F : te;
2557
2557
  navigator.clipboard.writeText(z);
2558
2558
  }, Se = L(
2559
2559
  (z, j, Ae) => {
2560
- m(z, j, Ae), E("Workflow imported!"), setTimeout(() => E(null), 2e3);
2560
+ p(z, j, Ae), E("Workflow imported!"), setTimeout(() => E(null), 2e3);
2561
2561
  },
2562
- [m]
2562
+ [p]
2563
2563
  );
2564
2564
  return /* @__PURE__ */ i(O, { children: [
2565
2565
  /* @__PURE__ */ i("div", { className: "h-14 bg-white dark:bg-zinc-800 border-b border-gray-200 dark:border-zinc-700 flex items-center justify-between px-4", children: [
@@ -2790,7 +2790,7 @@ function kt({
2790
2790
  /* @__PURE__ */ e(
2791
2791
  "button",
2792
2792
  {
2793
- onClick: () => w(!1),
2793
+ onClick: () => k(!1),
2794
2794
  className: "text-gray-500 dark:text-zinc-400 hover:text-gray-700 dark:hover:text-zinc-200",
2795
2795
  children: /* @__PURE__ */ e("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e(
2796
2796
  "path",
@@ -2819,7 +2819,7 @@ function kt({
2819
2819
  /* @__PURE__ */ e(
2820
2820
  "button",
2821
2821
  {
2822
- onClick: () => w(!1),
2822
+ onClick: () => k(!1),
2823
2823
  className: "px-4 py-2 text-sm font-medium text-white bg-teal-600 rounded-md hover:bg-teal-700",
2824
2824
  children: "Close"
2825
2825
  }
@@ -2828,7 +2828,7 @@ function kt({
2828
2828
  ] })
2829
2829
  ] }) }),
2830
2830
  /* @__PURE__ */ e(
2831
- wt,
2831
+ kt,
2832
2832
  {
2833
2833
  isOpen: W,
2834
2834
  onClose: () => A(!1),
@@ -2838,11 +2838,11 @@ function kt({
2838
2838
  ] });
2839
2839
  }
2840
2840
  function vt() {
2841
- const r = k((s) => s.loadTemplate), [d, n] = I(null), {
2841
+ const r = w((s) => s.loadTemplate), [d, n] = I(null), {
2842
2842
  data: t,
2843
2843
  isLoading: a,
2844
2844
  error: o,
2845
- refetch: p
2845
+ refetch: m
2846
2846
  } = X({
2847
2847
  queryKey: ["images"],
2848
2848
  queryFn: Ve,
@@ -2851,8 +2851,8 @@ function vt() {
2851
2851
  }), c = async (s) => {
2852
2852
  n(s);
2853
2853
  try {
2854
- const m = await He(s);
2855
- if (m != null && m.workflow) {
2854
+ const p = await He(s);
2855
+ if (p != null && p.workflow) {
2856
2856
  const l = {
2857
2857
  id: `image-${s}`,
2858
2858
  name: `Workflow from ${s}`,
@@ -2860,15 +2860,15 @@ function vt() {
2860
2860
  category: "Utilities",
2861
2861
  generator: "unknown",
2862
2862
  workflow: {
2863
- nodes: m.workflow.nodes,
2864
- edges: m.workflow.edges
2863
+ nodes: p.workflow.nodes,
2864
+ edges: p.workflow.edges
2865
2865
  }
2866
2866
  };
2867
2867
  r(l), window.dispatchEvent(new CustomEvent("workflow-loaded"));
2868
2868
  } else
2869
2869
  alert("No workflow metadata available for this image");
2870
- } catch (m) {
2871
- console.error("Failed to load workflow:", m), alert("Failed to load workflow");
2870
+ } catch (p) {
2871
+ console.error("Failed to load workflow:", p), alert("Failed to load workflow");
2872
2872
  } finally {
2873
2873
  n(null);
2874
2874
  }
@@ -2892,7 +2892,7 @@ function vt() {
2892
2892
  /* @__PURE__ */ e(
2893
2893
  "button",
2894
2894
  {
2895
- onClick: () => p(),
2895
+ onClick: () => m(),
2896
2896
  className: "text-sm text-teal-600 dark:text-teal-400 hover:text-teal-700 dark:hover:text-violet-300",
2897
2897
  children: "Refresh"
2898
2898
  }
@@ -2988,7 +2988,7 @@ const zt = {
2988
2988
  },
2989
2989
  icon: "chart",
2990
2990
  preview: {
2991
- imageUrl: "/showcase/data-viz/quarterly-revenue.png"
2991
+ imageUrl: "https://floimg.com/images/templates/revenue-chart.png"
2992
2992
  },
2993
2993
  codeExample: `const chart = await floimg
2994
2994
  .generate('quickchart', {
@@ -3113,7 +3113,7 @@ const zt = {
3113
3113
  },
3114
3114
  icon: "chart",
3115
3115
  preview: {
3116
- imageUrl: "/showcase/data-viz/monthly-users.png"
3116
+ imageUrl: "https://floimg.com/images/templates/monthly-users.png"
3117
3117
  },
3118
3118
  codeExample: `const chart = await floimg
3119
3119
  .generate('quickchart', {
@@ -3228,7 +3228,7 @@ const zt = {
3228
3228
  },
3229
3229
  icon: "chart",
3230
3230
  preview: {
3231
- imageUrl: "/showcase/data-viz/framework-usage.png"
3231
+ imageUrl: "https://floimg.com/images/templates/framework-usage.png"
3232
3232
  },
3233
3233
  codeExample: `const chart = await floimg
3234
3234
  .generate('quickchart', {
@@ -3350,7 +3350,7 @@ const zt = {
3350
3350
  },
3351
3351
  icon: "chart",
3352
3352
  preview: {
3353
- imageUrl: "/showcase/data-viz/traffic-by-device.png"
3353
+ imageUrl: "https://floimg.com/images/templates/traffic-breakdown.png"
3354
3354
  },
3355
3355
  codeExample: `const chart = await floimg
3356
3356
  .generate('quickchart', {
@@ -3474,7 +3474,7 @@ const zt = {
3474
3474
  },
3475
3475
  icon: "diagram",
3476
3476
  preview: {
3477
- imageUrl: "/showcase/diagrams/api-flow.png"
3477
+ imageUrl: "https://floimg.com/images/templates/api-flow.png"
3478
3478
  },
3479
3479
  codeExample: `const diagram = await floimg
3480
3480
  .generate('mermaid', {
@@ -3594,7 +3594,7 @@ const zt = {
3594
3594
  },
3595
3595
  icon: "diagram",
3596
3596
  preview: {
3597
- imageUrl: "/showcase/diagrams/system-architecture.png"
3597
+ imageUrl: "https://floimg.com/images/templates/system-architecture.png"
3598
3598
  },
3599
3599
  codeExample: `const diagram = await floimg
3600
3600
  .generate('mermaid', {
@@ -3733,7 +3733,7 @@ const zt = {
3733
3733
  },
3734
3734
  icon: "diagram",
3735
3735
  preview: {
3736
- imageUrl: "/showcase/diagrams/git-workflow.png"
3736
+ imageUrl: "https://floimg.com/images/templates/git-workflow.png"
3737
3737
  },
3738
3738
  codeExample: `const diagram = await floimg
3739
3739
  .generate('mermaid', {
@@ -3862,7 +3862,7 @@ const zt = {
3862
3862
  icon: "sparkles",
3863
3863
  valueProp: "E-commerce-ready product photos in seconds",
3864
3864
  preview: {
3865
- imageUrl: "/showcase/ai-generation/product-headphones.png"
3865
+ imageUrl: "https://floimg.com/images/templates/ai-product-shot.png"
3866
3866
  },
3867
3867
  codeExample: `const product = await floimg
3868
3868
  .generate('openai', {
@@ -3957,7 +3957,7 @@ const zt = {
3957
3957
  icon: "sparkles",
3958
3958
  valueProp: "Landing page hero images in seconds",
3959
3959
  preview: {
3960
- imageUrl: "/showcase/ai-generation/futuristic-city.png"
3960
+ imageUrl: "https://floimg.com/images/templates/ai-hero-image.png"
3961
3961
  },
3962
3962
  codeExample: `const hero = await floimg
3963
3963
  .generate('openai', {
@@ -4050,7 +4050,7 @@ const zt = {
4050
4050
  icon: "sparkles",
4051
4051
  valueProp: "Brand-ready mascot assets in seconds",
4052
4052
  preview: {
4053
- imageUrl: "/showcase/ai-generation/robot-mascot.png"
4053
+ imageUrl: "https://floimg.com/images/templates/ai-mascot.png"
4054
4054
  },
4055
4055
  codeExample: `const mascot = await floimg
4056
4056
  .generate('openai', {
@@ -4342,7 +4342,7 @@ const zt = {
4342
4342
  },
4343
4343
  icon: "share",
4344
4344
  preview: {
4345
- imageUrl: "/showcase/pipelines/output/og-image.png"
4345
+ imageUrl: "https://floimg.com/images/templates/social-media-kit.png"
4346
4346
  },
4347
4347
  codeExample: `// One source -> all platforms
4348
4348
  const socialKit = await floimg.pipeline(heroImage, [
@@ -4422,7 +4422,7 @@ const socialKit = await floimg.pipeline(heroImage, [
4422
4422
  },
4423
4423
  icon: "image",
4424
4424
  preview: {
4425
- imageUrl: "/showcase/pipelines/output/avatar-128.png"
4425
+ imageUrl: "https://floimg.com/images/templates/avatar-pipeline.png"
4426
4426
  },
4427
4427
  codeExample: `const avatars = await floimg.pipeline(photo, [
4428
4428
  { op: 'crop', params: { shape: 'circle' } },
@@ -4511,7 +4511,7 @@ const socialKit = await floimg.pipeline(heroImage, [
4511
4511
  },
4512
4512
  icon: "image",
4513
4513
  preview: {
4514
- imageUrl: "/showcase/pipelines/output/watermark-branded.png"
4514
+ imageUrl: "https://floimg.com/images/templates/watermark-branding.png"
4515
4515
  },
4516
4516
  seo: {
4517
4517
  title: "Branded Watermark Template",
@@ -4590,7 +4590,7 @@ const socialKit = await floimg.pipeline(heroImage, [
4590
4590
  },
4591
4591
  icon: "image",
4592
4592
  preview: {
4593
- imageUrl: "/showcase/pipelines/output/filter-vintage.png"
4593
+ imageUrl: "https://floimg.com/images/templates/filter-showcase.png"
4594
4594
  },
4595
4595
  seo: {
4596
4596
  title: "Image Filter Effects",
@@ -4663,7 +4663,7 @@ const socialKit = await floimg.pipeline(heroImage, [
4663
4663
  },
4664
4664
  icon: "image",
4665
4665
  preview: {
4666
- imageUrl: "/showcase/pipelines/output/responsive-desktop.png"
4666
+ imageUrl: "https://floimg.com/images/templates/responsive-images.png"
4667
4667
  },
4668
4668
  codeExample: `// One source → all responsive sizes
4669
4669
  const responsive = await floimg.from(source)
@@ -4767,7 +4767,7 @@ const responsive = await floimg.from(source)
4767
4767
  },
4768
4768
  icon: "image",
4769
4769
  preview: {
4770
- imageUrl: "/showcase/pipelines/output/headshot-standard.png"
4770
+ imageUrl: "https://floimg.com/images/templates/team-headshots.png"
4771
4771
  },
4772
4772
  codeExample: `const headshot = await floimg.from(photo)
4773
4773
  .transform('extract', { width: 400, height: 400, gravity: 'face' })
@@ -4855,7 +4855,7 @@ const responsive = await floimg.from(source)
4855
4855
  },
4856
4856
  icon: "image",
4857
4857
  preview: {
4858
- imageUrl: "/showcase/pipelines/output/screenshot-docs.png"
4858
+ imageUrl: "https://floimg.com/images/templates/screenshot-docs.png"
4859
4859
  },
4860
4860
  codeExample: `const docImage = await floimg
4861
4861
  .generate('screenshot', { url: 'https://example.com', width: 1280 })
@@ -4954,7 +4954,7 @@ const responsive = await floimg.from(source)
4954
4954
  },
4955
4955
  icon: "share",
4956
4956
  preview: {
4957
- imageUrl: "/showcase/pipelines/output/blog-og.png"
4957
+ imageUrl: "https://floimg.com/images/templates/blog-og-image.png"
4958
4958
  },
4959
4959
  codeExample: `const ogImage = await floimg.from(heroImage)
4960
4960
  .transform('resize', { width: 1200, height: 630, fit: 'cover' })
@@ -5039,7 +5039,7 @@ const responsive = await floimg.from(source)
5039
5039
  },
5040
5040
  icon: "share",
5041
5041
  preview: {
5042
- imageUrl: "/showcase/pipelines/output/email-banner.png"
5042
+ imageUrl: "https://floimg.com/images/templates/email-banner.png"
5043
5043
  },
5044
5044
  codeExample: `const banner = await floimg.from(image)
5045
5045
  .transform('resize', { width: 600, height: 200, fit: 'cover' })
@@ -5125,7 +5125,7 @@ const responsive = await floimg.from(source)
5125
5125
  },
5126
5126
  icon: "image",
5127
5127
  preview: {
5128
- imageUrl: "/showcase/pipelines/output/app-icon-180.png"
5128
+ imageUrl: "https://floimg.com/images/templates/app-icons.png"
5129
5129
  },
5130
5130
  codeExample: `const icons = await floimg.from(logo)
5131
5131
  .transform('removeBackground')
@@ -5240,13 +5240,12 @@ const responsive = await floimg.from(source)
5240
5240
  },
5241
5241
  icon: "qr",
5242
5242
  preview: {
5243
- imageUrl: "/showcase/qr-codes/qr-brand.png"
5243
+ imageUrl: "https://floimg.com/images/templates/branded-qr.png"
5244
5244
  },
5245
5245
  codeExample: `const qr = await floimg
5246
5246
  .generate('qr', {
5247
- data: 'https://floimg.com',
5248
- dark: '#0d9488',
5249
- light: '#ffffff'
5247
+ text: 'https://floimg.com',
5248
+ color: { dark: '#0d9488', light: '#ffffff' }
5250
5249
  })
5251
5250
  .transform('resize', { width: 300, height: 300 })
5252
5251
  .transform('roundCorners', { radius: 16 })
@@ -5266,11 +5265,10 @@ const responsive = await floimg.from(source)
5266
5265
  data: {
5267
5266
  generatorName: "qr",
5268
5267
  params: {
5269
- data: "https://floimg.com",
5270
- size: 400,
5268
+ text: "https://floimg.com",
5269
+ width: 400,
5271
5270
  margin: 2,
5272
- dark: "#0d9488",
5273
- light: "#ffffff",
5271
+ color: { dark: "#0d9488", light: "#ffffff" },
5274
5272
  errorCorrectionLevel: "M"
5275
5273
  }
5276
5274
  }
@@ -5330,13 +5328,12 @@ const responsive = await floimg.from(source)
5330
5328
  },
5331
5329
  icon: "qr",
5332
5330
  preview: {
5333
- imageUrl: "/showcase/qr-codes/qr-dark.png"
5331
+ imageUrl: "https://floimg.com/images/templates/dark-qr.png"
5334
5332
  },
5335
5333
  codeExample: `const qr = await floimg
5336
5334
  .generate('qr', {
5337
- data: 'https://floimg.com',
5338
- dark: '#ffffff',
5339
- light: '#18181b'
5335
+ text: 'https://floimg.com',
5336
+ color: { dark: '#ffffff', light: '#18181b' }
5340
5337
  })
5341
5338
  .transform('resize', { width: 300, height: 300 })
5342
5339
  .transform('extend', {
@@ -5359,11 +5356,10 @@ const responsive = await floimg.from(source)
5359
5356
  data: {
5360
5357
  generatorName: "qr",
5361
5358
  params: {
5362
- data: "https://floimg.com",
5363
- size: 400,
5359
+ text: "https://floimg.com",
5360
+ width: 400,
5364
5361
  margin: 2,
5365
- dark: "#ffffff",
5366
- light: "#18181b",
5362
+ color: { dark: "#ffffff", light: "#18181b" },
5367
5363
  errorCorrectionLevel: "M"
5368
5364
  }
5369
5365
  }
@@ -5428,13 +5424,12 @@ const responsive = await floimg.from(source)
5428
5424
  },
5429
5425
  icon: "qr",
5430
5426
  preview: {
5431
- imageUrl: "/showcase/qr-codes/qr-wifi.png"
5427
+ imageUrl: "https://floimg.com/images/templates/wifi-qr.png"
5432
5428
  },
5433
5429
  codeExample: `const qr = await floimg
5434
5430
  .generate('qr', {
5435
- data: 'WIFI:T:WPA;S:GuestNetwork;P:welcome123;;',
5436
- dark: '#059669',
5437
- light: '#ffffff'
5431
+ text: 'WIFI:T:WPA;S:GuestNetwork;P:welcome123;;',
5432
+ color: { dark: '#059669', light: '#ffffff' }
5438
5433
  })
5439
5434
  .transform('resize', { width: 300, height: 300 })
5440
5435
  .transform('addCaption', {
@@ -5459,11 +5454,10 @@ const responsive = await floimg.from(source)
5459
5454
  data: {
5460
5455
  generatorName: "qr",
5461
5456
  params: {
5462
- data: "WIFI:T:WPA;S:GuestNetwork;P:welcome123;;",
5463
- size: 400,
5457
+ text: "WIFI:T:WPA;S:GuestNetwork;P:welcome123;;",
5458
+ width: 400,
5464
5459
  margin: 2,
5465
- dark: "#059669",
5466
- light: "#ffffff",
5460
+ color: { dark: "#059669", light: "#ffffff" },
5467
5461
  errorCorrectionLevel: "H"
5468
5462
  }
5469
5463
  }
@@ -5527,7 +5521,7 @@ const responsive = await floimg.from(source)
5527
5521
  },
5528
5522
  icon: "image",
5529
5523
  preview: {
5530
- imageUrl: "/showcase/pipelines/output/thumb-200.png"
5524
+ imageUrl: "https://floimg.com/images/templates/thumbnail-generator.png"
5531
5525
  },
5532
5526
  seo: {
5533
5527
  title: "Thumbnail Generator",
@@ -5642,15 +5636,15 @@ const responsive = await floimg.from(source)
5642
5636
  Xt,
5643
5637
  Zt,
5644
5638
  er
5645
- ], me = [
5639
+ ], pe = [
5646
5640
  ...Pt,
5647
5641
  ...Dt,
5648
5642
  ...Jt,
5649
5643
  ...tr
5650
- ], Z = me.filter((r) => !r.requiresCloud);
5651
- me.filter((r) => r.requiresCloud);
5644
+ ], Z = pe.filter((r) => !r.requiresCloud);
5645
+ pe.filter((r) => r.requiresCloud);
5652
5646
  function rr(r) {
5653
- return me.find((d) => d.id === r);
5647
+ return pe.find((d) => d.id === r);
5654
5648
  }
5655
5649
  function Cr(r) {
5656
5650
  return Z.find((d) => d.id === r);
@@ -5673,14 +5667,14 @@ function xe(r) {
5673
5667
  return rr(r);
5674
5668
  }
5675
5669
  function or({ onSelect: r }) {
5676
- const [d, n] = I(null), [t, a] = I(""), o = de(() => ar(), []), p = de(() => {
5670
+ const [d, n] = I(null), [t, a] = I(""), o = de(() => ar(), []), m = de(() => {
5677
5671
  let c = Z;
5678
5672
  if (d && (c = c.filter((s) => s.category === d)), t) {
5679
5673
  const s = t.toLowerCase();
5680
5674
  c = c.filter(
5681
- (m) => {
5675
+ (p) => {
5682
5676
  var l;
5683
- return m.name.toLowerCase().includes(s) || m.description.toLowerCase().includes(s) || m.generator.toLowerCase().includes(s) || ((l = m.tags) == null ? void 0 : l.some((g) => g.toLowerCase().includes(s)));
5677
+ return p.name.toLowerCase().includes(s) || p.description.toLowerCase().includes(s) || p.generator.toLowerCase().includes(s) || ((l = p.tags) == null ? void 0 : l.some((g) => g.toLowerCase().includes(s)));
5684
5678
  }
5685
5679
  );
5686
5680
  }
@@ -5722,7 +5716,7 @@ function or({ onSelect: r }) {
5722
5716
  ))
5723
5717
  ] })
5724
5718
  ] }),
5725
- p.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-12 text-gray-500 dark:text-zinc-400", children: "No templates found matching your criteria." }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: p.map((c) => /* @__PURE__ */ e(
5719
+ m.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-12 text-gray-500 dark:text-zinc-400", children: "No templates found matching your criteria." }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: m.map((c) => /* @__PURE__ */ e(
5726
5720
  nr,
5727
5721
  {
5728
5722
  template: c,
@@ -5837,7 +5831,7 @@ function ir({
5837
5831
  onRename: a,
5838
5832
  onDuplicate: o
5839
5833
  }) {
5840
- const [p, c] = I(!1), [s, m] = I(r.name), [l, g] = I(!1), b = () => {
5834
+ const [m, c] = I(!1), [s, p] = I(r.name), [l, g] = I(!1), b = () => {
5841
5835
  s.trim() && s !== r.name && a(s.trim()), c(!1);
5842
5836
  }, f = (h) => {
5843
5837
  const y = new Date(h), C = (/* @__PURE__ */ new Date()).getTime() - y.getTime(), u = Math.floor(C / 6e4), x = Math.floor(C / 36e5), N = Math.floor(C / 864e5);
@@ -5850,15 +5844,15 @@ function ir({
5850
5844
  children: [
5851
5845
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-2", children: [
5852
5846
  /* @__PURE__ */ i("button", { onClick: n, className: "flex-1 text-left min-w-0", children: [
5853
- p ? /* @__PURE__ */ e(
5847
+ m ? /* @__PURE__ */ e(
5854
5848
  "input",
5855
5849
  {
5856
5850
  type: "text",
5857
5851
  value: s,
5858
- onChange: (h) => m(h.target.value),
5852
+ onChange: (h) => p(h.target.value),
5859
5853
  onBlur: b,
5860
5854
  onKeyDown: (h) => {
5861
- h.key === "Enter" && b(), h.key === "Escape" && (m(r.name), c(!1));
5855
+ h.key === "Enter" && b(), h.key === "Escape" && (p(r.name), c(!1));
5862
5856
  },
5863
5857
  className: "w-full px-1 py-0.5 text-sm font-medium bg-white dark:bg-zinc-900 border border-teal-500 rounded focus:outline-none focus:ring-1 focus:ring-teal-500",
5864
5858
  autoFocus: !0,
@@ -5925,9 +5919,9 @@ function ir({
5925
5919
  );
5926
5920
  }
5927
5921
  function sr() {
5928
- const r = k((l) => l.showLibrary), d = k((l) => l.toggleLibrary), n = k((l) => l.savedWorkflows), t = k((l) => l.activeWorkflowId), a = k((l) => l.loadWorkflow), o = k((l) => l.deleteWorkflow), p = k((l) => l.renameWorkflow), c = k((l) => l.duplicateWorkflow), s = k((l) => l.newWorkflow);
5922
+ const r = w((l) => l.showLibrary), d = w((l) => l.toggleLibrary), n = w((l) => l.savedWorkflows), t = w((l) => l.activeWorkflowId), a = w((l) => l.loadWorkflow), o = w((l) => l.deleteWorkflow), m = w((l) => l.renameWorkflow), c = w((l) => l.duplicateWorkflow), s = w((l) => l.newWorkflow);
5929
5923
  if (!r) return null;
5930
- const m = [...n].sort((l, g) => g.updatedAt - l.updatedAt);
5924
+ const p = [...n].sort((l, g) => g.updatedAt - l.updatedAt);
5931
5925
  return /* @__PURE__ */ i(O, { children: [
5932
5926
  /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-black/20 dark:bg-black/40 z-40", onClick: d }),
5933
5927
  /* @__PURE__ */ i("div", { className: "fixed left-0 top-0 bottom-0 w-80 bg-zinc-50 dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-700 z-50 flex flex-col shadow-xl", children: [
@@ -5971,7 +5965,7 @@ function sr() {
5971
5965
  ]
5972
5966
  }
5973
5967
  ) }),
5974
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4", children: m.length === 0 ? /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
5968
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-4", children: p.length === 0 ? /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
5975
5969
  /* @__PURE__ */ e("div", { className: "w-12 h-12 mx-auto mb-3 rounded-full bg-zinc-200 dark:bg-zinc-700 flex items-center justify-center", children: /* @__PURE__ */ e(
5976
5970
  "svg",
5977
5971
  {
@@ -5992,7 +5986,7 @@ function sr() {
5992
5986
  ) }),
5993
5987
  /* @__PURE__ */ e("p", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: "No saved workflows yet" }),
5994
5988
  /* @__PURE__ */ e("p", { className: "text-xs text-zinc-400 dark:text-zinc-500 mt-1", children: "Build a workflow and save it to see it here" })
5995
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: m.map((l) => /* @__PURE__ */ e(
5989
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: p.map((l) => /* @__PURE__ */ e(
5996
5990
  ir,
5997
5991
  {
5998
5992
  workflow: l,
@@ -6001,7 +5995,7 @@ function sr() {
6001
5995
  a(l.id), d();
6002
5996
  },
6003
5997
  onDelete: () => o(l.id),
6004
- onRename: (g) => p(l.id, g),
5998
+ onRename: (g) => m(l.id, g),
6005
5999
  onDuplicate: () => c(l.id)
6006
6000
  },
6007
6001
  l.id
@@ -6068,9 +6062,9 @@ const dr = [
6068
6062
  }
6069
6063
  ];
6070
6064
  function cr({ provider: r }) {
6071
- const d = G((b) => b.ai), n = G((b) => b.setAIProvider), t = d[r.id], a = (t == null ? void 0 : t.enabled) ?? !1, o = (t == null ? void 0 : t.apiKey) ?? "", [p, c] = I(o), [s, m] = I(!1), l = () => {
6065
+ const d = G((b) => b.ai), n = G((b) => b.setAIProvider), t = d[r.id], a = (t == null ? void 0 : t.enabled) ?? !1, o = (t == null ? void 0 : t.apiKey) ?? "", [m, c] = I(o), [s, p] = I(!1), l = () => {
6072
6066
  n(r.id, {
6073
- apiKey: p,
6067
+ apiKey: m,
6074
6068
  enabled: !a
6075
6069
  });
6076
6070
  }, g = (b) => {
@@ -6100,7 +6094,7 @@ function cr({ provider: r }) {
6100
6094
  "input",
6101
6095
  {
6102
6096
  type: s ? "text" : "password",
6103
- value: p,
6097
+ value: m,
6104
6098
  onChange: (b) => g(b.target.value),
6105
6099
  placeholder: r.placeholder,
6106
6100
  className: "w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-zinc-600 rounded bg-white dark:bg-zinc-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-zinc-500"
@@ -6110,7 +6104,7 @@ function cr({ provider: r }) {
6110
6104
  "button",
6111
6105
  {
6112
6106
  type: "button",
6113
- onClick: () => m(!s),
6107
+ onClick: () => p(!s),
6114
6108
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",
6115
6109
  children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: s ? /* @__PURE__ */ e(
6116
6110
  "path",
@@ -6148,13 +6142,13 @@ function cr({ provider: r }) {
6148
6142
  ) })
6149
6143
  ] });
6150
6144
  }
6151
- function pr({ provider: r }) {
6152
- const d = G((l) => l.ai), n = G((l) => l.setAIProvider), t = d[r.id], a = (t == null ? void 0 : t.enabled) ?? !1, o = (t == null ? void 0 : t.baseUrl) ?? r.defaultUrl, [p, c] = I(o), s = () => {
6145
+ function mr({ provider: r }) {
6146
+ const d = G((l) => l.ai), n = G((l) => l.setAIProvider), t = d[r.id], a = (t == null ? void 0 : t.enabled) ?? !1, o = (t == null ? void 0 : t.baseUrl) ?? r.defaultUrl, [m, c] = I(o), s = () => {
6153
6147
  n(r.id, {
6154
- baseUrl: p,
6148
+ baseUrl: m,
6155
6149
  enabled: !a
6156
6150
  });
6157
- }, m = (l) => {
6151
+ }, p = (l) => {
6158
6152
  c(l), n(r.id, {
6159
6153
  baseUrl: l,
6160
6154
  enabled: a
@@ -6181,8 +6175,8 @@ function pr({ provider: r }) {
6181
6175
  "input",
6182
6176
  {
6183
6177
  type: "text",
6184
- value: p,
6185
- onChange: (l) => m(l.target.value),
6178
+ value: m,
6179
+ onChange: (l) => p(l.target.value),
6186
6180
  placeholder: r.defaultUrl,
6187
6181
  className: "w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-zinc-600 rounded bg-white dark:bg-zinc-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-zinc-500"
6188
6182
  }
@@ -6203,7 +6197,7 @@ function pr({ provider: r }) {
6203
6197
  ) })
6204
6198
  ] });
6205
6199
  }
6206
- function mr() {
6200
+ function pr() {
6207
6201
  const r = G((n) => n.showSettings), d = G((n) => n.closeSettings);
6208
6202
  return r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ i("div", { className: "bg-white dark:bg-zinc-800 rounded-lg shadow-xl max-w-xl w-full mx-4 max-h-[85vh] flex flex-col", children: [
6209
6203
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-zinc-700", children: [
@@ -6235,7 +6229,7 @@ function mr() {
6235
6229
  ] }),
6236
6230
  /* @__PURE__ */ i("section", { children: [
6237
6231
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-gray-700 dark:text-zinc-300 mb-3", children: "Local Providers" }),
6238
- /* @__PURE__ */ e("div", { className: "space-y-3", children: lr.map((n) => /* @__PURE__ */ e(pr, { provider: n }, n.id)) })
6232
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: lr.map((n) => /* @__PURE__ */ e(mr, { provider: n }, n.id)) })
6239
6233
  ] }),
6240
6234
  /* @__PURE__ */ e("div", { className: "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
6241
6235
  /* @__PURE__ */ e(
@@ -6274,7 +6268,7 @@ function mr() {
6274
6268
  }
6275
6269
  let V = null;
6276
6270
  function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6277
- const [t, a] = I([]), [o, p] = I(""), [c, s] = I(!1), [m, l] = I(null), [g, b] = I(""), [f, h] = I(null), [y, v] = I(null), [C, u] = I(""), [x, N] = I(), [w, W] = I(!1), [A, U] = I(), K = se(null), F = se(null);
6271
+ const [t, a] = I([]), [o, m] = I(""), [c, s] = I(!1), [p, l] = I(null), [g, b] = I(""), [f, h] = I(null), [y, v] = I(null), [C, u] = I(""), [x, N] = I(), [k, W] = I(!1), [A, U] = I(), K = se(null), F = se(null);
6278
6272
  B(() => {
6279
6273
  r && y === null && Xe().then((S) => {
6280
6274
  v(S.available), u(S.message), N(S.reason), W(S.isCloudDeployment ?? !1), U(S.supportUrl);
@@ -6294,7 +6288,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6294
6288
  content: o.trim(),
6295
6289
  timestamp: Date.now()
6296
6290
  };
6297
- a((P) => [...P, S]), p(""), s(!0), h(null), l(null), b("");
6291
+ a((P) => [...P, S]), m(""), s(!0), h(null), l(null), b("");
6298
6292
  let D;
6299
6293
  V = ve(
6300
6294
  "/api/generate/workflow/stream",
@@ -6446,7 +6440,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6446
6440
  children: "Contact Support"
6447
6441
  }
6448
6442
  ),
6449
- x === "not_configured" && !w && /* @__PURE__ */ e(
6443
+ x === "not_configured" && !k && /* @__PURE__ */ e(
6450
6444
  "a",
6451
6445
  {
6452
6446
  href: "https://floimg.com/docs/studio/ai-workflows",
@@ -6489,7 +6483,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6489
6483
  ].map((S, D) => /* @__PURE__ */ i(
6490
6484
  "button",
6491
6485
  {
6492
- onClick: () => p(S),
6486
+ onClick: () => m(S),
6493
6487
  className: "block w-full text-left text-sm px-4 py-2 bg-gray-100 dark:bg-zinc-700 hover:bg-gray-200 dark:hover:bg-zinc-600 rounded-lg text-gray-700 dark:text-zinc-300 transition-colors",
6494
6488
  children: [
6495
6489
  '"',
@@ -6554,7 +6548,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6554
6548
  c && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ i("div", { className: "bg-gray-100 dark:bg-zinc-700 rounded-lg px-4 py-3", children: [
6555
6549
  /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
6556
6550
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
6557
- m === "analyzing" && /* @__PURE__ */ e(
6551
+ p === "analyzing" && /* @__PURE__ */ e(
6558
6552
  "svg",
6559
6553
  {
6560
6554
  className: "h-4 w-4 text-teal-500 animate-pulse",
@@ -6572,7 +6566,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6572
6566
  )
6573
6567
  }
6574
6568
  ),
6575
- m === "selecting_nodes" && /* @__PURE__ */ e(
6569
+ p === "selecting_nodes" && /* @__PURE__ */ e(
6576
6570
  "svg",
6577
6571
  {
6578
6572
  className: "h-4 w-4 text-teal-500 animate-pulse",
@@ -6590,7 +6584,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6590
6584
  )
6591
6585
  }
6592
6586
  ),
6593
- m === "generating" && /* @__PURE__ */ e(
6587
+ p === "generating" && /* @__PURE__ */ e(
6594
6588
  "svg",
6595
6589
  {
6596
6590
  className: "h-4 w-4 text-teal-500 animate-spin",
@@ -6608,7 +6602,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6608
6602
  )
6609
6603
  }
6610
6604
  ),
6611
- m === "validating" && /* @__PURE__ */ e(
6605
+ p === "validating" && /* @__PURE__ */ e(
6612
6606
  "svg",
6613
6607
  {
6614
6608
  className: "h-4 w-4 text-teal-500 animate-pulse",
@@ -6626,7 +6620,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6626
6620
  )
6627
6621
  }
6628
6622
  ),
6629
- !m && /* @__PURE__ */ i("div", { className: "flex space-x-1", children: [
6623
+ !p && /* @__PURE__ */ i("div", { className: "flex space-x-1", children: [
6630
6624
  /* @__PURE__ */ e("div", { className: "w-2 h-2 bg-teal-400 rounded-full animate-bounce" }),
6631
6625
  /* @__PURE__ */ e(
6632
6626
  "div",
@@ -6655,29 +6649,29 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6655
6649
  }
6656
6650
  )
6657
6651
  ] }),
6658
- m && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 mt-2", children: [
6652
+ p && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 mt-2", children: [
6659
6653
  /* @__PURE__ */ e(
6660
6654
  "div",
6661
6655
  {
6662
- className: `h-1 w-8 rounded-full ${m === "analyzing" || m === "selecting_nodes" || m === "generating" || m === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6656
+ className: `h-1 w-8 rounded-full ${p === "analyzing" || p === "selecting_nodes" || p === "generating" || p === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6663
6657
  }
6664
6658
  ),
6665
6659
  /* @__PURE__ */ e(
6666
6660
  "div",
6667
6661
  {
6668
- className: `h-1 w-8 rounded-full ${m === "selecting_nodes" || m === "generating" || m === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6662
+ className: `h-1 w-8 rounded-full ${p === "selecting_nodes" || p === "generating" || p === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6669
6663
  }
6670
6664
  ),
6671
6665
  /* @__PURE__ */ e(
6672
6666
  "div",
6673
6667
  {
6674
- className: `h-1 w-8 rounded-full ${m === "generating" || m === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6668
+ className: `h-1 w-8 rounded-full ${p === "generating" || p === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6675
6669
  }
6676
6670
  ),
6677
6671
  /* @__PURE__ */ e(
6678
6672
  "div",
6679
6673
  {
6680
- className: `h-1 w-8 rounded-full ${m === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6674
+ className: `h-1 w-8 rounded-full ${p === "validating" ? "bg-teal-500" : "bg-gray-300 dark:bg-zinc-600"}`
6681
6675
  }
6682
6676
  )
6683
6677
  ] })
@@ -6692,7 +6686,7 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6692
6686
  {
6693
6687
  ref: F,
6694
6688
  value: o,
6695
- onChange: (S) => p(S.target.value),
6689
+ onChange: (S) => m(S.target.value),
6696
6690
  onKeyDown: oe,
6697
6691
  placeholder: y === !1 ? "AI generation not available" : "Describe what workflow you want to create...",
6698
6692
  disabled: c || y === !1,
@@ -6724,14 +6718,14 @@ function gr({ isOpen: r, onClose: d, onApplyWorkflow: n }) {
6724
6718
  }
6725
6719
  const ur = 20, hr = 500, fr = 1e5;
6726
6720
  function br({ isOpen: r, onClose: d, nodeLabel: n, output: t }) {
6727
- const [a, o] = I("formatted"), [p, c] = I(!1), s = L(() => {
6721
+ const [a, o] = I("formatted"), [m, c] = I(!1), s = L(() => {
6728
6722
  const l = a === "formatted" && t.parsed ? JSON.stringify(t.parsed, null, 2) : t.content;
6729
6723
  navigator.clipboard.writeText(l).then(() => {
6730
6724
  c(!0), setTimeout(() => c(!1), 2e3);
6731
6725
  });
6732
6726
  }, [a, t]);
6733
6727
  if (!r) return null;
6734
- const m = t.dataType === "json" && t.parsed;
6728
+ const p = t.dataType === "json" && t.parsed;
6735
6729
  return /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50", children: /* @__PURE__ */ i("div", { className: "bg-white dark:bg-zinc-800 rounded-lg shadow-xl w-full max-w-3xl mx-4 max-h-[85vh] flex flex-col", children: [
6736
6730
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-zinc-700", children: [
6737
6731
  /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
@@ -6762,7 +6756,7 @@ function br({ isOpen: r, onClose: d, nodeLabel: n, output: t }) {
6762
6756
  ] })
6763
6757
  ] }),
6764
6758
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
6765
- m && /* @__PURE__ */ i("div", { className: "flex bg-gray-100 dark:bg-zinc-700 rounded-lg p-0.5", children: [
6759
+ p && /* @__PURE__ */ i("div", { className: "flex bg-gray-100 dark:bg-zinc-700 rounded-lg p-0.5", children: [
6766
6760
  /* @__PURE__ */ e(
6767
6761
  "button",
6768
6762
  {
@@ -6823,7 +6817,7 @@ function br({ isOpen: r, onClose: d, nodeLabel: n, output: t }) {
6823
6817
  "KB) - rendering may be slow"
6824
6818
  ] })
6825
6819
  ] }),
6826
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: a === "formatted" && m ? /* @__PURE__ */ e(xr, { data: t.parsed }) : /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap font-mono text-sm text-gray-800 dark:text-zinc-200 bg-gray-50 dark:bg-zinc-900 rounded-lg p-4 overflow-auto", children: t.content }) }),
6820
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: a === "formatted" && p ? /* @__PURE__ */ e(xr, { data: t.parsed }) : /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap font-mono text-sm text-gray-800 dark:text-zinc-200 bg-gray-50 dark:bg-zinc-900 rounded-lg p-4 overflow-auto", children: t.content }) }),
6827
6821
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between px-4 py-3 border-t border-gray-200 dark:border-zinc-700", children: [
6828
6822
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-500 dark:text-zinc-400", children: [
6829
6823
  t.content.length.toLocaleString(),
@@ -6834,7 +6828,7 @@ function br({ isOpen: r, onClose: d, nodeLabel: n, output: t }) {
6834
6828
  {
6835
6829
  onClick: s,
6836
6830
  className: "flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-teal-600 dark:text-teal-400 hover:bg-teal-50 dark:hover:bg-teal-900/30 rounded-lg transition-colors",
6837
- children: p ? /* @__PURE__ */ i(O, { children: [
6831
+ children: m ? /* @__PURE__ */ i(O, { children: [
6838
6832
  /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e(
6839
6833
  "path",
6840
6834
  {
@@ -6924,7 +6918,7 @@ function ce({ value: r, depth: d, keyName: n, maxDepth: t }) {
6924
6918
  ] });
6925
6919
  }
6926
6920
  if (Array.isArray(r)) {
6927
- const o = r.slice(0, hr), p = r.length - o.length;
6921
+ const o = r.slice(0, hr), m = r.length - o.length;
6928
6922
  return /* @__PURE__ */ i("div", { style: { marginLeft: a }, children: [
6929
6923
  n && /* @__PURE__ */ i("div", { className: "py-0.5", children: [
6930
6924
  /* @__PURE__ */ i("span", { className: "text-pink-600 dark:text-pink-400", children: [
@@ -6941,9 +6935,9 @@ function ce({ value: r, depth: d, keyName: n, maxDepth: t }) {
6941
6935
  ] }),
6942
6936
  !n && /* @__PURE__ */ e("span", { className: "text-gray-500 dark:text-zinc-500 py-0.5 block", children: "[" }),
6943
6937
  o.map((c, s) => /* @__PURE__ */ e(ce, { value: c, depth: d + 1, maxDepth: t }, s)),
6944
- p > 0 && /* @__PURE__ */ i("div", { style: { marginLeft: (d + 1) * 16 }, className: "py-0.5 text-zinc-500 italic", children: [
6938
+ m > 0 && /* @__PURE__ */ i("div", { style: { marginLeft: (d + 1) * 16 }, className: "py-0.5 text-zinc-500 italic", children: [
6945
6939
  "...and ",
6946
- p,
6940
+ m,
6947
6941
  " more items"
6948
6942
  ] }),
6949
6943
  !n && /* @__PURE__ */ e("span", { className: "text-gray-500 dark:text-zinc-500 py-0.5 block", children: "]" })
@@ -6962,26 +6956,26 @@ function ce({ value: r, depth: d, keyName: n, maxDepth: t }) {
6962
6956
  /* @__PURE__ */ e("span", { className: "text-gray-500 dark:text-zinc-500", children: "{" })
6963
6957
  ] }),
6964
6958
  !n && /* @__PURE__ */ e("span", { className: "text-gray-500 dark:text-zinc-500 py-0.5 block", children: "{" }),
6965
- o.map(([p, c]) => /* @__PURE__ */ e(ce, { value: c, depth: d + 1, keyName: p, maxDepth: t }, p)),
6959
+ o.map(([m, c]) => /* @__PURE__ */ e(ce, { value: c, depth: d + 1, keyName: m, maxDepth: t }, m)),
6966
6960
  /* @__PURE__ */ e("div", { style: { marginLeft: n ? 0 : a }, className: "py-0.5", children: /* @__PURE__ */ e("span", { className: "text-gray-500 dark:text-zinc-500", children: "}" }) })
6967
6961
  ] });
6968
6962
  }
6969
6963
  return null;
6970
6964
  }
6971
6965
  function yr() {
6972
- const { screenToFlowPosition: r } = Ue(), d = k((a) => a.addNode), n = L(
6966
+ const { screenToFlowPosition: r } = Ue(), d = w((a) => a.addNode), n = L(
6973
6967
  (a) => {
6974
6968
  a.preventDefault();
6975
6969
  const o = a.dataTransfer.getData("application/json");
6976
6970
  if (o)
6977
6971
  try {
6978
- const p = JSON.parse(o), c = r({
6972
+ const m = JSON.parse(o), c = r({
6979
6973
  x: a.clientX,
6980
6974
  y: a.clientY
6981
6975
  });
6982
- d(p, c);
6983
- } catch (p) {
6984
- console.error("Failed to parse dropped node:", p);
6976
+ d(m, c);
6977
+ } catch (m) {
6978
+ console.error("Failed to parse dropped node:", m);
6985
6979
  }
6986
6980
  },
6987
6981
  [d, r]
@@ -6991,7 +6985,7 @@ function yr() {
6991
6985
  return /* @__PURE__ */ e("div", { className: "flex-1", onDrop: n, onDragOver: t, children: /* @__PURE__ */ e(ct, {}) });
6992
6986
  }
6993
6987
  function Ar() {
6994
- const [r, d] = I("editor"), [n, t] = I(!1), a = k((h) => h.loadTemplate), o = k((h) => h.loadGeneratedWorkflow), p = k((h) => h.inspectedNodeId), c = k((h) => h.execution.dataOutputs), s = k((h) => h.closeOutputInspector), m = k((h) => h.nodes), l = p ? m.find((h) => h.id === p) : null, g = p ? c[p] : null;
6988
+ const [r, d] = I("editor"), [n, t] = I(!1), a = w((h) => h.loadTemplate), o = w((h) => h.loadGeneratedWorkflow), m = w((h) => h.inspectedNodeId), c = w((h) => h.execution.dataOutputs), s = w((h) => h.closeOutputInspector), p = w((h) => h.nodes), l = m ? p.find((h) => h.id === m) : null, g = m ? c[m] : null;
6995
6989
  B(() => {
6996
6990
  const y = new URLSearchParams(window.location.search).get("template");
6997
6991
  if (y) {
@@ -7019,7 +7013,7 @@ function Ar() {
7019
7013
  [o]
7020
7014
  );
7021
7015
  return /* @__PURE__ */ i(Be, { children: [
7022
- /* @__PURE__ */ e(mr, {}),
7016
+ /* @__PURE__ */ e(pr, {}),
7023
7017
  /* @__PURE__ */ e(
7024
7018
  gr,
7025
7019
  {
@@ -7033,14 +7027,14 @@ function Ar() {
7033
7027
  {
7034
7028
  isOpen: !0,
7035
7029
  onClose: s,
7036
- nodeId: p,
7030
+ nodeId: m,
7037
7031
  nodeLabel: l.data.providerLabel || l.type || "Node",
7038
7032
  output: g
7039
7033
  }
7040
7034
  ),
7041
7035
  /* @__PURE__ */ e(sr, {}),
7042
7036
  /* @__PURE__ */ i("div", { className: "h-screen flex flex-col bg-gray-100 dark:bg-zinc-900", children: [
7043
- /* @__PURE__ */ e(kt, {}),
7037
+ /* @__PURE__ */ e(wt, {}),
7044
7038
  /* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-800 border-b border-gray-200 dark:border-zinc-700", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
7045
7039
  /* @__PURE__ */ i("div", { className: "flex", children: [
7046
7040
  /* @__PURE__ */ e(
@@ -7090,7 +7084,7 @@ function Ar() {
7090
7084
  ] }) }),
7091
7085
  /* @__PURE__ */ i("div", { className: "flex-1 flex overflow-hidden", children: [
7092
7086
  r === "editor" && /* @__PURE__ */ i(O, { children: [
7093
- /* @__PURE__ */ e(mt, {}),
7087
+ /* @__PURE__ */ e(pt, {}),
7094
7088
  /* @__PURE__ */ e(yr, {}),
7095
7089
  /* @__PURE__ */ e(gt, {})
7096
7090
  ] }),
@@ -7102,14 +7096,14 @@ function Ar() {
7102
7096
  }
7103
7097
  export {
7104
7098
  gr as AIChat,
7105
- mr as AISettings,
7099
+ pr as AISettings,
7106
7100
  Ar as App,
7107
7101
  vt as Gallery,
7108
7102
  gt as NodeInspector,
7109
- mt as NodePalette,
7103
+ pt as NodePalette,
7110
7104
  or as TemplateGallery,
7111
- kt as Toolbar,
7112
- pt as UploadGallery,
7105
+ wt as Toolbar,
7106
+ mt as UploadGallery,
7113
7107
  ct as WorkflowEditor,
7114
7108
  sr as WorkflowLibrary,
7115
7109
  ar as getCategories,
@@ -7118,6 +7112,6 @@ export {
7118
7112
  xe as resolveTemplate,
7119
7113
  Sr as searchTemplates,
7120
7114
  Z as templates,
7121
- k as useWorkflowStore
7115
+ w as useWorkflowStore
7122
7116
  };
7123
7117
  //# sourceMappingURL=index.js.map