@republicroad/seal-editor 1.37.0 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as e, r as t, t as n } from "./rolldown-runtime-B0aSnxlc.js";
2
2
  import { t as r } from "./utils-CX-Pz5p6.js";
3
- import { i, n as a, r as o, t as s } from "./i18n-DI2s8YGH.js";
3
+ import { i, n as a, r as o, t as s } from "./i18n-D5rBCDlU.js";
4
4
  import { $ as c, A as l, B as u, C as d, D as f, E as p, F as m, G as h, H as g, I as _, J as v, K as y, L as b, M as x, N as S, O as C, P as w, Q as T, R as E, S as D, T as ee, U as O, V as te, W as k, X as ne, Y as A, Z as re, _ as j, a as M, b as ie, c as N, d as ae, et as oe, f as se, g as ce, h as le, i as ue, j as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, q as ve, r as ye, s as be, t as xe, u as Se, v as Ce, w as we, x as Te, y as Ee, z as De } from "./schema-BDvVbmiV.js";
5
5
  import * as Oe from "react";
6
6
  import P, { Children as ke, Fragment as Ae, Suspense as je, cloneElement as Me, createContext as Ne, createRef as Pe, forwardRef as Fe, isValidElement as Ie, lazy as Le, memo as Re, useCallback as F, useContext as ze, useEffect as I, useId as Be, useImperativeHandle as Ve, useLayoutEffect as He, useMemo as L, useRef as R, useState as z, useSyncExternalStore as Ue } from "react";
@@ -1070,7 +1070,7 @@ var Io = ({ open: e = !1, title: t, width: n = 520, okText: a = "OK", cancelText
1070
1070
  children: m
1071
1071
  }) : null,
1072
1072
  l === null ? null : /* @__PURE__ */ U(Po, {
1073
- className: "mt-4",
1073
+ className: "mt-2 border-t border-[var(--border)] pt-3",
1074
1074
  children: l ?? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(i, {
1075
1075
  variant: "outline",
1076
1076
  onClick: () => c?.(),
@@ -8057,6 +8057,7 @@ var Xd = (e, t) => {
8057
8057
  destroyOnClose: !0,
8058
8058
  width: 900,
8059
8059
  getContainer: a,
8060
+ className: "gap-2 p-3",
8060
8061
  children: /* @__PURE__ */ W("div", {
8061
8062
  style: { padding: "8px 0" },
8062
8063
  children: [
@@ -8223,7 +8224,10 @@ var Xd = (e, t) => {
8223
8224
  style: { fontSize: 13 },
8224
8225
  children: "Preview"
8225
8226
  })
8226
- }), /* @__PURE__ */ U(Qu, { sheet: i })] })
8227
+ }), /* @__PURE__ */ U(Qu, {
8228
+ sheet: i,
8229
+ height: 180
8230
+ })] })
8227
8231
  ]
8228
8232
  })
8229
8233
  });
@@ -13051,7 +13055,7 @@ var fg = () => P.useContext(cg), pg = ({ debugIndex: e, traceCount: t, onDebugIn
13051
13055
  ]
13052
13056
  });
13053
13057
  }
