@ixo/editor 6.30.0 → 6.30.1

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.
@@ -23827,7 +23827,7 @@ var ActionTemplateView = ({ editor, block }) => {
23827
23827
  };
23828
23828
 
23829
23829
  // src/mantine/blocks/action/flow/FlowView.tsx
23830
- import React246, { useCallback as useCallback74, useMemo as useMemo94, useRef as useRef23, useState as useState98 } from "react";
23830
+ import React246, { useCallback as useCallback74, useMemo as useMemo95, useRef as useRef23, useState as useState98 } from "react";
23831
23831
  import { Group as Group91, Stack as Stack160, Text as Text140, Code as Code9, Box as Box49, Divider as Divider20, Button as Button43, Loader as Loader33 } from "@mantine/core";
23832
23832
  import { IconAlertTriangle as IconAlertTriangle4, IconUser as IconUser13, IconBolt as IconBolt10, IconShieldCheck as IconShieldCheck13, IconPlayerPlay as IconPlayerPlay2 } from "@tabler/icons-react";
23833
23833
 
@@ -23929,9 +23929,9 @@ var actionAlertStyles = {
23929
23929
  };
23930
23930
 
23931
23931
  // src/mantine/blocks/action/diff/ActionDiffView.tsx
23932
- import React242, { useState as useState94 } from "react";
23933
- import { Stack as Stack157, Text as Text136, Alert as Alert31, Badge as Badge42, Group as Group88, Box as Box47, Collapse as Collapse7, Flex as Flex34, Center as Center12 } from "@mantine/core";
23934
- import { IconAlertTriangle as IconAlertTriangle3, IconFile as IconFile4, IconFileCheck, IconChevronDown as IconChevronDown7, IconArrowDown as IconArrowDown4 } from "@tabler/icons-react";
23932
+ import React242, { useMemo as useMemo90, useState as useState94 } from "react";
23933
+ import { Accordion as Accordion6, Alert as Alert31, Badge as Badge42, Box as Box47, Flex as Flex34, Group as Group88, Paper as Paper17, ScrollArea as ScrollArea8, SegmentedControl as SegmentedControl6, Stack as Stack157, Text as Text136 } from "@mantine/core";
23934
+ import { IconAlertTriangle as IconAlertTriangle3, IconArrowRight as IconArrowRight3, IconEyeCheck, IconFileDescription as IconFileDescription5 } from "@tabler/icons-react";
23935
23935
 
23936
23936
  // src/mantine/blocks/action/diff/formatters.ts
23937
23937
  function formatDiffValue(value, unit) {
@@ -23942,145 +23942,169 @@ function formatDiffValue(value, unit) {
23942
23942
  }
23943
23943
 
23944
23944
  // src/mantine/blocks/action/diff/ActionDiffView.tsx
23945
- var COLLAPSED_ROWS = 2;
23946
- function DiffFieldRow({ label, value, highlight }) {
23947
- return /* @__PURE__ */ React242.createElement(React242.Fragment, null, /* @__PURE__ */ React242.createElement(Group88, { wrap: "nowrap", gap: 0, style: { width: "100%" } }, /* @__PURE__ */ React242.createElement(
23948
- Box47,
23949
- {
23950
- style: {
23951
- width: 150,
23952
- flexShrink: 0,
23953
- padding: "8px 4px"
23954
- }
23955
- },
23956
- /* @__PURE__ */ React242.createElement(Text136, { size: "sm", fw: 500, lts: "0.14px", truncate: true }, label)
23957
- ), /* @__PURE__ */ React242.createElement(
23958
- Box47,
23959
- {
23960
- style: {
23961
- flex: 1,
23962
- minWidth: 0,
23963
- padding: "8px 4px",
23964
- borderRadius: highlight ? 4 : 0,
23965
- background: highlight ? "rgba(46, 225, 174, 0.1)" : void 0
23966
- }
23967
- },
23968
- /* @__PURE__ */ React242.createElement(Text136, { size: "sm", fw: 500, c: value === "\u2014" ? "neutralColor.8" : void 0, lts: "0.14px", truncate: true }, value)
23969
- )), /* @__PURE__ */ React242.createElement(Box47, { style: { height: 1, background: "var(--mantine-color-neutralColor-5)" } }));
23945
+ var toneStyles = {
23946
+ added: {
23947
+ label: "Added",
23948
+ badgeColor: "green",
23949
+ color: "var(--mantine-color-green-7)",
23950
+ bg: "color-mix(in srgb, var(--mantine-color-green-5) 12%, transparent)",
23951
+ border: "color-mix(in srgb, var(--mantine-color-green-5) 34%, transparent)"
23952
+ },
23953
+ removed: {
23954
+ label: "Removed",
23955
+ badgeColor: "red",
23956
+ color: "var(--mantine-color-red-7)",
23957
+ bg: "color-mix(in srgb, var(--mantine-color-red-5) 10%, transparent)",
23958
+ border: "color-mix(in srgb, var(--mantine-color-red-5) 34%, transparent)",
23959
+ textDecoration: "line-through"
23960
+ },
23961
+ current: {
23962
+ label: "Current",
23963
+ badgeColor: "gray",
23964
+ color: "var(--mantine-color-neutralColor-8)",
23965
+ bg: "color-mix(in srgb, var(--mantine-color-text) 4%, transparent)",
23966
+ border: "var(--mantine-color-neutralColor-5)"
23967
+ },
23968
+ neutral: {
23969
+ label: "Details",
23970
+ badgeColor: "gray",
23971
+ color: "var(--mantine-color-neutralColor-8)",
23972
+ bg: "var(--mantine-color-neutralColor-2)",
23973
+ border: "var(--mantine-color-neutralColor-5)"
23974
+ }
23975
+ };
23976
+ var changeTypeLabels = {
23977
+ add: "Added",
23978
+ remove: "Removed",
23979
+ replace: "Changed",
23980
+ increase: "Increased",
23981
+ decrease: "Decreased",
23982
+ unchanged: "Unchanged"
23983
+ };
23984
+ function getChangeTone(changeType) {
23985
+ if (changeType === "add" || changeType === "increase") return "added";
23986
+ if (changeType === "remove" || changeType === "decrease") return "removed";
23987
+ return "neutral";
23970
23988
  }
23971
- function DiffSection({
23972
- title,
23973
- icon: icon2,
23974
- titleColor,
23975
- changeCount,
23976
- rows,
23977
- defaultOpen = false
23978
- }) {
23979
- const collapsible = rows.length > COLLAPSED_ROWS;
23980
- const [opened, setOpened] = useState94(collapsible ? defaultOpen : true);
23989
+ function getChangeBadgeColor(changeType) {
23990
+ const tone = getChangeTone(changeType);
23991
+ if (tone === "added") return "green";
23992
+ if (tone === "removed") return "red";
23993
+ return changeType === "unchanged" ? "gray" : "accent";
23994
+ }
23995
+ function getChangeCountLabel(count) {
23996
+ return `${count} ${count === 1 ? "change" : "changes"}`;
23997
+ }
23998
+ function stringifyDetails(details) {
23999
+ if (!details) return [];
24000
+ if (Array.isArray(details)) return details.map((item) => String(item));
24001
+ if (typeof details === "string") return details ? [details] : [];
24002
+ return Object.entries(details).map(([key, value]) => {
24003
+ const rendered = typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value);
24004
+ return `${key}: ${rendered}`;
24005
+ });
24006
+ }
24007
+ function buildSummary(diff) {
24008
+ if (diff.description) return diff.description;
24009
+ const before = formatDiffValue(diff.before, diff.unit);
24010
+ const after = formatDiffValue(diff.after, diff.unit);
24011
+ if (diff.changeType === "add") return after;
24012
+ if (diff.changeType === "remove") return before;
24013
+ if (diff.changeType === "unchanged") return "No visible change";
24014
+ return `${before} \u2192 ${after}`;
24015
+ }
24016
+ function ReviewValueBlock({ label, value, tone }) {
24017
+ const styles = toneStyles[tone];
23981
24018
  return /* @__PURE__ */ React242.createElement(
23982
24019
  Box47,
23983
24020
  {
23984
- p: 12,
23985
- style: { background: "color-mix(in srgb, var(--mantine-color-text) 2%, transparent)", borderRadius: 16, cursor: collapsible ? "pointer" : void 0 },
23986
- onClick: collapsible ? () => setOpened((o) => !o) : void 0
24021
+ p: "xs",
24022
+ style: {
24023
+ border: `1px solid ${styles.border}`,
24024
+ borderRadius: 8,
24025
+ background: styles.bg,
24026
+ minWidth: 0
24027
+ }
23987
24028
  },
23988
- /* @__PURE__ */ React242.createElement(Group88, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React242.createElement(Group88, { gap: 8, wrap: "nowrap", align: "center" }, icon2, /* @__PURE__ */ React242.createElement(Text136, { size: "sm", fw: 500, c: titleColor, style: { letterSpacing: "0.14px" } }, title), changeCount !== void 0 && changeCount > 0 && /* @__PURE__ */ React242.createElement(
23989
- Badge42,
24029
+ /* @__PURE__ */ React242.createElement(Group88, { gap: 6, mb: 6 }, /* @__PURE__ */ React242.createElement(Badge42, { size: "xs", variant: "light", color: styles.badgeColor, tt: "none" }, styles.label), /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed", fw: 500 }, label)),
24030
+ /* @__PURE__ */ React242.createElement(
24031
+ Text136,
23990
24032
  {
23991
24033
  size: "sm",
23992
- variant: "light",
23993
- h: 20,
23994
- tt: "none",
23995
- fw: 400,
23996
- fz: 12,
23997
- lts: "0.12px",
23998
- styles: { root: { background: "rgba(46, 225, 174, 0.2)", color: "var(--mantine-color-accent-5)", borderRadius: 16 } }
23999
- },
24000
- changeCount,
24001
- " ",
24002
- changeCount === 1 ? "change" : "changes"
24003
- )), collapsible && /* @__PURE__ */ React242.createElement(Center12, { p: 7, style: { background: "color-mix(in srgb, var(--mantine-color-text) 4%, transparent)", borderRadius: 8, padding: 7 } }, /* @__PURE__ */ React242.createElement(
24004
- IconChevronDown7,
24005
- {
24006
- size: 16,
24007
- color: ICON_COLOR,
24034
+ lh: 1.55,
24008
24035
  style: {
24009
- transition: "transform 200ms ease",
24010
- transform: opened ? "rotate(180deg)" : "rotate(0deg)"
24011
- }
24012
- }
24013
- ))),
24014
- collapsible ? /* @__PURE__ */ React242.createElement(React242.Fragment, null, /* @__PURE__ */ React242.createElement(
24015
- Box47,
24016
- {
24017
- style: {
24018
- position: "relative",
24019
- overflow: "hidden",
24020
- maxHeight: opened ? 0 : 82,
24021
- marginTop: opened ? 0 : 16,
24022
- opacity: opened ? 0 : 1,
24023
- transition: "max-height 200ms ease, margin-top 200ms ease, opacity 150ms ease"
24036
+ color: styles.color,
24037
+ textDecoration: styles.textDecoration,
24038
+ whiteSpace: "pre-wrap",
24039
+ wordBreak: "break-word"
24024
24040
  }
24025
24041
  },
24026
- /* @__PURE__ */ React242.createElement(Stack157, { gap: 0 }, rows.slice(0, COLLAPSED_ROWS).map((row, i) => /* @__PURE__ */ React242.createElement(DiffFieldRow, { key: i, label: row.label, value: row.value, highlight: row.highlight }))),
24027
- /* @__PURE__ */ React242.createElement(
24028
- Box47,
24029
- {
24030
- style: {
24031
- position: "absolute",
24032
- bottom: 0,
24033
- left: 0,
24034
- right: 0,
24035
- height: 56,
24036
- background: "linear-gradient(to bottom, transparent, var(--mantine-color-neutralColor-5))",
24037
- pointerEvents: "none"
24038
- }
24039
- }
24040
- )
24041
- ), /* @__PURE__ */ React242.createElement(
24042
- Box47,
24043
- {
24044
- style: {
24045
- maxHeight: opened ? 0 : 24,
24046
- opacity: opened ? 0 : 1,
24047
- overflow: "hidden",
24048
- marginTop: opened ? 0 : 4,
24049
- transition: "max-height 200ms ease, margin-top 200ms ease, opacity 150ms ease"
24050
- }
24051
- },
24052
- /* @__PURE__ */ React242.createElement(Text136, { size: "xs", fw: 500, c: "neutralColor.8", lts: "0.12px" }, "Show ", rows.length, " fields")
24053
- ), /* @__PURE__ */ React242.createElement(Collapse7, { in: opened }, /* @__PURE__ */ React242.createElement(Stack157, { gap: 0, mt: 16 }, rows.map((row, i) => /* @__PURE__ */ React242.createElement(DiffFieldRow, { key: i, label: row.label, value: row.value, highlight: row.highlight }))))) : /* @__PURE__ */ React242.createElement(Stack157, { gap: 0, mt: 16 }, rows.map((row, i) => /* @__PURE__ */ React242.createElement(DiffFieldRow, { key: i, label: row.label, value: row.value, highlight: row.highlight })))
24042
+ value
24043
+ )
24054
24044
  );
24055
24045
  }
24046
+ function ChangeSummaryLine({ diff }) {
24047
+ return /* @__PURE__ */ React242.createElement(Flex34, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React242.createElement(Badge42, { size: "xs", variant: "light", color: getChangeBadgeColor(diff.changeType), tt: "none", miw: 78 }, changeTypeLabels[diff.changeType]), /* @__PURE__ */ React242.createElement(Box47, { flex: 1, miw: 0 }, /* @__PURE__ */ React242.createElement(Text136, { size: "sm", fw: 500, lineClamp: 1 }, diff.label), /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed", lineClamp: 2, lh: 1.45 }, buildSummary(diff))));
24048
+ }
24049
+ function ChangeDetail({ diff }) {
24050
+ const before = formatDiffValue(diff.before, diff.unit);
24051
+ const after = formatDiffValue(diff.after, diff.unit);
24052
+ const showBefore = diff.changeType !== "add" && before !== after;
24053
+ const showAfter = diff.changeType !== "remove";
24054
+ const details = stringifyDetails(diff.details);
24055
+ return /* @__PURE__ */ React242.createElement(Stack157, { gap: "xs" }, diff.description && /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed", lh: 1.5 }, diff.description), showBefore && /* @__PURE__ */ React242.createElement(ReviewValueBlock, { label: diff.label, value: before, tone: diff.changeType === "unchanged" ? "current" : "removed" }), showBefore && showAfter && /* @__PURE__ */ React242.createElement(Flex34, { justify: "center", "aria-hidden": "true" }, icon(IconArrowRight3, 14, "var(--mantine-color-neutralColor-7)")), showAfter && /* @__PURE__ */ React242.createElement(ReviewValueBlock, { label: diff.label, value: after, tone: diff.changeType === "unchanged" ? "current" : "added" }), details.length > 0 && /* @__PURE__ */ React242.createElement(Stack157, { gap: 4 }, details.map((line, index) => /* @__PURE__ */ React242.createElement(Text136, { key: `${index}-${line}`, size: "xs", c: "dimmed", style: { wordBreak: "break-word" } }, line))));
24056
+ }
24057
+ function DetailsPanel({ diffs }) {
24058
+ return /* @__PURE__ */ React242.createElement(Stack157, { gap: "xs" }, diffs.map((diff) => /* @__PURE__ */ React242.createElement(
24059
+ Paper17,
24060
+ {
24061
+ key: diff.key,
24062
+ p: "xs",
24063
+ radius: "sm",
24064
+ style: {
24065
+ background: "var(--mantine-color-neutralColor-2)",
24066
+ border: "1px solid var(--mantine-color-neutralColor-5)"
24067
+ }
24068
+ },
24069
+ /* @__PURE__ */ React242.createElement(Group88, { justify: "space-between", align: "flex-start", gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React242.createElement(Box47, { miw: 0 }, /* @__PURE__ */ React242.createElement(Text136, { size: "xs", fw: 600, lineClamp: 1 }, diff.label), /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed", style: { wordBreak: "break-word" } }, formatDiffValue(diff.before, diff.unit), " \u2192 ", formatDiffValue(diff.after, diff.unit))), /* @__PURE__ */ React242.createElement(Badge42, { size: "xs", variant: "light", color: getChangeBadgeColor(diff.changeType), tt: "none" }, changeTypeLabels[diff.changeType])),
24070
+ stringifyDetails(diff.details).map((line, index) => /* @__PURE__ */ React242.createElement(Text136, { key: `${index}-${line}`, size: "xs", c: "dimmed", mt: 4, style: { wordBreak: "break-word" } }, line))
24071
+ )));
24072
+ }
24056
24073
  function ActionDiffView({ diffs, error, refetch: _refetch, onSign, signDisabled }) {
24074
+ const [activeTab, setActiveTab] = useState94("summary");
24075
+ const changedDiffs = useMemo90(() => diffs.filter((diff) => diff.changeType !== "unchanged"), [diffs]);
24076
+ const reviewDiffs = changedDiffs.length > 0 ? changedDiffs : diffs;
24077
+ const firstChangeId = reviewDiffs[0]?.key;
24057
24078
  if (error) {
24058
24079
  return /* @__PURE__ */ React242.createElement(Alert31, { icon: icon(IconAlertTriangle3), title: "Preview Error", color: "red", variant: "light" }, /* @__PURE__ */ React242.createElement(Text136, { size: "xs" }, error));
24059
24080
  }
24060
24081
  if (diffs.length === 0) {
24061
24082
  return /* @__PURE__ */ React242.createElement(Text136, { size: "sm", c: "dimmed", py: "md" }, "No changes to preview.");
24062
24083
  }
24063
- const changedDiffs = diffs.filter((d) => d.changeType !== "unchanged");
24064
- const currentRows = diffs.map((d) => ({
24065
- label: d.label,
24066
- value: formatDiffValue(d.before, d.unit)
24067
- }));
24068
- const updateRows = diffs.map((d) => ({
24069
- label: d.label,
24070
- value: formatDiffValue(d.after, d.unit),
24071
- highlight: d.changeType !== "unchanged"
24072
- }));
24073
- return /* @__PURE__ */ React242.createElement(Stack157, { gap: 8, py: "md" }, /* @__PURE__ */ React242.createElement(DiffSection, { title: "Current State", icon: icon(IconFile4), rows: currentRows, defaultOpen: false }), /* @__PURE__ */ React242.createElement(Flex34, { justify: "center" }, /* @__PURE__ */ React242.createElement(IconArrowDown4, { size: 16, color: ICON_COLOR })), /* @__PURE__ */ React242.createElement(
24074
- DiffSection,
24084
+ return /* @__PURE__ */ React242.createElement(Stack157, { gap: "sm", py: "md" }, /* @__PURE__ */ React242.createElement(
24085
+ Paper17,
24075
24086
  {
24076
- title: "Update",
24077
- icon: icon(IconFileCheck, 16, "var(--mantine-color-accent-5)"),
24078
- titleColor: "var(--mantine-color-accent-5)",
24079
- changeCount: changedDiffs.length,
24080
- rows: updateRows,
24081
- defaultOpen: true
24082
- }
24083
- ), onSign && !signDisabled && /* @__PURE__ */ React242.createElement(SlideToSign, { onSign, label: "Slide to Execute" }));
24087
+ p: "sm",
24088
+ radius: "sm",
24089
+ style: {
24090
+ background: "color-mix(in srgb, var(--mantine-color-text) 2%, transparent)",
24091
+ border: "1px solid var(--mantine-color-neutralColor-5)"
24092
+ }
24093
+ },
24094
+ /* @__PURE__ */ React242.createElement(Stack157, { gap: "sm" }, /* @__PURE__ */ React242.createElement(Group88, { justify: "space-between", align: "flex-start", gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React242.createElement(Group88, { gap: "xs", wrap: "nowrap", align: "flex-start", miw: 0 }, /* @__PURE__ */ React242.createElement(Box47, { mt: 2 }, icon(IconFileDescription5, 16, "var(--mantine-color-accent-5)")), /* @__PURE__ */ React242.createElement(Box47, { miw: 0 }, /* @__PURE__ */ React242.createElement(Text136, { size: "sm", fw: 600, lineClamp: 1 }, "Action review"), /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed", lineClamp: 2 }, "Review the proposed change before signing."))), /* @__PURE__ */ React242.createElement(Badge42, { variant: "light", color: changedDiffs.length > 0 ? "accent" : "gray", tt: "none" }, getChangeCountLabel(changedDiffs.length))), /* @__PURE__ */ React242.createElement(
24095
+ SegmentedControl6,
24096
+ {
24097
+ value: activeTab,
24098
+ onChange: (value) => setActiveTab(value),
24099
+ fullWidth: true,
24100
+ data: [
24101
+ { label: "Summary", value: "summary" },
24102
+ { label: "Changes", value: "changes" },
24103
+ { label: "Details", value: "details" }
24104
+ ]
24105
+ }
24106
+ ), /* @__PURE__ */ React242.createElement(ScrollArea8.Autosize, { mah: 360, scrollbarSize: 4 }, activeTab === "summary" && /* @__PURE__ */ React242.createElement(Stack157, { gap: "xs" }, /* @__PURE__ */ React242.createElement(Group88, { gap: "xs" }, icon(IconEyeCheck, 16, "var(--mantine-color-accent-5)"), /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed" }, changedDiffs.length > 0 ? "Proposed changes" : "No visible changes")), reviewDiffs.slice(0, 3).map((diff) => /* @__PURE__ */ React242.createElement(ChangeSummaryLine, { key: diff.key, diff })), reviewDiffs.length > 3 && /* @__PURE__ */ React242.createElement(Text136, { size: "xs", c: "dimmed" }, reviewDiffs.length - 3, " more ", reviewDiffs.length - 3 === 1 ? "change" : "changes", " in the Changes tab.")), activeTab === "changes" && /* @__PURE__ */ React242.createElement(Accordion6, { variant: "separated", radius: "sm", defaultValue: firstChangeId }, reviewDiffs.map((diff) => /* @__PURE__ */ React242.createElement(Accordion6.Item, { key: diff.key, value: diff.key }, /* @__PURE__ */ React242.createElement(Accordion6.Control, null, /* @__PURE__ */ React242.createElement(Group88, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React242.createElement(Badge42, { size: "xs", variant: "light", color: getChangeBadgeColor(diff.changeType), tt: "none" }, changeTypeLabels[diff.changeType]), /* @__PURE__ */ React242.createElement(Text136, { size: "sm", fw: 500, lineClamp: 1 }, diff.label))), /* @__PURE__ */ React242.createElement(Accordion6.Panel, null, /* @__PURE__ */ React242.createElement(ChangeDetail, { diff }))))), activeTab === "details" && /* @__PURE__ */ React242.createElement(DetailsPanel, { diffs })))
24107
+ ), onSign && /* @__PURE__ */ React242.createElement(SlideToSign, { onSign, label: "Slide to Execute", disabled: signDisabled }));
24084
24108
  }
24085
24109
 
24086
24110
  // src/mantine/blocks/action/diff/DefaultNarrative.tsx
@@ -24088,14 +24112,14 @@ import React243 from "react";
24088
24112
  import { Text as Text137 } from "@mantine/core";
24089
24113
 
24090
24114
  // src/mantine/blocks/action/diff/useActionDiff.ts
24091
- import { useState as useState95, useEffect as useEffect78, useCallback as useCallback71, useMemo as useMemo90 } from "react";
24115
+ import { useState as useState95, useEffect as useEffect78, useCallback as useCallback71, useMemo as useMemo91 } from "react";
24092
24116
  function useActionDiff({ actionType, inputs, actorDid = "", entityDid }) {
24093
24117
  const [diffs, setDiffs] = useState95([]);
24094
24118
  const [error, setError] = useState95();
24095
24119
  const [fetchKey, setFetchKey] = useState95(0);
24096
24120
  const handlers = useBlocknoteHandlers();
24097
24121
  const hasResolver = hasDiffResolver(actionType);
24098
- const parsedInputs = useMemo90(() => {
24122
+ const parsedInputs = useMemo91(() => {
24099
24123
  if (!inputs) return {};
24100
24124
  if (typeof inputs === "object") return inputs;
24101
24125
  try {
@@ -24136,8 +24160,8 @@ function useActionDiff({ actionType, inputs, actorDid = "", entityDid }) {
24136
24160
  }
24137
24161
 
24138
24162
  // src/mantine/blocks/action/PendingInvocationList.tsx
24139
- import React244, { useEffect as useEffect79, useState as useState96, useMemo as useMemo91, useCallback as useCallback72, useRef as useRef22 } from "react";
24140
- import { Stack as Stack158, Group as Group89, Text as Text138, Box as Box48, Badge as Badge43, Button as Button41, Paper as Paper17, ActionIcon as ActionIcon36, Tooltip as Tooltip25 } from "@mantine/core";
24163
+ import React244, { useEffect as useEffect79, useState as useState96, useMemo as useMemo92, useCallback as useCallback72, useRef as useRef22 } from "react";
24164
+ import { Stack as Stack158, Group as Group89, Text as Text138, Box as Box48, Badge as Badge43, Button as Button41, Paper as Paper18, ActionIcon as ActionIcon36, Tooltip as Tooltip25 } from "@mantine/core";
24141
24165
  import { IconBolt as IconBolt9, IconClock as IconClock12, IconRefresh as IconRefresh5, IconX as IconX13 } from "@tabler/icons-react";
24142
24166
  var PendingInvocationList = ({ editor, blockId, actionType: _actionType, onInvoke, autoResolve }) => {
24143
24167
  const yDoc = editor?._yDoc;
@@ -24178,7 +24202,7 @@ var PendingInvocationList = ({ editor, blockId, actionType: _actionType, onInvok
24178
24202
  return /* @__PURE__ */ React244.createElement(Stack158, { gap: "xs", mb: "sm" }, /* @__PURE__ */ React244.createElement(Group89, { gap: 6, align: "center" }, /* @__PURE__ */ React244.createElement(IconBolt9, { size: 14, color: "var(--mantine-color-accent-5, #2aeab3)" }), /* @__PURE__ */ React244.createElement(Text138, { size: "sm", fw: 600 }, "Pending invocations (", pendings.length, ")")), /* @__PURE__ */ React244.createElement(Stack158, { gap: 6 }, pendings.map((p) => /* @__PURE__ */ React244.createElement(PendingInvocationRow, { key: p.id, invocation: p, editor, onInvoke, onDismiss: () => handleDismiss(p.id) }))));
24179
24203
  };
24180
24204
  var WaitingForTrigger = ({ editor, blockId }) => {
24181
- const label = useMemo91(() => {
24205
+ const label = useMemo92(() => {
24182
24206
  const doc = editor?.document || [];
24183
24207
  const block = doc.find((b) => b?.id === blockId);
24184
24208
  const raw = block?.props?.trigger;
@@ -24200,15 +24224,15 @@ var WaitingForTrigger = ({ editor, blockId }) => {
24200
24224
  return `\u201C${eventLabel}\u201D from ${sourceTitle}`;
24201
24225
  }, [editor, blockId]);
24202
24226
  if (!label) return null;
24203
- return /* @__PURE__ */ React244.createElement(Paper17, { p: "xs", withBorder: true, mb: "sm" }, /* @__PURE__ */ React244.createElement(Group89, { gap: 8, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(IconClock12, { size: 16, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React244.createElement(Text138, { size: "sm", c: "dimmed" }, "Waiting for ", label, ". This block activates automatically when the event fires.")));
24227
+ return /* @__PURE__ */ React244.createElement(Paper18, { p: "xs", withBorder: true, mb: "sm" }, /* @__PURE__ */ React244.createElement(Group89, { gap: 8, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(IconClock12, { size: 16, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React244.createElement(Text138, { size: "sm", c: "dimmed" }, "Waiting for ", label, ". This block activates automatically when the event fires.")));
24204
24228
  };
24205
24229
  var PendingInvocationRow = ({ invocation, editor, onInvoke, onDismiss }) => {
24206
- const previewLabel = useMemo91(() => buildPreview(editor, invocation), [editor, invocation]);
24207
- const isExpired = useMemo91(() => {
24230
+ const previewLabel = useMemo92(() => buildPreview(editor, invocation), [editor, invocation]);
24231
+ const isExpired = useMemo92(() => {
24208
24232
  if (!invocation.expiresAt) return false;
24209
24233
  return new Date(invocation.expiresAt).getTime() < Date.now();
24210
24234
  }, [invocation.expiresAt]);
24211
- return /* @__PURE__ */ React244.createElement(Paper17, { p: "xs", withBorder: true }, /* @__PURE__ */ React244.createElement(Group89, { justify: "space-between", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(Box48, { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(Group89, { gap: 6, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(Badge43, { size: "xs", variant: "light", color: isExpired ? "red" : "teal" }, invocation.eventName), /* @__PURE__ */ React244.createElement(Text138, { size: "xs", c: "dimmed", truncate: true }, "from ", invocation.triggeringBlockId)), /* @__PURE__ */ React244.createElement(Text138, { size: "sm", fw: 500, mt: 2, truncate: true }, previewLabel), /* @__PURE__ */ React244.createElement(Text138, { size: "xs", c: "dimmed", mt: 2 }, formatTimestamp2(invocation.emittedAt), isExpired && " \xB7 expired")), /* @__PURE__ */ React244.createElement(Group89, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(Tooltip25, { label: "Invoke this listener", withArrow: true }, /* @__PURE__ */ React244.createElement(Button41, { size: "xs", variant: "filled", leftSection: /* @__PURE__ */ React244.createElement(IconRefresh5, { size: 12 }), onClick: () => onInvoke?.(invocation), disabled: isExpired || !onInvoke }, "Invoke")), /* @__PURE__ */ React244.createElement(Tooltip25, { label: "Dismiss without invoking", withArrow: true }, /* @__PURE__ */ React244.createElement(ActionIcon36, { variant: "subtle", color: "gray", onClick: onDismiss, "aria-label": "Dismiss" }, /* @__PURE__ */ React244.createElement(IconX13, { size: 14 }))))));
24235
+ return /* @__PURE__ */ React244.createElement(Paper18, { p: "xs", withBorder: true }, /* @__PURE__ */ React244.createElement(Group89, { justify: "space-between", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(Box48, { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(Group89, { gap: 6, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(Badge43, { size: "xs", variant: "light", color: isExpired ? "red" : "teal" }, invocation.eventName), /* @__PURE__ */ React244.createElement(Text138, { size: "xs", c: "dimmed", truncate: true }, "from ", invocation.triggeringBlockId)), /* @__PURE__ */ React244.createElement(Text138, { size: "sm", fw: 500, mt: 2, truncate: true }, previewLabel), /* @__PURE__ */ React244.createElement(Text138, { size: "xs", c: "dimmed", mt: 2 }, formatTimestamp2(invocation.emittedAt), isExpired && " \xB7 expired")), /* @__PURE__ */ React244.createElement(Group89, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React244.createElement(Tooltip25, { label: "Invoke this listener", withArrow: true }, /* @__PURE__ */ React244.createElement(Button41, { size: "xs", variant: "filled", leftSection: /* @__PURE__ */ React244.createElement(IconRefresh5, { size: 12 }), onClick: () => onInvoke?.(invocation), disabled: isExpired || !onInvoke }, "Invoke")), /* @__PURE__ */ React244.createElement(Tooltip25, { label: "Dismiss without invoking", withArrow: true }, /* @__PURE__ */ React244.createElement(ActionIcon36, { variant: "subtle", color: "gray", onClick: onDismiss, "aria-label": "Dismiss" }, /* @__PURE__ */ React244.createElement(IconX13, { size: 14 }))))));
24212
24236
  };
24213
24237
  function buildPreview(editor, invocation) {
24214
24238
  const sourceBlock = (editor?.document || []).find((b) => b?.id === invocation.triggeringBlockId);
@@ -24248,7 +24272,7 @@ function formatTimestamp2(iso) {
24248
24272
  }
24249
24273
 
24250
24274
  // src/mantine/blocks/action/useExecuteActionBlock.ts
24251
- import { useCallback as useCallback73, useMemo as useMemo92, useState as useState97 } from "react";
24275
+ import { useCallback as useCallback73, useMemo as useMemo93, useState as useState97 } from "react";
24252
24276
  function getActorDid(handlers) {
24253
24277
  try {
24254
24278
  const currentUser = handlers?.getCurrentUser?.();
@@ -24345,7 +24369,7 @@ function useExecuteActionBlock({ editor, block }) {
24345
24369
  const sessionRunId = useRunSessionId();
24346
24370
  const sessionPreview = useRunSessionPreview();
24347
24371
  const runEventLog = useRunEventLog();
24348
- const services = useMemo92(() => buildServicesFromHandlers(handlers), [handlers]);
24372
+ const services = useMemo93(() => buildServicesFromHandlers(handlers), [handlers]);
24349
24373
  const [isExecuting, setIsExecuting] = useState97(false);
24350
24374
  const [error, setError] = useState97(null);
24351
24375
  const [result, setResult] = useState97(null);
@@ -24418,14 +24442,14 @@ function useExecuteActionBlock({ editor, block }) {
24418
24442
  }
24419
24443
 
24420
24444
  // src/mantine/blocks/action/flow/NeedsVerificationAlert.tsx
24421
- import React245, { useMemo as useMemo93 } from "react";
24445
+ import React245, { useMemo as useMemo94 } from "react";
24422
24446
  import { Button as Button42, Code as Code8, Group as Group90, Stack as Stack159, Text as Text139 } from "@mantine/core";
24423
24447
  import { IconHelpHexagon } from "@tabler/icons-react";
24424
24448
  function NeedsVerificationAlert({ editor, block }) {
24425
24449
  const t = useTranslate();
24426
24450
  const handlers = useBlocknoteHandlers();
24427
24451
  const [runtime, updateRuntime] = useNodeRuntime(editor, block.id);
24428
- const payloadJson = useMemo93(() => {
24452
+ const payloadJson = useMemo94(() => {
24429
24453
  if (!runtime.output || Object.keys(runtime.output).length === 0) return "";
24430
24454
  try {
24431
24455
  return JSON.stringify(runtime.output, null, 2);
@@ -24528,7 +24552,7 @@ var ActionFlowView = ({ editor, block, isDisabled }) => {
24528
24552
  const panelId = `action-flow-panel-${block.id}`;
24529
24553
  const { closePanel, activePanel } = usePanelStore();
24530
24554
  const actionType = block.props.actionType || "";
24531
- const completionVerification = useMemo94(
24555
+ const completionVerification = useMemo95(
24532
24556
  () => verifyCompletion({
24533
24557
  runtime,
24534
24558
  blockId: block.id,
@@ -24538,7 +24562,7 @@ var ActionFlowView = ({ editor, block, isDisabled }) => {
24538
24562
  }),
24539
24563
  [runtime, block.id, actionType, editor]
24540
24564
  );
24541
- const derivedState = useMemo94(() => {
24565
+ const derivedState = useMemo95(() => {
24542
24566
  const yDoc = editor?._yDoc;
24543
24567
  return deriveBlockPhase({
24544
24568
  runtime,
@@ -24552,13 +24576,13 @@ var ActionFlowView = ({ editor, block, isDisabled }) => {
24552
24576
  const oracleActivityLabel = sessionPreview ? null : getOracleActivityLabel(oracleActivityKind, t);
24553
24577
  const statusLabel = getStatusLabel4(derivedState, t);
24554
24578
  const statusColor3 = getStatusColor4(derivedState);
24555
- const configIssues = useMemo94(() => validateBlockConfig(block), [block?.props?.inputs, block?.props?.trigger, block?.props?.assignment, block?.props?.conditions]);
24579
+ const configIssues = useMemo95(() => validateBlockConfig(block), [block?.props?.inputs, block?.props?.trigger, block?.props?.assignment, block?.props?.conditions]);
24556
24580
  const dueDate = block.props.ttlAbsoluteDueDate;
24557
24581
  const dueDateDisplay = dueDate ? formatDate(dueDate) : "";
24558
- const panelContent = useMemo94(() => /* @__PURE__ */ React246.createElement(ActionFlowPanel, { editor, block, isDisabled }), [editor, block, isDisabled]);
24582
+ const panelContent = useMemo95(() => /* @__PURE__ */ React246.createElement(ActionFlowPanel, { editor, block, isDisabled }), [editor, block, isDisabled]);
24559
24583
  const { open } = usePanel(panelId, panelContent);
24560
24584
  const commitmentPanelId = `action-flow-commitment-${block.id}`;
24561
- const commitmentPanelContent = useMemo94(
24585
+ const commitmentPanelContent = useMemo95(
24562
24586
  () => /* @__PURE__ */ React246.createElement(BaseRightPanelLayout, { onClose: closePanel, title: t("actionBlock.panels.commitmentTab", { defaultValue: "Commitment Tab" }) }, /* @__PURE__ */ React246.createElement(CommitmentTab, { editor, block })),
24563
24587
  [editor, block, closePanel]
24564
24588
  );
@@ -24607,7 +24631,7 @@ function ActionFlowPanel({ editor, block, isDisabled }) {
24607
24631
  const actionType = block.props.actionType || "";
24608
24632
  const actionTypeUI = actionType ? getActionTypeUI(actionType) : void 0;
24609
24633
  const FlowDetailComponent = actionTypeUI?.flowDetailComponent;
24610
- const tabs = useMemo94(() => {
24634
+ const tabs = useMemo95(() => {
24611
24635
  const baseTabs = [
24612
24636
  {
24613
24637
  label: t("actionBlock.tabs.execute", { defaultValue: "Execute" }),
@@ -24705,7 +24729,7 @@ function ActionPanelContent({
24705
24729
  }
24706
24730
  return block.props.triggerMode || "manual";
24707
24731
  })();
24708
- const resolvedPreviewInputs = useMemo94(() => {
24732
+ const resolvedPreviewInputs = useMemo95(() => {
24709
24733
  try {
24710
24734
  return buildActionRunInputs({
24711
24735
  editorOrYDoc: editor,
@@ -24821,14 +24845,14 @@ function GenericFlowPanel({
24821
24845
  }) {
24822
24846
  const t = useTranslate();
24823
24847
  const { executeAction, isExecuting, error: executionError } = useExecuteActionBlock({ editor, block });
24824
- const parsedInputs = useMemo94(() => {
24848
+ const parsedInputs = useMemo95(() => {
24825
24849
  try {
24826
24850
  return typeof inputs === "string" ? JSON.parse(inputs) : inputs || {};
24827
24851
  } catch {
24828
24852
  return {};
24829
24853
  }
24830
24854
  }, [inputs]);
24831
- const outputJson = useMemo94(() => {
24855
+ const outputJson = useMemo95(() => {
24832
24856
  if (!runtime.output) return "";
24833
24857
  try {
24834
24858
  return JSON.stringify(runtime.output, null, 2);
@@ -25343,8 +25367,8 @@ var MemberMultiSelectConfig = ({ inputs, onInputsChange }) => {
25343
25367
  };
25344
25368
 
25345
25369
  // src/mantine/blocks/action/actionTypes/pod/memberMultiSelect/MemberMultiSelectFlowDetail.tsx
25346
- import React254, { useCallback as useCallback82, useMemo as useMemo95, useRef as useRef25, useState as useState106 } from "react";
25347
- import { ActionIcon as ActionIcon38, Badge as Badge45, Button as Button47, Flex as Flex35, Group as Group95, Loader as Loader37, NumberInput as NumberInput3, Paper as Paper18, Select as Select6, Stack as Stack168, Switch as Switch6, Text as Text148, TextInput as TextInput7 } from "@mantine/core";
25370
+ import React254, { useCallback as useCallback82, useMemo as useMemo96, useRef as useRef25, useState as useState106 } from "react";
25371
+ import { ActionIcon as ActionIcon38, Badge as Badge45, Button as Button47, Flex as Flex35, Group as Group95, Loader as Loader37, NumberInput as NumberInput3, Paper as Paper19, Select as Select6, Stack as Stack168, Switch as Switch6, Text as Text148, TextInput as TextInput7 } from "@mantine/core";
25348
25372
  import { IconSearch as IconSearch8, IconAlertCircle as IconAlertCircle20, IconCheck as IconCheck16, IconX as IconX15 } from "@tabler/icons-react";
25349
25373
  function normalizeMember(m) {
25350
25374
  return {
@@ -25446,7 +25470,7 @@ var MemberSearch = ({ members, onAdd, isDisabled }) => {
25446
25470
  disabled: isDisabled,
25447
25471
  size: "sm"
25448
25472
  }
25449
- ), results.length > 0 && /* @__PURE__ */ React254.createElement(Paper18, { withBorder: true, style: { maxHeight: 200, overflowY: "auto", borderRadius: 8 } }, /* @__PURE__ */ React254.createElement(Stack168, { gap: 0 }, results.map((user) => {
25473
+ ), results.length > 0 && /* @__PURE__ */ React254.createElement(Paper19, { withBorder: true, style: { maxHeight: 200, overflowY: "auto", borderRadius: 8 } }, /* @__PURE__ */ React254.createElement(Stack168, { gap: 0 }, results.map((user) => {
25450
25474
  const already = members.some((m) => m.did === user.did);
25451
25475
  return /* @__PURE__ */ React254.createElement(
25452
25476
  Button47,
@@ -25472,7 +25496,7 @@ var MemberMultiSelectFlowDetail = ({ inputs, block, runtime, isDisabled, execute
25472
25496
  handlersRef.current = handlers;
25473
25497
  const parsed = parseJsonSafe(inputs, { groupType: "categorical" });
25474
25498
  const groupType = parsed.groupType || "categorical";
25475
- const creatorDid = useMemo95(() => {
25499
+ const creatorDid = useMemo96(() => {
25476
25500
  try {
25477
25501
  return handlers?.getCurrentUser?.()?.address || "";
25478
25502
  } catch {
@@ -25580,7 +25604,7 @@ var MemberMultiSelectFlowDetail = ({ inputs, block, runtime, isDisabled, execute
25580
25604
  }, [executeAction, groupType, members, multisigThreshold, nftContractAddress, isExistingToken, tokenAddress, tokenName, tokenSymbol, tokenSupply]);
25581
25605
  const renderCategorical = () => /* @__PURE__ */ React254.createElement(Stack168, { gap: "md" }, /* @__PURE__ */ React254.createElement(MemberSearch, { members, onAdd: handleAddMember, isDisabled }), members.length > 0 && /* @__PURE__ */ React254.createElement(Stack168, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Text148, { size: "xs", fw: 600, c: "dimmed" }, "MEMBERS (", members.length, ")"), members.map((m, i) => {
25582
25606
  const isCreator = m.did === creatorDid && i === 0;
25583
- return /* @__PURE__ */ React254.createElement(Paper18, { key: `${m.did}-${i}`, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React254.createElement(Group95, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React254.createElement(BaseAvatar, { src: m.avatarUrl, did: m.did, size: 32 }), /* @__PURE__ */ React254.createElement(Stack168, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React254.createElement(Text148, { size: "sm", fw: 500, lineClamp: 1 }, m.displayName, isCreator && /* @__PURE__ */ React254.createElement(Text148, { span: true, size: "xs", c: "dimmed", ml: 6 }, "(you)")), /* @__PURE__ */ React254.createElement(Text148, { size: "xs", c: "dimmed", lineClamp: 1 }, (m.did || "").length > 40 ? `${m.did.slice(0, 20)}\u2026${m.did.slice(-14)}` : m.did)), /* @__PURE__ */ React254.createElement(
25607
+ return /* @__PURE__ */ React254.createElement(Paper19, { key: `${m.did}-${i}`, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React254.createElement(Group95, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React254.createElement(BaseAvatar, { src: m.avatarUrl, did: m.did, size: 32 }), /* @__PURE__ */ React254.createElement(Stack168, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React254.createElement(Text148, { size: "sm", fw: 500, lineClamp: 1 }, m.displayName, isCreator && /* @__PURE__ */ React254.createElement(Text148, { span: true, size: "xs", c: "dimmed", ml: 6 }, "(you)")), /* @__PURE__ */ React254.createElement(Text148, { size: "xs", c: "dimmed", lineClamp: 1 }, (m.did || "").length > 40 ? `${m.did.slice(0, 20)}\u2026${m.did.slice(-14)}` : m.did)), /* @__PURE__ */ React254.createElement(
25584
25608
  Select6,
25585
25609
  {
25586
25610
  value: m.role,
@@ -25616,7 +25640,7 @@ var MemberMultiSelectFlowDetail = ({ inputs, block, runtime, isDisabled, execute
25616
25640
  disabled: isDisabled,
25617
25641
  size: "sm"
25618
25642
  }
25619
- ), /* @__PURE__ */ React254.createElement(MemberSearch, { members, onAdd: handleAddMember, isDisabled }), members.length > 0 && /* @__PURE__ */ React254.createElement(Stack168, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Group95, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Text148, { size: "xs", fw: 600, c: "dimmed" }, "SIGNATORIES (", members.length, ")"), /* @__PURE__ */ React254.createElement(Badge45, { size: "xs", color: "orange", variant: "light" }, "threshold: ", multisigThreshold, " of ", members.length)), members.map((m, i) => /* @__PURE__ */ React254.createElement(Paper18, { key: `${m.did}-${i}`, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React254.createElement(Group95, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React254.createElement(BaseAvatar, { src: m.avatarUrl, did: m.did, size: 32 }), /* @__PURE__ */ React254.createElement(Stack168, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React254.createElement(Text148, { size: "sm", fw: 500, lineClamp: 1 }, m.displayName), /* @__PURE__ */ React254.createElement(Text148, { size: "xs", c: "dimmed", lineClamp: 1 }, (m.did || "").length > 44 ? `${m.did.slice(0, 22)}\u2026${m.did.slice(-16)}` : m.did)), /* @__PURE__ */ React254.createElement(ActionIcon38, { color: "red", variant: "subtle", size: "sm", onClick: () => handleRemoveMember(i), disabled: isDisabled || members.length === 1 }, /* @__PURE__ */ React254.createElement(IconX15, { size: 14 })))))));
25643
+ ), /* @__PURE__ */ React254.createElement(MemberSearch, { members, onAdd: handleAddMember, isDisabled }), members.length > 0 && /* @__PURE__ */ React254.createElement(Stack168, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Group95, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Text148, { size: "xs", fw: 600, c: "dimmed" }, "SIGNATORIES (", members.length, ")"), /* @__PURE__ */ React254.createElement(Badge45, { size: "xs", color: "orange", variant: "light" }, "threshold: ", multisigThreshold, " of ", members.length)), members.map((m, i) => /* @__PURE__ */ React254.createElement(Paper19, { key: `${m.did}-${i}`, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React254.createElement(Group95, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React254.createElement(BaseAvatar, { src: m.avatarUrl, did: m.did, size: 32 }), /* @__PURE__ */ React254.createElement(Stack168, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React254.createElement(Text148, { size: "sm", fw: 500, lineClamp: 1 }, m.displayName), /* @__PURE__ */ React254.createElement(Text148, { size: "xs", c: "dimmed", lineClamp: 1 }, (m.did || "").length > 44 ? `${m.did.slice(0, 22)}\u2026${m.did.slice(-16)}` : m.did)), /* @__PURE__ */ React254.createElement(ActionIcon38, { color: "red", variant: "subtle", size: "sm", onClick: () => handleRemoveMember(i), disabled: isDisabled || members.length === 1 }, /* @__PURE__ */ React254.createElement(IconX15, { size: 14 })))))));
25620
25644
  const renderNftStaking = () => /* @__PURE__ */ React254.createElement(Stack168, { gap: "md" }, /* @__PURE__ */ React254.createElement(DismissibleAlert, { color: "blue", styles: actionAlertStyles }, /* @__PURE__ */ React254.createElement(Text148, { size: "sm" }, "For NFT staking groups, voting power is derived from on-chain NFT holdings. Provide the NFT contract address \u2014 no explicit member list is needed.")), /* @__PURE__ */ React254.createElement(
25621
25645
  TextInput7,
25622
25646
  {
@@ -25746,7 +25770,7 @@ var GovernanceConfigConfig = ({ inputs, onInputsChange }) => {
25746
25770
  };
25747
25771
 
25748
25772
  // src/mantine/blocks/action/actionTypes/pod/governanceConfig/GovernanceConfigFlowDetail.tsx
25749
- import React256, { useCallback as useCallback84, useMemo as useMemo96, useState as useState108 } from "react";
25773
+ import React256, { useCallback as useCallback84, useMemo as useMemo97, useState as useState108 } from "react";
25750
25774
  import { Box as Box53, Button as Button48, Group as Group96, NumberInput as NumberInput4, Select as Select7, Stack as Stack170, Text as Text150, TextInput as TextInput8 } from "@mantine/core";
25751
25775
  import { IconCheck as IconCheck17, IconAlertCircle as IconAlertCircle21, IconArrowLeft as IconArrowLeft6, IconUsers as IconUsers6, IconWriting, IconPhoto as IconPhoto4, IconCoin as IconCoin3 } from "@tabler/icons-react";
25752
25776
  var TIME_UNITS = [
@@ -25781,8 +25805,8 @@ function percentToDecimalString(percent) {
25781
25805
  return (Math.round(clamped * 100) / 1e4).toString();
25782
25806
  }
25783
25807
  var DurationField = ({ label, description, value, onChange, disabled }) => {
25784
- const parts = useMemo96(() => parseSecondsString(value), [value]);
25785
- const unitOptions = useMemo96(() => TIME_UNITS.map((u) => ({ value: u.value, label: u.label })), []);
25808
+ const parts = useMemo97(() => parseSecondsString(value), [value]);
25809
+ const unitOptions = useMemo97(() => TIME_UNITS.map((u) => ({ value: u.value, label: u.label })), []);
25786
25810
  return /* @__PURE__ */ React256.createElement(Stack170, { gap: 4 }, /* @__PURE__ */ React256.createElement(Text150, { size: "sm", fw: 500 }, label), /* @__PURE__ */ React256.createElement(Text150, { size: "xs", c: "dimmed" }, description), /* @__PURE__ */ React256.createElement(Group96, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React256.createElement(
25787
25811
  NumberInput4,
25788
25812
  {
@@ -26036,7 +26060,7 @@ var ListDomainFlowsConfig = ({ inputs, onInputsChange }) => {
26036
26060
  };
26037
26061
 
26038
26062
  // src/mantine/blocks/action/actionTypes/pod/listDomainFlows/ListDomainFlowsFlowDetail.tsx
26039
- import React258, { useCallback as useCallback86, useEffect as useEffect89, useMemo as useMemo97, useRef as useRef26, useState as useState110 } from "react";
26063
+ import React258, { useCallback as useCallback86, useEffect as useEffect89, useMemo as useMemo98, useRef as useRef26, useState as useState110 } from "react";
26040
26064
  import { ActionIcon as ActionIcon39, Badge as Badge46, Box as Box54, Button as Button49, Checkbox as Checkbox13, Group as Group97, Loader as Loader38, Stack as Stack172, Text as Text152, Tooltip as Tooltip27 } from "@mantine/core";
26041
26065
  import { IconAlertCircle as IconAlertCircle22, IconArrowLeft as IconArrowLeft7, IconCheck as IconCheck18, IconFolders, IconRefresh as IconRefresh7, IconTemplate } from "@tabler/icons-react";
26042
26066
  function templateSelectionKey(protocolDid, template) {
@@ -26108,7 +26132,7 @@ var ListDomainFlowsFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisa
26108
26132
  const [error, setError] = useState110(null);
26109
26133
  const cacheRef = useRef26(/* @__PURE__ */ new Map());
26110
26134
  const fetchedKeysRef = useRef26(/* @__PURE__ */ new Set());
26111
- const fetchKey = useMemo97(() => makeFetchKey(parsed, entityDid), [entityDid, parsed.domainFlowsSubspaceId, parsed.includeEmpty]);
26135
+ const fetchKey = useMemo98(() => makeFetchKey(parsed, entityDid), [entityDid, parsed.domainFlowsSubspaceId, parsed.includeEmpty]);
26112
26136
  useEffect89(() => {
26113
26137
  setSelected(getInitialSelection(runtime.output));
26114
26138
  }, [runtime.output?.selectedProtocolTemplates, runtime.output?.selectedFlowDids]);
@@ -26150,9 +26174,9 @@ var ListDomainFlowsFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisa
26150
26174
  useEffect89(() => {
26151
26175
  loadProtocols("initial");
26152
26176
  }, [loadProtocols]);
26153
- const activeProtocol = useMemo97(() => protocols.find((protocol) => protocol.protocolDid === activeProtocolDid) || null, [activeProtocolDid, protocols]);
26154
- const selectedTemplates = useMemo97(() => buildSelectedTemplates(protocols, selected), [protocols, selected]);
26155
- const selectedProtocolCount = useMemo97(() => new Set(selectedTemplates.map((template) => template.protocolDid)).size, [selectedTemplates]);
26177
+ const activeProtocol = useMemo98(() => protocols.find((protocol) => protocol.protocolDid === activeProtocolDid) || null, [activeProtocolDid, protocols]);
26178
+ const selectedTemplates = useMemo98(() => buildSelectedTemplates(protocols, selected), [protocols, selected]);
26179
+ const selectedProtocolCount = useMemo98(() => new Set(selectedTemplates.map((template) => template.protocolDid)).size, [selectedTemplates]);
26156
26180
  const openTemplates = useCallback86((protocolDid) => {
26157
26181
  setActiveProtocolDid(protocolDid);
26158
26182
  setView("templates");
@@ -26306,7 +26330,7 @@ function serializeGovernanceMemberProposalInputs(inputs) {
26306
26330
 
26307
26331
  // src/mantine/blocks/action/actionTypes/governance/_shared/DaoGroupField.tsx
26308
26332
  import React259, { useEffect as useEffect90, useState as useState111 } from "react";
26309
- import { Loader as Loader39, SegmentedControl as SegmentedControl6, Stack as Stack173, Text as Text153 } from "@mantine/core";
26333
+ import { Loader as Loader39, SegmentedControl as SegmentedControl7, Stack as Stack173, Text as Text153 } from "@mantine/core";
26310
26334
  var DaoGroupField = ({ coreAddress, onChange, description }) => {
26311
26335
  const handlers = useBlocknoteHandlers();
26312
26336
  const [groups, setGroups] = useState111([]);
@@ -26337,7 +26361,7 @@ var DaoGroupField = ({ coreAddress, onChange, description }) => {
26337
26361
  fetchGroups();
26338
26362
  }, [handlers]);
26339
26363
  return /* @__PURE__ */ React259.createElement(Stack173, { gap: "xs" }, /* @__PURE__ */ React259.createElement(Text153, { size: "sm", fw: 600 }, "POD"), /* @__PURE__ */ React259.createElement(Text153, { size: "xs", c: "dimmed" }, description || "The POD this action targets. Leave blank to resolve it from the current entity when the flow runs."), /* @__PURE__ */ React259.createElement(
26340
- SegmentedControl6,
26364
+ SegmentedControl7,
26341
26365
  {
26342
26366
  value: inputMode,
26343
26367
  onChange: (value) => setInputMode(value),
@@ -26400,13 +26424,13 @@ var GovernanceMemberProposalConfig = ({ inputs, onInputsChange }) => {
26400
26424
  };
26401
26425
 
26402
26426
  // src/mantine/blocks/action/actionTypes/governance/memberProposal/GovernanceMemberProposalFlowDetail.tsx
26403
- import React263, { useCallback as useCallback89, useEffect as useEffect94, useMemo as useMemo100, useRef as useRef29, useState as useState116 } from "react";
26404
- import { ActionIcon as ActionIcon40, Button as Button51, Card as Card24, Group as Group98, Loader as Loader41, Paper as Paper20, SegmentedControl as SegmentedControl7, Select as Select8, Stack as Stack177, Text as Text156 } from "@mantine/core";
26427
+ import React263, { useCallback as useCallback89, useEffect as useEffect94, useMemo as useMemo101, useRef as useRef29, useState as useState116 } from "react";
26428
+ import { ActionIcon as ActionIcon40, Button as Button51, Card as Card24, Group as Group98, Loader as Loader41, Paper as Paper21, SegmentedControl as SegmentedControl8, Select as Select8, Stack as Stack177, Text as Text156 } from "@mantine/core";
26405
26429
  import { IconAlertCircle as IconAlertCircle23, IconCheck as IconCheck19, IconUsers as IconUsers7, IconX as IconX16 } from "@tabler/icons-react";
26406
26430
 
26407
26431
  // src/mantine/blocks/action/actionTypes/governance/_shared/UserSearch.tsx
26408
26432
  import React261, { useCallback as useCallback88, useRef as useRef27, useState as useState113 } from "react";
26409
- import { Alert as Alert34, Button as Button50, Flex as Flex36, Loader as Loader40, Paper as Paper19, Stack as Stack175, Text as Text155, TextInput as TextInput9 } from "@mantine/core";
26433
+ import { Alert as Alert34, Button as Button50, Flex as Flex36, Loader as Loader40, Paper as Paper20, Stack as Stack175, Text as Text155, TextInput as TextInput9 } from "@mantine/core";
26410
26434
  import { IconSearch as IconSearch9 } from "@tabler/icons-react";
26411
26435
  var UserSearch = ({ onPick, isPicked, isDisabled, placeholder }) => {
26412
26436
  const handlers = useBlocknoteHandlers();
@@ -26472,7 +26496,7 @@ var UserSearch = ({ onPick, isPicked, isDisabled, placeholder }) => {
26472
26496
  disabled: isDisabled,
26473
26497
  size: "sm"
26474
26498
  }
26475
- ), results.length > 0 && /* @__PURE__ */ React261.createElement(Paper19, { withBorder: true, style: { maxHeight: 200, overflowY: "auto", borderRadius: 8 } }, /* @__PURE__ */ React261.createElement(Stack175, { gap: 0 }, results.map((user) => {
26499
+ ), results.length > 0 && /* @__PURE__ */ React261.createElement(Paper20, { withBorder: true, style: { maxHeight: 200, overflowY: "auto", borderRadius: 8 } }, /* @__PURE__ */ React261.createElement(Stack175, { gap: 0 }, results.map((user) => {
26476
26500
  const already = isPicked?.(user) ?? false;
26477
26501
  const addable = !!user.address;
26478
26502
  return /* @__PURE__ */ React261.createElement(
@@ -26495,7 +26519,7 @@ var UserSearch = ({ onPick, isPicked, isDisabled, placeholder }) => {
26495
26519
  };
26496
26520
 
26497
26521
  // src/mantine/hooks/useRunRuntimeReader.ts
26498
- import { useEffect as useEffect92, useMemo as useMemo98, useState as useState114 } from "react";
26522
+ import { useEffect as useEffect92, useMemo as useMemo99, useState as useState114 } from "react";
26499
26523
  function useRunRuntimeReader(editor, runId) {
26500
26524
  const contextRunId = useRunSessionId();
26501
26525
  const sessionPreview = useRunSessionPreview();
@@ -26506,14 +26530,14 @@ function useRunRuntimeReader(editor, runId) {
26506
26530
  if (!yDoc) return;
26507
26531
  return subscribeToActionState(yDoc, () => setRevision((r) => r + 1));
26508
26532
  }, [yDoc]);
26509
- return useMemo98(() => {
26533
+ return useMemo99(() => {
26510
26534
  if (!yDoc || !resolvedRunId) return void 0;
26511
26535
  return createRunRuntimeReader(yDoc, resolvedRunId);
26512
26536
  }, [yDoc, resolvedRunId, revision]);
26513
26537
  }
26514
26538
 
26515
26539
  // src/mantine/blocks/action/actionTypes/governance/_shared/useGovernanceCoreAddress.ts
26516
- import { useEffect as useEffect93, useMemo as useMemo99, useRef as useRef28, useState as useState115 } from "react";
26540
+ import { useEffect as useEffect93, useMemo as useMemo100, useRef as useRef28, useState as useState115 } from "react";
26517
26541
  function parseCoreAddressFromLinkedEntityId(id) {
26518
26542
  if (!id) return "";
26519
26543
  const hashIdx = id.indexOf("#");
@@ -26524,7 +26548,7 @@ function useGovernanceCoreAddress(params) {
26524
26548
  const handlers = useBlocknoteHandlers();
26525
26549
  const editorDocument = editor?.document || [];
26526
26550
  const runtimeReader = useRunRuntimeReader(editor);
26527
- const resolveOpts = useMemo99(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
26551
+ const resolveOpts = useMemo100(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
26528
26552
  const configured = resolveReferences(inputCoreAddress, editorDocument, resolveOpts).trim();
26529
26553
  const [autoResolved, setAutoResolved] = useState115("");
26530
26554
  const [resolving, setResolving] = useState115(false);
@@ -26642,7 +26666,7 @@ var GovernanceMemberProposalFlowDetail = ({
26642
26666
  const handlers = useBlocknoteHandlers();
26643
26667
  const handlersRef = useRef29(handlers);
26644
26668
  handlersRef.current = handlers;
26645
- const parsed = useMemo100(() => parseGovernanceMemberProposalInputs(inputs), [inputs]);
26669
+ const parsed = useMemo101(() => parseGovernanceMemberProposalInputs(inputs), [inputs]);
26646
26670
  const {
26647
26671
  coreAddress,
26648
26672
  resolving: resolvingCore,
@@ -26700,14 +26724,14 @@ var GovernanceMemberProposalFlowDetail = ({
26700
26724
  cancelled = true;
26701
26725
  };
26702
26726
  }, [needsExisting, coreAddress, isCreated]);
26703
- const existingOptions = useMemo100(
26727
+ const existingOptions = useMemo101(
26704
26728
  () => existing.map((m) => ({
26705
26729
  value: m.address,
26706
26730
  label: `${m.displayName} \xB7 ${m.address.slice(0, 12)}\u2026${m.sharePercent !== null ? ` \xB7 ${m.sharePercent}% of votes` : ""}`
26707
26731
  })),
26708
26732
  [existing]
26709
26733
  );
26710
- const valid = useMemo100(() => {
26734
+ const valid = useMemo101(() => {
26711
26735
  if (!proposalMetadataValid(title, description)) return false;
26712
26736
  if (operation === "add") return addList.length > 0 && addList.every((m) => m.weight > 0);
26713
26737
  if (operation === "remove") return !!targetAddress;
@@ -26755,7 +26779,7 @@ var GovernanceMemberProposalFlowDetail = ({
26755
26779
  return /* @__PURE__ */ React263.createElement(Stack177, { gap: "md" }, /* @__PURE__ */ React263.createElement(Card24, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React263.createElement(Text156, { fw: 500, size: "sm", c: "green" }, "Membership proposal created"), /* @__PURE__ */ React263.createElement(Text156, { size: "sm", c: "dimmed" }, "Proposal #", proposalId, createdTitle ? ` \u2014 \u201C${createdTitle}\u201D` : "", " is now open for the POD to vote on.")));
26756
26780
  }
26757
26781
  return /* @__PURE__ */ React263.createElement(Stack177, { gap: "md" }, /* @__PURE__ */ React263.createElement(Stack177, { gap: "sm" }, /* @__PURE__ */ React263.createElement(Text156, { size: "sm", c: "dimmed" }, block?.props?.description || "Add or remove members, or change someone's voting weight."), /* @__PURE__ */ React263.createElement(Group98, { gap: 6, c: "dimmed" }, /* @__PURE__ */ React263.createElement(IconUsers7, { size: 16, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React263.createElement(Text156, { size: "sm", fw: 600, c: "dimmed" }, "Membership change"))), /* @__PURE__ */ React263.createElement(
26758
- SegmentedControl7,
26782
+ SegmentedControl8,
26759
26783
  {
26760
26784
  color: "gray",
26761
26785
  value: operation,
@@ -26771,7 +26795,7 @@ var GovernanceMemberProposalFlowDetail = ({
26771
26795
  }
26772
26796
  }
26773
26797
  }
26774
- ), operation === "add" && /* @__PURE__ */ React263.createElement(Stack177, { gap: "sm" }, /* @__PURE__ */ React263.createElement(UserSearch, { onPick: handleAddUser, isPicked: (u) => addList.some((m) => m.address === u.address || !!u.did && m.did === u.did), isDisabled }), addList.length > 0 && /* @__PURE__ */ React263.createElement(Stack177, { gap: "xs" }, /* @__PURE__ */ React263.createElement(Text156, { size: "xs", fw: 600, c: "dimmed" }, "ADDING (", addList.length, ")"), /* @__PURE__ */ React263.createElement(Text156, { size: "xs", c: "dimmed" }, "Use \u2212 / + to set each new member's voting power (their number of votes in the POD)."), addList.map((m, i) => /* @__PURE__ */ React263.createElement(Paper20, { key: m.address, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React263.createElement(Group98, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React263.createElement(BaseAvatar, { src: m.avatarUrl, did: m.did, size: 32 }), /* @__PURE__ */ React263.createElement(Stack177, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React263.createElement(Text156, { size: "sm", fw: 500, lineClamp: 1 }, m.displayName), /* @__PURE__ */ React263.createElement(Text156, { size: "xs", c: "dimmed", lineClamp: 1 }, m.address)), /* @__PURE__ */ React263.createElement(Group98, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React263.createElement(
26798
+ ), operation === "add" && /* @__PURE__ */ React263.createElement(Stack177, { gap: "sm" }, /* @__PURE__ */ React263.createElement(UserSearch, { onPick: handleAddUser, isPicked: (u) => addList.some((m) => m.address === u.address || !!u.did && m.did === u.did), isDisabled }), addList.length > 0 && /* @__PURE__ */ React263.createElement(Stack177, { gap: "xs" }, /* @__PURE__ */ React263.createElement(Text156, { size: "xs", fw: 600, c: "dimmed" }, "ADDING (", addList.length, ")"), /* @__PURE__ */ React263.createElement(Text156, { size: "xs", c: "dimmed" }, "Use \u2212 / + to set each new member's voting power (their number of votes in the POD)."), addList.map((m, i) => /* @__PURE__ */ React263.createElement(Paper21, { key: m.address, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React263.createElement(Group98, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React263.createElement(BaseAvatar, { src: m.avatarUrl, did: m.did, size: 32 }), /* @__PURE__ */ React263.createElement(Stack177, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React263.createElement(Text156, { size: "sm", fw: 500, lineClamp: 1 }, m.displayName), /* @__PURE__ */ React263.createElement(Text156, { size: "xs", c: "dimmed", lineClamp: 1 }, m.address)), /* @__PURE__ */ React263.createElement(Group98, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React263.createElement(
26775
26799
  Button51,
26776
26800
  {
26777
26801
  variant: "subtle",
@@ -26884,7 +26908,7 @@ var GovernanceSettingsProposalConfig = ({ inputs, onInputsChange }) => {
26884
26908
  };
26885
26909
 
26886
26910
  // src/mantine/blocks/action/actionTypes/governance/settingsProposal/GovernanceSettingsProposalFlowDetail.tsx
26887
- import React265, { useCallback as useCallback91, useMemo as useMemo101, useState as useState118 } from "react";
26911
+ import React265, { useCallback as useCallback91, useMemo as useMemo102, useState as useState118 } from "react";
26888
26912
  import { Button as Button52, Card as Card25, Group as Group99, Loader as Loader42, NumberInput as NumberInput5, Slider as Slider2, Stack as Stack179, Switch as Switch8, Text as Text158 } from "@mantine/core";
26889
26913
  import { IconAlertCircle as IconAlertCircle24, IconScale, IconShieldCheck as IconShieldCheck14 } from "@tabler/icons-react";
26890
26914
  var LabeledSlider = ({
@@ -26902,7 +26926,7 @@ var GovernanceSettingsProposalFlowDetail = ({
26902
26926
  isDisabled,
26903
26927
  executeAction
26904
26928
  }) => {
26905
- const parsed = useMemo101(() => parseGovernanceSettingsProposalInputs(inputs), [inputs]);
26929
+ const parsed = useMemo102(() => parseGovernanceSettingsProposalInputs(inputs), [inputs]);
26906
26930
  const {
26907
26931
  coreAddress,
26908
26932
  resolving: resolvingCore,
@@ -27066,7 +27090,7 @@ import { NumberInput as NumberInput6, Switch as Switch9, Text as Text161 } from
27066
27090
  import { IconGavel as IconGavel2 } from "@tabler/icons-react";
27067
27091
 
27068
27092
  // src/mantine/blocks/action/actionTypes/governance/_shared/GovernanceProposalShell.tsx
27069
- import React267, { useCallback as useCallback93, useMemo as useMemo102, useState as useState120 } from "react";
27093
+ import React267, { useCallback as useCallback93, useMemo as useMemo103, useState as useState120 } from "react";
27070
27094
  import { Alert as Alert37, Button as Button53, Card as Card26, Group as Group100, Loader as Loader43, Stack as Stack181, Text as Text160 } from "@mantine/core";
27071
27095
  import { IconAlertCircle as IconAlertCircle25, IconShieldCheck as IconShieldCheck15 } from "@tabler/icons-react";
27072
27096
  var GovernanceProposalShell = ({
@@ -27080,7 +27104,7 @@ var GovernanceProposalShell = ({
27080
27104
  children
27081
27105
  }) => {
27082
27106
  const { inputs, editor, block, runtime, isDisabled, executeAction } = flow;
27083
- const inputCoreAddress = useMemo102(() => {
27107
+ const inputCoreAddress = useMemo103(() => {
27084
27108
  try {
27085
27109
  const parsed = typeof inputs === "string" ? JSON.parse(inputs) : inputs;
27086
27110
  return String(parsed?.coreAddress || "");
@@ -27294,13 +27318,13 @@ var GovernanceTransactionSendFundsConfig = ({ inputs, onInputsChange }) => {
27294
27318
  };
27295
27319
 
27296
27320
  // src/mantine/blocks/action/actionTypes/governance/transactionSendFunds/GovernanceTransactionSendFundsFlowDetail.tsx
27297
- import React271, { useCallback as useCallback96, useEffect as useEffect99, useMemo as useMemo103, useRef as useRef31, useState as useState124 } from "react";
27321
+ import React271, { useCallback as useCallback96, useEffect as useEffect99, useMemo as useMemo104, useRef as useRef31, useState as useState124 } from "react";
27298
27322
  import { Button as Button55, Card as Card27, Group as Group101, Loader as Loader45, NumberInput as NumberInput7, Stack as Stack184, Text as Text164 } from "@mantine/core";
27299
27323
  import { IconAlertCircle as IconAlertCircle26, IconCoin as IconCoin4, IconShieldCheck as IconShieldCheck16 } from "@tabler/icons-react";
27300
27324
 
27301
27325
  // src/mantine/blocks/action/actionTypes/governance/_shared/RecipientInput.tsx
27302
27326
  import React270, { useCallback as useCallback95, useEffect as useEffect98, useRef as useRef30, useState as useState123 } from "react";
27303
- import { Alert as Alert39, Button as Button54, Flex as Flex37, Loader as Loader44, Paper as Paper21, Stack as Stack183, Text as Text163, TextInput as TextInput10 } from "@mantine/core";
27327
+ import { Alert as Alert39, Button as Button54, Flex as Flex37, Loader as Loader44, Paper as Paper22, Stack as Stack183, Text as Text163, TextInput as TextInput10 } from "@mantine/core";
27304
27328
  import { IconSearch as IconSearch10 } from "@tabler/icons-react";
27305
27329
  var ADDRESS_PREFIX = "ixo1";
27306
27330
  var RecipientInput = ({ value, onChange, isDisabled, placeholder }) => {
@@ -27386,7 +27410,7 @@ var RecipientInput = ({ value, onChange, isDisabled, placeholder }) => {
27386
27410
  disabled: isDisabled,
27387
27411
  size: "sm"
27388
27412
  }
27389
- ), results.length > 0 && /* @__PURE__ */ React270.createElement(Paper21, { withBorder: true, style: { maxHeight: 200, overflowY: "auto", borderRadius: 8 } }, /* @__PURE__ */ React270.createElement(Stack183, { gap: 0 }, results.map((user) => {
27413
+ ), results.length > 0 && /* @__PURE__ */ React270.createElement(Paper22, { withBorder: true, style: { maxHeight: 200, overflowY: "auto", borderRadius: 8 } }, /* @__PURE__ */ React270.createElement(Stack183, { gap: 0 }, results.map((user) => {
27390
27414
  const addable = !!user.address;
27391
27415
  return /* @__PURE__ */ React270.createElement(
27392
27416
  Button54,
@@ -27418,7 +27442,7 @@ var GovernanceTransactionSendFundsFlowDetail = ({
27418
27442
  const handlers = useBlocknoteHandlers();
27419
27443
  const handlersRef = useRef31(handlers);
27420
27444
  handlersRef.current = handlers;
27421
- const parsed = useMemo103(() => parseGovernanceTransactionSendFundsInputs(inputs), [inputs]);
27445
+ const parsed = useMemo104(() => parseGovernanceTransactionSendFundsInputs(inputs), [inputs]);
27422
27446
  const {
27423
27447
  coreAddress,
27424
27448
  resolving: resolvingCore,
@@ -27464,7 +27488,7 @@ var GovernanceTransactionSendFundsFlowDetail = ({
27464
27488
  cancelled = true;
27465
27489
  };
27466
27490
  }, [coreAddress, isCreated]);
27467
- const selected = useMemo103(() => treasury.find((b) => b.denom === denom), [treasury, denom]);
27491
+ const selected = useMemo104(() => treasury.find((b) => b.denom === denom), [treasury, denom]);
27468
27492
  const balance = selected?.amount || 0;
27469
27493
  const amt = typeof amount === "number" ? amount : 0;
27470
27494
  const overdraft = amt > balance;
@@ -27555,7 +27579,7 @@ registerActionTypeUI("qi/governance.transaction.send-funds", {
27555
27579
  import { IconCoins as IconCoins3 } from "@tabler/icons-react";
27556
27580
 
27557
27581
  // src/mantine/blocks/action/actionTypes/governance/transactionSendGroupToken/GovernanceTransactionSendGroupTokenFlowDetail.tsx
27558
- import React272, { useEffect as useEffect100, useMemo as useMemo104, useRef as useRef32, useState as useState125 } from "react";
27582
+ import React272, { useEffect as useEffect100, useMemo as useMemo105, useRef as useRef32, useState as useState125 } from "react";
27559
27583
  import { Loader as Loader46, Stack as Stack185, Text as Text165 } from "@mantine/core";
27560
27584
  import { IconCoins as IconCoins2 } from "@tabler/icons-react";
27561
27585
  var MANUAL_VALUE = "__manual__";
@@ -27588,7 +27612,7 @@ var Cw20TokenField = ({ coreAddress, value, onChange, isDisabled }) => {
27588
27612
  cancelled = true;
27589
27613
  };
27590
27614
  }, [coreAddress]);
27591
- const matchesToken = useMemo104(() => tokens.some((t) => t.denom === value), [tokens, value]);
27615
+ const matchesToken = useMemo105(() => tokens.some((t) => t.denom === value), [tokens, value]);
27592
27616
  const showManual = manual || !loading && tokens.length === 0 || !!value && !matchesToken;
27593
27617
  const selectData = [
27594
27618
  ...tokens.map((t) => ({ value: t.denom, label: `${t.tokenName || t.denom} \xB7 ${t.amount.toLocaleString()}` })),
@@ -27748,7 +27772,7 @@ import { IconArrowsExchange as IconArrowsExchange4 } from "@tabler/icons-react";
27748
27772
 
27749
27773
  // src/mantine/blocks/action/actionTypes/governance/transactionPerformTokenSwap/GovernanceTransactionPerformTokenSwapFlowDetail.tsx
27750
27774
  import React274, { useState as useState127 } from "react";
27751
- import { NumberInput as NumberInput8, SegmentedControl as SegmentedControl8 } from "@mantine/core";
27775
+ import { NumberInput as NumberInput8, SegmentedControl as SegmentedControl9 } from "@mantine/core";
27752
27776
  import { IconArrowsExchange as IconArrowsExchange3 } from "@tabler/icons-react";
27753
27777
  var PARTY_TYPE_DATA = [
27754
27778
  { value: "native", label: "IXO" },
@@ -27799,7 +27823,7 @@ var GovernanceTransactionPerformTokenSwapFlowDetail = (props) => {
27799
27823
  }
27800
27824
  ),
27801
27825
  /* @__PURE__ */ React274.createElement(
27802
- SegmentedControl8,
27826
+ SegmentedControl9,
27803
27827
  {
27804
27828
  color: "gray",
27805
27829
  value: partyType,
@@ -27921,7 +27945,7 @@ import { IconStack2 as IconStack22 } from "@tabler/icons-react";
27921
27945
 
27922
27946
  // src/mantine/blocks/action/actionTypes/governance/stakingStake/GovernanceStakingStakeFlowDetail.tsx
27923
27947
  import React276, { useState as useState129 } from "react";
27924
- import { NumberInput as NumberInput9, SegmentedControl as SegmentedControl9 } from "@mantine/core";
27948
+ import { NumberInput as NumberInput9, SegmentedControl as SegmentedControl10 } from "@mantine/core";
27925
27949
  import { IconStack2 } from "@tabler/icons-react";
27926
27950
  var OPERATION_DATA2 = [
27927
27951
  { value: "delegate", label: "Stake" },
@@ -27959,7 +27983,7 @@ var GovernanceStakingStakeFlowDetail = (props) => {
27959
27983
  })
27960
27984
  },
27961
27985
  /* @__PURE__ */ React276.createElement(
27962
- SegmentedControl9,
27986
+ SegmentedControl10,
27963
27987
  {
27964
27988
  color: "gray",
27965
27989
  value: stakeType,
@@ -28490,12 +28514,12 @@ import React283, { useState as useState135 } from "react";
28490
28514
  import { IconPlugConnected } from "@tabler/icons-react";
28491
28515
 
28492
28516
  // src/mantine/blocks/action/actionTypes/governance/_shared/EntityDidField.tsx
28493
- import React282, { useCallback as useCallback97, useMemo as useMemo105 } from "react";
28517
+ import React282, { useCallback as useCallback97, useMemo as useMemo106 } from "react";
28494
28518
  import { Button as Button56, Stack as Stack189, Text as Text170, Tooltip as Tooltip28 } from "@mantine/core";
28495
28519
  import { IconWorldPin } from "@tabler/icons-react";
28496
28520
  var EntityDidField = ({ label, description, value, onChange, isDisabled, placeholder }) => {
28497
28521
  const handlers = useBlocknoteHandlers();
28498
- const currentDid = useMemo105(() => {
28522
+ const currentDid = useMemo106(() => {
28499
28523
  try {
28500
28524
  return handlers?.getEntityDid?.() || "";
28501
28525
  } catch {
@@ -28675,11 +28699,11 @@ import { IconSitemap as IconSitemap2 } from "@tabler/icons-react";
28675
28699
 
28676
28700
  // src/mantine/blocks/action/actionTypes/governance/daoManageSubDaos/GovernanceDaoManageSubDaosFlowDetail.tsx
28677
28701
  import React286, { useState as useState138 } from "react";
28678
- import { ActionIcon as ActionIcon41, Button as Button57, Group as Group102, Paper as Paper22, Stack as Stack191, Text as Text172 } from "@mantine/core";
28702
+ import { ActionIcon as ActionIcon41, Button as Button57, Group as Group102, Paper as Paper23, Stack as Stack191, Text as Text172 } from "@mantine/core";
28679
28703
  import { IconSitemap, IconX as IconX17 } from "@tabler/icons-react";
28680
28704
 
28681
28705
  // src/mantine/blocks/action/actionTypes/governance/_shared/GroupAccountField.tsx
28682
- import React285, { useEffect as useEffect101, useMemo as useMemo106, useRef as useRef33, useState as useState137 } from "react";
28706
+ import React285, { useEffect as useEffect101, useMemo as useMemo107, useRef as useRef33, useState as useState137 } from "react";
28683
28707
  import { Loader as Loader47, Stack as Stack190, Text as Text171 } from "@mantine/core";
28684
28708
  var MANUAL_VALUE2 = "__manual__";
28685
28709
  var GroupAccountField = ({ label, description, value, onChange, isDisabled, placeholder }) => {
@@ -28708,7 +28732,7 @@ var GroupAccountField = ({ label, description, value, onChange, isDisabled, plac
28708
28732
  cancelled = true;
28709
28733
  };
28710
28734
  }, []);
28711
- const matchesGroup = useMemo106(() => groups.some((g) => g.coreAddress === value), [groups, value]);
28735
+ const matchesGroup = useMemo107(() => groups.some((g) => g.coreAddress === value), [groups, value]);
28712
28736
  const showManual = manual || !!value && !matchesGroup;
28713
28737
  const selectData = [
28714
28738
  ...groups.map((g) => ({ value: g.coreAddress, label: `${g.name} \xB7 ${g.coreAddress.slice(0, 12)}\u2026` })),
@@ -28772,7 +28796,7 @@ var AddressList = ({ label, entryLabel, entryDescription, addresses, onChange, i
28772
28796
  onChange([...addresses, addr]);
28773
28797
  setDraft("");
28774
28798
  };
28775
- return /* @__PURE__ */ React286.createElement(Stack191, { gap: "xs" }, /* @__PURE__ */ React286.createElement(Text172, { size: "xs", fw: 600, c: "dimmed" }, label), addresses.map((addr, i) => /* @__PURE__ */ React286.createElement(Paper22, { key: addr, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React286.createElement(Group102, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React286.createElement(Text172, { size: "sm", style: { flex: 1, minWidth: 0, wordBreak: "break-all" } }, addr), /* @__PURE__ */ React286.createElement(ActionIcon41, { color: "red", variant: "subtle", size: "sm", disabled: isDisabled, onClick: () => onChange(addresses.filter((_, idx) => idx !== i)) }, /* @__PURE__ */ React286.createElement(IconX17, { size: 14 }))))), /* @__PURE__ */ React286.createElement(Group102, { gap: "xs", wrap: "nowrap", align: "flex-end" }, /* @__PURE__ */ React286.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React286.createElement(GroupAccountField, { label: entryLabel, description: entryDescription, value: draft, onChange: setDraft, isDisabled })), /* @__PURE__ */ React286.createElement(Button57, { size: "sm", variant: "light", onClick: handleAdd, disabled: isDisabled || !draft.trim() || addresses.includes(draft.trim()) }, "Add")));
28799
+ return /* @__PURE__ */ React286.createElement(Stack191, { gap: "xs" }, /* @__PURE__ */ React286.createElement(Text172, { size: "xs", fw: 600, c: "dimmed" }, label), addresses.map((addr, i) => /* @__PURE__ */ React286.createElement(Paper23, { key: addr, withBorder: true, p: "sm", style: { borderRadius: 10 } }, /* @__PURE__ */ React286.createElement(Group102, { wrap: "nowrap", gap: "sm", align: "center" }, /* @__PURE__ */ React286.createElement(Text172, { size: "sm", style: { flex: 1, minWidth: 0, wordBreak: "break-all" } }, addr), /* @__PURE__ */ React286.createElement(ActionIcon41, { color: "red", variant: "subtle", size: "sm", disabled: isDisabled, onClick: () => onChange(addresses.filter((_, idx) => idx !== i)) }, /* @__PURE__ */ React286.createElement(IconX17, { size: 14 }))))), /* @__PURE__ */ React286.createElement(Group102, { gap: "xs", wrap: "nowrap", align: "flex-end" }, /* @__PURE__ */ React286.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React286.createElement(GroupAccountField, { label: entryLabel, description: entryDescription, value: draft, onChange: setDraft, isDisabled })), /* @__PURE__ */ React286.createElement(Button57, { size: "sm", variant: "light", onClick: handleAdd, disabled: isDisabled || !draft.trim() || addresses.includes(draft.trim()) }, "Add")));
28776
28800
  };
28777
28801
  var GovernanceDaoManageSubDaosFlowDetail = (props) => {
28778
28802
  const { isDisabled } = props;
@@ -28836,7 +28860,7 @@ import { IconDatabase as IconDatabase4 } from "@tabler/icons-react";
28836
28860
 
28837
28861
  // src/mantine/blocks/action/actionTypes/governance/daoManageStorage/GovernanceDaoManageStorageFlowDetail.tsx
28838
28862
  import React287, { useState as useState139 } from "react";
28839
- import { SegmentedControl as SegmentedControl10 } from "@mantine/core";
28863
+ import { SegmentedControl as SegmentedControl11 } from "@mantine/core";
28840
28864
  import { IconDatabase as IconDatabase3 } from "@tabler/icons-react";
28841
28865
  var GovernanceDaoManageStorageFlowDetail = (props) => {
28842
28866
  const { isDisabled } = props;
@@ -28857,7 +28881,7 @@ var GovernanceDaoManageStorageFlowDetail = (props) => {
28857
28881
  buildRuntimeInputs: () => ({ setting, key: key.trim(), value: setting ? value.trim() : "" })
28858
28882
  },
28859
28883
  /* @__PURE__ */ React287.createElement(
28860
- SegmentedControl10,
28884
+ SegmentedControl11,
28861
28885
  {
28862
28886
  color: "gray",
28863
28887
  value: mode,
@@ -28997,13 +29021,13 @@ registerActionTypeUI("qi/governance.dao.admin-exec", {
28997
29021
  import { IconRosetteDiscountCheck as IconRosetteDiscountCheck2 } from "@tabler/icons-react";
28998
29022
 
28999
29023
  // src/mantine/blocks/action/actionTypes/governance/daoAcceptToMarketplace/GovernanceDaoAcceptToMarketplaceFlowDetail.tsx
29000
- import React289, { useMemo as useMemo107, useState as useState141 } from "react";
29024
+ import React289, { useMemo as useMemo108, useState as useState141 } from "react";
29001
29025
  import { Button as Button58, Tooltip as Tooltip29 } from "@mantine/core";
29002
29026
  import { IconRosetteDiscountCheck } from "@tabler/icons-react";
29003
29027
  var GovernanceDaoAcceptToMarketplaceFlowDetail = (props) => {
29004
29028
  const { isDisabled } = props;
29005
29029
  const handlers = useBlocknoteHandlers();
29006
- const currentRelayerDid = useMemo107(() => {
29030
+ const currentRelayerDid = useMemo108(() => {
29007
29031
  try {
29008
29032
  return handlers?.getRelayerDid?.() || "";
29009
29033
  } catch {
@@ -29341,7 +29365,7 @@ import { IconPhotoCog as IconPhotoCog2 } from "@tabler/icons-react";
29341
29365
 
29342
29366
  // src/mantine/blocks/action/actionTypes/governance/nftManageCollections/GovernanceNftManageCollectionsFlowDetail.tsx
29343
29367
  import React293, { useState as useState145 } from "react";
29344
- import { SegmentedControl as SegmentedControl11, Stack as Stack193, Text as Text176 } from "@mantine/core";
29368
+ import { SegmentedControl as SegmentedControl12, Stack as Stack193, Text as Text176 } from "@mantine/core";
29345
29369
  import { IconPhotoCog } from "@tabler/icons-react";
29346
29370
  var GovernanceNftManageCollectionsFlowDetail = (props) => {
29347
29371
  const { isDisabled } = props;
@@ -29360,7 +29384,7 @@ var GovernanceNftManageCollectionsFlowDetail = (props) => {
29360
29384
  buildRuntimeInputs: () => ({ adding: mode === "track", address: address.trim() })
29361
29385
  },
29362
29386
  /* @__PURE__ */ React293.createElement(Stack193, { gap: 4 }, /* @__PURE__ */ React293.createElement(Text176, { size: "sm", fw: 500 }, "Action"), /* @__PURE__ */ React293.createElement(Text176, { size: "xs", c: "dimmed" }, "Only changes which collections the treasury displays and tracks \u2014 it does not move or affect ownership of any NFT."), /* @__PURE__ */ React293.createElement(
29363
- SegmentedControl11,
29387
+ SegmentedControl12,
29364
29388
  {
29365
29389
  value: mode,
29366
29390
  onChange: (value) => setMode(value),
@@ -29780,7 +29804,7 @@ import { IconCoinBitcoin as IconCoinBitcoin2 } from "@tabler/icons-react";
29780
29804
 
29781
29805
  // src/mantine/blocks/action/actionTypes/governance/contractManageCw20/GovernanceContractManageCw20FlowDetail.tsx
29782
29806
  import React298, { useState as useState150 } from "react";
29783
- import { SegmentedControl as SegmentedControl12, Stack as Stack194, Text as Text180 } from "@mantine/core";
29807
+ import { SegmentedControl as SegmentedControl13, Stack as Stack194, Text as Text180 } from "@mantine/core";
29784
29808
  import { IconCoinBitcoin } from "@tabler/icons-react";
29785
29809
  var GovernanceContractManageCw20FlowDetail = (props) => {
29786
29810
  const { isDisabled } = props;
@@ -29799,7 +29823,7 @@ var GovernanceContractManageCw20FlowDetail = (props) => {
29799
29823
  buildRuntimeInputs: () => ({ adding, address: address.trim() })
29800
29824
  },
29801
29825
  /* @__PURE__ */ React298.createElement(Stack194, { gap: 4 }, /* @__PURE__ */ React298.createElement(Text180, { size: "sm", fw: 500 }, "Action"), /* @__PURE__ */ React298.createElement(
29802
- SegmentedControl12,
29826
+ SegmentedControl13,
29803
29827
  {
29804
29828
  value: adding ? "track" : "untrack",
29805
29829
  onChange: (value) => setAdding(value === "track"),
@@ -30015,7 +30039,7 @@ import { IconWorld as IconWorld2 } from "@tabler/icons-react";
30015
30039
 
30016
30040
  // src/mantine/blocks/action/actionTypes/httpRequest/HttpRequestConfig.tsx
30017
30041
  import React301, { useEffect as useEffect102, useState as useState153, useCallback as useCallback98 } from "react";
30018
- import { Stack as Stack195, Text as Text183, Button as Button59, Group as Group103, ActionIcon as ActionIcon42, Paper as Paper23, Alert as Alert40, Code as Code10 } from "@mantine/core";
30042
+ import { Stack as Stack195, Text as Text183, Button as Button59, Group as Group103, ActionIcon as ActionIcon42, Paper as Paper24, Alert as Alert40, Code as Code10 } from "@mantine/core";
30019
30043
  import { IconTrash as IconTrash9, IconPlus as IconPlus8, IconInfoCircle as IconInfoCircle5 } from "@tabler/icons-react";
30020
30044
  var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30021
30045
  const [local, setLocal] = useState153(() => parseHttpRequestInputs(inputs));
@@ -30080,7 +30104,7 @@ var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30080
30104
  value: local.endpoint,
30081
30105
  onChange: (event) => update({ endpoint: event.currentTarget.value })
30082
30106
  }
30083
- ), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "Request Headers"), /* @__PURE__ */ React301.createElement(Button59, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React301.createElement(IconPlus8, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), local.headers.length > 0 && /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, local.headers.map((header, index) => /* @__PURE__ */ React301.createElement(Paper23, { key: index, p: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React301.createElement(
30107
+ ), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "Request Headers"), /* @__PURE__ */ React301.createElement(Button59, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React301.createElement(IconPlus8, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), local.headers.length > 0 && /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, local.headers.map((header, index) => /* @__PURE__ */ React301.createElement(Paper24, { key: index, p: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React301.createElement(
30084
30108
  DataInput,
30085
30109
  {
30086
30110
  placeholder: "Header key (e.g., Authorization)",
@@ -30100,7 +30124,7 @@ var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30100
30124
  currentBlockId: blockId,
30101
30125
  size: "sm"
30102
30126
  }
30103
- ), /* @__PURE__ */ React301.createElement(ActionIcon42, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React301.createElement(IconTrash9, { size: 16 }))))))), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "Request Body (JSON)"), /* @__PURE__ */ React301.createElement(Button59, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React301.createElement(IconPlus8, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "Build your JSON request body as key-value pairs"), local.body.length > 0 && /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, local.body.map((field, index) => /* @__PURE__ */ React301.createElement(Paper23, { key: index, p: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React301.createElement(
30127
+ ), /* @__PURE__ */ React301.createElement(ActionIcon42, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React301.createElement(IconTrash9, { size: 16 }))))))), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "Request Body (JSON)"), /* @__PURE__ */ React301.createElement(Button59, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React301.createElement(IconPlus8, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "Build your JSON request body as key-value pairs"), local.body.length > 0 && /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, local.body.map((field, index) => /* @__PURE__ */ React301.createElement(Paper24, { key: index, p: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React301.createElement(
30104
30128
  DataInput,
30105
30129
  {
30106
30130
  placeholder: "Field key (e.g., name)",
@@ -30120,7 +30144,7 @@ var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30120
30144
  currentBlockId: blockId,
30121
30145
  size: "sm"
30122
30146
  }
30123
- ), /* @__PURE__ */ React301.createElement(ActionIcon42, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React301.createElement(IconTrash9, { size: 16 }))))))), /* @__PURE__ */ React301.createElement(Alert40, { icon: /* @__PURE__ */ React301.createElement(IconInfoCircle5, { size: 16 }), title: "Response Schema", styles: actionAlertStyles }, /* @__PURE__ */ React301.createElement(Text183, { size: "xs" }, "Define the expected structure of your API response. This allows other blocks to reference specific fields from the response data using the DataInput component.")), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "How it works"), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "1. Define response fields using dot notation (e.g., ", /* @__PURE__ */ React301.createElement(Code10, null, "customer.email"), ")"), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "2. Fields become available in DataInput selectors across other blocks"), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "3. Reference them like: ", /* @__PURE__ */ React301.createElement(Code10, null, `{{${blockId}.response.customer.email}}`))), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "Response Fields"), /* @__PURE__ */ React301.createElement(Button59, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React301.createElement(IconPlus8, { size: 14 }), onClick: handleAddSchemaField }, "Add Field")), schemaFields.length === 0 ? /* @__PURE__ */ React301.createElement(Code10, { p: "md" }, 'No response fields defined yet. Click "Add Field" to start defining your response structure.') : /* @__PURE__ */ React301.createElement(Stack195, { gap: "md" }, schemaFields.map((field, index) => /* @__PURE__ */ React301.createElement(Paper23, { key: index, p: "md", withBorder: true }, /* @__PURE__ */ React301.createElement(Stack195, { gap: "sm" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", fw: 500 }, "Field ", index + 1), /* @__PURE__ */ React301.createElement(ActionIcon42, { color: "red", variant: "subtle", onClick: () => handleRemoveSchemaField(index) }, /* @__PURE__ */ React301.createElement(IconTrash9, { size: 16 }))), /* @__PURE__ */ React301.createElement(
30147
+ ), /* @__PURE__ */ React301.createElement(ActionIcon42, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React301.createElement(IconTrash9, { size: 16 }))))))), /* @__PURE__ */ React301.createElement(Alert40, { icon: /* @__PURE__ */ React301.createElement(IconInfoCircle5, { size: 16 }), title: "Response Schema", styles: actionAlertStyles }, /* @__PURE__ */ React301.createElement(Text183, { size: "xs" }, "Define the expected structure of your API response. This allows other blocks to reference specific fields from the response data using the DataInput component.")), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "How it works"), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "1. Define response fields using dot notation (e.g., ", /* @__PURE__ */ React301.createElement(Code10, null, "customer.email"), ")"), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "2. Fields become available in DataInput selectors across other blocks"), /* @__PURE__ */ React301.createElement(Text183, { size: "xs", c: "dimmed" }, "3. Reference them like: ", /* @__PURE__ */ React301.createElement(Code10, null, `{{${blockId}.response.customer.email}}`))), /* @__PURE__ */ React301.createElement(Stack195, { gap: "xs" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", c: "neutralColor.7" }, "Response Fields"), /* @__PURE__ */ React301.createElement(Button59, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React301.createElement(IconPlus8, { size: 14 }), onClick: handleAddSchemaField }, "Add Field")), schemaFields.length === 0 ? /* @__PURE__ */ React301.createElement(Code10, { p: "md" }, 'No response fields defined yet. Click "Add Field" to start defining your response structure.') : /* @__PURE__ */ React301.createElement(Stack195, { gap: "md" }, schemaFields.map((field, index) => /* @__PURE__ */ React301.createElement(Paper24, { key: index, p: "md", withBorder: true }, /* @__PURE__ */ React301.createElement(Stack195, { gap: "sm" }, /* @__PURE__ */ React301.createElement(Group103, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React301.createElement(Text183, { size: "sm", fw: 500 }, "Field ", index + 1), /* @__PURE__ */ React301.createElement(ActionIcon42, { color: "red", variant: "subtle", onClick: () => handleRemoveSchemaField(index) }, /* @__PURE__ */ React301.createElement(IconTrash9, { size: 16 }))), /* @__PURE__ */ React301.createElement(
30124
30148
  BaseTextInput,
30125
30149
  {
30126
30150
  label: "Field Path",
@@ -30172,14 +30196,14 @@ var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30172
30196
  };
30173
30197
 
30174
30198
  // src/mantine/blocks/action/actionTypes/httpRequest/HttpRequestFlowDetail.tsx
30175
- import React302, { useMemo as useMemo108, useState as useState154 } from "react";
30176
- import { Group as Group104, Stack as Stack196, Text as Text184, ActionIcon as ActionIcon43, Badge as Badge47, Collapse as Collapse8, Code as Code11, Loader as Loader48 } from "@mantine/core";
30177
- import { IconSend as IconSend7, IconChevronDown as IconChevronDown8, IconChevronUp as IconChevronUp4, IconAlertTriangle as IconAlertTriangle11 } from "@tabler/icons-react";
30199
+ import React302, { useMemo as useMemo109, useState as useState154 } from "react";
30200
+ import { Group as Group104, Stack as Stack196, Text as Text184, ActionIcon as ActionIcon43, Badge as Badge47, Collapse as Collapse7, Code as Code11, Loader as Loader48 } from "@mantine/core";
30201
+ import { IconSend as IconSend7, IconChevronDown as IconChevronDown7, IconChevronUp as IconChevronUp4, IconAlertTriangle as IconAlertTriangle11 } from "@tabler/icons-react";
30178
30202
  var HttpRequestFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
30179
30203
  const [isLoading, setIsLoading] = useState154(false);
30180
30204
  const [showDetails, setShowDetails] = useState154(false);
30181
30205
  const [validationWarnings, setValidationWarnings] = useState154([]);
30182
- const parsed = useMemo108(() => parseHttpRequestInputs(inputs), [inputs]);
30206
+ const parsed = useMemo109(() => parseHttpRequestInputs(inputs), [inputs]);
30183
30207
  const { endpoint, method, headers, body, responseSchema } = parsed;
30184
30208
  const runtimeState = runtime.state;
30185
30209
  const status = runtimeState === "running" ? "loading" : runtimeState === "completed" ? "success" : runtimeState === "failed" ? "error" : "idle";
@@ -30243,7 +30267,7 @@ var HttpRequestFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) =>
30243
30267
  }
30244
30268
  };
30245
30269
  const hasDetails = headers.length > 0 || body.length > 0 || !!response;
30246
- return /* @__PURE__ */ React302.createElement(Stack196, { gap: "md" }, /* @__PURE__ */ React302.createElement(Group104, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React302.createElement(Badge47, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React302.createElement(Text184, { size: "xs", c: "dimmed", contentEditable: false, style: { wordBreak: "break-all", overflow: "hidden", textOverflow: "ellipsis" } }, endpoint || "No endpoint configured"), status !== "idle" && /* @__PURE__ */ React302.createElement(Badge47, { size: "xs", variant: "dot", color: getStatusColor5(status) }, status)), /* @__PURE__ */ React302.createElement(Group104, { gap: "xs" }, /* @__PURE__ */ React302.createElement(BasePrimaryButton, { leftSection: isLoading ? /* @__PURE__ */ React302.createElement(Loader48, { size: 14 }) : /* @__PURE__ */ React302.createElement(IconSend7, { size: 14 }), onClick: handleExecuteRequest, disabled: isDisabled || isLoading || !endpoint }, isLoading ? "Sending..." : "Execute"), /* @__PURE__ */ React302.createElement(ActionIcon43, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: !hasDetails }, showDetails ? /* @__PURE__ */ React302.createElement(IconChevronUp4, { size: 16 }) : /* @__PURE__ */ React302.createElement(IconChevronDown8, { size: 16 }))), /* @__PURE__ */ React302.createElement(Collapse8, { in: showDetails }, /* @__PURE__ */ React302.createElement(Stack196, { gap: "md" }, validationWarnings.length > 0 && /* @__PURE__ */ React302.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React302.createElement(IconAlertTriangle11, { size: 16 }), title: "Schema Validation Warnings", color: "yellow", styles: actionAlertStyles }, /* @__PURE__ */ React302.createElement(Stack196, { gap: "xs" }, /* @__PURE__ */ React302.createElement(Text184, { size: "xs" }, "The API response does not match the defined schema:"), validationWarnings.map((warning, index) => /* @__PURE__ */ React302.createElement(Text184, { key: index, size: "xs", c: "dimmed" }, "\u2022 ", warning)))), headers.length > 0 && /* @__PURE__ */ React302.createElement(Stack196, { gap: "xs" }, /* @__PURE__ */ React302.createElement(Text184, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React302.createElement(Code11, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
30270
+ return /* @__PURE__ */ React302.createElement(Stack196, { gap: "md" }, /* @__PURE__ */ React302.createElement(Group104, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React302.createElement(Badge47, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React302.createElement(Text184, { size: "xs", c: "dimmed", contentEditable: false, style: { wordBreak: "break-all", overflow: "hidden", textOverflow: "ellipsis" } }, endpoint || "No endpoint configured"), status !== "idle" && /* @__PURE__ */ React302.createElement(Badge47, { size: "xs", variant: "dot", color: getStatusColor5(status) }, status)), /* @__PURE__ */ React302.createElement(Group104, { gap: "xs" }, /* @__PURE__ */ React302.createElement(BasePrimaryButton, { leftSection: isLoading ? /* @__PURE__ */ React302.createElement(Loader48, { size: 14 }) : /* @__PURE__ */ React302.createElement(IconSend7, { size: 14 }), onClick: handleExecuteRequest, disabled: isDisabled || isLoading || !endpoint }, isLoading ? "Sending..." : "Execute"), /* @__PURE__ */ React302.createElement(ActionIcon43, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: !hasDetails }, showDetails ? /* @__PURE__ */ React302.createElement(IconChevronUp4, { size: 16 }) : /* @__PURE__ */ React302.createElement(IconChevronDown7, { size: 16 }))), /* @__PURE__ */ React302.createElement(Collapse7, { in: showDetails }, /* @__PURE__ */ React302.createElement(Stack196, { gap: "md" }, validationWarnings.length > 0 && /* @__PURE__ */ React302.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React302.createElement(IconAlertTriangle11, { size: 16 }), title: "Schema Validation Warnings", color: "yellow", styles: actionAlertStyles }, /* @__PURE__ */ React302.createElement(Stack196, { gap: "xs" }, /* @__PURE__ */ React302.createElement(Text184, { size: "xs" }, "The API response does not match the defined schema:"), validationWarnings.map((warning, index) => /* @__PURE__ */ React302.createElement(Text184, { key: index, size: "xs", c: "dimmed" }, "\u2022 ", warning)))), headers.length > 0 && /* @__PURE__ */ React302.createElement(Stack196, { gap: "xs" }, /* @__PURE__ */ React302.createElement(Text184, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React302.createElement(Code11, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
30247
30271
  headers.reduce(
30248
30272
  (acc, h) => {
30249
30273
  if (h.key && h.value) acc[h.key] = h.value;
@@ -30279,7 +30303,7 @@ registerActionTypeUI("qi/http.request", {
30279
30303
  import { IconMail as IconMail6 } from "@tabler/icons-react";
30280
30304
 
30281
30305
  // src/mantine/blocks/action/actionTypes/emailSend/EmailSendConfig.tsx
30282
- import React303, { useCallback as useCallback99, useEffect as useEffect103, useRef as useRef34, useState as useState155, useMemo as useMemo109 } from "react";
30306
+ import React303, { useCallback as useCallback99, useEffect as useEffect103, useRef as useRef34, useState as useState155, useMemo as useMemo110 } from "react";
30283
30307
  import { Alert as Alert41, Badge as Badge48, Group as Group105, Loader as Loader49, Stack as Stack197, Text as Text185 } from "@mantine/core";
30284
30308
  import { IconCheck as IconCheck20, IconInfoCircle as IconInfoCircle6 } from "@tabler/icons-react";
30285
30309
 
@@ -30382,14 +30406,14 @@ var EmailSendConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30382
30406
  },
30383
30407
  [handlers.getEmailTemplate, update]
30384
30408
  );
30385
- const parsedExtractedVariables = useMemo109(() => {
30409
+ const parsedExtractedVariables = useMemo110(() => {
30386
30410
  try {
30387
30411
  return JSON.parse(local.extractedVariables || "[]");
30388
30412
  } catch {
30389
30413
  return [];
30390
30414
  }
30391
30415
  }, [local.extractedVariables]);
30392
- const parsedVariableMapping = useMemo109(() => {
30416
+ const parsedVariableMapping = useMemo110(() => {
30393
30417
  try {
30394
30418
  return JSON.parse(local.variables || "{}");
30395
30419
  } catch {
@@ -30467,7 +30491,7 @@ registerActionTypeUI("qi/email.send", {
30467
30491
  import { IconBriefcase as IconBriefcase2 } from "@tabler/icons-react";
30468
30492
 
30469
30493
  // src/mantine/blocks/action/actionTypes/bid/BidConfig.tsx
30470
- import React304, { useCallback as useCallback100, useEffect as useEffect104, useMemo as useMemo110, useState as useState156 } from "react";
30494
+ import React304, { useCallback as useCallback100, useEffect as useEffect104, useMemo as useMemo111, useState as useState156 } from "react";
30471
30495
  import { Alert as Alert42, Button as Button60, Loader as Loader50, Stack as Stack198, Text as Text186 } from "@mantine/core";
30472
30496
  import { IconInfoCircle as IconInfoCircle7 } from "@tabler/icons-react";
30473
30497
 
@@ -30556,7 +30580,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30556
30580
  void fetchCollections();
30557
30581
  }
30558
30582
  }, [local.deedDid, local.collectionId]);
30559
- const collectionOptions = useMemo110(
30583
+ const collectionOptions = useMemo111(
30560
30584
  () => collections.map((collection) => ({
30561
30585
  value: collection.id,
30562
30586
  label: formatCollectionOptionLabel(collection)
@@ -30607,7 +30631,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30607
30631
  };
30608
30632
 
30609
30633
  // src/mantine/blocks/action/actionTypes/bid/BidFlowDetail.tsx
30610
- import React308, { useCallback as useCallback102, useEffect as useEffect107, useMemo as useMemo112, useRef as useRef37, useState as useState159 } from "react";
30634
+ import React308, { useCallback as useCallback102, useEffect as useEffect107, useMemo as useMemo113, useRef as useRef37, useState as useState159 } from "react";
30611
30635
  import { Loader as Loader53, Stack as Stack201, Text as Text189 } from "@mantine/core";
30612
30636
  import { IconPlayerPlay as IconPlayerPlay5 } from "@tabler/icons-react";
30613
30637
  import { SurveyModel as SurveyModel9 } from "@ixo/surveys";
@@ -30618,8 +30642,8 @@ import { Survey as Survey9 } from "@ixo/surveys";
30618
30642
  var StableSurvey = React305.memo(Survey9, (prev, next) => prev.model === next.model);
30619
30643
 
30620
30644
  // src/mantine/blocks/action/actionTypes/_shared/groupExecution/ActAsGroupSection.tsx
30621
- import React306, { useEffect as useEffect105, useMemo as useMemo111, useRef as useRef35, useState as useState157 } from "react";
30622
- import { Alert as Alert43, Group as Group106, Loader as Loader51, SegmentedControl as SegmentedControl13, Stack as Stack199, Text as Text187, Tooltip as Tooltip30 } from "@mantine/core";
30645
+ import React306, { useEffect as useEffect105, useMemo as useMemo112, useRef as useRef35, useState as useState157 } from "react";
30646
+ import { Alert as Alert43, Group as Group106, Loader as Loader51, SegmentedControl as SegmentedControl14, Stack as Stack199, Text as Text187, Tooltip as Tooltip30 } from "@mantine/core";
30623
30647
  import { IconInfoCircle as IconInfoCircle8, IconUsersGroup as IconUsersGroup4 } from "@tabler/icons-react";
30624
30648
  function emptyActAsGroupState() {
30625
30649
  return { actAsGroup: false, groupCoreAddress: "", proposalTitle: "", proposalDescription: "" };
@@ -30680,12 +30704,12 @@ var ActAsGroupSection = ({ value, onChange, isDisabled, actionLabel, authzFilter
30680
30704
  cancelled = true;
30681
30705
  };
30682
30706
  }, [authzFilterKey]);
30683
- const podOptions = useMemo111(() => buildPodOptions(groups), [groups]);
30707
+ const podOptions = useMemo112(() => buildPodOptions(groups), [groups]);
30684
30708
  const available = groups.length > 0 && typeof handlers?.createGroupExecutionProposal === "function";
30685
30709
  if (!available) return null;
30686
30710
  const update = (patch) => onChange({ ...value, ...patch });
30687
30711
  return /* @__PURE__ */ React306.createElement(Stack199, { gap: "sm" }, /* @__PURE__ */ React306.createElement(Stack199, { gap: 4 }, /* @__PURE__ */ React306.createElement(Text187, { size: "sm", fw: 500 }, "Acting as"), /* @__PURE__ */ React306.createElement(
30688
- SegmentedControl13,
30712
+ SegmentedControl14,
30689
30713
  {
30690
30714
  value: value.actAsGroup ? "group" : "self",
30691
30715
  onChange: (v) => {
@@ -30920,17 +30944,17 @@ var BidFlowDetail = ({
30920
30944
  useEffect107(() => {
30921
30945
  handlersRef.current = handlers;
30922
30946
  }, [handlers]);
30923
- const actorDid = useMemo112(() => {
30947
+ const actorDid = useMemo113(() => {
30924
30948
  try {
30925
30949
  return handlers?.getCurrentUser?.()?.address || "";
30926
30950
  } catch {
30927
30951
  return "";
30928
30952
  }
30929
30953
  }, [handlers]);
30930
- const parsed = useMemo112(() => parseBidActionInputs(inputs), [inputs]);
30954
+ const parsed = useMemo113(() => parseBidActionInputs(inputs), [inputs]);
30931
30955
  const editorDocument = editor?.document || [];
30932
30956
  const runtimeReader = useRunRuntimeReader(editor);
30933
- const resolveOpts = useMemo112(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
30957
+ const resolveOpts = useMemo113(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
30934
30958
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
30935
30959
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
30936
30960
  const [role, setRole] = useState159("service_agent");
@@ -30942,7 +30966,7 @@ var BidFlowDetail = ({
30942
30966
  const [userBid, setUserBid] = useState159(null);
30943
30967
  const [userRole, setUserRole] = useState159(null);
30944
30968
  const [surveyReady, setSurveyReady] = useState159(false);
30945
- const surveyModel = useMemo112(() => {
30969
+ const surveyModel = useMemo113(() => {
30946
30970
  if (!surveyJson) return null;
30947
30971
  const model = new SurveyModel9(surveyJson);
30948
30972
  model.applyTheme(surveyTheme);
@@ -31208,7 +31232,7 @@ registerActionTypeUI("qi/bid.submit", {
31208
31232
  import { IconScale as IconScale3 } from "@tabler/icons-react";
31209
31233
 
31210
31234
  // src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidConfig.tsx
31211
- import React309, { useCallback as useCallback103, useEffect as useEffect108, useMemo as useMemo113, useState as useState160 } from "react";
31235
+ import React309, { useCallback as useCallback103, useEffect as useEffect108, useMemo as useMemo114, useState as useState160 } from "react";
31212
31236
  import { Alert as Alert45, Button as Button61, Loader as Loader54, Stack as Stack202 } from "@mantine/core";
31213
31237
 
31214
31238
  // src/mantine/blocks/action/actionTypes/evaluateBid/types.ts
@@ -31286,7 +31310,7 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31286
31310
  void fetchCollections();
31287
31311
  }
31288
31312
  }, [local.deedDid, local.collectionId]);
31289
- const collectionOptions = useMemo113(
31313
+ const collectionOptions = useMemo114(
31290
31314
  () => collections.map((collection) => ({
31291
31315
  value: collection.id,
31292
31316
  label: formatCollectionOptionLabel(collection)
@@ -31335,14 +31359,14 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31335
31359
  };
31336
31360
 
31337
31361
  // src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
31338
- import React314, { useCallback as useCallback105, useEffect as useEffect109, useMemo as useMemo114, useRef as useRef38, useState as useState164 } from "react";
31362
+ import React314, { useCallback as useCallback105, useEffect as useEffect109, useMemo as useMemo115, useRef as useRef38, useState as useState164 } from "react";
31339
31363
  import { ActionIcon as ActionIcon45, Badge as Badge49, Box as Box57, Button as Button62, Divider as Divider21, Group as Group111, Loader as Loader55, Stack as Stack205, Text as Text193, UnstyledButton as UnstyledButton4 } from "@mantine/core";
31340
31364
  import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck21, IconFilter } from "@tabler/icons-react";
31341
31365
 
31342
31366
  // src/mantine/components/CollapsibleSection.tsx
31343
31367
  import React310, { useState as useState161 } from "react";
31344
- import { Box as Box55, Collapse as Collapse9, Group as Group108, Text as Text190, UnstyledButton as UnstyledButton2 } from "@mantine/core";
31345
- import { IconChevronDown as IconChevronDown9, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
31368
+ import { Box as Box55, Collapse as Collapse8, Group as Group108, Text as Text190, UnstyledButton as UnstyledButton2 } from "@mantine/core";
31369
+ import { IconChevronDown as IconChevronDown8, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
31346
31370
  function CollapsibleSection({ title, defaultOpen = false, badge, children }) {
31347
31371
  const [opened, setOpened] = useState161(defaultOpen);
31348
31372
  return /* @__PURE__ */ React310.createElement(
@@ -31354,8 +31378,8 @@ function CollapsibleSection({ title, defaultOpen = false, badge, children }) {
31354
31378
  background: "var(--mantine-color-neutralColor-4)"
31355
31379
  }
31356
31380
  },
31357
- /* @__PURE__ */ React310.createElement(UnstyledButton2, { onClick: () => setOpened((v) => !v), style: { width: "100%" } }, /* @__PURE__ */ React310.createElement(Group108, { gap: "xs", align: "center" }, opened ? icon(IconChevronDown9, 16) : icon(IconChevronRight11, 16), /* @__PURE__ */ React310.createElement(Text190, { fw: 500, size: "sm" }, title), badge)),
31358
- /* @__PURE__ */ React310.createElement(Collapse9, { in: opened }, /* @__PURE__ */ React310.createElement(Box55, { mt: "sm" }, children))
31381
+ /* @__PURE__ */ React310.createElement(UnstyledButton2, { onClick: () => setOpened((v) => !v), style: { width: "100%" } }, /* @__PURE__ */ React310.createElement(Group108, { gap: "xs", align: "center" }, opened ? icon(IconChevronDown8, 16) : icon(IconChevronRight11, 16), /* @__PURE__ */ React310.createElement(Text190, { fw: 500, size: "sm" }, title), badge)),
31382
+ /* @__PURE__ */ React310.createElement(Collapse8, { in: opened }, /* @__PURE__ */ React310.createElement(Box55, { mt: "sm" }, children))
31359
31383
  );
31360
31384
  }
31361
31385
 
@@ -31449,7 +31473,7 @@ import { IconPaperclip } from "@tabler/icons-react";
31449
31473
 
31450
31474
  // src/mantine/components/MediaPreviewModal.tsx
31451
31475
  import React312 from "react";
31452
- import { Anchor, Box as Box56, Center as Center13, Group as Group109, Modal as Modal3, Stack as Stack203, Text as Text191 } from "@mantine/core";
31476
+ import { Anchor, Box as Box56, Center as Center12, Group as Group109, Modal as Modal3, Stack as Stack203, Text as Text191 } from "@mantine/core";
31453
31477
  import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
31454
31478
  import { IconDownload as IconDownload5 } from "@tabler/icons-react";
31455
31479
  function detectKind(type, name) {
@@ -31493,7 +31517,7 @@ var MediaPreviewModal = ({ file, onClose }) => {
31493
31517
  }
31494
31518
  } : void 0
31495
31519
  },
31496
- file && /* @__PURE__ */ React312.createElement(Stack203, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React312.createElement(Center13, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React312.createElement(
31520
+ file && /* @__PURE__ */ React312.createElement(Stack203, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React312.createElement(Center12, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React312.createElement(
31497
31521
  "img",
31498
31522
  {
31499
31523
  src: file.content,
@@ -31501,7 +31525,7 @@ var MediaPreviewModal = ({ file, onClose }) => {
31501
31525
  style: { display: "block", maxWidth: "100%", maxHeight: "100%", width: "auto", height: "auto", objectFit: "contain", borderRadius: 8 }
31502
31526
  }
31503
31527
  )), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
31504
- /* @__PURE__ */ React312.createElement("video", { src: file.content, controls: true, style: { width: "100%", flex: 1, minHeight: 0, borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React312.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React312.createElement(Box56, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React312.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React312.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React312.createElement(Text191, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
31528
+ /* @__PURE__ */ React312.createElement("video", { src: file.content, controls: true, style: { width: "100%", flex: 1, minHeight: 0, borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React312.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React312.createElement(Box56, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React312.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React312.createElement(Center12, { p: "xl" }, /* @__PURE__ */ React312.createElement(Text191, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
31505
31529
  );
31506
31530
  };
31507
31531
 
@@ -31666,10 +31690,10 @@ var EvaluateBidFlowDetail = ({
31666
31690
  useEffect109(() => {
31667
31691
  handlersRef.current = handlers;
31668
31692
  }, [handlers]);
31669
- const parsed = useMemo114(() => parseEvaluateBidActionInputs(inputs), [inputs]);
31693
+ const parsed = useMemo115(() => parseEvaluateBidActionInputs(inputs), [inputs]);
31670
31694
  const editorDocument = editor?.document || [];
31671
31695
  const runtimeReader = useRunRuntimeReader(editor);
31672
- const resolveOpts = useMemo114(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
31696
+ const resolveOpts = useMemo115(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
31673
31697
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
31674
31698
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
31675
31699
  const [bids, setBids] = useState164([]);
@@ -31683,8 +31707,8 @@ var EvaluateBidFlowDetail = ({
31683
31707
  const [activeFilter, setActiveFilter] = useState164("pending");
31684
31708
  const [paymentRows, setPaymentRows] = useState164([createPaymentRow()]);
31685
31709
  const [profilesByDid, setProfilesByDid] = useState164({});
31686
- const selectedBid = useMemo114(() => bids.find((bid) => bid.id === selectedBidId) || null, [bids, selectedBidId]);
31687
- const filteredBids = useMemo114(() => {
31710
+ const selectedBid = useMemo115(() => bids.find((bid) => bid.id === selectedBidId) || null, [bids, selectedBidId]);
31711
+ const filteredBids = useMemo115(() => {
31688
31712
  if (activeFilter === "all") return bids;
31689
31713
  return bids.filter((bid) => getBidStatus(bid, t).key === activeFilter);
31690
31714
  }, [bids, activeFilter]);
@@ -32019,7 +32043,7 @@ registerActionTypeUI("qi/bid.evaluate", {
32019
32043
  import { IconFileText as IconFileText5 } from "@tabler/icons-react";
32020
32044
 
32021
32045
  // src/mantine/blocks/action/actionTypes/claim/ClaimConfig.tsx
32022
- import React315, { useCallback as useCallback106, useEffect as useEffect110, useMemo as useMemo115, useRef as useRef39, useState as useState165 } from "react";
32046
+ import React315, { useCallback as useCallback106, useEffect as useEffect110, useMemo as useMemo116, useRef as useRef39, useState as useState165 } from "react";
32023
32047
  import { Alert as Alert46, Button as Button63, Loader as Loader56, Stack as Stack206, Text as Text194 } from "@mantine/core";
32024
32048
 
32025
32049
  // src/mantine/blocks/action/actionTypes/claim/types.ts
@@ -32140,7 +32164,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
32140
32164
  void fetchCollections();
32141
32165
  }
32142
32166
  }, [local.deedDid, local.collectionId]);
32143
- const collectionOptions = useMemo115(
32167
+ const collectionOptions = useMemo116(
32144
32168
  () => collections.map((collection) => ({
32145
32169
  value: collection.id,
32146
32170
  label: formatCollectionOptionLabel(collection)
@@ -32195,8 +32219,8 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
32195
32219
  };
32196
32220
 
32197
32221
  // src/mantine/blocks/action/actionTypes/claim/ClaimFlowDetail.tsx
32198
- import React316, { useCallback as useCallback107, useEffect as useEffect111, useMemo as useMemo116, useRef as useRef40, useState as useState166 } from "react";
32199
- import { ActionIcon as ActionIcon46, Box as Box58, Collapse as Collapse10, Group as Group112, Loader as Loader57, Stack as Stack207, Text as Text195, UnstyledButton as UnstyledButton5 } from "@mantine/core";
32222
+ import React316, { useCallback as useCallback107, useEffect as useEffect111, useMemo as useMemo117, useRef as useRef40, useState as useState166 } from "react";
32223
+ import { ActionIcon as ActionIcon46, Box as Box58, Collapse as Collapse9, Group as Group112, Loader as Loader57, Stack as Stack207, Text as Text195, UnstyledButton as UnstyledButton5 } from "@mantine/core";
32200
32224
  import { IconArrowLeft as IconArrowLeft9, IconCheck as IconCheck22, IconChevronRight as IconChevronRight12, IconPlayerPlay as IconPlayerPlay6 } from "@tabler/icons-react";
32201
32225
  import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
32202
32226
 
@@ -32334,17 +32358,17 @@ var ClaimFlowDetail = ({
32334
32358
  useEffect111(() => {
32335
32359
  handlersRef.current = handlers;
32336
32360
  }, [handlers]);
32337
- const actorDid = useMemo116(() => {
32361
+ const actorDid = useMemo117(() => {
32338
32362
  try {
32339
32363
  return handlers?.getCurrentUser?.()?.address || "";
32340
32364
  } catch {
32341
32365
  return "";
32342
32366
  }
32343
32367
  }, [handlers]);
32344
- const parsed = useMemo116(() => parseClaimActionInputs(inputs), [inputs]);
32368
+ const parsed = useMemo117(() => parseClaimActionInputs(inputs), [inputs]);
32345
32369
  const editorDocument = editor?.document || [];
32346
32370
  const runtimeReader = useRunRuntimeReader(editor);
32347
- const resolveOpts = useMemo116(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
32371
+ const resolveOpts = useMemo117(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
32348
32372
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
32349
32373
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
32350
32374
  const [claims, setClaims] = useState166([]);
@@ -32367,15 +32391,15 @@ var ClaimFlowDetail = ({
32367
32391
  const [disputeDetails, setDisputeDetails] = useState166(null);
32368
32392
  const [loadingDispute, setLoadingDispute] = useState166(false);
32369
32393
  const [claimsExpanded, setClaimsExpanded] = useState166(false);
32370
- const selectedClaim = useMemo116(() => claims.find((c) => c.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
32371
- const selectedClaimStatus = useMemo116(() => selectedClaim ? getClaimStatusInfo(selectedClaim) : null, [selectedClaim]);
32394
+ const selectedClaim = useMemo117(() => claims.find((c) => c.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
32395
+ const selectedClaimStatus = useMemo117(() => selectedClaim ? getClaimStatusInfo(selectedClaim) : null, [selectedClaim]);
32372
32396
  const isSelectedDisputed = selectedClaimStatus?.key === "disputed";
32373
32397
  const checkSurveyCompleteness = useCallback107((model) => {
32374
32398
  const allRequired = model.getAllQuestions(true).filter((q) => q.isRequired);
32375
32399
  const isComplete = allRequired.length === 0 || allRequired.every((q) => !q.isEmpty());
32376
32400
  setSurveyComplete(isComplete);
32377
32401
  }, []);
32378
- const surveyModel = useMemo116(() => {
32402
+ const surveyModel = useMemo117(() => {
32379
32403
  if (!surveyJson) return null;
32380
32404
  const model = new SurveyModel10(surveyJson);
32381
32405
  model.applyTheme(surveyTheme);
@@ -32420,7 +32444,7 @@ var ClaimFlowDetail = ({
32420
32444
  mediaBlobCacheRef.current.clear();
32421
32445
  };
32422
32446
  }, []);
32423
- const detailSurveyModel = useMemo116(() => {
32447
+ const detailSurveyModel = useMemo117(() => {
32424
32448
  if (!surveyJson || !selectedClaimData) return null;
32425
32449
  const model = new SurveyModel10(surveyJson);
32426
32450
  model.applyTheme(surveyTheme);
@@ -32810,7 +32834,7 @@ var ClaimFlowDetail = ({
32810
32834
  defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
32811
32835
  did: "DID",
32812
32836
  claimCollection: "claim collection"
32813
- })) : /* @__PURE__ */ React316.createElement(React316.Fragment, null, /* @__PURE__ */ React316.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.shared.collectionPrefix", { id: collectionId, defaultValue: `Collection: ${collectionId}` })), loadingClaims ? /* @__PURE__ */ React316.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingYourClaims", { defaultValue: "Loading your claims..." })) : claims.length === 0 ? /* @__PURE__ */ React316.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.noClaimsYet", { defaultValue: "No claims submitted for this collection yet." })) : /* @__PURE__ */ React316.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React316.createElement(UnstyledButton5, { onClick: () => setClaimsExpanded((prev) => !prev), style: { color: "var(--mantine-color-text)" } }, /* @__PURE__ */ React316.createElement(Group112, { gap: 6, align: "center" }, /* @__PURE__ */ React316.createElement(IconChevronRight12, { size: 16, style: { transform: claimsExpanded ? "rotate(90deg)" : "none", transition: "transform 150ms ease", flexShrink: 0 } }), /* @__PURE__ */ React316.createElement(Text195, { size: "sm", fw: 600 }, t("actionTypes.claim.flow.yourClaims", { defaultValue: "Your Claims" }), " (", claims.length, ")"))), /* @__PURE__ */ React316.createElement(Collapse10, { in: claimsExpanded }, /* @__PURE__ */ React316.createElement(Stack207, { gap: "xs" }, claims.map((claim) => {
32837
+ })) : /* @__PURE__ */ React316.createElement(React316.Fragment, null, /* @__PURE__ */ React316.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.shared.collectionPrefix", { id: collectionId, defaultValue: `Collection: ${collectionId}` })), loadingClaims ? /* @__PURE__ */ React316.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingYourClaims", { defaultValue: "Loading your claims..." })) : claims.length === 0 ? /* @__PURE__ */ React316.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.noClaimsYet", { defaultValue: "No claims submitted for this collection yet." })) : /* @__PURE__ */ React316.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React316.createElement(UnstyledButton5, { onClick: () => setClaimsExpanded((prev) => !prev), style: { color: "var(--mantine-color-text)" } }, /* @__PURE__ */ React316.createElement(Group112, { gap: 6, align: "center" }, /* @__PURE__ */ React316.createElement(IconChevronRight12, { size: 16, style: { transform: claimsExpanded ? "rotate(90deg)" : "none", transition: "transform 150ms ease", flexShrink: 0 } }), /* @__PURE__ */ React316.createElement(Text195, { size: "sm", fw: 600 }, t("actionTypes.claim.flow.yourClaims", { defaultValue: "Your Claims" }), " (", claims.length, ")"))), /* @__PURE__ */ React316.createElement(Collapse9, { in: claimsExpanded }, /* @__PURE__ */ React316.createElement(Stack207, { gap: "xs" }, claims.map((claim) => {
32814
32838
  const status = getClaimStatusInfo(claim);
32815
32839
  const profile = profilesByDid[claim.agentDid];
32816
32840
  const displayName = profile?.displayname || claim.agentDid || claim.agentAddress;
@@ -32862,7 +32886,7 @@ registerActionTypeUI("qi/claim.submit", {
32862
32886
  import { IconFolders as IconFolders2 } from "@tabler/icons-react";
32863
32887
 
32864
32888
  // src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleConfig.tsx
32865
- import React317, { useCallback as useCallback108, useEffect as useEffect112, useMemo as useMemo117, useState as useState167 } from "react";
32889
+ import React317, { useCallback as useCallback108, useEffect as useEffect112, useMemo as useMemo118, useState as useState167 } from "react";
32866
32890
  import { Alert as Alert47, Badge as Badge50, Button as Button64, Group as Group113, Loader as Loader58, Stack as Stack208, Text as Text196 } from "@mantine/core";
32867
32891
  import { IconInfoCircle as IconInfoCircle9 } from "@tabler/icons-react";
32868
32892
  var DEFAULT7 = {
@@ -32935,7 +32959,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32935
32959
  setLoadingProtocols(false);
32936
32960
  }
32937
32961
  }, [handlers, local.entity, local.protocol, update]);
32938
- const protocolOptions = useMemo117(
32962
+ const protocolOptions = useMemo118(
32939
32963
  () => protocols.map((p) => ({
32940
32964
  value: p.protocolId,
32941
32965
  label: p.hasValidClaim ? `${p.title}${p.isHeadlineMetric ? " \xB7 Headline" : ""}` : `${p.title || p.protocolId} (no claim data)`,
@@ -32985,8 +33009,8 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32985
33009
  };
32986
33010
 
32987
33011
  // src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleFlowDetail.tsx
32988
- import React318, { useCallback as useCallback109, useEffect as useEffect113, useMemo as useMemo118, useRef as useRef41, useState as useState168 } from "react";
32989
- import { Badge as Badge51, Box as Box59, Button as Button65, Group as Group114, Loader as Loader59, Overlay, SegmentedControl as SegmentedControl14, Stack as Stack209, Text as Text197 } from "@mantine/core";
33012
+ import React318, { useCallback as useCallback109, useEffect as useEffect113, useMemo as useMemo119, useRef as useRef41, useState as useState168 } from "react";
33013
+ import { Badge as Badge51, Box as Box59, Button as Button65, Group as Group114, Loader as Loader59, Overlay, SegmentedControl as SegmentedControl15, Stack as Stack209, Text as Text197 } from "@mantine/core";
32990
33014
  import { DateTimePicker as DateTimePicker2 } from "@mantine/dates";
32991
33015
  import { IconAlertCircle as IconAlertCircle27, IconCheck as IconCheck23, IconRefresh as IconRefresh8 } from "@tabler/icons-react";
32992
33016
 
@@ -33140,11 +33164,11 @@ var CollectionLifecycleFlowDetail = ({
33140
33164
  executeAction
33141
33165
  }) => {
33142
33166
  const [actAs, setActAs] = useState168(emptyActAsGroupState());
33143
- const parsed = useMemo118(() => parseTemplateInputs(inputs), [inputs]);
33167
+ const parsed = useMemo119(() => parseTemplateInputs(inputs), [inputs]);
33144
33168
  const editorDocument = editor?.document || [];
33145
33169
  const runtimeReader = useRunRuntimeReader(editor);
33146
- const resolveOpts = useMemo118(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
33147
- const boundCollectionId = useMemo118(() => resolveReferences(parsed.collectionId || "", editorDocument, resolveOpts).trim(), [parsed.collectionId, editorDocument, resolveOpts]);
33170
+ const resolveOpts = useMemo119(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
33171
+ const boundCollectionId = useMemo119(() => resolveReferences(parsed.collectionId || "", editorDocument, resolveOpts).trim(), [parsed.collectionId, editorDocument, resolveOpts]);
33148
33172
  const output = runtime.output || void 0;
33149
33173
  const outputCollectionId = output?.collectionId || "";
33150
33174
  const effectiveCollectionId = outputCollectionId || boundCollectionId;
@@ -33247,7 +33271,7 @@ var CollectionLifecycleFlowDetail = ({
33247
33271
  }
33248
33272
  }, [boundCollectionId, outputCollectionId, parsed.collectionId, inputs, editor, block]);
33249
33273
  const currentCount = toNumberOrUndefined(output?.count) ?? 0;
33250
- const validation = useMemo118(() => {
33274
+ const validation = useMemo119(() => {
33251
33275
  if (operation === "refresh") return { ok: true };
33252
33276
  if (operation === "create") {
33253
33277
  if (!parsed.entity) return { ok: false, error: "Entity (deed) DID is required \u2014 configure it in template mode." };
@@ -33426,7 +33450,7 @@ var CollectionLifecycleFlowDetail = ({
33426
33450
  const title = block?.props?.title || (isCreateMode ? "Create Claim Collection" : "Manage Claim Collection");
33427
33451
  const description = block?.props?.description || "";
33428
33452
  return /* @__PURE__ */ React318.createElement(Stack209, { gap: "md", pos: "relative" }, /* @__PURE__ */ React318.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React318.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "update this collection" }), /* @__PURE__ */ React318.createElement(Stack209, { gap: 2 }, /* @__PURE__ */ React318.createElement(Text197, { fw: 600 }, title), description && /* @__PURE__ */ React318.createElement(Text197, { size: "sm", c: "dimmed" }, description)), isStale && /* @__PURE__ */ React318.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React318.createElement(IconAlertCircle27, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React318.createElement(Stack209, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Text197, { size: "sm" }, "Block was marked completed but no collection state was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React318.createElement(Group114, null, /* @__PURE__ */ React318.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React318.createElement(Button65, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React318.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React318.createElement(IconAlertCircle27, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React318.createElement(Stack209, { gap: "xs" }, errorMessage && /* @__PURE__ */ React318.createElement(Text197, { size: "sm" }, errorMessage), /* @__PURE__ */ React318.createElement(Group114, null, /* @__PURE__ */ React318.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!effectiveCollectionId && /* @__PURE__ */ React318.createElement(Button65, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React318.createElement(IconRefresh8, { size: 14 }), onClick: handleManualRefresh }, "Refresh State")))), isManageMode && !hasSnapshot && !isRunning && !isFailed && /* @__PURE__ */ React318.createElement(Group114, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Loader59, { size: 14 }), /* @__PURE__ */ React318.createElement(Text197, { size: "sm", c: "dimmed" }, "Loading collection ", effectiveCollectionId ? `(${effectiveCollectionId})` : "", "\u2026")), hasSnapshot && /* @__PURE__ */ React318.createElement(Stack209, { gap: "md" }, /* @__PURE__ */ React318.createElement(StatsStrip, { output }), isCompletedWithProof && /* @__PURE__ */ React318.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React318.createElement(IconCheck23, { size: 16 }), color: "green", styles: actionAlertStyles }, "Collection ", outputCollectionId, " synced \u2014 ", stateLabel(output?.state), "."), /* @__PURE__ */ React318.createElement(
33429
- SegmentedControl14,
33453
+ SegmentedControl15,
33430
33454
  {
33431
33455
  fullWidth: true,
33432
33456
  value: operation === "create" ? "updateState" : operation,
@@ -33441,7 +33465,7 @@ var CollectionLifecycleFlowDetail = ({
33441
33465
  ]
33442
33466
  }
33443
33467
  ), operation === "updateState" && /* @__PURE__ */ React318.createElement(
33444
- SegmentedControl14,
33468
+ SegmentedControl15,
33445
33469
  {
33446
33470
  fullWidth: true,
33447
33471
  value: String(targetState),
@@ -33592,8 +33616,8 @@ registerActionTypeUI("qi/collection.lifecycle", {
33592
33616
  import { IconUsers as IconUsers8 } from "@tabler/icons-react";
33593
33617
 
33594
33618
  // src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersConfig.tsx
33595
- import React319, { useCallback as useCallback110, useEffect as useEffect114, useMemo as useMemo119, useState as useState169 } from "react";
33596
- import { Alert as Alert48, Button as Button66, Group as Group115, Loader as Loader60, Paper as Paper24, Select as Select9, Stack as Stack210, Text as Text198 } from "@mantine/core";
33619
+ import React319, { useCallback as useCallback110, useEffect as useEffect114, useMemo as useMemo120, useState as useState169 } from "react";
33620
+ import { Alert as Alert48, Button as Button66, Group as Group115, Loader as Loader60, Paper as Paper25, Select as Select9, Stack as Stack210, Text as Text198 } from "@mantine/core";
33597
33621
  import { IconBolt as IconBolt11, IconClock as IconClock13, IconPencil } from "@tabler/icons-react";
33598
33622
 
33599
33623
  // src/mantine/blocks/action/actionTypes/collectionUsers/types.ts
@@ -33614,7 +33638,7 @@ function serializeCollectionUsersActionInputs(inputs) {
33614
33638
 
33615
33639
  // src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersConfig.tsx
33616
33640
  var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__PURE__ */ React319.createElement(
33617
- Paper24,
33641
+ Paper25,
33618
33642
  {
33619
33643
  withBorder: true,
33620
33644
  p: "sm",
@@ -33654,7 +33678,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33654
33678
  setLocal(parseCollectionUsersActionInputs(inputs));
33655
33679
  setTriggerRaw(readTriggerRaw());
33656
33680
  }, [inputs, readTriggerRaw]);
33657
- const triggerSpec = useMemo119(() => {
33681
+ const triggerSpec = useMemo120(() => {
33658
33682
  if (!triggerRaw) return null;
33659
33683
  try {
33660
33684
  return JSON.parse(triggerRaw);
@@ -33679,7 +33703,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33679
33703
  },
33680
33704
  [local, onInputsChange]
33681
33705
  );
33682
- const sourceOptions = useMemo119(() => {
33706
+ const sourceOptions = useMemo120(() => {
33683
33707
  const blocks = editor?.document || [];
33684
33708
  return blocks.filter((b) => b?.id && b.id !== blockId).map((b) => {
33685
33709
  const action = getAction(b.props?.actionType || "");
@@ -33689,7 +33713,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33689
33713
  return { value: b.id, label: String(b.props?.title || action?.type || b.id), eventName: collectionEvent.name };
33690
33714
  }).filter((o) => o !== null);
33691
33715
  }, [editor, blockId, triggerRaw, inputs]);
33692
- const selectedSource = useMemo119(() => sourceOptions.find((o) => o.value === triggerSpec?.sourceBlockId), [sourceOptions, triggerSpec]);
33716
+ const selectedSource = useMemo120(() => sourceOptions.find((o) => o.value === triggerSpec?.sourceBlockId), [sourceOptions, triggerSpec]);
33693
33717
  const switchToTrigger = useCallback110(() => {
33694
33718
  if (mode === "trigger") return;
33695
33719
  const cleared = { deedDid: "", collectionId: "" };
@@ -33750,7 +33774,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33750
33774
  void fetchCollections();
33751
33775
  }
33752
33776
  }, [local.deedDid, local.collectionId]);
33753
- const collectionOptions = useMemo119(
33777
+ const collectionOptions = useMemo120(
33754
33778
  () => collections.map((collection) => ({
33755
33779
  value: collection.id,
33756
33780
  label: formatCollectionOptionLabel(collection)
@@ -33831,8 +33855,8 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33831
33855
  };
33832
33856
 
33833
33857
  // src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersFlowDetail.tsx
33834
- import React320, { useCallback as useCallback111, useEffect as useEffect115, useMemo as useMemo120, useRef as useRef42, useState as useState170 } from "react";
33835
- import { ActionIcon as ActionIcon47, Alert as MantineAlert, Badge as Badge52, Box as Box60, Button as Button67, Divider as Divider22, Group as Group116, Loader as Loader61, Radio as Radio5, SegmentedControl as SegmentedControl15, Stack as Stack211, Text as Text199 } from "@mantine/core";
33858
+ import React320, { useCallback as useCallback111, useEffect as useEffect115, useMemo as useMemo121, useRef as useRef42, useState as useState170 } from "react";
33859
+ import { ActionIcon as ActionIcon47, Alert as MantineAlert, Badge as Badge52, Box as Box60, Button as Button67, Divider as Divider22, Group as Group116, Loader as Loader61, Radio as Radio5, SegmentedControl as SegmentedControl16, Stack as Stack211, Text as Text199 } from "@mantine/core";
33836
33860
  import { useDebouncedValue } from "@mantine/hooks";
33837
33861
  import { IconAlertCircle as IconAlertCircle28, IconArrowLeft as IconArrowLeft10, IconCheck as IconCheck24, IconRefresh as IconRefresh9, IconTrash as IconTrash10 } from "@tabler/icons-react";
33838
33862
  var LOG2 = "[collection.users]";
@@ -33965,22 +33989,22 @@ var CollectionUsersFlowDetail = ({
33965
33989
  useEffect115(() => {
33966
33990
  handlersRef.current = handlers;
33967
33991
  }, [handlers]);
33968
- const parsed = useMemo120(() => parseCollectionUsersActionInputs(inputs), [inputs]);
33992
+ const parsed = useMemo121(() => parseCollectionUsersActionInputs(inputs), [inputs]);
33969
33993
  const editorDocument = editor?.document || [];
33970
33994
  const runtimeReader = useRunRuntimeReader(editor);
33971
- const resolveOpts = useMemo120(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
33972
- const templateDeedDid = useMemo120(() => resolveReferences(parsed.deedDid || "", editorDocument, resolveOpts).trim(), [parsed.deedDid, editorDocument, resolveOpts]);
33973
- const templateCollectionId = useMemo120(() => resolveReferences(parsed.collectionId || "", editorDocument, resolveOpts).trim(), [parsed.collectionId, editorDocument, resolveOpts]);
33995
+ const resolveOpts = useMemo121(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
33996
+ const templateDeedDid = useMemo121(() => resolveReferences(parsed.deedDid || "", editorDocument, resolveOpts).trim(), [parsed.deedDid, editorDocument, resolveOpts]);
33997
+ const templateCollectionId = useMemo121(() => resolveReferences(parsed.collectionId || "", editorDocument, resolveOpts).trim(), [parsed.collectionId, editorDocument, resolveOpts]);
33974
33998
  const isListener = !!activePendingInvocation;
33975
- const pendingPayload = useMemo120(() => {
33999
+ const pendingPayload = useMemo121(() => {
33976
34000
  if (!activePendingInvocation) return void 0;
33977
34001
  return {
33978
34002
  ...activePendingInvocation.payload || {},
33979
34003
  ...activePendingInvocation.refSnapshots || {}
33980
34004
  };
33981
34005
  }, [activePendingInvocation]);
33982
- const deedDid = useMemo120(() => String(pendingPayload?.entity || "").trim() || templateDeedDid, [pendingPayload, templateDeedDid]);
33983
- const collectionId = useMemo120(() => String(pendingPayload?.collectionId || "").trim() || templateCollectionId, [pendingPayload, templateCollectionId]);
34006
+ const deedDid = useMemo121(() => String(pendingPayload?.entity || "").trim() || templateDeedDid, [pendingPayload, templateDeedDid]);
34007
+ const collectionId = useMemo121(() => String(pendingPayload?.collectionId || "").trim() || templateCollectionId, [pendingPayload, templateCollectionId]);
33984
34008
  const [adminAddress, setAdminAddress] = useState170("");
33985
34009
  const [adminError, setAdminError] = useState170(null);
33986
34010
  useEffect115(() => {
@@ -34009,7 +34033,7 @@ var CollectionUsersFlowDetail = ({
34009
34033
  }, [deedDid]);
34010
34034
  const output = runtime.output || void 0;
34011
34035
  const lastOp = String(output?.operation || "");
34012
- const listGrantees = useMemo120(() => {
34036
+ const listGrantees = useMemo121(() => {
34013
34037
  const out = output;
34014
34038
  return Array.isArray(out?.grantees) ? out.grantees : [];
34015
34039
  }, [output]);
@@ -34177,7 +34201,7 @@ var CollectionUsersFlowDetail = ({
34177
34201
  mounted = false;
34178
34202
  };
34179
34203
  }, [listGrantees, granteeProfilesByDid]);
34180
- const validation = useMemo120(() => {
34204
+ const validation = useMemo121(() => {
34181
34205
  if (section === "bids") return { ok: false };
34182
34206
  if (!collectionId) return { ok: false, error: "No collection configured. Set one in template mode." };
34183
34207
  if (!adminAddress) return { ok: false, error: adminError || "Resolving entity admin account\u2026" };
@@ -34315,7 +34339,7 @@ var CollectionUsersFlowDetail = ({
34315
34339
  did: "DID",
34316
34340
  claimCollection: "claim collection"
34317
34341
  })), isStale && /* @__PURE__ */ React320.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React320.createElement(IconAlertCircle28, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React320.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Text199, { size: "sm" }, "Block was marked completed but no result was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React320.createElement(Group116, null, /* @__PURE__ */ React320.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React320.createElement(Button67, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React320.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React320.createElement(IconAlertCircle28, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React320.createElement(Stack211, { gap: "xs" }, errorMessage && /* @__PURE__ */ React320.createElement(Text199, { size: "sm" }, errorMessage), /* @__PURE__ */ React320.createElement(Group116, null, /* @__PURE__ */ React320.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!collectionId && !!adminAddress && /* @__PURE__ */ React320.createElement(Button67, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React320.createElement(IconRefresh9, { size: 14 }), onClick: handleManualRefreshList }, "Refresh List")))), isCompletedWithProof && hasTxProof && (lastOp === "add" || lastOp === "revoke") && /* @__PURE__ */ React320.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React320.createElement(IconCheck24, { size: 16 }), color: "green", styles: actionAlertStyles }, lastOp === "add" ? "Grant broadcast" : "Revoke broadcast", " \u2014 tx ", truncateAddress4(String(output?.transactionHash || "")), "."), !configMissing && /* @__PURE__ */ React320.createElement(
34318
- SegmentedControl15,
34342
+ SegmentedControl16,
34319
34343
  {
34320
34344
  fullWidth: true,
34321
34345
  value: section,
@@ -34441,8 +34465,8 @@ var BidInboxSection = ({
34441
34465
  const [submitting, setSubmitting] = useState170(false);
34442
34466
  const [profilesByDid, setProfilesByDid] = useState170({});
34443
34467
  const [lastDecision, setLastDecision] = useState170(null);
34444
- const selectedBid = useMemo120(() => bids.find((b) => b.id === selectedBidId) || null, [bids, selectedBidId]);
34445
- const selectedBidIsEvaluator = useMemo120(() => {
34468
+ const selectedBid = useMemo121(() => bids.find((b) => b.id === selectedBidId) || null, [bids, selectedBidId]);
34469
+ const selectedBidIsEvaluator = useMemo121(() => {
34446
34470
  const role = String(selectedBid?.role || "").toLowerCase();
34447
34471
  return role === "evaluation_agent" || role === "ea";
34448
34472
  }, [selectedBid]);
@@ -34712,8 +34736,8 @@ registerActionTypeUI("qi/collection.users", {
34712
34736
  import { IconClipboardCheck } from "@tabler/icons-react";
34713
34737
 
34714
34738
  // src/mantine/blocks/action/actionTypes/evalEngine/EvalEngineConfig.tsx
34715
- import React321, { useCallback as useCallback112, useEffect as useEffect117, useMemo as useMemo121, useRef as useRef44, useState as useState172 } from "react";
34716
- import { Alert as Alert49, Button as Button68, Checkbox as Checkbox14, Group as Group117, Loader as Loader62, Paper as Paper25, Select as Select10, Stack as Stack212, Switch as Switch12, Text as Text200 } from "@mantine/core";
34739
+ import React321, { useCallback as useCallback112, useEffect as useEffect117, useMemo as useMemo122, useRef as useRef44, useState as useState172 } from "react";
34740
+ import { Alert as Alert49, Button as Button68, Checkbox as Checkbox14, Group as Group117, Loader as Loader62, Paper as Paper26, Select as Select10, Stack as Stack212, Switch as Switch12, Text as Text200 } from "@mantine/core";
34717
34741
  import { IconAlertTriangle as IconAlertTriangle12, IconBolt as IconBolt12, IconClock as IconClock14, IconInfoCircle as IconInfoCircle10, IconPencil as IconPencil2 } from "@tabler/icons-react";
34718
34742
 
34719
34743
  // src/mantine/blocks/action/actionTypes/evalRegister/types.ts
@@ -34930,7 +34954,7 @@ var GrantCapInput = ({ title, description, value, onChange }) => /* @__PURE__ */
34930
34954
  }
34931
34955
  )));
34932
34956
  var ModeCard2 = ({ active, icon: icon2, title, description, onClick }) => /* @__PURE__ */ React321.createElement(
34933
- Paper25,
34957
+ Paper26,
34934
34958
  {
34935
34959
  withBorder: true,
34936
34960
  p: "sm",
@@ -34969,7 +34993,7 @@ var EvalEngineConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34969
34993
  setLocal(parseEvalEngineInputs(inputs));
34970
34994
  setTriggerRaw(readTriggerRaw());
34971
34995
  }, [inputs, readTriggerRaw]);
34972
- const triggerSpec = useMemo121(() => {
34996
+ const triggerSpec = useMemo122(() => {
34973
34997
  if (!triggerRaw) return null;
34974
34998
  try {
34975
34999
  return JSON.parse(triggerRaw);
@@ -35010,7 +35034,7 @@ var EvalEngineConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35010
35034
  mounted = false;
35011
35035
  };
35012
35036
  }, []);
35013
- const sourceOptions = useMemo121(() => {
35037
+ const sourceOptions = useMemo122(() => {
35014
35038
  const blocks = editor?.document || [];
35015
35039
  return blocks.filter((b) => b?.id && b.id !== blockId).map((b) => {
35016
35040
  const action = getAction(b.props?.actionType || "");
@@ -35020,7 +35044,7 @@ var EvalEngineConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35020
35044
  return { value: b.id, label: String(b.props?.title || action?.type || b.id), eventName: collectionEvent.name };
35021
35045
  }).filter((o) => o !== null);
35022
35046
  }, [editor, blockId, triggerRaw, inputs]);
35023
- const selectedSource = useMemo121(() => sourceOptions.find((o) => o.value === triggerSpec?.sourceBlockId), [sourceOptions, triggerSpec]);
35047
+ const selectedSource = useMemo122(() => sourceOptions.find((o) => o.value === triggerSpec?.sourceBlockId), [sourceOptions, triggerSpec]);
35024
35048
  const switchToTrigger = useCallback112(() => {
35025
35049
  if (mode === "trigger") return;
35026
35050
  const cleared = { ...local, deedDid: "", collectionId: "" };
@@ -35077,7 +35101,7 @@ var EvalEngineConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35077
35101
  void fetchCollections();
35078
35102
  }
35079
35103
  }, [local.deedDid, local.collectionId]);
35080
- const collectionOptions = useMemo121(
35104
+ const collectionOptions = useMemo122(
35081
35105
  () => collections.map((collection) => ({
35082
35106
  value: collection.id,
35083
35107
  label: formatCollectionOptionLabel(collection)
@@ -35288,22 +35312,22 @@ var EvalEngineConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35288
35312
  };
35289
35313
 
35290
35314
  // src/mantine/blocks/action/actionTypes/evalEngine/EvalEngineFlowDetail.tsx
35291
- import React335, { useCallback as useCallback114, useEffect as useEffect123, useMemo as useMemo128, useRef as useRef49, useState as useState181 } from "react";
35292
- import { ActionIcon as ActionIcon53, Alert as Alert55, Badge as Badge54, Box as Box64, Button as Button76, Group as Group130, Loader as Loader65, Paper as Paper35, Stack as Stack224, Text as Text212 } from "@mantine/core";
35293
- import { IconAlertCircle as IconAlertCircle29, IconAlertTriangle as IconAlertTriangle17, IconArrowRight as IconArrowRight3, IconCheck as IconCheck26, IconInfoCircle as IconInfoCircle11, IconTrash as IconTrash14 } from "@tabler/icons-react";
35315
+ import React335, { useCallback as useCallback114, useEffect as useEffect123, useMemo as useMemo129, useRef as useRef49, useState as useState181 } from "react";
35316
+ import { ActionIcon as ActionIcon53, Alert as Alert55, Badge as Badge54, Box as Box64, Button as Button76, Group as Group130, Loader as Loader65, Paper as Paper36, Stack as Stack224, Text as Text212 } from "@mantine/core";
35317
+ import { IconAlertCircle as IconAlertCircle29, IconAlertTriangle as IconAlertTriangle17, IconArrowRight as IconArrowRight4, IconCheck as IconCheck26, IconInfoCircle as IconInfoCircle11, IconTrash as IconTrash14 } from "@tabler/icons-react";
35294
35318
 
35295
35319
  // src/mantine/blocks/action/actionTypes/evalRubric/AdvancedPanel.tsx
35296
35320
  import React322 from "react";
35297
- import { Button as Button69, Code as Code12, CopyButton as CopyButton2, Group as Group118, ScrollArea as ScrollArea8, Stack as Stack213 } from "@mantine/core";
35321
+ import { Button as Button69, Code as Code12, CopyButton as CopyButton2, Group as Group118, ScrollArea as ScrollArea9, Stack as Stack213 } from "@mantine/core";
35298
35322
  var AdvancedPanel = ({ body }) => /* @__PURE__ */ React322.createElement(CollapsibleSection, { title: "Your rules, as the machine reads them" }, /* @__PURE__ */ React322.createElement(MachineView, { body }));
35299
35323
  var MachineView = ({ body }) => {
35300
35324
  const text = JSON.stringify(buildRubricEnvelope(body), null, 2);
35301
- return /* @__PURE__ */ React322.createElement(Stack213, { gap: "xs" }, /* @__PURE__ */ React322.createElement(Group118, { justify: "flex-end" }, /* @__PURE__ */ React322.createElement(CopyButton2, { value: text }, ({ copied, copy }) => /* @__PURE__ */ React322.createElement(Button69, { size: "compact-xs", variant: "subtle", onClick: copy }, copied ? "Copied" : "Copy"))), /* @__PURE__ */ React322.createElement(ScrollArea8.Autosize, { mah: 280 }, /* @__PURE__ */ React322.createElement(Code12, { block: true, style: { fontSize: 11 } }, text)));
35325
+ return /* @__PURE__ */ React322.createElement(Stack213, { gap: "xs" }, /* @__PURE__ */ React322.createElement(Group118, { justify: "flex-end" }, /* @__PURE__ */ React322.createElement(CopyButton2, { value: text }, ({ copied, copy }) => /* @__PURE__ */ React322.createElement(Button69, { size: "compact-xs", variant: "subtle", onClick: copy }, copied ? "Copied" : "Copy"))), /* @__PURE__ */ React322.createElement(ScrollArea9.Autosize, { mah: 280 }, /* @__PURE__ */ React322.createElement(Code12, { block: true, style: { fontSize: 11 } }, text)));
35302
35326
  };
35303
35327
 
35304
35328
  // src/mantine/blocks/action/actionTypes/evalRubric/ApprovalPolicy.tsx
35305
35329
  import React324, { useEffect as useEffect118, useRef as useRef45, useState as useState173 } from "react";
35306
- import { Box as Box61, Button as Button70, Checkbox as Checkbox15, Group as Group119, Paper as Paper26, SegmentedControl as SegmentedControl16, Stack as Stack214, Text as Text201 } from "@mantine/core";
35330
+ import { Box as Box61, Button as Button70, Checkbox as Checkbox15, Group as Group119, Paper as Paper27, SegmentedControl as SegmentedControl17, Stack as Stack214, Text as Text201 } from "@mantine/core";
35307
35331
  import { IconPin } from "@tabler/icons-react";
35308
35332
 
35309
35333
  // src/mantine/blocks/action/actionTypes/evalRubric/phrases.ts
@@ -36442,8 +36466,8 @@ var ApprovalPolicy = ({ body, index, checkCount, onChange, disabled }) => {
36442
36466
  const ctx = { fields: index, aiChecks: body.aiChecks };
36443
36467
  const pinnedTitles = state.rows.filter((row) => row.selected && row.pinned).map((row) => rowTitle(row, ctx));
36444
36468
  const sentence = state.tab === "all" ? describeApproval(checkCount) : restCount === 0 ? "" : describePolicy({ tab: state.tab, pinned: pinnedTitles, restCount, n: state.n, reason: state.reason.trim() || POLICY_DEFAULT_REASON });
36445
- return /* @__PURE__ */ React324.createElement(Paper26, { p: 18, style: cardStyle }, /* @__PURE__ */ React324.createElement(Stack214, { gap: "sm" }, /* @__PURE__ */ React324.createElement(Group119, { gap: "sm", justify: "space-between", align: "center", wrap: "wrap" }, /* @__PURE__ */ React324.createElement(Text201, { size: "sm", fw: 600 }, "When is a claim approved?"), /* @__PURE__ */ React324.createElement(
36446
- SegmentedControl16,
36469
+ return /* @__PURE__ */ React324.createElement(Paper27, { p: 18, style: cardStyle }, /* @__PURE__ */ React324.createElement(Stack214, { gap: "sm" }, /* @__PURE__ */ React324.createElement(Group119, { gap: "sm", justify: "space-between", align: "center", wrap: "wrap" }, /* @__PURE__ */ React324.createElement(Text201, { size: "sm", fw: 600 }, "When is a claim approved?"), /* @__PURE__ */ React324.createElement(
36470
+ SegmentedControl17,
36447
36471
  {
36448
36472
  styles: segmentedPill,
36449
36473
  value: state.foreign ? "" : state.tab,
@@ -36502,19 +36526,19 @@ var ApprovalPolicy = ({ body, index, checkCount, onChange, disabled }) => {
36502
36526
  };
36503
36527
 
36504
36528
  // src/mantine/blocks/action/actionTypes/evalRubric/LinkedRuleEditor.tsx
36505
- import React326, { useMemo as useMemo123, useState as useState174 } from "react";
36506
- import { ActionIcon as ActionIcon48, Alert as Alert50, Button as Button71, Group as Group121, Modal as Modal4, Paper as Paper27, ScrollArea as ScrollArea9, Stack as Stack216, Text as Text203 } from "@mantine/core";
36529
+ import React326, { useMemo as useMemo124, useState as useState174 } from "react";
36530
+ import { ActionIcon as ActionIcon48, Alert as Alert50, Button as Button71, Group as Group121, Modal as Modal4, Paper as Paper28, ScrollArea as ScrollArea10, Stack as Stack216, Text as Text203 } from "@mantine/core";
36507
36531
  import { IconAlertTriangle as IconAlertTriangle13, IconPlus as IconPlus9, IconRobot as IconRobot4, IconTrash as IconTrash11 } from "@tabler/icons-react";
36508
36532
 
36509
36533
  // src/mantine/blocks/action/actionTypes/evalRubric/ValueInput.tsx
36510
- import React325, { useMemo as useMemo122 } from "react";
36511
- import { Group as Group120, SegmentedControl as SegmentedControl17, Stack as Stack215, TagsInput, Text as Text202 } from "@mantine/core";
36534
+ import React325, { useMemo as useMemo123 } from "react";
36535
+ import { Group as Group120, SegmentedControl as SegmentedControl18, Stack as Stack215, TagsInput, Text as Text202 } from "@mantine/core";
36512
36536
  import { DateTimePicker as DateTimePicker3 } from "@mantine/dates";
36513
36537
  var CTX_DATES = ["ctx.now", "ctx.collection.startDate", "ctx.collection.endDate", "ctx.claim.submissionDate"];
36514
36538
  var ValueInput = ({ op, field, index, value, tolerance, onChange, disabled }) => {
36515
36539
  const kind = field?.kind ?? "text";
36516
36540
  const setValue = (next) => onChange({ value: next });
36517
- const refOptions = useMemo122(() => {
36541
+ const refOptions = useMemo123(() => {
36518
36542
  const needed = comparableKind(op, kind);
36519
36543
  const options = [...index.values()].filter((entry) => entry.kind === needed && entry.path !== field?.path && !entry.path.includes("[*]")).map((entry) => ({ value: entry.path, label: entry.title }));
36520
36544
  if (needed === "date") options.push(...CTX_DATES.map((token) => ({ value: token, label: CTX_LABEL[token] })));
@@ -36620,7 +36644,7 @@ var LiteralOrRef = ({ kind, field, refOptions, value, onChange, disabled }) => {
36620
36644
  const isRef = typeof value === "string" && (value.startsWith("$") || value.startsWith("ctx.") || value.startsWith("ext."));
36621
36645
  const mode = isRef ? "ref" : "literal";
36622
36646
  return /* @__PURE__ */ React325.createElement(Stack215, { gap: 6 }, refOptions.length > 0 && /* @__PURE__ */ React325.createElement(
36623
- SegmentedControl17,
36647
+ SegmentedControl18,
36624
36648
  {
36625
36649
  size: "xs",
36626
36650
  styles: segmentedPill,
@@ -37267,16 +37291,16 @@ var LinkedRuleEditor = ({ opened, onClose, body, catalog, index, initialChecked,
37267
37291
  });
37268
37292
  const checkedField = index.get(draft.checkedField);
37269
37293
  const guardField = index.get(draft.guardField);
37270
- const ctx = useMemo123(() => ({ fields: index }), [index]);
37271
- const checkedOptions = useMemo123(
37294
+ const ctx = useMemo124(() => ({ fields: index }), [index]);
37295
+ const checkedOptions = useMemo124(
37272
37296
  () => [...index.values()].filter((entry) => entry.path !== draft.guardField).map((entry) => ({ value: entry.path, label: entry.title })),
37273
37297
  [index, draft.guardField]
37274
37298
  );
37275
- const guardOptions = useMemo123(
37299
+ const guardOptions = useMemo124(
37276
37300
  () => [...index.values()].filter((entry) => GUARD_KINDS.has(entry.kind) && entry.path !== draft.checkedField && !entry.path.includes("[*]")).map((entry) => ({ value: entry.path, label: entry.title })),
37277
37301
  [index, draft.checkedField]
37278
37302
  );
37279
- const opOptions = useMemo123(
37303
+ const opOptions = useMemo124(
37280
37304
  () => [
37281
37305
  ...legalOps(index, draft.checkedField).map((op) => {
37282
37306
  const phrase = OPERATOR_PHRASE[op];
@@ -37325,7 +37349,7 @@ var LinkedRuleEditor = ({ opened, onClose, body, catalog, index, initialChecked,
37325
37349
  const setCase = (at, patch) => setDraft((current) => ({ ...current, cases: current.cases.map((row, i) => i === at ? { ...row, ...patch } : row) }));
37326
37350
  const addCase = () => setDraft((current) => ({ ...current, cases: [...current.cases, {}] }));
37327
37351
  const removeCase = (at) => setDraft((current) => current.cases.length <= 1 ? current : { ...current, cases: current.cases.filter((_, i) => i !== at) });
37328
- const preview = useMemo123(() => {
37352
+ const preview = useMemo124(() => {
37329
37353
  const base = editing ? removeGatesAt(body, editing.indices) : body;
37330
37354
  const applied = applyLinkedDraft(base, { ...draft, editing: void 0 }, index);
37331
37355
  const first = base.gates?.length ?? 0;
@@ -37366,7 +37390,7 @@ var LinkedRuleEditor = ({ opened, onClose, body, catalog, index, initialChecked,
37366
37390
  size: "xl",
37367
37391
  radius: 14,
37368
37392
  styles: { title: { fontWeight: 600 } },
37369
- scrollAreaComponent: ScrollArea9.Autosize
37393
+ scrollAreaComponent: ScrollArea10.Autosize
37370
37394
  },
37371
37395
  /* @__PURE__ */ React326.createElement(Stack216, { gap: "md" }, /* @__PURE__ */ React326.createElement(Group121, { gap: 8, align: "center", wrap: "wrap" }, /* @__PURE__ */ React326.createElement(BaseSelect, { w: 230, styles: chipInput, data: checkedOptions, value: draft.checkedField, onChange: pickChecked, searchable: checkedOptions.length > 6 }), /* @__PURE__ */ React326.createElement(
37372
37396
  BaseSelect,
@@ -37390,7 +37414,7 @@ var LinkedRuleEditor = ({ opened, onClose, body, catalog, index, initialChecked,
37390
37414
  searchable: guardOptions.length > 6,
37391
37415
  placeholder: "Which answer?"
37392
37416
  }
37393
- )), /* @__PURE__ */ React326.createElement(Paper27, { p: "md", style: panelStyle }, /* @__PURE__ */ React326.createElement(Stack216, { gap: 8 }, /* @__PURE__ */ React326.createElement(Text203, { style: microLabelStyle }, "The cases"), draft.cases.map((row, at) => /* @__PURE__ */ React326.createElement(Group121, { key: at, gap: 8, align: "flex-start", wrap: "wrap" }, /* @__PURE__ */ React326.createElement(Text203, { mt: 6, style: leadWordStyle }, "If it is"), /* @__PURE__ */ React326.createElement(LiteralInput, { kind: guardField?.kind ?? "text", field: guardField, value: row.guardValue, onChange: (next) => setCase(at, { guardValue: next }) }), draft.aiMode ? /* @__PURE__ */ React326.createElement(React326.Fragment, null, /* @__PURE__ */ React326.createElement(Text203, { mt: 6, style: leadWordStyle }, LINKED_AI_ROW_LEAD), /* @__PURE__ */ React326.createElement(
37417
+ )), /* @__PURE__ */ React326.createElement(Paper28, { p: "md", style: panelStyle }, /* @__PURE__ */ React326.createElement(Stack216, { gap: 8 }, /* @__PURE__ */ React326.createElement(Text203, { style: microLabelStyle }, "The cases"), draft.cases.map((row, at) => /* @__PURE__ */ React326.createElement(Group121, { key: at, gap: 8, align: "flex-start", wrap: "wrap" }, /* @__PURE__ */ React326.createElement(Text203, { mt: 6, style: leadWordStyle }, "If it is"), /* @__PURE__ */ React326.createElement(LiteralInput, { kind: guardField?.kind ?? "text", field: guardField, value: row.guardValue, onChange: (next) => setCase(at, { guardValue: next }) }), draft.aiMode ? /* @__PURE__ */ React326.createElement(React326.Fragment, null, /* @__PURE__ */ React326.createElement(Text203, { mt: 6, style: leadWordStyle }, LINKED_AI_ROW_LEAD), /* @__PURE__ */ React326.createElement(
37394
37418
  BaseTextInput,
37395
37419
  {
37396
37420
  style: { flex: 1, minWidth: 260 },
@@ -37418,7 +37442,7 @@ var LinkedRuleEditor = ({ opened, onClose, body, catalog, index, initialChecked,
37418
37442
  tolerance: draft.elseCase.tolerance,
37419
37443
  onChange: (patch) => setDraft((current) => ({ ...current, elseCase: { ...current.elseCase, ...patch } }))
37420
37444
  }
37421
- ), opSuffix && /* @__PURE__ */ React326.createElement(Text203, { mt: 6, size: "sm", c: "dimmed" }, opSuffix))), /* @__PURE__ */ React326.createElement(Button71, { variant: "subtle", size: "compact-sm", styles: quietButton, style: { alignSelf: "flex-start" }, leftSection: /* @__PURE__ */ React326.createElement(IconPlus9, { size: 14 }), onClick: addCase }, "Add another case"))), draft.aiMode && /* @__PURE__ */ React326.createElement(Paper27, { p: "md", style: panelStyle }, /* @__PURE__ */ React326.createElement(Stack216, { gap: "xs" }, /* @__PURE__ */ React326.createElement(Group121, { gap: 6, wrap: "nowrap" }, icon(IconRobot4, 16), /* @__PURE__ */ React326.createElement(Text203, { size: "sm", fw: 600 }, AI_SEES_LABEL)), /* @__PURE__ */ React326.createElement(Text203, { size: "xs", c: "dimmed" }, aiSeesHint(fieldTitle(draft.checkedField, ctx))), /* @__PURE__ */ React326.createElement(Text203, { size: "xs", c: "dimmed" }, AI_SETTING_HINT), /* @__PURE__ */ React326.createElement(
37445
+ ), opSuffix && /* @__PURE__ */ React326.createElement(Text203, { mt: 6, size: "sm", c: "dimmed" }, opSuffix))), /* @__PURE__ */ React326.createElement(Button71, { variant: "subtle", size: "compact-sm", styles: quietButton, style: { alignSelf: "flex-start" }, leftSection: /* @__PURE__ */ React326.createElement(IconPlus9, { size: 14 }), onClick: addCase }, "Add another case"))), draft.aiMode && /* @__PURE__ */ React326.createElement(Paper28, { p: "md", style: panelStyle }, /* @__PURE__ */ React326.createElement(Stack216, { gap: "xs" }, /* @__PURE__ */ React326.createElement(Group121, { gap: 6, wrap: "nowrap" }, icon(IconRobot4, 16), /* @__PURE__ */ React326.createElement(Text203, { size: "sm", fw: 600 }, AI_SEES_LABEL)), /* @__PURE__ */ React326.createElement(Text203, { size: "xs", c: "dimmed" }, aiSeesHint(fieldTitle(draft.checkedField, ctx))), /* @__PURE__ */ React326.createElement(Text203, { size: "xs", c: "dimmed" }, AI_SETTING_HINT), /* @__PURE__ */ React326.createElement(
37422
37446
  BaseMultiSelect,
37423
37447
  {
37424
37448
  styles: chipInput,
@@ -37445,7 +37469,7 @@ var LinkedRuleEditor = ({ opened, onClose, body, catalog, index, initialChecked,
37445
37469
 
37446
37470
  // src/mantine/blocks/action/actionTypes/evalRubric/RuleCard.tsx
37447
37471
  import React327 from "react";
37448
- import { ActionIcon as ActionIcon49, Alert as Alert51, Box as Box62, Button as Button72, Group as Group122, Paper as Paper28, Stack as Stack217, Text as Text204 } from "@mantine/core";
37472
+ import { ActionIcon as ActionIcon49, Alert as Alert51, Box as Box62, Button as Button72, Group as Group122, Paper as Paper29, Stack as Stack217, Text as Text204 } from "@mantine/core";
37449
37473
  import { IconAlertTriangle as IconAlertTriangle14, IconLink as IconLink5, IconPencil as IconPencil3, IconPlus as IconPlus10, IconTrash as IconTrash12 } from "@tabler/icons-react";
37450
37474
  var RuleCard = ({
37451
37475
  field,
@@ -37465,7 +37489,7 @@ var RuleCard = ({
37465
37489
  const errors = problems.filter((problem) => problem.severity === "error");
37466
37490
  const warnings = problems.filter((problem) => problem.severity === "warning");
37467
37491
  const ctx = { fields: index, aiChecks };
37468
- return /* @__PURE__ */ React327.createElement(Paper28, { p: 18, style: { ...cardStyle, ...errors.length > 0 ? { borderColor: "var(--mantine-color-red-6)" } : {} } }, /* @__PURE__ */ React327.createElement(Stack217, { gap: "sm" }, /* @__PURE__ */ React327.createElement(Group122, { gap: "xs", justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React327.createElement(Group122, { gap: 8, wrap: "nowrap" }, /* @__PURE__ */ React327.createElement(Text204, { size: "sm", c: "dimmed" }, "\u25CF"), /* @__PURE__ */ React327.createElement(Text204, { size: "sm", fw: 600 }, field.title), field.isRequired && /* @__PURE__ */ React327.createElement(Text204, { size: "xs", c: "dimmed" }, "(always asked)")), /* @__PURE__ */ React327.createElement(Text204, { style: microLabelStyle }, KIND_LABEL[field.kind])), rules.length === 0 && (linked ?? []).length === 0 ? /* @__PURE__ */ React327.createElement(Text204, { size: "xs", c: "dimmed", pl: 20 }, "No rules yet \u2014 this answer won't be checked.") : rules.map((rule) => {
37492
+ return /* @__PURE__ */ React327.createElement(Paper29, { p: 18, style: { ...cardStyle, ...errors.length > 0 ? { borderColor: "var(--mantine-color-red-6)" } : {} } }, /* @__PURE__ */ React327.createElement(Stack217, { gap: "sm" }, /* @__PURE__ */ React327.createElement(Group122, { gap: "xs", justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React327.createElement(Group122, { gap: 8, wrap: "nowrap" }, /* @__PURE__ */ React327.createElement(Text204, { size: "sm", c: "dimmed" }, "\u25CF"), /* @__PURE__ */ React327.createElement(Text204, { size: "sm", fw: 600 }, field.title), field.isRequired && /* @__PURE__ */ React327.createElement(Text204, { size: "xs", c: "dimmed" }, "(always asked)")), /* @__PURE__ */ React327.createElement(Text204, { style: microLabelStyle }, KIND_LABEL[field.kind])), rules.length === 0 && (linked ?? []).length === 0 ? /* @__PURE__ */ React327.createElement(Text204, { size: "xs", c: "dimmed", pl: 20 }, "No rules yet \u2014 this answer won't be checked.") : rules.map((rule) => {
37469
37493
  const grownShape = rule.consequence === "reject" ? rule.grown : void 0;
37470
37494
  return /* @__PURE__ */ React327.createElement(Group122, { key: rule.code, gap: "sm", align: "flex-start", wrap: "nowrap", pl: 20 }, /* @__PURE__ */ React327.createElement(Box62, { mt: 2, style: consequencePillStyle(CONSEQUENCES.find((entry) => entry.value === rule.consequence)?.color ?? SLATE) }, consequenceIcon(rule.consequence, 15)), /* @__PURE__ */ React327.createElement(Box62, { style: { flex: 1 } }, grownShape && !grownShape.editable ? (
37471
37495
  // A compound the builder cannot represent — quiet, honest,
@@ -37489,19 +37513,19 @@ function unique(problems) {
37489
37513
  }
37490
37514
 
37491
37515
  // src/mantine/blocks/action/actionTypes/evalRubric/RuleEditor.tsx
37492
- import React332, { useMemo as useMemo125, useState as useState177 } from "react";
37493
- import { ActionIcon as ActionIcon52, Alert as Alert53, Box as Box63, Button as Button75, Divider as Divider24, Group as Group127, Modal as Modal5, Paper as Paper32, ScrollArea as ScrollArea10, Stack as Stack221, Text as Text209 } from "@mantine/core";
37516
+ import React332, { useMemo as useMemo126, useState as useState177 } from "react";
37517
+ import { ActionIcon as ActionIcon52, Alert as Alert53, Box as Box63, Button as Button75, Divider as Divider24, Group as Group127, Modal as Modal5, Paper as Paper33, ScrollArea as ScrollArea11, Stack as Stack221, Text as Text209 } from "@mantine/core";
37494
37518
  import { IconAlertTriangle as IconAlertTriangle16, IconPlus as IconPlus12, IconRobot as IconRobot6, IconTrash as IconTrash13, IconWand as IconWand2, IconWorld as IconWorld4, IconX as IconX20 } from "@tabler/icons-react";
37495
37519
 
37496
37520
  // src/mantine/blocks/action/actionTypes/evalRubric/AiCheckInline.tsx
37497
37521
  import React328 from "react";
37498
- import { ActionIcon as ActionIcon50, Button as Button73, Group as Group123, Paper as Paper29, Stack as Stack218, Text as Text205 } from "@mantine/core";
37522
+ import { ActionIcon as ActionIcon50, Button as Button73, Group as Group123, Paper as Paper30, Stack as Stack218, Text as Text205 } from "@mantine/core";
37499
37523
  import { IconPlus as IconPlus11, IconRobot as IconRobot5, IconX as IconX18 } from "@tabler/icons-react";
37500
37524
  var AiCheckInline = ({ ai, questionTitle, onChange, disabled, index }) => {
37501
37525
  const setRule = (at, text) => onChange({ ...ai, instructions: ai.instructions.map((rule, i) => i === at ? text : rule) });
37502
37526
  const removeRule2 = (at) => onChange({ ...ai, instructions: ai.instructions.filter((_, i) => i !== at) });
37503
37527
  const addRule = () => onChange({ ...ai, instructions: [...ai.instructions, ""] });
37504
- return /* @__PURE__ */ React328.createElement(Paper29, { p: "md", style: panelStyle }, /* @__PURE__ */ React328.createElement(Stack218, { gap: "xs" }, /* @__PURE__ */ React328.createElement(Group123, { gap: 6, wrap: "nowrap" }, icon(IconRobot5, 16), /* @__PURE__ */ React328.createElement(Text205, { size: "sm", fw: 600 }, "What should the AI check?")), /* @__PURE__ */ React328.createElement(Text205, { size: "xs", c: "dimmed" }, "While a claim is judged, the AI reads \u201C", questionTitle, "\u201D and passes it only when every rule below holds."), /* @__PURE__ */ React328.createElement(Text205, { size: "xs", c: "dimmed" }, AI_SETTING_HINT), /* @__PURE__ */ React328.createElement(Stack218, { gap: 6 }, ai.instructions.map((rule, at) => (
37528
+ return /* @__PURE__ */ React328.createElement(Paper30, { p: "md", style: panelStyle }, /* @__PURE__ */ React328.createElement(Stack218, { gap: "xs" }, /* @__PURE__ */ React328.createElement(Group123, { gap: 6, wrap: "nowrap" }, icon(IconRobot5, 16), /* @__PURE__ */ React328.createElement(Text205, { size: "sm", fw: 600 }, "What should the AI check?")), /* @__PURE__ */ React328.createElement(Text205, { size: "xs", c: "dimmed" }, "While a claim is judged, the AI reads \u201C", questionTitle, "\u201D and passes it only when every rule below holds."), /* @__PURE__ */ React328.createElement(Text205, { size: "xs", c: "dimmed" }, AI_SETTING_HINT), /* @__PURE__ */ React328.createElement(Stack218, { gap: 6 }, ai.instructions.map((rule, at) => (
37505
37529
  // Index keys are safe here: rows are edited in place and only ever
37506
37530
  // removed by index — there is no identity to preserve across reorders.
37507
37531
  /* @__PURE__ */ React328.createElement(Group123, { key: at, gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React328.createElement(
@@ -37532,7 +37556,7 @@ var AiCheckInline = ({ ai, questionTitle, onChange, disabled, index }) => {
37532
37556
  };
37533
37557
 
37534
37558
  // src/mantine/blocks/action/actionTypes/evalRubric/ConditionRow.tsx
37535
- import React329, { useMemo as useMemo124 } from "react";
37559
+ import React329, { useMemo as useMemo125 } from "react";
37536
37560
  import { Group as Group124, Text as Text206 } from "@mantine/core";
37537
37561
  var ConditionRow2 = ({
37538
37562
  index,
@@ -37549,7 +37573,7 @@ var ConditionRow2 = ({
37549
37573
  }) => {
37550
37574
  const field = index.get(rule.field) ?? extRefField(rule.field, sources) ?? aiRefField(rule.field, aiChecks);
37551
37575
  const kind = field?.kind ?? "text";
37552
- const operatorOptions = useMemo124(
37576
+ const operatorOptions = useMemo125(
37553
37577
  () => [
37554
37578
  ...operatorsForKind(kind).map((op) => {
37555
37579
  const phrase = OPERATOR_PHRASE[op];
@@ -37606,7 +37630,7 @@ var ConditionRow2 = ({
37606
37630
 
37607
37631
  // src/mantine/blocks/action/actionTypes/evalRubric/ExternalCheckInline.tsx
37608
37632
  import React330, { useState as useState175 } from "react";
37609
- import { Alert as Alert52, Button as Button74, Code as Code13, Divider as Divider23, Group as Group125, Loader as Loader63, Paper as Paper30, Stack as Stack219, Text as Text207 } from "@mantine/core";
37633
+ import { Alert as Alert52, Button as Button74, Code as Code13, Divider as Divider23, Group as Group125, Loader as Loader63, Paper as Paper31, Stack as Stack219, Text as Text207 } from "@mantine/core";
37610
37634
  import { IconAlertTriangle as IconAlertTriangle15, IconCheck as IconCheck25, IconWorld as IconWorld3 } from "@tabler/icons-react";
37611
37635
  var ExternalCheckInline = ({ ext, questionTitle, onChange, disabled }) => {
37612
37636
  const handlers = useBlocknoteHandlers();
@@ -37668,7 +37692,7 @@ var ExternalCheckInline = ({ ext, questionTitle, onChange, disabled }) => {
37668
37692
  }
37669
37693
  };
37670
37694
  const ready = /^https?:\/\//.test(ext.endpoint) && /^did:web:/.test(ext.audience);
37671
- return /* @__PURE__ */ React330.createElement(Paper30, { p: "md", style: panelStyle }, /* @__PURE__ */ React330.createElement(Stack219, { gap: "xs" }, /* @__PURE__ */ React330.createElement(Group125, { gap: 6, wrap: "nowrap" }, icon(IconWorld3, 16), /* @__PURE__ */ React330.createElement(Text207, { size: "sm", fw: 600 }, "The outside service")), /* @__PURE__ */ React330.createElement(Text207, { size: "xs", c: "dimmed" }, "While a claim is judged, the engine sends \u201C", questionTitle, "\u201D to this service and uses its answer in the rule."), /* @__PURE__ */ React330.createElement(Stack219, { gap: 4 }, /* @__PURE__ */ React330.createElement(
37695
+ return /* @__PURE__ */ React330.createElement(Paper31, { p: "md", style: panelStyle }, /* @__PURE__ */ React330.createElement(Stack219, { gap: "xs" }, /* @__PURE__ */ React330.createElement(Group125, { gap: 6, wrap: "nowrap" }, icon(IconWorld3, 16), /* @__PURE__ */ React330.createElement(Text207, { size: "sm", fw: 600 }, "The outside service")), /* @__PURE__ */ React330.createElement(Text207, { size: "xs", c: "dimmed" }, "While a claim is judged, the engine sends \u201C", questionTitle, "\u201D to this service and uses its answer in the rule."), /* @__PURE__ */ React330.createElement(Stack219, { gap: 4 }, /* @__PURE__ */ React330.createElement(
37672
37696
  BaseTextInput,
37673
37697
  {
37674
37698
  label: "Web address",
@@ -37744,7 +37768,7 @@ function appErrorMessage(error) {
37744
37768
 
37745
37769
  // src/mantine/blocks/action/actionTypes/evalRubric/ReviewTaskEditor.tsx
37746
37770
  import React331, { useEffect as useEffect119, useState as useState176 } from "react";
37747
- import { ActionIcon as ActionIcon51, Group as Group126, Loader as Loader64, Paper as Paper31, SegmentedControl as SegmentedControl18, Stack as Stack220, TagsInput as TagsInput2, Text as Text208 } from "@mantine/core";
37771
+ import { ActionIcon as ActionIcon51, Group as Group126, Loader as Loader64, Paper as Paper32, SegmentedControl as SegmentedControl19, Stack as Stack220, TagsInput as TagsInput2, Text as Text208 } from "@mantine/core";
37748
37772
  import { IconBan as IconBan3, IconCircleCheck as IconCircleCheck2, IconMessages, IconPercentage, IconUser as IconUser14, IconX as IconX19 } from "@tabler/icons-react";
37749
37773
  var VERDICT_OPTIONS = [
37750
37774
  { value: "approve", label: "Approve the claim", Icon: IconCircleCheck2, color: "var(--mantine-color-green-6)" },
@@ -37813,7 +37837,7 @@ var ReviewTaskEditor = ({ fieldOptions, draft, onChange }) => {
37813
37837
  onChange: (verdict) => verdict && onChange({ ...draft, map: { ...draft.map, [answer]: verdict } })
37814
37838
  }
37815
37839
  )))), /* @__PURE__ */ React331.createElement(Stack220, { gap: 6 }, /* @__PURE__ */ React331.createElement(Text208, { style: microLabelStyle }, "If nothing was attached"), /* @__PURE__ */ React331.createElement(
37816
- SegmentedControl18,
37840
+ SegmentedControl19,
37817
37841
  {
37818
37842
  w: 280,
37819
37843
  styles: segmentedPill,
@@ -37836,7 +37860,7 @@ var ReviewerPicker = ({ draft, onChange }) => {
37836
37860
  };
37837
37861
  const pickChannel = (roomId) => onChange({ ...draft, channelRoomId: roomId || void 0, assigneeDid: void 0 });
37838
37862
  return /* @__PURE__ */ React331.createElement(Stack220, { gap: 6 }, /* @__PURE__ */ React331.createElement(Text208, { style: microLabelStyle }, "Who checks it?"), /* @__PURE__ */ React331.createElement(
37839
- SegmentedControl18,
37863
+ SegmentedControl19,
37840
37864
  {
37841
37865
  w: 320,
37842
37866
  size: "xs",
@@ -37881,7 +37905,7 @@ var EngineChannelAccess = ({ roomId }) => {
37881
37905
  }
37882
37906
  return /* @__PURE__ */ React331.createElement(Group126, { gap: 6, wrap: "nowrap" }, icon(IconCircleCheck2, 14, "var(--mantine-color-green-6)"), /* @__PURE__ */ React331.createElement(Text208, { size: "xs", c: "dimmed" }, "The eval engine can post review requests here."));
37883
37907
  };
37884
- var PickedValue = ({ title, value, onClear, clearLabel }) => /* @__PURE__ */ React331.createElement(Paper31, { p: "xs", style: panelStyle }, /* @__PURE__ */ React331.createElement(Group126, { gap: "xs", justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React331.createElement(Stack220, { gap: 0 }, /* @__PURE__ */ React331.createElement(Text208, { size: "sm", fw: 500 }, title), /* @__PURE__ */ React331.createElement(Text208, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, value)), /* @__PURE__ */ React331.createElement(ActionIcon51, { variant: "subtle", color: "red", onClick: onClear, "aria-label": clearLabel }, /* @__PURE__ */ React331.createElement(IconX19, { size: 16 }))));
37908
+ var PickedValue = ({ title, value, onClear, clearLabel }) => /* @__PURE__ */ React331.createElement(Paper32, { p: "xs", style: panelStyle }, /* @__PURE__ */ React331.createElement(Group126, { gap: "xs", justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React331.createElement(Stack220, { gap: 0 }, /* @__PURE__ */ React331.createElement(Text208, { size: "sm", fw: 500 }, title), /* @__PURE__ */ React331.createElement(Text208, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, value)), /* @__PURE__ */ React331.createElement(ActionIcon51, { variant: "subtle", color: "red", onClick: onClear, "aria-label": clearLabel }, /* @__PURE__ */ React331.createElement(IconX19, { size: 16 }))));
37885
37909
  var ChannelSearch = ({ onPick }) => {
37886
37910
  const handlers = useBlocknoteHandlers();
37887
37911
  const canList = typeof handlers.listDomainChannels === "function" || typeof handlers.sourceDomainSpaces === "function";
@@ -38087,12 +38111,12 @@ var RuleEditor = ({ opened, onClose, body, catalog, index, field, editing, onSav
38087
38111
  const ext = draft.ext;
38088
38112
  const ai = draft.ai;
38089
38113
  const grown = draft.grown;
38090
- const draftBody = useMemo125(() => {
38114
+ const draftBody = useMemo126(() => {
38091
38115
  const withLane = ext ? upsertExtSource(body, ext) : ai ? upsertAiCheck(body, ai) : body;
38092
38116
  return grown ? grown.members.reduce((acc, member) => member.kind === "ai" ? upsertAiCheck(acc, member.ai) : acc, withLane) : withLane;
38093
38117
  }, [body, ext, ai, grown]);
38094
- const fieldOptions = useMemo125(() => targetableFields(field).map((entry) => ({ value: entry.path, label: entry.title })), [field]);
38095
- const subjectOptions = useMemo125(
38118
+ const fieldOptions = useMemo126(() => targetableFields(field).map((entry) => ({ value: entry.path, label: entry.title })), [field]);
38119
+ const subjectOptions = useMemo126(
38096
38120
  () => [
38097
38121
  ...fieldOptions,
38098
38122
  { value: EXT_SUBJECT, label: "An outside service checks this answer" },
@@ -38100,10 +38124,10 @@ var RuleEditor = ({ opened, onClose, body, catalog, index, field, editing, onSav
38100
38124
  ],
38101
38125
  [fieldOptions, ai, index, field.title]
38102
38126
  );
38103
- const showOptions = useMemo125(() => [...index.values()].map((entry) => ({ value: entry.path, label: entry.title })), [index]);
38104
- const templates = useMemo125(() => templatesForField(field, body), [field, body]);
38105
- const consequences = useMemo125(() => ai || ext ? CONSEQUENCES.filter((entry) => entry.value === "reject") : CONSEQUENCES, [ext, ai]);
38106
- const preview = useMemo125(() => {
38127
+ const showOptions = useMemo126(() => [...index.values()].map((entry) => ({ value: entry.path, label: entry.title })), [index]);
38128
+ const templates = useMemo126(() => templatesForField(field, body), [field, body]);
38129
+ const consequences = useMemo126(() => ai || ext ? CONSEQUENCES.filter((entry) => entry.value === "reject") : CONSEQUENCES, [ext, ai]);
38130
+ const preview = useMemo126(() => {
38107
38131
  const applied = applyDraft(
38108
38132
  editing ? removeRule(body, editing) : body,
38109
38133
  { ...draft, at: void 0 },
@@ -38199,14 +38223,14 @@ var RuleEditor = ({ opened, onClose, body, catalog, index, field, editing, onSav
38199
38223
  size: "xl",
38200
38224
  radius: 14,
38201
38225
  styles: { title: { fontWeight: 600 } },
38202
- scrollAreaComponent: ScrollArea10.Autosize
38226
+ scrollAreaComponent: ScrollArea11.Autosize
38203
38227
  },
38204
38228
  showTemplates ? /* @__PURE__ */ React332.createElement(Stack221, { gap: "sm" }, /* @__PURE__ */ React332.createElement(Text209, { size: "sm", c: "dimmed" }, "Pick one \u2014 you can change it afterwards."), templates.map((template) => /* @__PURE__ */ React332.createElement(Button75, { key: template.id, variant: "default", justify: "flex-start", size: "md", styles: chipButton, onClick: () => pickTemplate(template.draft) }, template.label)), templates.length === 0 && /* @__PURE__ */ React332.createElement(Text209, { size: "sm", c: "dimmed" }, "There are no quick rules for this kind of answer \u2014 build your own below."), /* @__PURE__ */ React332.createElement(Divider24, { label: "or", labelPosition: "center", color: HAIRLINE }), /* @__PURE__ */ React332.createElement(Button75, { variant: "subtle", styles: quietButton, leftSection: /* @__PURE__ */ React332.createElement(IconWand2, { size: 16 }), onClick: () => setShowTemplates(false) }, "Custom rule")) : /* @__PURE__ */ React332.createElement(Stack221, { gap: "md" }, grown ? (
38205
38229
  /* The checks box (owner 2026-08-03, v3): every check a sentence row
38206
38230
  (or the inline AI lane). ALL of them must pass — no knob; any/
38207
38231
  at-least belong to the rulebook's approval policy. Compiles to
38208
38232
  ONE gate whose `when` is `{all: […]}`. */
38209
- /* @__PURE__ */ React332.createElement(Paper32, { p: "md", style: panelStyle }, /* @__PURE__ */ React332.createElement(Stack221, { gap: 8 }, /* @__PURE__ */ React332.createElement(Text209, { style: microLabelStyle }, GROWN_CHECKS_LABEL), grown.members.map((member, at) => /* @__PURE__ */ React332.createElement(Group127, { key: `${at}-${grown.members.length}`, gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React332.createElement(Box63, { style: { flex: 1 } }, member.kind === "check" ? /* @__PURE__ */ React332.createElement(
38233
+ /* @__PURE__ */ React332.createElement(Paper33, { p: "md", style: panelStyle }, /* @__PURE__ */ React332.createElement(Stack221, { gap: 8 }, /* @__PURE__ */ React332.createElement(Text209, { style: microLabelStyle }, GROWN_CHECKS_LABEL), grown.members.map((member, at) => /* @__PURE__ */ React332.createElement(Group127, { key: `${at}-${grown.members.length}`, gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React332.createElement(Box63, { style: { flex: 1 } }, member.kind === "check" ? /* @__PURE__ */ React332.createElement(
38210
38234
  ConditionRow2,
38211
38235
  {
38212
38236
  index,
@@ -38281,7 +38305,7 @@ var RuleEditor = ({ opened, onClose, body, catalog, index, field, editing, onSav
38281
38305
  description: consequence.hint,
38282
38306
  onClick: () => setConsequence(consequence.value)
38283
38307
  }
38284
- )))), /* @__PURE__ */ React332.createElement(Paper32, { p: "md", style: panelStyle }, draft.consequence === "reject" && /* @__PURE__ */ React332.createElement(Stack221, { gap: "xs" }, ext && /* @__PURE__ */ React332.createElement(Text209, { size: "xs", c: "dimmed" }, "The outside service must confirm this answer \u2014 when it doesn\u2019t, the claim is rejected with your message."), ai && /* @__PURE__ */ React332.createElement(Text209, { size: "xs", c: "dimmed" }, "The AI reads this answer against your rules and gives a yes or a no. When it says no\u2026"), showOnFail && /* @__PURE__ */ React332.createElement(Group127, { gap: "sm", align: "stretch", grow: true }, /* @__PURE__ */ React332.createElement(
38308
+ )))), /* @__PURE__ */ React332.createElement(Paper33, { p: "md", style: panelStyle }, draft.consequence === "reject" && /* @__PURE__ */ React332.createElement(Stack221, { gap: "xs" }, ext && /* @__PURE__ */ React332.createElement(Text209, { size: "xs", c: "dimmed" }, "The outside service must confirm this answer \u2014 when it doesn\u2019t, the claim is rejected with your message."), ai && /* @__PURE__ */ React332.createElement(Text209, { size: "xs", c: "dimmed" }, "The AI reads this answer against your rules and gives a yes or a no. When it says no\u2026"), showOnFail && /* @__PURE__ */ React332.createElement(Group127, { gap: "sm", align: "stretch", grow: true }, /* @__PURE__ */ React332.createElement(
38285
38309
  ConsequenceCard,
38286
38310
  {
38287
38311
  active: !holdsForReview,
@@ -38312,7 +38336,7 @@ var RuleEditor = ({ opened, onClose, body, catalog, index, field, editing, onSav
38312
38336
  value: draft.reject.reason,
38313
38337
  onChange: (event) => setDraft({ ...draft, reject: { ...draft.reject, reason: event.currentTarget.value } })
38314
38338
  }
38315
- )), draft.consequence === "human" && /* @__PURE__ */ React332.createElement(ReviewTaskEditor, { fieldOptions: showOptions, draft: draft.human, onChange: (human) => setDraft((current) => ({ ...current, human })) })), draft.appliesWhen ? /* @__PURE__ */ React332.createElement(Paper32, { p: "sm", style: panelStyle }, /* @__PURE__ */ React332.createElement(Group127, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React332.createElement(Box63, { style: { flex: 1 } }, /* @__PURE__ */ React332.createElement(
38339
+ )), draft.consequence === "human" && /* @__PURE__ */ React332.createElement(ReviewTaskEditor, { fieldOptions: showOptions, draft: draft.human, onChange: (human) => setDraft((current) => ({ ...current, human })) })), draft.appliesWhen ? /* @__PURE__ */ React332.createElement(Paper33, { p: "sm", style: panelStyle }, /* @__PURE__ */ React332.createElement(Group127, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React332.createElement(Box63, { style: { flex: 1 } }, /* @__PURE__ */ React332.createElement(
38316
38340
  ConditionRow2,
38317
38341
  {
38318
38342
  index,
@@ -38345,7 +38369,7 @@ var ConsequenceCard = ({
38345
38369
  description,
38346
38370
  onClick
38347
38371
  }) => /* @__PURE__ */ React332.createElement(
38348
- Paper32,
38372
+ Paper33,
38349
38373
  {
38350
38374
  p: "sm",
38351
38375
  onClick,
@@ -38371,7 +38395,7 @@ var ConsequenceCard = ({
38371
38395
 
38372
38396
  // src/mantine/blocks/action/actionTypes/evalRubric/FrequencyRule.tsx
38373
38397
  import React333, { useEffect as useEffect120, useRef as useRef46, useState as useState178 } from "react";
38374
- import { Group as Group128, Paper as Paper33, SegmentedControl as SegmentedControl19, Stack as Stack222, Switch as Switch13, Text as Text210 } from "@mantine/core";
38398
+ import { Group as Group128, Paper as Paper34, SegmentedControl as SegmentedControl20, Stack as Stack222, Switch as Switch13, Text as Text210 } from "@mantine/core";
38375
38399
 
38376
38400
  // src/mantine/blocks/action/actionTypes/evalRubric/frequencyModel.ts
38377
38401
  var DEFAULT_ID = "claim-limit";
@@ -38423,7 +38447,7 @@ var FrequencyRule = ({ body, onChange, disabled }) => {
38423
38447
  lastWrittenRef.current = json;
38424
38448
  if (json !== bodyJson) onChange(compiled);
38425
38449
  };
38426
- return /* @__PURE__ */ React333.createElement(Paper33, { p: 18, style: cardStyle }, /* @__PURE__ */ React333.createElement(Stack222, { gap: "sm" }, /* @__PURE__ */ React333.createElement(Group128, { gap: "sm", justify: "space-between", align: "center", wrap: "wrap" }, /* @__PURE__ */ React333.createElement(Text210, { size: "sm", fw: 600 }, FREQUENCY_TITLE), /* @__PURE__ */ React333.createElement(Switch13, { size: "sm", checked: state.on, onChange: (event) => commit({ ...state, on: event.currentTarget.checked }), disabled, "aria-label": FREQUENCY_TITLE })), state.on && /* @__PURE__ */ React333.createElement(Stack222, { gap: "sm" }, /* @__PURE__ */ React333.createElement(Text210, { size: "xs", c: "dimmed" }, FREQUENCY_EXPLAINER), /* @__PURE__ */ React333.createElement(Group128, { gap: 8, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React333.createElement(Text210, { size: "sm", fw: 500 }, FREQUENCY_MAX_LEAD), /* @__PURE__ */ React333.createElement(
38450
+ return /* @__PURE__ */ React333.createElement(Paper34, { p: 18, style: cardStyle }, /* @__PURE__ */ React333.createElement(Stack222, { gap: "sm" }, /* @__PURE__ */ React333.createElement(Group128, { gap: "sm", justify: "space-between", align: "center", wrap: "wrap" }, /* @__PURE__ */ React333.createElement(Text210, { size: "sm", fw: 600 }, FREQUENCY_TITLE), /* @__PURE__ */ React333.createElement(Switch13, { size: "sm", checked: state.on, onChange: (event) => commit({ ...state, on: event.currentTarget.checked }), disabled, "aria-label": FREQUENCY_TITLE })), state.on && /* @__PURE__ */ React333.createElement(Stack222, { gap: "sm" }, /* @__PURE__ */ React333.createElement(Text210, { size: "xs", c: "dimmed" }, FREQUENCY_EXPLAINER), /* @__PURE__ */ React333.createElement(Group128, { gap: 8, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React333.createElement(Text210, { size: "sm", fw: 500 }, FREQUENCY_MAX_LEAD), /* @__PURE__ */ React333.createElement(
38427
38451
  BaseNumberInput,
38428
38452
  {
38429
38453
  w: 80,
@@ -38447,7 +38471,7 @@ var FrequencyRule = ({ body, onChange, disabled }) => {
38447
38471
  "aria-label": FREQUENCY_PERIOD_ARIA
38448
38472
  }
38449
38473
  )), /* @__PURE__ */ React333.createElement(Stack222, { gap: 6 }, /* @__PURE__ */ React333.createElement(Text210, { size: "sm", fw: 500 }, FREQUENCY_BREACH_LABEL), /* @__PURE__ */ React333.createElement(
38450
- SegmentedControl19,
38474
+ SegmentedControl20,
38451
38475
  {
38452
38476
  styles: segmentedPill,
38453
38477
  value: state.onBreach,
@@ -38459,8 +38483,8 @@ var FrequencyRule = ({ body, onChange, disabled }) => {
38459
38483
  };
38460
38484
 
38461
38485
  // src/mantine/blocks/action/actionTypes/evalRubric/UniqueRule.tsx
38462
- import React334, { useEffect as useEffect121, useMemo as useMemo126, useRef as useRef47, useState as useState179 } from "react";
38463
- import { Alert as Alert54, Badge as Badge53, Group as Group129, Paper as Paper34, Slider as Slider3, Stack as Stack223, Switch as Switch14, Text as Text211 } from "@mantine/core";
38486
+ import React334, { useEffect as useEffect121, useMemo as useMemo127, useRef as useRef47, useState as useState179 } from "react";
38487
+ import { Alert as Alert54, Badge as Badge53, Group as Group129, Paper as Paper35, Slider as Slider3, Stack as Stack223, Switch as Switch14, Text as Text211 } from "@mantine/core";
38464
38488
 
38465
38489
  // src/mantine/blocks/action/actionTypes/evalRubric/uniqueModel.ts
38466
38490
  var DEFAULT_COUNT_PRIOR = ["approved", "pending_review", "queued"];
@@ -38547,15 +38571,15 @@ var UniqueRule = ({ body, catalog, onChange, disabled }) => {
38547
38571
  lastWrittenRef.current = json;
38548
38572
  if (json !== bodyJson) onChange(compiled);
38549
38573
  };
38550
- const keyFields = useMemo126(() => catalog.fields.filter((field) => !CONTAINER_KINDS.has(field.kind)), [catalog]);
38551
- const fieldByPath = useMemo126(() => new Map(keyFields.map((field) => [field.path, field])), [keyFields]);
38552
- const options = useMemo126(
38574
+ const keyFields = useMemo127(() => catalog.fields.filter((field) => !CONTAINER_KINDS.has(field.kind)), [catalog]);
38575
+ const fieldByPath = useMemo127(() => new Map(keyFields.map((field) => [field.path, field])), [keyFields]);
38576
+ const options = useMemo127(
38553
38577
  () => [...keyFields.map((field) => ({ value: field.path, label: field.title })), ...state.by.filter((ref) => !fieldByPath.has(ref)).map((ref) => ({ value: ref, label: ref }))],
38554
38578
  [keyFields, fieldByPath, state.by]
38555
38579
  );
38556
38580
  const pickedFileTitles = state.by.filter((ref) => fieldByPath.get(ref)?.kind === "file").map((ref) => fieldByPath.get(ref).title);
38557
38581
  const pickedDateRefs = state.by.filter((ref) => fieldByPath.get(ref)?.kind === "date");
38558
- return /* @__PURE__ */ React334.createElement(Paper34, { p: 18, style: cardStyle }, /* @__PURE__ */ React334.createElement(Stack223, { gap: "sm" }, /* @__PURE__ */ React334.createElement(Group129, { gap: "sm", justify: "space-between", align: "center", wrap: "wrap" }, /* @__PURE__ */ React334.createElement(Text211, { size: "sm", fw: 600 }, UNIQUE_TITLE), /* @__PURE__ */ React334.createElement(Switch14, { size: "sm", checked: state.on, onChange: (event) => commit({ ...state, on: event.currentTarget.checked }), disabled, "aria-label": UNIQUE_TITLE })), state.on && /* @__PURE__ */ React334.createElement(Stack223, { gap: "sm" }, /* @__PURE__ */ React334.createElement(Text211, { size: "xs", c: "dimmed" }, UNIQUE_EXPLAINER), /* @__PURE__ */ React334.createElement(
38582
+ return /* @__PURE__ */ React334.createElement(Paper35, { p: 18, style: cardStyle }, /* @__PURE__ */ React334.createElement(Stack223, { gap: "sm" }, /* @__PURE__ */ React334.createElement(Group129, { gap: "sm", justify: "space-between", align: "center", wrap: "wrap" }, /* @__PURE__ */ React334.createElement(Text211, { size: "sm", fw: 600 }, UNIQUE_TITLE), /* @__PURE__ */ React334.createElement(Switch14, { size: "sm", checked: state.on, onChange: (event) => commit({ ...state, on: event.currentTarget.checked }), disabled, "aria-label": UNIQUE_TITLE })), state.on && /* @__PURE__ */ React334.createElement(Stack223, { gap: "sm" }, /* @__PURE__ */ React334.createElement(Text211, { size: "xs", c: "dimmed" }, UNIQUE_EXPLAINER), /* @__PURE__ */ React334.createElement(
38559
38583
  BaseMultiSelect,
38560
38584
  {
38561
38585
  label: UNIQUE_BY_LABEL,
@@ -38621,7 +38645,7 @@ var UniqueRule = ({ body, catalog, onChange, disabled }) => {
38621
38645
  };
38622
38646
 
38623
38647
  // src/mantine/blocks/action/actionTypes/evalRubric/useRubricDraft.ts
38624
- import { useCallback as useCallback113, useEffect as useEffect122, useMemo as useMemo127, useRef as useRef48, useState as useState180 } from "react";
38648
+ import { useCallback as useCallback113, useEffect as useEffect122, useMemo as useMemo128, useRef as useRef48, useState as useState180 } from "react";
38625
38649
  function protocolDidOf(collection) {
38626
38650
  const protocol = collection?.protocol;
38627
38651
  const did = typeof protocol === "string" ? protocol : protocol?.id;
@@ -38881,14 +38905,14 @@ function useRubricDraft(inputs, onInputsChange, opts) {
38881
38905
  clearTimeout(timer);
38882
38906
  };
38883
38907
  }, [local.rubric, local.claimSchemaSnapshot, local.collectionId, local.evalEngineUrl, opts?.settings]);
38884
- const index = useMemo127(() => indexCatalog(local.claimSchemaSnapshot), [local.claimSchemaSnapshot]);
38885
- const rules = useMemo127(() => listRules(local.rubric), [local.rubric]);
38886
- const linked = useMemo127(() => listLinkedRules(local.rubric), [local.rubric]);
38887
- const diagnostics = useMemo127(
38908
+ const index = useMemo128(() => indexCatalog(local.claimSchemaSnapshot), [local.claimSchemaSnapshot]);
38909
+ const rules = useMemo128(() => listRules(local.rubric), [local.rubric]);
38910
+ const linked = useMemo128(() => listLinkedRules(local.rubric), [local.rubric]);
38911
+ const diagnostics = useMemo128(
38888
38912
  () => local.rubric && local.claimSchemaSnapshot ? [...validateRubric(local.rubric, local.claimSchemaSnapshot), ...shapeProblems] : [],
38889
38913
  [local.rubric, local.claimSchemaSnapshot, shapeProblems]
38890
38914
  );
38891
- const errors = useMemo127(() => diagnostics.filter((diagnostic) => diagnostic.severity === "error"), [diagnostics]);
38915
+ const errors = useMemo128(() => diagnostics.filter((diagnostic) => diagnostic.severity === "error"), [diagnostics]);
38892
38916
  return {
38893
38917
  local,
38894
38918
  update,
@@ -38954,20 +38978,20 @@ var EvalEngineFlowDetail = ({
38954
38978
  useEffect123(() => {
38955
38979
  handlersRef.current = handlers;
38956
38980
  }, [handlers]);
38957
- const parsed = useMemo128(() => parseEvalEngineInputs(inputs), [inputs]);
38981
+ const parsed = useMemo129(() => parseEvalEngineInputs(inputs), [inputs]);
38958
38982
  const editorDocument = editor?.document || [];
38959
- const resolveOpts = useMemo128(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
38960
- const templateDeedDid = useMemo128(() => resolveReferences(parsed.deedDid || "", editorDocument, resolveOpts).trim(), [parsed.deedDid, editorDocument, resolveOpts]);
38961
- const templateCollectionId = useMemo128(() => resolveReferences(parsed.collectionId || "", editorDocument, resolveOpts).trim(), [parsed.collectionId, editorDocument, resolveOpts]);
38962
- const pendingPayload = useMemo128(() => {
38983
+ const resolveOpts = useMemo129(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
38984
+ const templateDeedDid = useMemo129(() => resolveReferences(parsed.deedDid || "", editorDocument, resolveOpts).trim(), [parsed.deedDid, editorDocument, resolveOpts]);
38985
+ const templateCollectionId = useMemo129(() => resolveReferences(parsed.collectionId || "", editorDocument, resolveOpts).trim(), [parsed.collectionId, editorDocument, resolveOpts]);
38986
+ const pendingPayload = useMemo129(() => {
38963
38987
  if (!activePendingInvocation) return void 0;
38964
38988
  return {
38965
38989
  ...activePendingInvocation.payload || {},
38966
38990
  ...activePendingInvocation.refSnapshots || {}
38967
38991
  };
38968
38992
  }, [activePendingInvocation]);
38969
- const deedDid = useMemo128(() => String(pendingPayload?.entity || "").trim() || templateDeedDid, [pendingPayload, templateDeedDid]);
38970
- const collectionId = useMemo128(() => String(pendingPayload?.collectionId || "").trim() || templateCollectionId, [pendingPayload, templateCollectionId]);
38993
+ const deedDid = useMemo129(() => String(pendingPayload?.entity || "").trim() || templateDeedDid, [pendingPayload, templateDeedDid]);
38994
+ const collectionId = useMemo129(() => String(pendingPayload?.collectionId || "").trim() || templateCollectionId, [pendingPayload, templateCollectionId]);
38971
38995
  const [adminAddress, setAdminAddress] = useState181("");
38972
38996
  useEffect123(() => {
38973
38997
  let mounted = true;
@@ -39015,7 +39039,7 @@ var EvalEngineFlowDetail = ({
39015
39039
  },
39016
39040
  [editor, block]
39017
39041
  );
39018
- const intendedSettings = useMemo128(
39042
+ const intendedSettings = useMemo129(
39019
39043
  () => ({ allowAiChecks: parsed.allowAiChecks, allowImageChecks: parsed.allowImageChecks, allowChainEvaluation: parsed.allowChainEvaluation }),
39020
39044
  [parsed.allowAiChecks, parsed.allowImageChecks, parsed.allowChainEvaluation]
39021
39045
  );
@@ -39042,12 +39066,12 @@ var EvalEngineFlowDetail = ({
39042
39066
  const isStale = runtime.state === "completed" && !isCompletedWithProof;
39043
39067
  const catalog = draft.local.claimSchemaSnapshot;
39044
39068
  const body = draft.local.rubric;
39045
- const allDiagnostics = useMemo128(() => draft.driftProblems ? [...draft.diagnostics, ...draft.driftProblems] : draft.diagnostics, [draft.diagnostics, draft.driftProblems]);
39046
- const allErrors = useMemo128(() => allDiagnostics.filter((diagnostic) => diagnostic.severity === "error"), [allDiagnostics]);
39069
+ const allDiagnostics = useMemo129(() => draft.driftProblems ? [...draft.diagnostics, ...draft.driftProblems] : draft.diagnostics, [draft.diagnostics, draft.driftProblems]);
39070
+ const allErrors = useMemo129(() => allDiagnostics.filter((diagnostic) => diagnostic.severity === "error"), [allDiagnostics]);
39047
39071
  const configMissing = !collectionId || !deedDid;
39048
39072
  const adminMissing = !configMissing && !adminAddress && parsed.allowChainEvaluation;
39049
39073
  const emailMissing = !configMissing && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(parsed.notifyEmail || "").trim());
39050
- const policyMemberCount = useMemo128(() => {
39074
+ const policyMemberCount = useMemo129(() => {
39051
39075
  const shape = policyShapeOf(body ?? null);
39052
39076
  return shape.kind === "policy" ? shape.members.length : 0;
39053
39077
  }, [body]);
@@ -39144,9 +39168,9 @@ var EvalEngineFlowDetail = ({
39144
39168
  }, [updateRuntime]);
39145
39169
  const [editorState, setEditorState] = useState181(null);
39146
39170
  const [linkedEditorState, setLinkedEditorState] = useState181(null);
39147
- const byCard = useMemo128(() => rulesByCard(body), [body]);
39148
- const cardPaths = useMemo128(() => new Set((catalog?.fields ?? []).map((field) => field.path)), [catalog]);
39149
- const linkedByCard = useMemo128(() => {
39171
+ const byCard = useMemo129(() => rulesByCard(body), [body]);
39172
+ const cardPaths = useMemo129(() => new Set((catalog?.fields ?? []).map((field) => field.path)), [catalog]);
39173
+ const linkedByCard = useMemo129(() => {
39150
39174
  const grouped = /* @__PURE__ */ new Map();
39151
39175
  for (const entry of draft.linked) {
39152
39176
  const key = rootPath(entry.checkedField);
@@ -39156,11 +39180,11 @@ var EvalEngineFlowDetail = ({
39156
39180
  }
39157
39181
  return grouped;
39158
39182
  }, [draft.linked]);
39159
- const guardPaths = useMemo128(
39183
+ const guardPaths = useMemo129(
39160
39184
  () => [...draft.index.values()].filter((entry) => (entry.kind === "text" || entry.kind === "number" || entry.kind === "choice") && !entry.path.includes("[*]")).map((entry) => entry.path),
39161
39185
  [draft.index]
39162
39186
  );
39163
- const problemsByCard = useMemo128(() => {
39187
+ const problemsByCard = useMemo129(() => {
39164
39188
  const grouped = /* @__PURE__ */ new Map();
39165
39189
  const loose = [];
39166
39190
  for (const diagnostic of allDiagnostics) {
@@ -39175,13 +39199,13 @@ var EvalEngineFlowDetail = ({
39175
39199
  }
39176
39200
  return { grouped, loose };
39177
39201
  }, [body, allDiagnostics]);
39178
- const orphanRules = useMemo128(() => draft.rules.filter((rule) => !rule.fieldPath || !cardPaths.has(rootPath(rule.fieldPath))), [draft.rules, cardPaths]);
39179
- const orphanLinked = useMemo128(() => draft.linked.filter((entry) => !cardPaths.has(rootPath(entry.checkedField))), [draft.linked, cardPaths]);
39202
+ const orphanRules = useMemo129(() => draft.rules.filter((rule) => !rule.fieldPath || !cardPaths.has(rootPath(rule.fieldPath))), [draft.rules, cardPaths]);
39203
+ const orphanLinked = useMemo129(() => draft.linked.filter((entry) => !cardPaths.has(rootPath(entry.checkedField))), [draft.linked, cardPaths]);
39180
39204
  const cardRefs = useRef49(/* @__PURE__ */ new Map());
39181
39205
  const scrollToCard = useCallback114((cardPath) => {
39182
39206
  cardRefs.current.get(cardPath)?.scrollIntoView({ behavior: "smooth", block: "center" });
39183
39207
  }, []);
39184
- const problemList = useMemo128(() => {
39208
+ const problemList = useMemo129(() => {
39185
39209
  const seen = /* @__PURE__ */ new Set();
39186
39210
  const out = [];
39187
39211
  for (const diagnostic of allErrors) {
@@ -39244,7 +39268,7 @@ var EvalEngineFlowDetail = ({
39244
39268
  disabled: editingLocked
39245
39269
  }
39246
39270
  )
39247
- ))), (orphanRules.length > 0 || orphanLinked.length > 0) && /* @__PURE__ */ React335.createElement(Paper35, { p: 18, style: { ...cardStyle, borderColor: "var(--mantine-color-red-6)" } }, /* @__PURE__ */ React335.createElement(Stack224, { gap: "sm" }, /* @__PURE__ */ React335.createElement(Text212, { size: "sm", fw: 600 }, "Rules with no question"), /* @__PURE__ */ React335.createElement(Text212, { size: "xs", c: "dimmed" }, "These are about answers the form no longer asks for. Delete them, or put the questions back on the form."), orphanRules.map((rule) => /* @__PURE__ */ React335.createElement(Group130, { key: rule.code, gap: "sm", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React335.createElement(Box64, { mt: 2, style: consequencePillStyle(CONSEQUENCES.find((entry) => entry.value === rule.consequence)?.color ?? SLATE) }, consequenceIcon(rule.consequence, 15)), /* @__PURE__ */ React335.createElement(Box64, { style: { flex: 1 } }, /* @__PURE__ */ React335.createElement(RuleSentence, { text: describeRule(rule, { fields: draft.index, aiChecks: body.aiChecks }) })), /* @__PURE__ */ React335.createElement(ActionIcon53, { variant: "subtle", color: "red", onClick: () => deleteRule(rule), disabled: editingLocked, "aria-label": "Delete this rule" }, /* @__PURE__ */ React335.createElement(IconTrash14, { size: 16 })))), orphanLinked.map((entry) => /* @__PURE__ */ React335.createElement(Group130, { key: entry.elseCase.code, gap: "sm", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React335.createElement(Box64, { mt: 2, style: consequencePillStyle(entry.onFail === "review" ? "var(--mantine-color-grape-6)" : "var(--mantine-color-red-6)") }, consequenceIcon(entry.onFail === "review" ? "human" : "reject", 15)), /* @__PURE__ */ React335.createElement(Box64, { style: { flex: 1 } }, /* @__PURE__ */ React335.createElement(RuleSentence, { text: describeLinked(linkedSentenceOf(entry), { fields: draft.index }) })), /* @__PURE__ */ React335.createElement(ActionIcon53, { variant: "subtle", color: "red", onClick: () => deleteLinked(entry), disabled: editingLocked, "aria-label": "Delete this rule" }, /* @__PURE__ */ React335.createElement(IconTrash14, { size: 16 })))))), allErrors.filter((problem) => problem.code === "RUB_AI_CHECKS_DISABLED").map((problem) => /* @__PURE__ */ React335.createElement(Alert55, { key: problem.code, color: "red", icon: /* @__PURE__ */ React335.createElement(IconAlertTriangle17, { size: 16 }), title: "AI checks are turned off for this collection", styles: actionAlertStyles }, /* @__PURE__ */ React335.createElement(Text212, { size: "xs" }, problem.message))), /* @__PURE__ */ React335.createElement(ApprovalPolicy, { body, index: draft.index, checkCount, onChange: draft.setRubric, disabled: editingLocked }), /* @__PURE__ */ React335.createElement(UniqueRule, { body, catalog, onChange: draft.setRubric, disabled: editingLocked }), /* @__PURE__ */ React335.createElement(FrequencyRule, { body, onChange: draft.setRubric, disabled: editingLocked }), problemsByCard.loose.filter((problem) => problem.severity === "warning" && problem.code !== "RUB_WEIGHT_IGNORED").map((problem) => /* @__PURE__ */ React335.createElement(Alert55, { key: `${problem.code}${problem.path}`, color: "yellow", icon: /* @__PURE__ */ React335.createElement(IconInfoCircle11, { size: 16 }), styles: actionAlertStyles }, /* @__PURE__ */ React335.createElement(Text212, { size: "xs" }, problemText(problem)))), /* @__PURE__ */ React335.createElement(Paper35, { p: "md", style: cardStyle }, /* @__PURE__ */ React335.createElement(Stack224, { gap: "xs" }, /* @__PURE__ */ React335.createElement(Group130, { justify: "space-between" }, /* @__PURE__ */ React335.createElement(Group130, { gap: "xs" }, allErrors.length === 0 ? /* @__PURE__ */ React335.createElement(IconCheck26, { size: 16, color: "var(--mantine-color-green-6)" }) : /* @__PURE__ */ React335.createElement(IconAlertTriangle17, { size: 16, color: "var(--mantine-color-red-6)" }), /* @__PURE__ */ React335.createElement(Text212, { size: "sm" }, describeTally(draft.rules, { linked: draft.linked.length, policyMembers: policyMemberCount }))), /* @__PURE__ */ React335.createElement(Text212, { size: "sm", fw: 600, c: allErrors.length > 0 ? "red" : "dimmed" }, allErrors.length > 0 ? `${allErrors.length} problem${allErrors.length === 1 ? "" : "s"} left to fix` : "Ready to sign")), problemList.length > 0 && /* @__PURE__ */ React335.createElement(Stack224, { gap: 6 }, problemList.map((problem, at) => /* @__PURE__ */ React335.createElement(Group130, { key: `${problem.text}${at}`, gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React335.createElement(Box64, { mt: 3, style: { flexShrink: 0 } }, /* @__PURE__ */ React335.createElement(IconAlertTriangle17, { size: 14, color: "var(--mantine-color-red-6)" })), /* @__PURE__ */ React335.createElement(Text212, { size: "xs", style: { flex: 1 } }, problem.text), problem.card && /* @__PURE__ */ React335.createElement(Button76, { size: "compact-xs", variant: "subtle", styles: quietButton, rightSection: /* @__PURE__ */ React335.createElement(IconArrowRight3, { size: 12 }), onClick: () => scrollToCard(problem.card) }, "Take me there")))))), /* @__PURE__ */ React335.createElement(AdvancedPanel, { body }), editorState && /* @__PURE__ */ React335.createElement(
39271
+ ))), (orphanRules.length > 0 || orphanLinked.length > 0) && /* @__PURE__ */ React335.createElement(Paper36, { p: 18, style: { ...cardStyle, borderColor: "var(--mantine-color-red-6)" } }, /* @__PURE__ */ React335.createElement(Stack224, { gap: "sm" }, /* @__PURE__ */ React335.createElement(Text212, { size: "sm", fw: 600 }, "Rules with no question"), /* @__PURE__ */ React335.createElement(Text212, { size: "xs", c: "dimmed" }, "These are about answers the form no longer asks for. Delete them, or put the questions back on the form."), orphanRules.map((rule) => /* @__PURE__ */ React335.createElement(Group130, { key: rule.code, gap: "sm", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React335.createElement(Box64, { mt: 2, style: consequencePillStyle(CONSEQUENCES.find((entry) => entry.value === rule.consequence)?.color ?? SLATE) }, consequenceIcon(rule.consequence, 15)), /* @__PURE__ */ React335.createElement(Box64, { style: { flex: 1 } }, /* @__PURE__ */ React335.createElement(RuleSentence, { text: describeRule(rule, { fields: draft.index, aiChecks: body.aiChecks }) })), /* @__PURE__ */ React335.createElement(ActionIcon53, { variant: "subtle", color: "red", onClick: () => deleteRule(rule), disabled: editingLocked, "aria-label": "Delete this rule" }, /* @__PURE__ */ React335.createElement(IconTrash14, { size: 16 })))), orphanLinked.map((entry) => /* @__PURE__ */ React335.createElement(Group130, { key: entry.elseCase.code, gap: "sm", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React335.createElement(Box64, { mt: 2, style: consequencePillStyle(entry.onFail === "review" ? "var(--mantine-color-grape-6)" : "var(--mantine-color-red-6)") }, consequenceIcon(entry.onFail === "review" ? "human" : "reject", 15)), /* @__PURE__ */ React335.createElement(Box64, { style: { flex: 1 } }, /* @__PURE__ */ React335.createElement(RuleSentence, { text: describeLinked(linkedSentenceOf(entry), { fields: draft.index }) })), /* @__PURE__ */ React335.createElement(ActionIcon53, { variant: "subtle", color: "red", onClick: () => deleteLinked(entry), disabled: editingLocked, "aria-label": "Delete this rule" }, /* @__PURE__ */ React335.createElement(IconTrash14, { size: 16 })))))), allErrors.filter((problem) => problem.code === "RUB_AI_CHECKS_DISABLED").map((problem) => /* @__PURE__ */ React335.createElement(Alert55, { key: problem.code, color: "red", icon: /* @__PURE__ */ React335.createElement(IconAlertTriangle17, { size: 16 }), title: "AI checks are turned off for this collection", styles: actionAlertStyles }, /* @__PURE__ */ React335.createElement(Text212, { size: "xs" }, problem.message))), /* @__PURE__ */ React335.createElement(ApprovalPolicy, { body, index: draft.index, checkCount, onChange: draft.setRubric, disabled: editingLocked }), /* @__PURE__ */ React335.createElement(UniqueRule, { body, catalog, onChange: draft.setRubric, disabled: editingLocked }), /* @__PURE__ */ React335.createElement(FrequencyRule, { body, onChange: draft.setRubric, disabled: editingLocked }), problemsByCard.loose.filter((problem) => problem.severity === "warning" && problem.code !== "RUB_WEIGHT_IGNORED").map((problem) => /* @__PURE__ */ React335.createElement(Alert55, { key: `${problem.code}${problem.path}`, color: "yellow", icon: /* @__PURE__ */ React335.createElement(IconInfoCircle11, { size: 16 }), styles: actionAlertStyles }, /* @__PURE__ */ React335.createElement(Text212, { size: "xs" }, problemText(problem)))), /* @__PURE__ */ React335.createElement(Paper36, { p: "md", style: cardStyle }, /* @__PURE__ */ React335.createElement(Stack224, { gap: "xs" }, /* @__PURE__ */ React335.createElement(Group130, { justify: "space-between" }, /* @__PURE__ */ React335.createElement(Group130, { gap: "xs" }, allErrors.length === 0 ? /* @__PURE__ */ React335.createElement(IconCheck26, { size: 16, color: "var(--mantine-color-green-6)" }) : /* @__PURE__ */ React335.createElement(IconAlertTriangle17, { size: 16, color: "var(--mantine-color-red-6)" }), /* @__PURE__ */ React335.createElement(Text212, { size: "sm" }, describeTally(draft.rules, { linked: draft.linked.length, policyMembers: policyMemberCount }))), /* @__PURE__ */ React335.createElement(Text212, { size: "sm", fw: 600, c: allErrors.length > 0 ? "red" : "dimmed" }, allErrors.length > 0 ? `${allErrors.length} problem${allErrors.length === 1 ? "" : "s"} left to fix` : "Ready to sign")), problemList.length > 0 && /* @__PURE__ */ React335.createElement(Stack224, { gap: 6 }, problemList.map((problem, at) => /* @__PURE__ */ React335.createElement(Group130, { key: `${problem.text}${at}`, gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React335.createElement(Box64, { mt: 3, style: { flexShrink: 0 } }, /* @__PURE__ */ React335.createElement(IconAlertTriangle17, { size: 14, color: "var(--mantine-color-red-6)" })), /* @__PURE__ */ React335.createElement(Text212, { size: "xs", style: { flex: 1 } }, problem.text), problem.card && /* @__PURE__ */ React335.createElement(Button76, { size: "compact-xs", variant: "subtle", styles: quietButton, rightSection: /* @__PURE__ */ React335.createElement(IconArrowRight4, { size: 12 }), onClick: () => scrollToCard(problem.card) }, "Take me there")))))), /* @__PURE__ */ React335.createElement(AdvancedPanel, { body }), editorState && /* @__PURE__ */ React335.createElement(
39248
39272
  RuleEditor,
39249
39273
  {
39250
39274
  opened: true,
@@ -39287,7 +39311,7 @@ registerActionTypeUI(EVAL_ENGINE_ACTION_TYPE, {
39287
39311
  import { IconChecks as IconChecks4 } from "@tabler/icons-react";
39288
39312
 
39289
39313
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
39290
- import React336, { useCallback as useCallback115, useEffect as useEffect124, useMemo as useMemo129, useRef as useRef50, useState as useState182 } from "react";
39314
+ import React336, { useCallback as useCallback115, useEffect as useEffect124, useMemo as useMemo130, useRef as useRef50, useState as useState182 } from "react";
39291
39315
  import { Alert as Alert56, Button as Button77, Group as Group131, Loader as Loader66, Stack as Stack225, Switch as Switch15, Text as Text213 } from "@mantine/core";
39292
39316
 
39293
39317
  // src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
@@ -39435,7 +39459,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
39435
39459
  void fetchCollections();
39436
39460
  }
39437
39461
  }, [local.deedDid, local.collectionId]);
39438
- const collectionOptions = useMemo129(
39462
+ const collectionOptions = useMemo130(
39439
39463
  () => collections.map((collection) => ({
39440
39464
  value: collection.id,
39441
39465
  label: formatCollectionOptionLabel(collection)
@@ -39586,13 +39610,13 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
39586
39610
 
39587
39611
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
39588
39612
  import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
39589
- import { ActionIcon as ActionIcon57, Box as Box69, Button as Button80, Checkbox as Checkbox16, Divider as Divider25, Group as Group142, Loader as Loader69, ScrollArea as ScrollArea12, Stack as Stack236, Text as Text224, UnstyledButton as UnstyledButton10 } from "@mantine/core";
39613
+ import { ActionIcon as ActionIcon57, Box as Box69, Button as Button80, Checkbox as Checkbox16, Divider as Divider25, Group as Group142, Loader as Loader69, ScrollArea as ScrollArea13, Stack as Stack236, Text as Text224, UnstyledButton as UnstyledButton10 } from "@mantine/core";
39590
39614
  import { IconArrowLeft as IconArrowLeft11, IconCheck as IconCheck34, IconFilter as IconFilter2, IconRefresh as IconRefresh11 } from "@tabler/icons-react";
39591
- import { default as React347, useCallback as useCallback118, useEffect as useEffect127, useMemo as useMemo132, useRef as useRef53, useState as useState189 } from "react";
39615
+ import { default as React347, useCallback as useCallback118, useEffect as useEffect127, useMemo as useMemo133, useRef as useRef53, useState as useState189 } from "react";
39592
39616
 
39593
39617
  // src/mantine/blocks/action/actionTypes/evaluateClaim/AiChecksSection.tsx
39594
39618
  import React337 from "react";
39595
- import { Accordion as Accordion6, Group as Group132, Stack as Stack226, Text as Text214, Tooltip as Tooltip31 } from "@mantine/core";
39619
+ import { Accordion as Accordion7, Group as Group132, Stack as Stack226, Text as Text214, Tooltip as Tooltip31 } from "@mantine/core";
39596
39620
  import { IconAlertTriangle as IconAlertTriangle18, IconCheck as IconCheck27, IconPhoto as IconPhoto5, IconX as IconX21 } from "@tabler/icons-react";
39597
39621
 
39598
39622
  // src/mantine/blocks/action/actionTypes/evaluateClaim/engineModel.ts
@@ -39794,17 +39818,17 @@ var AiChecksSection = ({ ai, rubric }) => {
39794
39818
  return /* @__PURE__ */ React337.createElement(Text214, { size: "sm", c: "dimmed" }, "AI checks are turned off for this collection \u2014 turn them on in the engine setup.");
39795
39819
  }
39796
39820
  const failedNames = Object.entries(ai).filter(([, fact]) => kindOf(fact) === "failed").map(([name]) => name);
39797
- return /* @__PURE__ */ React337.createElement(Accordion6, { variant: "separated", radius: "md", multiple: true, defaultValue: failedNames }, Object.entries(ai).map(([name, fact]) => {
39821
+ return /* @__PURE__ */ React337.createElement(Accordion7, { variant: "separated", radius: "md", multiple: true, defaultValue: failedNames }, Object.entries(ai).map(([name, fact]) => {
39798
39822
  const check = rubric?.aiChecks?.find((entry) => entry.name === name);
39799
39823
  const provenance = provenanceOf(fact);
39800
- return /* @__PURE__ */ React337.createElement(Accordion6.Item, { key: name, value: name }, /* @__PURE__ */ React337.createElement(Accordion6.Control, null, /* @__PURE__ */ React337.createElement(Group132, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React337.createElement(Stack226, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React337.createElement(Text214, { size: "sm", fw: 500, truncate: true }, purposeOf(name, check)), /* @__PURE__ */ React337.createElement(Text214, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" }, truncate: true }, name)), /* @__PURE__ */ React337.createElement(CheckStatus, { fact }), fact.status === "ok" && /* @__PURE__ */ React337.createElement(Tooltip31, { label: `${fact.score}/100` }, /* @__PURE__ */ React337.createElement(Text214, { size: "xs", c: "dimmed", style: { whiteSpace: "nowrap" } }, confidenceOf(fact.score))))), /* @__PURE__ */ React337.createElement(Accordion6.Panel, null, /* @__PURE__ */ React337.createElement(Stack226, { gap: 8 }, fact.status === "ok" && fact.reason && /* @__PURE__ */ React337.createElement(Text214, { size: "sm" }, fact.reason), fact.status === "ok" && fact.failedRules.length > 0 && /* @__PURE__ */ React337.createElement(Stack226, { gap: 2 }, fact.failedRules.map((rule, i) => /* @__PURE__ */ React337.createElement(Group132, { key: i, gap: 6, wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React337.createElement(IconX21, { size: 12, color: "var(--mantine-color-red-6)" }), /* @__PURE__ */ React337.createElement(Text214, { size: "xs" }, rule)))), fact.status === "error" && /* @__PURE__ */ React337.createElement(Text214, { size: "sm", c: "dimmed" }, fact.onError === "reject" ? "This check couldn't run, so the claim was rejected to stay safe." : "This check couldn't run, so the claim is held for a person to look at."), provenance && /* @__PURE__ */ React337.createElement(Group132, { gap: 6, wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React337.createElement(IconPhoto5, { size: 14, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React337.createElement(Text214, { size: "xs" }, provenance.aiGenerated && provenance.trusted ? `This photo carries a hidden label: made by AI (${VENDOR_NAME[provenance.vendor] ?? "another provider"}) \u2014 check failed automatically` : "No hidden label found \u2014 nothing proves this photo is AI-made.")), check && Object.keys(check.send).length > 0 && /* @__PURE__ */ React337.createElement(Text214, { size: "xs", c: "dimmed" }, "What the AI was shown: ", Object.keys(check.send).join(", ")))));
39824
+ return /* @__PURE__ */ React337.createElement(Accordion7.Item, { key: name, value: name }, /* @__PURE__ */ React337.createElement(Accordion7.Control, null, /* @__PURE__ */ React337.createElement(Group132, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React337.createElement(Stack226, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React337.createElement(Text214, { size: "sm", fw: 500, truncate: true }, purposeOf(name, check)), /* @__PURE__ */ React337.createElement(Text214, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" }, truncate: true }, name)), /* @__PURE__ */ React337.createElement(CheckStatus, { fact }), fact.status === "ok" && /* @__PURE__ */ React337.createElement(Tooltip31, { label: `${fact.score}/100` }, /* @__PURE__ */ React337.createElement(Text214, { size: "xs", c: "dimmed", style: { whiteSpace: "nowrap" } }, confidenceOf(fact.score))))), /* @__PURE__ */ React337.createElement(Accordion7.Panel, null, /* @__PURE__ */ React337.createElement(Stack226, { gap: 8 }, fact.status === "ok" && fact.reason && /* @__PURE__ */ React337.createElement(Text214, { size: "sm" }, fact.reason), fact.status === "ok" && fact.failedRules.length > 0 && /* @__PURE__ */ React337.createElement(Stack226, { gap: 2 }, fact.failedRules.map((rule, i) => /* @__PURE__ */ React337.createElement(Group132, { key: i, gap: 6, wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React337.createElement(IconX21, { size: 12, color: "var(--mantine-color-red-6)" }), /* @__PURE__ */ React337.createElement(Text214, { size: "xs" }, rule)))), fact.status === "error" && /* @__PURE__ */ React337.createElement(Text214, { size: "sm", c: "dimmed" }, fact.onError === "reject" ? "This check couldn't run, so the claim was rejected to stay safe." : "This check couldn't run, so the claim is held for a person to look at."), provenance && /* @__PURE__ */ React337.createElement(Group132, { gap: 6, wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React337.createElement(IconPhoto5, { size: 14, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React337.createElement(Text214, { size: "xs" }, provenance.aiGenerated && provenance.trusted ? `This photo carries a hidden label: made by AI (${VENDOR_NAME[provenance.vendor] ?? "another provider"}) \u2014 check failed automatically` : "No hidden label found \u2014 nothing proves this photo is AI-made.")), check && Object.keys(check.send).length > 0 && /* @__PURE__ */ React337.createElement(Text214, { size: "xs", c: "dimmed" }, "What the AI was shown: ", Object.keys(check.send).join(", ")))));
39801
39825
  }));
39802
39826
  };
39803
39827
 
39804
39828
  // src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
39805
- import React338, { useCallback as useCallback116, useEffect as useEffect125, useMemo as useMemo130, useRef as useRef51, useState as useState183 } from "react";
39829
+ import React338, { useCallback as useCallback116, useEffect as useEffect125, useMemo as useMemo131, useRef as useRef51, useState as useState183 } from "react";
39806
39830
  import { Box as Box65, Group as Group133, Loader as Loader67, SimpleGrid as SimpleGrid4, Stack as Stack227, Text as Text215, Tooltip as Tooltip32, UnstyledButton as UnstyledButton6 } from "@mantine/core";
39807
- import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto6, IconVideo } from "@tabler/icons-react";
39831
+ import { IconFile as IconFile4, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto6, IconVideo } from "@tabler/icons-react";
39808
39832
  function toMediaFile(raw) {
39809
39833
  if (!raw) return null;
39810
39834
  if (typeof raw === "object" && typeof raw.content === "string") {
@@ -39840,7 +39864,7 @@ function kindIcon(file) {
39840
39864
  if (t.startsWith("video/") || ["mp4", "webm", "mov", "mkv"].includes(ext)) return IconVideo;
39841
39865
  if (t.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a", "flac"].includes(ext)) return IconMusic;
39842
39866
  if (t === "application/pdf" || ext === "pdf") return IconFileText6;
39843
- return IconFile5;
39867
+ return IconFile4;
39844
39868
  }
39845
39869
  function isImage(file) {
39846
39870
  const t = (file.type || "").toLowerCase();
@@ -39892,7 +39916,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject, entityDid }) => {
39892
39916
  },
39893
39917
  [fetchClaimMedia, entityDid]
39894
39918
  );
39895
- const items = useMemo130(() => {
39919
+ const items = useMemo131(() => {
39896
39920
  if (!credentialSubject || typeof credentialSubject !== "object") return [];
39897
39921
  const questionTitles = /* @__PURE__ */ new Map();
39898
39922
  const fileQuestionNames = /* @__PURE__ */ new Set();
@@ -40020,7 +40044,7 @@ var EngineBadge = ({ view, timeAgo: timeAgo2 }) => {
40020
40044
 
40021
40045
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EnginePromo.tsx
40022
40046
  import React340, { useState as useState184 } from "react";
40023
- import { Button as Button78, Group as Group135, List, Modal as Modal6, Paper as Paper36, Stack as Stack229, Text as Text217, ThemeIcon as ThemeIcon5 } from "@mantine/core";
40047
+ import { Button as Button78, Group as Group135, List, Modal as Modal6, Paper as Paper37, Stack as Stack229, Text as Text217, ThemeIcon as ThemeIcon5 } from "@mantine/core";
40024
40048
  import { IconChecklist as IconChecklist7, IconClipboardCheck as IconClipboardCheck2, IconRobot as IconRobot7, IconWand as IconWand3 } from "@tabler/icons-react";
40025
40049
  var STEPS = [
40026
40050
  {
@@ -40047,7 +40071,7 @@ var STEPS = [
40047
40071
  var EnginePromo = () => {
40048
40072
  const [open, setOpen] = useState184(false);
40049
40073
  return /* @__PURE__ */ React340.createElement(React340.Fragment, null, /* @__PURE__ */ React340.createElement(
40050
- Paper36,
40074
+ Paper37,
40051
40075
  {
40052
40076
  withBorder: true,
40053
40077
  p: "md",
@@ -40267,7 +40291,7 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
40267
40291
 
40268
40292
  // src/mantine/blocks/action/actionTypes/evaluateClaim/OutsideServicesSection.tsx
40269
40293
  import React342 from "react";
40270
- import { Accordion as Accordion7, Badge as Badge56, Group as Group137, Stack as Stack231, Text as Text219 } from "@mantine/core";
40294
+ import { Accordion as Accordion8, Badge as Badge56, Group as Group137, Stack as Stack231, Text as Text219 } from "@mantine/core";
40271
40295
  import { IconAlertTriangle as IconAlertTriangle20, IconCheck as IconCheck30 } from "@tabler/icons-react";
40272
40296
  function originOf(url) {
40273
40297
  try {
@@ -40276,20 +40300,20 @@ function originOf(url) {
40276
40300
  return url;
40277
40301
  }
40278
40302
  }
40279
- var OutsideServicesSection = ({ ext }) => /* @__PURE__ */ React342.createElement(Accordion7, { variant: "separated", radius: "md" }, Object.entries(ext).map(([name, fact]) => /* @__PURE__ */ React342.createElement(Accordion7.Item, { key: name, value: name }, /* @__PURE__ */ React342.createElement(Accordion7.Control, null, /* @__PURE__ */ React342.createElement(Group137, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React342.createElement(Text219, { size: "sm", fw: 500, style: { flex: 1, minWidth: 0 }, truncate: true }, name), fact.status === "ok" ? /* @__PURE__ */ React342.createElement(Badge56, { size: "sm", variant: "light", color: "green", leftSection: /* @__PURE__ */ React342.createElement(IconCheck30, { size: 10 }) }, "answered") : /* @__PURE__ */ React342.createElement(Badge56, { size: "sm", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React342.createElement(IconAlertTriangle20, { size: 10 }) }, "couldn't answer"))), /* @__PURE__ */ React342.createElement(Accordion7.Panel, null, /* @__PURE__ */ React342.createElement(Stack231, { gap: 4 }, /* @__PURE__ */ React342.createElement(Text219, { size: "xs", c: "dimmed" }, "We asked ", originOf(fact.transcript.request.url)), fact.status === "ok" ? /* @__PURE__ */ React342.createElement(React342.Fragment, null, /* @__PURE__ */ React342.createElement(Text219, { size: "sm" }, "Their answer: ", /* @__PURE__ */ React342.createElement("b", null, typeof fact.value === "boolean" ? fact.value ? "Yes" : "No" : `${Math.round(fact.value / 100)}/100`)), fact.reason && /* @__PURE__ */ React342.createElement(Text219, { size: "xs" }, fact.reason)) : /* @__PURE__ */ React342.createElement(Text219, { size: "sm", c: "dimmed" }, fact.onError === "reject" ? "They never answered, so the claim was rejected to stay safe." : "They never answered, so the claim is held for a person to look at."), /* @__PURE__ */ React342.createElement(Text219, { size: "xs", c: "dimmed" }, fact.transcript.attempts, " ", fact.transcript.attempts === 1 ? "try" : "tries", " \xB7 ", fact.transcript.elapsedMs, " ms"))))));
40303
+ var OutsideServicesSection = ({ ext }) => /* @__PURE__ */ React342.createElement(Accordion8, { variant: "separated", radius: "md" }, Object.entries(ext).map(([name, fact]) => /* @__PURE__ */ React342.createElement(Accordion8.Item, { key: name, value: name }, /* @__PURE__ */ React342.createElement(Accordion8.Control, null, /* @__PURE__ */ React342.createElement(Group137, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React342.createElement(Text219, { size: "sm", fw: 500, style: { flex: 1, minWidth: 0 }, truncate: true }, name), fact.status === "ok" ? /* @__PURE__ */ React342.createElement(Badge56, { size: "sm", variant: "light", color: "green", leftSection: /* @__PURE__ */ React342.createElement(IconCheck30, { size: 10 }) }, "answered") : /* @__PURE__ */ React342.createElement(Badge56, { size: "sm", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React342.createElement(IconAlertTriangle20, { size: 10 }) }, "couldn't answer"))), /* @__PURE__ */ React342.createElement(Accordion8.Panel, null, /* @__PURE__ */ React342.createElement(Stack231, { gap: 4 }, /* @__PURE__ */ React342.createElement(Text219, { size: "xs", c: "dimmed" }, "We asked ", originOf(fact.transcript.request.url)), fact.status === "ok" ? /* @__PURE__ */ React342.createElement(React342.Fragment, null, /* @__PURE__ */ React342.createElement(Text219, { size: "sm" }, "Their answer: ", /* @__PURE__ */ React342.createElement("b", null, typeof fact.value === "boolean" ? fact.value ? "Yes" : "No" : `${Math.round(fact.value / 100)}/100`)), fact.reason && /* @__PURE__ */ React342.createElement(Text219, { size: "xs" }, fact.reason)) : /* @__PURE__ */ React342.createElement(Text219, { size: "sm", c: "dimmed" }, fact.onError === "reject" ? "They never answered, so the claim was rejected to stay safe." : "They never answered, so the claim is held for a person to look at."), /* @__PURE__ */ React342.createElement(Text219, { size: "xs", c: "dimmed" }, fact.transcript.attempts, " ", fact.transcript.attempts === 1 ? "try" : "tries", " \xB7 ", fact.transcript.elapsedMs, " ms"))))));
40280
40304
 
40281
40305
  // src/mantine/blocks/action/actionTypes/evaluateClaim/TechnicalDetails.tsx
40282
40306
  import React343 from "react";
40283
- import { ActionIcon as ActionIcon55, Badge as Badge57, CopyButton as CopyButton3, Group as Group138, Paper as Paper37, ScrollArea as ScrollArea11, Stack as Stack232, Table, Text as Text220, Timeline as Timeline2, Tooltip as Tooltip34 } from "@mantine/core";
40307
+ import { ActionIcon as ActionIcon55, Badge as Badge57, CopyButton as CopyButton3, Group as Group138, Paper as Paper38, ScrollArea as ScrollArea12, Stack as Stack232, Table, Text as Text220, Timeline as Timeline2, Tooltip as Tooltip34 } from "@mantine/core";
40284
40308
  import { IconCheck as IconCheck31, IconCopy as IconCopy2 } from "@tabler/icons-react";
40285
40309
  var CopyIcon = ({ value }) => /* @__PURE__ */ React343.createElement(CopyButton3, { value, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React343.createElement(Tooltip34, { label: copied ? "Copied" : "Copy" }, /* @__PURE__ */ React343.createElement(ActionIcon55, { size: "xs", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy }, copied ? /* @__PURE__ */ React343.createElement(IconCheck31, { size: 12 }) : /* @__PURE__ */ React343.createElement(IconCopy2, { size: 12 }))));
40286
40310
  var IdRow = ({ label, value }) => value ? /* @__PURE__ */ React343.createElement(Group138, { gap: 6, wrap: "nowrap" }, /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed", style: { width: 110, flexShrink: 0 } }, label), /* @__PURE__ */ React343.createElement(Text220, { size: "xs", style: { fontFamily: "monospace", wordBreak: "break-all", flex: 1 } }, value), /* @__PURE__ */ React343.createElement(CopyIcon, { value })) : null;
40287
40311
  var SubHead = ({ children }) => /* @__PURE__ */ React343.createElement(Text220, { size: "xs", fw: 600, c: "dimmed", tt: "uppercase" }, children);
40288
40312
  var JsonViewer2 = ({ label, value }) => {
40289
40313
  const json = JSON.stringify(value, null, 2);
40290
- return /* @__PURE__ */ React343.createElement(Stack232, { gap: 4 }, /* @__PURE__ */ React343.createElement(Group138, { gap: 6 }, /* @__PURE__ */ React343.createElement(SubHead, null, label), /* @__PURE__ */ React343.createElement(CopyIcon, { value: json })), /* @__PURE__ */ React343.createElement(Paper37, { p: "xs", radius: "sm", style: { background: "var(--mantine-color-neutralColor-3)" } }, /* @__PURE__ */ React343.createElement(ScrollArea11.Autosize, { mah: 240 }, /* @__PURE__ */ React343.createElement("pre", { style: { margin: 0, fontSize: 11, fontFamily: "monospace", whiteSpace: "pre-wrap", wordBreak: "break-word" } }, json))));
40314
+ return /* @__PURE__ */ React343.createElement(Stack232, { gap: 4 }, /* @__PURE__ */ React343.createElement(Group138, { gap: 6 }, /* @__PURE__ */ React343.createElement(SubHead, null, label), /* @__PURE__ */ React343.createElement(CopyIcon, { value: json })), /* @__PURE__ */ React343.createElement(Paper38, { p: "xs", radius: "sm", style: { background: "var(--mantine-color-neutralColor-3)" } }, /* @__PURE__ */ React343.createElement(ScrollArea12.Autosize, { mah: 240 }, /* @__PURE__ */ React343.createElement("pre", { style: { margin: 0, fontSize: 11, fontFamily: "monospace", whiteSpace: "pre-wrap", wordBreak: "break-word" } }, json))));
40291
40315
  };
40292
- var TranscriptCard = ({ name, transcript }) => /* @__PURE__ */ React343.createElement(Paper37, { p: "xs", radius: "sm", style: { background: "var(--mantine-color-neutralColor-3)" } }, /* @__PURE__ */ React343.createElement(Stack232, { gap: 4 }, /* @__PURE__ */ React343.createElement(Group138, { gap: "xs", wrap: "wrap" }, /* @__PURE__ */ React343.createElement(Text220, { size: "xs", fw: 600 }, name), transcript.genId && /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, transcript.genId), /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed" }, transcript.attempts, " attempt", transcript.attempts === 1 ? "" : "s", " \xB7 ", transcript.elapsedMs, " ms", typeof transcript.latencyMs === "number" ? ` \xB7 last try ${transcript.latencyMs} ms` : "")), transcript.usage && /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed" }, "Tokens: ", transcript.usage.promptTokens, " prompt \xB7 ", transcript.usage.completionTokens, " completion \xB7 ", transcript.usage.cachedTokens, " cached \xB7 $", transcript.usage.costUsd.toFixed(6)), /* @__PURE__ */ React343.createElement(Text220, { size: "xs", style: { fontFamily: "monospace", wordBreak: "break-all" } }, transcript.request.url), /* @__PURE__ */ React343.createElement(ScrollArea11.Autosize, { mah: 140 }, /* @__PURE__ */ React343.createElement("pre", { style: { margin: 0, fontSize: 11, fontFamily: "monospace", whiteSpace: "pre-wrap", wordBreak: "break-word" } }, JSON.stringify({ request: transcript.request.body, response: transcript.response }, null, 2)))));
40316
+ var TranscriptCard = ({ name, transcript }) => /* @__PURE__ */ React343.createElement(Paper38, { p: "xs", radius: "sm", style: { background: "var(--mantine-color-neutralColor-3)" } }, /* @__PURE__ */ React343.createElement(Stack232, { gap: 4 }, /* @__PURE__ */ React343.createElement(Group138, { gap: "xs", wrap: "wrap" }, /* @__PURE__ */ React343.createElement(Text220, { size: "xs", fw: 600 }, name), transcript.genId && /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, transcript.genId), /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed" }, transcript.attempts, " attempt", transcript.attempts === 1 ? "" : "s", " \xB7 ", transcript.elapsedMs, " ms", typeof transcript.latencyMs === "number" ? ` \xB7 last try ${transcript.latencyMs} ms` : "")), transcript.usage && /* @__PURE__ */ React343.createElement(Text220, { size: "xs", c: "dimmed" }, "Tokens: ", transcript.usage.promptTokens, " prompt \xB7 ", transcript.usage.completionTokens, " completion \xB7 ", transcript.usage.cachedTokens, " cached \xB7 $", transcript.usage.costUsd.toFixed(6)), /* @__PURE__ */ React343.createElement(Text220, { size: "xs", style: { fontFamily: "monospace", wordBreak: "break-all" } }, transcript.request.url), /* @__PURE__ */ React343.createElement(ScrollArea12.Autosize, { mah: 140 }, /* @__PURE__ */ React343.createElement("pre", { style: { margin: 0, fontSize: 11, fontFamily: "monospace", whiteSpace: "pre-wrap", wordBreak: "break-word" } }, JSON.stringify({ request: transcript.request.body, response: transcript.response }, null, 2)))));
40293
40317
  var TechnicalDetails = ({ record, onChain }) => {
40294
40318
  const { ingest, evaluation, review } = record;
40295
40319
  const trace = evaluation?.trace ?? null;
@@ -40428,10 +40452,10 @@ function useEngineSummaries(collectionId) {
40428
40452
  // src/mantine/blocks/action/actionTypes/evaluateClaim/VerdictBlock.tsx
40429
40453
  import React345, { useState as useState188 } from "react";
40430
40454
  import { ActionIcon as ActionIcon56, Badge as Badge58, Box as Box67, Group as Group140, Loader as Loader68, Stack as Stack234, Text as Text222, Tooltip as Tooltip35, UnstyledButton as UnstyledButton8 } from "@mantine/core";
40431
- import { IconAlertTriangle as IconAlertTriangle21, IconArrowRight as IconArrowRight4, IconCheck as IconCheck32, IconMinus as IconMinus2, IconRefresh as IconRefresh10, IconX as IconX24 } from "@tabler/icons-react";
40455
+ import { IconAlertTriangle as IconAlertTriangle21, IconArrowRight as IconArrowRight5, IconCheck as IconCheck32, IconMinus as IconMinus2, IconRefresh as IconRefresh10, IconX as IconX24 } from "@tabler/icons-react";
40432
40456
 
40433
40457
  // src/mantine/blocks/action/actionTypes/evaluateClaim/ReviewAnswerForm.tsx
40434
- import React344, { useMemo as useMemo131, useState as useState187 } from "react";
40458
+ import React344, { useMemo as useMemo132, useState as useState187 } from "react";
40435
40459
  import { Button as Button79, Group as Group139, Image as Image16, Stack as Stack233, Text as Text221, UnstyledButton as UnstyledButton7 } from "@mantine/core";
40436
40460
  function evidenceValue(ref, subject) {
40437
40461
  if (!subject || !ref.startsWith("$")) return void 0;
@@ -40480,7 +40504,7 @@ var ReviewAnswerForm = ({
40480
40504
  const [answers, setAnswers] = useState187({});
40481
40505
  const [answeringForOther, setAnsweringForOther] = useState187(false);
40482
40506
  const pendingTaskIds = evaluation.decision?.pendingTasks ?? [];
40483
- const tasks = useMemo131(() => pendingTaskIds.map((id) => ({ id, task: rubric?.review?.tasks?.find((t) => t.id === id) })), [pendingTaskIds, rubric]);
40507
+ const tasks = useMemo132(() => pendingTaskIds.map((id) => ({ id, task: rubric?.review?.tasks?.find((t) => t.id === id) })), [pendingTaskIds, rubric]);
40484
40508
  if (review?.status === "completed") {
40485
40509
  const when = review.completedAt ? new Date(review.completedAt).toLocaleString(void 0, { day: "numeric", month: "short", year: "numeric" }) : null;
40486
40510
  return /* @__PURE__ */ React344.createElement(Stack233, { gap: 4 }, /* @__PURE__ */ React344.createElement(Text221, { size: "xs", c: "dimmed" }, "Reviewed by ", reviewerName || review.reviewerDid, when ? `, ${when}` : ""), Object.entries(review.answers || {}).map(([taskId, answer]) => {
@@ -40558,7 +40582,7 @@ var MatchedClaims = ({ refs, duplicate, openableClaimIds, onOpenClaim }) => {
40558
40582
  return /* @__PURE__ */ React345.createElement(Stack234, { gap: 4 }, /* @__PURE__ */ React345.createElement(Text222, { size: "xs", fw: 600, c: "dimmed" }, refs[0].label), rows.map((row) => {
40559
40583
  const canOpen = !!onOpenClaim && !!openableClaimIds?.has(row.id);
40560
40584
  const id = /* @__PURE__ */ React345.createElement(Text222, { size: "xs", style: { fontFamily: "monospace" } }, truncateClaimId2(row.id));
40561
- return /* @__PURE__ */ React345.createElement(Group140, { key: row.id, gap: 6, wrap: "wrap", align: "baseline" }, canOpen ? /* @__PURE__ */ React345.createElement(UnstyledButton8, { onClick: () => onOpenClaim?.(row.id) }, /* @__PURE__ */ React345.createElement(Group140, { gap: 2, align: "baseline", wrap: "nowrap" }, id, /* @__PURE__ */ React345.createElement(IconArrowRight4, { size: 12 }))) : id, row.detail && /* @__PURE__ */ React345.createElement(Text222, { size: "xs", c: "dimmed" }, row.detail));
40585
+ return /* @__PURE__ */ React345.createElement(Group140, { key: row.id, gap: 6, wrap: "wrap", align: "baseline" }, canOpen ? /* @__PURE__ */ React345.createElement(UnstyledButton8, { onClick: () => onOpenClaim?.(row.id) }, /* @__PURE__ */ React345.createElement(Group140, { gap: 2, align: "baseline", wrap: "nowrap" }, id, /* @__PURE__ */ React345.createElement(IconArrowRight5, { size: 12 }))) : id, row.detail && /* @__PURE__ */ React345.createElement(Text222, { size: "xs", c: "dimmed" }, row.detail));
40562
40586
  }), !expanded && extraCandidates.length > 0 && /* @__PURE__ */ React345.createElement(UnstyledButton8, { onClick: () => setExpanded(true) }, /* @__PURE__ */ React345.createElement(Text222, { size: "xs", fw: 600, c: "dimmed", td: "underline" }, "+", extraCandidates.length, " more")));
40563
40587
  };
40564
40588
  var VerdictBlock = ({
@@ -40808,8 +40832,8 @@ var EvaluateClaimFlowDetail = ({
40808
40832
  useEffect127(() => {
40809
40833
  handlersRef.current = handlers;
40810
40834
  }, [handlers]);
40811
- const services = useMemo132(() => buildServicesFromHandlers(handlers), [handlers]);
40812
- const actorDid = useMemo132(() => {
40835
+ const services = useMemo133(() => buildServicesFromHandlers(handlers), [handlers]);
40836
+ const actorDid = useMemo133(() => {
40813
40837
  try {
40814
40838
  return handlers?.getCurrentUser?.()?.address || "";
40815
40839
  } catch {
@@ -40817,10 +40841,10 @@ var EvaluateClaimFlowDetail = ({
40817
40841
  }
40818
40842
  }, [handlers]);
40819
40843
  const [nodeContext, setNodeContextOverride] = useNodeContext(editor, block?.id ?? "");
40820
- const parsed = useMemo132(() => parseEvaluateClaimActionInputs(inputs), [inputs]);
40844
+ const parsed = useMemo133(() => parseEvaluateClaimActionInputs(inputs), [inputs]);
40821
40845
  const editorDocument = editor?.document || [];
40822
40846
  const runtimeReader = useRunRuntimeReader(editor);
40823
- const resolveOpts = useMemo132(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
40847
+ const resolveOpts = useMemo133(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
40824
40848
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
40825
40849
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
40826
40850
  const [claims, setClaims] = useState189([]);
@@ -40852,10 +40876,10 @@ var EvaluateClaimFlowDetail = ({
40852
40876
  const [loadingDispute] = useState189(false);
40853
40877
  const [evaluationOutcomePatch] = useState189(null);
40854
40878
  const [evaluationAmount] = useState189(null);
40855
- const selectedClaim = useMemo132(() => claims.find((claim) => claim.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
40856
- const loadedClaimIds = useMemo132(() => new Set(claims.map((claim) => claim.claimId)), [claims]);
40879
+ const selectedClaim = useMemo133(() => claims.find((claim) => claim.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
40880
+ const loadedClaimIds = useMemo133(() => new Set(claims.map((claim) => claim.claimId)), [claims]);
40857
40881
  const engineSummaries = useEngineSummaries(collectionId);
40858
- const resolvedCredentialSubject = useMemo132(() => {
40882
+ const resolvedCredentialSubject = useMemo133(() => {
40859
40883
  const cs = claimData?.credentialSubject ?? claimData;
40860
40884
  if (!cs || typeof cs !== "object") return cs;
40861
40885
  return resolveFilesInCredentialSubject(cs);
@@ -40898,7 +40922,7 @@ var EvaluateClaimFlowDetail = ({
40898
40922
  }
40899
40923
  };
40900
40924
  }, [handlers.fetchClaimMedia, deedDid]);
40901
- const surveyModel = useMemo132(() => {
40925
+ const surveyModel = useMemo133(() => {
40902
40926
  if (!surveyJson || !claimData) return null;
40903
40927
  const model = new SurveyModel11(surveyJson);
40904
40928
  model.applyTheme(surveyTheme);
@@ -40961,7 +40985,7 @@ var EvaluateClaimFlowDetail = ({
40961
40985
  model.data = resolvedCredentialSubject;
40962
40986
  return model;
40963
40987
  }, [surveyJson, claimData, resolvedCredentialSubject, deedDid, handlers.fetchClaimMedia]);
40964
- const outcomeSurveyModel = useMemo132(() => {
40988
+ const outcomeSurveyModel = useMemo133(() => {
40965
40989
  if (!outcomeTemplateJson) return null;
40966
40990
  const model = new SurveyModel11(outcomeTemplateJson);
40967
40991
  model.applyTheme(surveyTheme);
@@ -41191,7 +41215,7 @@ var EvaluateClaimFlowDetail = ({
41191
41215
  };
41192
41216
  }, [deedDid, collectionId]);
41193
41217
  const engine = useClaimEngine(selectedClaimId);
41194
- const onChainDisplay = useMemo132(() => {
41218
+ const onChainDisplay = useMemo133(() => {
41195
41219
  const chainState = engine.record?.summary?.chainState;
41196
41220
  if (!chainState && !onChainEvaluation) return null;
41197
41221
  return { ...onChainEvaluation, statusLabel: chainState?.label ?? onChainEvaluation?.statusLabel ?? "" };
@@ -41228,7 +41252,7 @@ var EvaluateClaimFlowDetail = ({
41228
41252
  mounted = false;
41229
41253
  };
41230
41254
  }, [assigneeDid, reviewerDid, peopleNames]);
41231
- const currentUserDid = useMemo132(() => {
41255
+ const currentUserDid = useMemo133(() => {
41232
41256
  try {
41233
41257
  const user = handlers?.getCurrentUser?.();
41234
41258
  return user?.did || (user?.address ? `did:ixo:${user.address}` : "");
@@ -41239,20 +41263,20 @@ var EvaluateClaimFlowDetail = ({
41239
41263
  const isAssignedToMe = !assigneeDid || assigneeDid === currentUserDid;
41240
41264
  const assigneeName = assigneeDid ? peopleNames[assigneeDid] || assigneeDid : null;
41241
41265
  const assignedElsewhereToName = isAssignedToMe ? null : assigneeName;
41242
- const rowViewByClaimId = useMemo132(() => {
41266
+ const rowViewByClaimId = useMemo133(() => {
41243
41267
  const map = /* @__PURE__ */ new Map();
41244
41268
  for (const claim of claims) {
41245
41269
  map.set(claim.claimId, engineRowViewOf(engineSummaries.byClaimId[claim.claimId], assignedElsewhereToName, rubricBody?.review?.slaHours));
41246
41270
  }
41247
41271
  return map;
41248
41272
  }, [claims, engineSummaries.byClaimId, assignedElsewhereToName, rubricBody?.review?.slaHours]);
41249
- const filteredClaims = useMemo132(() => {
41273
+ const filteredClaims = useMemo133(() => {
41250
41274
  if (activeFilter === "all") return claims;
41251
41275
  if (activeFilter === "owed") return claims.filter((claim) => rowViewByClaimId.get(claim.claimId)?.owed ?? false);
41252
41276
  return claims.filter((claim) => engineSummaries.byClaimId[claim.claimId]?.summary?.disposition === "settled");
41253
41277
  }, [claims, activeFilter, engineSummaries.byClaimId, rowViewByClaimId]);
41254
- const owedCount = useMemo132(() => claims.filter((claim) => rowViewByClaimId.get(claim.claimId)?.owed ?? false).length, [claims, rowViewByClaimId]);
41255
- const settledCount = useMemo132(
41278
+ const owedCount = useMemo133(() => claims.filter((claim) => rowViewByClaimId.get(claim.claimId)?.owed ?? false).length, [claims, rowViewByClaimId]);
41279
+ const settledCount = useMemo133(
41256
41280
  () => claims.filter((claim) => engineSummaries.byClaimId[claim.claimId]?.summary?.disposition === "settled").length,
41257
41281
  [claims, engineSummaries.byClaimId]
41258
41282
  );
@@ -41269,7 +41293,7 @@ var EvaluateClaimFlowDetail = ({
41269
41293
  };
41270
41294
  }).filter((entry) => !!entry);
41271
41295
  }, [paymentRows]);
41272
- const isClaimAlreadyEvaluated = useMemo132(() => {
41296
+ const isClaimAlreadyEvaluated = useMemo133(() => {
41273
41297
  return selectedClaim ? isClaimEvaluated(selectedClaim) : false;
41274
41298
  }, [selectedClaim]);
41275
41299
  const outcomeNotReady = Boolean(outcomeTemplateJson && !outcomeComplete);
@@ -41476,14 +41500,14 @@ var EvaluateClaimFlowDetail = ({
41476
41500
  title: `Outside services \xB7 ${Object.values(engine.record.evaluation.trace.ext).filter((fact) => fact.status === "ok").length} answered`
41477
41501
  },
41478
41502
  /* @__PURE__ */ React347.createElement(OutsideServicesSection, { ext: engine.record.evaluation.trace.ext })
41479
- ))), /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.submission", { defaultValue: "The claim" }) }, surveyLoading ? /* @__PURE__ */ React347.createElement(Group142, { gap: "xs" }, /* @__PURE__ */ React347.createElement(Loader69, { size: "xs" }), /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.loadingSubmissionDetails", { defaultValue: "Loading submission details..." }))) : surveyModel ? /* @__PURE__ */ React347.createElement(ScrollArea12, { h: 280 }, /* @__PURE__ */ React347.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.noSubmissionTemplate", { defaultValue: "No submission template/data available." }))), /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.attachments", { defaultValue: "Attachments" }) }, /* @__PURE__ */ React347.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject, entityDid: deedDid })), flowManagerContext, /* @__PURE__ */ React347.createElement(EvaluationReportSection, { runtime, selectedClaimId: selectedClaim.claimId }), parsed.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: "Xero work", defaultOpen: false }, /* @__PURE__ */ React347.createElement(DismissibleAlert, { color: "blue", variant: "light", p: "xs" }, /* @__PURE__ */ React347.createElement(Text224, { size: "xs" }, "Approving this claim queues a Xero invoice work item. The contracted Xero oracle creates a draft invoice from the claim material \u2014 no Xero side effects run in the browser."))), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React347.createElement(
41503
+ ))), /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.submission", { defaultValue: "The claim" }) }, surveyLoading ? /* @__PURE__ */ React347.createElement(Group142, { gap: "xs" }, /* @__PURE__ */ React347.createElement(Loader69, { size: "xs" }), /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.loadingSubmissionDetails", { defaultValue: "Loading submission details..." }))) : surveyModel ? /* @__PURE__ */ React347.createElement(ScrollArea13, { h: 280 }, /* @__PURE__ */ React347.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.noSubmissionTemplate", { defaultValue: "No submission template/data available." }))), /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.attachments", { defaultValue: "Attachments" }) }, /* @__PURE__ */ React347.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject, entityDid: deedDid })), flowManagerContext, /* @__PURE__ */ React347.createElement(EvaluationReportSection, { runtime, selectedClaimId: selectedClaim.claimId }), parsed.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: "Xero work", defaultOpen: false }, /* @__PURE__ */ React347.createElement(DismissibleAlert, { color: "blue", variant: "light", p: "xs" }, /* @__PURE__ */ React347.createElement(Text224, { size: "xs" }, "Approving this claim queues a Xero invoice work item. The contracted Xero oracle creates a draft invoice from the claim material \u2014 no Xero side effects run in the browser."))), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React347.createElement(
41480
41504
  CollapsibleSection,
41481
41505
  {
41482
41506
  title: t("actionTypes.evaluateClaim.flow.section.outcome", { defaultValue: "Outcome" }),
41483
41507
  defaultOpen: true,
41484
41508
  badge: /* @__PURE__ */ React347.createElement(React347.Fragment, null, outcomeTemplateJson && !outcomeComplete && !isClaimAlreadyEvaluated && /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "yellow" }, t("actionTypes.evaluateClaim.flow.outcome.requiredBadge", { defaultValue: "(required)" })), (outcomeComplete || isClaimAlreadyEvaluated) && /* @__PURE__ */ React347.createElement(IconCheck34, { size: 14, color: "var(--mantine-color-green-6)" }))
41485
41509
  },
41486
- outcomeTemplateLoading ? /* @__PURE__ */ React347.createElement(Group142, { gap: "xs" }, /* @__PURE__ */ React347.createElement(Loader69, { size: "xs" }), /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.loading", { defaultValue: "Loading evaluation template..." }))) : outcomeSurveyModel ? /* @__PURE__ */ React347.createElement(ScrollArea12, { h: 320 }, /* @__PURE__ */ React347.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.noTemplate", { defaultValue: "No evaluation template available." }))
41510
+ outcomeTemplateLoading ? /* @__PURE__ */ React347.createElement(Group142, { gap: "xs" }, /* @__PURE__ */ React347.createElement(Loader69, { size: "xs" }), /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.loading", { defaultValue: "Loading evaluation template..." }))) : outcomeSurveyModel ? /* @__PURE__ */ React347.createElement(ScrollArea13, { h: 320 }, /* @__PURE__ */ React347.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React347.createElement(Text224, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.noTemplate", { defaultValue: "No evaluation template available." }))
41487
41511
  ), !isClaimAlreadyEvaluated && /* @__PURE__ */ React347.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.evaluation", { defaultValue: "Evaluation" }), defaultOpen: true }, /* @__PURE__ */ React347.createElement(Stack236, { gap: "md" }, /* @__PURE__ */ React347.createElement(Divider25, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), decision === "dispute" ? /* @__PURE__ */ React347.createElement(Stack236, { gap: "md" }, /* @__PURE__ */ React347.createElement(
41488
41512
  BaseTextArea,
41489
41513
  {
@@ -41662,7 +41686,7 @@ import { IconFileText as IconFileText7 } from "@tabler/icons-react";
41662
41686
 
41663
41687
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
41664
41688
  import React348, { useCallback as useCallback119, useEffect as useEffect128, useState as useState190 } from "react";
41665
- import { Divider as Divider26, Loader as Loader70, SegmentedControl as SegmentedControl20, Stack as Stack237, Text as Text225 } from "@mantine/core";
41689
+ import { Divider as Divider26, Loader as Loader70, SegmentedControl as SegmentedControl21, Stack as Stack237, Text as Text225 } from "@mantine/core";
41666
41690
 
41667
41691
  // src/mantine/blocks/action/actionTypes/proposalCreate/types.ts
41668
41692
  function parseProposalCreateInputs(json) {
@@ -41738,7 +41762,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41738
41762
  [update]
41739
41763
  );
41740
41764
  return /* @__PURE__ */ React348.createElement(Stack237, { gap: "lg" }, /* @__PURE__ */ React348.createElement(Stack237, { gap: "xs" }, /* @__PURE__ */ React348.createElement(Text225, { size: "sm", fw: 600 }, "DAO Group"), /* @__PURE__ */ React348.createElement(
41741
- SegmentedControl20,
41765
+ SegmentedControl21,
41742
41766
  {
41743
41767
  value: inputMode,
41744
41768
  onChange: (value) => setInputMode(value),
@@ -41806,16 +41830,16 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41806
41830
  };
41807
41831
 
41808
41832
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
41809
- import React349, { useCallback as useCallback120, useEffect as useEffect129, useMemo as useMemo134, useState as useState191 } from "react";
41833
+ import React349, { useCallback as useCallback120, useEffect as useEffect129, useMemo as useMemo135, useState as useState191 } from "react";
41810
41834
  import { Badge as Badge60, Button as Button81, Card as Card29, Group as Group143, Loader as Loader71, Stack as Stack238, Text as Text226 } from "@mantine/core";
41811
41835
  import { IconPlus as IconPlus13, IconPlayerPlay as IconPlayerPlay7 } from "@tabler/icons-react";
41812
41836
 
41813
41837
  // src/mantine/blocks/action/hooks/useResolvedInputs.ts
41814
- import { useMemo as useMemo133 } from "react";
41838
+ import { useMemo as useMemo134 } from "react";
41815
41839
  function useResolvedInputs(editor, inputs, spec, blockId) {
41816
41840
  const editorDocument = editor?.document || [];
41817
41841
  const yRuntime = useRunRuntimeReader(editor);
41818
- const parsed = useMemo133(() => {
41842
+ const parsed = useMemo134(() => {
41819
41843
  if (!inputs) return {};
41820
41844
  try {
41821
41845
  const value = JSON.parse(inputs);
@@ -41824,7 +41848,7 @@ function useResolvedInputs(editor, inputs, spec, blockId) {
41824
41848
  return {};
41825
41849
  }
41826
41850
  }, [inputs]);
41827
- return useMemo133(() => {
41851
+ return useMemo134(() => {
41828
41852
  const unresolved = [];
41829
41853
  const options = { yRuntime, warnContext: blockId ? `block ${blockId}` : void 0 };
41830
41854
  const resolveField = (raw) => {
@@ -41876,7 +41900,7 @@ var statusColor2 = {
41876
41900
  };
41877
41901
  var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
41878
41902
  const handlers = useBlocknoteHandlers();
41879
- const parsed = useMemo134(() => parseProposalCreateInputs(inputs), [inputs]);
41903
+ const parsed = useMemo135(() => parseProposalCreateInputs(inputs), [inputs]);
41880
41904
  const { resolvedInputs } = useResolvedInputs(editor, inputs, { fields: ["coreAddress", "proposalTitle", "proposalDescription"] }, block?.id);
41881
41905
  const coreAddress = resolvedInputs.coreAddress;
41882
41906
  const proposalTitle = resolvedInputs.proposalTitle;
@@ -42056,7 +42080,7 @@ import { IconThumbUp as IconThumbUp2 } from "@tabler/icons-react";
42056
42080
 
42057
42081
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
42058
42082
  import React350, { useCallback as useCallback121, useEffect as useEffect130, useState as useState192 } from "react";
42059
- import { Divider as Divider27, Loader as Loader72, SegmentedControl as SegmentedControl21, Stack as Stack239, Text as Text227 } from "@mantine/core";
42083
+ import { Divider as Divider27, Loader as Loader72, SegmentedControl as SegmentedControl22, Stack as Stack239, Text as Text227 } from "@mantine/core";
42060
42084
 
42061
42085
  // src/mantine/blocks/action/actionTypes/proposalVote/types.ts
42062
42086
  function parseProposalVoteInputs(json) {
@@ -42124,7 +42148,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
42124
42148
  fetchGroups();
42125
42149
  }, [handlers]);
42126
42150
  return /* @__PURE__ */ React350.createElement(Stack239, { gap: "lg" }, /* @__PURE__ */ React350.createElement(Stack239, { gap: "xs" }, /* @__PURE__ */ React350.createElement(Text227, { size: "sm", fw: 600 }, "DAO Group"), /* @__PURE__ */ React350.createElement(Text227, { size: "xs", c: "dimmed" }, "The DAO group whose proposal to vote on. Used to resolve the proposal contract address."), /* @__PURE__ */ React350.createElement(
42127
- SegmentedControl21,
42151
+ SegmentedControl22,
42128
42152
  {
42129
42153
  value: inputMode,
42130
42154
  onChange: (value) => setInputMode(value),
@@ -42193,7 +42217,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
42193
42217
  };
42194
42218
 
42195
42219
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
42196
- import React351, { useCallback as useCallback122, useEffect as useEffect131, useMemo as useMemo135, useState as useState193 } from "react";
42220
+ import React351, { useCallback as useCallback122, useEffect as useEffect131, useMemo as useMemo136, useState as useState193 } from "react";
42197
42221
  import { Box as Box70, Button as Button82, Card as Card30, Group as Group144, Progress as Progress6, Stack as Stack240, Text as Text228, Tooltip as Tooltip36 } from "@mantine/core";
42198
42222
  var getVoteIcon2 = (voteType) => {
42199
42223
  switch (voteType) {
@@ -42209,10 +42233,10 @@ var getVoteIcon2 = (voteType) => {
42209
42233
  };
42210
42234
  var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, executeAction }) => {
42211
42235
  const handlers = useBlocknoteHandlers();
42212
- const parsed = useMemo135(() => parseProposalVoteInputs(inputs), [inputs]);
42236
+ const parsed = useMemo136(() => parseProposalVoteInputs(inputs), [inputs]);
42213
42237
  const editorDocument = editor?.document || [];
42214
42238
  const runtimeReader = useRunRuntimeReader(editor);
42215
- const resolveOpts = useMemo135(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
42239
+ const resolveOpts = useMemo136(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
42216
42240
  const proposalId = resolveReferences(parsed.proposalId, editorDocument, resolveOpts).trim();
42217
42241
  const coreAddress = resolveReferences(parsed.coreAddress, editorDocument, resolveOpts).trim();
42218
42242
  const inputContractAddress = resolveReferences(parsed.proposalContractAddress, editorDocument, resolveOpts).trim();
@@ -42451,7 +42475,7 @@ registerActionTypeUI("qi/proposal.vote", {
42451
42475
  import { IconBolt as IconBolt13 } from "@tabler/icons-react";
42452
42476
 
42453
42477
  // src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectConfig.tsx
42454
- import React352, { useMemo as useMemo136, useState as useState194 } from "react";
42478
+ import React352, { useMemo as useMemo137, useState as useState194 } from "react";
42455
42479
  import { Box as Box71, Pill as Pill3, PillsInput as PillsInput3, Stack as Stack241, Text as Text229 } from "@mantine/core";
42456
42480
  function parseInputs2(json) {
42457
42481
  try {
@@ -42464,7 +42488,7 @@ function parseInputs2(json) {
42464
42488
  }
42465
42489
  }
42466
42490
  var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
42467
- const local = useMemo136(() => parseInputs2(inputs), [inputs]);
42491
+ const local = useMemo137(() => parseInputs2(inputs), [inputs]);
42468
42492
  const [inputValue, setInputValue] = useState194("");
42469
42493
  const update = (dids) => {
42470
42494
  onInputsChange(JSON.stringify({ ...local, protocolDids: dids }));
@@ -42496,7 +42520,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
42496
42520
  };
42497
42521
 
42498
42522
  // src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
42499
- import React353, { useCallback as useCallback123, useEffect as useEffect132, useMemo as useMemo137, useState as useState195 } from "react";
42523
+ import React353, { useCallback as useCallback123, useEffect as useEffect132, useMemo as useMemo138, useState as useState195 } from "react";
42500
42524
  import { Box as Box72, Group as Group145, Loader as Loader73, Stack as Stack242, Text as Text230 } from "@mantine/core";
42501
42525
  function parseInputs3(json) {
42502
42526
  try {
@@ -42510,7 +42534,7 @@ function parseInputs3(json) {
42510
42534
  }
42511
42535
  var ProtocolSelectFlowDetail = ({ inputs, block, runtime, isDisabled, executeAction }) => {
42512
42536
  const handlers = useBlocknoteHandlers();
42513
- const { protocolDids } = useMemo137(() => parseInputs3(inputs), [inputs]);
42537
+ const { protocolDids } = useMemo138(() => parseInputs3(inputs), [inputs]);
42514
42538
  const [protocols, setProtocols] = useState195([]);
42515
42539
  const selectedDid = runtime.output?.selectedProtocolDid;
42516
42540
  useEffect132(() => {
@@ -42667,7 +42691,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
42667
42691
  };
42668
42692
 
42669
42693
  // src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
42670
- import React355, { useCallback as useCallback125, useEffect as useEffect134, useMemo as useMemo138, useState as useState197 } from "react";
42694
+ import React355, { useCallback as useCallback125, useEffect as useEffect134, useMemo as useMemo139, useState as useState197 } from "react";
42671
42695
  import { Button as Button83, Group as Group146, Loader as Loader74, Stack as Stack244, Text as Text232 } from "@mantine/core";
42672
42696
  import { IconCheck as IconCheck35, IconAlertCircle as IconAlertCircle30, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
42673
42697
  var STEP_LABELS = {
@@ -42692,19 +42716,19 @@ var DomainSignFlowDetail = ({
42692
42716
  executeAction
42693
42717
  }) => {
42694
42718
  const handlers = useBlocknoteHandlers();
42695
- const parsed = useMemo138(() => parseDomainSignInputs(inputs), [inputs]);
42719
+ const parsed = useMemo139(() => parseDomainSignInputs(inputs), [inputs]);
42696
42720
  const editorDocument = editor?.document || [];
42697
42721
  const runtimeReader = useRunRuntimeReader(editor);
42698
- const resolveOpts = useMemo138(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
42722
+ const resolveOpts = useMemo139(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
42699
42723
  const entityType = resolveReferences(parsed.entityType, editorDocument, resolveOpts).trim();
42700
- const pendingPayload = useMemo138(() => {
42724
+ const pendingPayload = useMemo139(() => {
42701
42725
  if (!activePendingInvocation) return runtime.pendingPayload;
42702
42726
  return {
42703
42727
  ...activePendingInvocation.payload || {},
42704
42728
  ...activePendingInvocation.refSnapshots || {}
42705
42729
  };
42706
42730
  }, [activePendingInvocation, runtime.pendingPayload]);
42707
- const domainCardData = useMemo138(() => {
42731
+ const domainCardData = useMemo139(() => {
42708
42732
  try {
42709
42733
  const raw = pendingPayload?.domainCardData;
42710
42734
  if (!raw) return null;
@@ -42722,7 +42746,7 @@ var DomainSignFlowDetail = ({
42722
42746
  const [activeStep, setActiveStep] = useState197("");
42723
42747
  const [isSigning, setIsSigning] = useState197(false);
42724
42748
  const [localError, setLocalError] = useState197(null);
42725
- const domainSignCheckpoint = useMemo138(() => {
42749
+ const domainSignCheckpoint = useMemo139(() => {
42726
42750
  const bucket = runtime.cache?.domainSign;
42727
42751
  if (!bucket || typeof bucket !== "object") return null;
42728
42752
  const key = activePendingInvocation?.id || "manual";
@@ -42933,10 +42957,10 @@ var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
42933
42957
  };
42934
42958
 
42935
42959
  // src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewFlowDetail.tsx
42936
- import React357, { useCallback as useCallback127, useMemo as useMemo139, useState as useState199 } from "react";
42937
- import { Badge as Badge61, Box as Box73, Button as Button84, Code as Code14, Group as Group147, Loader as Loader75, ScrollArea as ScrollArea13, Stack as Stack246, Text as Text234 } from "@mantine/core";
42960
+ import React357, { useCallback as useCallback127, useMemo as useMemo140, useState as useState199 } from "react";
42961
+ import { Badge as Badge61, Box as Box73, Button as Button84, Code as Code14, Group as Group147, Loader as Loader75, ScrollArea as ScrollArea14, Stack as Stack246, Text as Text234 } from "@mantine/core";
42938
42962
  import { IconAlertCircle as IconAlertCircle31, IconCheck as IconCheck36, IconSparkles as IconSparkles8 } from "@tabler/icons-react";
42939
- var JsonViewer3 = ({ data }) => /* @__PURE__ */ React357.createElement(ScrollArea13.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React357.createElement(Stack246, { gap: "md" }, data.name && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React357.createElement(Text234, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React357.createElement(Stack246, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React357.createElement(Box73, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React357.createElement(Text234, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React357.createElement(Code14, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
42963
+ var JsonViewer3 = ({ data }) => /* @__PURE__ */ React357.createElement(ScrollArea14.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React357.createElement(Stack246, { gap: "md" }, data.name && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React357.createElement(Text234, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React357.createElement(Stack246, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React357.createElement(Box73, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React357.createElement(Text234, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React357.createElement(Box73, null, /* @__PURE__ */ React357.createElement(Text234, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React357.createElement(Code14, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
42940
42964
  var STATUS_BADGE = {
42941
42965
  approved: { color: "green", text: "Approved" },
42942
42966
  error: { color: "red", text: "Error" },
@@ -42961,22 +42985,22 @@ var DomainCardPreviewFlowDetail = ({ inputs, editor, block, runtime, isDisabled,
42961
42985
  const handlers = useBlocknoteHandlers();
42962
42986
  const [isAskingCompanion, setIsAskingCompanion] = useState199(false);
42963
42987
  const [companionError, setCompanionError] = useState199(null);
42964
- const parsed = useMemo139(() => parseDomainCardPreviewInputs(inputs), [inputs]);
42988
+ const parsed = useMemo140(() => parseDomainCardPreviewInputs(inputs), [inputs]);
42965
42989
  const editorDocument = editor?.document || [];
42966
42990
  const runtimeReader = useRunRuntimeReader(editor);
42967
- const resolveOpts = useMemo139(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
42968
- const upstreamCardData = useMemo139(() => {
42991
+ const resolveOpts = useMemo140(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
42992
+ const upstreamCardData = useMemo140(() => {
42969
42993
  if (!parsed.domainCardData) return void 0;
42970
42994
  const resolved = resolveReferences(parsed.domainCardData, editorDocument, resolveOpts);
42971
42995
  return coerce(resolved, void 0);
42972
42996
  }, [parsed.domainCardData, editorDocument, resolveOpts]);
42973
- const inputsPreview = useMemo139(() => buildPreviewFromInputs(parsed), [parsed]);
42974
- const inputsCardData = useMemo139(() => buildCardDataFromInputs(parsed), [parsed]);
42997
+ const inputsPreview = useMemo140(() => buildPreviewFromInputs(parsed), [parsed]);
42998
+ const inputsCardData = useMemo140(() => buildCardDataFromInputs(parsed), [parsed]);
42975
42999
  const loadingMessage = runtime.output?.loadingMessage || "Agents are analyzing your domain information...";
42976
43000
  const errorMessage = runtime.output?.errorMessage || "An error occurred while generating the domain data.";
42977
43001
  const domainPreviewData = coerce(runtime.output?.domainPreviewData, null) || inputsPreview;
42978
43002
  const domainCardData = coerce(runtime.output?.domainCardData, upstreamCardData) || inputsCardData;
42979
- const status = useMemo139(() => {
43003
+ const status = useMemo140(() => {
42980
43004
  const runtimeStatus = runtime.output?.status;
42981
43005
  if (runtimeStatus) return runtimeStatus;
42982
43006
  if (domainPreviewData || domainCardData) return "ready";
@@ -43095,15 +43119,15 @@ var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
43095
43119
  };
43096
43120
 
43097
43121
  // src/mantine/blocks/action/actionTypes/oracle/OracleFlowDetail.tsx
43098
- import React359, { useCallback as useCallback129, useMemo as useMemo140, useState as useState201 } from "react";
43122
+ import React359, { useCallback as useCallback129, useMemo as useMemo141, useState as useState201 } from "react";
43099
43123
  import { Button as Button85, Stack as Stack248 } from "@mantine/core";
43100
43124
  import { IconCheck as IconCheck37, IconAlertCircle as IconAlertCircle32, IconSparkles as IconSparkles9 } from "@tabler/icons-react";
43101
43125
  var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled }) => {
43102
43126
  const handlers = useBlocknoteHandlers();
43103
- const parsed = useMemo140(() => parseOracleInputs(inputs), [inputs]);
43127
+ const parsed = useMemo141(() => parseOracleInputs(inputs), [inputs]);
43104
43128
  const editorDocument = editor?.document || [];
43105
43129
  const runtimeReader = useRunRuntimeReader(editor);
43106
- const resolveOpts = useMemo140(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43130
+ const resolveOpts = useMemo141(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43107
43131
  const resolvedPrompt = resolveReferences(parsed.prompt, editorDocument, resolveOpts).trim();
43108
43132
  const [isLoading, setIsLoading] = useState201(false);
43109
43133
  const [error, setError] = useState201(null);
@@ -43200,7 +43224,7 @@ var OraclePromptConfig = ({ inputs, onInputsChange }) => {
43200
43224
  };
43201
43225
 
43202
43226
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptFlowDetail.tsx
43203
- import React361, { useCallback as useCallback131, useMemo as useMemo141, useState as useState203 } from "react";
43227
+ import React361, { useCallback as useCallback131, useMemo as useMemo142, useState as useState203 } from "react";
43204
43228
  import { Loader as Loader76, Stack as Stack250, Text as Text235 } from "@mantine/core";
43205
43229
  import { IconSend as IconSend8 } from "@tabler/icons-react";
43206
43230
  function parsePrimarySkill(rawSkill) {
@@ -43240,11 +43264,11 @@ function buildFinalPrompt(prompt, skill) {
43240
43264
  }
43241
43265
  var OraclePromptFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
43242
43266
  const handlers = useBlocknoteHandlers();
43243
- const parsed = useMemo141(() => parseOraclePromptInputs(inputs), [inputs]);
43267
+ const parsed = useMemo142(() => parseOraclePromptInputs(inputs), [inputs]);
43244
43268
  const editorDocument = editor?.document || [];
43245
43269
  const runtimeReader = useRunRuntimeReader(editor);
43246
- const resolveOpts = useMemo141(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43247
- const resolvedPrompt = useMemo141(() => resolveReferences(parsed.prompt || "", editorDocument, resolveOpts).trim(), [parsed.prompt, editorDocument, resolveOpts]);
43270
+ const resolveOpts = useMemo142(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43271
+ const resolvedPrompt = useMemo142(() => resolveReferences(parsed.prompt || "", editorDocument, resolveOpts).trim(), [parsed.prompt, editorDocument, resolveOpts]);
43248
43272
  const [submitting, setSubmitting] = useState203(false);
43249
43273
  const [error, setError] = useState203(null);
43250
43274
  const handleExecute = useCallback131(async () => {
@@ -43365,7 +43389,7 @@ var FormSubmitConfig = ({ inputs, onInputsChange }) => {
43365
43389
  };
43366
43390
 
43367
43391
  // src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitFlowDetail.tsx
43368
- import React363, { useCallback as useCallback133, useEffect as useEffect139, useMemo as useMemo142, useState as useState205 } from "react";
43392
+ import React363, { useCallback as useCallback133, useEffect as useEffect139, useMemo as useMemo143, useState as useState205 } from "react";
43369
43393
  import { Loader as Loader77, Stack as Stack252, Text as Text237 } from "@mantine/core";
43370
43394
  import { SurveyModel as SurveyModel12 } from "@ixo/surveys";
43371
43395
  function parsePrimarySkill2(rawSkill) {
@@ -43414,14 +43438,14 @@ ${answersJson}`
43414
43438
  }
43415
43439
  var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, isDisabled, executeAction }) => {
43416
43440
  const handlers = useBlocknoteHandlers();
43417
- const parsed = useMemo142(() => parseFormSubmitActionInputs(inputs), [inputs]);
43441
+ const parsed = useMemo143(() => parseFormSubmitActionInputs(inputs), [inputs]);
43418
43442
  const editorDocument = editor?.document || [];
43419
43443
  const runtimeReader = useRunRuntimeReader(editor);
43420
- const resolveOpts = useMemo142(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43421
- const resolvedSchemaString = useMemo142(() => resolveReferences(parsed.surveySchema || "", editorDocument, resolveOpts).trim(), [parsed.surveySchema, editorDocument, resolveOpts]);
43444
+ const resolveOpts = useMemo143(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43445
+ const resolvedSchemaString = useMemo143(() => resolveReferences(parsed.surveySchema || "", editorDocument, resolveOpts).trim(), [parsed.surveySchema, editorDocument, resolveOpts]);
43422
43446
  const [submitting, setSubmitting] = useState205(false);
43423
43447
  const [error, setError] = useState205(null);
43424
- const parsedSchema = useMemo142(() => {
43448
+ const parsedSchema = useMemo143(() => {
43425
43449
  if (!resolvedSchemaString) return null;
43426
43450
  try {
43427
43451
  const schema = JSON.parse(resolvedSchemaString);
@@ -43433,7 +43457,7 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, isDisabled, execut
43433
43457
  }, [resolvedSchemaString]);
43434
43458
  const isCompleted = runtime.state === "completed";
43435
43459
  const savedAnswers = isCompleted && runtime.output?.answers && typeof runtime.output.answers === "object" ? runtime.output.answers : null;
43436
- const surveyModel = useMemo142(() => {
43460
+ const surveyModel = useMemo143(() => {
43437
43461
  if (!parsedSchema) return null;
43438
43462
  const model = new SurveyModel12(parsedSchema);
43439
43463
  model.applyTheme(surveyTheme);
@@ -43595,7 +43619,7 @@ var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
43595
43619
  };
43596
43620
 
43597
43621
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreFlowDetail.tsx
43598
- import React365, { useCallback as useCallback135, useMemo as useMemo143, useState as useState207 } from "react";
43622
+ import React365, { useCallback as useCallback135, useMemo as useMemo144, useState as useState207 } from "react";
43599
43623
  import { Button as Button86, Code as Code15, Loader as Loader78, Stack as Stack254, Text as Text239 } from "@mantine/core";
43600
43624
  import { IconShieldCheck as IconShieldCheck17 } from "@tabler/icons-react";
43601
43625
  function safeParse(value) {
@@ -43611,7 +43635,7 @@ function safeParse(value) {
43611
43635
  return result;
43612
43636
  }
43613
43637
  function CredentialPreview({ value }) {
43614
- const display = useMemo143(() => {
43638
+ const display = useMemo144(() => {
43615
43639
  if (!value) return null;
43616
43640
  const parsed = safeParse(value);
43617
43641
  if (parsed && typeof parsed === "object") {
@@ -43623,16 +43647,16 @@ function CredentialPreview({ value }) {
43623
43647
  return /* @__PURE__ */ React365.createElement(React365.Fragment, null, /* @__PURE__ */ React365.createElement(Text239, { size: "xs", fw: 600, c: "dimmed" }, "Credential"), /* @__PURE__ */ React365.createElement(Code15, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, display));
43624
43648
  }
43625
43649
  var CredentialStoreFlowDetail = ({ inputs, editor, runtime, isDisabled, executeAction }) => {
43626
- const parsed = useMemo143(() => parseCredentialStoreInputs(inputs), [inputs]);
43650
+ const parsed = useMemo144(() => parseCredentialStoreInputs(inputs), [inputs]);
43627
43651
  const editorDocument = editor?.document || [];
43628
43652
  const runtimeReader = useRunRuntimeReader(editor);
43629
- const resolveOpts = useMemo143(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43630
- const resolvedCredentialKey = useMemo143(
43653
+ const resolveOpts = useMemo144(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
43654
+ const resolvedCredentialKey = useMemo144(
43631
43655
  () => resolveReferences(parsed.credentialKey || "", editorDocument, resolveOpts).trim(),
43632
43656
  [parsed.credentialKey, editorDocument, resolveOpts]
43633
43657
  );
43634
- const resolvedCredential = useMemo143(() => resolveReferences(parsed.credential || "", editorDocument, resolveOpts).trim(), [parsed.credential, editorDocument, resolveOpts]);
43635
- const resolvedRoomId = useMemo143(() => resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim(), [parsed.roomId, editorDocument, resolveOpts]);
43658
+ const resolvedCredential = useMemo144(() => resolveReferences(parsed.credential || "", editorDocument, resolveOpts).trim(), [parsed.credential, editorDocument, resolveOpts]);
43659
+ const resolvedRoomId = useMemo144(() => resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim(), [parsed.roomId, editorDocument, resolveOpts]);
43636
43660
  const [submitting, setSubmitting] = useState207(false);
43637
43661
  const [error, setError] = useState207(null);
43638
43662
  const hasCredential = !!resolvedCredential;
@@ -43680,7 +43704,7 @@ registerActionTypeUI("qi/credential.store", {
43680
43704
  import { IconMessageCircle } from "@tabler/icons-react";
43681
43705
 
43682
43706
  // src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
43683
- import React366, { useCallback as useCallback136, useEffect as useEffect141, useMemo as useMemo144, useState as useState208 } from "react";
43707
+ import React366, { useCallback as useCallback136, useEffect as useEffect141, useMemo as useMemo145, useState as useState208 } from "react";
43684
43708
  import { Flex as Flex38, Stack as Stack255, Text as Text240 } from "@mantine/core";
43685
43709
 
43686
43710
  // src/mantine/blocks/action/actionTypes/matrixDm/types.ts
@@ -43732,13 +43756,13 @@ var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
43732
43756
  },
43733
43757
  [local, onInputsChange]
43734
43758
  );
43735
- const selectData = useMemo144(() => {
43759
+ const selectData = useMemo145(() => {
43736
43760
  return roomMembers.map((member) => ({
43737
43761
  value: member.did,
43738
43762
  label: member.name || member.did
43739
43763
  }));
43740
43764
  }, [roomMembers]);
43741
- const memberLookup = useMemo144(() => {
43765
+ const memberLookup = useMemo145(() => {
43742
43766
  const lookup = {};
43743
43767
  roomMembers.forEach((member) => {
43744
43768
  lookup[member.did] = member;
@@ -43797,14 +43821,14 @@ import React368, { useCallback as useCallback138, useEffect as useEffect143, use
43797
43821
  import { Divider as Divider28, Stack as Stack257, Text as Text242 } from "@mantine/core";
43798
43822
 
43799
43823
  // src/mantine/blocks/action/actionTypes/_shared/ConnectionSelector.tsx
43800
- import React367, { useCallback as useCallback137, useEffect as useEffect142, useMemo as useMemo145, useRef as useRef54, useState as useState209 } from "react";
43824
+ import React367, { useCallback as useCallback137, useEffect as useEffect142, useMemo as useMemo146, useRef as useRef54, useState as useState209 } from "react";
43801
43825
  import { Alert as Alert57, Button as Button87, Group as Group148, Loader as Loader79, Stack as Stack256, Text as Text241 } from "@mantine/core";
43802
43826
  import { IconPlug, IconRefresh as IconRefresh12 } from "@tabler/icons-react";
43803
43827
  var POLL_INTERVAL_MS2 = 2e3;
43804
43828
  var CONNECT_TIMEOUT_MS = 12e4;
43805
43829
  var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled }) => {
43806
43830
  const handlers = useBlocknoteHandlers();
43807
- const entityDid = useMemo145(() => handlers?.getEntityDid?.() || "", [handlers]);
43831
+ const entityDid = useMemo146(() => handlers?.getEntityDid?.() || "", [handlers]);
43808
43832
  const [connections, setConnections] = useState209([]);
43809
43833
  const [loading, setLoading] = useState209(false);
43810
43834
  const [hasLoaded, setHasLoaded] = useState209(false);
@@ -43929,7 +43953,7 @@ var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled })
43929
43953
  setError(err instanceof Error ? err.message : `Failed to start ${toolkitLabel} connection`);
43930
43954
  }
43931
43955
  }, [entityDid, handlers, loadConnections, onChange, toolkit, toolkitLabel]);
43932
- const options = useMemo145(
43956
+ const options = useMemo146(
43933
43957
  () => connections.map((c) => ({
43934
43958
  value: c.connectedAccountId,
43935
43959
  label: c.label ? `${c.label}${c.status === "ACTIVE" ? "" : ` (${c.status.toLowerCase()})`}` : `Connection ${c.connectedAccountId.slice(-6)}`
@@ -44075,7 +44099,7 @@ var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
44075
44099
  };
44076
44100
 
44077
44101
  // src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateFlowDetail.tsx
44078
- import React369, { useCallback as useCallback139, useEffect as useEffect144, useMemo as useMemo146, useState as useState211 } from "react";
44102
+ import React369, { useCallback as useCallback139, useEffect as useEffect144, useMemo as useMemo147, useState as useState211 } from "react";
44079
44103
  import { Anchor as Anchor2, Stack as Stack258, Text as Text243 } from "@mantine/core";
44080
44104
  var CalendarEventCreateFlowDetail = ({
44081
44105
  inputs,
@@ -44089,11 +44113,11 @@ var CalendarEventCreateFlowDetail = ({
44089
44113
  executeAction
44090
44114
  }) => {
44091
44115
  const handlers = useBlocknoteHandlers();
44092
- const entityDid = useMemo146(() => handlers?.getEntityDid?.() || "", [handlers]);
44093
- const parsed = useMemo146(() => parseCalendarEventCreateInputs(inputs), [inputs]);
44116
+ const entityDid = useMemo147(() => handlers?.getEntityDid?.() || "", [handlers]);
44117
+ const parsed = useMemo147(() => parseCalendarEventCreateInputs(inputs), [inputs]);
44094
44118
  const editorDocument = editor?.document || [];
44095
44119
  const runtimeReader = useRunRuntimeReader(editor);
44096
- const resolveOpts = useMemo146(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
44120
+ const resolveOpts = useMemo147(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
44097
44121
  const resolve = useCallback139(
44098
44122
  (field) => {
44099
44123
  const v = parsed[field];
@@ -44363,7 +44387,7 @@ var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
44363
44387
  };
44364
44388
 
44365
44389
  // src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateFlowDetail.tsx
44366
- import React371, { useCallback as useCallback141, useEffect as useEffect146, useMemo as useMemo147, useState as useState213 } from "react";
44390
+ import React371, { useCallback as useCallback141, useEffect as useEffect146, useMemo as useMemo148, useState as useState213 } from "react";
44367
44391
  import { Anchor as Anchor3, Stack as Stack260, Text as Text245 } from "@mantine/core";
44368
44392
  var CalendarEventUpdateFlowDetail = ({
44369
44393
  inputs,
@@ -44377,11 +44401,11 @@ var CalendarEventUpdateFlowDetail = ({
44377
44401
  executeAction
44378
44402
  }) => {
44379
44403
  const handlers = useBlocknoteHandlers();
44380
- const entityDid = useMemo147(() => handlers?.getEntityDid?.() || "", [handlers]);
44381
- const parsed = useMemo147(() => parseCalendarEventUpdateInputs(inputs), [inputs]);
44404
+ const entityDid = useMemo148(() => handlers?.getEntityDid?.() || "", [handlers]);
44405
+ const parsed = useMemo148(() => parseCalendarEventUpdateInputs(inputs), [inputs]);
44382
44406
  const editorDocument = editor?.document || [];
44383
44407
  const runtimeReader = useRunRuntimeReader(editor);
44384
- const resolveOpts = useMemo147(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
44408
+ const resolveOpts = useMemo148(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
44385
44409
  const resolve = useCallback141(
44386
44410
  (field) => {
44387
44411
  const v = parsed[field];
@@ -44611,13 +44635,13 @@ var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
44611
44635
  };
44612
44636
 
44613
44637
  // src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListFlowDetail.tsx
44614
- import React373, { useCallback as useCallback143, useMemo as useMemo148, useState as useState215 } from "react";
44638
+ import React373, { useCallback as useCallback143, useMemo as useMemo149, useState as useState215 } from "react";
44615
44639
  import { Badge as Badge62, Button as Button88, Loader as Loader80, Stack as Stack262 } from "@mantine/core";
44616
44640
  import { IconRefresh as IconRefresh13 } from "@tabler/icons-react";
44617
44641
  var CalendarEventListFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
44618
44642
  const handlers = useBlocknoteHandlers();
44619
- const entityDid = useMemo148(() => handlers?.getEntityDid?.() || "", [handlers]);
44620
- const parsed = useMemo148(() => parseCalendarEventListInputs(inputs), [inputs]);
44643
+ const entityDid = useMemo149(() => handlers?.getEntityDid?.() || "", [handlers]);
44644
+ const parsed = useMemo149(() => parseCalendarEventListInputs(inputs), [inputs]);
44621
44645
  const connection = parsed.connection;
44622
44646
  const hasConnection = !!connection?.connectedAccountId;
44623
44647
  const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
@@ -44783,7 +44807,7 @@ var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
44783
44807
  };
44784
44808
 
44785
44809
  // src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateFlowDetail.tsx
44786
- import React375, { useCallback as useCallback145, useEffect as useEffect149, useMemo as useMemo149, useState as useState217 } from "react";
44810
+ import React375, { useCallback as useCallback145, useEffect as useEffect149, useMemo as useMemo150, useState as useState217 } from "react";
44787
44811
  import { Stack as Stack264, Text as Text248 } from "@mantine/core";
44788
44812
  var XeroContactCreateFlowDetail = ({
44789
44813
  inputs,
@@ -44797,11 +44821,11 @@ var XeroContactCreateFlowDetail = ({
44797
44821
  executeAction
44798
44822
  }) => {
44799
44823
  const handlers = useBlocknoteHandlers();
44800
- const entityDid = useMemo149(() => handlers?.getEntityDid?.() || "", [handlers]);
44801
- const parsed = useMemo149(() => parseXeroContactCreateInputs(inputs), [inputs]);
44824
+ const entityDid = useMemo150(() => handlers?.getEntityDid?.() || "", [handlers]);
44825
+ const parsed = useMemo150(() => parseXeroContactCreateInputs(inputs), [inputs]);
44802
44826
  const editorDocument = editor?.document || [];
44803
44827
  const runtimeReader = useRunRuntimeReader(editor);
44804
- const resolveOpts = useMemo149(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
44828
+ const resolveOpts = useMemo150(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
44805
44829
  const resolve = useCallback145(
44806
44830
  (field) => {
44807
44831
  const v = parsed[field];
@@ -45004,10 +45028,10 @@ function finaliseLineItem(cells) {
45004
45028
  }
45005
45029
 
45006
45030
  // src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroLineItemsEditor.tsx
45007
- import React376, { useCallback as useCallback146, useMemo as useMemo150 } from "react";
45008
- import { ActionIcon as ActionIcon58, Alert as Alert58, Box as Box74, Button as Button89, Collapse as Collapse11, Divider as Divider32, Group as Group151, SegmentedControl as SegmentedControl22, Stack as Stack265, Text as Text249, Tooltip as Tooltip37 } from "@mantine/core";
45031
+ import React376, { useCallback as useCallback146, useMemo as useMemo151 } from "react";
45032
+ import { ActionIcon as ActionIcon58, Alert as Alert58, Box as Box74, Button as Button89, Collapse as Collapse10, Divider as Divider32, Group as Group151, SegmentedControl as SegmentedControl23, Stack as Stack265, Text as Text249, Tooltip as Tooltip37 } from "@mantine/core";
45009
45033
  import { useDisclosure as useDisclosure6 } from "@mantine/hooks";
45010
- import { IconChevronDown as IconChevronDown10, IconChevronRight as IconChevronRight13, IconPlus as IconPlus14, IconTrash as IconTrash15 } from "@tabler/icons-react";
45034
+ import { IconChevronDown as IconChevronDown9, IconChevronRight as IconChevronRight13, IconPlus as IconPlus14, IconTrash as IconTrash15 } from "@tabler/icons-react";
45011
45035
  function getNestedField(fields, path) {
45012
45036
  if (!fields || !path) return void 0;
45013
45037
  return fields.find((f) => f.path === path);
@@ -45042,7 +45066,7 @@ function XeroLineItemsEditor({ value, onChange, editorDocument, currentBlockId }
45042
45066
  [value, onChange]
45043
45067
  );
45044
45068
  return /* @__PURE__ */ React376.createElement(Stack265, { gap: "sm" }, /* @__PURE__ */ React376.createElement(Group151, { justify: "space-between", align: "center" }, /* @__PURE__ */ React376.createElement(Text249, { size: "sm", fw: 600 }, "Line items"), /* @__PURE__ */ React376.createElement(
45045
- SegmentedControl22,
45069
+ SegmentedControl23,
45046
45070
  {
45047
45071
  size: "xs",
45048
45072
  value: value.mode,
@@ -45165,12 +45189,12 @@ function LineItemRowCard({
45165
45189
  variant: "subtle",
45166
45190
  color: "gray",
45167
45191
  onClick: toggleAdvanced,
45168
- leftSection: advancedOpen ? /* @__PURE__ */ React376.createElement(IconChevronDown10, { size: 14 }) : /* @__PURE__ */ React376.createElement(IconChevronRight13, { size: 14 }),
45192
+ leftSection: advancedOpen ? /* @__PURE__ */ React376.createElement(IconChevronDown9, { size: 14 }) : /* @__PURE__ */ React376.createElement(IconChevronRight13, { size: 14 }),
45169
45193
  style: { alignSelf: "flex-start" }
45170
45194
  },
45171
45195
  advancedOpen ? "Hide" : "More",
45172
45196
  " (Tax, Item code, Discount)"
45173
- ), /* @__PURE__ */ React376.createElement(Collapse11, { in: advancedOpen }, /* @__PURE__ */ React376.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React376.createElement(
45197
+ ), /* @__PURE__ */ React376.createElement(Collapse10, { in: advancedOpen }, /* @__PURE__ */ React376.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React376.createElement(
45174
45198
  DataInput,
45175
45199
  {
45176
45200
  label: "Tax type",
@@ -45211,8 +45235,8 @@ function IterativeMapEditor({
45211
45235
  editorDocument,
45212
45236
  currentBlockId
45213
45237
  }) {
45214
- const itemSchema = useMemo150(() => resolveItemSchema(value.source, editorDocument), [value.source, editorDocument]);
45215
- const itemScope = useMemo150(() => {
45238
+ const itemSchema = useMemo151(() => resolveItemSchema(value.source, editorDocument), [value.source, editorDocument]);
45239
+ const itemScope = useMemo151(() => {
45216
45240
  if (!itemSchema) return void 0;
45217
45241
  return {
45218
45242
  schema: itemSchema.map((f) => ({
@@ -45360,7 +45384,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
45360
45384
  };
45361
45385
 
45362
45386
  // src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateFlowDetail.tsx
45363
- import React378, { useCallback as useCallback149, useEffect as useEffect152, useMemo as useMemo151, useState as useState220 } from "react";
45387
+ import React378, { useCallback as useCallback149, useEffect as useEffect152, useMemo as useMemo152, useState as useState220 } from "react";
45364
45388
  import { Badge as Badge63, Box as Box75, Button as Button90, Group as Group153, Stack as Stack267, Text as Text251 } from "@mantine/core";
45365
45389
  import { IconX as IconX26 } from "@tabler/icons-react";
45366
45390
 
@@ -45569,19 +45593,19 @@ var XeroInvoiceCreateFlowDetail = ({
45569
45593
  executeAction
45570
45594
  }) => {
45571
45595
  const handlers = useBlocknoteHandlers();
45572
- const flowId = useMemo151(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
45573
- const actorDid = useMemo151(() => {
45596
+ const flowId = useMemo152(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
45597
+ const actorDid = useMemo152(() => {
45574
45598
  try {
45575
45599
  return handlers?.getCurrentUser?.()?.address || "";
45576
45600
  } catch {
45577
45601
  return "";
45578
45602
  }
45579
45603
  }, [handlers]);
45580
- const entityDid = useMemo151(() => handlers?.getEntityDid?.() || "", [handlers]);
45581
- const parsed = useMemo151(() => parseXeroInvoiceCreateInputs(inputs), [inputs]);
45604
+ const entityDid = useMemo152(() => handlers?.getEntityDid?.() || "", [handlers]);
45605
+ const parsed = useMemo152(() => parseXeroInvoiceCreateInputs(inputs), [inputs]);
45582
45606
  const editorDocument = editor?.document || [];
45583
45607
  const runtimeReader = useRunRuntimeReader(editor);
45584
- const resolveOpts = useMemo151(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
45608
+ const resolveOpts = useMemo152(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
45585
45609
  const seedFromTemplate = useCallback149(
45586
45610
  (field) => {
45587
45611
  const v = parsed[field];
@@ -45625,7 +45649,7 @@ var XeroInvoiceCreateFlowDetail = ({
45625
45649
  }, []);
45626
45650
  const workItems = useXeroWorkItems(editor, { kind: "invoice.create", assignedBlockId: block.id, statuses: ["pending", "failed", "completed"] });
45627
45651
  const [selectedWorkItemId, setSelectedWorkItemId] = useState220("");
45628
- const selectedWorkItem = useMemo151(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
45652
+ const selectedWorkItem = useMemo152(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
45629
45653
  const selectedWorkItemCompleted = selectedWorkItem?.status === "completed";
45630
45654
  useEffect152(() => {
45631
45655
  if (!selectedWorkItem) return;
@@ -45649,14 +45673,14 @@ var XeroInvoiceCreateFlowDetail = ({
45649
45673
  const hasConnection = !!effectiveConnection?.connectedAccountId;
45650
45674
  const entityMismatch = hasConnection && entityDid && effectiveConnection.entityDid && effectiveConnection.entityDid !== entityDid;
45651
45675
  const isCompleted = runtime.state === "completed" && !selectedWorkItem;
45652
- const paymentBlock = useMemo151(() => {
45676
+ const paymentBlock = useMemo152(() => {
45653
45677
  if (!selectedWorkItem) return null;
45654
45678
  const evaluationBlock = editor?.document?.find((candidate) => candidate?.id === selectedWorkItem.source.evaluationBlockId);
45655
45679
  const inputs2 = typeof evaluationBlock?.props?.inputs === "string" ? JSON.parse(evaluationBlock.props.inputs || "{}") : evaluationBlock?.props?.inputs || {};
45656
45680
  const paymentBlockId = String(inputs2?.xeroPaymentBlockId || "").trim();
45657
45681
  return paymentBlockId ? editor?.document?.find((candidate) => candidate?.id === paymentBlockId && candidate?.props?.actionType === "qi/xero.payment.create") || null : null;
45658
45682
  }, [editor, selectedWorkItem]);
45659
- const lineItemsValidation = useMemo151(() => {
45683
+ const lineItemsValidation = useMemo152(() => {
45660
45684
  try {
45661
45685
  if (selectedWorkItem) {
45662
45686
  const arr2 = reviewLineItems.map((item) => finaliseLineItem(item));
@@ -46090,13 +46114,13 @@ var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
46090
46114
  };
46091
46115
 
46092
46116
  // src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListFlowDetail.tsx
46093
- import React380, { useCallback as useCallback151, useMemo as useMemo152, useState as useState222 } from "react";
46117
+ import React380, { useCallback as useCallback151, useMemo as useMemo153, useState as useState222 } from "react";
46094
46118
  import { Badge as Badge64, Button as Button91, Loader as Loader81, Stack as Stack269 } from "@mantine/core";
46095
46119
  import { IconRefresh as IconRefresh14 } from "@tabler/icons-react";
46096
46120
  var XeroInvoiceListFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
46097
46121
  const handlers = useBlocknoteHandlers();
46098
- const entityDid = useMemo152(() => handlers?.getEntityDid?.() || "", [handlers]);
46099
- const parsed = useMemo152(() => parseXeroInvoiceListInputs(inputs), [inputs]);
46122
+ const entityDid = useMemo153(() => handlers?.getEntityDid?.() || "", [handlers]);
46123
+ const parsed = useMemo153(() => parseXeroInvoiceListInputs(inputs), [inputs]);
46100
46124
  const connection = parsed.connection;
46101
46125
  const hasConnection = !!connection?.connectedAccountId;
46102
46126
  const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
@@ -46234,7 +46258,7 @@ var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
46234
46258
  };
46235
46259
 
46236
46260
  // src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateFlowDetail.tsx
46237
- import React383, { useCallback as useCallback153, useEffect as useEffect157, useMemo as useMemo154, useState as useState226 } from "react";
46261
+ import React383, { useCallback as useCallback153, useEffect as useEffect157, useMemo as useMemo155, useState as useState226 } from "react";
46238
46262
  import { ActionIcon as ActionIcon59, Badge as Badge65, Button as Button92, Group as Group157, Stack as Stack272, Text as Text255 } from "@mantine/core";
46239
46263
  import { IconArrowLeft as IconArrowLeft12 } from "@tabler/icons-react";
46240
46264
 
@@ -46258,7 +46282,7 @@ function useFlowXeroBinding(editor) {
46258
46282
  }
46259
46283
 
46260
46284
  // src/mantine/blocks/action/actionTypes/xero/_shared/workItemReview.tsx
46261
- import React382, { useEffect as useEffect156, useMemo as useMemo153, useRef as useRef55, useState as useState225 } from "react";
46285
+ import React382, { useEffect as useEffect156, useMemo as useMemo154, useRef as useRef55, useState as useState225 } from "react";
46262
46286
  import { Box as Box76, Group as Group156, Stack as Stack271, Text as Text254 } from "@mantine/core";
46263
46287
  import { IconCheck as IconCheck38 } from "@tabler/icons-react";
46264
46288
  function timeAgo(input) {
@@ -46306,7 +46330,7 @@ function useClaimantProfiles(dids) {
46306
46330
  handlersRef.current = handlers;
46307
46331
  const attemptedRef = useRef55(/* @__PURE__ */ new Set());
46308
46332
  const [profiles, setProfiles] = useState225({});
46309
- const key = useMemo153(
46333
+ const key = useMemo154(
46310
46334
  () => Array.from(new Set(dids.filter((did) => !!did))).sort().join("|"),
46311
46335
  [dids.join("|")]
46312
46336
  );
@@ -46433,20 +46457,20 @@ var XeroPaymentCreateFlowDetail = ({
46433
46457
  }) => {
46434
46458
  const t = useTranslate();
46435
46459
  const handlers = useBlocknoteHandlers();
46436
- const actorDid = useMemo154(() => {
46460
+ const actorDid = useMemo155(() => {
46437
46461
  try {
46438
46462
  return handlers?.getCurrentUser?.()?.address || "";
46439
46463
  } catch {
46440
46464
  return "";
46441
46465
  }
46442
46466
  }, [handlers]);
46443
- const entityDid = useMemo154(() => handlers?.getEntityDid?.() || "", [handlers]);
46467
+ const entityDid = useMemo155(() => handlers?.getEntityDid?.() || "", [handlers]);
46444
46468
  const editorDocument = editor?.document || [];
46445
46469
  const liveInputs = editorDocument.find((b) => b?.id === block.id)?.props?.inputs;
46446
46470
  const effectiveInputs = typeof liveInputs === "string" && liveInputs ? liveInputs : inputs;
46447
- const parsed = useMemo154(() => parseXeroPaymentCreateInputs(effectiveInputs), [effectiveInputs]);
46471
+ const parsed = useMemo155(() => parseXeroPaymentCreateInputs(effectiveInputs), [effectiveInputs]);
46448
46472
  const runtimeReader = useRunRuntimeReader(editor);
46449
- const resolveOpts = useMemo154(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
46473
+ const resolveOpts = useMemo155(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
46450
46474
  const seedFromTemplate = useCallback153(
46451
46475
  (field) => {
46452
46476
  const v = parsed[field];
@@ -46482,10 +46506,10 @@ var XeroPaymentCreateFlowDetail = ({
46482
46506
  const managedByOracle = parsed.managedByOracle;
46483
46507
  const workItems = useXeroWorkItems(editor, { kind: "payment.create", assignedBlockId: block.id, statuses: ["pending", "approved", "failed", "completed"] });
46484
46508
  const [selectedWorkItemId, setSelectedWorkItemId] = useState226("");
46485
- const selectedWorkItem = useMemo154(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
46509
+ const selectedWorkItem = useMemo155(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
46486
46510
  const selectedWorkItemCompleted = selectedWorkItem?.status === "completed";
46487
46511
  const invoiceItems = useXeroWorkItems(editor, { kind: "invoice.create" });
46488
- const invoiceItemById = useMemo154(() => {
46512
+ const invoiceItemById = useMemo155(() => {
46489
46513
  const map = /* @__PURE__ */ new Map();
46490
46514
  invoiceItems.forEach((item) => map.set(item.id, item));
46491
46515
  return map;
@@ -46497,7 +46521,7 @@ var XeroPaymentCreateFlowDetail = ({
46497
46521
  },
46498
46522
  [invoiceItemById]
46499
46523
  );
46500
- const attachedInvoice = useMemo154(() => invoiceItemFor(selectedWorkItem), [invoiceItemFor, selectedWorkItem]);
46524
+ const attachedInvoice = useMemo155(() => invoiceItemFor(selectedWorkItem), [invoiceItemFor, selectedWorkItem]);
46501
46525
  const attachedInvoiceResult = attachedInvoice?.result || {};
46502
46526
  const attachedInvoicePayload = attachedInvoiceResult.submittedPayload || attachedInvoice?.submittedPayload || attachedInvoice?.reviewPayload || {};
46503
46527
  const attachedInvoiceLineItems = Array.isArray(attachedInvoicePayload.LineItems) ? attachedInvoicePayload.LineItems : [];
@@ -46517,7 +46541,7 @@ var XeroPaymentCreateFlowDetail = ({
46517
46541
  const bankAccountId = (binding?.bankAccountId || "").trim();
46518
46542
  const entityMismatch = hasConnection && entityDid && binding.entityDid && binding.entityDid !== entityDid;
46519
46543
  const isCompleted = runtime.state === "completed" && !selectedWorkItem;
46520
- const amountNumber = useMemo154(() => {
46544
+ const amountNumber = useMemo155(() => {
46521
46545
  const trimmed = local.Amount.trim();
46522
46546
  if (!trimmed) return NaN;
46523
46547
  return Number(trimmed);
@@ -46638,7 +46662,7 @@ var XeroPaymentCreateFlowDetail = ({
46638
46662
  if (!provideSigningHandler) return;
46639
46663
  provideSigningHandler(execute);
46640
46664
  }, [provideSigningHandler, execute]);
46641
- const sortedItems = useMemo154(
46665
+ const sortedItems = useMemo155(
46642
46666
  () => [...workItems].sort((a, b) => {
46643
46667
  const rank = (STATUS_ORDER[a.status] ?? 9) - (STATUS_ORDER[b.status] ?? 9);
46644
46668
  if (rank !== 0) return rank;
@@ -46942,16 +46966,16 @@ var BoundConnectionSelector = ({ toolkit, toolkitLabel, templateId, connection,
46942
46966
  };
46943
46967
 
46944
46968
  // src/mantine/blocks/action/actionTypes/_shared/DynamicToolForm.tsx
46945
- import React385, { useMemo as useMemo155, useState as useState228 } from "react";
46946
- import { Button as Button94, Collapse as Collapse12, Stack as Stack274 } from "@mantine/core";
46947
- import { IconChevronDown as IconChevronDown11, IconChevronRight as IconChevronRight14 } from "@tabler/icons-react";
46969
+ import React385, { useMemo as useMemo156, useState as useState228 } from "react";
46970
+ import { Button as Button94, Collapse as Collapse11, Stack as Stack274 } from "@mantine/core";
46971
+ import { IconChevronDown as IconChevronDown10, IconChevronRight as IconChevronRight14 } from "@tabler/icons-react";
46948
46972
  var ALWAYS_EXCLUDE = /* @__PURE__ */ new Set(["user_id", "connected_account_id"]);
46949
46973
  function prettify(name) {
46950
46974
  return name.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
46951
46975
  }
46952
46976
  var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, readOnly, excludeFields }) => {
46953
- const exclude = useMemo155(() => /* @__PURE__ */ new Set([...ALWAYS_EXCLUDE, ...excludeFields || []]), [excludeFields]);
46954
- const { required, optional } = useMemo155(() => {
46977
+ const exclude = useMemo156(() => /* @__PURE__ */ new Set([...ALWAYS_EXCLUDE, ...excludeFields || []]), [excludeFields]);
46978
+ const { required, optional } = useMemo156(() => {
46955
46979
  const reqSet = new Set(schema.parameters.required || []);
46956
46980
  const req = [];
46957
46981
  const opt = [];
@@ -47012,7 +47036,7 @@ var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, read
47012
47036
  variant: "subtle",
47013
47037
  size: "xs",
47014
47038
  color: "gray",
47015
- leftSection: showOptional ? /* @__PURE__ */ React385.createElement(IconChevronDown11, { size: 14 }) : /* @__PURE__ */ React385.createElement(IconChevronRight14, { size: 14 }),
47039
+ leftSection: showOptional ? /* @__PURE__ */ React385.createElement(IconChevronDown10, { size: 14 }) : /* @__PURE__ */ React385.createElement(IconChevronRight14, { size: 14 }),
47016
47040
  onClick: () => setShowOptional((s) => !s),
47017
47041
  style: { alignSelf: "flex-start" }
47018
47042
  },
@@ -47020,7 +47044,7 @@ var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, read
47020
47044
  " optional fields (",
47021
47045
  optional.length,
47022
47046
  ")"
47023
- ), /* @__PURE__ */ React385.createElement(Collapse12, { in: showOptional }, /* @__PURE__ */ React385.createElement(Stack274, { gap: "sm" }, optional.map(renderField)))));
47047
+ ), /* @__PURE__ */ React385.createElement(Collapse11, { in: showOptional }, /* @__PURE__ */ React385.createElement(Stack274, { gap: "sm" }, optional.map(renderField)))));
47024
47048
  };
47025
47049
 
47026
47050
  // src/mantine/blocks/action/actionTypes/_shared/DelegatedActionConfig.tsx
@@ -47053,7 +47077,7 @@ var DelegatedActionConfig = ({ inputs, onInputsChange, editor, blockId, toolkit,
47053
47077
  };
47054
47078
 
47055
47079
  // src/mantine/blocks/action/actionTypes/_shared/DelegatedActionFlowDetail.tsx
47056
- import React387, { useCallback as useCallback156, useEffect as useEffect160, useMemo as useMemo156, useRef as useRef57, useState as useState230 } from "react";
47080
+ import React387, { useCallback as useCallback156, useEffect as useEffect160, useMemo as useMemo157, useRef as useRef57, useState as useState230 } from "react";
47057
47081
  import { Button as Button95, Loader as Loader83, Stack as Stack276, Text as Text257 } from "@mantine/core";
47058
47082
  import { IconSend as IconSend9 } from "@tabler/icons-react";
47059
47083
  var DelegatedActionFlowDetail = ({
@@ -47071,11 +47095,11 @@ var DelegatedActionFlowDetail = ({
47071
47095
  schema,
47072
47096
  submitLabel
47073
47097
  }) => {
47074
- const parsed = useMemo156(() => parseDelegatedToolInputs(inputs), [inputs]);
47098
+ const parsed = useMemo157(() => parseDelegatedToolInputs(inputs), [inputs]);
47075
47099
  const editorDocument = editor?.document || [];
47076
47100
  const runtimeReader = useRunRuntimeReader(editor);
47077
- const resolveOpts = useMemo156(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47078
- const fieldNames = useMemo156(() => Object.keys(schema.parameters.properties || {}), [schema]);
47101
+ const resolveOpts = useMemo157(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47102
+ const fieldNames = useMemo157(() => Object.keys(schema.parameters.properties || {}), [schema]);
47079
47103
  const resolve = useCallback156(
47080
47104
  (name) => {
47081
47105
  const v = parsed[name];
@@ -47106,7 +47130,7 @@ var DelegatedActionFlowDetail = ({
47106
47130
  const connection = parsed.connection;
47107
47131
  const hasBinding = !!connection?.bindingId;
47108
47132
  const isCompleted = runtime.state === "completed";
47109
- const missing = useMemo156(() => missingRequired(schema, local), [schema, local]);
47133
+ const missing = useMemo157(() => missingRequired(schema, local), [schema, local]);
47110
47134
  const canRun = hasBinding && missing.length === 0 && !isCompleted && !isDisabled;
47111
47135
  const [error, setError] = useState230(null);
47112
47136
  const [submitting, setSubmitting] = useState230(false);
@@ -47246,23 +47270,23 @@ var LoadBatchesConfig = ({ inputs, onInputsChange }) => {
47246
47270
  };
47247
47271
 
47248
47272
  // src/mantine/blocks/action/actionTypes/carbon/loadBatches/LoadBatchesFlowDetail.tsx
47249
- import React389, { useCallback as useCallback158, useEffect as useEffect162, useMemo as useMemo157, useRef as useRef58 } from "react";
47273
+ import React389, { useCallback as useCallback158, useEffect as useEffect162, useMemo as useMemo158, useRef as useRef58 } from "react";
47250
47274
  import { Button as Button96, Group as Group159, Loader as Loader84, Stack as Stack278, Text as Text259 } from "@mantine/core";
47251
47275
  import { IconAlertCircle as IconAlertCircle33, IconLeaf as IconLeaf3 } from "@tabler/icons-react";
47252
47276
  var LoadBatchesFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
47253
47277
  const handlers = useBlocknoteHandlers();
47254
- const parsed = useMemo157(() => parseLoadBatchesInputs(inputs), [inputs]);
47278
+ const parsed = useMemo158(() => parseLoadBatchesInputs(inputs), [inputs]);
47255
47279
  const editorDocument = editor?.document || [];
47256
47280
  const runtimeReader = useRunRuntimeReader(editor);
47257
- const resolveOpts = useMemo157(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47258
- const connectedAddress = useMemo157(() => {
47281
+ const resolveOpts = useMemo158(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47282
+ const connectedAddress = useMemo158(() => {
47259
47283
  try {
47260
47284
  return handlers?.getCurrentUser?.()?.address || "";
47261
47285
  } catch {
47262
47286
  return "";
47263
47287
  }
47264
47288
  }, [handlers]);
47265
- const ownerAddress = useMemo157(() => {
47289
+ const ownerAddress = useMemo158(() => {
47266
47290
  const configured = resolveReferences(parsed.ownerAddress || "", editorDocument, resolveOpts).trim();
47267
47291
  return configured || connectedAddress;
47268
47292
  }, [parsed.ownerAddress, editorDocument, resolveOpts, connectedAddress]);
@@ -47335,7 +47359,7 @@ import React391, { useCallback as useCallback159, useEffect as useEffect163, use
47335
47359
  import { Stack as Stack280, Text as Text261 } from "@mantine/core";
47336
47360
 
47337
47361
  // src/mantine/blocks/action/actionTypes/carbon/BatchesSourceSelect.tsx
47338
- import React390, { useMemo as useMemo158, useState as useState232 } from "react";
47362
+ import React390, { useMemo as useMemo159, useState as useState232 } from "react";
47339
47363
  import { Anchor as Anchor4, Select as Select11, Stack as Stack279, Text as Text260 } from "@mantine/core";
47340
47364
  var LOAD_BATCHES_ACTION_TYPE = "qi/carbon.loadBatches";
47341
47365
  function refFor(blockId, field) {
@@ -47346,11 +47370,11 @@ function matchBlockId(value, field) {
47346
47370
  return m?.[1] || null;
47347
47371
  }
47348
47372
  var BatchesSourceSelect = ({ outputField, value, onChange, editorDocument, currentBlockId, label, description }) => {
47349
- const options = useMemo158(() => {
47373
+ const options = useMemo159(() => {
47350
47374
  const blocks = editorDocument || [];
47351
47375
  return blocks.filter((b) => b?.id && b.id !== currentBlockId && b.props?.actionType === LOAD_BATCHES_ACTION_TYPE).map((b) => ({ value: b.id, label: String(b.props?.title || "Load Carbon Batches") }));
47352
47376
  }, [editorDocument, currentBlockId]);
47353
- const selectedBlockId = useMemo158(() => matchBlockId(value, outputField), [value, outputField]);
47377
+ const selectedBlockId = useMemo159(() => matchBlockId(value, outputField), [value, outputField]);
47354
47378
  const [manual, setManual] = useState232(!!value && !selectedBlockId);
47355
47379
  if (manual || options.length === 0 && !selectedBlockId) {
47356
47380
  return /* @__PURE__ */ React390.createElement(Stack279, { gap: 4 }, /* @__PURE__ */ React390.createElement(
@@ -47423,7 +47447,7 @@ var HarvestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
47423
47447
  };
47424
47448
 
47425
47449
  // src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestFlowDetail.tsx
47426
- import React392, { useCallback as useCallback160, useEffect as useEffect164, useMemo as useMemo159, useState as useState234 } from "react";
47450
+ import React392, { useCallback as useCallback160, useEffect as useEffect164, useMemo as useMemo160, useState as useState234 } from "react";
47427
47451
  import { Checkbox as Checkbox17, Stack as Stack281, Switch as Switch20, Text as Text262 } from "@mantine/core";
47428
47452
  import { IconAlertCircle as IconAlertCircle34, IconCheck as IconCheck40 } from "@tabler/icons-react";
47429
47453
  function parseBatches(resolved) {
@@ -47448,22 +47472,22 @@ var HarvestFlowDetail = ({
47448
47472
  executeAction
47449
47473
  }) => {
47450
47474
  const handlers = useBlocknoteHandlers();
47451
- const ownerAddress = useMemo159(() => {
47475
+ const ownerAddress = useMemo160(() => {
47452
47476
  try {
47453
47477
  return handlers?.getCurrentUser?.()?.address || "";
47454
47478
  } catch {
47455
47479
  return "";
47456
47480
  }
47457
47481
  }, [handlers]);
47458
- const parsed = useMemo159(() => parseHarvestConfigInputs(inputs), [inputs]);
47482
+ const parsed = useMemo160(() => parseHarvestConfigInputs(inputs), [inputs]);
47459
47483
  const editorDocument = editor?.document || [];
47460
47484
  const runtimeReader = useRunRuntimeReader(editor);
47461
- const resolveOpts = useMemo159(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47462
- const batches = useMemo159(() => parseBatches(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
47485
+ const resolveOpts = useMemo160(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47486
+ const batches = useMemo160(() => parseBatches(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
47463
47487
  const [harvestAll, setHarvestAll] = useState234(true);
47464
47488
  const [selectedIds, setSelectedIds] = useState234(/* @__PURE__ */ new Set());
47465
47489
  const [error, setError] = useState234(null);
47466
- const effectiveBatches = useMemo159(() => harvestAll ? batches : batches.filter((b) => selectedIds.has(b.id)), [harvestAll, batches, selectedIds]);
47490
+ const effectiveBatches = useMemo160(() => harvestAll ? batches : batches.filter((b) => selectedIds.has(b.id)), [harvestAll, batches, selectedIds]);
47467
47491
  const effectiveCount = effectiveBatches.length;
47468
47492
  const txHash = runtime.output?.transactionHash || "";
47469
47493
  const harvestedAmount = runtime.output?.harvestedAmount ?? 0;
@@ -47584,7 +47608,7 @@ var RetireConfig = ({ inputs, onInputsChange, editor, blockId }) => {
47584
47608
  };
47585
47609
 
47586
47610
  // src/mantine/blocks/action/actionTypes/carbon/retire/RetireFlowDetail.tsx
47587
- import React394, { useCallback as useCallback162, useEffect as useEffect166, useMemo as useMemo160, useState as useState236 } from "react";
47611
+ import React394, { useCallback as useCallback162, useEffect as useEffect166, useMemo as useMemo161, useState as useState236 } from "react";
47588
47612
  import { Group as Group160, NumberInput as NumberInput14, Stack as Stack283, Switch as Switch21, Text as Text264 } from "@mantine/core";
47589
47613
  import { IconAlertTriangle as IconAlertTriangle23, IconCheck as IconCheck41, IconAlertCircle as IconAlertCircle35 } from "@tabler/icons-react";
47590
47614
  function parseBatches2(resolved) {
@@ -47613,18 +47637,18 @@ var RetireFlowDetail = ({
47613
47637
  executeAction
47614
47638
  }) => {
47615
47639
  const handlers = useBlocknoteHandlers();
47616
- const owner = useMemo160(() => {
47640
+ const owner = useMemo161(() => {
47617
47641
  try {
47618
47642
  return handlers?.getCurrentUser?.()?.address || "";
47619
47643
  } catch {
47620
47644
  return "";
47621
47645
  }
47622
47646
  }, [handlers]);
47623
- const parsed = useMemo160(() => parseRetireConfigInputs(inputs), [inputs]);
47647
+ const parsed = useMemo161(() => parseRetireConfigInputs(inputs), [inputs]);
47624
47648
  const editorDocument = editor?.document || [];
47625
47649
  const runtimeReader = useRunRuntimeReader(editor);
47626
- const resolveOpts = useMemo160(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47627
- const batches = useMemo160(() => parseBatches2(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
47650
+ const resolveOpts = useMemo161(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47651
+ const batches = useMemo161(() => parseBatches2(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
47628
47652
  const [retireAll, setRetireAll] = useState236(true);
47629
47653
  const [amounts, setAmounts] = useState236({});
47630
47654
  const [reason, setReason] = useState236(parsed.reason || "offset");
@@ -47632,7 +47656,7 @@ var RetireFlowDetail = ({
47632
47656
  const [stateRegion, setStateRegion] = useState236("");
47633
47657
  const [postal, setPostal] = useState236("");
47634
47658
  const [error, setError] = useState236(null);
47635
- const effectiveSelections = useMemo160(() => {
47659
+ const effectiveSelections = useMemo161(() => {
47636
47660
  if (retireAll) return batches.map((b) => ({ id: b.id, amount: Number(b.amount) || 0 })).filter((s) => s.amount > 0);
47637
47661
  return batches.map((b) => ({ id: b.id, amount: Number(amounts[b.id]) || 0 })).filter((s) => s.amount > 0);
47638
47662
  }, [retireAll, batches, amounts]);
@@ -47641,7 +47665,7 @@ var RetireFlowDetail = ({
47641
47665
  const retiredAmount = runtime.output?.retiredAmount ?? 0;
47642
47666
  const isCompleted = runtime.state === "completed" && !!txHash;
47643
47667
  const runtimeError = runtime.error?.message || null;
47644
- const jurisdiction = useMemo160(() => ({ country, state: stateRegion, postal }), [country, stateRegion, postal]);
47668
+ const jurisdiction = useMemo161(() => ({ country, state: stateRegion, postal }), [country, stateRegion, postal]);
47645
47669
  const canSign = !isDisabled && !isCompleted && effectiveSelections.length > 0 && totalRetiring > 0 && !!country.trim() && !!owner;
47646
47670
  const setAmount = useCallback162((id, value, max) => {
47647
47671
  const clamped = Math.max(0, Math.min(Number.isFinite(value) ? value : 0, max));
@@ -47784,7 +47808,7 @@ var EntityTransferConfig = ({ inputs, onInputsChange }) => {
47784
47808
  };
47785
47809
 
47786
47810
  // src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferFlowDetail.tsx
47787
- import React396, { useCallback as useCallback164, useEffect as useEffect168, useMemo as useMemo161, useState as useState238 } from "react";
47811
+ import React396, { useCallback as useCallback164, useEffect as useEffect168, useMemo as useMemo162, useState as useState238 } from "react";
47788
47812
  import { Button as Button97, Group as Group161, Loader as Loader85, Stack as Stack285, Text as Text266 } from "@mantine/core";
47789
47813
  import { IconAlertTriangle as IconAlertTriangle24, IconCheck as IconCheck42, IconAlertCircle as IconAlertCircle36 } from "@tabler/icons-react";
47790
47814
  var EntityTransferFlowDetail = ({
@@ -47800,22 +47824,22 @@ var EntityTransferFlowDetail = ({
47800
47824
  executeAction
47801
47825
  }) => {
47802
47826
  const handlers = useBlocknoteHandlers();
47803
- const currentUser = useMemo161(() => {
47827
+ const currentUser = useMemo162(() => {
47804
47828
  try {
47805
47829
  return handlers?.getCurrentUser?.() || null;
47806
47830
  } catch {
47807
47831
  return null;
47808
47832
  }
47809
47833
  }, [handlers]);
47810
- const parsed = useMemo161(() => parseEntityTransferConfigInputs(inputs), [inputs]);
47834
+ const parsed = useMemo162(() => parseEntityTransferConfigInputs(inputs), [inputs]);
47811
47835
  const editorDocument = editor?.document || [];
47812
47836
  const runtimeReader = useRunRuntimeReader(editor);
47813
- const resolveOpts = useMemo161(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47837
+ const resolveOpts = useMemo162(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
47814
47838
  const resolve = useCallback164((val) => resolveReferences(val || "", editorDocument, resolveOpts).trim(), [editorDocument, resolveOpts]);
47815
- const resolvedEntityDid = useMemo161(() => resolve(parsed.entityDid), [resolve, parsed.entityDid]);
47816
- const templateRecipient = useMemo161(() => resolve(parsed.recipientDid), [resolve, parsed.recipientDid]);
47817
- const resolvedOwnerDid = useMemo161(() => resolve(parsed.ownerDid) || currentUser?.did || "", [resolve, parsed.ownerDid, currentUser]);
47818
- const resolvedOwnerAddress = useMemo161(() => resolve(parsed.ownerAddress) || currentUser?.address || "", [resolve, parsed.ownerAddress, currentUser]);
47839
+ const resolvedEntityDid = useMemo162(() => resolve(parsed.entityDid), [resolve, parsed.entityDid]);
47840
+ const templateRecipient = useMemo162(() => resolve(parsed.recipientDid), [resolve, parsed.recipientDid]);
47841
+ const resolvedOwnerDid = useMemo162(() => resolve(parsed.ownerDid) || currentUser?.did || "", [resolve, parsed.ownerDid, currentUser]);
47842
+ const resolvedOwnerAddress = useMemo162(() => resolve(parsed.ownerAddress) || currentUser?.address || "", [resolve, parsed.ownerAddress, currentUser]);
47819
47843
  const [recipientInput, setRecipientInput] = useState238("");
47820
47844
  const [error, setError] = useState238(null);
47821
47845
  const effectiveRecipient = (recipientInput.trim() || templateRecipient).trim();
@@ -47978,7 +48002,7 @@ var KycVerifyConfig = ({ inputs, onInputsChange, editor, blockId }) => {
47978
48002
  };
47979
48003
 
47980
48004
  // src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyFlowDetail.tsx
47981
- import React398, { useCallback as useCallback166, useEffect as useEffect170, useMemo as useMemo162, useRef as useRef59, useState as useState240 } from "react";
48005
+ import React398, { useCallback as useCallback166, useEffect as useEffect170, useMemo as useMemo163, useRef as useRef59, useState as useState240 } from "react";
47982
48006
  import { Button as Button98, Group as Group162, Loader as Loader86, Radio as Radio6, Stack as Stack287, Stepper, Text as Text268 } from "@mantine/core";
47983
48007
  import { IconAlertCircle as IconAlertCircle37, IconCheck as IconCheck43, IconExternalLink as IconExternalLink3, IconId, IconRefresh as IconRefresh16 } from "@tabler/icons-react";
47984
48008
  import { SurveyModel as SurveyModel13 } from "@ixo/surveys";
@@ -48122,7 +48146,7 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
48122
48146
  })();
48123
48147
  }, [busy, isDisabled, openVerification]);
48124
48148
  const showSurvey = !!form && !form.hasExistingCredential && (!serverStatus || serverStatus === "unknown");
48125
- const surveyModel = useMemo162(() => {
48149
+ const surveyModel = useMemo163(() => {
48126
48150
  if (!showSurvey || !form?.surveyJson) return null;
48127
48151
  const model = new SurveyModel13(form.surveyJson);
48128
48152
  model.applyTheme(buildSurveyTheme());
@@ -48468,7 +48492,7 @@ var WalletFundConfig = ({ inputs, onInputsChange }) => {
48468
48492
  };
48469
48493
 
48470
48494
  // src/mantine/blocks/action/actionTypes/walletFund/WalletFundFlowDetail.tsx
48471
- import React402, { useCallback as useCallback169, useEffect as useEffect172, useMemo as useMemo163 } from "react";
48495
+ import React402, { useCallback as useCallback169, useEffect as useEffect172, useMemo as useMemo164 } from "react";
48472
48496
  import { Group as Group164, Loader as Loader88, Stack as Stack291, Text as Text272 } from "@mantine/core";
48473
48497
  import { IconCheck as IconCheck45, IconAlertCircle as IconAlertCircle39 } from "@tabler/icons-react";
48474
48498
  var WalletFundFlowDetail = ({
@@ -48482,11 +48506,11 @@ var WalletFundFlowDetail = ({
48482
48506
  unlockSigning,
48483
48507
  executeAction
48484
48508
  }) => {
48485
- const parsed = useMemo163(() => parseWalletFundInputs(inputs), [inputs]);
48509
+ const parsed = useMemo164(() => parseWalletFundInputs(inputs), [inputs]);
48486
48510
  const editorDocument = editor?.document || [];
48487
48511
  const runtimeReader = useRunRuntimeReader(editor);
48488
- const resolveOpts = useMemo163(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
48489
- const resolvedInputs = useMemo163(() => {
48512
+ const resolveOpts = useMemo164(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
48513
+ const resolvedInputs = useMemo164(() => {
48490
48514
  const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
48491
48515
  return {
48492
48516
  address: r(parsed.address),
@@ -48884,15 +48908,15 @@ var MatrixRegisterConfig = ({ inputs, onInputsChange }) => {
48884
48908
  };
48885
48909
 
48886
48910
  // src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterFlowDetail.tsx
48887
- import React408, { useCallback as useCallback174, useMemo as useMemo164 } from "react";
48911
+ import React408, { useCallback as useCallback174, useMemo as useMemo165 } from "react";
48888
48912
  import { Button as Button102, Group as Group167, Loader as Loader91, Stack as Stack297, Text as Text278 } from "@mantine/core";
48889
48913
  import { IconCheck as IconCheck48, IconAlertCircle as IconAlertCircle42 } from "@tabler/icons-react";
48890
48914
  var MatrixRegisterFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
48891
- const parsed = useMemo164(() => parseMatrixRegisterInputs(inputs), [inputs]);
48915
+ const parsed = useMemo165(() => parseMatrixRegisterInputs(inputs), [inputs]);
48892
48916
  const editorDocument = editor?.document || [];
48893
48917
  const runtimeReader = useRunRuntimeReader(editor);
48894
- const resolveOpts = useMemo164(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
48895
- const resolvedInputs = useMemo164(() => {
48918
+ const resolveOpts = useMemo165(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
48919
+ const resolvedInputs = useMemo165(() => {
48896
48920
  const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
48897
48921
  return {
48898
48922
  mnemonic: r(parsed.mnemonic),
@@ -49043,7 +49067,7 @@ var IdentityCreateConfig = ({ inputs, onInputsChange }) => {
49043
49067
  };
49044
49068
 
49045
49069
  // src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateFlowDetail.tsx
49046
- import React410, { useMemo as useMemo165 } from "react";
49070
+ import React410, { useMemo as useMemo166 } from "react";
49047
49071
  import { Button as Button103, Group as Group168, Loader as Loader92, Stack as Stack299, Text as Text280 } from "@mantine/core";
49048
49072
  import { IconCheck as IconCheck49, IconAlertCircle as IconAlertCircle43 } from "@tabler/icons-react";
49049
49073
  var IdentityCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
@@ -49053,7 +49077,7 @@ var IdentityCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
49053
49077
  { fields: ["mnemonic", "did", "address", "pubKey", "pin", "oracleName", "avatarUrl", "formAnswers"], required: ["mnemonic", "did", "address", "pubKey"] },
49054
49078
  block?.id
49055
49079
  );
49056
- const resolvedInputs = useMemo165(() => {
49080
+ const resolvedInputs = useMemo166(() => {
49057
49081
  const form = (() => {
49058
49082
  if (!base.formAnswers) return {};
49059
49083
  try {
@@ -49305,15 +49329,15 @@ var EntityCreateOracleConfig = ({ inputs, onInputsChange }) => {
49305
49329
  };
49306
49330
 
49307
49331
  // src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleFlowDetail.tsx
49308
- import React412, { useCallback as useCallback177, useMemo as useMemo166 } from "react";
49332
+ import React412, { useCallback as useCallback177, useMemo as useMemo167 } from "react";
49309
49333
  import { ActionIcon as ActionIcon60, Button as Button104, CopyButton as CopyButton4, Group as Group169, Loader as Loader93, Stack as Stack301, Text as Text282, Tooltip as Tooltip38 } from "@mantine/core";
49310
49334
  import { IconCheck as IconCheck50, IconAlertCircle as IconAlertCircle44, IconCopy as IconCopy3 } from "@tabler/icons-react";
49311
49335
  var EntityCreateOracleFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
49312
- const parsed = useMemo166(() => parseEntityCreateOracleInputs(inputs), [inputs]);
49336
+ const parsed = useMemo167(() => parseEntityCreateOracleInputs(inputs), [inputs]);
49313
49337
  const editorDocument = editor?.document || [];
49314
49338
  const runtimeReader = useRunRuntimeReader(editor);
49315
- const resolveOpts = useMemo166(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
49316
- const resolvedInputs = useMemo166(() => {
49339
+ const resolveOpts = useMemo167(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
49340
+ const resolvedInputs = useMemo167(() => {
49317
49341
  const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
49318
49342
  const formAnswersStr = r(parsed.formAnswers);
49319
49343
  const form = (() => {
@@ -49467,14 +49491,14 @@ var SandboxProvisionConfig = ({ inputs, onInputsChange }) => {
49467
49491
  };
49468
49492
 
49469
49493
  // src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionFlowDetail.tsx
49470
- import React414, { useCallback as useCallback179, useMemo as useMemo167 } from "react";
49494
+ import React414, { useCallback as useCallback179, useMemo as useMemo168 } from "react";
49471
49495
  import { Anchor as Anchor5, Button as Button105, Group as Group170, Loader as Loader94, Stack as Stack303, Text as Text284 } from "@mantine/core";
49472
49496
  import { IconCheck as IconCheck51, IconAlertCircle as IconAlertCircle45 } from "@tabler/icons-react";
49473
49497
  var SandboxProvisionFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
49474
- const parsed = useMemo167(() => parseSandboxProvisionInputs(inputs), [inputs]);
49498
+ const parsed = useMemo168(() => parseSandboxProvisionInputs(inputs), [inputs]);
49475
49499
  const editorDocument = editor?.document || [];
49476
49500
  const runtimeReader = useRunRuntimeReader(editor);
49477
- const resolveOpts = useMemo167(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
49501
+ const resolveOpts = useMemo168(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
49478
49502
  const resolvedEntityDid = resolveReferences(parsed.entityDid || "", editorDocument, resolveOpts).trim();
49479
49503
  const resolvedMatrixRoomId = resolveReferences(parsed.matrixRoomId || "", editorDocument, resolveOpts).trim();
49480
49504
  const inputsReady = !!(resolvedEntityDid && resolvedMatrixRoomId);
@@ -49578,14 +49602,14 @@ var OracleContractConfig = ({ inputs, onInputsChange }) => {
49578
49602
  };
49579
49603
 
49580
49604
  // src/mantine/blocks/action/actionTypes/oracleContract/OracleContractFlowDetail.tsx
49581
- import React416, { useCallback as useCallback181, useMemo as useMemo168 } from "react";
49605
+ import React416, { useCallback as useCallback181, useMemo as useMemo169 } from "react";
49582
49606
  import { Button as Button106, Group as Group171, Loader as Loader95, Stack as Stack305, Text as Text286 } from "@mantine/core";
49583
49607
  import { IconCheck as IconCheck52, IconAlertCircle as IconAlertCircle46 } from "@tabler/icons-react";
49584
49608
  var OracleContractFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
49585
- const parsed = useMemo168(() => parseOracleContractInputs(inputs), [inputs]);
49609
+ const parsed = useMemo169(() => parseOracleContractInputs(inputs), [inputs]);
49586
49610
  const editorDocument = editor?.document || [];
49587
49611
  const runtimeReader = useRunRuntimeReader(editor);
49588
- const resolveOpts = useMemo168(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
49612
+ const resolveOpts = useMemo169(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
49589
49613
  const resolvedOracleEntityDid = resolveReferences(parsed.oracleEntityDid || "", editorDocument, resolveOpts).trim();
49590
49614
  const inputsReady = !!resolvedOracleEntityDid;
49591
49615
  const userOracleRoomId = runtime.output?.userOracleRoomId || "";
@@ -49826,9 +49850,9 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
49826
49850
  };
49827
49851
 
49828
49852
  // src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
49829
- import React418, { useCallback as useCallback183, useEffect as useEffect181, useMemo as useMemo169, useRef as useRef61, useState as useState250 } from "react";
49830
- import { Button as Button107, Collapse as Collapse13, Divider as Divider39, Group as Group172, Loader as Loader96, Stack as Stack307, Text as Text288 } from "@mantine/core";
49831
- import { IconAlertCircle as IconAlertCircle47, IconCheck as IconCheck53, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp5, IconLock } from "@tabler/icons-react";
49853
+ import React418, { useCallback as useCallback183, useEffect as useEffect181, useMemo as useMemo170, useRef as useRef61, useState as useState250 } from "react";
49854
+ import { Button as Button107, Collapse as Collapse12, Divider as Divider39, Group as Group172, Loader as Loader96, Stack as Stack307, Text as Text288 } from "@mantine/core";
49855
+ import { IconAlertCircle as IconAlertCircle47, IconCheck as IconCheck53, IconChevronDown as IconChevronDown11, IconChevronUp as IconChevronUp5, IconLock } from "@tabler/icons-react";
49832
49856
 
49833
49857
  // src/mantine/blocks/action/hooks/useIdempotencyCheck.ts
49834
49858
  import { useEffect as useEffect180, useRef as useRef60, useState as useState249 } from "react";
@@ -49892,14 +49916,14 @@ var REQUIRED_FIELDS = [
49892
49916
  ];
49893
49917
  var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
49894
49918
  const handlers = useBlocknoteHandlers();
49895
- const services = useMemo169(() => buildServicesFromHandlers(handlers), [handlers]);
49919
+ const services = useMemo170(() => buildServicesFromHandlers(handlers), [handlers]);
49896
49920
  const { resolvedInputs, inputsReady } = useResolvedInputs(editor, inputs, { fields: FIELDS, required: REQUIRED_FIELDS }, block?.id);
49897
49921
  const missingFields = REQUIRED_FIELDS.filter((field) => !resolvedInputs[field]);
49898
49922
  const storedSecrets = runtime.output?.storedSecrets || [];
49899
49923
  const hasProof = Array.isArray(storedSecrets) && storedSecrets.length > 0;
49900
49924
  const openRouterJwe = runtime.userInputs?.openRouterApiKey || "";
49901
49925
  const hasOpenRouter = !!openRouterJwe;
49902
- const runInputs = useMemo169(() => ({ ...resolvedInputs, openRouterApiKeyJwe: openRouterJwe }), [resolvedInputs, openRouterJwe]);
49926
+ const runInputs = useMemo170(() => ({ ...resolvedInputs, openRouterApiKeyJwe: openRouterJwe }), [resolvedInputs, openRouterJwe]);
49903
49927
  const { isRunning, isCompleted, isStale, isFailed, errorMessage, handleExecute, handleRetry } = useActionExecution({
49904
49928
  executeAction,
49905
49929
  runtime,
@@ -50008,7 +50032,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
50008
50032
  onChange: (event) => setOpenRouterDraft(event.currentTarget.value),
50009
50033
  style: { flex: 1 }
50010
50034
  }
50011
- ) : /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React418.createElement(Group172, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React418.createElement(React418.Fragment, null, /* @__PURE__ */ React418.createElement(Button107, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React418.createElement(Button107, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React418.createElement(Button107, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React418.createElement(Divider39, { variant: "dashed" }), /* @__PURE__ */ React418.createElement(Text288, { size: "sm", fw: 600 }, "Identifiers (stored as plain config \u2014 not encrypted)"), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React418.createElement(Divider39, { variant: "dashed" }), /* @__PURE__ */ React418.createElement(Stack307, { gap: "xs" }, /* @__PURE__ */ React418.createElement(Group172, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React418.createElement(Text288, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React418.createElement(Group172, { gap: 6 }, /* @__PURE__ */ React418.createElement(Text288, { size: "xs", c: "dimmed" }, "Stored as plain config \u2014 not encrypted"), showAdditional ? /* @__PURE__ */ React418.createElement(IconChevronUp5, { size: 14 }) : /* @__PURE__ */ React418.createElement(IconChevronDown12, { size: 14 }))), /* @__PURE__ */ React418.createElement(Collapse13, { in: showAdditional }, /* @__PURE__ */ React418.createElement(Stack307, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React418.createElement(Group172, { gap: 6 }, /* @__PURE__ */ React418.createElement(Loader96, { size: 12 }), /* @__PURE__ */ React418.createElement(Text288, { size: "xs", c: "dimmed" }, "Loading network constants\u2026")), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React418.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React418.createElement(Group172, { gap: "xs" }, /* @__PURE__ */ React418.createElement(Loader96, { size: 14 }), /* @__PURE__ */ React418.createElement(Text288, { size: "sm" }, "Encrypting and storing secrets in matrix room...")), /* @__PURE__ */ React418.createElement(Group172, { justify: "flex-end" }, /* @__PURE__ */ React418.createElement(Button107, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Store Secrets"))), isFailed && errorMessage && /* @__PURE__ */ React418.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React418.createElement(IconAlertCircle47, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React418.createElement(Group172, null, /* @__PURE__ */ React418.createElement(Button107, { variant: "outline", onClick: handleRetry }, "Try Again")));
50035
+ ) : /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React418.createElement(Group172, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React418.createElement(React418.Fragment, null, /* @__PURE__ */ React418.createElement(Button107, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React418.createElement(Button107, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React418.createElement(Button107, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React418.createElement(Divider39, { variant: "dashed" }), /* @__PURE__ */ React418.createElement(Text288, { size: "sm", fw: 600 }, "Identifiers (stored as plain config \u2014 not encrypted)"), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React418.createElement(Divider39, { variant: "dashed" }), /* @__PURE__ */ React418.createElement(Stack307, { gap: "xs" }, /* @__PURE__ */ React418.createElement(Group172, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React418.createElement(Text288, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React418.createElement(Group172, { gap: 6 }, /* @__PURE__ */ React418.createElement(Text288, { size: "xs", c: "dimmed" }, "Stored as plain config \u2014 not encrypted"), showAdditional ? /* @__PURE__ */ React418.createElement(IconChevronUp5, { size: 14 }) : /* @__PURE__ */ React418.createElement(IconChevronDown11, { size: 14 }))), /* @__PURE__ */ React418.createElement(Collapse12, { in: showAdditional }, /* @__PURE__ */ React418.createElement(Stack307, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React418.createElement(Group172, { gap: 6 }, /* @__PURE__ */ React418.createElement(Loader96, { size: 12 }), /* @__PURE__ */ React418.createElement(Text288, { size: "xs", c: "dimmed" }, "Loading network constants\u2026")), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React418.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React418.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React418.createElement(Group172, { gap: "xs" }, /* @__PURE__ */ React418.createElement(Loader96, { size: 14 }), /* @__PURE__ */ React418.createElement(Text288, { size: "sm" }, "Encrypting and storing secrets in matrix room...")), /* @__PURE__ */ React418.createElement(Group172, { justify: "flex-end" }, /* @__PURE__ */ React418.createElement(Button107, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Store Secrets"))), isFailed && errorMessage && /* @__PURE__ */ React418.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React418.createElement(IconAlertCircle47, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React418.createElement(Group172, null, /* @__PURE__ */ React418.createElement(Button107, { variant: "outline", onClick: handleRetry }, "Try Again")));
50012
50036
  };
50013
50037
 
50014
50038
  // src/mantine/blocks/action/actionTypes/oracleStoreSecrets/index.ts
@@ -50214,15 +50238,15 @@ var OracleStoreConfigConfig = ({ inputs, onInputsChange }) => {
50214
50238
  };
50215
50239
 
50216
50240
  // src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigFlowDetail.tsx
50217
- import React420, { useCallback as useCallback185, useMemo as useMemo170 } from "react";
50241
+ import React420, { useCallback as useCallback185, useMemo as useMemo171 } from "react";
50218
50242
  import { Button as Button108, Group as Group173, Loader as Loader97, Stack as Stack309, Text as Text290 } from "@mantine/core";
50219
50243
  import { IconCheck as IconCheck54, IconAlertCircle as IconAlertCircle48 } from "@tabler/icons-react";
50220
50244
  var OracleStoreConfigFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
50221
- const parsed = useMemo170(() => parseOracleStoreConfigInputs(inputs), [inputs]);
50245
+ const parsed = useMemo171(() => parseOracleStoreConfigInputs(inputs), [inputs]);
50222
50246
  const editorDocument = editor?.document || [];
50223
50247
  const runtimeReader = useRunRuntimeReader(editor);
50224
- const resolveOpts = useMemo170(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
50225
- const resolvedInputs = useMemo170(() => {
50248
+ const resolveOpts = useMemo171(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
50249
+ const resolvedInputs = useMemo171(() => {
50226
50250
  const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
50227
50251
  return {
50228
50252
  matrixRoomId: r(parsed.matrixRoomId),
@@ -50558,9 +50582,9 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
50558
50582
  };
50559
50583
 
50560
50584
  // src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
50561
- import React422, { useCallback as useCallback187, useEffect as useEffect184, useMemo as useMemo171, useRef as useRef62, useState as useState253 } from "react";
50562
- import { Button as Button109, Collapse as Collapse14, Divider as Divider42, Group as Group174, Loader as Loader98, Stack as Stack311, Text as Text292 } from "@mantine/core";
50563
- import { IconAlertCircle as IconAlertCircle49, IconCheck as IconCheck55, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp6, IconLock as IconLock2 } from "@tabler/icons-react";
50585
+ import React422, { useCallback as useCallback187, useEffect as useEffect184, useMemo as useMemo172, useRef as useRef62, useState as useState253 } from "react";
50586
+ import { Button as Button109, Collapse as Collapse13, Divider as Divider42, Group as Group174, Loader as Loader98, Stack as Stack311, Text as Text292 } from "@mantine/core";
50587
+ import { IconAlertCircle as IconAlertCircle49, IconCheck as IconCheck55, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp6, IconLock as IconLock2 } from "@tabler/icons-react";
50564
50588
  var EXPECTED_SECRETS2 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
50565
50589
  var FIELDS2 = [
50566
50590
  // Secrets routing
@@ -50608,10 +50632,10 @@ var REQUIRED_FIELDS2 = [
50608
50632
  ];
50609
50633
  var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
50610
50634
  const handlers = useBlocknoteHandlers();
50611
- const services = useMemo171(() => buildServicesFromHandlers(handlers), [handlers]);
50612
- const typedParsed = useMemo171(() => parseOracleStoreSecretsAndConfigInputs(inputs), [inputs]);
50635
+ const services = useMemo172(() => buildServicesFromHandlers(handlers), [handlers]);
50636
+ const typedParsed = useMemo172(() => parseOracleStoreSecretsAndConfigInputs(inputs), [inputs]);
50613
50637
  const { parsed, resolvedInputs: base, inputsReady } = useResolvedInputs(editor, inputs, { fields: FIELDS2, required: REQUIRED_FIELDS2 }, block?.id);
50614
- const resolvedInputs = useMemo171(
50638
+ const resolvedInputs = useMemo172(
50615
50639
  () => ({
50616
50640
  ...base,
50617
50641
  // price defaults to 0 when absent from the template (typed-parser
@@ -50629,7 +50653,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
50629
50653
  const hasProof = Array.isArray(storedSecrets) && storedSecrets.length > 0 && configStored;
50630
50654
  const openRouterJwe = runtime.userInputs?.openRouterApiKey || "";
50631
50655
  const hasOpenRouter = !!openRouterJwe;
50632
- const runInputs = useMemo171(() => ({ ...resolvedInputs, openRouterApiKeyJwe: openRouterJwe }), [resolvedInputs, openRouterJwe]);
50656
+ const runInputs = useMemo172(() => ({ ...resolvedInputs, openRouterApiKeyJwe: openRouterJwe }), [resolvedInputs, openRouterJwe]);
50633
50657
  const { isRunning, isCompleted, isStale, isFailed, errorMessage, handleExecute, handleRetry } = useActionExecution({
50634
50658
  executeAction,
50635
50659
  runtime,
@@ -50728,7 +50752,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
50728
50752
  onChange: (event) => setOpenRouterDraft(event.currentTarget.value),
50729
50753
  style: { flex: 1 }
50730
50754
  }
50731
- ) : /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React422.createElement(Group174, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React422.createElement(React422.Fragment, null, /* @__PURE__ */ React422.createElement(Button109, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React422.createElement(Button109, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React422.createElement(Button109, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React422.createElement(Divider42, { variant: "dashed" }), /* @__PURE__ */ React422.createElement(Text292, { size: "sm", fw: 600 }, "Identifiers (stored as plain config)"), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React422.createElement(Divider42, { variant: "dashed" }), /* @__PURE__ */ React422.createElement(Stack311, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Group174, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React422.createElement(Text292, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React422.createElement(Group174, { gap: 6 }, /* @__PURE__ */ React422.createElement(Text292, { size: "xs", c: "dimmed" }, "Stored as plain config"), showAdditional ? /* @__PURE__ */ React422.createElement(IconChevronUp6, { size: 14 }) : /* @__PURE__ */ React422.createElement(IconChevronDown13, { size: 14 }))), /* @__PURE__ */ React422.createElement(Collapse14, { in: showAdditional }, /* @__PURE__ */ React422.createElement(Stack311, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React422.createElement(Group174, { gap: 6 }, /* @__PURE__ */ React422.createElement(Loader98, { size: 12 }), /* @__PURE__ */ React422.createElement(Text292, { size: "xs", c: "dimmed" }, "Loading network constants...")), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React422.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React422.createElement(Group174, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Loader98, { size: 14 }), /* @__PURE__ */ React422.createElement(Text292, { size: "sm" }, "Storing secrets and configuration...")), /* @__PURE__ */ React422.createElement(Group174, { justify: "flex-end" }, /* @__PURE__ */ React422.createElement(Button109, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Store Secrets & Config"))), isFailed && errorMessage && /* @__PURE__ */ React422.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React422.createElement(IconAlertCircle49, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React422.createElement(Group174, null, /* @__PURE__ */ React422.createElement(Button109, { variant: "outline", onClick: handleRetry }, "Try Again")));
50755
+ ) : /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React422.createElement(Group174, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React422.createElement(React422.Fragment, null, /* @__PURE__ */ React422.createElement(Button109, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React422.createElement(Button109, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React422.createElement(Button109, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React422.createElement(Divider42, { variant: "dashed" }), /* @__PURE__ */ React422.createElement(Text292, { size: "sm", fw: 600 }, "Identifiers (stored as plain config)"), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React422.createElement(Divider42, { variant: "dashed" }), /* @__PURE__ */ React422.createElement(Stack311, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Group174, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React422.createElement(Text292, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React422.createElement(Group174, { gap: 6 }, /* @__PURE__ */ React422.createElement(Text292, { size: "xs", c: "dimmed" }, "Stored as plain config"), showAdditional ? /* @__PURE__ */ React422.createElement(IconChevronUp6, { size: 14 }) : /* @__PURE__ */ React422.createElement(IconChevronDown12, { size: 14 }))), /* @__PURE__ */ React422.createElement(Collapse13, { in: showAdditional }, /* @__PURE__ */ React422.createElement(Stack311, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React422.createElement(Group174, { gap: 6 }, /* @__PURE__ */ React422.createElement(Loader98, { size: 12 }), /* @__PURE__ */ React422.createElement(Text292, { size: "xs", c: "dimmed" }, "Loading network constants...")), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React422.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React422.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React422.createElement(Group174, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Loader98, { size: 14 }), /* @__PURE__ */ React422.createElement(Text292, { size: "sm" }, "Storing secrets and configuration...")), /* @__PURE__ */ React422.createElement(Group174, { justify: "flex-end" }, /* @__PURE__ */ React422.createElement(Button109, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Store Secrets & Config"))), isFailed && errorMessage && /* @__PURE__ */ React422.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React422.createElement(IconAlertCircle49, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React422.createElement(Group174, null, /* @__PURE__ */ React422.createElement(Button109, { variant: "outline", onClick: handleRetry }, "Try Again")));
50732
50756
  };
50733
50757
 
50734
50758
  // src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/index.ts
@@ -51004,9 +51028,9 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
51004
51028
  };
51005
51029
 
51006
51030
  // src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
51007
- import React424, { useCallback as useCallback189, useEffect as useEffect186, useMemo as useMemo172, useRef as useRef63, useState as useState255 } from "react";
51008
- import { Button as Button110, Collapse as Collapse15, Divider as Divider44, Group as Group175, Loader as Loader99, Stack as Stack313, Text as Text294 } from "@mantine/core";
51009
- import { IconAlertCircle as IconAlertCircle50, IconCheck as IconCheck56, IconChevronDown as IconChevronDown14, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
51031
+ import React424, { useCallback as useCallback189, useEffect as useEffect186, useMemo as useMemo173, useRef as useRef63, useState as useState255 } from "react";
51032
+ import { Button as Button110, Collapse as Collapse14, Divider as Divider44, Group as Group175, Loader as Loader99, Stack as Stack313, Text as Text294 } from "@mantine/core";
51033
+ import { IconAlertCircle as IconAlertCircle50, IconCheck as IconCheck56, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
51010
51034
  var EXPECTED_SECRETS3 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
51011
51035
  var FIELDS3 = [
51012
51036
  // Contract
@@ -51057,10 +51081,10 @@ var REQUIRED_FIELDS3 = [
51057
51081
  ];
51058
51082
  var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
51059
51083
  const handlers = useBlocknoteHandlers();
51060
- const services = useMemo172(() => buildServicesFromHandlers(handlers), [handlers]);
51061
- const typedParsed = useMemo172(() => parseOracleConfigureOracleInputs(inputs), [inputs]);
51084
+ const services = useMemo173(() => buildServicesFromHandlers(handlers), [handlers]);
51085
+ const typedParsed = useMemo173(() => parseOracleConfigureOracleInputs(inputs), [inputs]);
51062
51086
  const { parsed, resolvedInputs: base } = useResolvedInputs(editor, inputs, { fields: FIELDS3, required: REQUIRED_FIELDS3 }, block?.id);
51063
- const resolvedInputs = useMemo172(() => {
51087
+ const resolvedInputs = useMemo173(() => {
51064
51088
  const form = (() => {
51065
51089
  if (!base.formAnswers) return {};
51066
51090
  try {
@@ -51107,7 +51131,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
51107
51131
  const openRouterJwe = runtime.userInputs?.openRouterApiKey || "";
51108
51132
  const hasOpenRouter = !!openRouterJwe;
51109
51133
  const openRouterPlaintext = runtime.userInputs?.openRouterApiKeyPlaintext || "";
51110
- const runInputs = useMemo172(
51134
+ const runInputs = useMemo173(
51111
51135
  () => ({ ...resolvedInputs, openRouterApiKeyJwe: openRouterJwe, openRouterApiKeyPlaintext: openRouterPlaintext }),
51112
51136
  [resolvedInputs, openRouterJwe, openRouterPlaintext]
51113
51137
  );
@@ -51209,7 +51233,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
51209
51233
  onChange: (event) => setOpenRouterDraft(event.currentTarget.value),
51210
51234
  style: { flex: 1 }
51211
51235
  }
51212
- ) : /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React424.createElement(Group175, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React424.createElement(React424.Fragment, null, /* @__PURE__ */ React424.createElement(Button110, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React424.createElement(Button110, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React424.createElement(Button110, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React424.createElement(Divider44, { variant: "dashed" }), /* @__PURE__ */ React424.createElement(Text294, { size: "sm", fw: 600 }, "Identifiers (stored as plain config)"), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React424.createElement(Divider44, { variant: "dashed" }), /* @__PURE__ */ React424.createElement(Stack313, { gap: "xs" }, /* @__PURE__ */ React424.createElement(Group175, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React424.createElement(Text294, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React424.createElement(Group175, { gap: 6 }, /* @__PURE__ */ React424.createElement(Text294, { size: "xs", c: "dimmed" }, "Stored as plain config"), showAdditional ? /* @__PURE__ */ React424.createElement(IconChevronUp7, { size: 14 }) : /* @__PURE__ */ React424.createElement(IconChevronDown14, { size: 14 }))), /* @__PURE__ */ React424.createElement(Collapse15, { in: showAdditional }, /* @__PURE__ */ React424.createElement(Stack313, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React424.createElement(Group175, { gap: 6 }, /* @__PURE__ */ React424.createElement(Loader99, { size: 12 }), /* @__PURE__ */ React424.createElement(Text294, { size: "xs", c: "dimmed" }, "Loading network constants...")), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React424.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React424.createElement(Group175, { gap: "xs" }, /* @__PURE__ */ React424.createElement(Loader99, { size: 14 }), /* @__PURE__ */ React424.createElement(Text294, { size: "sm" }, "Contracting oracle, storing secrets, and saving configuration...")), /* @__PURE__ */ React424.createElement(Group175, { justify: "flex-end" }, /* @__PURE__ */ React424.createElement(Button110, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Configure Oracle"))), isFailed && errorMessage && /* @__PURE__ */ React424.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React424.createElement(IconAlertCircle50, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React424.createElement(Group175, null, /* @__PURE__ */ React424.createElement(Button110, { variant: "outline", onClick: handleRetry }, "Try Again")));
51236
+ ) : /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React424.createElement(Group175, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React424.createElement(React424.Fragment, null, /* @__PURE__ */ React424.createElement(Button110, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React424.createElement(Button110, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React424.createElement(Button110, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React424.createElement(Divider44, { variant: "dashed" }), /* @__PURE__ */ React424.createElement(Text294, { size: "sm", fw: 600 }, "Identifiers (stored as plain config)"), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React424.createElement(Divider44, { variant: "dashed" }), /* @__PURE__ */ React424.createElement(Stack313, { gap: "xs" }, /* @__PURE__ */ React424.createElement(Group175, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React424.createElement(Text294, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React424.createElement(Group175, { gap: 6 }, /* @__PURE__ */ React424.createElement(Text294, { size: "xs", c: "dimmed" }, "Stored as plain config"), showAdditional ? /* @__PURE__ */ React424.createElement(IconChevronUp7, { size: 14 }) : /* @__PURE__ */ React424.createElement(IconChevronDown13, { size: 14 }))), /* @__PURE__ */ React424.createElement(Collapse14, { in: showAdditional }, /* @__PURE__ */ React424.createElement(Stack313, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React424.createElement(Group175, { gap: 6 }, /* @__PURE__ */ React424.createElement(Loader99, { size: 12 }), /* @__PURE__ */ React424.createElement(Text294, { size: "xs", c: "dimmed" }, "Loading network constants...")), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React424.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React424.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React424.createElement(Group175, { gap: "xs" }, /* @__PURE__ */ React424.createElement(Loader99, { size: 14 }), /* @__PURE__ */ React424.createElement(Text294, { size: "sm" }, "Contracting oracle, storing secrets, and saving configuration...")), /* @__PURE__ */ React424.createElement(Group175, { justify: "flex-end" }, /* @__PURE__ */ React424.createElement(Button110, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Configure Oracle"))), isFailed && errorMessage && /* @__PURE__ */ React424.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React424.createElement(IconAlertCircle50, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React424.createElement(Group175, null, /* @__PURE__ */ React424.createElement(Button110, { variant: "outline", onClick: handleRetry }, "Try Again")));
51213
51237
  };
51214
51238
 
51215
51239
  // src/mantine/blocks/action/actionTypes/oracleConfigureOracle/index.ts
@@ -51232,7 +51256,7 @@ var OracleDeploySetupConfig = () => {
51232
51256
  };
51233
51257
 
51234
51258
  // src/mantine/blocks/action/actionTypes/oracleDeploySetup/OracleDeploySetupFlowDetail.tsx
51235
- import React426, { useCallback as useCallback190, useMemo as useMemo173 } from "react";
51259
+ import React426, { useCallback as useCallback190, useMemo as useMemo174 } from "react";
51236
51260
  import { Button as Button111, Group as Group176, Loader as Loader100, Stack as Stack315, Text as Text296 } from "@mantine/core";
51237
51261
  import { IconCheck as IconCheck57, IconAlertCircle as IconAlertCircle51 } from "@tabler/icons-react";
51238
51262
 
@@ -51275,11 +51299,11 @@ function parseOracleDeploySetupInputs(json) {
51275
51299
 
51276
51300
  // src/mantine/blocks/action/actionTypes/oracleDeploySetup/OracleDeploySetupFlowDetail.tsx
51277
51301
  var OracleDeploySetupFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
51278
- const parsed = useMemo173(() => parseOracleDeploySetupInputs(inputs), [inputs]);
51302
+ const parsed = useMemo174(() => parseOracleDeploySetupInputs(inputs), [inputs]);
51279
51303
  const editorDocument = editor?.document || [];
51280
51304
  const runtimeReader = useRunRuntimeReader(editor);
51281
- const resolveOpts = useMemo173(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
51282
- const resolvedInputs = useMemo173(() => {
51305
+ const resolveOpts = useMemo174(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
51306
+ const resolvedInputs = useMemo174(() => {
51283
51307
  const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
51284
51308
  return {
51285
51309
  name: r(parsed.name),
@@ -51393,7 +51417,7 @@ var OracleDeployStartConfig = () => {
51393
51417
  };
51394
51418
 
51395
51419
  // src/mantine/blocks/action/actionTypes/oracleDeployStart/OracleDeployStartFlowDetail.tsx
51396
- import React428, { useCallback as useCallback191, useMemo as useMemo174 } from "react";
51420
+ import React428, { useCallback as useCallback191, useMemo as useMemo175 } from "react";
51397
51421
  import { Button as Button112, Group as Group177, Loader as Loader101, Stack as Stack317, Text as Text298 } from "@mantine/core";
51398
51422
  import { IconCheck as IconCheck58, IconAlertCircle as IconAlertCircle52 } from "@tabler/icons-react";
51399
51423
 
@@ -51409,10 +51433,10 @@ function parseOracleDeployStartInputs(json) {
51409
51433
 
51410
51434
  // src/mantine/blocks/action/actionTypes/oracleDeployStart/OracleDeployStartFlowDetail.tsx
51411
51435
  var OracleDeployStartFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
51412
- const parsed = useMemo174(() => parseOracleDeployStartInputs(inputs), [inputs]);
51436
+ const parsed = useMemo175(() => parseOracleDeployStartInputs(inputs), [inputs]);
51413
51437
  const editorDocument = editor?.document || [];
51414
51438
  const runtimeReader = useRunRuntimeReader(editor);
51415
- const resolveOpts = useMemo174(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
51439
+ const resolveOpts = useMemo175(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
51416
51440
  const resolvedName = resolveReferences(parsed.name || "", editorDocument, resolveOpts).trim();
51417
51441
  const resolvedEntityDid = resolveReferences(parsed.entityDid || "", editorDocument, resolveOpts).trim();
51418
51442
  const resolvedRoomId = resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim();
@@ -51478,7 +51502,7 @@ var OracleDeployConfig = () => {
51478
51502
  };
51479
51503
 
51480
51504
  // src/mantine/blocks/action/actionTypes/oracleDeploy/OracleDeployFlowDetail.tsx
51481
- import React430, { useCallback as useCallback192, useMemo as useMemo175 } from "react";
51505
+ import React430, { useCallback as useCallback192, useMemo as useMemo176 } from "react";
51482
51506
  import { Button as Button113, Group as Group178, Loader as Loader102, Stack as Stack319, Text as Text300 } from "@mantine/core";
51483
51507
  import { IconCheck as IconCheck59, IconAlertCircle as IconAlertCircle53 } from "@tabler/icons-react";
51484
51508
 
@@ -51531,11 +51555,11 @@ function parseOracleDeployInputs(json) {
51531
51555
  // src/mantine/blocks/action/actionTypes/oracleDeploy/OracleDeployFlowDetail.tsx
51532
51556
  var OracleDeployFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
51533
51557
  const handlers = useBlocknoteHandlers();
51534
- const parsed = useMemo175(() => parseOracleDeployInputs(inputs), [inputs]);
51558
+ const parsed = useMemo176(() => parseOracleDeployInputs(inputs), [inputs]);
51535
51559
  const editorDocument = editor?.document || [];
51536
51560
  const runtimeReader = useRunRuntimeReader(editor);
51537
- const resolveOpts = useMemo175(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
51538
- const resolvedInputs = useMemo175(() => {
51561
+ const resolveOpts = useMemo176(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
51562
+ const resolvedInputs = useMemo176(() => {
51539
51563
  const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
51540
51564
  const formAnswersStr = r(parsed.formAnswers);
51541
51565
  const form = (() => {
@@ -51795,7 +51819,7 @@ import { createReactBlockSpec as createReactBlockSpec21 } from "@blocknote/react
51795
51819
  import React440 from "react";
51796
51820
 
51797
51821
  // src/mantine/blocks/location/template/TemplateView.tsx
51798
- import React437, { useMemo as useMemo176 } from "react";
51822
+ import React437, { useMemo as useMemo177 } from "react";
51799
51823
  import { Group as Group180, Stack as Stack321, Text as Text303 } from "@mantine/core";
51800
51824
  import { IconMapPin } from "@tabler/icons-react";
51801
51825
 
@@ -52223,15 +52247,15 @@ function LocationMap(props) {
52223
52247
  var LOCATION_TEMPLATE_PANEL_ID = "location-template-panel";
52224
52248
  var LocationTemplateView = ({ editor, block }) => {
52225
52249
  const panelId = `${LOCATION_TEMPLATE_PANEL_ID}-${block.id}`;
52226
- const panelContent = useMemo176(() => /* @__PURE__ */ React437.createElement(TemplateConfig17, { editor, block }), [editor, block]);
52250
+ const panelContent = useMemo177(() => /* @__PURE__ */ React437.createElement(TemplateConfig17, { editor, block }), [editor, block]);
52227
52251
  const { open } = usePanel(panelId, panelContent);
52228
52252
  const hasLocation = block.props.latitude && block.props.longitude;
52229
52253
  return /* @__PURE__ */ React437.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React437.createElement(Stack321, { gap: "xs", justify: "center" }, /* @__PURE__ */ React437.createElement(Group180, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React437.createElement(IconMapPin, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React437.createElement(Stack321, { gap: 2 }, /* @__PURE__ */ React437.createElement(Text303, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React437.createElement(Text303, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation && /* @__PURE__ */ React437.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-template-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true })));
52230
52254
  };
52231
52255
 
52232
52256
  // src/mantine/blocks/location/flow/FlowView.tsx
52233
- import React439, { useMemo as useMemo177 } from "react";
52234
- import { Center as Center14, Group as Group181, Stack as Stack322, Text as Text304 } from "@mantine/core";
52257
+ import React439, { useMemo as useMemo178 } from "react";
52258
+ import { Center as Center13, Group as Group181, Stack as Stack322, Text as Text304 } from "@mantine/core";
52235
52259
  import { IconMapPin as IconMapPin2 } from "@tabler/icons-react";
52236
52260
 
52237
52261
  // src/mantine/blocks/location/flow/FlowConfig.tsx
@@ -52246,10 +52270,10 @@ var FlowConfig3 = ({ block }) => {
52246
52270
  var LOCATION_FLOW_PANEL_ID = "location-flow-panel";
52247
52271
  var LocationFlowView = ({ editor, block }) => {
52248
52272
  const panelId = `${LOCATION_FLOW_PANEL_ID}-${block.id}`;
52249
- const panelContent = useMemo177(() => /* @__PURE__ */ React439.createElement(FlowConfig3, { editor, block }), [editor, block]);
52273
+ const panelContent = useMemo178(() => /* @__PURE__ */ React439.createElement(FlowConfig3, { editor, block }), [editor, block]);
52250
52274
  const { open } = usePanel(panelId, panelContent);
52251
52275
  const hasLocation = block.props.latitude && block.props.longitude;
52252
- return /* @__PURE__ */ React439.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React439.createElement(Stack322, { gap: "xs", justify: "center" }, /* @__PURE__ */ React439.createElement(Group181, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React439.createElement(IconMapPin2, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React439.createElement(Stack322, { gap: 2 }, /* @__PURE__ */ React439.createElement(Text304, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React439.createElement(Text304, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation ? /* @__PURE__ */ React439.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-flow-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true }) : /* @__PURE__ */ React439.createElement(Center14, { py: "md" }, /* @__PURE__ */ React439.createElement(Text304, { size: "sm", c: "dimmed" }, "Location not configured"))));
52276
+ return /* @__PURE__ */ React439.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React439.createElement(Stack322, { gap: "xs", justify: "center" }, /* @__PURE__ */ React439.createElement(Group181, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React439.createElement(IconMapPin2, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React439.createElement(Stack322, { gap: 2 }, /* @__PURE__ */ React439.createElement(Text304, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React439.createElement(Text304, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation ? /* @__PURE__ */ React439.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-flow-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true }) : /* @__PURE__ */ React439.createElement(Center13, { py: "md" }, /* @__PURE__ */ React439.createElement(Text304, { size: "sm", c: "dimmed" }, "Location not configured"))));
52253
52277
  };
52254
52278
 
52255
52279
  // src/mantine/blocks/location/LocationBlock.tsx
@@ -52290,7 +52314,7 @@ import { createReactBlockSpec as createReactBlockSpec22 } from "@blocknote/react
52290
52314
  import React447 from "react";
52291
52315
 
52292
52316
  // src/mantine/blocks/embed/template/TemplateView.tsx
52293
- import React444, { useMemo as useMemo178 } from "react";
52317
+ import React444, { useMemo as useMemo179 } from "react";
52294
52318
  import { Box as Box79, Group as Group182, Stack as Stack324, Text as Text306 } from "@mantine/core";
52295
52319
 
52296
52320
  // src/mantine/blocks/embed/template/TemplateConfig.tsx
@@ -52419,7 +52443,7 @@ function buildImageSrcdoc(url) {
52419
52443
  var EMBED_TEMPLATE_PANEL_ID = "embed-template-panel";
52420
52444
  var EmbedTemplateView = ({ editor, block }) => {
52421
52445
  const panelId = `${EMBED_TEMPLATE_PANEL_ID}-${block.id}`;
52422
- const panelContent = useMemo178(() => /* @__PURE__ */ React444.createElement(TemplateConfig18, { editor, block }), [editor, block]);
52446
+ const panelContent = useMemo179(() => /* @__PURE__ */ React444.createElement(TemplateConfig18, { editor, block }), [editor, block]);
52423
52447
  const { open } = usePanel(panelId, panelContent);
52424
52448
  const safeUrl = sanitizeEmbedUrl(block.props.url);
52425
52449
  const height = Number(block.props.height) || 400;
@@ -52440,7 +52464,7 @@ var EmbedTemplateView = ({ editor, block }) => {
52440
52464
  };
52441
52465
 
52442
52466
  // src/mantine/blocks/embed/flow/FlowView.tsx
52443
- import React446, { useMemo as useMemo179 } from "react";
52467
+ import React446, { useMemo as useMemo180 } from "react";
52444
52468
  import { Box as Box80, Group as Group183, Stack as Stack325, Text as Text307 } from "@mantine/core";
52445
52469
 
52446
52470
  // src/mantine/blocks/embed/flow/FlowConfig.tsx
@@ -52485,7 +52509,7 @@ var FlowConfig4 = ({ editor, block }) => {
52485
52509
  var EMBED_FLOW_PANEL_ID = "embed-flow-panel";
52486
52510
  var EmbedFlowView = ({ editor, block }) => {
52487
52511
  const panelId = `${EMBED_FLOW_PANEL_ID}-${block.id}`;
52488
- const panelContent = useMemo179(() => /* @__PURE__ */ React446.createElement(FlowConfig4, { editor, block }), [editor, block]);
52512
+ const panelContent = useMemo180(() => /* @__PURE__ */ React446.createElement(FlowConfig4, { editor, block }), [editor, block]);
52489
52513
  const { open } = usePanel(panelId, panelContent);
52490
52514
  const safeUrl = sanitizeEmbedUrl(block.props.url);
52491
52515
  const height = Number(block.props.height) || 400;
@@ -52542,8 +52566,8 @@ import React450 from "react";
52542
52566
  import { createReactBlockSpec as createReactBlockSpec23 } from "@blocknote/react";
52543
52567
 
52544
52568
  // src/mantine/blocks/secrets/SecretsBlock.tsx
52545
- import React449, { useCallback as useCallback197, useMemo as useMemo180, useState as useState261 } from "react";
52546
- import { Anchor as Anchor6, ActionIcon as ActionIcon62, Button as Button114, Collapse as Collapse16, CopyButton as CopyButton5, Group as Group184, Paper as Paper38, Stack as Stack326, Text as Text308, Tooltip as Tooltip40 } from "@mantine/core";
52569
+ import React449, { useCallback as useCallback197, useMemo as useMemo181, useState as useState261 } from "react";
52570
+ import { Anchor as Anchor6, ActionIcon as ActionIcon62, Button as Button114, Collapse as Collapse15, CopyButton as CopyButton5, Group as Group184, Paper as Paper39, Stack as Stack326, Text as Text308, Tooltip as Tooltip40 } from "@mantine/core";
52547
52571
  import { IconCheck as IconCheck60, IconCopy as IconCopy4, IconDownload as IconDownload6, IconEye, IconEyeOff, IconKey as IconKey5 } from "@tabler/icons-react";
52548
52572
  var SENSITIVE_KEYS = /* @__PURE__ */ new Set(["mnemonic", "matrixPassword", "matrixRecoveryPhrase", "matrixAccessToken", "pin", "openRouterApiKeyJwe", "authToken"]);
52549
52573
  var BLOCK_LABELS = {
@@ -52659,11 +52683,11 @@ function SecretsBlock({ editor, block }) {
52659
52683
  const sessionRunId = useRunSessionId();
52660
52684
  const { docType } = useBlocknoteContext();
52661
52685
  const [showOutput, setShowOutput] = useState261(false);
52662
- const outputs = useMemo180(() => collectOutputs(editor, sessionRunId), [editor, showOutput, sessionRunId]);
52686
+ const outputs = useMemo181(() => collectOutputs(editor, sessionRunId), [editor, showOutput, sessionRunId]);
52663
52687
  const editorDocument = editor?.document || [];
52664
52688
  const runtimeReader = useRunRuntimeReader(editor);
52665
- const resolveOpts = useMemo180(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
52666
- const entityDid = useMemo180(() => resolveReferences(block.props.entityDid || "", editorDocument, resolveOpts).trim(), [block.props.entityDid, editorDocument, resolveOpts]);
52689
+ const resolveOpts = useMemo181(() => ({ yRuntime: runtimeReader }), [runtimeReader]);
52690
+ const entityDid = useMemo181(() => resolveReferences(block.props.entityDid || "", editorDocument, resolveOpts).trim(), [block.props.entityDid, editorDocument, resolveOpts]);
52667
52691
  const portalUrl = typeof window !== "undefined" ? window.location.origin : "";
52668
52692
  const connectUrl = entityDid ? `${portalUrl}/oracle/${entityDid}/connect` : "";
52669
52693
  const handleDownload = useCallback197(() => {
@@ -52680,7 +52704,7 @@ function SecretsBlock({ editor, block }) {
52680
52704
  if (docType === "template") {
52681
52705
  return /* @__PURE__ */ React449.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React449.createElement(Stack326, { gap: "xs" }, /* @__PURE__ */ React449.createElement(Group184, { gap: "xs", align: "center" }, /* @__PURE__ */ React449.createElement(IconKey5, { size: 18 }), /* @__PURE__ */ React449.createElement(Text308, { fw: 600, size: "sm" }, block.props.title || "Flow Output")), /* @__PURE__ */ React449.createElement(Text308, { size: "xs", c: "dimmed" }, "Displays all flow outputs and allows downloading them in flow mode.")));
52682
52706
  }
52683
- return /* @__PURE__ */ React449.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React449.createElement(Stack326, { gap: "md" }, /* @__PURE__ */ React449.createElement(Group184, { gap: "xs", align: "center" }, /* @__PURE__ */ React449.createElement(IconKey5, { size: 18 }), /* @__PURE__ */ React449.createElement(Text308, { fw: 600, size: "sm" }, block.props.title || "Flow Output")), /* @__PURE__ */ React449.createElement(Text308, { size: "sm", c: "dimmed" }, "Everything produced by this flow. You can view it here or download as JSON."), connectUrl && /* @__PURE__ */ React449.createElement(Stack326, { gap: "xs" }, /* @__PURE__ */ React449.createElement(Text308, { size: "sm", fw: 500 }, "Oracle Connect Link"), /* @__PURE__ */ React449.createElement(Group184, { gap: "xs", align: "center" }, /* @__PURE__ */ React449.createElement(Anchor6, { href: connectUrl, target: "_blank", size: "sm", style: { wordBreak: "break-all" } }, connectUrl), /* @__PURE__ */ React449.createElement(CopyButton5, { value: connectUrl, timeout: 2e3 }, ({ copied, copy }) => /* @__PURE__ */ React449.createElement(Tooltip40, { label: copied ? "Copied" : "Copy link", withArrow: true, position: "right" }, /* @__PURE__ */ React449.createElement(ActionIcon62, { color: copied ? "teal" : "gray", variant: "subtle", onClick: copy, size: "sm" }, copied ? /* @__PURE__ */ React449.createElement(IconCheck60, { size: 14 }) : /* @__PURE__ */ React449.createElement(IconCopy4, { size: 14 })))))), /* @__PURE__ */ React449.createElement(Group184, { gap: "xs" }, /* @__PURE__ */ React449.createElement(Button114, { variant: "light", size: "xs", leftSection: /* @__PURE__ */ React449.createElement(IconEye, { size: 14 }), onClick: () => setShowOutput((v) => !v) }, showOutput ? "Hide Output" : "View Output"), /* @__PURE__ */ React449.createElement(Button114, { variant: "filled", size: "sm", leftSection: /* @__PURE__ */ React449.createElement(IconDownload6, { size: 14 }), onClick: handleDownload, disabled: outputs.length === 0 }, "Download JSON")), /* @__PURE__ */ React449.createElement(Collapse16, { in: showOutput }, /* @__PURE__ */ React449.createElement(Stack326, { gap: "sm" }, outputs.length === 0 && /* @__PURE__ */ React449.createElement(Text308, { size: "xs", c: "dimmed", fs: "italic" }, "No outputs yet."), outputs.map(({ id, label, output }) => /* @__PURE__ */ React449.createElement(Paper38, { key: id, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React449.createElement(Stack326, { gap: 4 }, /* @__PURE__ */ React449.createElement(Text308, { size: "xs", fw: 600 }, label), Object.entries(output).map(([key, value]) => /* @__PURE__ */ React449.createElement(OutputEntry, { key, label: key, value, isSensitive: SENSITIVE_KEYS.has(key) })))))))));
52707
+ return /* @__PURE__ */ React449.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React449.createElement(Stack326, { gap: "md" }, /* @__PURE__ */ React449.createElement(Group184, { gap: "xs", align: "center" }, /* @__PURE__ */ React449.createElement(IconKey5, { size: 18 }), /* @__PURE__ */ React449.createElement(Text308, { fw: 600, size: "sm" }, block.props.title || "Flow Output")), /* @__PURE__ */ React449.createElement(Text308, { size: "sm", c: "dimmed" }, "Everything produced by this flow. You can view it here or download as JSON."), connectUrl && /* @__PURE__ */ React449.createElement(Stack326, { gap: "xs" }, /* @__PURE__ */ React449.createElement(Text308, { size: "sm", fw: 500 }, "Oracle Connect Link"), /* @__PURE__ */ React449.createElement(Group184, { gap: "xs", align: "center" }, /* @__PURE__ */ React449.createElement(Anchor6, { href: connectUrl, target: "_blank", size: "sm", style: { wordBreak: "break-all" } }, connectUrl), /* @__PURE__ */ React449.createElement(CopyButton5, { value: connectUrl, timeout: 2e3 }, ({ copied, copy }) => /* @__PURE__ */ React449.createElement(Tooltip40, { label: copied ? "Copied" : "Copy link", withArrow: true, position: "right" }, /* @__PURE__ */ React449.createElement(ActionIcon62, { color: copied ? "teal" : "gray", variant: "subtle", onClick: copy, size: "sm" }, copied ? /* @__PURE__ */ React449.createElement(IconCheck60, { size: 14 }) : /* @__PURE__ */ React449.createElement(IconCopy4, { size: 14 })))))), /* @__PURE__ */ React449.createElement(Group184, { gap: "xs" }, /* @__PURE__ */ React449.createElement(Button114, { variant: "light", size: "xs", leftSection: /* @__PURE__ */ React449.createElement(IconEye, { size: 14 }), onClick: () => setShowOutput((v) => !v) }, showOutput ? "Hide Output" : "View Output"), /* @__PURE__ */ React449.createElement(Button114, { variant: "filled", size: "sm", leftSection: /* @__PURE__ */ React449.createElement(IconDownload6, { size: 14 }), onClick: handleDownload, disabled: outputs.length === 0 }, "Download JSON")), /* @__PURE__ */ React449.createElement(Collapse15, { in: showOutput }, /* @__PURE__ */ React449.createElement(Stack326, { gap: "sm" }, outputs.length === 0 && /* @__PURE__ */ React449.createElement(Text308, { size: "xs", c: "dimmed", fs: "italic" }, "No outputs yet."), outputs.map(({ id, label, output }) => /* @__PURE__ */ React449.createElement(Paper39, { key: id, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React449.createElement(Stack326, { gap: 4 }, /* @__PURE__ */ React449.createElement(Text308, { size: "xs", fw: 600 }, label), Object.entries(output).map(([key, value]) => /* @__PURE__ */ React449.createElement(OutputEntry, { key, label: key, value, isSensitive: SENSITIVE_KEYS.has(key) })))))))));
52684
52708
  }
52685
52709
 
52686
52710
  // src/mantine/blocks/secrets/SecretsBlockSpec.tsx
@@ -52724,10 +52748,10 @@ import { createReactBlockSpec as createReactBlockSpec24 } from "@blocknote/react
52724
52748
  import React455 from "react";
52725
52749
 
52726
52750
  // src/mantine/blocks/skills/template/SkillsTemplateView.tsx
52727
- import React453, { useMemo as useMemo181 } from "react";
52751
+ import React453, { useMemo as useMemo182 } from "react";
52728
52752
  import { Badge as Badge67, Group as Group185, Stack as Stack327, Text as Text309 } from "@mantine/core";
52729
52753
  var SkillsTemplateView = ({ editor: _editor, block }) => {
52730
- const skillCount = useMemo181(() => {
52754
+ const skillCount = useMemo182(() => {
52731
52755
  try {
52732
52756
  const parsed = JSON.parse(block.props.skills || "[]");
52733
52757
  return Array.isArray(parsed) ? parsed.length : 0;
@@ -52735,7 +52759,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
52735
52759
  return 0;
52736
52760
  }
52737
52761
  }, [block.props.skills]);
52738
- const serverCount = useMemo181(() => {
52762
+ const serverCount = useMemo182(() => {
52739
52763
  try {
52740
52764
  const parsed = JSON.parse(block.props.mcpServers || "[]");
52741
52765
  return Array.isArray(parsed) ? parsed.length : 0;
@@ -52747,9 +52771,9 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
52747
52771
  };
52748
52772
 
52749
52773
  // src/mantine/blocks/skills/flow/SkillsFlowView.tsx
52750
- import { ActionIcon as ActionIcon63, Badge as Badge68, Button as Button115, Collapse as Collapse17, Group as Group186, Loader as Loader104, Paper as Paper39, Stack as Stack328, Text as Text310, Tooltip as Tooltip41 } from "@mantine/core";
52774
+ import { ActionIcon as ActionIcon63, Badge as Badge68, Button as Button115, Collapse as Collapse16, Group as Group186, Loader as Loader104, Paper as Paper40, Stack as Stack328, Text as Text310, Tooltip as Tooltip41 } from "@mantine/core";
52751
52775
  import { IconBrain as IconBrain3, IconCheck as IconCheck61, IconPencil as IconPencil5, IconPlus as IconPlus15, IconTrash as IconTrash17, IconX as IconX27 } from "@tabler/icons-react";
52752
- import React454, { useCallback as useCallback198, useEffect as useEffect191, useMemo as useMemo182, useRef as useRef66, useState as useState262 } from "react";
52776
+ import React454, { useCallback as useCallback198, useEffect as useEffect191, useMemo as useMemo183, useRef as useRef66, useState as useState262 } from "react";
52753
52777
  function parseSkills2(raw) {
52754
52778
  try {
52755
52779
  const parsed = JSON.parse(raw || "[]");
@@ -52770,8 +52794,8 @@ var SkillsFlowView = ({ editor, block }) => {
52770
52794
  const handlers = useBlocknoteHandlers();
52771
52795
  const [runtime, updateRuntime] = useNodeRuntime(editor, block.id);
52772
52796
  const isCompleted = runtime.state === "completed" && runtime.evaluationStatus === "approved";
52773
- const skills = useMemo182(() => parseSkills2(block.props.skills), [block.props.skills]);
52774
- const mcpServers = useMemo182(() => parseMcpServers(block.props.mcpServers), [block.props.mcpServers]);
52797
+ const skills = useMemo183(() => parseSkills2(block.props.skills), [block.props.skills]);
52798
+ const mcpServers = useMemo183(() => parseMcpServers(block.props.mcpServers), [block.props.mcpServers]);
52775
52799
  const [showAddMcp, setShowAddMcp] = useState262(false);
52776
52800
  const [mcpName, setMcpName] = useState262("");
52777
52801
  const [mcpUrl, setMcpUrl] = useState262("");
@@ -52795,7 +52819,7 @@ var SkillsFlowView = ({ editor, block }) => {
52795
52819
  networkFetchedRef.current = true;
52796
52820
  handlers.getNetwork().then(setNetwork).catch(() => setNetwork("mainnet"));
52797
52821
  }, [handlers.getNetwork]);
52798
- const mcpPresets = useMemo182(() => {
52822
+ const mcpPresets = useMemo183(() => {
52799
52823
  const net = network || "mainnet";
52800
52824
  const subdomain = net === "mainnet" ? "" : `.${net}`;
52801
52825
  return [
@@ -52830,8 +52854,8 @@ var SkillsFlowView = ({ editor, block }) => {
52830
52854
  },
52831
52855
  [editor, getCurrentBlock]
52832
52856
  );
52833
- const selectedSkillCids = useMemo182(() => skills.map((s) => s.cid), [skills]);
52834
- const capsuleSelectData = useMemo182(
52857
+ const selectedSkillCids = useMemo183(() => skills.map((s) => s.cid), [skills]);
52858
+ const capsuleSelectData = useMemo183(
52835
52859
  () => capsules.map((c) => ({
52836
52860
  value: c.cid,
52837
52861
  label: c.name
@@ -52961,7 +52985,7 @@ var SkillsFlowView = ({ editor, block }) => {
52961
52985
  option: { padding: "8px 12px" }
52962
52986
  }
52963
52987
  }
52964
- ) : null, skills.map((skill) => /* @__PURE__ */ React454.createElement(Paper39, { key: skill.cid, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React454.createElement(Group186, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React454.createElement(Stack328, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React454.createElement(Group186, { gap: "xs", align: "center" }, /* @__PURE__ */ React454.createElement(Text310, { size: "xs", fw: 500 }, skill.name), /* @__PURE__ */ React454.createElement(Badge68, { size: "xs", variant: "light", color: "blue" }, "CID")), skill.description && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", lineClamp: 2 }, skill.description), /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", ff: "monospace", lineClamp: 1 }, skill.cid)), !isCompleted && /* @__PURE__ */ React454.createElement(ActionIcon63, { variant: "subtle", color: "red", size: "sm", onClick: () => updateSkills(skills.filter((s) => s.cid !== skill.cid)) }, /* @__PURE__ */ React454.createElement(IconX27, { size: 14 }))))), skills.length === 0 && !loadingCapsules && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", fs: "italic" }, "No skills selected yet.")), /* @__PURE__ */ React454.createElement(Stack328, { gap: "xs" }, /* @__PURE__ */ React454.createElement(Group186, { justify: "space-between", align: "center" }, /* @__PURE__ */ React454.createElement(Text310, { size: "xs", fw: 500 }, "MCP Servers")), !isCompleted && mcpPresets.length > 0 && /* @__PURE__ */ React454.createElement(
52988
+ ) : null, skills.map((skill) => /* @__PURE__ */ React454.createElement(Paper40, { key: skill.cid, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React454.createElement(Group186, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React454.createElement(Stack328, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React454.createElement(Group186, { gap: "xs", align: "center" }, /* @__PURE__ */ React454.createElement(Text310, { size: "xs", fw: 500 }, skill.name), /* @__PURE__ */ React454.createElement(Badge68, { size: "xs", variant: "light", color: "blue" }, "CID")), skill.description && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", lineClamp: 2 }, skill.description), /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", ff: "monospace", lineClamp: 1 }, skill.cid)), !isCompleted && /* @__PURE__ */ React454.createElement(ActionIcon63, { variant: "subtle", color: "red", size: "sm", onClick: () => updateSkills(skills.filter((s) => s.cid !== skill.cid)) }, /* @__PURE__ */ React454.createElement(IconX27, { size: 14 }))))), skills.length === 0 && !loadingCapsules && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", fs: "italic" }, "No skills selected yet.")), /* @__PURE__ */ React454.createElement(Stack328, { gap: "xs" }, /* @__PURE__ */ React454.createElement(Group186, { justify: "space-between", align: "center" }, /* @__PURE__ */ React454.createElement(Text310, { size: "xs", fw: 500 }, "MCP Servers")), !isCompleted && mcpPresets.length > 0 && /* @__PURE__ */ React454.createElement(
52965
52989
  BaseSelect,
52966
52990
  {
52967
52991
  placeholder: "Add from presets...",
@@ -52980,7 +53004,7 @@ var SkillsFlowView = ({ editor, block }) => {
52980
53004
  ), mcpServers.map((server, i) => {
52981
53005
  const validation = validationResults[server.url];
52982
53006
  const isValidating = validatingUrls[server.url];
52983
- return /* @__PURE__ */ React454.createElement(Paper39, { key: i, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React454.createElement(Group186, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React454.createElement(Stack328, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React454.createElement(Group186, { gap: "xs", align: "center" }, /* @__PURE__ */ React454.createElement(Text310, { size: "xs", fw: 500 }, server.name), validation && validation.success && /* @__PURE__ */ React454.createElement(Badge68, { size: "xs", variant: "light", color: "green", leftSection: /* @__PURE__ */ React454.createElement(IconCheck61, { size: 10 }) }, validation.toolCount, " tools")), server.description && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", lineClamp: 1 }, server.description), /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", ff: "monospace", lineClamp: 1 }, server.url), validation && !validation.success && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "red" }, validation.error)), !isCompleted && /* @__PURE__ */ React454.createElement(Group186, { gap: 4 }, !server.isPreset && /* @__PURE__ */ React454.createElement(Tooltip41, { label: "Test connection" }, /* @__PURE__ */ React454.createElement(Button115, { variant: "subtle", size: "compact-xs", onClick: () => handleValidateMcp(server.url), disabled: isValidating }, isValidating ? /* @__PURE__ */ React454.createElement(Loader104, { size: 12 }) : "Test")), /* @__PURE__ */ React454.createElement(
53007
+ return /* @__PURE__ */ React454.createElement(Paper40, { key: i, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React454.createElement(Group186, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React454.createElement(Stack328, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React454.createElement(Group186, { gap: "xs", align: "center" }, /* @__PURE__ */ React454.createElement(Text310, { size: "xs", fw: 500 }, server.name), validation && validation.success && /* @__PURE__ */ React454.createElement(Badge68, { size: "xs", variant: "light", color: "green", leftSection: /* @__PURE__ */ React454.createElement(IconCheck61, { size: 10 }) }, validation.toolCount, " tools")), server.description && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", lineClamp: 1 }, server.description), /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "dimmed", ff: "monospace", lineClamp: 1 }, server.url), validation && !validation.success && /* @__PURE__ */ React454.createElement(Text310, { size: "xs", c: "red" }, validation.error)), !isCompleted && /* @__PURE__ */ React454.createElement(Group186, { gap: 4 }, !server.isPreset && /* @__PURE__ */ React454.createElement(Tooltip41, { label: "Test connection" }, /* @__PURE__ */ React454.createElement(Button115, { variant: "subtle", size: "compact-xs", onClick: () => handleValidateMcp(server.url), disabled: isValidating }, isValidating ? /* @__PURE__ */ React454.createElement(Loader104, { size: 12 }) : "Test")), /* @__PURE__ */ React454.createElement(
52984
53008
  ActionIcon63,
52985
53009
  {
52986
53010
  variant: "subtle",
@@ -52995,7 +53019,7 @@ var SkillsFlowView = ({ editor, block }) => {
52995
53019
  },
52996
53020
  /* @__PURE__ */ React454.createElement(IconPencil5, { size: 14 })
52997
53021
  ), /* @__PURE__ */ React454.createElement(ActionIcon63, { variant: "subtle", color: "red", size: "sm", onClick: () => updateMcpServers(mcpServers.filter((_, idx) => idx !== i)) }, /* @__PURE__ */ React454.createElement(IconTrash17, { size: 14 })))));
52998
- }), !isCompleted && !showAddMcp && /* @__PURE__ */ React454.createElement(Button115, { variant: "light", size: "xs", leftSection: /* @__PURE__ */ React454.createElement(IconPlus15, { size: 14 }), onClick: () => setShowAddMcp(true) }, "Add MCP Server"), /* @__PURE__ */ React454.createElement(Collapse17, { in: showAddMcp }, /* @__PURE__ */ React454.createElement(Paper39, { p: "sm", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React454.createElement(Stack328, { gap: "xs" }, /* @__PURE__ */ React454.createElement(BaseTextInput, { size: "xs", label: "Name", placeholder: "Server name", value: mcpName, onChange: (e) => setMcpName(e.currentTarget.value) }), /* @__PURE__ */ React454.createElement(BaseTextInput, { size: "xs", label: "URL", placeholder: "https://...", value: mcpUrl, onChange: (e) => setMcpUrl(e.currentTarget.value) }), /* @__PURE__ */ React454.createElement(
53022
+ }), !isCompleted && !showAddMcp && /* @__PURE__ */ React454.createElement(Button115, { variant: "light", size: "xs", leftSection: /* @__PURE__ */ React454.createElement(IconPlus15, { size: 14 }), onClick: () => setShowAddMcp(true) }, "Add MCP Server"), /* @__PURE__ */ React454.createElement(Collapse16, { in: showAddMcp }, /* @__PURE__ */ React454.createElement(Paper40, { p: "sm", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React454.createElement(Stack328, { gap: "xs" }, /* @__PURE__ */ React454.createElement(BaseTextInput, { size: "xs", label: "Name", placeholder: "Server name", value: mcpName, onChange: (e) => setMcpName(e.currentTarget.value) }), /* @__PURE__ */ React454.createElement(BaseTextInput, { size: "xs", label: "URL", placeholder: "https://...", value: mcpUrl, onChange: (e) => setMcpUrl(e.currentTarget.value) }), /* @__PURE__ */ React454.createElement(
52999
53023
  BaseTextInput,
53000
53024
  {
53001
53025
  size: "xs",
@@ -53053,7 +53077,7 @@ var SkillsBlockSpec = createReactBlockSpec24(
53053
53077
  // src/mantine/blocks/index.ts
53054
53078
  import {
53055
53079
  IconCheckbox as IconCheckbox4,
53056
- IconFileDescription as IconFileDescription5,
53080
+ IconFileDescription as IconFileDescription6,
53057
53081
  IconUsers as IconUsers9,
53058
53082
  IconList,
53059
53083
  IconChecklist as IconChecklist8,
@@ -53326,10 +53350,10 @@ blockRegistry.register({
53326
53350
  });
53327
53351
 
53328
53352
  // src/mantine/blocks/hooks/useBlockDependencies.ts
53329
- import { useMemo as useMemo183, useEffect as useEffect192, useState as useState263, useCallback as useCallback199 } from "react";
53353
+ import { useMemo as useMemo184, useEffect as useEffect192, useState as useState263, useCallback as useCallback199 } from "react";
53330
53354
 
53331
53355
  // src/mantine/blocks/hooks/useDependsOn.ts
53332
- import { useMemo as useMemo184 } from "react";
53356
+ import { useMemo as useMemo185 } from "react";
53333
53357
 
53334
53358
  // src/mantine/blocks/index.ts
53335
53359
  var blockSpecs = {
@@ -53391,7 +53415,7 @@ var getExtraSlashMenuItems = (editor, translate) => {
53391
53415
  },
53392
53416
  {
53393
53417
  title: t("palette.items.domainCreator.title", { defaultValue: "{{domain}} Creator", domain: "Domain" }),
53394
- icon: icon(IconFileDescription5),
53418
+ icon: icon(IconFileDescription6),
53395
53419
  onItemClick: () => {
53396
53420
  editor.insertBlocks(
53397
53421
  [
@@ -54069,7 +54093,7 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
54069
54093
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2 } from "@blocknote/core";
54070
54094
 
54071
54095
  // src/core/hooks/useMatrixProvider.ts
54072
- import { useEffect as useEffect194, useState as useState265, useRef as useRef67, useCallback as useCallback200, useMemo as useMemo185 } from "react";
54096
+ import { useEffect as useEffect194, useState as useState265, useRef as useRef67, useCallback as useCallback200, useMemo as useMemo186 } from "react";
54073
54097
  import { MatrixProvider } from "@ixo/matrix-crdt";
54074
54098
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
54075
54099
  const [matrixProvider, setProvider] = useState265(null);
@@ -54077,7 +54101,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
54077
54101
  const isMountedRef = useRef67(true);
54078
54102
  const providerRef = useRef67(null);
54079
54103
  const retryTimeoutRef = useRef67(null);
54080
- const providerOptions = useMemo185(
54104
+ const providerOptions = useMemo186(
54081
54105
  () => ({
54082
54106
  translator: {
54083
54107
  updateEventType: "matrix-crdt.doc_update",
@@ -54164,17 +54188,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
54164
54188
  }
54165
54189
 
54166
54190
  // src/mantine/hooks/useCollaborativeYDoc.ts
54167
- import { useMemo as useMemo186 } from "react";
54191
+ import { useMemo as useMemo187 } from "react";
54168
54192
  import * as Y from "yjs";
54169
54193
  function useCollaborativeYDoc(_options) {
54170
- return useMemo186(() => {
54194
+ return useMemo187(() => {
54171
54195
  const doc = new Y.Doc();
54172
54196
  return doc;
54173
54197
  }, []);
54174
54198
  }
54175
54199
 
54176
54200
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
54177
- import { useMemo as useMemo187, useEffect as useEffect196, useState as useState266, useRef as useRef69 } from "react";
54201
+ import { useMemo as useMemo188, useEffect as useEffect196, useState as useState266, useRef as useRef69 } from "react";
54178
54202
 
54179
54203
  // src/core/lib/matrixMetadata.ts
54180
54204
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -54742,7 +54766,7 @@ function useCreateCollaborativeIxoEditor(options) {
54742
54766
  sessionRunId,
54743
54767
  runEventLog
54744
54768
  } = options || {};
54745
- const memoizedUser = useMemo187(
54769
+ const memoizedUser = useMemo188(
54746
54770
  () => ({
54747
54771
  id: user?.id || "",
54748
54772
  name: user?.name || "",
@@ -54761,13 +54785,13 @@ function useCreateCollaborativeIxoEditor(options) {
54761
54785
  matrixClient,
54762
54786
  roomId: options.roomId
54763
54787
  });
54764
- const metadataManager = useMemo187(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
54788
+ const metadataManager = useMemo188(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
54765
54789
  useEffect196(() => {
54766
54790
  return () => {
54767
54791
  metadataManager.dispose();
54768
54792
  };
54769
54793
  }, [metadataManager]);
54770
- const defaultUploadFile = useMemo187(
54794
+ const defaultUploadFile = useMemo188(
54771
54795
  () => uploadFile || (async (file) => {
54772
54796
  return new Promise((resolve, reject2) => {
54773
54797
  const reader = new FileReader();
@@ -54780,7 +54804,7 @@ function useCreateCollaborativeIxoEditor(options) {
54780
54804
  }),
54781
54805
  [uploadFile]
54782
54806
  );
54783
- const schema = useMemo187(
54807
+ const schema = useMemo188(
54784
54808
  () => BlockNoteSchema2.create({
54785
54809
  blockSpecs: {
54786
54810
  ...defaultBlockSpecs2,
@@ -54794,23 +54818,23 @@ function useCreateCollaborativeIxoEditor(options) {
54794
54818
  }),
54795
54819
  []
54796
54820
  );
54797
- const root = useMemo187(() => yDoc.getMap("root"), [yDoc]);
54798
- const documentFragment = useMemo187(() => yDoc.getXmlFragment("document"), [yDoc]);
54799
- const flowArray = useMemo187(() => yDoc.getArray("flow"), [yDoc]);
54800
- const runtimeMap = useMemo187(() => yDoc.getMap(LEGACY_RUNTIME_MAP_KEY), [yDoc]);
54801
- const runsMap = useMemo187(() => yDoc.getMap(RUNS_MAP_KEY), [yDoc]);
54802
- const runsTerminalMap = useMemo187(() => yDoc.getMap(RUNS_TERMINAL_MAP_KEY), [yDoc]);
54803
- const nodeContextMap = useMemo187(() => yDoc.getMap("nodeContext"), [yDoc]);
54804
- const nodeContextOverridesMap = useMemo187(() => yDoc.getMap("nodeContextOverrides"), [yDoc]);
54805
- const delegationsMap = useMemo187(() => yDoc.getMap("delegations"), [yDoc]);
54806
- const invocationsMap = useMemo187(() => yDoc.getMap("invocations"), [yDoc]);
54807
- const migrationMap = useMemo187(() => yDoc.getMap("migration"), [yDoc]);
54808
- const agentOutboxMap = useMemo187(() => yDoc.getMap("agentOutbox"), [yDoc]);
54809
- const agentLeasesMap = useMemo187(() => yDoc.getMap("agentLeases"), [yDoc]);
54810
- const xeroWorkItemsMap = useMemo187(() => yDoc.getMap("xeroWorkItems"), [yDoc]);
54811
- const xeroConnectionMap = useMemo187(() => yDoc.getMap("xeroConnection"), [yDoc]);
54812
- const ucanDelegationStore = useMemo187(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
54813
- const invocationStore = useMemo187(() => {
54821
+ const root = useMemo188(() => yDoc.getMap("root"), [yDoc]);
54822
+ const documentFragment = useMemo188(() => yDoc.getXmlFragment("document"), [yDoc]);
54823
+ const flowArray = useMemo188(() => yDoc.getArray("flow"), [yDoc]);
54824
+ const runtimeMap = useMemo188(() => yDoc.getMap(LEGACY_RUNTIME_MAP_KEY), [yDoc]);
54825
+ const runsMap = useMemo188(() => yDoc.getMap(RUNS_MAP_KEY), [yDoc]);
54826
+ const runsTerminalMap = useMemo188(() => yDoc.getMap(RUNS_TERMINAL_MAP_KEY), [yDoc]);
54827
+ const nodeContextMap = useMemo188(() => yDoc.getMap("nodeContext"), [yDoc]);
54828
+ const nodeContextOverridesMap = useMemo188(() => yDoc.getMap("nodeContextOverrides"), [yDoc]);
54829
+ const delegationsMap = useMemo188(() => yDoc.getMap("delegations"), [yDoc]);
54830
+ const invocationsMap = useMemo188(() => yDoc.getMap("invocations"), [yDoc]);
54831
+ const migrationMap = useMemo188(() => yDoc.getMap("migration"), [yDoc]);
54832
+ const agentOutboxMap = useMemo188(() => yDoc.getMap("agentOutbox"), [yDoc]);
54833
+ const agentLeasesMap = useMemo188(() => yDoc.getMap("agentLeases"), [yDoc]);
54834
+ const xeroWorkItemsMap = useMemo188(() => yDoc.getMap("xeroWorkItems"), [yDoc]);
54835
+ const xeroConnectionMap = useMemo188(() => yDoc.getMap("xeroConnection"), [yDoc]);
54836
+ const ucanDelegationStore = useMemo188(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
54837
+ const invocationStore = useMemo188(() => {
54814
54838
  const store = createInvocationStore(invocationsMap);
54815
54839
  const originalAdd = store.add;
54816
54840
  store.add = (invocation) => {
@@ -54819,8 +54843,8 @@ function useCreateCollaborativeIxoEditor(options) {
54819
54843
  };
54820
54844
  return store;
54821
54845
  }, [invocationsMap, matrixClient, options.roomId]);
54822
- const userFragment = useMemo187(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
54823
- const collaborationConfig = useMemo187(
54846
+ const userFragment = useMemo188(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
54847
+ const collaborationConfig = useMemo188(
54824
54848
  () => ({
54825
54849
  provider: matrixProvider,
54826
54850
  fragment: documentFragment,
@@ -54832,7 +54856,7 @@ function useCreateCollaborativeIxoEditor(options) {
54832
54856
  }),
54833
54857
  [matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
54834
54858
  );
54835
- const ixoConfig = useMemo187(
54859
+ const ixoConfig = useMemo188(
54836
54860
  () => ({
54837
54861
  theme,
54838
54862
  editable,
@@ -54859,7 +54883,7 @@ function useCreateCollaborativeIxoEditor(options) {
54859
54883
  },
54860
54884
  [providerReady]
54861
54885
  );
54862
- const titleText = useMemo187(() => yDoc.getText("title"), [yDoc]);
54886
+ const titleText = useMemo188(() => yDoc.getText("title"), [yDoc]);
54863
54887
  let ixoEditor;
54864
54888
  if (editor) {
54865
54889
  ixoEditor = editor;
@@ -55170,8 +55194,8 @@ function useCreateCollaborativeIxoEditor(options) {
55170
55194
  }
55171
55195
 
55172
55196
  // src/mantine/components/Base/BaseIconPicker.tsx
55173
- import React459, { useState as useState268, useMemo as useMemo188, useEffect as useEffect197 } from "react";
55174
- import { TextInput as TextInput11, Tabs as Tabs4, Box as Box81, Stack as Stack329, UnstyledButton as UnstyledButton12, Text as Text312, Center as Center15, ScrollArea as ScrollArea14, Group as Group188, Popover as Popover5 } from "@mantine/core";
55197
+ import React459, { useState as useState268, useMemo as useMemo189, useEffect as useEffect197 } from "react";
55198
+ import { TextInput as TextInput11, Tabs as Tabs4, Box as Box81, Stack as Stack329, UnstyledButton as UnstyledButton12, Text as Text312, Center as Center14, ScrollArea as ScrollArea15, Group as Group188, Popover as Popover5 } from "@mantine/core";
55175
55199
  import * as TablerIcons2 from "@tabler/icons-react";
55176
55200
  import { IconSearch as IconSearch11, IconX as IconX28, IconChevronLeft, IconChevronRight as IconChevronRight15 } from "@tabler/icons-react";
55177
55201
 
@@ -55251,11 +55275,11 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
55251
55275
  const [searchQuery, setSearchQuery] = useState268("");
55252
55276
  const [activeTab, setActiveTab] = useState268("icons");
55253
55277
  const [currentPage, setCurrentPage] = useState268(1);
55254
- const allIcons = useMemo188(() => {
55278
+ const allIcons = useMemo189(() => {
55255
55279
  const iconEntries = Object.entries(TablerIcons2).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
55256
55280
  return iconEntries;
55257
55281
  }, []);
55258
- const filteredIcons = useMemo188(() => {
55282
+ const filteredIcons = useMemo189(() => {
55259
55283
  if (!searchQuery) return allIcons;
55260
55284
  const query = searchQuery.toLowerCase();
55261
55285
  return allIcons.filter(([name]) => name.toLowerCase().includes(query));
@@ -55263,13 +55287,13 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
55263
55287
  useEffect197(() => {
55264
55288
  setCurrentPage(1);
55265
55289
  }, [searchQuery]);
55266
- const paginatedIcons = useMemo188(() => {
55290
+ const paginatedIcons = useMemo189(() => {
55267
55291
  const startIndex = (currentPage - 1) * ICONS_PER_PAGE;
55268
55292
  const endIndex = startIndex + ICONS_PER_PAGE;
55269
55293
  return filteredIcons.slice(startIndex, endIndex);
55270
55294
  }, [filteredIcons, currentPage]);
55271
55295
  const totalPages = Math.ceil(filteredIcons.length / ICONS_PER_PAGE);
55272
- const recentIcons = useMemo188(() => {
55296
+ const recentIcons = useMemo189(() => {
55273
55297
  const recentIconNames = localStorageService.get(iconsKey);
55274
55298
  if (!recentIconNames || recentIconNames.length === 0) return [];
55275
55299
  return recentIconNames.slice(0, 24).map((iconName) => allIcons.find(([name]) => name === iconName)).filter((entry) => entry !== void 0);
@@ -55284,7 +55308,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
55284
55308
  };
55285
55309
  const renderIconGrid = (icons) => {
55286
55310
  if (icons.length === 0) {
55287
- return /* @__PURE__ */ React459.createElement(Center15, { py: "xl" }, /* @__PURE__ */ React459.createElement(Text312, { c: "dimmed", size: "sm" }, "No icons found"));
55311
+ return /* @__PURE__ */ React459.createElement(Center14, { py: "xl" }, /* @__PURE__ */ React459.createElement(Text312, { c: "dimmed", size: "sm" }, "No icons found"));
55288
55312
  }
55289
55313
  return /* @__PURE__ */ React459.createElement(
55290
55314
  Box81,
@@ -55376,7 +55400,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
55376
55400
  }
55377
55401
  }
55378
55402
  }
55379
- ), !searchQuery && /* @__PURE__ */ React459.createElement(Box81, { mb: "md" }, /* @__PURE__ */ React459.createElement(Text312, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React459.createElement(ScrollArea14.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React459.createElement(Box81, null, /* @__PURE__ */ React459.createElement(Group188, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React459.createElement(Text312, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React459.createElement(Group188, { gap: "xs" }, /* @__PURE__ */ React459.createElement(Text312, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React459.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React459.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React459.createElement(
55403
+ ), !searchQuery && /* @__PURE__ */ React459.createElement(Box81, { mb: "md" }, /* @__PURE__ */ React459.createElement(Text312, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React459.createElement(ScrollArea15.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React459.createElement(Box81, null, /* @__PURE__ */ React459.createElement(Group188, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React459.createElement(Text312, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React459.createElement(Group188, { gap: "xs" }, /* @__PURE__ */ React459.createElement(Text312, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React459.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React459.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React459.createElement(
55380
55404
  BaseButton,
55381
55405
  {
55382
55406
  size: "xs",
@@ -55385,12 +55409,12 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
55385
55409
  leftSection: /* @__PURE__ */ React459.createElement(IconChevronRight15, { size: 14 })
55386
55410
  },
55387
55411
  "Next"
55388
- ))), /* @__PURE__ */ React459.createElement(ScrollArea14.Autosize, { scrollbarSize: 0, mah: 200 }, renderIconGrid(paginatedIcons)))), /* @__PURE__ */ React459.createElement(Tabs4.Panel, { value: "upload", pt: "md" }, /* @__PURE__ */ React459.createElement(Center15, { py: "xl" }, /* @__PURE__ */ React459.createElement(Stack329, { align: "center", gap: "md" }, /* @__PURE__ */ React459.createElement(Text312, { size: "sm", c: "dimmed", ta: "center" }, "Upload a custom icon image", /* @__PURE__ */ React459.createElement("br", null), "(PNG, JPG, SVG)"), /* @__PURE__ */ React459.createElement(CoverImageButton, { onClick: onUploadClick }, "Choose File"))))))
55412
+ ))), /* @__PURE__ */ React459.createElement(ScrollArea15.Autosize, { scrollbarSize: 0, mah: 200 }, renderIconGrid(paginatedIcons)))), /* @__PURE__ */ React459.createElement(Tabs4.Panel, { value: "upload", pt: "md" }, /* @__PURE__ */ React459.createElement(Center14, { py: "xl" }, /* @__PURE__ */ React459.createElement(Stack329, { align: "center", gap: "md" }, /* @__PURE__ */ React459.createElement(Text312, { size: "sm", c: "dimmed", ta: "center" }, "Upload a custom icon image", /* @__PURE__ */ React459.createElement("br", null), "(PNG, JPG, SVG)"), /* @__PURE__ */ React459.createElement(CoverImageButton, { onClick: onUploadClick }, "Choose File"))))))
55389
55413
  ));
55390
55414
  }
55391
55415
 
55392
55416
  // src/mantine/components/CoverImage.tsx
55393
- import React462, { useState as useState270, useRef as useRef70, useEffect as useEffect199, useMemo as useMemo190 } from "react";
55417
+ import React462, { useState as useState270, useRef as useRef70, useEffect as useEffect199, useMemo as useMemo191 } from "react";
55394
55418
  import { Box as Box84, Group as Group190 } from "@mantine/core";
55395
55419
  import { IconMoodSmile, IconPhoto as IconPhoto7, IconSettings as IconSettings24, IconArrowsMove, IconTrash as IconTrash19, IconRefresh as IconRefresh17 } from "@tabler/icons-react";
55396
55420
 
@@ -55525,12 +55549,12 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
55525
55549
  }
55526
55550
 
55527
55551
  // src/mantine/components/Base/PageIcon.tsx
55528
- import React460, { useMemo as useMemo189 } from "react";
55529
- import { Center as Center16, Box as Box82 } from "@mantine/core";
55552
+ import React460, { useMemo as useMemo190 } from "react";
55553
+ import { Center as Center15, Box as Box82 } from "@mantine/core";
55530
55554
  import * as TablerIcons3 from "@tabler/icons-react";
55531
55555
  function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
55532
55556
  const isIconName = src && !src.startsWith("http");
55533
- const IconComponent = useMemo189(() => {
55557
+ const IconComponent = useMemo190(() => {
55534
55558
  if (!isIconName || !src) return null;
55535
55559
  const iconComponent = TablerIcons3[src];
55536
55560
  if (iconComponent) {
@@ -55538,7 +55562,7 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
55538
55562
  }
55539
55563
  return null;
55540
55564
  }, [isIconName, src]);
55541
- const Container = useCenter ? Center16 : Box82;
55565
+ const Container = useCenter ? Center15 : Box82;
55542
55566
  if (!src) return null;
55543
55567
  if (IconComponent) {
55544
55568
  return /* @__PURE__ */ React460.createElement(
@@ -55662,7 +55686,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
55662
55686
  const logoFileInputRef = useRef70(null);
55663
55687
  const [opened, { open, close }] = useDisclosure7(false);
55664
55688
  const [metadata, setMetadata] = useState270(() => editor?.getPageMetadata?.() || null);
55665
- const settingsPanelContent = useMemo190(() => editor ? /* @__PURE__ */ React462.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
55689
+ const settingsPanelContent = useMemo191(() => editor ? /* @__PURE__ */ React462.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
55666
55690
  const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
55667
55691
  useEffect199(() => {
55668
55692
  if (!editor?._metadataManager) {
@@ -56483,7 +56507,7 @@ var ExternalDropZone = ({
56483
56507
  };
56484
56508
 
56485
56509
  // src/mantine/IxoEditor.tsx
56486
- import React467, { useEffect as useEffect203, useMemo as useMemo192 } from "react";
56510
+ import React467, { useEffect as useEffect203, useMemo as useMemo193 } from "react";
56487
56511
  import { GridSuggestionMenuController, SuggestionMenuController, getDefaultReactSlashMenuItems } from "@blocknote/react";
56488
56512
  import { BlockNoteView } from "@blocknote/mantine";
56489
56513
  import { filterSuggestionItems } from "@blocknote/core";
@@ -56528,7 +56552,7 @@ function sanitizeThemeForMantine7(theme) {
56528
56552
  }
56529
56553
 
56530
56554
  // src/mantine/components/CommandPalette.tsx
56531
- import React465, { useEffect as useEffect202, useRef as useRef73, useState as useState273, useMemo as useMemo191, useCallback as useCallback205 } from "react";
56555
+ import React465, { useEffect as useEffect202, useRef as useRef73, useState as useState273, useMemo as useMemo192, useCallback as useCallback205 } from "react";
56532
56556
  import { Box as Box87, Text as Text314, Stack as Stack331 } from "@mantine/core";
56533
56557
  var GROUP_ORDER = {
56534
56558
  Headings: 0,
@@ -56631,7 +56655,7 @@ function PaletteItem({ item, isSelected, onClick, id }) {
56631
56655
  }
56632
56656
  function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
56633
56657
  const t = useTranslate();
56634
- const groupedItems = useMemo191(() => {
56658
+ const groupedItems = useMemo192(() => {
56635
56659
  const groups = [];
56636
56660
  let currentGroup;
56637
56661
  for (let i = 0; i < items.length; i++) {
@@ -56748,7 +56772,7 @@ import {
56748
56772
  IconPhoto as IconPhoto8,
56749
56773
  IconVideo as IconVideo2,
56750
56774
  IconVolume,
56751
- IconFile as IconFile6,
56775
+ IconFile as IconFile5,
56752
56776
  IconMoodSmile as IconMoodSmile2,
56753
56777
  IconPageBreak
56754
56778
  } from "@tabler/icons-react";
@@ -56801,7 +56825,7 @@ var DEFAULT_ICON_MAP = {
56801
56825
  Image: icon(IconPhoto8),
56802
56826
  Video: icon(IconVideo2),
56803
56827
  Audio: icon(IconVolume),
56804
- File: icon(IconFile6),
56828
+ File: icon(IconFile5),
56805
56829
  Emoji: icon(IconMoodSmile2),
56806
56830
  "Page Break": icon(IconPageBreak)
56807
56831
  };
@@ -56825,7 +56849,7 @@ var BUILTIN_TITLE_KEYS = {
56825
56849
  };
56826
56850
  function SanitizedThemeBoundary({ children }) {
56827
56851
  const parentTheme = useMantineTheme();
56828
- const sanitizedTheme = useMemo192(() => sanitizeThemeForMantine7(parentTheme), [parentTheme]);
56852
+ const sanitizedTheme = useMemo193(() => sanitizeThemeForMantine7(parentTheme), [parentTheme]);
56829
56853
  return /* @__PURE__ */ React467.createElement(MantineThemeContext.Provider, { value: sanitizedTheme }, children);
56830
56854
  }
56831
56855
  function IxoEditorContent({
@@ -57053,8 +57077,8 @@ function IxoEditor({
57053
57077
  }
57054
57078
 
57055
57079
  // src/mantine/components/DevUcanGrantButton.tsx
57056
- import React468, { useEffect as useEffect204, useMemo as useMemo193, useState as useState274 } from "react";
57057
- import { Alert as Alert60, Badge as Badge69, Button as Button117, Checkbox as Checkbox18, Divider as Divider46, Group as Group191, Loader as Loader105, Modal as Modal7, Paper as Paper40, Select as Select12, Stack as Stack332, Text as Text315 } from "@mantine/core";
57080
+ import React468, { useEffect as useEffect204, useMemo as useMemo194, useState as useState274 } from "react";
57081
+ import { Alert as Alert60, Badge as Badge69, Button as Button117, Checkbox as Checkbox18, Divider as Divider46, Group as Group191, Loader as Loader105, Modal as Modal7, Paper as Paper41, Select as Select12, Stack as Stack332, Text as Text315 } from "@mantine/core";
57058
57082
  import { IconKey as IconKey7, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
57059
57083
  var FLOW_AGENT_COMMAND_TYPES = [
57060
57084
  "diagnose_blocker",
@@ -57152,7 +57176,7 @@ function DevUcanGrantButton({
57152
57176
  const rootProofCid = getProofCid(rootCapability);
57153
57177
  const rootProofDelegation = typeof rootCapability?.delegation === "string" && rootCapability.delegation ? rootCapability.delegation : "";
57154
57178
  const hasSigningHandler = !!(handlers?.createDelegation || handlers?.signCapability);
57155
- const capabilityOptions = useMemo193(() => buildCapabilityOptions(editor), [editor]);
57179
+ const capabilityOptions = useMemo194(() => buildCapabilityOptions(editor), [editor]);
57156
57180
  const logAvailableHandlers = () => {
57157
57181
  console.info("[ixo-editor] DevUcanGrantButton handlers", {
57158
57182
  source: propHandlers ? "prop" : contextHandlers ? "context" : editorHandlers ? "editor" : "none",
@@ -57190,7 +57214,7 @@ function DevUcanGrantButton({
57190
57214
  cancelled = true;
57191
57215
  };
57192
57216
  }, [opened, roomId, matrixClient, handlers, selectedMemberDid]);
57193
- const selectedCapabilityDefinitions = useMemo193(() => capabilityOptions.filter((option) => selectedCapabilities.includes(option.id)), [capabilityOptions, selectedCapabilities]);
57217
+ const selectedCapabilityDefinitions = useMemo194(() => capabilityOptions.filter((option) => selectedCapabilities.includes(option.id)), [capabilityOptions, selectedCapabilities]);
57194
57218
  const handleSign = async () => {
57195
57219
  if (!selectedMemberDid) {
57196
57220
  setMessage({ color: "yellow", text: "Select a Matrix room member first." });
@@ -57326,7 +57350,7 @@ function DevUcanGrantButton({
57326
57350
  disabled: loadingMembers || signing,
57327
57351
  rightSection: loadingMembers ? /* @__PURE__ */ React468.createElement(Loader105, { size: 14 }) : null
57328
57352
  }
57329
- ), /* @__PURE__ */ React468.createElement(Divider46, null), /* @__PURE__ */ React468.createElement(Stack332, { gap: "xs" }, /* @__PURE__ */ React468.createElement(Group191, { justify: "space-between" }, /* @__PURE__ */ React468.createElement(Text315, { size: "sm", fw: 600 }, "UCAN capabilities"), /* @__PURE__ */ React468.createElement(Group191, { gap: "xs" }, /* @__PURE__ */ React468.createElement(Button117, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities(capabilityOptions.map((option) => option.id)) }, "All"), /* @__PURE__ */ React468.createElement(Button117, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities([]) }, "None"))), /* @__PURE__ */ React468.createElement(Paper40, { withBorder: true, p: "sm", style: { maxHeight: 360, overflow: "auto" } }, /* @__PURE__ */ React468.createElement(Stack332, { gap: "xs" }, capabilityOptions.map((option) => /* @__PURE__ */ React468.createElement(
57353
+ ), /* @__PURE__ */ React468.createElement(Divider46, null), /* @__PURE__ */ React468.createElement(Stack332, { gap: "xs" }, /* @__PURE__ */ React468.createElement(Group191, { justify: "space-between" }, /* @__PURE__ */ React468.createElement(Text315, { size: "sm", fw: 600 }, "UCAN capabilities"), /* @__PURE__ */ React468.createElement(Group191, { gap: "xs" }, /* @__PURE__ */ React468.createElement(Button117, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities(capabilityOptions.map((option) => option.id)) }, "All"), /* @__PURE__ */ React468.createElement(Button117, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities([]) }, "None"))), /* @__PURE__ */ React468.createElement(Paper41, { withBorder: true, p: "sm", style: { maxHeight: 360, overflow: "auto" } }, /* @__PURE__ */ React468.createElement(Stack332, { gap: "xs" }, capabilityOptions.map((option) => /* @__PURE__ */ React468.createElement(
57330
57354
  Checkbox18,
57331
57355
  {
57332
57356
  key: option.id,
@@ -57413,14 +57437,14 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
57413
57437
  };
57414
57438
 
57415
57439
  // src/mantine/components/FlowPermissionsPanel.tsx
57416
- import React470, { useState as useState276, useEffect as useEffect205, useMemo as useMemo194 } from "react";
57417
- import { Stack as Stack334, Text as Text317, Paper as Paper41, Group as Group193, Badge as Badge70, Button as Button119, ActionIcon as ActionIcon65, Loader as Loader106, Alert as Alert62, Divider as Divider47 } from "@mantine/core";
57440
+ import React470, { useState as useState276, useEffect as useEffect205, useMemo as useMemo195 } from "react";
57441
+ import { Stack as Stack334, Text as Text317, Paper as Paper42, Group as Group193, Badge as Badge70, Button as Button119, ActionIcon as ActionIcon65, Loader as Loader106, Alert as Alert62, Divider as Divider47 } from "@mantine/core";
57418
57442
  import { IconPlus as IconPlus17, IconTrash as IconTrash20, IconShieldCheck as IconShieldCheck19, IconUser as IconUser17, IconRobot as IconRobot9, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
57419
57443
  var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
57420
57444
  const [delegations, setDelegations] = useState276([]);
57421
57445
  const [loading, setLoading] = useState276(true);
57422
57446
  const [revoking, setRevoking] = useState276(null);
57423
- const rootDelegation = useMemo194(() => {
57447
+ const rootDelegation = useMemo195(() => {
57424
57448
  if (editor.getUcanService) {
57425
57449
  return editor.getUcanService()?.getRootDelegation() || null;
57426
57450
  }
@@ -57496,12 +57520,12 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
57496
57520
  if (date < /* @__PURE__ */ new Date()) return "Expired";
57497
57521
  return date.toLocaleDateString();
57498
57522
  };
57499
- return /* @__PURE__ */ React470.createElement(Stack334, { gap: "md" }, /* @__PURE__ */ React470.createElement(Stack334, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React470.createElement(Paper41, { p: "sm", withBorder: true }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(IconShieldCheck19, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React470.createElement(Stack334, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React470.createElement(Badge70, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React470.createElement(Divider47, { label: "Flow Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React470.createElement(Group193, { justify: "center", py: "xl" }, /* @__PURE__ */ React470.createElement(Loader106, { size: "sm" })) : flowDelegations.length === 0 ? /* @__PURE__ */ React470.createElement(Alert62, { color: "gray", variant: "light" }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm" }, "No flow permissions have been granted yet.")) : /* @__PURE__ */ React470.createElement(Stack334, { gap: "xs" }, flowDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React470.createElement(Paper41, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React470.createElement(Group193, { justify: "space-between" }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React470.createElement(Stack334, { gap: 2 }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React470.createElement(ActionIcon65, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React470.createElement(IconTrash20, { size: 16 })))))), /* @__PURE__ */ React470.createElement(Divider47, { label: "Custom Capabilities", labelPosition: "center" }), !loading && customDelegations.length === 0 ? /* @__PURE__ */ React470.createElement(Alert62, { color: "gray", variant: "light" }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm" }, "No custom capabilities have been created yet.")) : /* @__PURE__ */ React470.createElement(Stack334, { gap: "xs" }, customDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React470.createElement(Paper41, { key: delegation.cid, p: "sm", withBorder: true, style: { borderColor: "var(--mantine-color-violet-4)" } }, /* @__PURE__ */ React470.createElement(Group193, { justify: "space-between" }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React470.createElement(Stack334, { gap: 2 }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React470.createElement(Badge70, { size: "xs", variant: "light", color: "violet" }, "custom")), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Issued by: ", delegation.issuerDid.slice(-12))))), /* @__PURE__ */ React470.createElement(ActionIcon65, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React470.createElement(IconTrash20, { size: 16 })))))), /* @__PURE__ */ React470.createElement(Button119, { leftSection: /* @__PURE__ */ React470.createElement(IconPlus17, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
57523
+ return /* @__PURE__ */ React470.createElement(Stack334, { gap: "md" }, /* @__PURE__ */ React470.createElement(Stack334, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React470.createElement(Paper42, { p: "sm", withBorder: true }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(IconShieldCheck19, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React470.createElement(Stack334, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React470.createElement(Badge70, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React470.createElement(Divider47, { label: "Flow Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React470.createElement(Group193, { justify: "center", py: "xl" }, /* @__PURE__ */ React470.createElement(Loader106, { size: "sm" })) : flowDelegations.length === 0 ? /* @__PURE__ */ React470.createElement(Alert62, { color: "gray", variant: "light" }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm" }, "No flow permissions have been granted yet.")) : /* @__PURE__ */ React470.createElement(Stack334, { gap: "xs" }, flowDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React470.createElement(Paper42, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React470.createElement(Group193, { justify: "space-between" }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React470.createElement(Stack334, { gap: 2 }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React470.createElement(ActionIcon65, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React470.createElement(IconTrash20, { size: 16 })))))), /* @__PURE__ */ React470.createElement(Divider47, { label: "Custom Capabilities", labelPosition: "center" }), !loading && customDelegations.length === 0 ? /* @__PURE__ */ React470.createElement(Alert62, { color: "gray", variant: "light" }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm" }, "No custom capabilities have been created yet.")) : /* @__PURE__ */ React470.createElement(Stack334, { gap: "xs" }, customDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React470.createElement(Paper42, { key: delegation.cid, p: "sm", withBorder: true, style: { borderColor: "var(--mantine-color-violet-4)" } }, /* @__PURE__ */ React470.createElement(Group193, { justify: "space-between" }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React470.createElement(Stack334, { gap: 2 }, /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React470.createElement(Badge70, { size: "xs", variant: "light", color: "violet" }, "custom")), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React470.createElement(Group193, { gap: "xs" }, /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React470.createElement(Text317, { size: "xs", c: "dimmed" }, "Issued by: ", delegation.issuerDid.slice(-12))))), /* @__PURE__ */ React470.createElement(ActionIcon65, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React470.createElement(IconTrash20, { size: 16 })))))), /* @__PURE__ */ React470.createElement(Button119, { leftSection: /* @__PURE__ */ React470.createElement(IconPlus17, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
57500
57524
  };
57501
57525
 
57502
57526
  // src/mantine/components/GrantPermissionModal.tsx
57503
57527
  import React471, { useState as useState277, useCallback as useCallback206 } from "react";
57504
- import { Modal as Modal9, Stack as Stack335, Text as Text318, TextInput as TextInput13, Button as Button120, Group as Group194, Radio as Radio7, Checkbox as Checkbox19, Alert as Alert63, Paper as Paper42, Loader as Loader107, Badge as Badge71, ActionIcon as ActionIcon66, Divider as Divider48, NumberInput as NumberInput16 } from "@mantine/core";
57528
+ import { Modal as Modal9, Stack as Stack335, Text as Text318, TextInput as TextInput13, Button as Button120, Group as Group194, Radio as Radio7, Checkbox as Checkbox19, Alert as Alert63, Paper as Paper43, Loader as Loader107, Badge as Badge71, ActionIcon as ActionIcon66, Divider as Divider48, NumberInput as NumberInput16 } from "@mantine/core";
57505
57529
  import { IconSearch as IconSearch12, IconUser as IconUser18, IconRobot as IconRobot10, IconX as IconX29, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
57506
57530
  var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
57507
57531
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
@@ -57637,12 +57661,12 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
57637
57661
  onChange: (e) => setSearchQuery(e.currentTarget.value),
57638
57662
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
57639
57663
  }
57640
- ), selectedRecipient ? /* @__PURE__ */ React471.createElement(Paper42, { p: "sm", withBorder: true }, /* @__PURE__ */ React471.createElement(Group194, { justify: "space-between" }, /* @__PURE__ */ React471.createElement(Group194, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React471.createElement(IconRobot10, { size: 16 }) : /* @__PURE__ */ React471.createElement(IconUser18, { size: 16 }), /* @__PURE__ */ React471.createElement(Text318, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React471.createElement(Badge71, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React471.createElement(ActionIcon66, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React471.createElement(IconX29, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React471.createElement(Paper42, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React471.createElement(Stack335, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React471.createElement(Button120, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React471.createElement(TextInput13, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React471.createElement(Divider48, null), /* @__PURE__ */ React471.createElement(Stack335, { gap: "xs" }, /* @__PURE__ */ React471.createElement(Text318, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
57664
+ ), selectedRecipient ? /* @__PURE__ */ React471.createElement(Paper43, { p: "sm", withBorder: true }, /* @__PURE__ */ React471.createElement(Group194, { justify: "space-between" }, /* @__PURE__ */ React471.createElement(Group194, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React471.createElement(IconRobot10, { size: 16 }) : /* @__PURE__ */ React471.createElement(IconUser18, { size: 16 }), /* @__PURE__ */ React471.createElement(Text318, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React471.createElement(Badge71, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React471.createElement(ActionIcon66, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React471.createElement(IconX29, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React471.createElement(Paper43, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React471.createElement(Stack335, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React471.createElement(Button120, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React471.createElement(TextInput13, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React471.createElement(Divider48, null), /* @__PURE__ */ React471.createElement(Stack335, { gap: "xs" }, /* @__PURE__ */ React471.createElement(Text318, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
57641
57665
  // Single block mode: show fixed block info
57642
- /* @__PURE__ */ React471.createElement(Paper42, { p: "sm", withBorder: true }, /* @__PURE__ */ React471.createElement(Group194, { gap: "xs" }, /* @__PURE__ */ React471.createElement(Badge71, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React471.createElement(Text318, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React471.createElement(Text318, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
57666
+ /* @__PURE__ */ React471.createElement(Paper43, { p: "sm", withBorder: true }, /* @__PURE__ */ React471.createElement(Group194, { gap: "xs" }, /* @__PURE__ */ React471.createElement(Badge71, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React471.createElement(Text318, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React471.createElement(Text318, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
57643
57667
  ) : (
57644
57668
  // Multi-block mode: show scope selection
57645
- /* @__PURE__ */ React471.createElement(React471.Fragment, null, /* @__PURE__ */ React471.createElement(Radio7.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React471.createElement(Stack335, { gap: "xs" }, /* @__PURE__ */ React471.createElement(Radio7, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React471.createElement(Radio7, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React471.createElement(Paper42, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React471.createElement(Stack335, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React471.createElement(
57669
+ /* @__PURE__ */ React471.createElement(React471.Fragment, null, /* @__PURE__ */ React471.createElement(Radio7.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React471.createElement(Stack335, { gap: "xs" }, /* @__PURE__ */ React471.createElement(Radio7, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React471.createElement(Radio7, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React471.createElement(Paper43, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React471.createElement(Stack335, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React471.createElement(
57646
57670
  Checkbox19,
57647
57671
  {
57648
57672
  key: block.id,
@@ -57817,4 +57841,4 @@ export {
57817
57841
  ixoGraphQLClient,
57818
57842
  getEntity
57819
57843
  };
57820
- //# sourceMappingURL=chunk-W5CKNMDB.js.map
57844
+ //# sourceMappingURL=chunk-MJUVGIIR.js.map