13054
- }, Ag = P.lazy(async () => ({ default: (await Promise.resolve().then(() => Tb)).Function })), jg = ({ id: e }) => {
13058
+ }, Ag = P.lazy(async () => ({ default: (await Promise.resolve().then(() => Eb)).Function })), jg = ({ id: e }) => {
13055
13059
  let t = Pg(e), n = nh(), r = eh((e) => e.onFunctionReady), [i, a] = z(), o = R(null), s = R(null);
13056
13060
  dh(e, "monaco", {
13057
13061
  serialize: () => o.current?.saveViewState() ?? s.current ?? null,
@@ -16206,7 +16210,7 @@ var N_ = M_({
16206
16210
  let u = j.safeParse(l);
16207
16211
  if (u.success) return i([j.parse(l)]);
16208
16212
  B.error(u.error?.message);
16209
- }, Z_ = ({ addNode: e, specifications: t }) => {
16213
+ }, Z_ = "seal.dg.command.recent", Q_ = ({ addNode: e, specifications: t }) => {
16210
16214
  let n = o(), r = Ca(), i = nh(), { commandMenuOpen: a, panels: s, activePanelId: c, nodes: l, extraCommands: u } = $(({ commandMenuOpen: e, panels: t, activePanel: n, decisionGraph: r, extraCommands: i }) => ({
16211
16215
  commandMenuOpen: e,
16212
16216
  panels: t ?? [],
@@ -16275,16 +16279,42 @@ var N_ = M_({
16275
16279
  e,
16276
16280
  i
16277
16281
  ]), m = L(() => {
16278
- let e = d.trim().toLowerCase();
16279
- return e ? p.filter((t) => `${t.label} ${t.keywords}`.toLowerCase().includes(e)) : p;
16280
- }, [p, d]), h = {
16282
+ if (!a) return [];
16283
+ try {
16284
+ return JSON.parse(window.localStorage.getItem(Z_) ?? "[]");
16285
+ } catch {
16286
+ return [];
16287
+ }
16288
+ }, [a]), h = L(() => {
16289
+ let e = d.trim().toLowerCase(), t = e || m.length === 0 ? p : [...m.map((e) => p.find((t) => t.id === e)).filter((e) => !!e), ...p.filter((e) => !m.includes(e.id))];
16290
+ return e ? t.filter((t) => `${t.label} ${t.keywords}`.toLowerCase().includes(e)) : t;
16291
+ }, [
16292
+ p,
16293
+ d,
16294
+ m
16295
+ ]), [g, _] = z(0);
16296
+ I(() => {
16297
+ _(0);
16298
+ }, [d, a]);
16299
+ let v = R(null);
16300
+ I(() => {
16301
+ a && v.current?.querySelector("[data-command-active]")?.scrollIntoView?.({ block: "nearest" });
16302
+ }, [g, a]);
16303
+ let y = (e) => {
16304
+ i.setCommandMenuOpen(!1), f("");
16305
+ try {
16306
+ let t = JSON.parse(window.localStorage.getItem(Z_) ?? "[]"), n = [e.id, ...t.filter((t) => t !== e.id)].slice(0, 3);
16307
+ window.localStorage.setItem(Z_, JSON.stringify(n));
16308
+ } catch {}
16309
+ queueMicrotask(() => e.run());
16310
+ }, b = {
16281
16311
  add: n("dg.command.groupAdd"),
16282
16312
  panel: n("dg.command.groupPanels"),
16283
16313
  goto: n("dg.command.groupNodes")
16284
16314
  };
16285
16315
  return /* @__PURE__ */ U(da.Root, {
16286
- items: m,
16287
- filteredItems: m,
16316
+ items: h,
16317
+ filteredItems: h,
16288
16318
  filter: null,
16289
16319
  open: a,
16290
16320
  onOpenChange: (e) => i.setCommandMenuOpen(e),
@@ -16292,8 +16322,8 @@ var N_ = M_({
16292
16322
  onInputValueChange: (e) => f(e),
16293
16323
  multiple: !1,
16294
16324
  onValueChange: (e) => {
16295
- let t = (Array.isArray(m) ? m : []).find((t) => t === e);
16296
- t && (i.setCommandMenuOpen(!1), f(""), queueMicrotask(() => t.run()));
16325
+ let t = (Array.isArray(h) ? h : []).find((t) => t === e);
16326
+ t && y(t);
16297
16327
  },
16298
16328
  children: /* @__PURE__ */ U(da.Portal, {
16299
16329
  container: r,
@@ -16309,20 +16339,24 @@ var N_ = M_({
16309
16339
  children: [/* @__PURE__ */ U(da.Input, {
16310
16340
  "data-testid": "graph-command-input",
16311
16341
  onKeyDown: (e) => {
16312
- if (e.key === "Enter" && m.length > 0) {
16313
- e.preventDefault();
16314
- let t = m[0];
16315
- i.setCommandMenuOpen(!1), f(""), queueMicrotask(() => t.run());
16342
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
16343
+ if (h.length === 0) return;
16344
+ e.preventDefault(), _((t) => e.key === "ArrowDown" ? (t + 1) % h.length : (t - 1 + h.length) % h.length);
16345
+ return;
16316
16346
  }
16347
+ e.key === "Enter" && h.length > 0 && (e.preventDefault(), y(h[Math.min(g, h.length - 1)]));
16317
16348
  },
16318
16349
  placeholder: n("dg.command.placeholder"),
16319
16350
  className: "h-10 w-full border-b border-[var(--border)] bg-transparent px-3 text-sm outline-none"
16320
16351
  }), /* @__PURE__ */ W(da.List, {
16352
+ ref: v,
16321
16353
  className: "max-h-[320px] overflow-y-auto p-1",
16322
- children: [m.map((e) => /* @__PURE__ */ W(da.Item, {
16354
+ children: [h.map((e, t) => /* @__PURE__ */ W(da.Item, {
16323
16355
  value: e,
16324
16356
  "data-testid": "graph-command-item",
16325
- className: "flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-xs outline-none data-highlighted:bg-accent data-highlighted:text-accent-foreground",
16357
+ "data-command-active": t === g || void 0,
16358
+ onMouseMove: () => _(t),
16359
+ className: V("flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-xs outline-none", t === g && "bg-accent text-accent-foreground"),
16326
16360
  children: [
16327
16361
  e.icon,
16328
16362
  /* @__PURE__ */ U("span", {
@@ -16331,10 +16365,10 @@ var N_ = M_({
16331
16365
  }),
16332
16366
  /* @__PURE__ */ U("span", {
16333
16367
  className: "shrink-0 text-[10px] opacity-50",
16334
- children: h[e.group]
16368
+ children: b[e.group]
16335
16369
  })
16336
16370
  ]
16337
- }, e.id)), m.length === 0 && /* @__PURE__ */ U("div", {
16371
+ }, e.id)), h.length === 0 && /* @__PURE__ */ U("div", {
16338
16372
  className: "px-3 py-6 text-center text-xs opacity-50",
16339
16373
  children: n("dg.command.empty")
16340
16374
  })]
@@ -16343,7 +16377,7 @@ var N_ = M_({
16343
16377
  })
16344
16378
  })
16345
16379
  });
16346
- }, Q_ = (e, t) => {
16380
+ }, $_ = (e, t) => {
16347
16381
  let n = t.trim().toLowerCase();
16348
16382
  if (!n) return null;
16349
16383
  if ([
@@ -16354,7 +16388,7 @@ var N_ = M_({
16354
16388
  ].filter(Boolean).some((e) => String(e).toLowerCase().includes(n))) return [];
16355
16389
  let r = (e.searchKeywords ?? []).filter((e) => e.toLowerCase().includes(n));
16356
16390
  return r.length > 0 ? r : null;
16357
- }, $_ = P.memo(({ inputDisabled: e, disabled: t, collapsed: n }) => {
16391
+ }, ev = P.memo(({ inputDisabled: e, disabled: t, collapsed: n }) => {
16358
16392
  let r = $((e) => e.components || []), i = $((e) => e.customNodes || []), [a, o] = z(""), s = F((e, t, n) => {
16359
16393
  let r = e.target;
16360
16394
  if (!r) return;
@@ -16385,7 +16419,7 @@ var N_ = M_({
16385
16419
  }), e;
16386
16420
  }, [r, i]), l = L(() => Object.keys(c).reduce((e, t) => ({
16387
16421
  ...e,
16388
- [t]: (c[t] || []).filter((e) => !(a?.trim?.().length > 0) || Q_(e, a) !== null)
16422
+ [t]: (c[t] || []).filter((e) => !(a?.trim?.().length > 0) || $_(e, a) !== null)
16389
16423
  }), {}), [c, a]), u = r.length + i.length, d = (c.core?.length ?? 0) + u;
16390
16424
  return /* @__PURE__ */ W("div", { children: [d > 5 && /* @__PURE__ */ U(Do, {
16391
16425
  placeholder: "Search components...",
@@ -16396,8 +16430,8 @@ var N_ = M_({
16396
16430
  }), /* @__PURE__ */ U("div", {
16397
16431
  className: "flex grow flex-col",
16398
16432
  children: Object.keys(l).map((r) => q(r).with("core", () => l.core?.length > 0 && /* @__PURE__ */ U(P.Fragment, { children: (l.core || []).map((r) => {
16399
- let i = a?.trim?.() ? Q_(r, a) : null;
16400
- return /* @__PURE__ */ U(P.Fragment, { children: /* @__PURE__ */ U(tv, {
16433
+ let i = a?.trim?.() ? $_(r, a) : null;
16434
+ return /* @__PURE__ */ U(P.Fragment, { children: /* @__PURE__ */ U(nv, {
16401
16435
  collapsed: n,
16402
16436
  disabled: q(r.type).with(Q.Input, () => t || e).otherwise(() => t),
16403
16437
  specification: r,
@@ -16405,8 +16439,8 @@ var N_ = M_({
16405
16439
  onDragStart: (e) => N_[r.type] === void 0 ? s(e, "customNode", "kind" in r ? r.kind : "") : s(e, r.type)
16406
16440
  }) }, "kind" in r ? r.kind : r.type);
16407
16441
  }) }, r)).otherwise((e) => l[e]?.length > 0 && /* @__PURE__ */ U(P.Fragment, { children: (l?.[e] || []).map((r) => {
16408
- let i = a?.trim?.() ? Q_(r, a) : null;
16409
- return /* @__PURE__ */ U(tv, {
16442
+ let i = a?.trim?.() ? $_(r, a) : null;
16443
+ return /* @__PURE__ */ U(nv, {
16410
16444
  collapsed: n,
16411
16445
  disabled: t,
16412
16446
  specification: r,
@@ -16415,7 +16449,7 @@ var N_ = M_({
16415
16449
  }, "kind" in r ? r.kind : r.type);
16416
16450
  }) }, e)))
16417
16451
  })] });
16418
- }), ev = {
16452
+ }), tv = {
16419
16453
  reference: {
16420
16454
  label: "REF",
16421
16455
  title: "Reference domain — ships with zen-udf"
@@ -16428,8 +16462,8 @@ var N_ = M_({
16428
16462
  label: "IND",
16429
16463
  title: "Industry pack (proprietary)"
16430
16464
  }
16431
- }, tv = ({ specification: e, matchedKeywords: t, disabled: n = !1, collapsed: r, ...i }) => {
16432
- let a = e.meta ? ev[e.meta.origin] : void 0;
16465
+ }, nv = ({ specification: e, matchedKeywords: t, disabled: n = !1, collapsed: r, ...i }) => {
16466
+ let a = e.meta ? tv[e.meta.origin] : void 0;
16433
16467
  return /* @__PURE__ */ W("div", {
16434
16468
  className: V("draggable-component relative cursor-grab [transform:translate(0)]"),
16435
16469
  draggable: !n,
@@ -16450,7 +16484,7 @@ var N_ = M_({
16450
16484
  })
16451
16485
  })]
16452
16486
  });
16453
- }, nv = () => {
16487
+ }, rv = () => {
16454
16488
  let e = o(), [t, n] = P.useState(null), [r, i] = P.useState(!1), a = $(({ customNodes: e }) => e);
16455
16489
  if ($i({ onChange: ({ nodes: e }) => {
16456
16490
  let t = e[e.length - 1];
@@ -16515,7 +16549,7 @@ var N_ = M_({
16515
16549
  })]
16516
16550
  })
16517
16551
  }) : null;
16518
- }, rv = [
16552
+ }, iv = [
16519
16553
  "[--xy-background-color:transparent]",
16520
16554
  "[--xy-background-pattern-color:var(--border)]",
16521
16555
  "[--xy-edge-stroke:color-mix(in_oklab,var(--muted-foreground)_45%,transparent)]",
@@ -16539,13 +16573,13 @@ var N_ = M_({
16539
16573
  "[--xy-selection-background-color:color-mix(in_oklab,var(--primary)_8%,transparent)]",
16540
16574
  "[--xy-selection-border:1px_dashed_var(--primary)]",
16541
16575
  "[--xy-attribution-background-color:transparent]"
16542
- ].join(" "), iv = null, av = () => iv ??= Object.entries(N_).reduce((e, [t, n]) => ({
16576
+ ].join(" "), av = null, ov = () => av ??= Object.entries(N_).reduce((e, [t, n]) => ({
16543
16577
  ...e,
16544
16578
  [t]: P.memo((e) => n.renderNode({
16545
16579
  specification: n,
16546
16580
  ...e
16547
16581
  }), (e, t) => e.id === t.id && e.selected === t.selected && ua(e.data, t.data))
16548
- }), {}), ov = { edge: P.memo(W_(null)) }, sv = Fe(function({ reactFlowProOptions: e, className: t }, n) {
16582
+ }), {}), sv = { edge: P.memo(W_(null)) }, cv = Fe(function({ reactFlowProOptions: e, className: t }, n) {
16549
16583
  let r = R(null), i = R(null), a = Qi([]), s = Zi([]), [c, l] = z(() => localStorage.getItem("jdm-components-opened") ? localStorage.getItem(J_) === "true" : (localStorage.setItem(J_, "true"), !0)), u = R(void 0), d = rh(), f = ch(), p = nh(), m = th((e) => e), { onReactFlowInit: h } = eh(({ onReactFlowInit: e }) => ({ onReactFlowInit: e })), { modal: g } = Va.useApp(), { disabled: _, hasInputNode: v, components: y, customNodes: b, id: x } = $(({ id: e, disabled: t, components: n, customNodes: r, decisionGraph: i }) => ({
16550
16584
  id: e,
16551
16585
  disabled: t,
@@ -16590,7 +16624,7 @@ var N_ = M_({
16590
16624
  ...e
16591
16625
  }), (e, t) => e.id === t.id && e.selected === t.selected && ua(e.data, t.data))
16592
16626
  }), {
16593
- ...av(),
16627
+ ...ov(),
16594
16628
  customNode: S
16595
16629
  }), [y, S]), w = X_({
16596
16630
  reactFlowWrapper: r,
@@ -16680,7 +16714,7 @@ var N_ = M_({
16680
16714
  }
16681
16715
  },
16682
16716
  children: /* @__PURE__ */ U("div", {
16683
- className: V(["react-flow"], rv),
16717
+ className: V(["react-flow"], iv),
16684
16718
  ref: r,
16685
16719
  children: /* @__PURE__ */ W(Gi, {
16686
16720
  deleteKeyCode: null,
@@ -16701,7 +16735,7 @@ var N_ = M_({
16701
16735
  minZoom: .25,
16702
16736
  selectionMode: qi.Partial,
16703
16737
  nodeTypes: C,
16704
- edgeTypes: ov,
16738
+ edgeTypes: sv,
16705
16739
  onDrop: E,
16706
16740
  onDragOver: D,
16707
16741
  onConnect: (e) => {
@@ -16744,7 +16778,7 @@ var N_ = M_({
16744
16778
  color: "var(--border)",
16745
16779
  gap: 20
16746
16780
  }),
16747
- /* @__PURE__ */ U(nv, {})
16781
+ /* @__PURE__ */ U(rv, {})
16748
16782
  ]
16749
16783
  })
16750
16784
  })
@@ -16781,7 +16815,7 @@ var N_ = M_({
16781
16815
  }
16782
16816
  })]
16783
16817
  }),
16784
- /* @__PURE__ */ U(Z_, {
16818
+ /* @__PURE__ */ U(Q_, {
16785
16819
  addNode: w,
16786
16820
  specifications: [
16787
16821
  ...Object.values(N_),
@@ -16791,7 +16825,7 @@ var N_ = M_({
16791
16825
  }),
16792
16826
  /* @__PURE__ */ U("div", {
16793
16827
  className: "min-h-0 flex-1 overflow-y-auto",
16794
- children: /* @__PURE__ */ U($_, {
16828
+ children: /* @__PURE__ */ U(ev, {
16795
16829
  inputDisabled: v,
16796
16830
  collapsed: !c,
16797
16831
  disabled: _
@@ -16801,7 +16835,7 @@ var N_ = M_({
16801
16835
  })]
16802
16836
  })
16803
16837
  });
16804
- }), { Title: cv, Text: lv } = Z, uv = P.memo(({ className: e }) => {
16838
+ }), { Title: lv, Text: uv } = Z, dv = P.memo(({ className: e }) => {
16805
16839
  let t = o(), { decisionGraph: n, customComponents: r, viewConfig: i, viewConfigCta: a } = $((e) => ({
16806
16840
  decisionGraph: e.decisionGraph || [],
16807
16841
  customComponents: e.components,
@@ -16840,14 +16874,14 @@ var N_ = M_({
16840
16874
  icon: t?.icon
16841
16875
  }), /* @__PURE__ */ W("div", {
16842
16876
  style: { flex: 1 },
16843
- children: [/* @__PURE__ */ U(lv, {
16877
+ children: [/* @__PURE__ */ U(uv, {
16844
16878
  style: {
16845
16879
  margin: 0,
16846
16880
  fontSize: 14,
16847
16881
  marginBottom: e?.description ? "4px" : 0
16848
16882
  },
16849
16883
  children: e.name
16850
- }), e?.description && /* @__PURE__ */ U(lv, {
16884
+ }), e?.description && /* @__PURE__ */ U(uv, {
16851
16885
  type: "secondary",
16852
16886
  style: { fontSize: "14px" },
16853
16887
  children: e?.description
@@ -16882,7 +16916,7 @@ var N_ = M_({
16882
16916
  className: "mb-8",
16883
16917
  children: [/* @__PURE__ */ W("div", {
16884
16918
  className: "flex justify-between",
16885
- children: [/* @__PURE__ */ U(cv, {
16919
+ children: [/* @__PURE__ */ U(lv, {
16886
16920
  level: 4,
16887
16921
  style: {
16888
16922
  margin: 0,
@@ -16896,13 +16930,13 @@ var N_ = M_({
16896
16930
  },
16897
16931
  children: a
16898
16932
  })]
16899
- }), m ? /* @__PURE__ */ U(H, { children: n?.nodes?.length > 0 ? /* @__PURE__ */ U(lv, {
16933
+ }), m ? /* @__PURE__ */ U(H, { children: n?.nodes?.length > 0 ? /* @__PURE__ */ U(uv, {
16900
16934
  type: "secondary",
16901
16935
  children: "This decision model contains multiple components, but no view has been configured yet."
16902
- }) : /* @__PURE__ */ U(lv, {
16936
+ }) : /* @__PURE__ */ U(uv, {
16903
16937
  type: "secondary",
16904
16938
  children: "This decision model doesn't contain any component."
16905
- }) }) : /* @__PURE__ */ U(lv, {
16939
+ }) }) : /* @__PURE__ */ U(uv, {
16906
16940
  type: "secondary",
16907
16941
  children: i?.description || "Configure business rules for your decision model"
16908
16942
  })]
@@ -16921,7 +16955,7 @@ var N_ = M_({
16921
16955
  icon: /* @__PURE__ */ U($c, {}),
16922
16956
  onClick: () => d(""),
16923
16957
  children: "Clear"
16924
- })] }), /* @__PURE__ */ W(lv, {
16958
+ })] }), /* @__PURE__ */ W(uv, {
16925
16959
  type: "secondary",
16926
16960
  style: { whiteSpace: "nowrap" },
16927
16961
  children: [l?.length || 0, " configurable items"]
@@ -16929,7 +16963,7 @@ var N_ = M_({
16929
16963
  }),
16930
16964
  p.filter((e) => e?.nodes?.length > 0).map((e) => /* @__PURE__ */ W("div", {
16931
16965
  className: "mb-8",
16932
- children: [/* @__PURE__ */ U(cv, {
16966
+ children: [/* @__PURE__ */ U(lv, {
16933
16967
  level: 5,
16934
16968
  style: { marginBottom: "16px" },
16935
16969
  children: e.title
@@ -16941,7 +16975,7 @@ var N_ = M_({
16941
16975
  ]
16942
16976
  })
16943
16977
  });
16944
- }), dv = (e, t) => e.id === t.id || e.value?.toLowerCase() === t.value?.toLowerCase() || e.label?.toLowerCase() === t.label?.toLowerCase(), fv = (e, t) => t ? {
16978
+ }), fv = (e, t) => e.id === t.id || e.value?.toLowerCase() === t.value?.toLowerCase() || e.label?.toLowerCase() === t.label?.toLowerCase(), pv = (e, t) => t ? {
16945
16979
  id: e.id,
16946
16980
  label: e.label || t.label,
16947
16981
  value: e.value || t.value,
@@ -16949,14 +16983,14 @@ var N_ = M_({
16949
16983
  } : {
16950
16984
  ...e,
16951
16985
  value: e.value || e.label
16952
- }, pv = (e, t) => {
16953
- let n = [...t.map((t) => fv(t, e.find((e) => dv(e, t)))), ...e.filter((e) => !t.some((t) => dv(t, e)))];
16986
+ }, mv = (e, t) => {
16987
+ let n = [...t.map((t) => pv(t, e.find((e) => fv(e, t)))), ...e.filter((e) => !t.some((t) => fv(t, e)))];
16954
16988
  return n.some((e) => e.id === "_description") || n.push({
16955
16989
  id: "_description",
16956
16990
  label: "DESCRIPTION",
16957
16991
  value: "description"
16958
16992
  }), n;
16959
- }, mv = (e) => e.reduce((t, n, r) => {
16993
+ }, hv = (e) => e.reduce((t, n, r) => {
16960
16994
  let i = e.some((e) => e.value === "description"), a = e.slice(0, r).some((e) => e.type === "output"), o;
16961
16995
  return o = i ? r === e.length - 2 && !a : r === e.length - 1 && n.value !== "description" && !a, {
16962
16996
  ...t,
@@ -16967,7 +17001,7 @@ var N_ = M_({
16967
17001
  type: o ? "output" : n.type
16968
17002
  }
16969
17003
  };
16970
- }, {}), hv = (e, t, n) => Object.keys(t).map((r, i) => {
17004
+ }, {}), gv = (e, t, n) => Object.keys(t).map((r, i) => {
16971
17005
  let a = t[r], o = n[r] || {}, s = Object.keys(a).map((e) => ({
16972
17006
  ...a[e],
16973
17007
  wrapInQuotes: o[e] || !1,
@@ -16989,7 +17023,7 @@ var N_ = M_({
16989
17023
  passThrough: e[i].existingTableData.passThrough,
16990
17024
  executionMode: e[i].existingTableData.executionMode
16991
17025
  };
16992
- }), gv = {
17026
+ }), _v = {
16993
17027
  input: {
16994
17028
  label: "Input",
16995
17029
  color: "var(--seal-color-field-input)"
@@ -16998,7 +17032,7 @@ var N_ = M_({
16998
17032
  label: "Output",
16999
17033
  color: "var(--seal-color-field-output)"
17000
17034
  }
17001
- }, _v = (e) => `step${e}`, vv = ({ excelData: e, handleSuccess: t, handleCancel: n }) => {
17035
+ }, vv = (e) => `step${e}`, yv = ({ excelData: e, handleSuccess: t, handleCancel: n }) => {
17002
17036
  let r = o(), i = Zu(), [a, s] = z(0), c = L(() => e?.map((e) => ({
17003
17037
  key: e.id,
17004
17038
  title: e.name
@@ -17018,13 +17052,13 @@ var N_ = M_({
17018
17052
  value: e.id === "_description" ? "description" : e.value,
17019
17053
  label: e.name,
17020
17054
  ...e.id !== "_description" && { type: e._type }
17021
- })), r = pv(t, n);
17055
+ })), r = mv(t, n);
17022
17056
  u(r);
17023
17057
  let i = r.filter((e) => n.some((t) => t.id === e.id));
17024
17058
  if (i.length) {
17025
- let e = mv(i);
17059
+ let e = hv(i);
17026
17060
  g((t) => {
17027
- let n = _v(a);
17061
+ let n = vv(a);
17028
17062
  return (t || {})[n] ? t : {
17029
17063
  ...t || {},
17030
17064
  [n]: e
@@ -17032,7 +17066,7 @@ var N_ = M_({
17032
17066
  });
17033
17067
  }
17034
17068
  }, [e, a]);
17035
- let _ = e?.[a]?.headers ?? [], v = h?.[_v(a)], y = P.useMemo(() => [
17069
+ let _ = e?.[a]?.headers ?? [], v = h?.[vv(a)], y = P.useMemo(() => [
17036
17070
  {
17037
17071
  id: "excel",
17038
17072
  header: "Excel columns",
@@ -17060,7 +17094,7 @@ var N_ = M_({
17060
17094
  value: v?.[t.id]?.value,
17061
17095
  allowClear: !0,
17062
17096
  onClear: () => {
17063
- let e = _v(a);
17097
+ let e = vv(a);
17064
17098
  g((n) => {
17065
17099
  let r = { ...(n || {})[e] };
17066
17100
  return delete r[t.id], {
@@ -17068,7 +17102,7 @@ var N_ = M_({
17068
17102
  [e]: r
17069
17103
  };
17070
17104
  }), m((e) => {
17071
- let n = _v(a), r = { ...e[n] };
17105
+ let n = vv(a), r = { ...e[n] };
17072
17106
  return delete r[t.id], {
17073
17107
  ...e,
17074
17108
  [n]: r
@@ -17078,7 +17112,7 @@ var N_ = M_({
17078
17112
  onSelect: (e, n) => {
17079
17113
  let { id: r, label: i, value: o, type: s, wrapInQuotes: c } = n;
17080
17114
  g((e) => {
17081
- let n = _v(a), l = { ...(e || {})[n] }, u = [];
17115
+ let n = vv(a), l = { ...(e || {})[n] }, u = [];
17082
17116
  return Object.keys(l).forEach((e) => {
17083
17117
  e !== t.id && (l[e].value === o || l[e].label === i) && (u.push(e), delete l[e]);
17084
17118
  }), u.length > 0 && m((e) => {
@@ -17156,8 +17190,8 @@ var N_ = M_({
17156
17190
  alignItems: "center"
17157
17191
  },
17158
17192
  children: [/* @__PURE__ */ U("span", { children: e.data.label }), t && /* @__PURE__ */ U(ys, {
17159
- style: { background: gv[t].color },
17160
- children: gv[t].label
17193
+ style: { background: _v[t].color },
17194
+ children: _v[t].label
17161
17195
  })]
17162
17196
  });
17163
17197
  },
@@ -17191,7 +17225,7 @@ var N_ = M_({
17191
17225
  value: v?.[t.id]?.type ?? "input",
17192
17226
  onChange: (e) => {
17193
17227
  g((n) => {
17194
- let r = _v(a), i = (n || {})[r];
17228
+ let r = vv(a), i = (n || {})[r];
17195
17229
  return {
17196
17230
  ...n || {},
17197
17231
  [r]: {
@@ -17246,10 +17280,10 @@ var N_ = M_({
17246
17280
  },
17247
17281
  children: /* @__PURE__ */ U(Wa, {
17248
17282
  disabled: !v?.[t.id],
17249
- checked: p[_v(a)]?.[t.id] || !1,
17283
+ checked: p[vv(a)]?.[t.id] || !1,
17250
17284
  onChange: (e) => {
17251
17285
  m((n) => {
17252
- let r = _v(a);
17286
+ let r = vv(a);
17253
17287
  return {
17254
17288
  ...n,
17255
17289
  [r]: {
@@ -17321,7 +17355,7 @@ var N_ = M_({
17321
17355
  children: [
17322
17356
  a < (e || []).length - 1 && /* @__PURE__ */ U(Y, {
17323
17357
  type: "primary",
17324
- disabled: !h?.[_v(a)] || yi(h[_v(a)]),
17358
+ disabled: !h?.[vv(a)] || yi(h[vv(a)]),
17325
17359
  onClick: () => {
17326
17360
  s(a + 1);
17327
17361
  },
@@ -17329,9 +17363,9 @@ var N_ = M_({
17329
17363
  }),
17330
17364
  a === (e || []).length - 1 && /* @__PURE__ */ U(Y, {
17331
17365
  type: "primary",
17332
- disabled: !h?.[_v(a)] || yi(h[_v(a)]),
17366
+ disabled: !h?.[vv(a)] || yi(h[vv(a)]),
17333
17367
  onClick: () => {
17334
- h && e && t(hv(e, h, p));
17368
+ h && e && t(gv(e, h, p));
17335
17369
  },
17336
17370
  children: "Done"
17337
17371
  }),
@@ -17346,7 +17380,7 @@ var N_ = M_({
17346
17380
  })
17347
17381
  ]
17348
17382
  });
17349
- }, yv = "application/vnd.gorules.decision", bv = () => {
17383
+ }, bv = "application/vnd.gorules.decision", xv = () => {
17350
17384
  let e = o(), t = rh(), n = R(null), r = R(null), [i, a] = z(), { setDecisionGraph: s, setActivePanel: c, setCommandMenuOpen: l, autoLayout: u } = nh(), { disabled: d, panels: f, activePanel: p, viewConfig: m, commandMenuOpen: h } = $(({ disabled: e, panels: t, activePanel: n, viewConfig: r, commandMenuOpen: i }) => ({
17351
17385
  disabled: e,
17352
17386
  panels: t,
@@ -17358,7 +17392,7 @@ var N_ = M_({
17358
17392
  n.onload = function(e) {
17359
17393
  try {
17360
17394
  let t = JSON.parse(e?.target?.result);
17361
- if (t?.contentType !== yv) throw Error("Invalid content type");
17395
+ if (t?.contentType !== bv) throw Error("Invalid content type");
17362
17396
  let n = Array.isArray(t?.nodes) ? t.nodes : [], r = n.map((e) => e.id), i = t.edges.filter((e) => r.includes(e?.targetId) && r.includes(e?.sourceId)), a = Se.safeParse({
17363
17397
  nodes: n,
17364
17398
  edges: i,
@@ -17450,7 +17484,7 @@ var N_ = M_({
17450
17484
  }, y = async () => {
17451
17485
  try {
17452
17486
  let { name: e, decisionGraph: n } = t.stateStore.getState(), r = `${e.replaceAll(".json", "")}.json`, i = JSON.stringify({
17453
- contentType: yv,
17487
+ contentType: bv,
17454
17488
  nodes: n.nodes,
17455
17489
  edges: n.edges
17456
17490
  }, null, 2), a = new Blob([i], { type: "application/json" }), o = URL.createObjectURL(a), s = window.document.createElement("a");
@@ -17583,14 +17617,14 @@ var N_ = M_({
17583
17617
  })]
17584
17618
  })
17585
17619
  ]
17586
- }), /* @__PURE__ */ U(vv, {
17620
+ }), /* @__PURE__ */ U(yv, {
17587
17621
  excelData: i,
17588
17622
  handleSuccess: v,
17589
17623
  handleCancel: () => {
17590
17624
  a(null);
17591
17625
  }
17592
17626
  })] });
17593
- }, xv = ({ disabled: e, tabBarExtraContent: t }) => {
17627
+ }, Sv = ({ disabled: e, tabBarExtraContent: t }) => {
17594
17628
  let n = nh(), { openNodes: r, activeNodeId: i, viewConfig: a } = $(({ decisionGraph: e, activeTab: t, openTabs: n, viewConfig: r }) => ({
17595
17629
  activeNodeId: (e?.nodes ?? []).find((e) => e.id === t)?.id,
17596
17630
  openNodes: (n || []).map((t) => {
@@ -17605,7 +17639,7 @@ var N_ = M_({
17605
17639
  viewConfig: r
17606
17640
  })), o = L(() => [{
17607
17641
  key: "graph",
17608
- label: /* @__PURE__ */ U(Sv, {
17642
+ label: /* @__PURE__ */ U(Cv, {
17609
17643
  total: r?.length,
17610
17644
  icon: a?.enabled ? /* @__PURE__ */ U(Jt, {}) : /* @__PURE__ */ U(Ht, {}),
17611
17645
  name: a?.enabled ? "Nodes" : "Graph",
@@ -17628,7 +17662,7 @@ var N_ = M_({
17628
17662
  return {
17629
17663
  disabled: e,
17630
17664
  key: t.id,
17631
- label: /* @__PURE__ */ U(Sv, {
17665
+ label: /* @__PURE__ */ U(Cv, {
17632
17666
  onContextClick: (e) => {
17633
17667
  n.closeTab(t.id, e);
17634
17668
  },
@@ -17644,7 +17678,7 @@ var N_ = M_({
17644
17678
  };
17645
17679
  })]
17646
17680
  }) });
17647
- }, Sv = ({ total: e = 0, index: t = -1, icon: n, name: r, active: i, diffStatus: a, color: s = Wh.Blue, onClose: c, onContextClick: l }) => {
17681
+ }, Cv = ({ total: e = 0, index: t = -1, icon: n, name: r, active: i, diffStatus: a, color: s = Wh.Blue, onClose: c, onContextClick: l }) => {
17648
17682
  let u = o(), d = [
17649
17683
  e > 0 && t !== -1 && {
17650
17684
  key: "close",
@@ -17716,7 +17750,7 @@ var N_ = M_({
17716
17750
  trigger: ["contextMenu"],
17717
17751
  children: f
17718
17752
  });
17719
- }, Cv = Ge([
17753
+ }, wv = Ge([
17720
17754
  "relative w-full text-sm border has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] grid-cols-[0_1fr] grid gap-y-0.5 items-center [&>svg:not([class*=size-])]:size-4",
17721
17755
  "has-[>[data-slot=alert-title]+[data-slot=alert-description]]:items-start",
17722
17756
  "has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_svg]:translate-y-0.5",
@@ -17729,22 +17763,22 @@ var N_ = M_({
17729
17763
  } },
17730
17764
  defaultVariants: { variant: "default" }
17731
17765
  });
17732
- function wv({ className: e, variant: t, ...n }) {
17766
+ function Tv({ className: e, variant: t, ...n }) {
17733
17767
  return /* @__PURE__ */ U("div", {
17734
17768
  "data-slot": "alert",
17735
17769
  role: "alert",
17736
- className: r(Cv({ variant: t }), e),
17770
+ className: r(wv({ variant: t }), e),
17737
17771
  ...n
17738
17772
  });
17739
17773
  }
17740
- function Tv({ className: e, ...t }) {
17774
+ function Ev({ className: e, ...t }) {
17741
17775
  return /* @__PURE__ */ U("div", {
17742
17776
  "data-slot": "alert-title",
17743
17777
  className: r("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", e),
17744
17778
  ...t
17745
17779
  });
17746
17780
  }
17747
- function Ev({ className: e, ...t }) {
17781
+ function Dv({ className: e, ...t }) {
17748
17782
  return /* @__PURE__ */ U("div", {
17749
17783
  "data-slot": "alert-action",
17750
17784
  className: r("flex gap-1.5 max-sm:col-start-2 max-sm:mt-2 max-sm:justify-start sm:col-start-3 sm:row-start-1 sm:justify-end sm:self-center", e),
@@ -17753,28 +17787,28 @@ function Ev({ className: e, ...t }) {
17753
17787
  }
17754
17788
  //#endregion
17755
17789
  //#region src/helpers/custom-function-schema.ts
17756
- var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv = (e) => !e || typeof e != "object" || Array.isArray(e) ? Ov : e, Av = (e, t) => ({
17790
+ var Ov = (e) => typeof e == "object" && !!e && !Array.isArray(e), kv = {}, Av = (e) => !e || typeof e != "object" || Array.isArray(e) ? kv : e, jv = (e, t) => ({
17757
17791
  ...e,
17758
17792
  namespace: e?.namespace ?? t,
17759
- returns: kv(e?.returns)
17760
- }), jv = (e) => Array.isArray(e) ? e.flatMap((e) => Array.isArray(e?.tools) ? e.tools.map((t) => Av(t, e?.name)) : e?.name ? [Av(e)] : []) : [], Mv = (e) => Array.isArray(e) || typeof e == "string" && e.includes(";;"), Nv = (e) => e?.type === "function" || Mv(e?.value), Pv = (e) => {
17793
+ returns: Av(e?.returns)
17794
+ }), Mv = (e) => Array.isArray(e) ? e.flatMap((e) => Array.isArray(e?.tools) ? e.tools.map((t) => jv(t, e?.name)) : e?.name ? [jv(e)] : []) : [], Nv = (e) => Array.isArray(e) || typeof e == "string" && e.includes(";;"), Pv = (e) => e?.type === "function" || Nv(e?.value), Fv = (e) => {
17761
17795
  if (Array.isArray(e)) return e[0]?.trim() || null;
17762
17796
  if (typeof e != "string" || !e.trim()) return null;
17763
17797
  let [t] = Nm(e);
17764
17798
  return t?.trim() || null;
17765
- }, Fv = (e, t) => {
17766
- if (Dv(e)) return null;
17767
- let n = Pv(e);
17799
+ }, Iv = (e, t) => {
17800
+ if (Ov(e)) return null;
17801
+ let n = Fv(e);
17768
17802
  if (!n) return null;
17769
- let r = Array.isArray(e) ? e.slice(1) : typeof e == "string" && e.includes(";;") ? Nm(e).slice(1) : [], i = t && Dv(t.parameters) && Dv(t.parameters.properties) ? t.parameters.properties : {}, a = Object.keys(i), o = {};
17803
+ let r = Array.isArray(e) ? e.slice(1) : typeof e == "string" && e.includes(";;") ? Nm(e).slice(1) : [], i = t && Ov(t.parameters) && Ov(t.parameters.properties) ? t.parameters.properties : {}, a = Object.keys(i), o = {};
17770
17804
  return r.forEach((e, t) => {
17771
17805
  o[a[t] ?? `arg${t + 1}`] = e;
17772
17806
  }), {
17773
17807
  $call: n,
17774
17808
  kwargs: o
17775
17809
  };
17776
- }, Iv = (e, t) => {
17777
- let n = Array.isArray(t) ? t.filter(Boolean) : [], r = jv(n);
17810
+ }, Lv = (e, t) => {
17811
+ let n = Array.isArray(t) ? t.filter(Boolean) : [], r = Mv(n);
17778
17812
  if (!e) return {
17779
17813
  mode: "free",
17780
17814
  functions: r
@@ -17786,40 +17820,40 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17786
17820
  let i = n.find((t) => t?.name === e);
17787
17821
  return i ? {
17788
17822
  mode: "scoped",
17789
- functions: jv([i])
17823
+ functions: Mv([i])
17790
17824
  } : {
17791
17825
  mode: "free",
17792
17826
  functions: r,
17793
17827
  orphanKind: e
17794
17828
  };
17795
- }, Lv = (e) => {
17796
- if (Dv(e)) return e.mode === "literal" ? typeof e.value == "string" ? "string" : typeof e.value : null;
17829
+ }, Rv = (e) => {
17830
+ if (Ov(e)) return e.mode === "literal" ? typeof e.value == "string" ? "string" : typeof e.value : null;
17797
17831
  if (typeof e != "string") return null;
17798
17832
  let t = e.trim();
17799
17833
  return /^-?\d+(\.\d+)?$/.test(t) ? "number" : t === "true" || t === "false" ? "boolean" : /^".*"$/.test(t) || /^'.*'$/.test(t) ? "string" : t.startsWith("{") || t.startsWith("[") ? "object" : null;
17800
- }, Rv = (e, t) => e === t || e === "integer" && t === "number" || e === "number" && t === "integer", zv = (e, t) => {
17834
+ }, zv = (e, t) => e === t || e === "integer" && t === "number" || e === "number" && t === "integer", Bv = (e, t) => {
17801
17835
  if (e && e.mode === "scoped" && t) return e.functions.find((e) => e?.name === t);
17802
- }, Bv = (e, t) => {
17836
+ }, Vv = (e, t) => {
17803
17837
  if (!t || t.mode !== "scoped" || !Array.isArray(e)) return [];
17804
17838
  let n = [];
17805
17839
  return e.forEach((r) => {
17806
- if (Dv(r.value) && typeof r.value.$call == "string") {
17807
- let i = zv(t, r.value.$call);
17840
+ if (Ov(r.value) && typeof r.value.$call == "string") {
17841
+ let i = Bv(t, r.value.$call);
17808
17842
  if (!i) return;
17809
- let a = Dv(i.parameters) ? i.parameters.properties ?? {} : {}, o = Object.keys(a), s = Dv(r.value.kwargs) ? r.value.kwargs : {}, c = o.filter((e) => !(e in s)).map((e) => ({
17843
+ let a = Ov(i.parameters) ? i.parameters.properties ?? {} : {}, o = Object.keys(a), s = Ov(r.value.kwargs) ? r.value.kwargs : {}, c = o.filter((e) => !(e in s)).map((e) => ({
17810
17844
  name: e,
17811
17845
  default: a[e]?.default
17812
17846
  })), l = Object.keys(s).filter((e) => !o.includes(e) && e !== "$positional"), u = "kwargs" in a, d = [];
17813
17847
  o.forEach((e) => {
17814
- let t = String(a[e]?.type ?? ""), n = Lv(s[e]);
17815
- n === null || t === "" || Rv(t, n) || d.push({
17848
+ let t = String(a[e]?.type ?? ""), n = Rv(s[e]);
17849
+ n === null || t === "" || zv(t, n) || d.push({
17816
17850
  name: e,
17817
17851
  declaredType: t,
17818
17852
  actual: n
17819
17853
  });
17820
17854
  });
17821
17855
  let f = /* @__PURE__ */ new Set();
17822
- Qv(r.value, f);
17856
+ $v(r.value, f);
17823
17857
  let p = new Set(e.map((e) => e?.key).filter(Boolean)), m = [...f].filter((e) => !p.has(e)).sort();
17824
17858
  (c.length > 0 || l.length > 0 || d.length > 0 || u || m.length > 0) && n.push({
17825
17859
  rowId: r.id,
@@ -17833,12 +17867,12 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17833
17867
  });
17834
17868
  return;
17835
17869
  }
17836
- if (!Nv(r)) return;
17837
- let i = Pv(r.value);
17870
+ if (!Pv(r)) return;
17871
+ let i = Fv(r.value);
17838
17872
  if (!i) return;
17839
- let a = zv(t, i);
17873
+ let a = Bv(t, i);
17840
17874
  if (!a) return;
17841
- let o = Dv(a.parameters) ? a.parameters.properties ?? {} : {}, s = Object.keys(o), c = Dv(r.arg_exprs) ? r.arg_exprs : null, l = Array.isArray(r.value) ? r.value.slice(1) : [];
17875
+ let o = Ov(a.parameters) ? a.parameters.properties ?? {} : {}, s = Object.keys(o), c = Ov(r.arg_exprs) ? r.arg_exprs : null, l = Array.isArray(r.value) ? r.value.slice(1) : [];
17842
17876
  if (c) {
17843
17877
  let e = Object.keys(c), t = s.filter((t) => !e.includes(t)).map((e) => ({
17844
17878
  name: e,
@@ -17865,12 +17899,12 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17865
17899
  unrecognized: []
17866
17900
  });
17867
17901
  }), n;
17868
- }, Vv = (e) => typeof e == "string" ? e.trim().startsWith("$.") : Dv(e) && typeof e.value == "string" ? (e.mode === "expression" || e.mode === "reference") && e.value.trim().startsWith("$.") : !1, Hv = (e) => {
17902
+ }, Hv = (e) => typeof e == "string" ? e.trim().startsWith("$.") : Ov(e) && typeof e.value == "string" ? (e.mode === "expression" || e.mode === "reference") && e.value.trim().startsWith("$.") : !1, Uv = (e) => {
17869
17903
  if (!Array.isArray(e)) return [];
17870
17904
  let t = [];
17871
17905
  for (let n of e) {
17872
- if (!Dv(n) || !Dv(n.value) || n.value.$call === void 0) continue;
17873
- let e = Dv(n.value.kwargs) ? n.value.kwargs : {}, r = Object.entries(e).filter(([, e]) => Vv(e)).map(([e]) => e);
17906
+ if (!Ov(n) || !Ov(n.value) || n.value.$call === void 0) continue;
17907
+ let e = Ov(n.value.kwargs) ? n.value.kwargs : {}, r = Object.entries(e).filter(([, e]) => Hv(e)).map(([e]) => e);
17874
17908
  r.length > 0 && t.push({
17875
17909
  rowId: String(n.id ?? ""),
17876
17910
  rowKey: String(n.key ?? ""),
@@ -17878,16 +17912,16 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17878
17912
  });
17879
17913
  }
17880
17914
  return t;
17881
- }, Uv = (e, t) => {
17882
- let n = new Set((t ?? Hv(e)).map((e) => e.rowId));
17915
+ }, Wv = (e, t) => {
17916
+ let n = new Set((t ?? Uv(e)).map((e) => e.rowId));
17883
17917
  if (n.size === 0) return null;
17884
- let r = (e) => typeof e == "string" && e.trim().startsWith("$.") ? e.replace(/^\$\./, "") : Dv(e) && typeof e.value == "string" && (e.mode === "expression" || e.mode === "reference") && e.value.trim().startsWith("$.") ? {
17918
+ let r = (e) => typeof e == "string" && e.trim().startsWith("$.") ? e.replace(/^\$\./, "") : Ov(e) && typeof e.value == "string" && (e.mode === "expression" || e.mode === "reference") && e.value.trim().startsWith("$.") ? {
17885
17919
  ...e,
17886
17920
  value: String(e.value).replace(/^\$\./, "")
17887
17921
  } : e, i = !1, a = e.map((e) => {
17888
- if (!Dv(e) || !n.has(String(e?.id ?? ""))) return e;
17922
+ if (!Ov(e) || !n.has(String(e?.id ?? ""))) return e;
17889
17923
  let t = e?.value;
17890
- return !Dv(t) || !Dv(t.kwargs) ? e : (i = !0, {
17924
+ return !Ov(t) || !Ov(t.kwargs) ? e : (i = !0, {
17891
17925
  ...e,
17892
17926
  value: {
17893
17927
  ...t,
@@ -17896,30 +17930,30 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17896
17930
  });
17897
17931
  });
17898
17932
  return i ? a : null;
17899
- }, Wv = (e, t, n) => {
17933
+ }, Gv = (e, t, n) => {
17900
17934
  if (!n || n.mode !== "scoped" || !Array.isArray(e) || !Array.isArray(t) || t.length === 0) return null;
17901
17935
  let r = new Map(t.filter((e) => e.missing.length > 0).map((e) => [e.rowId, e]));
17902
17936
  if (r.size === 0) return null;
17903
17937
  let i = !1, a = e.map((e) => {
17904
17938
  let t = r.get(e?.id);
17905
17939
  if (!t) return e;
17906
- let a = zv(n, t.functionName), o = a && Dv(a.parameters) ? a.parameters.properties ?? {} : {}, s = a ? Object.keys(o) : [];
17940
+ let a = Bv(n, t.functionName), o = a && Ov(a.parameters) ? a.parameters.properties ?? {} : {}, s = a ? Object.keys(o) : [];
17907
17941
  if (s.length === 0) return e;
17908
- let c = Dv(e.arg_exprs) ? { ...e.arg_exprs } : {}, l = Array.isArray(e.value) ? e.value.slice(1) : [];
17942
+ let c = Ov(e.arg_exprs) ? { ...e.arg_exprs } : {}, l = Array.isArray(e.value) ? e.value.slice(1) : [];
17909
17943
  return s.forEach((e, t) => {
17910
17944
  if (e in c) return;
17911
17945
  let n = l[t];
17912
17946
  c[e] = n === void 0 ? o[e]?.default ?? "" : n, i = !0;
17913
- }), i ||= s.some((t) => !Object.keys(Dv(e.arg_exprs) ? e.arg_exprs : {}).includes(t)), {
17947
+ }), i ||= s.some((t) => !Object.keys(Ov(e.arg_exprs) ? e.arg_exprs : {}).includes(t)), {
17914
17948
  ...e,
17915
17949
  arg_exprs: c,
17916
17950
  value: [t.functionName, ...s.map((e) => c[e] ?? "")]
17917
17951
  };
17918
17952
  });
17919
17953
  return i ? a : null;
17920
- }, Gv = (e) => e && Dv(e.parameters) && Dv(e.parameters.properties) ? Object.keys(e.parameters.properties) : [], Kv = (e, t, n) => {
17954
+ }, Kv = (e) => e && Ov(e.parameters) && Ov(e.parameters.properties) ? Object.keys(e.parameters.properties) : [], qv = (e, t, n) => {
17921
17955
  if (!Array.isArray(e) || e.length === 0) return null;
17922
- let r = Gv(t), i = String(e[0] ?? "").trim();
17956
+ let r = Kv(t), i = String(e[0] ?? "").trim();
17923
17957
  if (!i) return null;
17924
17958
  let a = { ...n ?? {} };
17925
17959
  r.forEach((t, n) => {
@@ -17930,15 +17964,15 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17930
17964
  $call: i,
17931
17965
  kwargs: a
17932
17966
  };
17933
- }, qv = (e, t) => {
17967
+ }, Jv = (e, t) => {
17934
17968
  let n = (e.fn ?? "").localeCompare(t.fn ?? "");
17935
17969
  return n === 0 ? e.key.localeCompare(t.key) : n;
17936
- }, Jv = (e, t) => {
17970
+ }, Yv = (e, t) => {
17937
17971
  if (!Array.isArray(e)) return [];
17938
17972
  let n = /* @__PURE__ */ new Map();
17939
17973
  return e.map((e) => {
17940
17974
  let t = null;
17941
- Dv(e?.value) ? (t = typeof e.value.$call == "string" ? e.value.$call : null, Dv(e.value.kwargs) && e.value.kwargs) : Nv(e) && (t = Pv(e.value));
17975
+ Ov(e?.value) ? (t = typeof e.value.$call == "string" ? e.value.$call : null, Ov(e.value.kwargs) && e.value.kwargs) : Pv(e) && (t = Fv(e.value));
17942
17976
  let r = 1;
17943
17977
  t && (r = (n.get(t) ?? 0) + 1, n.set(t, r));
17944
17978
  let i = {
@@ -17947,16 +17981,16 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17947
17981
  key: String(e?.key ?? ""),
17948
17982
  seq: t ? r : 1
17949
17983
  };
17950
- return Dv(e) && Array.isArray(e.dependsOn) && (i.dependsOn = e.dependsOn.map(String)), i;
17951
- }).sort(qv);
17952
- }, Yv = (e) => {
17984
+ return Ov(e) && Array.isArray(e.dependsOn) && (i.dependsOn = e.dependsOn.map(String)), i;
17985
+ }).sort(Jv);
17986
+ }, Xv = (e) => {
17953
17987
  if (!Array.isArray(e)) return [];
17954
17988
  let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
17955
17989
  return e.forEach((e) => {
17956
17990
  let r = String(e?.key ?? "").trim();
17957
17991
  r && (t.has(r) && n.add(r), t.add(r));
17958
17992
  }), [...n];
17959
- }, Xv = (e) => {
17993
+ }, Zv = (e) => {
17960
17994
  let t = {};
17961
17995
  return e.forEach((e) => {
17962
17996
  let n = t[e.rowId] ?? {
@@ -17968,20 +18002,20 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
17968
18002
  unrecognized: n.unrecognized + e.unrecognized.length
17969
18003
  };
17970
18004
  }), t;
17971
- }, Zv = (e, t) => {
18005
+ }, Qv = (e, t) => {
17972
18006
  let n = /\$\.([A-Za-z_][A-Za-z0-9_.]*)/g, r;
17973
18007
  for (; (r = n.exec(e)) !== null;) t.add(r[1].split(".")[0]);
17974
- }, Qv = (e, t) => {
18008
+ }, $v = (e, t) => {
17975
18009
  if (typeof e == "string") {
17976
- Zv(e, t);
18010
+ Qv(e, t);
17977
18011
  return;
17978
18012
  }
17979
18013
  if (Array.isArray(e)) {
17980
- for (let n of e) Qv(n, t);
18014
+ for (let n of e) $v(n, t);
17981
18015
  return;
17982
18016
  }
17983
- if (Dv(e)) for (let n of Object.values(e)) Qv(n, t);
17984
- }, $v = (e) => {
18017
+ if (Ov(e)) for (let n of Object.values(e)) $v(n, t);
18018
+ }, ey = (e) => {
17985
18019
  if (!Array.isArray(e)) return {
17986
18020
  ok: !0,
17987
18021
  layers: [],
@@ -18006,8 +18040,8 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
18006
18040
  let i = /* @__PURE__ */ new Map(), a = !1;
18007
18041
  for (let [e, t] of r) {
18008
18042
  let n = /* @__PURE__ */ new Set(), o = t?.value;
18009
- if (Dv(o) && Dv(o.kwargs)) for (let e of Object.values(o.kwargs)) Qv(e, n);
18010
- else Qv(o, n);
18043
+ if (Ov(o) && Ov(o.kwargs)) for (let e of Object.values(o.kwargs)) $v(e, n);
18044
+ else $v(o, n);
18011
18045
  for (let e of t?.dependsOn ?? []) n.add(e);
18012
18046
  let s = new Set([...n].filter((e) => r.has(e)));
18013
18047
  i.set(e, s), s.size > 0 && (a = !0);
@@ -18031,7 +18065,7 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
18031
18065
  hasEdges: a,
18032
18066
  depsByItem: l
18033
18067
  };
18034
- }, ey = (e) => {
18068
+ }, ty = (e) => {
18035
18069
  let t = {
18036
18070
  danglingDependsOn: [],
18037
18071
  declaredUnused: []
@@ -18042,8 +18076,8 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
18042
18076
  let e = String(r?.key ?? ""), i = String(r?.id ?? ""), a = r?.dependsOn ?? [];
18043
18077
  if (a.length === 0) continue;
18044
18078
  let o = /* @__PURE__ */ new Set(), s = r?.value;
18045
- if (Dv(s) && Dv(s.kwargs)) for (let e of Object.values(s.kwargs)) Qv(e, o);
18046
- else Qv(s, o);
18079
+ if (Ov(s) && Ov(s.kwargs)) for (let e of Object.values(s.kwargs)) $v(e, o);
18080
+ else $v(s, o);
18047
18081
  for (let r of a) {
18048
18082
  let a = String(r);
18049
18083
  n.has(a) ? o.has(a) || t.declaredUnused.push({
@@ -18061,39 +18095,39 @@ var Dv = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ov = {}, kv =
18061
18095
  };
18062
18096
  //#endregion
18063
18097
  //#region src/reui/empty.tsx
18064
- function ty({ className: e, ...t }) {
18098
+ function ny({ className: e, ...t }) {
18065
18099
  return /* @__PURE__ */ U("div", {
18066
18100
  "data-slot": "empty",
18067
18101
  className: r("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", e),
18068
18102
  ...t
18069
18103
  });
18070
18104
  }
18071
- var ny = Ge("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
18105
+ var ry = Ge("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
18072
18106
  variants: { variant: {
18073
18107
  default: "bg-transparent",
18074
18108
  icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*=\"size-\"])]:size-6"
18075
18109
  } },
18076
18110
  defaultVariants: { variant: "default" }
18077
18111
  });
18078
- function ry({ className: e, variant: t = "default", ...n }) {
18112
+ function iy({ className: e, variant: t = "default", ...n }) {
18079
18113
  return /* @__PURE__ */ U("div", {
18080
18114
  "data-slot": "empty-icon",
18081
18115
  "data-variant": t,
18082
- className: r(ny({
18116
+ className: r(ry({
18083
18117
  variant: t,
18084
18118
  className: e
18085
18119
  })),
18086
18120
  ...n
18087
18121
  });
18088
18122
  }
18089
- function iy({ className: e, ...t }) {
18123
+ function ay({ className: e, ...t }) {
18090
18124
  return /* @__PURE__ */ U("div", {
18091
18125
  "data-slot": "empty-title",
18092
18126
  className: r("text-lg font-medium tracking-tight", e),
18093
18127
  ...t
18094
18128
  });
18095
18129
  }
18096
- function ay({ className: e, ...t }) {
18130
+ function oy({ className: e, ...t }) {
18097
18131
  return /* @__PURE__ */ U("div", {
18098
18132
  "data-slot": "empty-content",
18099
18133
  className: r("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", e),
@@ -18102,7 +18136,7 @@ function ay({ className: e, ...t }) {
18102
18136
  }
18103
18137
  //#endregion
18104
18138
  //#region src/components/decision-graph/graph/instance-editor.tsx
18105
- var oy = (e, t = 42) => {
18139
+ var sy = (e, t = 42) => {
18106
18140
  let n;
18107
18141
  try {
18108
18142
  n = typeof e == "string" ? e : JSON.stringify(e) ?? "null";
@@ -18110,7 +18144,7 @@ var oy = (e, t = 42) => {
18110
18144
  n = String(e);
18111
18145
  }
18112
18146
  return n.length > t ? `${n.slice(0, t)}…` : n;
18113
- }, sy = (e) => typeof e == "object" && !!e && !Array.isArray(e) && "error" in e, cy = ({ instances: e, functionScope: t, disabled: n, fieldPaths: r, driftByInstance: i, duplicateKeys: a, outputsByKey: s, schedule: c, onChange: l }) => {
18147
+ }, cy = (e) => typeof e == "object" && !!e && !Array.isArray(e) && "error" in e, ly = ({ instances: e, functionScope: t, disabled: n, fieldPaths: r, driftByInstance: i, duplicateKeys: a, outputsByKey: s, schedule: c, onChange: l }) => {
18114
18148
  let u = o(), [d, f] = z(null), p = t.functions, m = L(() => e.find((e) => e.id === d) ?? e[0] ?? null, [e, d]), h = L(() => p.map((e) => ({
18115
18149
  value: e.name,
18116
18150
  label: e.name
@@ -18135,7 +18169,7 @@ var oy = (e, t = 42) => {
18135
18169
  }, y = m ? p.find((e) => e.name === m.call.$call) : void 0, b = t.orphanKind, x = !!m && !y, S = L(() => !m || !m.call.$call || h.some((e) => e.value === m.call.$call) ? h : [{
18136
18170
  value: m.call.$call,
18137
18171
  label: m.call.$call
18138
- }, ...h], [h, m]), C = L(() => y ? Object.keys(y.parameters?.properties ?? {}) : [], [y]), w = L(() => new Set(y?.parameters?.required ?? []), [y]), T = m ? i?.[m.id] : void 0, E = m ? a?.includes(m.key) ?? !1 : !1, D = L(() => ey(e), [e]), ee = L(() => m ? D.danglingDependsOn.filter((e) => e.instanceId === m.id) : [], [D, m]), O = L(() => m ? D.declaredUnused.filter((e) => e.instanceId === m.id) : [], [D, m]), te = L(() => {
18172
+ }, ...h], [h, m]), C = L(() => y ? Object.keys(y.parameters?.properties ?? {}) : [], [y]), w = L(() => new Set(y?.parameters?.required ?? []), [y]), T = m ? i?.[m.id] : void 0, E = m ? a?.includes(m.key) ?? !1 : !1, D = L(() => ty(e), [e]), ee = L(() => m ? D.danglingDependsOn.filter((e) => e.instanceId === m.id) : [], [D, m]), O = L(() => m ? D.declaredUnused.filter((e) => e.instanceId === m.id) : [], [D, m]), te = L(() => {
18139
18173
  if (!m) return [];
18140
18174
  let t = new Set(m.dependsOn ?? []);
18141
18175
  return e.filter((e) => e.id !== m.id && e.key && !t.has(e.key)).map((e) => ({
@@ -18199,11 +18233,11 @@ var oy = (e, t = 42) => {
18199
18233
  children: ["+ ", u("cf.addInstance")]
18200
18234
  })]
18201
18235
  }),
18202
- c && !c.ok && c.error === "CYCLE_DETECTED" && /* @__PURE__ */ U(wv, {
18236
+ c && !c.ok && c.error === "CYCLE_DETECTED" && /* @__PURE__ */ U(Tv, {
18203
18237
  variant: "destructive",
18204
18238
  "data-testid": "instance-cycle-error",
18205
18239
  className: "shrink-0 gap-x-2 rounded-none border-x-0 border-b-0 border-t px-2.5 py-1.5 text-[11px]",
18206
- children: /* @__PURE__ */ U(Tv, {
18240
+ children: /* @__PURE__ */ U(Ev, {
18207
18241
  className: "font-normal leading-snug",
18208
18242
  children: u("cf.scheduleCycleError", { keys: c.keys.join(" → ") })
18209
18243
  })
@@ -18261,8 +18295,8 @@ var oy = (e, t = 42) => {
18261
18295
  title: u("cf.lastRunHint"),
18262
18296
  children: /* @__PURE__ */ W("span", {
18263
18297
  "data-testid": "instance-result-chip",
18264
- className: `max-w-24 truncate rounded px-1 font-mono text-[10px] ${sy(s[e.key]) ? "bg-destructive/10 text-destructive" : "bg-muted/70 text-muted-foreground"}`,
18265
- children: [sy(s[e.key]) ? "⚠ " : "", oy(s[e.key], 24)]
18298
+ className: `max-w-24 truncate rounded px-1 font-mono text-[10px] ${cy(s[e.key]) ? "bg-destructive/10 text-destructive" : "bg-muted/70 text-muted-foreground"}`,
18299
+ children: [cy(s[e.key]) ? "⚠ " : "", sy(s[e.key], 24)]
18266
18300
  })
18267
18301
  }),
18268
18302
  !n && /* @__PURE__ */ U("button", {
@@ -18278,13 +18312,13 @@ var oy = (e, t = 42) => {
18278
18312
  ]
18279
18313
  })]
18280
18314
  }, e.id);
18281
- }), e.length === 0 && /* @__PURE__ */ W(ty, {
18315
+ }), e.length === 0 && /* @__PURE__ */ W(ny, {
18282
18316
  className: "gap-1 border-0 p-3",
18283
- children: [/* @__PURE__ */ U(ry, {
18317
+ children: [/* @__PURE__ */ U(iy, {
18284
18318
  variant: "icon",
18285
18319
  className: "size-7 rounded-md [&_svg:not([class*=size-])]:size-3.5",
18286
18320
  children: /* @__PURE__ */ U(Jt, {})
18287
- }), /* @__PURE__ */ U(iy, {
18321
+ }), /* @__PURE__ */ U(ay, {
18288
18322
  className: "text-xs font-normal opacity-60",
18289
18323
  children: u("cf.instanceEmpty")
18290
18324
  })]
@@ -18329,6 +18363,17 @@ var oy = (e, t = 42) => {
18329
18363
  className: "pl-[122px] text-[11px] leading-relaxed opacity-50",
18330
18364
  children: y.description
18331
18365
  }),
18366
+ y && typeof y.documentationUrl == "string" && y.documentationUrl && /* @__PURE__ */ U("div", {
18367
+ className: "pl-[122px]",
18368
+ children: /* @__PURE__ */ W("a", {
18369
+ href: y.documentationUrl,
18370
+ target: "_blank",
18371
+ rel: "noreferrer",
18372
+ "data-testid": "instance-documentation-link",
18373
+ className: "text-[11px] text-primary underline-offset-2 hover:underline",
18374
+ children: [u("cf.documentation"), " ↗"]
18375
+ })
18376
+ }),
18332
18377
  /* @__PURE__ */ W("div", {
18333
18378
  className: "grid grid-cols-[120px_minmax(0,1fr)] items-center gap-2",
18334
18379
  children: [/* @__PURE__ */ U(Z.Text, {
@@ -18438,8 +18483,8 @@ var oy = (e, t = 42) => {
18438
18483
  children: u("cf.lastRunHint")
18439
18484
  })]
18440
18485
  }), /* @__PURE__ */ U("pre", {
18441
- className: `max-h-40 overflow-auto rounded-md border px-2.5 py-2 font-mono text-[11px] leading-relaxed ${sy(s[m.key]) ? "border-destructive/40 bg-destructive/10 text-destructive" : "border-border bg-muted/40"}`,
18442
- children: oy(s[m.key], 2e3)
18486
+ className: `max-h-40 overflow-auto rounded-md border px-2.5 py-2 font-mono text-[11px] leading-relaxed ${cy(s[m.key]) ? "border-destructive/40 bg-destructive/10 text-destructive" : "border-border bg-muted/40"}`,
18487
+ children: sy(s[m.key], 2e3)
18443
18488
  })]
18444
18489
  }),
18445
18490
  C.length > 0 && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
@@ -18511,18 +18556,18 @@ var oy = (e, t = 42) => {
18511
18556
  ]
18512
18557
  })
18513
18558
  ]
18514
- }) : /* @__PURE__ */ W(ty, {
18559
+ }) : /* @__PURE__ */ W(ny, {
18515
18560
  className: "gap-2 border-0 p-6",
18516
18561
  children: [
18517
- /* @__PURE__ */ U(ry, {
18562
+ /* @__PURE__ */ U(iy, {
18518
18563
  variant: "icon",
18519
18564
  children: /* @__PURE__ */ U(hn, {})
18520
18565
  }),
18521
- /* @__PURE__ */ U(iy, {
18566
+ /* @__PURE__ */ U(ay, {
18522
18567
  className: "text-sm font-normal opacity-70",
18523
18568
  children: u("cf.selectInstance")
18524
18569
  }),
18525
- !n && /* @__PURE__ */ U(ay, { children: /* @__PURE__ */ W(Y, {
18570
+ !n && /* @__PURE__ */ U(oy, { children: /* @__PURE__ */ W(Y, {
18526
18571
  size: "small",
18527
18572
  type: "link",
18528
18573
  onClick: _,
@@ -18532,7 +18577,7 @@ var oy = (e, t = 42) => {
18532
18577
  })
18533
18578
  })]
18534
18579
  });
18535
- }, ly = ({ id: e, user: t, customFunctions: n }) => {
18580
+ }, uy = ({ id: e, user: t, customFunctions: n }) => {
18536
18581
  let r = nh(), { disabled: i, content: a, inputContent: s, instanceOutputs: c } = $(({ simulate: t, disabled: n, decisionGraph: r }) => ({
18537
18582
  disabled: n,
18538
18583
  content: (r?.nodes ?? []).find((t) => t.id === e)?.content,
@@ -18541,9 +18586,9 @@ var oy = (e, t = 42) => {
18541
18586
  let n = t.trace?.[e]?.output;
18542
18587
  return n && typeof n == "object" ? n : void 0;
18543
18588
  }).otherwise(() => void 0)
18544
- })), l = L(() => Iv(a?.kind, n), [a?.kind, n]), u = o(), f = a?.config?.expressions, p = L(() => Bv(f, l), [f, l]), m = p.length, h = p.reduce((e, t) => e + t.missing.length, 0), g = p.reduce((e, t) => e + t.unrecognized.length, 0), _ = p.filter((e) => e.kwargsKeyCollision).length, v = p.reduce((e, t) => e + (t.danglingRefs?.length ?? 0), 0), y = L(() => Yv(f), [f]), b = L(() => Jv(f, l), [f, l]), x = L(() => Xv(p), [p]), S = L(() => d(s).map((e) => e.path), [s]), C = L(() => Hv(f), [f]), w = L(() => C.reduce((e, t) => e + t.params.length, 0), [C]), T = L(() => $v(f), [f]), E = (n) => {
18589
+ })), l = L(() => Lv(a?.kind, n), [a?.kind, n]), u = o(), f = a?.config?.expressions, p = L(() => Vv(f, l), [f, l]), m = p.length, h = p.reduce((e, t) => e + t.missing.length, 0), g = p.reduce((e, t) => e + t.unrecognized.length, 0), _ = p.filter((e) => e.kwargsKeyCollision).length, v = p.reduce((e, t) => e + (t.danglingRefs?.length ?? 0), 0), y = L(() => Xv(f), [f]), b = L(() => Yv(f, l), [f, l]), x = L(() => Zv(p), [p]), S = L(() => d(s).map((e) => e.path), [s]), C = L(() => Uv(f), [f]), w = L(() => C.reduce((e, t) => e + t.params.length, 0), [C]), T = L(() => ey(f), [f]), E = (n) => {
18545
18590
  let i = new Map((f ?? []).map((e) => [e?.id, e])), a = (n ?? []).map((e) => {
18546
- let t = Array.isArray(e?.value) ? e.value[0] : typeof e?.value?.$call == "string" ? e.value.$call : void 0, n = l.functions.find((e) => e?.name === t), r = i.get(e?.id)?.value, a = r && typeof r == "object" && !Array.isArray(r) ? r.kwargs ?? null : null, o = Kv(e?.value, n, a);
18591
+ let t = Array.isArray(e?.value) ? e.value[0] : typeof e?.value?.$call == "string" ? e.value.$call : void 0, n = l.functions.find((e) => e?.name === t), r = i.get(e?.id)?.value, a = r && typeof r == "object" && !Array.isArray(r) ? r.kwargs ?? null : null, o = qv(e?.value, n, a);
18547
18592
  return o ? {
18548
18593
  ...e,
18549
18594
  value: o
@@ -18554,7 +18599,7 @@ var oy = (e, t = 42) => {
18554
18599
  proj: t ?? ""
18555
18600
  }, e));
18556
18601
  }, D = L(() => (f ?? []).map((e) => {
18557
- let t = Pv(e?.value), n = l.functions.find((e) => e?.name === t), r = Fv(e?.value, n);
18602
+ let t = Fv(e?.value), n = l.functions.find((e) => e?.name === t), r = Iv(e?.value, n);
18558
18603
  return {
18559
18604
  id: e?.id ?? "",
18560
18605
  key: e?.key ?? "",
@@ -18688,13 +18733,13 @@ var oy = (e, t = 42) => {
18688
18733
  })]
18689
18734
  }),
18690
18735
  O === "table" && /* @__PURE__ */ W(H, { children: [
18691
- C.length > 0 && /* @__PURE__ */ W(wv, {
18736
+ C.length > 0 && /* @__PURE__ */ W(Tv, {
18692
18737
  variant: "warning",
18693
18738
  "data-testid": "dollar-form-band",
18694
18739
  className: "mx-3 mt-3 gap-x-2 px-3 py-1.5 text-xs",
18695
18740
  children: [
18696
18741
  /* @__PURE__ */ U(bn, {}),
18697
- /* @__PURE__ */ W(Tv, {
18742
+ /* @__PURE__ */ W(Ev, {
18698
18743
  className: "font-normal leading-5",
18699
18744
  children: [
18700
18745
  u("cf.dollarFormBand"),
@@ -18708,27 +18753,27 @@ var oy = (e, t = 42) => {
18708
18753
  u("cf.argsDriftUnrecognized")
18709
18754
  ]
18710
18755
  }),
18711
- /* @__PURE__ */ U(Ev, { children: /* @__PURE__ */ U(Y, {
18756
+ /* @__PURE__ */ U(Dv, { children: /* @__PURE__ */ U(Y, {
18712
18757
  size: "small",
18713
18758
  type: "link",
18714
18759
  className: "!px-1",
18715
18760
  disabled: i,
18716
18761
  "data-testid": "dollar-form-migrate",
18717
18762
  onClick: () => {
18718
- let e = Uv(f, C);
18763
+ let e = Wv(f, C);
18719
18764
  e && E(e);
18720
18765
  },
18721
18766
  children: u("cf.dollarFormMigrate")
18722
18767
  }) })
18723
18768
  ]
18724
18769
  }),
18725
- m > 0 && /* @__PURE__ */ W(wv, {
18770
+ m > 0 && /* @__PURE__ */ W(Tv, {
18726
18771
  variant: "warning",
18727
18772
  "data-testid": "args-drift-band",
18728
18773
  className: "mx-3 mt-3 gap-x-2 px-3 py-1.5 text-xs",
18729
18774
  children: [
18730
18775
  /* @__PURE__ */ U(bn, {}),
18731
- /* @__PURE__ */ W(Tv, {
18776
+ /* @__PURE__ */ W(Ev, {
18732
18777
  className: "font-normal leading-5",
18733
18778
  children: [
18734
18779
  u("cf.argsDriftTitle"),
@@ -18760,13 +18805,13 @@ var oy = (e, t = 42) => {
18760
18805
  ] })
18761
18806
  ]
18762
18807
  }),
18763
- h > 0 && /* @__PURE__ */ U(Ev, { children: /* @__PURE__ */ U(Y, {
18808
+ h > 0 && /* @__PURE__ */ U(Dv, { children: /* @__PURE__ */ U(Y, {
18764
18809
  size: "small",
18765
18810
  type: "link",
18766
18811
  className: "!px-1",
18767
18812
  disabled: i,
18768
18813
  onClick: () => {
18769
- let e = Wv(f, p, l);
18814
+ let e = Gv(f, p, l);
18770
18815
  e && E(e);
18771
18816
  },
18772
18817
  children: u("cf.argsFillMissing")
@@ -18776,7 +18821,7 @@ var oy = (e, t = 42) => {
18776
18821
  /* @__PURE__ */ U("div", {
18777
18822
  className: "flex min-h-0 flex-1 flex-col",
18778
18823
  style: { paddingTop: m > 0 ? 8 : 0 },
18779
- children: /* @__PURE__ */ U(cy, {
18824
+ children: /* @__PURE__ */ U(ly, {
18780
18825
  instances: D,
18781
18826
  functionScope: l,
18782
18827
  disabled: i,
@@ -18791,7 +18836,7 @@ var oy = (e, t = 42) => {
18791
18836
  ] })
18792
18837
  ]
18793
18838
  });
18794
- }, uy = (e) => {
18839
+ }, dy = (e) => {
18795
18840
  let t = [];
18796
18841
  for (let n of e) {
18797
18842
  let e = n.group ?? "", r = t.find((t) => t.group === e);
@@ -18804,10 +18849,10 @@ var oy = (e, t = 42) => {
18804
18849
  item: e,
18805
18850
  index: t
18806
18851
  })).sort((e, t) => (e.item.order ?? 0) - (t.item.order ?? 0) || e.index - t.index).map(({ item: e }) => e));
18807
- }, dy = ({ item: e, disabled: t }) => /* @__PURE__ */ U(H, { children: e.render({ disabled: t }) }), fy = ({ items: e }) => {
18852
+ }, fy = ({ item: e, disabled: t }) => /* @__PURE__ */ U(H, { children: e.render({ disabled: t }) }), py = ({ items: e }) => {
18808
18853
  let { disabled: t = !1 } = $(({ disabled: e }) => ({ disabled: e }));
18809
18854
  if (!e || e.length === 0) return null;
18810
- let n = uy(e), r = [];
18855
+ let n = dy(e), r = [];
18811
18856
  for (let e of n) r.includes(e.group ?? "") || r.push(e.group ?? "");
18812
18857
  return /* @__PURE__ */ U("div", {
18813
18858
  "aria-label": "toolbar-items",
@@ -18818,13 +18863,13 @@ var oy = (e, t = 42) => {
18818
18863
  }), n.filter((t) => (t.group ?? "") === e).map((e) => /* @__PURE__ */ U(vc, {
18819
18864
  fallback: null,
18820
18865
  onError: (t) => console.error(`[seal-editor] toolbar item "${e.id}" crashed:`, t),
18821
- children: /* @__PURE__ */ U(dy, {
18866
+ children: /* @__PURE__ */ U(fy, {
18822
18867
  item: e,
18823
18868
  disabled: t
18824
18869
  })
18825
18870
  }, e.id))] }, e || `__anonymous_${r}`))
18826
18871
  });
18827
- }, py = ({ userResolver: e }) => {
18872
+ }, my = ({ userResolver: e }) => {
18828
18873
  let { stateStore: t } = rh();
18829
18874
  return I(() => {
18830
18875
  if (!e) return;
@@ -18840,35 +18885,35 @@ var oy = (e, t = 42) => {
18840
18885
  n = !0;
18841
18886
  };
18842
18887
  }, [e]), null;
18843
- }, my = P.memo(Fe(function({ reactFlowProOptions: e, tabBarExtraContent: t, toolbarItems: n, userResolver: r, customFunctions: i }, a) {
18888
+ }, hy = P.memo(Fe(function({ reactFlowProOptions: e, tabBarExtraContent: t, toolbarItems: n, userResolver: r, customFunctions: i }, a) {
18844
18889
  let [o, s] = z(!1), { hasActiveNode: c, viewConfig: l, hideLeftToolbar: u } = $(({ decisionGraph: e, activeTab: t, viewConfig: n, hideLeftToolbar: r }) => ({
18845
18890
  hasActiveNode: (e?.nodes ?? []).some((e) => e.id === t),
18846
18891
  viewConfig: n,
18847
18892
  hideLeftToolbar: r
18848
- })), d = n && n.length > 0 ? /* @__PURE__ */ W(H, { children: [t, /* @__PURE__ */ U(fy, { items: n })] }) : t;
18893
+ })), d = n && n.length > 0 ? /* @__PURE__ */ W(H, { children: [t, /* @__PURE__ */ U(py, { items: n })] }) : t;
18849
18894
  return /* @__PURE__ */ W(H, { children: [
18850
- /* @__PURE__ */ U(py, { userResolver: r }),
18851
- !u && /* @__PURE__ */ U(bv, {}),
18895
+ /* @__PURE__ */ U(my, { userResolver: r }),
18896
+ !u && /* @__PURE__ */ U(xv, {}),
18852
18897
  /* @__PURE__ */ W("div", {
18853
18898
  className: "[grid-area:graph] flex flex-1 flex-col gap-1 overflow-hidden bg-white",
18854
18899
  children: [
18855
- /* @__PURE__ */ U(xv, {
18900
+ /* @__PURE__ */ U(Sv, {
18856
18901
  disabled: o,
18857
18902
  tabBarExtraContent: d
18858
18903
  }),
18859
- /* @__PURE__ */ U(sv, {
18904
+ /* @__PURE__ */ U(cv, {
18860
18905
  ref: a,
18861
18906
  className: V([!c && !l?.enabled && "flex flex-col", c && "hidden"]),
18862
18907
  reactFlowProOptions: e,
18863
18908
  onDisableTabs: s
18864
18909
  }),
18865
- /* @__PURE__ */ U(uv, { className: V([!c && l?.enabled && "flex flex-col"]) }),
18866
- /* @__PURE__ */ U(hy, { customFunctions: i })
18910
+ /* @__PURE__ */ U(dv, { className: V([!c && l?.enabled && "flex flex-col"]) }),
18911
+ /* @__PURE__ */ U(gy, { customFunctions: i })
18867
18912
  ]
18868
18913
  }),
18869
18914
  /* @__PURE__ */ U(V_, {})
18870
18915
  ] });
18871
- })), hy = P.memo(({ customFunctions: e }) => {
18916
+ })), gy = P.memo(({ customFunctions: e }) => {
18872
18917
  let { openNodes: t, activeNodeId: n, components: r, user: i, disabled: a, customNodes: o } = $(({ decisionGraph: e, openTabs: t, activeTab: n, components: r, user: i, disabled: a, customNodes: o }) => {
18873
18918
  let s = (e?.nodes ?? []).find((e) => e.id === n)?.id;
18874
18919
  return {
@@ -18940,7 +18985,7 @@ var oy = (e, t = 42) => {
18940
18985
  kind: t.kind,
18941
18986
  config: t.config
18942
18987
  }
18943
- }) : /* @__PURE__ */ U(ly, {
18988
+ }) : /* @__PURE__ */ U(uy, {
18944
18989
  id: t.id,
18945
18990
  user: i,
18946
18991
  customFunctions: e
@@ -18951,10 +18996,10 @@ var oy = (e, t = 42) => {
18951
18996
  })
18952
18997
  }, t?.id))
18953
18998
  });
18954
- }), gy = Fe(({ reactFlowProOptions: e, tabBarExtraContent: t, toolbarItems: n, userResolver: r, ...i }, a) => /* @__PURE__ */ U(vc, { children: /* @__PURE__ */ U("div", {
18999
+ }), _y = Fe(({ reactFlowProOptions: e, tabBarExtraContent: t, toolbarItems: n, userResolver: r, ...i }, a) => /* @__PURE__ */ U(vc, { children: /* @__PURE__ */ U("div", {
18955
19000
  className: V(["seal-dg", i?.hideLeftToolbar && "hidden-left-toolbar"]),
18956
19001
  children: /* @__PURE__ */ U(Ki, { children: /* @__PURE__ */ U($m, { children: /* @__PURE__ */ W(sh, { children: [
18957
- /* @__PURE__ */ U(my, {
19002
+ /* @__PURE__ */ U(hy, {
18958
19003
  ref: a,
18959
19004
  reactFlowProOptions: e,
18960
19005
  tabBarExtraContent: t,
@@ -18965,7 +19010,7 @@ var oy = (e, t = 42) => {
18965
19010
  /* @__PURE__ */ U(P_, {}),
18966
19011
  /* @__PURE__ */ U(E_, { ...i })
18967
19012
  ] }) }) })
18968
- }) })), _y = (e) => ({
19013
+ }) })), vy = (e) => ({
18969
19014
  kind: e.kind,
18970
19015
  icon: e.icon,
18971
19016
  color: e.color,
@@ -19032,7 +19077,7 @@ var oy = (e, t = 42) => {
19032
19077
  });
19033
19078
  //#endregion
19034
19079
  //#region src/reui/skeleton.tsx
19035
- function vy({ className: e, ...t }) {
19080
+ function yy({ className: e, ...t }) {
19036
19081
  return /* @__PURE__ */ U("div", {
19037
19082
  "data-slot": "skeleton",
19038
19083
  className: r("animate-pulse rounded-md bg-muted", e),
@@ -19041,12 +19086,12 @@ function vy({ className: e, ...t }) {
19041
19086
  }
19042
19087
  //#endregion
19043
19088
  //#region src/reui/timeline.tsx
19044
- var yy = Ne(void 0), by = () => {
19045
- let e = ze(yy);
19089
+ var by = Ne(void 0), xy = () => {
19090
+ let e = ze(by);
19046
19091
  if (!e) throw Error("useTimeline must be used within a Timeline");
19047
19092
  return e;
19048
19093
  };
19049
- function xy({ defaultValue: e = 1, value: t, onValueChange: n, orientation: i = "vertical", className: a, render: o, children: s, ...c }) {
19094
+ function Sy({ defaultValue: e = 1, value: t, onValueChange: n, orientation: i = "vertical", className: a, render: o, children: s, ...c }) {
19050
19095
  let [l, u] = z(e), d = F((e) => {
19051
19096
  t === void 0 && u(e), n?.(e);
19052
19097
  }, [t, n]), f = t ?? l, p = {
@@ -19055,7 +19100,7 @@ function xy({ defaultValue: e = 1, value: t, onValueChange: n, orientation: i =
19055
19100
  "data-slot": "timeline",
19056
19101
  children: s
19057
19102
  };
19058
- return /* @__PURE__ */ U(yy.Provider, {
19103
+ return /* @__PURE__ */ U(by.Provider, {
19059
19104
  value: {
19060
19105
  activeStep: f,
19061
19106
  setActiveStep: d
@@ -19067,7 +19112,7 @@ function xy({ defaultValue: e = 1, value: t, onValueChange: n, orientation: i =
19067
19112
  })
19068
19113
  });
19069
19114
  }
19070
- function Sy({ className: e, render: t, children: n, ...i }) {
19115
+ function Cy({ className: e, render: t, children: n, ...i }) {
19071
19116
  let a = {
19072
19117
  className: r("text-muted-foreground text-sm", e),
19073
19118
  "data-slot": "timeline-content",
@@ -19079,7 +19124,7 @@ function Sy({ className: e, render: t, children: n, ...i }) {
19079
19124
  props: jn(a, i)
19080
19125
  });
19081
19126
  }
19082
- function Cy({ className: e, render: t, children: n, ...i }) {
19127
+ function wy({ className: e, render: t, children: n, ...i }) {
19083
19128
  let a = {
19084
19129
  className: r(e),
19085
19130
  "data-slot": "timeline-header",
@@ -19091,7 +19136,7 @@ function Cy({ className: e, render: t, children: n, ...i }) {
19091
19136
  props: jn(a, i)
19092
19137
  });
19093
19138
  }
19094
- function wy({ className: e, children: t, render: n, ...i }) {
19139
+ function Ty({ className: e, children: t, render: n, ...i }) {
19095
19140
  let a = {
19096
19141
  "aria-hidden": !0,
19097
19142
  className: r("group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-completed/timeline-item:border-primary", e),
@@ -19104,8 +19149,8 @@ function wy({ className: e, children: t, render: n, ...i }) {
19104
19149
  props: jn(a, i)
19105
19150
  });
19106
19151
  }
19107
- function Ty({ step: e, className: t, render: n, children: i, ...a }) {
19108
- let { activeStep: o } = by(), s = {
19152
+ function Ey({ step: e, className: t, render: n, children: i, ...a }) {
19153
+ let { activeStep: o } = xy(), s = {
19109
19154
  className: r("group/timeline-item relative flex flex-1 flex-col gap-0.5 group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary", t),
19110
19155
  "data-completed": e <= o || void 0,
19111
19156
  "data-slot": "timeline-item",
@@ -19117,7 +19162,7 @@ function Ty({ step: e, className: t, render: n, children: i, ...a }) {
19117
19162
  props: jn(s, a)
19118
19163
  });
19119
19164
  }
19120
- function Ey({ className: e, render: t, children: n, ...i }) {
19165
+ function Dy({ className: e, render: t, children: n, ...i }) {
19121
19166
  let a = {
19122
19167
  "aria-hidden": !0,
19123
19168
  className: r("group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:translate-y-4.5", e),
@@ -19130,7 +19175,7 @@ function Ey({ className: e, render: t, children: n, ...i }) {
19130
19175
  props: jn(a, i)
19131
19176
  });
19132
19177
  }
19133
- function Dy({ className: e, render: t, children: n, ...i }) {
19178
+ function Oy({ className: e, render: t, children: n, ...i }) {
19134
19179
  let a = {
19135
19180
  className: r("font-medium text-sm", e),
19136
19181
  "data-slot": "timeline-title",
@@ -19144,21 +19189,21 @@ function Dy({ className: e, render: t, children: n, ...i }) {
19144
19189
  }
19145
19190
  //#endregion
19146
19191
  //#region src/components/decision-graph/simulator/simulate-runs-panel.tsx
19147
- var Oy = Le(() => import("./simulate-run-detail-qZE4KheI.js").then((e) => ({ default: e.SimulateRunDetail }))), ky = ({ runs: e, emptyHint: t }) => {
19192
+ var ky = Le(() => import("./simulate-run-detail-B3f93RKl.js").then((e) => ({ default: e.SimulateRunDetail }))), Ay = ({ runs: e, emptyHint: t }) => {
19148
19193
  let n = o(), r = nh(), [i, a] = z(null);
19149
19194
  return e.length === 0 ? /* @__PURE__ */ U("div", {
19150
19195
  className: "p-6 text-center text-xs opacity-50",
19151
19196
  children: t ?? n("dg.simulation.runsEmpty")
19152
- }) : /* @__PURE__ */ U(xy, {
19197
+ }) : /* @__PURE__ */ U(Sy, {
19153
19198
  className: "p-3",
19154
19199
  children: e.map((t, o) => {
19155
19200
  let s = i === t.id, c = !t.snapshot, l = c ? null : t.ok ? t.snapshot?.result?.result : t.snapshot?.error ?? "unknown error";
19156
- return /* @__PURE__ */ W(Ty, {
19201
+ return /* @__PURE__ */ W(Ey, {
19157
19202
  step: e.length - o,
19158
19203
  children: [
19159
- /* @__PURE__ */ U(Ey, {}),
19160
- /* @__PURE__ */ U(wy, { className: t.ok ? "bg-[var(--color-success)] text-white" : "bg-[var(--destructive)] text-white" }),
19161
- /* @__PURE__ */ U(Cy, { children: /* @__PURE__ */ U(Dy, {
19204
+ /* @__PURE__ */ U(Dy, {}),
19205
+ /* @__PURE__ */ U(Ty, { className: t.ok ? "bg-[var(--color-success)] text-white" : "bg-[var(--destructive)] text-white" }),
19206
+ /* @__PURE__ */ U(wy, { children: /* @__PURE__ */ U(Oy, {
19162
19207
  className: "text-xs font-normal",
19163
19208
  children: /* @__PURE__ */ W("button", {
19164
19209
  type: "button",
@@ -19197,7 +19242,7 @@ var Oy = Le(() => import("./simulate-run-detail-qZE4KheI.js").then((e) => ({ def
19197
19242
  ]
19198
19243
  })
19199
19244
  }) }),
19200
- s && /* @__PURE__ */ W(Sy, {
19245
+ s && /* @__PURE__ */ W(Cy, {
19201
19246
  className: "mt-1",
19202
19247
  children: [c && /* @__PURE__ */ U("div", {
19203
19248
  className: "rounded-md bg-muted/60 p-2 text-[10px] opacity-70",
@@ -19208,34 +19253,34 @@ var Oy = Le(() => import("./simulate-run-detail-qZE4KheI.js").then((e) => ({ def
19208
19253
  className: "max-h-64 overflow-auto rounded-md bg-muted/60 p-2 pr-8 font-mono text-[10px] leading-relaxed",
19209
19254
  children: ti.stringify(l, void 0, 2)
19210
19255
  }),
19211
- children: /* @__PURE__ */ U(Oy, { detail: l })
19256
+ children: /* @__PURE__ */ U(ky, { detail: l })
19212
19257
  })]
19213
19258
  })
19214
19259
  ]
19215
19260
  }, t.id);
19216
19261
  })
19217
19262
  });
19218
- }, Ay = (e) => JSON.stringify(e.map((e) => {
19263
+ }, jy = (e) => JSON.stringify(e.map((e) => {
19219
19264
  let { snapshot: t, ...n } = e;
19220
19265
  return e.pinned ? e : {
19221
19266
  ...n,
19222
19267
  snapshot: void 0
19223
19268
  };
19224
- })), jy = (e) => {
19269
+ })), My = (e) => {
19225
19270
  try {
19226
19271
  let t = JSON.parse(e);
19227
19272
  return Array.isArray(t) ? t : [];
19228
19273
  } catch {
19229
19274
  return [];
19230
19275
  }
19231
- }, My = (e) => {
19276
+ }, Ny = (e) => {
19232
19277
  let t = typeof localStorage < "u" ? localStorage.getItem(e) : null;
19233
- return t ? jy(t) : [];
19234
- }, Ny = (e, t) => {
19278
+ return t ? My(t) : [];
19279
+ }, Py = (e, t) => {
19235
19280
  try {
19236
- localStorage.setItem(e, Ay(t));
19281
+ localStorage.setItem(e, jy(t));
19237
19282
  } catch {}
19238
- }, Py = ({ value: e, onChange: t, readOnly: n }) => {
19283
+ }, Fy = ({ value: e, onChange: t, readOnly: n }) => {
19239
19284
  let r = fc(), i = o();
19240
19285
  return /* @__PURE__ */ U(ta, {
19241
19286
  loading: /* @__PURE__ */ U($o, { size: "large" }),
@@ -19294,7 +19339,7 @@ var Oy = Le(() => import("./simulate-run-detail-qZE4KheI.js").then((e) => ({ def
19294
19339
  };
19295
19340
  //#endregion
19296
19341
  //#region src/reui/icons/animated/outline/cross-circle.tsx
19297
- function Fy({ className: e }) {
19342
+ function Iy({ className: e }) {
19298
19343
  return /* @__PURE__ */ U("svg", {
19299
19344
  width: "24",
19300
19345
  height: "24",
@@ -19310,7 +19355,7 @@ function Fy({ className: e }) {
19310
19355
  }
19311
19356
  //#endregion
19312
19357
  //#region src/components/decision-graph/simulator/simulator-nodes-panel.tsx
19313
- var Iy = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeTypes: i, viewConfig: a, selectedNode: s, onSelectNode: c, onClear: l, onGoToNode: u }) => {
19358
+ var Ly = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeTypes: i, viewConfig: a, selectedNode: s, onSelectNode: c, onClear: l, onGoToNode: u }) => {
19314
19359
  let d = o(), f = L(() => !r || !("result" in r) ? [] : Object.entries(r.result?.trace ?? {}).filter(([e]) => !a?.enabled || !!a?.permissions?.[e]).map(([e, t]) => ({
19315
19360
  ...t,
19316
19361
  nodeId: e
@@ -19386,7 +19431,7 @@ var Iy = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeType
19386
19431
  children: [/* @__PURE__ */ W(Z.Text, {
19387
19432
  "data-role": "name",
19388
19433
  className: "flex min-w-0 items-center [&>svg]:align-[-3px]",
19389
- children: [/* @__PURE__ */ U(Ly, { status: q(r).with({ error: K.nonNullable }, () => "error").with({ result: K.nonNullable }, () => "success").otherwise(() => "not-run") }), /* @__PURE__ */ U("span", {
19434
+ children: [/* @__PURE__ */ U(Ry, { status: q(r).with({ error: K.nonNullable }, () => "error").with({ result: K.nonNullable }, () => "success").otherwise(() => "not-run") }), /* @__PURE__ */ U("span", {
19390
19435
  className: "truncate",
19391
19436
  children: "Graph"
19392
19437
  })]
@@ -19404,7 +19449,7 @@ var Iy = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeType
19404
19449
  "data-role": "name",
19405
19450
  className: "flex min-w-0 items-center gap-1.5 [&>svg]:align-[-3px]",
19406
19451
  title: e.name,
19407
- children: [/* @__PURE__ */ U(Ly, { status: e.nodeId === r?.error?.data?.nodeId ? "error" : "success" }), /* @__PURE__ */ U("span", {
19452
+ children: [/* @__PURE__ */ U(Ry, { status: e.nodeId === r?.error?.data?.nodeId ? "error" : "success" }), /* @__PURE__ */ U("span", {
19408
19453
  className: "truncate",
19409
19454
  children: e.name
19410
19455
  })]
@@ -19419,10 +19464,10 @@ var Iy = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeType
19419
19464
  })
19420
19465
  })
19421
19466
  })] });
19422
- }, Ly = ({ status: e }) => e === "not-run" ? null : e === "success" ? /* @__PURE__ */ U(Qc, { className: "mr-1.5 size-3 shrink-0 text-[var(--seal-color-success)] opacity-60" }) : /* @__PURE__ */ U(Fy, { className: "mr-1 size-3 shrink-0 text-[var(--seal-color-error)]" });
19467
+ }, Ry = ({ status: e }) => e === "not-run" ? null : e === "success" ? /* @__PURE__ */ U(Qc, { className: "mr-1.5 size-3 shrink-0 text-[var(--seal-color-success)] opacity-60" }) : /* @__PURE__ */ U(Iy, { className: "mr-1 size-3 shrink-0 text-[var(--seal-color-error)]" });
19423
19468
  //#endregion
19424
19469
  //#region src/reui/icons/animated/outline/link.tsx
19425
- function Ry({ className: e, style: t }) {
19470
+ function zy({ className: e, style: t }) {
19426
19471
  return /* @__PURE__ */ W("svg", {
19427
19472
  width: "24",
19428
19473
  height: "24",
@@ -19444,7 +19489,7 @@ function Ry({ className: e, style: t }) {
19444
19489
  }
19445
19490
  //#endregion
19446
19491
  //#region src/components/decision-graph/simulator/simulator-request-toolbar.tsx
19447
- var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n, sourceOptions: r, bindingName: i, hasInputNode: a, loading: o, onSourceChange: s, onFormat: c, onCopy: l, onRun: u }) => /* @__PURE__ */ W("div", {
19492
+ var By = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n, sourceOptions: r, bindingName: i, hasInputNode: a, loading: o, onSourceChange: s, onFormat: c, onCopy: l, onRun: u }) => /* @__PURE__ */ W("div", {
19448
19493
  className: "flex items-center justify-between gap-2 border-b border-border px-3 py-2",
19449
19494
  children: [
19450
19495
  /* @__PURE__ */ U(X, {
@@ -19462,7 +19507,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19462
19507
  title: e("simulator.currentBinding"),
19463
19508
  children: /* @__PURE__ */ W("div", {
19464
19509
  className: "flex min-w-0 items-center gap-1",
19465
- children: [/* @__PURE__ */ U(Ry, { className: "size-3 shrink-0 text-[var(--muted-foreground)]" }), /* @__PURE__ */ U(Zo, {
19510
+ children: [/* @__PURE__ */ U(zy, { className: "size-3 shrink-0 text-[var(--muted-foreground)]" }), /* @__PURE__ */ U(Zo, {
19466
19511
  size: "small",
19467
19512
  value: n,
19468
19513
  options: r,
@@ -19476,7 +19521,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19476
19521
  className: "flex min-w-0 items-center gap-1 text-xs",
19477
19522
  children: [/* @__PURE__ */ U(X, {
19478
19523
  title: e("simulator.currentBinding"),
19479
- children: /* @__PURE__ */ U(Ry, { className: "size-3 shrink-0 text-[var(--muted-foreground)]" })
19524
+ children: /* @__PURE__ */ U(zy, { className: "size-3 shrink-0 text-[var(--muted-foreground)]" })
19480
19525
  }), /* @__PURE__ */ U("span", {
19481
19526
  className: "truncate",
19482
19527
  children: i
@@ -19524,7 +19569,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19524
19569
  ] })
19525
19570
  })
19526
19571
  ]
19527
- }), By = ({ t: e, requestValue: t, resolvedSimulatorExampleBinding: n, onRequestValueChange: r, onMarkEdited: i, onExternalChange: a }) => {
19572
+ }), Vy = ({ t: e, requestValue: t, resolvedSimulatorExampleBinding: n, onRequestValueChange: r, onMarkEdited: i, onExternalChange: a }) => {
19528
19573
  let { stateStore: o, actions: s } = rh(), c = ({ activeExampleBinding: t, preparedParsed: n, triggeredBy: c, showSuccessMessage: l = !0 }) => {
19529
19574
  let { decisionGraph: d } = o.getState(), f = d.nodes.find((e) => e.id === t.nodeId);
19530
19575
  if (!f) return B.error(e("simulator.boundRequestNodeNotFound")), null;
@@ -19594,7 +19639,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19594
19639
  return l || B.error(e("request.saveDataSourceFailed")), null;
19595
19640
  }
19596
19641
  } };
19597
- }, Vy = 700, Hy = ({ enabled: e, requestValue: t, requestSourcesSignature: n, boundRequestSourceIndex: r, onSyncToSchema: i, onPushToEditor: a, debounceMs: o = 700 }) => {
19642
+ }, Hy = 700, Uy = ({ enabled: e, requestValue: t, requestSourcesSignature: n, boundRequestSourceIndex: r, onSyncToSchema: i, onPushToEditor: a, debounceMs: o = 700 }) => {
19598
19643
  let s = R(null), c = R(void 0), l = R(t);
19599
19644
  l.current = t;
19600
19645
  let u = R(void 0), d = R({
@@ -19623,7 +19668,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19623
19668
  ]), { flush: () => {
19624
19669
  s.current !== null && (window.clearTimeout(s.current), s.current = null, c.current = l.current, d.current.onSyncToSchema());
19625
19670
  } };
19626
- }, Uy = ({ inputNodeContent: e, inputNodeId: t, simulatorExampleBinding: n, dataLabel: r = "Data" }) => {
19671
+ }, Wy = ({ inputNodeContent: e, inputNodeId: t, simulatorExampleBinding: n, dataLabel: r = "Data" }) => {
19627
19672
  let i = e, a = L(() => g(i, { dataLabel: r }), [i, r]), o = L(() => !n || n.nodeId !== t ? -1 : a[n.sourceIndex] ? n.sourceIndex : -1, [
19628
19673
  t,
19629
19674
  a,
@@ -19652,7 +19697,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19652
19697
  bindingName: m,
19653
19698
  shouldShowSimulatorSourceSelect: !!m && !!t && a.length > 1
19654
19699
  };
19655
- }, Wy = ({ defaultRequest: e, simulatorRequest: t, currentBindingIdentity: n, onExternalChange: r }) => {
19700
+ }, Gy = ({ defaultRequest: e, simulatorRequest: t, currentBindingIdentity: n, onExternalChange: r }) => {
19656
19701
  let [i, a] = z(e), [o, s] = z(!1), [c, l] = z(!1), u = R(null), d = R(null), f = R(void 0);
19657
19702
  return I(() => () => {
19658
19703
  u.current !== null && window.clearTimeout(u.current);
@@ -19672,7 +19717,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19672
19717
  setUserHasEdited: s,
19673
19718
  isApplyingExternalRequest: c
19674
19719
  };
19675
- }, Gy = ({ onChange: e, hasInputNode: t, loading: n, onRun: r, defaultRequest: i }) => {
19720
+ }, Ky = ({ onChange: e, hasInputNode: t, loading: n, onRun: r, defaultRequest: i }) => {
19676
19721
  let a = o(), { stateStore: s, actions: c } = rh(), { simulatorRequest: l, simulatorExampleBinding: u, inputNodeContent: f, inputNodeId: p } = $(({ simulatorRequest: e, simulatorExampleBinding: t, decisionGraph: n }) => {
19677
19722
  let r = n?.nodes?.find((e) => e.type === "inputNode");
19678
19723
  return {
@@ -19681,12 +19726,12 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19681
19726
  inputNodeContent: r?.content,
19682
19727
  inputNodeId: r?.id
19683
19728
  };
19684
- }), { requestSources: m, boundRequestSourceIndex: h, defaultRequestSourceIndex: g, defaultRequestSource: _, resolvedSimulatorExampleBinding: y, currentBindingIdentity: b, requestDefinitions: x, sourceOptions: S, bindingName: C, shouldShowSimulatorSourceSelect: w } = Uy({
19729
+ }), { requestSources: m, boundRequestSourceIndex: h, defaultRequestSourceIndex: g, defaultRequestSource: _, resolvedSimulatorExampleBinding: y, currentBindingIdentity: b, requestDefinitions: x, sourceOptions: S, bindingName: C, shouldShowSimulatorSourceSelect: w } = Wy({
19685
19730
  inputNodeContent: f,
19686
19731
  inputNodeId: p,
19687
19732
  simulatorExampleBinding: u,
19688
19733
  dataLabel: a("request.dataLabel")
19689
- }), { requestValue: T, setRequestValue: E, userHasEdited: D, setUserHasEdited: ee, isApplyingExternalRequest: te } = Wy({
19734
+ }), { requestValue: T, setRequestValue: E, userHasEdited: D, setUserHasEdited: ee, isApplyingExternalRequest: te } = Gy({
19690
19735
  defaultRequest: i,
19691
19736
  simulatorRequest: l,
19692
19737
  currentBindingIdentity: b,
@@ -19725,14 +19770,14 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19725
19770
  c.setNodeType(t.id, Zm.InferredOutput, new zn(e));
19726
19771
  } catch {}
19727
19772
  }, [T]);
19728
- let { persistRequestToExampleSource: A } = By({
19773
+ let { persistRequestToExampleSource: A } = Vy({
19729
19774
  t: a,
19730
19775
  requestValue: T,
19731
19776
  resolvedSimulatorExampleBinding: y,
19732
19777
  onRequestValueChange: E,
19733
19778
  onMarkEdited: () => ee(!0),
19734
19779
  onExternalChange: e
19735
- }), j = JSON.stringify(m.map((e) => e.data)), { flush: M } = Hy({
19780
+ }), j = JSON.stringify(m.map((e) => e.data)), { flush: M } = Uy({
19736
19781
  enabled: !!(t && y),
19737
19782
  requestValue: T,
19738
19783
  requestSourcesSignature: j,
@@ -19752,7 +19797,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19752
19797
  c.setSimulatorRequest(JSON.stringify(t, null, 2));
19753
19798
  }
19754
19799
  });
19755
- return /* @__PURE__ */ W(P.Fragment, { children: [/* @__PURE__ */ U(zy, {
19800
+ return /* @__PURE__ */ W(P.Fragment, { children: [/* @__PURE__ */ U(By, {
19756
19801
  t: a,
19757
19802
  shouldShowSimulatorSourceSelect: w,
19758
19803
  boundRequestSourceIndex: h,
@@ -19800,7 +19845,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19800
19845
  className: "relative min-h-0 flex-1 overflow-hidden",
19801
19846
  children: [/* @__PURE__ */ U("div", {
19802
19847
  className: "absolute inset-0",
19803
- children: /* @__PURE__ */ U(Py, {
19848
+ children: /* @__PURE__ */ U(Fy, {
19804
19849
  value: T,
19805
19850
  onChange: (t) => {
19806
19851
  E(t), ee(!0), c.setSimulatorRequest(t ?? ""), e?.(t ?? "");
@@ -19811,9 +19856,9 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19811
19856
  children: /* @__PURE__ */ U($o, { size: "small" })
19812
19857
  })]
19813
19858
  })] });
19814
- }, Ky = /* @__PURE__ */ function(e) {
19859
+ }, qy = /* @__PURE__ */ function(e) {
19815
19860
  return e.Output = "Output", e.Input = "Input", e.Trace = "Trace", e.Runs = "Runs", e;
19816
- }(Ky || {}), qy = ({ defaultRequest: e, onChange: t, onRun: n, onClear: r, loading: i = !1, simulationFooter: a, runsPersistenceKey: s, leftPanel: c = Gy }) => {
19861
+ }(qy || {}), Jy = ({ defaultRequest: e, onChange: t, onRun: n, onClear: r, loading: i = !1, simulationFooter: a, runsPersistenceKey: s, leftPanel: c = Ky }) => {
19817
19862
  let l = o(), [u, d] = Rh("simulation.search", ""), [f, p] = Rh("simulation.segment", "Output"), { viewConfig: m } = $((e) => ({ viewConfig: e.viewConfig })), { actions: h } = rh(), { nodeTypes: g, simulate: _, hasInputNode: v } = $(({ decisionGraph: e, simulate: t }) => ({
19818
19863
  simulate: t,
19819
19864
  hasInputNode: e.nodes.some((e) => e.type === Q.Input),
@@ -19824,10 +19869,10 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19824
19869
  })), [y, b] = z("graph"), x = $((e) => e.simulateRuns);
19825
19870
  I(() => {
19826
19871
  if (!s) return;
19827
- let e = My(s);
19872
+ let e = Ny(s);
19828
19873
  e.length > 0 && h.hydrateSimulateRuns(e);
19829
19874
  }, [s]), I(() => {
19830
- s && x.length > 0 && Ny(s, x);
19875
+ s && x.length > 0 && Py(s, x);
19831
19876
  }, [s, x]);
19832
19877
  let S = R(void 0);
19833
19878
  return I(() => {
@@ -19869,7 +19914,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19869
19914
  minSize: 20,
19870
19915
  maxSize: 20,
19871
19916
  className: "flex w-[260px] flex-col",
19872
- children: /* @__PURE__ */ U(Iy, {
19917
+ children: /* @__PURE__ */ U(Ly, {
19873
19918
  search: u,
19874
19919
  onSearchChange: d,
19875
19920
  loading: i,
@@ -19895,7 +19940,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19895
19940
  size: "small",
19896
19941
  style: { width: "100%" },
19897
19942
  onChange: (e) => p(e),
19898
- items: Object.values(Ky).map((e) => ({
19943
+ items: Object.values(qy).map((e) => ({
19899
19944
  key: e,
19900
19945
  label: e
19901
19946
  })),
@@ -19915,19 +19960,19 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19915
19960
  className: "absolute inset-0 z-10 flex flex-col gap-2.5 bg-[var(--card)]/80 p-4",
19916
19961
  "data-testid": "simulator-loading-skeleton",
19917
19962
  children: [
19918
- /* @__PURE__ */ U(vy, { className: "h-3 w-2/3" }),
19919
- /* @__PURE__ */ U(vy, { className: "h-3 w-1/2" }),
19920
- /* @__PURE__ */ U(vy, { className: "h-3 w-3/4" }),
19921
- /* @__PURE__ */ U(vy, { className: "h-24 w-full" }),
19922
- /* @__PURE__ */ U(vy, { className: "h-3 w-2/3" }),
19923
- /* @__PURE__ */ U(vy, { className: "h-3 w-1/2" })
19963
+ /* @__PURE__ */ U(yy, { className: "h-3 w-2/3" }),
19964
+ /* @__PURE__ */ U(yy, { className: "h-3 w-1/2" }),
19965
+ /* @__PURE__ */ U(yy, { className: "h-3 w-3/4" }),
19966
+ /* @__PURE__ */ U(yy, { className: "h-24 w-full" }),
19967
+ /* @__PURE__ */ U(yy, { className: "h-3 w-2/3" }),
19968
+ /* @__PURE__ */ U(yy, { className: "h-3 w-1/2" })
19924
19969
  ]
19925
- }), f === "Runs" ? /* @__PURE__ */ U(ky, { runs: x }) : /* @__PURE__ */ U(Py, {
19970
+ }), f === "Runs" ? /* @__PURE__ */ U(Ay, { runs: x }) : /* @__PURE__ */ U(Fy, {
19926
19971
  readOnly: !0,
19927
- value: q(_).with({ result: K._ }, ({ result: e }) => q(y).with("graph", () => Jy({
19972
+ value: q(_).with({ result: K._ }, ({ result: e }) => q(y).with("graph", () => Yy({
19928
19973
  traceData: e?.trace,
19929
19974
  output: e?.result
19930
- }, f ?? "Output")).otherwise(() => Jy(e?.trace[y], f ?? "Output"))).otherwise(() => "")
19975
+ }, f ?? "Output")).otherwise(() => Yy(e?.trace[y], f ?? "Output"))).otherwise(() => "")
19931
19976
  })]
19932
19977
  })]
19933
19978
  })
@@ -19937,10 +19982,10 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19937
19982
  children: a
19938
19983
  })]
19939
19984
  });
19940
- }, Jy = (e, t) => {
19985
+ }, Yy = (e, t) => {
19941
19986
  let n = q([t, e]).with(["Output", { output: K._ }], ([, { output: e }]) => e).with(["Input", { input: K._ }], ([, { input: e }]) => e).with(["Trace", { trace: K._ }], ([, { trace: e }]) => e).with(["Trace", { traceData: K._ }], ([, { traceData: e }]) => e).otherwise(() => ({}));
19942
19987
  return ti.stringify(n, void 0, 2);
19943
- }, Yy = /* @__PURE__ */ new Set(["position", "_diff"]), Xy = /* @__PURE__ */ new Set(["_diff"]), Zy = (e) => typeof e != "object" || !e ? JSON.stringify(e) ?? "undefined" : Array.isArray(e) ? `[${e.map(Zy).join(",")}]` : `{${Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t)).map(([e, t]) => `${JSON.stringify(e)}:${Zy(t)}`).join(",")}}`, Qy = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => !t.has(e))), $y = (e, t, n) => [.../* @__PURE__ */ new Set([...Object.keys(Qy(e, n)), ...Object.keys(Qy(t, n))])].filter((n) => Zy(e[n]) !== Zy(t[n])), eb = (e, t, n) => {
19988
+ }, Xy = /* @__PURE__ */ new Set(["position", "_diff"]), Zy = /* @__PURE__ */ new Set(["_diff"]), Qy = (e) => typeof e != "object" || !e ? JSON.stringify(e) ?? "undefined" : Array.isArray(e) ? `[${e.map(Qy).join(",")}]` : `{${Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t)).map(([e, t]) => `${JSON.stringify(e)}:${Qy(t)}`).join(",")}}`, $y = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => !t.has(e))), eb = (e, t, n) => [.../* @__PURE__ */ new Set([...Object.keys($y(e, n)), ...Object.keys($y(t, n))])].filter((n) => Qy(e[n]) !== Qy(t[n])), tb = (e, t, n) => {
19944
19989
  let r = new Map(e.map((e) => [e.id, e])), i = new Map(t.map((e) => [e.id, e])), a = [], o = [], s = [];
19945
19990
  for (let [e, t] of i) r.has(e) || a.push({
19946
19991
  id: e,
@@ -19957,7 +20002,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19957
20002
  });
19958
20003
  continue;
19959
20004
  }
19960
- let a = $y(t, r, n);
20005
+ let a = eb(t, r, n);
19961
20006
  a.length > 0 && s.push({
19962
20007
  id: e,
19963
20008
  name: r.name ?? t.name,
@@ -19970,8 +20015,8 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19970
20015
  removed: o,
19971
20016
  modified: s
19972
20017
  };
19973
- }, tb = (e, t) => {
19974
- let n = eb(e.nodes ?? [], t.nodes ?? [], Yy), r = eb(e.edges ?? [], t.edges ?? [], Xy);
20018
+ }, nb = (e, t) => {
20019
+ let n = tb(e.nodes ?? [], t.nodes ?? [], Xy), r = tb(e.edges ?? [], t.edges ?? [], Zy);
19975
20020
  return {
19976
20021
  addedNodes: n.added,
19977
20022
  removedNodes: n.removed,
@@ -19981,7 +20026,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
19981
20026
  modifiedEdges: r.modified,
19982
20027
  unchanged: n.added.length + n.removed.length + n.modified.length + r.added.length + r.removed.length + r.modified.length === 0
19983
20028
  };
19984
- }, nb = ({ report: e, onDebug: t }) => {
20029
+ }, rb = ({ report: e, onDebug: t }) => {
19985
20030
  let n = o(), r = L(() => e.results.reduce((e, t) => e + (t.durationMs ?? 0), 0), [e]);
19986
20031
  return /* @__PURE__ */ W("div", {
19987
20032
  className: "min-h-0 flex-1 overflow-y-auto",
@@ -20027,7 +20072,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20027
20072
  }) })
20028
20073
  })]
20029
20074
  });
20030
- }, rb = () => {
20075
+ }, ib = () => {
20031
20076
  let e = o(), t = nh(), { decisionGraph: n, panels: r, fixturesRunner: i, fixturesRun: a } = $(({ decisionGraph: e, panels: t, fixturesRunner: n, fixturesRun: r }) => ({
20032
20077
  decisionGraph: e,
20033
20078
  panels: t,
@@ -20075,7 +20120,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20075
20120
  className: "mx-3 mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-1.5 text-xs text-destructive",
20076
20121
  children: a.error === "no-examples" ? e("request.fixturesNoExamples") : a.error === "no-input-node" ? e("request.fixturesNoInputNode") : a.error ?? e("request.runAllFailed")
20077
20122
  }),
20078
- a?.status === "done" && a.report && /* @__PURE__ */ U(nb, {
20123
+ a?.status === "done" && a.report && /* @__PURE__ */ U(rb, {
20079
20124
  report: a.report,
20080
20125
  onDebug: (e) => {
20081
20126
  if (!s) return;
@@ -20092,33 +20137,33 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20092
20137
  })
20093
20138
  ]
20094
20139
  });
20095
- }, ib = (e) => Array.isArray(e.type) ? e.type.find((e) => e !== "null") ?? e.type[0] : e.type, ab = (e) => {
20140
+ }, ab = (e) => Array.isArray(e.type) ? e.type.find((e) => e !== "null") ?? e.type[0] : e.type, ob = (e) => {
20096
20141
  if (!e || typeof e != "object") return zn.fromJson("Any");
20097
- if (Array.isArray(e.oneOf) && e.oneOf.length > 0) return ab(e.oneOf[0]);
20098
- if (Array.isArray(e.anyOf) && e.anyOf.length > 0) return ab(e.anyOf[0]);
20099
- if (Array.isArray(e.allOf) && e.allOf.length > 0) return e.allOf.reduce((e, t) => e.merge(ab(t)), zn.fromJson({ Object: {} }));
20100
- switch (ib(e)) {
20142
+ if (Array.isArray(e.oneOf) && e.oneOf.length > 0) return ob(e.oneOf[0]);
20143
+ if (Array.isArray(e.anyOf) && e.anyOf.length > 0) return ob(e.anyOf[0]);
20144
+ if (Array.isArray(e.allOf) && e.allOf.length > 0) return e.allOf.reduce((e, t) => e.merge(ob(t)), zn.fromJson({ Object: {} }));
20145
+ switch (ab(e)) {
20101
20146
  case "object": {
20102
20147
  let t = zn.fromJson({ Object: {} });
20103
20148
  return Object.entries(e.properties ?? {}).forEach(([e, n]) => {
20104
- t.set(e, ab(n));
20149
+ t.set(e, ob(n));
20105
20150
  }), t;
20106
20151
  }
20107
- case "array": return ab(Array.isArray(e.items) ? e.items[0] : e.items).toArray();
20152
+ case "array": return ob(Array.isArray(e.items) ? e.items[0] : e.items).toArray();
20108
20153
  case "string": return zn.fromJson("String");
20109
20154
  case "boolean": return zn.fromJson("Bool");
20110
20155
  case "number":
20111
20156
  case "integer": return zn.fromJson("Number");
20112
20157
  case "null": return zn.fromJson("Null");
20113
- default: return e.properties ? ab({
20158
+ default: return e.properties ? ob({
20114
20159
  ...e,
20115
20160
  type: "object"
20116
- }) : e.items ? ab({
20161
+ }) : e.items ? ob({
20117
20162
  ...e,
20118
20163
  type: "array"
20119
20164
  }) : e.nullable ? zn.fromJson("Null") : zn.fromJson("Any");
20120
20165
  }
20121
- }, ob = "data:image/svg+xml,%3csvg%20id='fi_5968381'%20enable-background='new%200%200%20512%20512'%20height='512'%20viewBox='0%200%20512%20512'%20width='512'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='m50%200h412c27.614%200%2050%2022.386%2050%2050v412c0%2027.614-22.386%2050-50%2050h-412c-27.614%200-50-22.386-50-50v-412c0-27.614%2022.386-50%2050-50z'%20fill='%233178c6'%3e%3c/path%3e%3cpath%20d='m50%200h412c27.614%200%2050%2022.386%2050%2050v412c0%2027.614-22.386%2050-50%2050h-412c-27.614%200-50-22.386-50-50v-412c0-27.614%2022.386-50%2050-50z'%20fill='%233178c6'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='m316.939%20407.424v50.061c8.138%204.172%2017.763%207.3%2028.875%209.386s22.823%203.129%2035.135%203.129c21.219%200%2044.448-3.035%2062.602-14.784%2018.064-11.691%2026.449-31.14%2026.449-52.172%200-15.637-4.851-30.684-15.807-42.081-16.429-17.091-39.516-24.022-60.255-34.183-10.389-5.09-24.727-12.992-24.727-26.361%200-3.441.887-6.543%202.661-9.307%207.132-11.113%2022.973-13.376%2035.057-13.376%2013.717%200%2028.189%203.071%2040.926%208.76%204.434%201.982%208.529%204.276%2012.285%206.884v-46.776c-7.616-2.92-15.937-5.084-24.962-6.492s-19.381-2.112-31.066-2.112c-11.895%200-23.163%201.278-33.805%203.833s-20.006%206.544-28.093%2011.967c-8.086%205.424-14.476%2012.333-19.171%2020.729-4.695%208.395-7.043%2018.433-7.043%2030.114%200%2014.914%204.304%2027.638%2012.912%2038.172%208.607%2010.533%2021.675%2019.45%2039.204%2026.751%2011.792%204.822%2024.053%209.581%2034.665%2016.739%207.355%204.96%2014.007%2011.877%2014.007%2021.275%200%206.821-3.856%2012.604-9.468%2016.192-8.303%205.308-18.936%206.492-28.563%206.492-10.851%200-21.597-1.903-32.24-5.71-10.641-3.806-20.501-9.516-29.578-17.13zm-84.159-123.342h64.22v-41.082h-179v41.082h63.906v182.918h50.874z'%20fill='%23fff'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", sb = {
20166
+ }, sb = "data:image/svg+xml,%3csvg%20id='fi_5968381'%20enable-background='new%200%200%20512%20512'%20height='512'%20viewBox='0%200%20512%20512'%20width='512'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='m50%200h412c27.614%200%2050%2022.386%2050%2050v412c0%2027.614-22.386%2050-50%2050h-412c-27.614%200-50-22.386-50-50v-412c0-27.614%2022.386-50%2050-50z'%20fill='%233178c6'%3e%3c/path%3e%3cpath%20d='m50%200h412c27.614%200%2050%2022.386%2050%2050v412c0%2027.614-22.386%2050-50%2050h-412c-27.614%200-50-22.386-50-50v-412c0-27.614%2022.386-50%2050-50z'%20fill='%233178c6'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='m316.939%20407.424v50.061c8.138%204.172%2017.763%207.3%2028.875%209.386s22.823%203.129%2035.135%203.129c21.219%200%2044.448-3.035%2062.602-14.784%2018.064-11.691%2026.449-31.14%2026.449-52.172%200-15.637-4.851-30.684-15.807-42.081-16.429-17.091-39.516-24.022-60.255-34.183-10.389-5.09-24.727-12.992-24.727-26.361%200-3.441.887-6.543%202.661-9.307%207.132-11.113%2022.973-13.376%2035.057-13.376%2013.717%200%2028.189%203.071%2040.926%208.76%204.434%201.982%208.529%204.276%2012.285%206.884v-46.776c-7.616-2.92-15.937-5.084-24.962-6.492s-19.381-2.112-31.066-2.112c-11.895%200-23.163%201.278-33.805%203.833s-20.006%206.544-28.093%2011.967c-8.086%205.424-14.476%2012.333-19.171%2020.729-4.695%208.395-7.043%2018.433-7.043%2030.114%200%2014.914%204.304%2027.638%2012.912%2038.172%208.607%2010.533%2021.675%2019.45%2039.204%2026.751%2011.792%204.822%2024.053%209.581%2034.665%2016.739%207.355%204.96%2014.007%2011.877%2014.007%2021.275%200%206.821-3.856%2012.604-9.468%2016.192-8.303%205.308-18.936%206.492-28.563%206.492-10.851%200-21.597-1.903-32.24-5.71-10.641-3.806-20.501-9.516-29.578-17.13zm-84.159-123.342h64.22v-41.082h-179v41.082h63.906v182.918h50.874z'%20fill='%23fff'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", cb = {
20122
20167
  dark: {
20123
20168
  string: "#CE9178",
20124
20169
  number: "#B5CEA8",
@@ -20135,8 +20180,8 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20135
20180
  error: "#E51400",
20136
20181
  info: "rgba(0, 0, 0, 0.65)"
20137
20182
  }
20138
- }, cb = ({ lines: e, msSinceRun: t, filter: n }) => {
20139
- let r = fc(), i = o(), a = sb[r ?? "light"], s = P.useMemo(() => {
20183
+ }, lb = ({ lines: e, msSinceRun: t, filter: n }) => {
20184
+ let r = fc(), i = o(), a = cb[r ?? "light"], s = P.useMemo(() => {
20140
20185
  let t = (n ?? "").trim().toLowerCase();
20141
20186
  return t ? e.filter((e) => e.toLowerCase().includes(t)) : e;
20142
20187
  }, [e, n]), c = s.length > 0;
@@ -20170,7 +20215,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20170
20215
  children: /* @__PURE__ */ U("div", {
20171
20216
  className: "seal-function__debugger__log__values",
20172
20217
  children: s.map((e, t) => {
20173
- let n = pb(e);
20218
+ let n = mb(e);
20174
20219
  return /* @__PURE__ */ U(fa, {
20175
20220
  data: n,
20176
20221
  shouldExpandNodeInitially: () => !1,
@@ -20181,11 +20226,11 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20181
20226
  children: i
20182
20227
  }), ": "] })), e.length >= 1) {
20183
20228
  let i = [...e];
20184
- i.pop(), i = i.reverse(), r.push(lb(a)(fb(n, i), t));
20229
+ i.pop(), i = i.reverse(), r.push(ub(a)(pb(n, i), t));
20185
20230
  }
20186
20231
  return /* @__PURE__ */ U(H, { children: r });
20187
20232
  },
20188
- valueRenderer: db(a),
20233
+ valueRenderer: fb(a),
20189
20234
  theme: {
20190
20235
  base00: "var(--card)",
20191
20236
  base03: "var(--seal-color-text-base)",
@@ -20218,12 +20263,12 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20218
20263
  })
20219
20264
  ]
20220
20265
  });
20221
- }, lb = (e) => (t, n) => {
20266
+ }, ub = (e) => (t, n) => {
20222
20267
  if (n === "Object") {
20223
20268
  let n = Object.entries(t), r = n.reduce((t, [r, i], a) => [...t, /* @__PURE__ */ W("span", { children: [
20224
20269
  r,
20225
20270
  ": ",
20226
- db(e)(ub(i), i),
20271
+ fb(e)(db(i), i),
20227
20272
  a !== n.length - 1 && /* @__PURE__ */ U(H, { children: ", " })
20228
20273
  ] }, r)], []);
20229
20274
  return /* @__PURE__ */ W(H, { children: [
@@ -20233,7 +20278,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20233
20278
  ] });
20234
20279
  }
20235
20280
  if (n === "Array") {
20236
- let n = t, r = n.reduce((t, r, i) => [...t, /* @__PURE__ */ W("span", { children: [db(e)(ub(r), r), i !== n.length - 1 && /* @__PURE__ */ U(H, { children: ", " })] }, i)], []);
20281
+ let n = t, r = n.reduce((t, r, i) => [...t, /* @__PURE__ */ W("span", { children: [fb(e)(db(r), r), i !== n.length - 1 && /* @__PURE__ */ U(H, { children: ", " })] }, i)], []);
20237
20282
  return /* @__PURE__ */ W(H, { children: [
20238
20283
  n.length > 2 ? `(${n.length})` : "",
20239
20284
  " [",
@@ -20242,13 +20287,13 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20242
20287
  ] });
20243
20288
  }
20244
20289
  return null;
20245
- }, ub = (e) => {
20290
+ }, db = (e) => {
20246
20291
  switch (!0) {
20247
20292
  case Array.isArray(e): return `Array(${e.length})`;
20248
20293
  case typeof e == "object": return "{...}";
20249
20294
  default: return JSON.stringify(e);
20250
20295
  }
20251
- }, db = (e) => (t, n) => {
20296
+ }, fb = (e) => (t, n) => {
20252
20297
  let r = t;
20253
20298
  return typeof n == "string" ? r.startsWith("\"Error:") ? /* @__PURE__ */ U("span", {
20254
20299
  style: { color: e.error },
@@ -20266,13 +20311,13 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20266
20311
  style: { color: e.number },
20267
20312
  children: r
20268
20313
  }) : r;
20269
- }, fb = (e, t) => t.reduce((e, t) => e && e[t] ? e[t] : null, e), pb = (e) => {
20314
+ }, pb = (e, t) => t.reduce((e, t) => e && e[t] ? e[t] : null, e), mb = (e) => {
20270
20315
  if (typeof e == "string" && (e = e.trim(), e)) try {
20271
20316
  return JSON.parse(e);
20272
20317
  } catch {
20273
20318
  return `[UNSERIALIZED]: ${e}`;
20274
20319
  }
20275
- }, mb = {
20320
+ }, hb = {
20276
20321
  dark: {
20277
20322
  base00: "var(--card)",
20278
20323
  base03: "var(--seal-color-text-base)",
@@ -20285,15 +20330,15 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20285
20330
  base0B: "var(--seal-color-text-base)",
20286
20331
  base0D: "var(--seal-color-text-base)"
20287
20332
  }
20288
- }, hb = (e) => ({
20289
- ...mb[e],
20333
+ }, gb = (e) => ({
20334
+ ...hb[e],
20290
20335
  base00: "var(--card)",
20291
20336
  base03: "var(--seal-color-text-base)",
20292
20337
  base0B: "var(--seal-color-text-base)",
20293
20338
  base0D: "var(--seal-color-text-base)",
20294
20339
  tree: { display: "inline-block" }
20295
- }), gb = ({ input: e, output: t }) => {
20296
- let n = hb(fc() ?? "light"), [r, i] = P.useState(null);
20340
+ }), _b = ({ input: e, output: t }) => {
20341
+ let n = gb(fc() ?? "light"), [r, i] = P.useState(null);
20297
20342
  return e == null && t == null ? null : /* @__PURE__ */ U("div", {
20298
20343
  className: "border-b border-[var(--seal-color-border-fade)] text-xs [font-family:var(--mono-font-family)]",
20299
20344
  children: [{
@@ -20330,9 +20375,9 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20330
20375
  }, e);
20331
20376
  })
20332
20377
  });
20333
- }, _b = /* @__PURE__ */ function(e) {
20378
+ }, vb = /* @__PURE__ */ function(e) {
20334
20379
  return e.Console = "Console", e.Libraries = "Libraries", e;
20335
- }(_b || {}), vb = ({ trace: e, editor: t, libraries: n = [], editorValue: r, disabled: i }) => {
20380
+ }(vb || {}), yb = ({ trace: e, editor: t, libraries: n = [], editorValue: r, disabled: i }) => {
20336
20381
  let a = e?.traceData?.log || [], [s, c] = z("Console"), [l, u] = z(""), d = o();
20337
20382
  return /* @__PURE__ */ U("div", {
20338
20383
  className: "h-full border-l border-[var(--border)]",
@@ -20344,7 +20389,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20344
20389
  rootClassName: "seal-inline-tabs",
20345
20390
  size: "small",
20346
20391
  style: { width: "100%" },
20347
- items: Object.values(_b).map((e) => ({
20392
+ items: Object.values(vb).map((e) => ({
20348
20393
  key: e,
20349
20394
  label: e
20350
20395
  })),
@@ -20367,7 +20412,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20367
20412
  }), /* @__PURE__ */ U("div", {
20368
20413
  className: "grow overflow-y-auto",
20369
20414
  children: q(s).with("Console", () => /* @__PURE__ */ W(H, { children: [
20370
- e && /* @__PURE__ */ U(gb, {
20415
+ e && /* @__PURE__ */ U(_b, {
20371
20416
  input: e.input,
20372
20417
  output: e.output
20373
20418
  }),
@@ -20381,18 +20426,18 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20381
20426
  className: "h-7 w-full min-w-0 rounded-md border border-border bg-muted/40 px-2 text-xs outline-none focus:border-primary/50"
20382
20427
  })
20383
20428
  }),
20384
- a.length === 0 && /* @__PURE__ */ U(cb, {
20429
+ a.length === 0 && /* @__PURE__ */ U(lb, {
20385
20430
  lines: ["\"Info: Use console.log and run simulation to debug your code.\""],
20386
20431
  msSinceRun: null
20387
20432
  }),
20388
- a.map((e, t) => /* @__PURE__ */ U(cb, {
20433
+ a.map((e, t) => /* @__PURE__ */ U(lb, {
20389
20434
  lines: e.lines,
20390
20435
  msSinceRun: e.msSinceRun,
20391
20436
  filter: l
20392
20437
  }, t))
20393
20438
  ] })).with("Libraries", () => /* @__PURE__ */ U("div", {
20394
20439
  className: "flex flex-col",
20395
- children: n.map((e) => /* @__PURE__ */ U(yb, {
20440
+ children: n.map((e) => /* @__PURE__ */ U(bb, {
20396
20441
  lib: e,
20397
20442
  disabled: i,
20398
20443
  editorValue: r,
@@ -20406,14 +20451,14 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20406
20451
  })]
20407
20452
  })
20408
20453
  });
20409
- }, yb = ({ lib: e, onImport: t, editorValue: n, disabled: r }) => {
20454
+ }, bb = ({ lib: e, onImport: t, editorValue: n, disabled: r }) => {
20410
20455
  let i = o(), a = L(() => !n || !n.includes(`from "${e.name}"`) && !n.includes(`from '${e.name}'`), [e.name, n]);
20411
20456
  return /* @__PURE__ */ W("div", {
20412
20457
  className: "flex items-center gap-2 border-b border-[var(--seal-color-border-fade)] p-2 no-underline",
20413
20458
  children: [
20414
20459
  /* @__PURE__ */ U("img", {
20415
20460
  alt: "TypeScript Library",
20416
- src: ob,
20461
+ src: sb,
20417
20462
  height: 18
20418
20463
  }),
20419
20464
  /* @__PURE__ */ U(Z.Text, {
@@ -20455,12 +20500,12 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20455
20500
  })
20456
20501
  ]
20457
20502
  }, e.name);
20458
- }, bb = (e) => xb(e.toJson()), xb = (e) => q(e).with("String", () => "string").with("Bool", () => "boolean").with("Number", () => "number").with("Null", () => "null").with("Any", () => "any").with({ Object: K.select() }, (e) => `{${Object.entries(e).map(([e, t]) => [e, xb(t)].join(":")).join(",")}}`).with({ Array: K.select() }, (e) => `${xb(e)}[]`).with({ Const: K.select() }, (e) => `"${e}"`).with({ Enum: [K._, K.select()] }, (e) => e.map((e) => `"${e}"`).join(" | ")).exhaustive(), Sb = {
20503
+ }, xb = (e) => Sb(e.toJson()), Sb = (e) => q(e).with("String", () => "string").with("Bool", () => "boolean").with("Number", () => "number").with("Null", () => "null").with("Any", () => "any").with({ Object: K.select() }, (e) => `{${Object.entries(e).map(([e, t]) => [e, Sb(t)].join(":")).join(",")}}`).with({ Array: K.select() }, (e) => `${Sb(e)}[]`).with({ Const: K.select() }, (e) => `"${e}"`).with({ Enum: [K._, K.select()] }, (e) => e.map((e) => `"${e}"`).join(" | ")).exhaustive(), Cb = {
20459
20504
  Hint: 1,
20460
20505
  Info: 2,
20461
20506
  Warning: 4,
20462
20507
  Error: 8
20463
- }, Cb = ({ disabled: e = !1, disableDebug: t, language: n = "javascript", defaultValue: r, value: i, onChange: a, trace: o, onMonacoReady: s, onEditorMount: c, error: l, inputData: u, previousValue: d, permission: f = "edit:full", libraries: p = gh }) => {
20508
+ }, wb = ({ disabled: e = !1, disableDebug: t, language: n = "javascript", defaultValue: r, value: i, onChange: a, trace: o, onMonacoReady: s, onEditorMount: c, error: l, inputData: u, previousValue: d, permission: f = "edit:full", libraries: p = gh }) => {
20464
20509
  let m = ra(), h = R(!1), g = fc(), [_, v] = z(), [y, b] = z(), x = Mi((e) => {
20465
20510
  a?.(e);
20466
20511
  }, 100), [S, C] = z(), [w, T] = z(), E = Ni(() => S?.layout(), 100, { trailing: !0 }), D = Ni(() => w?.layout(), 100, { trailing: !0 });
@@ -20492,7 +20537,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20492
20537
  }, []), I(() => {
20493
20538
  if (!m) return;
20494
20539
  let e = "any";
20495
- Ms() && (e = bb(Bn(u))), m.languages.typescript.javascriptDefaults.addExtraLib(`
20540
+ Ms() && (e = xb(Bn(u))), m.languages.typescript.javascriptDefaults.addExtraLib(`
20496
20541
  type Input = ${e};
20497
20542
  type Output = Promise<any>;
20498
20543
 
@@ -20515,7 +20560,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20515
20560
  if (!r) return;
20516
20561
  let i = new m.Range(t, r.getLineFirstNonWhitespaceColumn(t), t, r.getLineLastNonWhitespaceColumn(t));
20517
20562
  m.editor.setModelMarkers(r, "gorules", [{
20518
- severity: Sb.Error,
20563
+ severity: Cb.Error,
20519
20564
  message: n,
20520
20565
  startLineNumber: i.startLineNumber,
20521
20566
  endLineNumber: i.endLineNumber,
@@ -20559,7 +20604,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20559
20604
  theme: g === "dark" ? "vs-dark" : "light",
20560
20605
  height: "100%",
20561
20606
  options: {
20562
- ...wb,
20607
+ ...Tb,
20563
20608
  readOnly: !0
20564
20609
  }
20565
20610
  }) : /* @__PURE__ */ U(ta, {
@@ -20575,13 +20620,13 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20575
20620
  theme: g === "dark" ? "vs-dark" : "light",
20576
20621
  height: "100%",
20577
20622
  options: {
20578
- ...wb,
20623
+ ...Tb,
20579
20624
  readOnly: e || f !== "edit:full"
20580
20625
  }
20581
20626
  })
20582
20627
  }), !t && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(sa, {}), /* @__PURE__ */ U(aa, {
20583
20628
  minSize: 25,
20584
- children: !t && /* @__PURE__ */ U(vb, {
20629
+ children: !t && /* @__PURE__ */ U(yb, {
20585
20630
  libraries: p,
20586
20631
  trace: o,
20587
20632
  editor: S,
@@ -20591,7 +20636,7 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20591
20636
  })] })]
20592
20637
  })
20593
20638
  }) });
20594
- }, wb = {
20639
+ }, Tb = {
20595
20640
  automaticLayout: !0,
20596
20641
  contextmenu: !1,
20597
20642
  fontSize: 13,
@@ -20605,11 +20650,11 @@ var zy = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
20605
20650
  horizontalScrollbarSize: 4,
20606
20651
  horizontalSliderSize: 4
20607
20652
  }
20608
- }, Tb = /* @__PURE__ */ e({ Function: () => Cb });
20653
+ }, Eb = /* @__PURE__ */ e({ Function: () => wb });
20609
20654
  //#endregion
20610
20655
  //#region src/index.ts
20611
20656
  typeof document < "u" && !document.querySelector(".seal-root") && console.warn("[seal-editor] LEGACY token injection is active (no .seal-root wrapper found) — wrap your app in .seal-root before v2.0. See ADR-023.");
20612
20657
  //#endregion
20613
- export { Vy as AUTO_SYNC_DEBOUNCE_MS, xe as COLUMN_FIELD_TYPE_OPTIONS, nf as CodeEditor, ly as CustomFunctionTable, he as CustomKind, ye as DECISION_GRAPH_CONTENT_TYPE, gy as DecisionGraph, Cm as DecisionTable, hc as DictionaryProvider, rm as DiffAutosizeTextArea, nm as DiffCodeEditor, cm as DiffIcon, em as DiffInput, Zp as DiffRadio, tm as DiffSelect, $p as DiffSwitch, Cg as Expression, Lf as ExpressionBuilder, rb as FixturesPanel, Cb as Function, Gh as GraphDecisionNode, Jh as GraphNode, qy as GraphSimulator, s as I18nProvider, p as INPUT_CONTRACT_VERSION, cy as InstanceEditor, gc as JdmConfigProvider, qs as MODE_EXTRAS, Wh as NodeColor, ue as NodeKind, Zm as NodeTypeKind, M as OUTPUT_FIELD_TYPE_OPTIONS, Py as SimulatorEditor, u_ as TabRequest, fy as ToolbarAnchor, $f as TypedInput, Dh as addStrikethrough, ge as anyNodeSchema, f as applySchemaTextToInputContract, Oh as buildDiffString, b as buildRequestExampleTemplateFromDefinitions, D as buildRequestSchemaFromDefinitions, C_ as calculateDiffGraph, uy as clusterToolbarItems, pd as codemirror, Qf as coerceToTypedValue, be as columnEnumSchema, N as columnFieldTypeSchema, Ah as compareAndUnifyLists, kh as compareStringFields, C as computeExampleDrift, tb as computeGraphDiff, fe as contractExamplesToSources, _y as createJdmNode, a as createT, pe as customNodeSchema, Ys as darkTokens, Se as decisionModelSchema, ae as decisionNodeSchema, se as decisionTableSchema, wh as definePack, _e as edgeSchema, Ns as ensureWasmLoaded, me as expressionNodeSchema, le as functionNodeSchema, d as getRequestDefinitions, g as getRequestExampleSources, y as getRequestSchemaSourceValue, de as hasExampleDrift, ce as inputNodeSchema, ab as jsonSchemaToVariableType, Js as lightTokens, x as migrateRequestExampleDataByDefinitions, j as nodeSchema, N_ as nodeSpecification, we as normalizeRequestDefinitionOrders, ne as normalizeRequestFieldKey, re as normalizeRequestJsonKeys, Ce as outputFieldTypeSchema, Ee as outputNodeSchema, T_ as processEdges, w_ as processNodes, w as readRequestInputContract, m as requestSchemaFingerprint, Ch as resolveCustomNode, v as resolveRequestSchemaValue, ld as setUdfCompletions, A as stringifyRequestSchemaValue, ie as switchNodeSchema, h as updateRequestSchemaExamples, nh as useDecisionGraphActions, eh as useDecisionGraphListeners, rh as useDecisionGraphRaw, th as useDecisionGraphReferences, $ as useDecisionGraphState, mc as useDictionaries, ah as useEdgeDiff, uh as useGraphSerializer, ih as useNodeDiff, Eh as useNodeType, Rh as usePersistentState, Hy as useSimulatorAutoSync, o as useT, dh as useTabSerializer, fc as useThemeMode, Ps as useWasmReady, Te as validationSchema, _ as writeRequestInputContract };
20658
+ export { Hy as AUTO_SYNC_DEBOUNCE_MS, xe as COLUMN_FIELD_TYPE_OPTIONS, nf as CodeEditor, uy as CustomFunctionTable, he as CustomKind, ye as DECISION_GRAPH_CONTENT_TYPE, _y as DecisionGraph, Cm as DecisionTable, hc as DictionaryProvider, rm as DiffAutosizeTextArea, nm as DiffCodeEditor, cm as DiffIcon, em as DiffInput, Zp as DiffRadio, tm as DiffSelect, $p as DiffSwitch, Cg as Expression, Lf as ExpressionBuilder, ib as FixturesPanel, wb as Function, Gh as GraphDecisionNode, Jh as GraphNode, Jy as GraphSimulator, s as I18nProvider, p as INPUT_CONTRACT_VERSION, ly as InstanceEditor, gc as JdmConfigProvider, qs as MODE_EXTRAS, Wh as NodeColor, ue as NodeKind, Zm as NodeTypeKind, M as OUTPUT_FIELD_TYPE_OPTIONS, Fy as SimulatorEditor, u_ as TabRequest, py as ToolbarAnchor, $f as TypedInput, Dh as addStrikethrough, ge as anyNodeSchema, f as applySchemaTextToInputContract, Oh as buildDiffString, b as buildRequestExampleTemplateFromDefinitions, D as buildRequestSchemaFromDefinitions, C_ as calculateDiffGraph, dy as clusterToolbarItems, pd as codemirror, Qf as coerceToTypedValue, be as columnEnumSchema, N as columnFieldTypeSchema, Ah as compareAndUnifyLists, kh as compareStringFields, C as computeExampleDrift, nb as computeGraphDiff, fe as contractExamplesToSources, vy as createJdmNode, a as createT, pe as customNodeSchema, Ys as darkTokens, Se as decisionModelSchema, ae as decisionNodeSchema, se as decisionTableSchema, wh as definePack, _e as edgeSchema, Ns as ensureWasmLoaded, me as expressionNodeSchema, le as functionNodeSchema, d as getRequestDefinitions, g as getRequestExampleSources, y as getRequestSchemaSourceValue, de as hasExampleDrift, ce as inputNodeSchema, ob as jsonSchemaToVariableType, Js as lightTokens, x as migrateRequestExampleDataByDefinitions, j as nodeSchema, N_ as nodeSpecification, we as normalizeRequestDefinitionOrders, ne as normalizeRequestFieldKey, re as normalizeRequestJsonKeys, Ce as outputFieldTypeSchema, Ee as outputNodeSchema, T_ as processEdges, w_ as processNodes, w as readRequestInputContract, m as requestSchemaFingerprint, Ch as resolveCustomNode, v as resolveRequestSchemaValue, ld as setUdfCompletions, A as stringifyRequestSchemaValue, ie as switchNodeSchema, h as updateRequestSchemaExamples, nh as useDecisionGraphActions, eh as useDecisionGraphListeners, rh as useDecisionGraphRaw, th as useDecisionGraphReferences, $ as useDecisionGraphState, mc as useDictionaries, ah as useEdgeDiff, uh as useGraphSerializer, ih as useNodeDiff, Eh as useNodeType, Rh as usePersistentState, Uy as useSimulatorAutoSync, o as useT, dh as useTabSerializer, fc as useThemeMode, Ps as useWasmReady, Te as validationSchema, _ as writeRequestInputContract };
20614
20659
 
20615
20660
  //# sourceMappingURL=index.js.map