@ixo/editor 4.0.0 → 4.0.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.
@@ -25122,18 +25122,19 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
25122
25122
 
25123
25123
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
25124
25124
  import React244, { useCallback as useCallback86, useEffect as useEffect89, useMemo as useMemo93, useState as useState110 } from "react";
25125
- import { ActionIcon as ActionIcon34, Alert as Alert47, Box as Box56, Button as Button49, Checkbox as Checkbox13, Divider as Divider22, Group as Group93, Loader as Loader45, ScrollArea as ScrollArea7, Stack as Stack173, Text as Text149, UnstyledButton as UnstyledButton6 } from "@mantine/core";
25125
+ import { ActionIcon as ActionIcon34, Alert as Alert47, Box as Box56, Button as Button49, Checkbox as Checkbox13, Divider as Divider22, Group as Group94, Loader as Loader45, ScrollArea as ScrollArea7, Stack as Stack173, Text as Text149, UnstyledButton as UnstyledButton6 } from "@mantine/core";
25126
25126
  import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck18, IconFilter as IconFilter2 } from "@tabler/icons-react";
25127
25127
  import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
25128
25128
 
25129
25129
  // src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
25130
25130
  import React243, { useCallback as useCallback85, useEffect as useEffect88, useMemo as useMemo92, useRef as useRef24, useState as useState109 } from "react";
25131
- import { Box as Box55, Group as Group92, Loader as Loader44, SimpleGrid as SimpleGrid4, Stack as Stack172, Text as Text148, Tooltip as Tooltip18, UnstyledButton as UnstyledButton5 } from "@mantine/core";
25131
+ import { Box as Box55, Group as Group93, Loader as Loader44, SimpleGrid as SimpleGrid4, Stack as Stack172, Text as Text148, Tooltip as Tooltip18, UnstyledButton as UnstyledButton5 } from "@mantine/core";
25132
25132
  import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
25133
25133
 
25134
25134
  // src/mantine/components/MediaPreviewModal.tsx
25135
25135
  import React242 from "react";
25136
- import { Anchor, Box as Box54, Center as Center13, Modal as Modal3, Stack as Stack171, Text as Text147 } from "@mantine/core";
25136
+ import { Anchor, Box as Box54, Center as Center13, Group as Group92, Modal as Modal3, Stack as Stack171, Text as Text147 } from "@mantine/core";
25137
+ import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
25137
25138
  import { IconDownload as IconDownload4 } from "@tabler/icons-react";
25138
25139
  function detectKind(type, name) {
25139
25140
  const t = (type || "").toLowerCase();
@@ -25145,19 +25146,46 @@ function detectKind(type, name) {
25145
25146
  return "other";
25146
25147
  }
25147
25148
  var MediaPreviewModal = ({ file, onClose }) => {
25149
+ const isMobile = useMediaQuery2("(max-width: 992px)");
25148
25150
  const opened = !!file;
25149
25151
  const kind = file ? detectKind(file.type, file.name) : "other";
25152
+ const wide = kind === "pdf" || kind === "image" || kind === "video";
25150
25153
  return /* @__PURE__ */ React242.createElement(
25151
25154
  Modal3,
25152
25155
  {
25153
25156
  opened,
25154
25157
  onClose,
25155
- title: /* @__PURE__ */ React242.createElement(Text147, { fw: 500, size: "sm", truncate: true }, file?.name || "Preview"),
25156
- size: "xl",
25157
- centered: true
25158
+ zIndex: 1e4,
25159
+ portalProps: typeof document !== "undefined" ? { target: document.body } : void 0,
25160
+ title: /* @__PURE__ */ React242.createElement(Group92, { gap: "sm", wrap: "nowrap", style: { width: "100%" } }, /* @__PURE__ */ React242.createElement(Text147, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, file?.name || "Preview"), file && /* @__PURE__ */ React242.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed", style: { flexShrink: 0 } }, /* @__PURE__ */ React242.createElement(Box54, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload4, 14), "Download"))),
25161
+ size: wide ? "95vw" : "xl",
25162
+ centered: true,
25163
+ styles: wide ? {
25164
+ content: {
25165
+ height: "95vh",
25166
+ maxWidth: isMobile ? "100%" : 1400,
25167
+ display: "flex",
25168
+ flexDirection: "column",
25169
+ overflow: "hidden"
25170
+ },
25171
+ body: {
25172
+ flex: 1,
25173
+ minHeight: 0,
25174
+ display: "flex",
25175
+ flexDirection: "column",
25176
+ overflow: "hidden"
25177
+ }
25178
+ } : void 0
25158
25179
  },
25159
- file && /* @__PURE__ */ React242.createElement(Stack171, { gap: "sm" }, kind === "image" && /* @__PURE__ */ React242.createElement(Center13, null, /* @__PURE__ */ React242.createElement("img", { src: file.content, alt: file.name, style: { maxWidth: "100%", maxHeight: "70vh", objectFit: "contain", borderRadius: 8 } })), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
25160
- /* @__PURE__ */ React242.createElement("video", { src: file.content, controls: true, style: { width: "100%", maxHeight: "70vh", borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React242.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React242.createElement(Box54, { style: { height: "70vh", borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React242.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React242.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React242.createElement(Stack171, { gap: "xs", align: "center" }, /* @__PURE__ */ React242.createElement(Text147, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline."), /* @__PURE__ */ React242.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name }, /* @__PURE__ */ React242.createElement(Box54, { style: { display: "inline-flex", alignItems: "center", gap: 6 } }, icon(IconDownload4, 16), "Download ", file.name)))), /* @__PURE__ */ React242.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed" }, /* @__PURE__ */ React242.createElement(Box54, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload4, 12), "Download original")))
25180
+ file && /* @__PURE__ */ React242.createElement(Stack171, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React242.createElement(Center13, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React242.createElement(
25181
+ "img",
25182
+ {
25183
+ src: file.content,
25184
+ alt: file.name,
25185
+ style: { display: "block", maxWidth: "100%", maxHeight: "100%", width: "auto", height: "auto", objectFit: "contain", borderRadius: 8 }
25186
+ }
25187
+ )), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
25188
+ /* @__PURE__ */ React242.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__ */ React242.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React242.createElement(Box54, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React242.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React242.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React242.createElement(Text147, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
25161
25189
  );
25162
25190
  };
25163
25191
 
@@ -25434,7 +25462,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
25434
25462
  }
25435
25463
  }
25436
25464
  ) : isFetching ? /* @__PURE__ */ React243.createElement(Loader44, { size: "sm" }) : icon(IconCmp, 28)
25437
- ), /* @__PURE__ */ React243.createElement(Group92, { gap: 6, p: 8, wrap: "nowrap" }, icon(IconCmp, 14), /* @__PURE__ */ React243.createElement(Text148, { size: "xs", truncate: true, style: { flex: 1 } }, item.name)))
25465
+ ), /* @__PURE__ */ React243.createElement(Group93, { gap: 6, p: 8, wrap: "nowrap" }, icon(IconCmp, 14), /* @__PURE__ */ React243.createElement(Text148, { size: "xs", truncate: true, style: { flex: 1 } }, item.name)))
25438
25466
  ));
25439
25467
  })), /* @__PURE__ */ React243.createElement(MediaPreviewModal, { file: active, onClose: () => setActive(null) }));
25440
25468
  };
@@ -25549,6 +25577,44 @@ var EvaluateClaimFlowDetail = ({
25549
25577
  if (!cs || typeof cs !== "object") return cs;
25550
25578
  return resolveFilesInCredentialSubject(cs);
25551
25579
  }, [claimData]);
25580
+ const mediaBlobCacheRef = React244.useRef(/* @__PURE__ */ new Map());
25581
+ const [surveyActiveFile, setSurveyActiveFile] = useState110(null);
25582
+ const openFileRef = React244.useRef(() => {
25583
+ });
25584
+ useEffect89(() => {
25585
+ return () => {
25586
+ for (const blobUrl of mediaBlobCacheRef.current.values()) URL.revokeObjectURL(blobUrl);
25587
+ mediaBlobCacheRef.current.clear();
25588
+ };
25589
+ }, []);
25590
+ useEffect89(() => {
25591
+ const fetcher = handlers.fetchClaimMedia;
25592
+ const cache = mediaBlobCacheRef.current;
25593
+ openFileRef.current = async (file) => {
25594
+ if (!file?.content || typeof file.content !== "string") return;
25595
+ const raw = file.content;
25596
+ const name = file.name || raw.split("/").pop() || "file";
25597
+ const type = file.type || "";
25598
+ if (!/^https?:/i.test(raw) || !fetcher) {
25599
+ setSurveyActiveFile({ name, type, content: raw });
25600
+ return;
25601
+ }
25602
+ const cached = cache.get(raw);
25603
+ if (cached) {
25604
+ setSurveyActiveFile({ name, type, content: cached });
25605
+ return;
25606
+ }
25607
+ setSurveyActiveFile({ name, type, content: raw });
25608
+ try {
25609
+ const blob = await fetcher(raw);
25610
+ const blobUrl = URL.createObjectURL(blob);
25611
+ cache.set(raw, blobUrl);
25612
+ setSurveyActiveFile((curr) => curr && curr.content === raw ? { name, type, content: blobUrl } : curr);
25613
+ } catch (err) {
25614
+ console.error("[EvaluateClaim] fetchClaimMedia failed", raw, err);
25615
+ }
25616
+ };
25617
+ }, [handlers.fetchClaimMedia]);
25552
25618
  const surveyModel = useMemo93(() => {
25553
25619
  if (!surveyJson || !claimData) return null;
25554
25620
  const model = new SurveyModel10(surveyJson);
@@ -25556,6 +25622,59 @@ var EvaluateClaimFlowDetail = ({
25556
25622
  model.showQuestionNumbers = "off";
25557
25623
  model.questionsOnPageMode = "singlePage";
25558
25624
  model.mode = "display";
25625
+ if (handlers.fetchClaimMedia) {
25626
+ const fetcher = handlers.fetchClaimMedia;
25627
+ const cache = mediaBlobCacheRef.current;
25628
+ model.onDownloadFile.add((_sender, options) => {
25629
+ const src = options?.content;
25630
+ if (typeof src !== "string" || !/^https?:/i.test(src)) {
25631
+ options.callback("success", src);
25632
+ return;
25633
+ }
25634
+ const cached = cache.get(src);
25635
+ if (cached) {
25636
+ options.callback("success", cached);
25637
+ return;
25638
+ }
25639
+ fetcher(src).then((blob) => {
25640
+ const blobUrl = URL.createObjectURL(blob);
25641
+ cache.set(src, blobUrl);
25642
+ options.callback("success", blobUrl);
25643
+ }).catch((err) => {
25644
+ console.error("[EvaluateClaim] fetchClaimMedia failed", src, err);
25645
+ options.callback("error");
25646
+ });
25647
+ });
25648
+ }
25649
+ model.onAfterRenderQuestion.add((_sender, opts) => {
25650
+ const q = opts?.question;
25651
+ if (!q || q.getType?.() !== "file") return;
25652
+ const root = opts?.htmlElement;
25653
+ if (!root) return;
25654
+ const clickHandler = (e) => {
25655
+ const target = e.target;
25656
+ if (!target) return;
25657
+ const item = target.closest(".sd-file__preview-item, .sd-file__image-wrapper, .sd-file__sign, .sd-file__default-image");
25658
+ if (!item) return;
25659
+ e.preventDefault();
25660
+ e.stopPropagation();
25661
+ const previewItem = item.closest(".sd-file__preview-item");
25662
+ const list = previewItem?.parentElement;
25663
+ const index = list && previewItem ? Array.prototype.indexOf.call(list.children, previewItem) : 0;
25664
+ const value = q.value;
25665
+ const fileData = Array.isArray(value) ? value[Math.max(0, index)] : value;
25666
+ if (!fileData || typeof fileData !== "object") return;
25667
+ openFileRef.current({ name: fileData.name, type: fileData.type, content: fileData.content });
25668
+ };
25669
+ root.addEventListener("click", clickHandler, true);
25670
+ });
25671
+ if (handlers.fetchClaimMedia) {
25672
+ for (const q of model.getAllQuestions()) {
25673
+ if (q.getType?.() === "file") {
25674
+ q.storeDataAsText = false;
25675
+ }
25676
+ }
25677
+ }
25559
25678
  model.data = resolvedCredentialSubject;
25560
25679
  return model;
25561
25680
  }, [surveyJson, claimData, resolvedCredentialSubject]);
@@ -25917,7 +26036,7 @@ var EvaluateClaimFlowDetail = ({
25917
26036
  const selectedClaimProfile = profilesByDid[selectedClaim.agentDid];
25918
26037
  const selectedDisplayName = selectedClaimProfile?.displayname || selectedClaim.agentDid || selectedClaim.agentAddress;
25919
26038
  const selectedAvatarLabel = (selectedClaimProfile?.displayname || selectedClaim.agentDid || selectedClaim.agentAddress || "?")[0]?.toUpperCase();
25920
- return /* @__PURE__ */ React244.createElement(Stack173, { gap: "md" }, /* @__PURE__ */ React244.createElement(Group93, { gap: "xs", align: "center" }, /* @__PURE__ */ React244.createElement(ActionIcon34, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React244.createElement(IconArrowLeft8, { size: 16 })), /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "sm", title: selectedClaim.claimId }, "Claim #", truncateId(selectedClaim.claimId))), /* @__PURE__ */ React244.createElement(Group93, { gap: 16, align: "center", style: { width: "100%" } }, /* @__PURE__ */ React244.createElement(
26039
+ return /* @__PURE__ */ React244.createElement(Stack173, { gap: "md" }, /* @__PURE__ */ React244.createElement(Group94, { gap: "xs", align: "center" }, /* @__PURE__ */ React244.createElement(ActionIcon34, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React244.createElement(IconArrowLeft8, { size: 16 })), /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "sm", title: selectedClaim.claimId }, "Claim #", truncateId(selectedClaim.claimId))), /* @__PURE__ */ React244.createElement(Group94, { gap: 16, align: "center", style: { width: "100%" } }, /* @__PURE__ */ React244.createElement(
25921
26040
  Box56,
25922
26041
  {
25923
26042
  style: {
@@ -25938,15 +26057,15 @@ var EvaluateClaimFlowDetail = ({
25938
26057
  }
25939
26058
  },
25940
26059
  selectedClaimProfile?.avatarUrl ? null : selectedAvatarLabel
25941
- ), /* @__PURE__ */ React244.createElement(Stack173, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(selectedClaim.agentAddress))), /* @__PURE__ */ React244.createElement(Stack173, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "md", c: claimStatus.color }, claimStatus.key === "approved" && /* @__PURE__ */ React244.createElement(IconCheck18, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), claimStatus.label), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, getTimeAgo3(selectedClaim.submissionDate || "")))), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "Submission" }, surveyLoading ? /* @__PURE__ */ React244.createElement(Group93, { gap: "xs" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Loading submission details...")) : surveyModel ? /* @__PURE__ */ React244.createElement(ScrollArea7, { h: 280 }, /* @__PURE__ */ React244.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "No submission template/data available.")), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "Attachments" }, /* @__PURE__ */ React244.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject })), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "AI Evaluation" }, evaluationLoading ? /* @__PURE__ */ React244.createElement(Group93, { gap: "xs" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Running rubric evaluation...")) : evaluationResult ? /* @__PURE__ */ React244.createElement(ScrollArea7, { h: 280 }, /* @__PURE__ */ React244.createElement(RubricEvaluationResults, { evaluation: evaluationResult })) : /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "No rubric evaluation available for this claim.")), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React244.createElement(
26060
+ ), /* @__PURE__ */ React244.createElement(Stack173, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(selectedClaim.agentAddress))), /* @__PURE__ */ React244.createElement(Stack173, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "md", c: claimStatus.color }, claimStatus.key === "approved" && /* @__PURE__ */ React244.createElement(IconCheck18, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), claimStatus.label), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, getTimeAgo3(selectedClaim.submissionDate || "")))), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "Submission" }, surveyLoading ? /* @__PURE__ */ React244.createElement(Group94, { gap: "xs" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Loading submission details...")) : surveyModel ? /* @__PURE__ */ React244.createElement(ScrollArea7, { h: 280 }, /* @__PURE__ */ React244.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "No submission template/data available.")), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "Attachments" }, /* @__PURE__ */ React244.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject })), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "AI Evaluation" }, evaluationLoading ? /* @__PURE__ */ React244.createElement(Group94, { gap: "xs" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Running rubric evaluation...")) : evaluationResult ? /* @__PURE__ */ React244.createElement(ScrollArea7, { h: 280 }, /* @__PURE__ */ React244.createElement(RubricEvaluationResults, { evaluation: evaluationResult })) : /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "No rubric evaluation available for this claim.")), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React244.createElement(
25942
26061
  CollapsibleSection,
25943
26062
  {
25944
26063
  title: "Outcome",
25945
26064
  defaultOpen: true,
25946
26065
  badge: /* @__PURE__ */ React244.createElement(React244.Fragment, null, outcomeTemplateJson && !outcomeComplete && /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "yellow" }, "(required)"), outcomeComplete && /* @__PURE__ */ React244.createElement(IconCheck18, { size: 14, color: "var(--mantine-color-green-6)" }))
25947
26066
  },
25948
- outcomeTemplateLoading ? /* @__PURE__ */ React244.createElement(Group93, { gap: "xs" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Loading evaluation template...")) : outcomeSurveyModel ? /* @__PURE__ */ React244.createElement(ScrollArea7, { h: 320 }, /* @__PURE__ */ React244.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "No evaluation template available.")
25949
- ), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "Evaluation", defaultOpen: true }, /* @__PURE__ */ React244.createElement(Stack173, { gap: "md" }, /* @__PURE__ */ React244.createElement(Divider22, { color: "rgba(255,255,255,0.06)" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Payment (optional custom payouts)"), paymentRows.map((row, index) => /* @__PURE__ */ React244.createElement(Stack173, { key: row.id, gap: 8 }, /* @__PURE__ */ React244.createElement(Group93, { justify: "space-between", align: "center" }, /* @__PURE__ */ React244.createElement(Text149, { size: "sm" }, "Token ", index + 1), paymentRows.length > 1 && /* @__PURE__ */ React244.createElement(Button49, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, "Remove")), /* @__PURE__ */ React244.createElement(
26067
+ outcomeTemplateLoading ? /* @__PURE__ */ React244.createElement(Group94, { gap: "xs" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Loading evaluation template...")) : outcomeSurveyModel ? /* @__PURE__ */ React244.createElement(ScrollArea7, { h: 320 }, /* @__PURE__ */ React244.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "No evaluation template available.")
26068
+ ), /* @__PURE__ */ React244.createElement(CollapsibleSection, { title: "Evaluation", defaultOpen: true }, /* @__PURE__ */ React244.createElement(Stack173, { gap: "md" }, /* @__PURE__ */ React244.createElement(Divider22, { color: "rgba(255,255,255,0.06)" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Payment (optional custom payouts)"), paymentRows.map((row, index) => /* @__PURE__ */ React244.createElement(Stack173, { key: row.id, gap: 8 }, /* @__PURE__ */ React244.createElement(Group94, { justify: "space-between", align: "center" }, /* @__PURE__ */ React244.createElement(Text149, { size: "sm" }, "Token ", index + 1), paymentRows.length > 1 && /* @__PURE__ */ React244.createElement(Button49, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, "Remove")), /* @__PURE__ */ React244.createElement(
25950
26069
  BaseSelect,
25951
26070
  {
25952
26071
  value: row.denom,
@@ -25989,7 +26108,7 @@ var EvaluateClaimFlowDetail = ({
25989
26108
  ],
25990
26109
  disabled: isDisabled || submitting || isClaimAlreadyEvaluated
25991
26110
  }
25992
- ), error && /* @__PURE__ */ React244.createElement(Alert47, { color: "red", styles: actionAlertStyles }, error));
26111
+ ), error && /* @__PURE__ */ React244.createElement(Alert47, { color: "red", styles: actionAlertStyles }, error), /* @__PURE__ */ React244.createElement(MediaPreviewModal, { file: surveyActiveFile, onClose: () => setSurveyActiveFile(null) }));
25993
26112
  }
25994
26113
  const filterTabs = [
25995
26114
  { value: "all", label: "All" },
@@ -25997,7 +26116,7 @@ var EvaluateClaimFlowDetail = ({
25997
26116
  { value: "approved", label: "Approved" },
25998
26117
  { value: "rejected", label: "Rejected" }
25999
26118
  ];
26000
- return /* @__PURE__ */ React244.createElement(Stack173, { gap: "md" }, !deedDid || !collectionId ? /* @__PURE__ */ React244.createElement(Alert47, { color: "yellow", styles: actionAlertStyles }, "Configure DID and claim collection in template mode before running this action.") : /* @__PURE__ */ React244.createElement(React244.Fragment, null, /* @__PURE__ */ React244.createElement(Group93, { justify: "space-between", align: "center" }, /* @__PURE__ */ React244.createElement(Group93, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React244.createElement(
26119
+ return /* @__PURE__ */ React244.createElement(Stack173, { gap: "md" }, !deedDid || !collectionId ? /* @__PURE__ */ React244.createElement(Alert47, { color: "yellow", styles: actionAlertStyles }, "Configure DID and claim collection in template mode before running this action.") : /* @__PURE__ */ React244.createElement(React244.Fragment, null, /* @__PURE__ */ React244.createElement(Group94, { justify: "space-between", align: "center" }, /* @__PURE__ */ React244.createElement(Group94, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React244.createElement(
26001
26120
  UnstyledButton6,
26002
26121
  {
26003
26122
  key: tab.value,
@@ -26011,12 +26130,12 @@ var EvaluateClaimFlowDetail = ({
26011
26130
  }
26012
26131
  },
26013
26132
  /* @__PURE__ */ React244.createElement(Text149, { size: "sm", fw: 500, c: activeFilter === tab.value ? "white" : "dimmed" }, tab.label)
26014
- ))), /* @__PURE__ */ React244.createElement(ActionIcon34, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React244.createElement(IconFilter2, { size: 16 }))), loadingClaims && /* @__PURE__ */ React244.createElement(Group93, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Loading claims...")), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React244.createElement(Text149, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? "No claims available for this collection." : `No ${activeFilter} claims found.`), filteredClaims.length > 0 && /* @__PURE__ */ React244.createElement(Stack173, { gap: 12 }, filteredClaims.map((claim) => {
26133
+ ))), /* @__PURE__ */ React244.createElement(ActionIcon34, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React244.createElement(IconFilter2, { size: 16 }))), loadingClaims && /* @__PURE__ */ React244.createElement(Group94, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React244.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, "Loading claims...")), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React244.createElement(Text149, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? "No claims available for this collection." : `No ${activeFilter} claims found.`), filteredClaims.length > 0 && /* @__PURE__ */ React244.createElement(Stack173, { gap: 12 }, filteredClaims.map((claim) => {
26015
26134
  const status = getClaimStatusInfo(claim);
26016
26135
  const profile = profilesByDid[claim.agentDid];
26017
26136
  const displayName = profile?.displayname || claim.agentDid || claim.agentAddress;
26018
26137
  const avatarLabel = (profile?.displayname || claim.agentDid || claim.agentAddress || "?")[0]?.toUpperCase();
26019
- return /* @__PURE__ */ React244.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React244.createElement(Group93, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(
26138
+ return /* @__PURE__ */ React244.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React244.createElement(Group94, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(
26020
26139
  Box56,
26021
26140
  {
26022
26141
  style: {
@@ -26038,7 +26157,7 @@ var EvaluateClaimFlowDetail = ({
26038
26157
  },
26039
26158
  profile?.avatarUrl ? null : avatarLabel
26040
26159
  ), /* @__PURE__ */ React244.createElement(Stack173, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(claim.agentAddress)))), /* @__PURE__ */ React244.createElement(Stack173, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React244.createElement(Text149, { fw: 500, size: "md", c: status.color, style: { lineHeight: 1.5 } }, status.key === "approved" && /* @__PURE__ */ React244.createElement(IconCheck18, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React244.createElement(Text149, { size: "xs", c: "dimmed" }, getTimeAgo3(claim.submissionDate || ""))));
26041
- }))), error && /* @__PURE__ */ React244.createElement(Alert47, { color: "red", styles: actionAlertStyles }, error));
26160
+ }))), error && /* @__PURE__ */ React244.createElement(Alert47, { color: "red", styles: actionAlertStyles }, error), /* @__PURE__ */ React244.createElement(MediaPreviewModal, { file: surveyActiveFile, onClose: () => setSurveyActiveFile(null) }));
26042
26161
  };
26043
26162
 
26044
26163
  // src/mantine/blocks/action/actionTypes/evaluateClaim/index.ts
@@ -26195,7 +26314,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
26195
26314
 
26196
26315
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
26197
26316
  import React246, { useCallback as useCallback88, useEffect as useEffect91, useMemo as useMemo94, useState as useState112 } from "react";
26198
- import { Alert as Alert48, Badge as Badge41, Button as Button50, Card as Card23, Group as Group94, Loader as Loader47, Stack as Stack175, Text as Text151 } from "@mantine/core";
26317
+ import { Alert as Alert48, Badge as Badge41, Button as Button50, Card as Card23, Group as Group95, Loader as Loader47, Stack as Stack175, Text as Text151 } from "@mantine/core";
26199
26318
  import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay5 } from "@tabler/icons-react";
26200
26319
  var CHAIN_STATUSES2 = ["open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
26201
26320
  var isChainStatus2 = (value) => CHAIN_STATUSES2.includes(value);
@@ -26433,7 +26552,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
26433
26552
  border: `1px solid ${statusColor2[currentStatus] || "#333"}`
26434
26553
  }
26435
26554
  },
26436
- /* @__PURE__ */ React246.createElement(Stack175, { gap: "xs" }, /* @__PURE__ */ React246.createElement(Group94, { justify: "space-between" }, /* @__PURE__ */ React246.createElement(Text151, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, "Proposal #", proposalId), /* @__PURE__ */ React246.createElement(Badge41, { color: statusColor2[currentStatus], variant: "filled", size: "sm", radius: "sm" }, currentStatus.replace(/_/g, " ").toUpperCase())), proposalTitle && /* @__PURE__ */ React246.createElement(Text151, { size: "sm", style: { color: "#adb5bd" } }, proposalTitle))
26555
+ /* @__PURE__ */ React246.createElement(Stack175, { gap: "xs" }, /* @__PURE__ */ React246.createElement(Group95, { justify: "space-between" }, /* @__PURE__ */ React246.createElement(Text151, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, "Proposal #", proposalId), /* @__PURE__ */ React246.createElement(Badge41, { color: statusColor2[currentStatus], variant: "filled", size: "sm", radius: "sm" }, currentStatus.replace(/_/g, " ").toUpperCase())), proposalTitle && /* @__PURE__ */ React246.createElement(Text151, { size: "sm", style: { color: "#adb5bd" } }, proposalTitle))
26437
26556
  ), isProposalCreated && /* @__PURE__ */ React246.createElement(Card23, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React246.createElement(Text151, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React246.createElement(Text151, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), currentStatus === "passed" && /* @__PURE__ */ React246.createElement(
26438
26557
  Button50,
26439
26558
  {
@@ -26456,7 +26575,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
26456
26575
  loading: isCreating
26457
26576
  },
26458
26577
  "Create Proposal"
26459
- )), isFetching && /* @__PURE__ */ React246.createElement(Group94, { gap: "xs" }, /* @__PURE__ */ React246.createElement(Loader47, { size: "xs" }), /* @__PURE__ */ React246.createElement(Text151, { size: "xs", c: "dimmed" }, "Fetching proposal status...")), error && /* @__PURE__ */ React246.createElement(Alert48, { color: "red", styles: actionAlertStyles }, error), fetchError && /* @__PURE__ */ React246.createElement(Alert48, { color: "red", styles: actionAlertStyles }, typeof fetchError === "string" ? fetchError : "Failed to fetch proposal data"), runtime.error?.message && /* @__PURE__ */ React246.createElement(Alert48, { color: "red", styles: actionAlertStyles }, runtime.error.message));
26578
+ )), isFetching && /* @__PURE__ */ React246.createElement(Group95, { gap: "xs" }, /* @__PURE__ */ React246.createElement(Loader47, { size: "xs" }), /* @__PURE__ */ React246.createElement(Text151, { size: "xs", c: "dimmed" }, "Fetching proposal status...")), error && /* @__PURE__ */ React246.createElement(Alert48, { color: "red", styles: actionAlertStyles }, error), fetchError && /* @__PURE__ */ React246.createElement(Alert48, { color: "red", styles: actionAlertStyles }, typeof fetchError === "string" ? fetchError : "Failed to fetch proposal data"), runtime.error?.message && /* @__PURE__ */ React246.createElement(Alert48, { color: "red", styles: actionAlertStyles }, runtime.error.message));
26460
26579
  };
26461
26580
 
26462
26581
  // src/mantine/blocks/action/actionTypes/proposalCreate/index.ts
@@ -26605,7 +26724,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
26605
26724
 
26606
26725
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
26607
26726
  import React248, { useCallback as useCallback90, useEffect as useEffect93, useMemo as useMemo95, useState as useState114 } from "react";
26608
- import { Alert as Alert49, Box as Box57, Button as Button51, Card as Card24, Group as Group95, Progress as Progress4, Stack as Stack177, Text as Text153, Tooltip as Tooltip19 } from "@mantine/core";
26727
+ import { Alert as Alert49, Box as Box57, Button as Button51, Card as Card24, Group as Group96, Progress as Progress4, Stack as Stack177, Text as Text153, Tooltip as Tooltip19 } from "@mantine/core";
26609
26728
  var getVoteIcon2 = (voteType) => {
26610
26729
  switch (voteType) {
26611
26730
  case "yes":
@@ -26806,7 +26925,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
26806
26925
  color: "#f1f3f5"
26807
26926
  }
26808
26927
  },
26809
- /* @__PURE__ */ React248.createElement(Group95, { gap: "xs", align: "center" }, /* @__PURE__ */ React248.createElement(
26928
+ /* @__PURE__ */ React248.createElement(Group96, { gap: "xs", align: "center" }, /* @__PURE__ */ React248.createElement(
26810
26929
  Box57,
26811
26930
  {
26812
26931
  style: {
@@ -26830,7 +26949,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
26830
26949
  opacity: !hasSubmittedProposal ? 0.6 : 1
26831
26950
  }
26832
26951
  },
26833
- /* @__PURE__ */ React248.createElement(Stack177, { gap: "xs" }, /* @__PURE__ */ React248.createElement(Group95, { justify: "space-between" }, /* @__PURE__ */ React248.createElement(Group95, { gap: "xs" }, /* @__PURE__ */ React248.createElement(
26952
+ /* @__PURE__ */ React248.createElement(Stack177, { gap: "xs" }, /* @__PURE__ */ React248.createElement(Group96, { justify: "space-between" }, /* @__PURE__ */ React248.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React248.createElement(
26834
26953
  Box57,
26835
26954
  {
26836
26955
  w: 8,
@@ -26840,7 +26959,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
26840
26959
  borderRadius: "50%"
26841
26960
  }
26842
26961
  }
26843
- ), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React248.createElement(Group95, { justify: "space-between" }, /* @__PURE__ */ React248.createElement(Group95, { gap: "xs" }, /* @__PURE__ */ React248.createElement(Box57, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
26962
+ ), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React248.createElement(Group96, { justify: "space-between" }, /* @__PURE__ */ React248.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React248.createElement(Box57, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React248.createElement(Text153, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
26844
26963
  /* @__PURE__ */ React248.createElement(Stack177, { gap: "xs", mt: "md" }, /* @__PURE__ */ React248.createElement(Text153, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React248.createElement(Progress4, { value: hasSubmittedProposal ? 75 : 0, size: "md" }))
26845
26964
  ), hasSubmittedProposal && !hasVoted && /* @__PURE__ */ React248.createElement(Stack177, { gap: "lg" }, /* @__PURE__ */ React248.createElement(Stack177, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React248.createElement(Tooltip19, { key: voteType, label: isDisabled ? "Action is disabled" : void 0, disabled: !isDisabled, position: "top" }, /* @__PURE__ */ React248.createElement(
26846
26965
  Button51,
@@ -26918,7 +27037,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
26918
27037
  color: "#f1f3f5"
26919
27038
  }
26920
27039
  },
26921
- /* @__PURE__ */ React248.createElement(Stack177, { gap: "xs" }, /* @__PURE__ */ React248.createElement(Group95, { gap: "xs", align: "center" }, /* @__PURE__ */ React248.createElement(
27040
+ /* @__PURE__ */ React248.createElement(Stack177, { gap: "xs" }, /* @__PURE__ */ React248.createElement(Group96, { gap: "xs", align: "center" }, /* @__PURE__ */ React248.createElement(
26922
27041
  Box57,
26923
27042
  {
26924
27043
  style: {
@@ -26985,7 +27104,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
26985
27104
 
26986
27105
  // src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
26987
27106
  import React250, { useCallback as useCallback91, useEffect as useEffect94, useMemo as useMemo97, useState as useState116 } from "react";
26988
- import { Box as Box59, Group as Group96, Loader as Loader49, Stack as Stack179, Text as Text155 } from "@mantine/core";
27107
+ import { Box as Box59, Group as Group97, Loader as Loader49, Stack as Stack179, Text as Text155 } from "@mantine/core";
26989
27108
  function parseInputs2(json) {
26990
27109
  try {
26991
27110
  const parsed = typeof json === "string" ? JSON.parse(json) : json;
@@ -27084,7 +27203,7 @@ var ProtocolSelectFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisab
27084
27203
  transition: "all 0.15s ease"
27085
27204
  }
27086
27205
  },
27087
- /* @__PURE__ */ React250.createElement(Group96, { wrap: "nowrap", gap: "md", align: "center" }, protocol.loading ? /* @__PURE__ */ React250.createElement(Loader49, { size: "xs", color: "white" }) : /* @__PURE__ */ React250.createElement(EntityAvatar_default, { size: 24 }), /* @__PURE__ */ React250.createElement(Stack179, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React250.createElement(Text155, { fw: 500, size: "sm", lineClamp: 1 }, protocol.loading ? "Loading..." : protocol.type), /* @__PURE__ */ React250.createElement(Text155, { size: "xs", c: "dimmed", lineClamp: 2 }, protocol.loading ? "Fetching protocol info..." : protocol.description || protocol.did)))
27206
+ /* @__PURE__ */ React250.createElement(Group97, { wrap: "nowrap", gap: "md", align: "center" }, protocol.loading ? /* @__PURE__ */ React250.createElement(Loader49, { size: "xs", color: "white" }) : /* @__PURE__ */ React250.createElement(EntityAvatar_default, { size: 24 }), /* @__PURE__ */ React250.createElement(Stack179, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React250.createElement(Text155, { fw: 500, size: "sm", lineClamp: 1 }, protocol.loading ? "Loading..." : protocol.type), /* @__PURE__ */ React250.createElement(Text155, { size: "xs", c: "dimmed", lineClamp: 2 }, protocol.loading ? "Fetching protocol info..." : protocol.description || protocol.did)))
27088
27207
  );
27089
27208
  }));
27090
27209
  };
@@ -27169,7 +27288,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
27169
27288
 
27170
27289
  // src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
27171
27290
  import React252, { useCallback as useCallback93, useMemo as useMemo98, useState as useState118 } from "react";
27172
- import { Alert as Alert50, Button as Button52, Group as Group97, Loader as Loader50, Stack as Stack181, Text as Text157 } from "@mantine/core";
27291
+ import { Alert as Alert50, Button as Button52, Group as Group98, Loader as Loader50, Stack as Stack181, Text as Text157 } from "@mantine/core";
27173
27292
  import { IconCheck as IconCheck19, IconAlertCircle as IconAlertCircle17, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
27174
27293
  var STEP_LABELS = {
27175
27294
  signing: "Signing credential...",
@@ -27344,11 +27463,11 @@ var DomainSignFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
27344
27463
  handlers.redirectToEntityOverview(entityDid, resolvedEntityType);
27345
27464
  }
27346
27465
  }, [entityDid, resolvedEntityType, handlers]);
27347
- return /* @__PURE__ */ React252.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React252.createElement(Stack181, { gap: 2 }, /* @__PURE__ */ React252.createElement(Text157, { fw: 600 }, block?.props?.title || "Sign Domain Card"), /* @__PURE__ */ React252.createElement(Text157, { size: "sm", c: "dimmed" }, block?.props?.description || "Sign the domain card credential and create a domain entity on-chain.")), !domainCardData ? /* @__PURE__ */ React252.createElement(Alert50, { color: "yellow", styles: actionAlertStyles }, "No domain card data available. The domain card viewer block must push data to this action before it can run.") : /* @__PURE__ */ React252.createElement(React252.Fragment, null, /* @__PURE__ */ React252.createElement(Stack181, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React252.createElement(Text157, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React252.createElement(Group97, { gap: "xs" }, /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs" }, domainName || "Not set")), /* @__PURE__ */ React252.createElement(Group97, { gap: "xs" }, /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs" }, resolvedEntityType)), domainDescription && /* @__PURE__ */ React252.createElement(Group97, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainDescription))), flowStep === "running" && /* @__PURE__ */ React252.createElement(Stack181, { gap: "xs" }, ["signing", "uploading", "creating"].map((step) => {
27466
+ return /* @__PURE__ */ React252.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React252.createElement(Stack181, { gap: 2 }, /* @__PURE__ */ React252.createElement(Text157, { fw: 600 }, block?.props?.title || "Sign Domain Card"), /* @__PURE__ */ React252.createElement(Text157, { size: "sm", c: "dimmed" }, block?.props?.description || "Sign the domain card credential and create a domain entity on-chain.")), !domainCardData ? /* @__PURE__ */ React252.createElement(Alert50, { color: "yellow", styles: actionAlertStyles }, "No domain card data available. The domain card viewer block must push data to this action before it can run.") : /* @__PURE__ */ React252.createElement(React252.Fragment, null, /* @__PURE__ */ React252.createElement(Stack181, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React252.createElement(Text157, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React252.createElement(Group98, { gap: "xs" }, /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs" }, domainName || "Not set")), /* @__PURE__ */ React252.createElement(Group98, { gap: "xs" }, /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs" }, resolvedEntityType)), domainDescription && /* @__PURE__ */ React252.createElement(Group98, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainDescription))), flowStep === "running" && /* @__PURE__ */ React252.createElement(Stack181, { gap: "xs" }, ["signing", "uploading", "creating"].map((step) => {
27348
27467
  const isActive = activeStep === step;
27349
27468
  const isDone = ["signing", "uploading", "creating"].indexOf(step) < ["signing", "uploading", "creating"].indexOf(activeStep);
27350
- return /* @__PURE__ */ React252.createElement(Group97, { key: step, gap: "xs" }, isDone ? /* @__PURE__ */ React252.createElement(IconCheck19, { size: 14, color: "var(--mantine-color-green-5)" }) : isActive ? /* @__PURE__ */ React252.createElement(Loader50, { size: 14 }) : /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 14 } }, "\u2013"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: isActive ? void 0 : "dimmed" }, STEP_LABELS[step]));
27351
- })), isCompleted && /* @__PURE__ */ React252.createElement(Alert50, { icon: /* @__PURE__ */ React252.createElement(IconCheck19, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React252.createElement(Stack181, { gap: "xs" }, /* @__PURE__ */ React252.createElement(Text157, { size: "sm" }, "The domain card has been signed and the entity has been created on-chain."), entityDid && /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Entity DID: ", entityDid))), isCompleted && entityDid && handlers?.redirectToEntityOverview && /* @__PURE__ */ React252.createElement(Button52, { variant: "outline", leftSection: /* @__PURE__ */ React252.createElement(IconExternalLink2, { size: 14 }), onClick: handleVisitEntity }, "Visit Entity"), !isCompleted && /* @__PURE__ */ React252.createElement(Button52, { fullWidth: true, onClick: handleSign, disabled: isDisabled || flowStep === "running", loading: flowStep === "running" }, flowStep === "running" ? "Processing..." : "Sign & Create Domain"), flowStep === "error" && /* @__PURE__ */ React252.createElement(Group97, null, /* @__PURE__ */ React252.createElement(Button52, { variant: "outline", onClick: handleRetry }, "Try Again"))), error && /* @__PURE__ */ React252.createElement(Alert50, { icon: /* @__PURE__ */ React252.createElement(IconAlertCircle17, { size: 16 }), color: "red", styles: actionAlertStyles }, error), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React252.createElement(Alert50, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27469
+ return /* @__PURE__ */ React252.createElement(Group98, { key: step, gap: "xs" }, isDone ? /* @__PURE__ */ React252.createElement(IconCheck19, { size: 14, color: "var(--mantine-color-green-5)" }) : isActive ? /* @__PURE__ */ React252.createElement(Loader50, { size: 14 }) : /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { width: 14 } }, "\u2013"), /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: isActive ? void 0 : "dimmed" }, STEP_LABELS[step]));
27470
+ })), isCompleted && /* @__PURE__ */ React252.createElement(Alert50, { icon: /* @__PURE__ */ React252.createElement(IconCheck19, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React252.createElement(Stack181, { gap: "xs" }, /* @__PURE__ */ React252.createElement(Text157, { size: "sm" }, "The domain card has been signed and the entity has been created on-chain."), entityDid && /* @__PURE__ */ React252.createElement(Text157, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Entity DID: ", entityDid))), isCompleted && entityDid && handlers?.redirectToEntityOverview && /* @__PURE__ */ React252.createElement(Button52, { variant: "outline", leftSection: /* @__PURE__ */ React252.createElement(IconExternalLink2, { size: 14 }), onClick: handleVisitEntity }, "Visit Entity"), !isCompleted && /* @__PURE__ */ React252.createElement(Button52, { fullWidth: true, onClick: handleSign, disabled: isDisabled || flowStep === "running", loading: flowStep === "running" }, flowStep === "running" ? "Processing..." : "Sign & Create Domain"), flowStep === "error" && /* @__PURE__ */ React252.createElement(Group98, null, /* @__PURE__ */ React252.createElement(Button52, { variant: "outline", onClick: handleRetry }, "Try Again"))), error && /* @__PURE__ */ React252.createElement(Alert50, { icon: /* @__PURE__ */ React252.createElement(IconAlertCircle17, { size: 16 }), color: "red", styles: actionAlertStyles }, error), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React252.createElement(Alert50, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27352
27471
  };
27353
27472
 
27354
27473
  // src/mantine/blocks/action/actionTypes/domainSign/index.ts
@@ -27421,7 +27540,7 @@ var DomainCardBuildConfig = ({ inputs, onInputsChange }) => {
27421
27540
 
27422
27541
  // src/mantine/blocks/action/actionTypes/domainCardBuild/DomainCardBuildFlowDetail.tsx
27423
27542
  import React254, { useCallback as useCallback95, useEffect as useEffect97, useMemo as useMemo99, useState as useState120 } from "react";
27424
- import { Alert as Alert51, Button as Button53, Group as Group98, Loader as Loader51, Stack as Stack183, Text as Text159 } from "@mantine/core";
27543
+ import { Alert as Alert51, Button as Button53, Group as Group99, Loader as Loader51, Stack as Stack183, Text as Text159 } from "@mantine/core";
27425
27544
  import { IconCheck as IconCheck20, IconAlertCircle as IconAlertCircle18, IconPlayerPlay as IconPlayerPlay6, IconEdit } from "@tabler/icons-react";
27426
27545
  import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
27427
27546
  var DomainCardBuildFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
@@ -27563,7 +27682,7 @@ var DomainCardBuildFlowDetail = ({ inputs, editor, block, runtime, updateRuntime
27563
27682
  setError(null);
27564
27683
  }, [surveyModel]);
27565
27684
  const cardName = runtime.output?.domainCardData?.credentialSubject?.name;
27566
- return /* @__PURE__ */ React254.createElement(Stack183, { gap: "md" }, /* @__PURE__ */ React254.createElement(Stack183, { gap: 2 }, /* @__PURE__ */ React254.createElement(Text159, { fw: 600 }, block?.props?.title || "Build Domain Card"), /* @__PURE__ */ React254.createElement(Text159, { size: "sm", c: "dimmed" }, block?.props?.description || "Answer the survey to build an unsigned Domain Card credential for review and signing.")), flowStep === "success" && /* @__PURE__ */ React254.createElement(Stack183, { gap: "md" }, /* @__PURE__ */ React254.createElement(Alert51, { icon: /* @__PURE__ */ React254.createElement(IconCheck20, { size: 16 }), title: "Domain Card Built", color: "green", styles: actionAlertStyles }, /* @__PURE__ */ React254.createElement(Stack183, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Text159, { size: "sm" }, cardName ? `"${cardName}" is ready to preview.` : "Domain card built and ready to preview."), /* @__PURE__ */ React254.createElement(Text159, { size: "xs", c: "dimmed" }, "No credential has been signed yet. The card data will flow into the next preview and signing steps."))), /* @__PURE__ */ React254.createElement(Button53, { variant: "outline", leftSection: /* @__PURE__ */ React254.createElement(IconEdit, { size: 14 }), onClick: handleStartSurvey, disabled: isDisabled }, "Edit Card")), flowStep === "error" && /* @__PURE__ */ React254.createElement(Stack183, { gap: "md" }, /* @__PURE__ */ React254.createElement(Alert51, { icon: /* @__PURE__ */ React254.createElement(IconAlertCircle18, { size: 16 }), title: "Domain Card Build Failed", color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React254.createElement(Text159, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React254.createElement(Group98, null, /* @__PURE__ */ React254.createElement(Button53, { variant: "outline", onClick: handleRetry, disabled: isDisabled }, "Try Again"))), flowStep === "submitting" && /* @__PURE__ */ React254.createElement(Stack183, { gap: "sm", align: "center", py: "md" }, /* @__PURE__ */ React254.createElement(Loader51, { size: "md" }), /* @__PURE__ */ React254.createElement(Text159, { size: "sm", c: "dimmed" }, "Building domain card...")), flowStep === "idle" && /* @__PURE__ */ React254.createElement(Button53, { leftSection: /* @__PURE__ */ React254.createElement(IconPlayerPlay6, { size: 14 }), onClick: handleStartSurvey, disabled: isDisabled }, "Start Domain Card Survey"), flowStep === "survey" && !error && /* @__PURE__ */ React254.createElement(StableSurvey, { model: surveyModel }), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React254.createElement(Alert51, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27685
+ return /* @__PURE__ */ React254.createElement(Stack183, { gap: "md" }, /* @__PURE__ */ React254.createElement(Stack183, { gap: 2 }, /* @__PURE__ */ React254.createElement(Text159, { fw: 600 }, block?.props?.title || "Build Domain Card"), /* @__PURE__ */ React254.createElement(Text159, { size: "sm", c: "dimmed" }, block?.props?.description || "Answer the survey to build an unsigned Domain Card credential for review and signing.")), flowStep === "success" && /* @__PURE__ */ React254.createElement(Stack183, { gap: "md" }, /* @__PURE__ */ React254.createElement(Alert51, { icon: /* @__PURE__ */ React254.createElement(IconCheck20, { size: 16 }), title: "Domain Card Built", color: "green", styles: actionAlertStyles }, /* @__PURE__ */ React254.createElement(Stack183, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Text159, { size: "sm" }, cardName ? `"${cardName}" is ready to preview.` : "Domain card built and ready to preview."), /* @__PURE__ */ React254.createElement(Text159, { size: "xs", c: "dimmed" }, "No credential has been signed yet. The card data will flow into the next preview and signing steps."))), /* @__PURE__ */ React254.createElement(Button53, { variant: "outline", leftSection: /* @__PURE__ */ React254.createElement(IconEdit, { size: 14 }), onClick: handleStartSurvey, disabled: isDisabled }, "Edit Card")), flowStep === "error" && /* @__PURE__ */ React254.createElement(Stack183, { gap: "md" }, /* @__PURE__ */ React254.createElement(Alert51, { icon: /* @__PURE__ */ React254.createElement(IconAlertCircle18, { size: 16 }), title: "Domain Card Build Failed", color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React254.createElement(Text159, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React254.createElement(Group99, null, /* @__PURE__ */ React254.createElement(Button53, { variant: "outline", onClick: handleRetry, disabled: isDisabled }, "Try Again"))), flowStep === "submitting" && /* @__PURE__ */ React254.createElement(Stack183, { gap: "sm", align: "center", py: "md" }, /* @__PURE__ */ React254.createElement(Loader51, { size: "md" }), /* @__PURE__ */ React254.createElement(Text159, { size: "sm", c: "dimmed" }, "Building domain card...")), flowStep === "idle" && /* @__PURE__ */ React254.createElement(Button53, { leftSection: /* @__PURE__ */ React254.createElement(IconPlayerPlay6, { size: 14 }), onClick: handleStartSurvey, disabled: isDisabled }, "Start Domain Card Survey"), flowStep === "survey" && !error && /* @__PURE__ */ React254.createElement(StableSurvey, { model: surveyModel }), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React254.createElement(Alert51, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27567
27686
  };
27568
27687
 
27569
27688
  // src/mantine/blocks/action/actionTypes/domainCardBuild/index.ts
@@ -27620,7 +27739,7 @@ var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
27620
27739
 
27621
27740
  // src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewFlowDetail.tsx
27622
27741
  import React256, { useCallback as useCallback97, useMemo as useMemo100 } from "react";
27623
- import { Alert as Alert52, Badge as Badge42, Box as Box60, Button as Button54, Code as Code9, Group as Group99, Loader as Loader52, ScrollArea as ScrollArea8, Stack as Stack185, Text as Text161 } from "@mantine/core";
27742
+ import { Alert as Alert52, Badge as Badge42, Box as Box60, Button as Button54, Code as Code9, Group as Group100, Loader as Loader52, ScrollArea as ScrollArea8, Stack as Stack185, Text as Text161 } from "@mantine/core";
27624
27743
  import { IconAlertCircle as IconAlertCircle19, IconCheck as IconCheck21, IconSparkles as IconSparkles5 } from "@tabler/icons-react";
27625
27744
  var JsonViewer = ({ data }) => /* @__PURE__ */ React256.createElement(ScrollArea8.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React256.createElement(Stack185, { gap: "md" }, data.name && /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React256.createElement(Text161, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React256.createElement(Stack185, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React256.createElement(Box60, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React256.createElement(Box60, null, /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React256.createElement(Code9, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
27626
27745
  var STATUS_BADGE = {
@@ -27674,7 +27793,7 @@ var DomainCardPreviewFlowDetail = ({ inputs, editor, block, runtime, updateRunti
27674
27793
  }
27675
27794
  });
27676
27795
  }, [isDisabled, domainCardData, domainPreviewData, runtime.output, updateRuntime]);
27677
- return /* @__PURE__ */ React256.createElement(Stack185, { gap: "md" }, /* @__PURE__ */ React256.createElement(Stack185, { gap: 2 }, /* @__PURE__ */ React256.createElement(Group99, { gap: "xs", align: "center" }, /* @__PURE__ */ React256.createElement(Text161, { fw: 600 }, block?.props?.title || "Preview Domain Card"), /* @__PURE__ */ React256.createElement(Badge42, { size: "xs", variant: "filled", color: badge.color }, badge.text)), /* @__PURE__ */ React256.createElement(Text161, { size: "sm", c: "dimmed" }, block?.props?.description || "Review the oracle-enriched domain card before signing.")), status === "loading" && /* @__PURE__ */ React256.createElement(Stack185, { align: "center", py: "lg", gap: "md" }, /* @__PURE__ */ React256.createElement(Loader52, { size: "lg", color: "blue" }), /* @__PURE__ */ React256.createElement(Stack185, { align: "center", gap: "xs" }, /* @__PURE__ */ React256.createElement(IconSparkles5, { size: 22, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React256.createElement(Text161, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), status === "error" && /* @__PURE__ */ React256.createElement(Alert52, { icon: /* @__PURE__ */ React256.createElement(IconAlertCircle19, { size: 16 }), title: "Preview error", color: "red", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Stack185, { gap: "xs" }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, errorMessage), /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed" }, "Ask the oracle agent to regenerate, or rebuild the card upstream."))), (status === "ready" || status === "approved") && hasPreview && domainPreviewData && /* @__PURE__ */ React256.createElement(Box60, { p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, domainCardRenderer ? domainCardRenderer(domainPreviewData) : /* @__PURE__ */ React256.createElement(JsonViewer, { data: domainPreviewData })), (status === "ready" || status === "approved") && !hasPreview && domainCardData && /* @__PURE__ */ React256.createElement(Alert52, { color: "yellow", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, "No human-facing preview was published by the oracle. You can still approve the underlying card, but consider asking the oracle agent to publish", " ", /* @__PURE__ */ React256.createElement("code", null, "domainPreviewData"), ".")), status === "pending" && /* @__PURE__ */ React256.createElement(Alert52, { color: "gray", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, "Waiting for the oracle agent to generate a preview. Run the companion skill upstream to populate this node's runtime output.")), status === "ready" && domainCardData && /* @__PURE__ */ React256.createElement(Button54, { color: "teal", leftSection: /* @__PURE__ */ React256.createElement(IconCheck21, { size: 16 }), onClick: handleApprove, disabled: isDisabled, fullWidth: true }, "Approve Domain Card"), status === "approved" && /* @__PURE__ */ React256.createElement(Alert52, { icon: /* @__PURE__ */ React256.createElement(IconCheck21, { size: 16 }), color: "green", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, "Domain card approved. Ready to sign and create the domain.")), runtime.error?.message && /* @__PURE__ */ React256.createElement(Alert52, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27796
+ return /* @__PURE__ */ React256.createElement(Stack185, { gap: "md" }, /* @__PURE__ */ React256.createElement(Stack185, { gap: 2 }, /* @__PURE__ */ React256.createElement(Group100, { gap: "xs", align: "center" }, /* @__PURE__ */ React256.createElement(Text161, { fw: 600 }, block?.props?.title || "Preview Domain Card"), /* @__PURE__ */ React256.createElement(Badge42, { size: "xs", variant: "filled", color: badge.color }, badge.text)), /* @__PURE__ */ React256.createElement(Text161, { size: "sm", c: "dimmed" }, block?.props?.description || "Review the oracle-enriched domain card before signing.")), status === "loading" && /* @__PURE__ */ React256.createElement(Stack185, { align: "center", py: "lg", gap: "md" }, /* @__PURE__ */ React256.createElement(Loader52, { size: "lg", color: "blue" }), /* @__PURE__ */ React256.createElement(Stack185, { align: "center", gap: "xs" }, /* @__PURE__ */ React256.createElement(IconSparkles5, { size: 22, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React256.createElement(Text161, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), status === "error" && /* @__PURE__ */ React256.createElement(Alert52, { icon: /* @__PURE__ */ React256.createElement(IconAlertCircle19, { size: 16 }), title: "Preview error", color: "red", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Stack185, { gap: "xs" }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, errorMessage), /* @__PURE__ */ React256.createElement(Text161, { size: "xs", c: "dimmed" }, "Ask the oracle agent to regenerate, or rebuild the card upstream."))), (status === "ready" || status === "approved") && hasPreview && domainPreviewData && /* @__PURE__ */ React256.createElement(Box60, { p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, domainCardRenderer ? domainCardRenderer(domainPreviewData) : /* @__PURE__ */ React256.createElement(JsonViewer, { data: domainPreviewData })), (status === "ready" || status === "approved") && !hasPreview && domainCardData && /* @__PURE__ */ React256.createElement(Alert52, { color: "yellow", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, "No human-facing preview was published by the oracle. You can still approve the underlying card, but consider asking the oracle agent to publish", " ", /* @__PURE__ */ React256.createElement("code", null, "domainPreviewData"), ".")), status === "pending" && /* @__PURE__ */ React256.createElement(Alert52, { color: "gray", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, "Waiting for the oracle agent to generate a preview. Run the companion skill upstream to populate this node's runtime output.")), status === "ready" && domainCardData && /* @__PURE__ */ React256.createElement(Button54, { color: "teal", leftSection: /* @__PURE__ */ React256.createElement(IconCheck21, { size: 16 }), onClick: handleApprove, disabled: isDisabled, fullWidth: true }, "Approve Domain Card"), status === "approved" && /* @__PURE__ */ React256.createElement(Alert52, { icon: /* @__PURE__ */ React256.createElement(IconCheck21, { size: 16 }), color: "green", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React256.createElement(Text161, { size: "sm" }, "Domain card approved. Ready to sign and create the domain.")), runtime.error?.message && /* @__PURE__ */ React256.createElement(Alert52, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27678
27797
  };
27679
27798
 
27680
27799
  // src/mantine/blocks/action/actionTypes/domainCardPreview/index.ts
@@ -28508,7 +28627,7 @@ var PaymentConfig = ({ inputs, onInputsChange }) => {
28508
28627
 
28509
28628
  // src/mantine/blocks/action/actionTypes/payment/PaymentFlowDetail.tsx
28510
28629
  import React266, { useCallback as useCallback107, useMemo as useMemo105, useState as useState131 } from "react";
28511
- import { Alert as Alert57, Button as Button57, Code as Code11, Divider as Divider26, Group as Group100, Loader as Loader56, Stack as Stack195, Text as Text168 } from "@mantine/core";
28630
+ import { Alert as Alert57, Button as Button57, Code as Code11, Divider as Divider26, Group as Group101, Loader as Loader56, Stack as Stack195, Text as Text168 } from "@mantine/core";
28512
28631
  import { IconAlertTriangle as IconAlertTriangle6, IconCash as IconCash2, IconSearch as IconSearch8, IconSend as IconSend7 } from "@tabler/icons-react";
28513
28632
  function parsePrimarySkill3(rawSkill) {
28514
28633
  const coerce2 = (candidate) => {
@@ -28784,7 +28903,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
28784
28903
  setSubmitting(false);
28785
28904
  }
28786
28905
  }, [isDisabled, submitting, block, handlers, transactionId]);
28787
- return /* @__PURE__ */ React266.createElement(Stack195, { gap: "md" }, paymentConfig && !isProposed && !isTerminal && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Payment Configuration"), /* @__PURE__ */ React266.createElement(Code11, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, JSON.stringify(paymentConfig, null, 2))), summary && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Divider26, null), /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Payout Proposal"), /* @__PURE__ */ React266.createElement(Stack195, { gap: 4, style: { background: "var(--mantine-color-neutralColor-4)", borderRadius: 8, padding: 12 } }, Object.entries(summary).map(([key, value]) => /* @__PURE__ */ React266.createElement(Group100, { key, justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", c: "dimmed", style: { textTransform: "capitalize" } }, key.replace(/_/g, " ")), /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 500, c: "white", style: { textAlign: "right", wordBreak: "break-all" } }, typeof value === "object" ? JSON.stringify(value) : String(value)))))), paymentStatus && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Divider26, null), /* @__PURE__ */ React266.createElement(Group100, { justify: "space-between" }, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Status"), /* @__PURE__ */ React266.createElement(Text168, { size: "sm", fw: 600, c: getPaymentStatusColor(paymentStatus), style: { textTransform: "capitalize" } }, paymentStatus))), transactionId && /* @__PURE__ */ React266.createElement(Group100, { justify: "space-between" }, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Transaction ID"), /* @__PURE__ */ React266.createElement(Text168, { size: "xs", c: "white", style: { fontFamily: "monospace" } }, transactionId)), !isTerminal && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Divider26, null), isSubmitted ? /* @__PURE__ */ React266.createElement(
28906
+ return /* @__PURE__ */ React266.createElement(Stack195, { gap: "md" }, paymentConfig && !isProposed && !isTerminal && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Payment Configuration"), /* @__PURE__ */ React266.createElement(Code11, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, JSON.stringify(paymentConfig, null, 2))), summary && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Divider26, null), /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Payout Proposal"), /* @__PURE__ */ React266.createElement(Stack195, { gap: 4, style: { background: "var(--mantine-color-neutralColor-4)", borderRadius: 8, padding: 12 } }, Object.entries(summary).map(([key, value]) => /* @__PURE__ */ React266.createElement(Group101, { key, justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", c: "dimmed", style: { textTransform: "capitalize" } }, key.replace(/_/g, " ")), /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 500, c: "white", style: { textAlign: "right", wordBreak: "break-all" } }, typeof value === "object" ? JSON.stringify(value) : String(value)))))), paymentStatus && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Divider26, null), /* @__PURE__ */ React266.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Status"), /* @__PURE__ */ React266.createElement(Text168, { size: "sm", fw: 600, c: getPaymentStatusColor(paymentStatus), style: { textTransform: "capitalize" } }, paymentStatus))), transactionId && /* @__PURE__ */ React266.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React266.createElement(Text168, { size: "xs", fw: 600, c: "dimmed" }, "Transaction ID"), /* @__PURE__ */ React266.createElement(Text168, { size: "xs", c: "white", style: { fontFamily: "monospace" } }, transactionId)), !isTerminal && /* @__PURE__ */ React266.createElement(React266.Fragment, null, /* @__PURE__ */ React266.createElement(Divider26, null), isSubmitted ? /* @__PURE__ */ React266.createElement(
28788
28907
  Button57,
28789
28908
  {
28790
28909
  fullWidth: true,
@@ -29042,7 +29161,7 @@ import React277 from "react";
29042
29161
 
29043
29162
  // src/mantine/blocks/location/template/TemplateView.tsx
29044
29163
  import React274, { useMemo as useMemo107 } from "react";
29045
- import { Group as Group102, Stack as Stack198, Text as Text172 } from "@mantine/core";
29164
+ import { Group as Group103, Stack as Stack198, Text as Text172 } from "@mantine/core";
29046
29165
  import { IconMapPin } from "@tabler/icons-react";
29047
29166
 
29048
29167
  // src/mantine/blocks/location/template/TemplateConfig.tsx
@@ -29113,7 +29232,7 @@ function useUnlMap() {
29113
29232
 
29114
29233
  // src/mantine/blocks/location/components/TileSelector.tsx
29115
29234
  import React270, { useState as useState134, useCallback as useCallback109 } from "react";
29116
- import { ActionIcon as ActionIcon35, Group as Group101, Tooltip as Tooltip20 } from "@mantine/core";
29235
+ import { ActionIcon as ActionIcon35, Group as Group102, Tooltip as Tooltip20 } from "@mantine/core";
29117
29236
  import { IconMap, IconMoon, IconSatellite, IconMountain } from "@tabler/icons-react";
29118
29237
  var TILE_LAYERS = {
29119
29238
  dark: {
@@ -29188,7 +29307,7 @@ var TileSelector = ({ mapRef }) => {
29188
29307
  ...OVERLAY_KEYS.map((key) => ({ type: key, label: TILE_LAYERS[key].label, icon: TILE_LAYERS[key].icon }))
29189
29308
  ];
29190
29309
  return /* @__PURE__ */ React270.createElement(
29191
- Group101,
29310
+ Group102,
29192
29311
  {
29193
29312
  gap: 2,
29194
29313
  style: {
@@ -29472,12 +29591,12 @@ var LocationTemplateView = ({ editor, block }) => {
29472
29591
  const panelContent = useMemo107(() => /* @__PURE__ */ React274.createElement(TemplateConfig14, { editor, block }), [editor, block]);
29473
29592
  const { open } = usePanel(panelId, panelContent);
29474
29593
  const hasLocation = block.props.latitude && block.props.longitude;
29475
- return /* @__PURE__ */ React274.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React274.createElement(Stack198, { gap: "xs", justify: "center" }, /* @__PURE__ */ React274.createElement(Group102, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React274.createElement(IconMapPin, { color: "white", size: 26, stroke: 1.5 }), /* @__PURE__ */ React274.createElement(Stack198, { gap: 2 }, /* @__PURE__ */ React274.createElement(Text172, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React274.createElement(Text172, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation && /* @__PURE__ */ React274.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-template-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true })));
29594
+ return /* @__PURE__ */ React274.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React274.createElement(Stack198, { gap: "xs", justify: "center" }, /* @__PURE__ */ React274.createElement(Group103, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React274.createElement(IconMapPin, { color: "white", size: 26, stroke: 1.5 }), /* @__PURE__ */ React274.createElement(Stack198, { gap: 2 }, /* @__PURE__ */ React274.createElement(Text172, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React274.createElement(Text172, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation && /* @__PURE__ */ React274.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-template-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true })));
29476
29595
  };
29477
29596
 
29478
29597
  // src/mantine/blocks/location/flow/FlowView.tsx
29479
29598
  import React276, { useMemo as useMemo108 } from "react";
29480
- import { Center as Center14, Group as Group103, Stack as Stack199, Text as Text173 } from "@mantine/core";
29599
+ import { Center as Center14, Group as Group104, Stack as Stack199, Text as Text173 } from "@mantine/core";
29481
29600
  import { IconMapPin as IconMapPin2 } from "@tabler/icons-react";
29482
29601
 
29483
29602
  // src/mantine/blocks/location/flow/FlowConfig.tsx
@@ -29495,7 +29614,7 @@ var LocationFlowView = ({ editor, block }) => {
29495
29614
  const panelContent = useMemo108(() => /* @__PURE__ */ React276.createElement(FlowConfig3, { editor, block }), [editor, block]);
29496
29615
  const { open } = usePanel(panelId, panelContent);
29497
29616
  const hasLocation = block.props.latitude && block.props.longitude;
29498
- return /* @__PURE__ */ React276.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React276.createElement(Stack199, { gap: "xs", justify: "center" }, /* @__PURE__ */ React276.createElement(Group103, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React276.createElement(IconMapPin2, { color: "white", size: 26, stroke: 1.5 }), /* @__PURE__ */ React276.createElement(Stack199, { gap: 2 }, /* @__PURE__ */ React276.createElement(Text173, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React276.createElement(Text173, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation ? /* @__PURE__ */ React276.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-flow-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true }) : /* @__PURE__ */ React276.createElement(Center14, { py: "md" }, /* @__PURE__ */ React276.createElement(Text173, { size: "sm", c: "dimmed" }, "Location not configured"))));
29617
+ return /* @__PURE__ */ React276.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React276.createElement(Stack199, { gap: "xs", justify: "center" }, /* @__PURE__ */ React276.createElement(Group104, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React276.createElement(IconMapPin2, { color: "white", size: 26, stroke: 1.5 }), /* @__PURE__ */ React276.createElement(Stack199, { gap: 2 }, /* @__PURE__ */ React276.createElement(Text173, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React276.createElement(Text173, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation ? /* @__PURE__ */ React276.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-flow-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true }) : /* @__PURE__ */ React276.createElement(Center14, { py: "md" }, /* @__PURE__ */ React276.createElement(Text173, { size: "sm", c: "dimmed" }, "Location not configured"))));
29499
29618
  };
29500
29619
 
29501
29620
  // src/mantine/blocks/location/LocationBlock.tsx
@@ -29537,7 +29656,7 @@ import React284 from "react";
29537
29656
 
29538
29657
  // src/mantine/blocks/embed/template/TemplateView.tsx
29539
29658
  import React281, { useMemo as useMemo109 } from "react";
29540
- import { Box as Box63, Group as Group104, Stack as Stack201, Text as Text175 } from "@mantine/core";
29659
+ import { Box as Box63, Group as Group105, Stack as Stack201, Text as Text175 } from "@mantine/core";
29541
29660
 
29542
29661
  // src/mantine/blocks/embed/template/TemplateConfig.tsx
29543
29662
  import React280, { useCallback as useCallback111 } from "react";
@@ -29670,7 +29789,7 @@ var EmbedTemplateView = ({ editor, block }) => {
29670
29789
  const safeUrl = sanitizeEmbedUrl(block.props.url);
29671
29790
  const height = Number(block.props.height) || 400;
29672
29791
  const sandbox = block.props.allowAuth === "true" ? "allow-scripts allow-same-origin allow-forms allow-popups" : "allow-scripts allow-forms allow-popups";
29673
- return /* @__PURE__ */ React281.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React281.createElement(Stack201, { gap: "xs", justify: "center" }, /* @__PURE__ */ React281.createElement(Group104, { wrap: "nowrap", align: "center" }, getIcon("code", block.props.icon), /* @__PURE__ */ React281.createElement(Stack201, { gap: 2 }, /* @__PURE__ */ React281.createElement(Text175, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Embed"), /* @__PURE__ */ React281.createElement(Text175, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, block.props.description || safeUrl || "Click to configure"))), safeUrl && /* @__PURE__ */ React281.createElement(Box63, { style: { borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React281.createElement(
29792
+ return /* @__PURE__ */ React281.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React281.createElement(Stack201, { gap: "xs", justify: "center" }, /* @__PURE__ */ React281.createElement(Group105, { wrap: "nowrap", align: "center" }, getIcon("code", block.props.icon), /* @__PURE__ */ React281.createElement(Stack201, { gap: 2 }, /* @__PURE__ */ React281.createElement(Text175, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Embed"), /* @__PURE__ */ React281.createElement(Text175, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, block.props.description || safeUrl || "Click to configure"))), safeUrl && /* @__PURE__ */ React281.createElement(Box63, { style: { borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React281.createElement(
29674
29793
  "iframe",
29675
29794
  {
29676
29795
  ...isImageUrl(safeUrl) ? { srcDoc: buildImageSrcdoc(safeUrl) } : { src: safeUrl },
@@ -29687,7 +29806,7 @@ var EmbedTemplateView = ({ editor, block }) => {
29687
29806
 
29688
29807
  // src/mantine/blocks/embed/flow/FlowView.tsx
29689
29808
  import React283, { useMemo as useMemo110 } from "react";
29690
- import { Box as Box64, Group as Group105, Stack as Stack202, Text as Text176 } from "@mantine/core";
29809
+ import { Box as Box64, Group as Group106, Stack as Stack202, Text as Text176 } from "@mantine/core";
29691
29810
 
29692
29811
  // src/mantine/blocks/embed/flow/FlowConfig.tsx
29693
29812
  import React282, { useCallback as useCallback112 } from "react";
@@ -29736,7 +29855,7 @@ var EmbedFlowView = ({ editor, block }) => {
29736
29855
  const safeUrl = sanitizeEmbedUrl(block.props.url);
29737
29856
  const height = Number(block.props.height) || 400;
29738
29857
  const sandbox = block.props.allowAuth === "true" ? "allow-scripts allow-same-origin allow-forms allow-popups" : "allow-scripts allow-forms allow-popups";
29739
- return /* @__PURE__ */ React283.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React283.createElement(Stack202, { gap: "xs", justify: "center" }, /* @__PURE__ */ React283.createElement(Group105, { wrap: "nowrap", align: "center" }, getIcon("code", block.props.icon), /* @__PURE__ */ React283.createElement(Stack202, { gap: 2 }, /* @__PURE__ */ React283.createElement(Text176, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Embed"), /* @__PURE__ */ React283.createElement(Text176, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, block.props.description || safeUrl || "No URL configured"))), safeUrl && /* @__PURE__ */ React283.createElement(Box64, { style: { borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React283.createElement(
29858
+ return /* @__PURE__ */ React283.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React283.createElement(Stack202, { gap: "xs", justify: "center" }, /* @__PURE__ */ React283.createElement(Group106, { wrap: "nowrap", align: "center" }, getIcon("code", block.props.icon), /* @__PURE__ */ React283.createElement(Stack202, { gap: 2 }, /* @__PURE__ */ React283.createElement(Text176, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Embed"), /* @__PURE__ */ React283.createElement(Text176, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, block.props.description || safeUrl || "No URL configured"))), safeUrl && /* @__PURE__ */ React283.createElement(Box64, { style: { borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React283.createElement(
29740
29859
  "iframe",
29741
29860
  {
29742
29861
  ...isImageUrl(safeUrl) ? { srcDoc: buildImageSrcdoc(safeUrl) } : { src: safeUrl },
@@ -31823,7 +31942,7 @@ function PanelContent({ theme }) {
31823
31942
 
31824
31943
  // src/mantine/components/CoverImage.tsx
31825
31944
  import React292, { useState as useState145, useRef as useRef31, useEffect as useEffect117, useMemo as useMemo119 } from "react";
31826
- import { Box as Box70, Group as Group109 } from "@mantine/core";
31945
+ import { Box as Box70, Group as Group110 } from "@mantine/core";
31827
31946
  import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings19, IconArrowsMove, IconTrash as IconTrash10, IconRefresh as IconRefresh6 } from "@tabler/icons-react";
31828
31947
 
31829
31948
  // src/core/lib/imageTransform.ts
@@ -31958,7 +32077,7 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
31958
32077
 
31959
32078
  // src/mantine/components/Base/CoverImageButton.tsx
31960
32079
  import React288, { forwardRef, useState as useState142 } from "react";
31961
- import { UnstyledButton as UnstyledButton7, Group as Group106, Text as Text178 } from "@mantine/core";
32080
+ import { UnstyledButton as UnstyledButton7, Group as Group107, Text as Text178 } from "@mantine/core";
31962
32081
  var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false, onClick, icon: icon2, children, style }, ref) {
31963
32082
  const [hovered, setHovered] = useState142(false);
31964
32083
  return /* @__PURE__ */ React288.createElement(
@@ -31977,7 +32096,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
31977
32096
  ...style
31978
32097
  }
31979
32098
  },
31980
- /* @__PURE__ */ React288.createElement(Group106, { gap: 4, wrap: "nowrap" }, icon2 && /* @__PURE__ */ React288.createElement(
32099
+ /* @__PURE__ */ React288.createElement(Group107, { gap: 4, wrap: "nowrap" }, icon2 && /* @__PURE__ */ React288.createElement(
31981
32100
  "span",
31982
32101
  {
31983
32102
  style: {
@@ -32003,7 +32122,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
32003
32122
 
32004
32123
  // src/mantine/components/Base/BaseIconPicker.tsx
32005
32124
  import React289, { useState as useState143, useMemo as useMemo117, useEffect as useEffect115 } from "react";
32006
- import { TextInput as TextInput9, Tabs as Tabs3, Box as Box67, Stack as Stack204, UnstyledButton as UnstyledButton8, Text as Text179, Center as Center15, ScrollArea as ScrollArea9, Group as Group107, Popover as Popover6 } from "@mantine/core";
32125
+ import { TextInput as TextInput9, Tabs as Tabs3, Box as Box67, Stack as Stack204, UnstyledButton as UnstyledButton8, Text as Text179, Center as Center15, ScrollArea as ScrollArea9, Group as Group108, Popover as Popover6 } from "@mantine/core";
32007
32126
  import * as TablerIcons2 from "@tabler/icons-react";
32008
32127
  import { IconSearch as IconSearch9, IconX as IconX15, IconChevronLeft, IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
32009
32128
 
@@ -32144,7 +32263,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
32144
32263
  transition: "background 0.15s ease"
32145
32264
  }
32146
32265
  },
32147
- /* @__PURE__ */ React289.createElement(Group107, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React289.createElement(IconX15, { size: 14 }), /* @__PURE__ */ React289.createElement(Text179, { fz: 12, style: { color: "var(--mantine-color-neutralColor-7) !important", whiteSpace: "nowrap" } }, "Remove"))
32266
+ /* @__PURE__ */ React289.createElement(Group108, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React289.createElement(IconX15, { size: 14 }), /* @__PURE__ */ React289.createElement(Text179, { fz: 12, style: { color: "var(--mantine-color-neutralColor-7) !important", whiteSpace: "nowrap" } }, "Remove"))
32148
32267
  ),
32149
32268
  /* @__PURE__ */ React289.createElement(Stack204, { gap: "md", p: "md" }, /* @__PURE__ */ React289.createElement(Tabs3, { value: activeTab, onChange: setActiveTab, variant: "pills" }, /* @__PURE__ */ React289.createElement(Tabs3.List, null, /* @__PURE__ */ React289.createElement(Tabs3.Tab, { value: "icons" }, "Icons"), /* @__PURE__ */ React289.createElement(Tabs3.Tab, { value: "upload" }, "Upload")), /* @__PURE__ */ React289.createElement(Tabs3.Panel, { value: "icons", pt: "md" }, /* @__PURE__ */ React289.createElement(
32150
32269
  TextInput9,
@@ -32164,7 +32283,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
32164
32283
  }
32165
32284
  }
32166
32285
  }
32167
- ), !searchQuery && /* @__PURE__ */ React289.createElement(Box67, { mb: "md" }, /* @__PURE__ */ React289.createElement(Text179, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React289.createElement(ScrollArea9.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React289.createElement(Box67, null, /* @__PURE__ */ React289.createElement(Group107, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React289.createElement(Text179, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React289.createElement(Group107, { gap: "xs" }, /* @__PURE__ */ React289.createElement(Text179, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React289.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React289.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React289.createElement(
32286
+ ), !searchQuery && /* @__PURE__ */ React289.createElement(Box67, { mb: "md" }, /* @__PURE__ */ React289.createElement(Text179, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React289.createElement(ScrollArea9.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React289.createElement(Box67, null, /* @__PURE__ */ React289.createElement(Group108, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React289.createElement(Text179, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React289.createElement(Group108, { gap: "xs" }, /* @__PURE__ */ React289.createElement(Text179, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React289.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React289.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React289.createElement(
32168
32287
  BaseButton,
32169
32288
  {
32170
32289
  size: "xs",
@@ -32231,7 +32350,7 @@ import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
32231
32350
 
32232
32351
  // src/mantine/components/FlowSettingsPanel.tsx
32233
32352
  import React291, { useState as useState144, useEffect as useEffect116, useCallback as useCallback117 } from "react";
32234
- import { Stack as Stack205, Group as Group108, Button as Button58, ActionIcon as ActionIcon36, Text as Text180, Box as Box69 } from "@mantine/core";
32353
+ import { Stack as Stack205, Group as Group109, Button as Button58, ActionIcon as ActionIcon36, Text as Text180, Box as Box69 } from "@mantine/core";
32235
32354
  import { IconPlus as IconPlus10, IconTrash as IconTrash9 } from "@tabler/icons-react";
32236
32355
  var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
32237
32356
  var FlowSettingsPanel = ({ editor }) => {
@@ -32298,7 +32417,7 @@ var FlowSettingsPanel = ({ editor }) => {
32298
32417
  [editor]
32299
32418
  );
32300
32419
  const subtitle = /* @__PURE__ */ React291.createElement(Box69, { px: 40, mb: "md" }, /* @__PURE__ */ React291.createElement(Text180, { size: "sm", c: "dimmed" }, "Add key-value settings for this flow. These are available to oracles and action blocks at runtime."));
32301
- return /* @__PURE__ */ React291.createElement(BaseRightPanelLayout, { title: "Flow Details", onClose: closePanel, isTemplate: true, captionContent: subtitle }, /* @__PURE__ */ React291.createElement(Stack205, { gap: "lg" }, rows.map((row, index) => /* @__PURE__ */ React291.createElement(Stack205, { key: index, gap: "xs" }, /* @__PURE__ */ React291.createElement(Group108, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React291.createElement(BaseTextInput, { placeholder: "Key (e.g. protocolDid)", value: row.key, onChange: (e) => handleKeyChange(index, e.currentTarget.value), style: { flex: 1 } }), /* @__PURE__ */ React291.createElement(ActionIcon36, { variant: "subtle", color: "red", onClick: () => handleDelete(index), size: "lg" }, /* @__PURE__ */ React291.createElement(IconTrash9, { size: 16 }))), /* @__PURE__ */ React291.createElement(BaseTextArea, { placeholder: "Value", value: row.value, onChange: (e) => handleValueChange(index, e.currentTarget.value), minRows: 1, maxRows: 8 }))), /* @__PURE__ */ React291.createElement(Button58, { variant: "subtle", leftSection: /* @__PURE__ */ React291.createElement(IconPlus10, { size: 16 }), onClick: handleAdd, size: "sm" }, "Add detail")));
32420
+ return /* @__PURE__ */ React291.createElement(BaseRightPanelLayout, { title: "Flow Details", onClose: closePanel, isTemplate: true, captionContent: subtitle }, /* @__PURE__ */ React291.createElement(Stack205, { gap: "lg" }, rows.map((row, index) => /* @__PURE__ */ React291.createElement(Stack205, { key: index, gap: "xs" }, /* @__PURE__ */ React291.createElement(Group109, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React291.createElement(BaseTextInput, { placeholder: "Key (e.g. protocolDid)", value: row.key, onChange: (e) => handleKeyChange(index, e.currentTarget.value), style: { flex: 1 } }), /* @__PURE__ */ React291.createElement(ActionIcon36, { variant: "subtle", color: "red", onClick: () => handleDelete(index), size: "lg" }, /* @__PURE__ */ React291.createElement(IconTrash9, { size: 16 }))), /* @__PURE__ */ React291.createElement(BaseTextArea, { placeholder: "Value", value: row.value, onChange: (e) => handleValueChange(index, e.currentTarget.value), minRows: 1, maxRows: 8 }))), /* @__PURE__ */ React291.createElement(Button58, { variant: "subtle", leftSection: /* @__PURE__ */ React291.createElement(IconPlus10, { size: 16 }), onClick: handleAdd, size: "sm" }, "Add detail")));
32302
32421
  };
32303
32422
 
32304
32423
  // src/mantine/components/CoverImage.tsx
@@ -32450,7 +32569,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
32450
32569
  }
32451
32570
  )
32452
32571
  )
32453
- ), editable && (isHovering || opened) && /* @__PURE__ */ React292.createElement(Group109, { gap: 4, style: { position: "absolute", bottom: hasLogo ? -18 : 0, left: 0, zIndex: 10 } }, !logoSrc && /* @__PURE__ */ React292.createElement(
32572
+ ), editable && (isHovering || opened) && /* @__PURE__ */ React292.createElement(Group110, { gap: 4, style: { position: "absolute", bottom: hasLogo ? -18 : 0, left: 0, zIndex: 10 } }, !logoSrc && /* @__PURE__ */ React292.createElement(
32454
32573
  BaseIconPicker,
32455
32574
  {
32456
32575
  opened,
@@ -32510,7 +32629,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
32510
32629
  }
32511
32630
  ),
32512
32631
  editable && isHovering && /* @__PURE__ */ React292.createElement(
32513
- Group109,
32632
+ Group110,
32514
32633
  {
32515
32634
  gap: "xs",
32516
32635
  style: {
@@ -33556,7 +33675,7 @@ var styles = {
33556
33675
 
33557
33676
  // src/mantine/components/EntitySigningSetup.tsx
33558
33677
  import React298, { useState as useState149 } from "react";
33559
- import { Modal as Modal4, Stack as Stack206, Text as Text181, TextInput as TextInput10, Button as Button59, Alert as Alert58, Group as Group110 } from "@mantine/core";
33678
+ import { Modal as Modal4, Stack as Stack206, Text as Text181, TextInput as TextInput10, Button as Button59, Alert as Alert58, Group as Group111 } from "@mantine/core";
33560
33679
  import { IconAlertCircle as IconAlertCircle21, IconCheck as IconCheck23, IconKey as IconKey2 } from "@tabler/icons-react";
33561
33680
  var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) => {
33562
33681
  const [pin, setPin] = useState149("");
@@ -33608,7 +33727,7 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
33608
33727
  {
33609
33728
  opened,
33610
33729
  onClose: handleClose,
33611
- title: /* @__PURE__ */ React298.createElement(Group110, { gap: "xs" }, /* @__PURE__ */ React298.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React298.createElement(Text181, { fw: 600 }, "Entity Signing Setup")),
33730
+ title: /* @__PURE__ */ React298.createElement(Group111, { gap: "xs" }, /* @__PURE__ */ React298.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React298.createElement(Text181, { fw: 600 }, "Entity Signing Setup")),
33612
33731
  size: "md"
33613
33732
  },
33614
33733
  /* @__PURE__ */ React298.createElement(Stack206, { gap: "md" }, success ? /* @__PURE__ */ React298.createElement(Alert58, { color: "green", icon: /* @__PURE__ */ React298.createElement(IconCheck23, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React298.createElement(React298.Fragment, null, /* @__PURE__ */ React298.createElement(Text181, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React298.createElement(Text181, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React298.createElement(Alert58, { color: "blue", variant: "light" }, /* @__PURE__ */ React298.createElement(Text181, { size: "sm" }, "This is a ", /* @__PURE__ */ React298.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React298.createElement(Stack206, { gap: "xs" }, /* @__PURE__ */ React298.createElement(Text181, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React298.createElement(Text181, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React298.createElement(Text181, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React298.createElement(Text181, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React298.createElement(
@@ -33622,13 +33741,13 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
33622
33741
  onChange: (e) => setPin(e.currentTarget.value),
33623
33742
  disabled: loading
33624
33743
  }
33625
- ), /* @__PURE__ */ React298.createElement(TextInput10, { label: "Confirm PIN", type: "password", placeholder: "Confirm PIN", value: confirmPin, onChange: (e) => setConfirmPin(e.currentTarget.value), disabled: loading }), error && /* @__PURE__ */ React298.createElement(Alert58, { color: "red", icon: /* @__PURE__ */ React298.createElement(IconAlertCircle21, { size: 16 }) }, error), /* @__PURE__ */ React298.createElement(Group110, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React298.createElement(Button59, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React298.createElement(Button59, { onClick: handleSetup, loading, leftSection: /* @__PURE__ */ React298.createElement(IconKey2, { size: 16 }) }, "Setup Entity Signing"))))
33744
+ ), /* @__PURE__ */ React298.createElement(TextInput10, { label: "Confirm PIN", type: "password", placeholder: "Confirm PIN", value: confirmPin, onChange: (e) => setConfirmPin(e.currentTarget.value), disabled: loading }), error && /* @__PURE__ */ React298.createElement(Alert58, { color: "red", icon: /* @__PURE__ */ React298.createElement(IconAlertCircle21, { size: 16 }) }, error), /* @__PURE__ */ React298.createElement(Group111, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React298.createElement(Button59, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React298.createElement(Button59, { onClick: handleSetup, loading, leftSection: /* @__PURE__ */ React298.createElement(IconKey2, { size: 16 }) }, "Setup Entity Signing"))))
33626
33745
  );
33627
33746
  };
33628
33747
 
33629
33748
  // src/mantine/components/FlowPermissionsPanel.tsx
33630
33749
  import React299, { useState as useState150, useEffect as useEffect121, useMemo as useMemo120 } from "react";
33631
- import { Stack as Stack207, Text as Text182, Paper as Paper19, Group as Group111, Badge as Badge43, Button as Button60, ActionIcon as ActionIcon37, Loader as Loader58, Alert as Alert59, Divider as Divider28 } from "@mantine/core";
33750
+ import { Stack as Stack207, Text as Text182, Paper as Paper19, Group as Group112, Badge as Badge43, Button as Button60, ActionIcon as ActionIcon37, Loader as Loader58, Alert as Alert59, Divider as Divider28 } from "@mantine/core";
33632
33751
  import { IconPlus as IconPlus11, IconTrash as IconTrash11, IconShieldCheck as IconShieldCheck15, IconUser as IconUser14, IconRobot as IconRobot4, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
33633
33752
  var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
33634
33753
  const [delegations, setDelegations] = useState150([]);
@@ -33705,12 +33824,12 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
33705
33824
  if (date < /* @__PURE__ */ new Date()) return "Expired";
33706
33825
  return date.toLocaleDateString();
33707
33826
  };
33708
- return /* @__PURE__ */ React299.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React299.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React299.createElement(Text182, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React299.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React299.createElement(Group111, { gap: "xs" }, /* @__PURE__ */ React299.createElement(IconShieldCheck15, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React299.createElement(Stack207, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React299.createElement(Text182, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React299.createElement(Badge43, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React299.createElement(Divider28, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React299.createElement(Group111, { justify: "center", py: "xl" }, /* @__PURE__ */ React299.createElement(Loader58, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React299.createElement(Alert59, { color: "gray", variant: "light" }, /* @__PURE__ */ React299.createElement(Text182, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React299.createElement(Stack207, { gap: "xs" }, delegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React299.createElement(Paper19, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React299.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React299.createElement(Group111, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React299.createElement(Stack207, { gap: 2 }, /* @__PURE__ */ React299.createElement(Text182, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React299.createElement(Group111, { gap: "xs" }, /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React299.createElement(ActionIcon37, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React299.createElement(IconTrash11, { size: 16 })))))), /* @__PURE__ */ React299.createElement(Button60, { leftSection: /* @__PURE__ */ React299.createElement(IconPlus11, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
33827
+ return /* @__PURE__ */ React299.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React299.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React299.createElement(Text182, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React299.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React299.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React299.createElement(IconShieldCheck15, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React299.createElement(Stack207, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React299.createElement(Text182, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React299.createElement(Badge43, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React299.createElement(Divider28, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React299.createElement(Group112, { justify: "center", py: "xl" }, /* @__PURE__ */ React299.createElement(Loader58, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React299.createElement(Alert59, { color: "gray", variant: "light" }, /* @__PURE__ */ React299.createElement(Text182, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React299.createElement(Stack207, { gap: "xs" }, delegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React299.createElement(Paper19, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React299.createElement(Group112, { justify: "space-between" }, /* @__PURE__ */ React299.createElement(Group112, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React299.createElement(Stack207, { gap: 2 }, /* @__PURE__ */ React299.createElement(Text182, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React299.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React299.createElement(Text182, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React299.createElement(ActionIcon37, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React299.createElement(IconTrash11, { size: 16 })))))), /* @__PURE__ */ React299.createElement(Button60, { leftSection: /* @__PURE__ */ React299.createElement(IconPlus11, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
33709
33828
  };
33710
33829
 
33711
33830
  // src/mantine/components/GrantPermissionModal.tsx
33712
33831
  import React300, { useState as useState151, useCallback as useCallback120 } from "react";
33713
- import { Modal as Modal5, Stack as Stack208, Text as Text183, TextInput as TextInput11, Button as Button61, Group as Group112, Radio as Radio5, Checkbox as Checkbox14, Alert as Alert60, Paper as Paper20, Loader as Loader59, Badge as Badge44, ActionIcon as ActionIcon38, Divider as Divider29, NumberInput as NumberInput4 } from "@mantine/core";
33832
+ import { Modal as Modal5, Stack as Stack208, Text as Text183, TextInput as TextInput11, Button as Button61, Group as Group113, Radio as Radio5, Checkbox as Checkbox14, Alert as Alert60, Paper as Paper20, Loader as Loader59, Badge as Badge44, ActionIcon as ActionIcon38, Divider as Divider29, NumberInput as NumberInput4 } from "@mantine/core";
33714
33833
  import { IconSearch as IconSearch10, IconUser as IconUser15, IconRobot as IconRobot5, IconX as IconX16, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
33715
33834
  var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
33716
33835
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
@@ -33822,7 +33941,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
33822
33941
  {
33823
33942
  opened,
33824
33943
  onClose: handleClose,
33825
- title: /* @__PURE__ */ React300.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React300.createElement(IconShieldPlus4, { size: 20 }), /* @__PURE__ */ React300.createElement(Text183, { fw: 600 }, "Grant Permission")),
33944
+ title: /* @__PURE__ */ React300.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React300.createElement(IconShieldPlus4, { size: 20 }), /* @__PURE__ */ React300.createElement(Text183, { fw: 600 }, "Grant Permission")),
33826
33945
  size: "lg"
33827
33946
  },
33828
33947
  /* @__PURE__ */ React300.createElement(Stack208, { gap: "md" }, /* @__PURE__ */ React300.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React300.createElement(Text183, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React300.createElement(
@@ -33835,7 +33954,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
33835
33954
  setSearchResults([]);
33836
33955
  }
33837
33956
  },
33838
- /* @__PURE__ */ React300.createElement(Group112, null, /* @__PURE__ */ React300.createElement(Radio5, { value: "user", label: "User" }), /* @__PURE__ */ React300.createElement(Radio5, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React300.createElement(Radio5, { value: "manual", label: "Enter DID" }))
33957
+ /* @__PURE__ */ React300.createElement(Group113, null, /* @__PURE__ */ React300.createElement(Radio5, { value: "user", label: "User" }), /* @__PURE__ */ React300.createElement(Radio5, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React300.createElement(Radio5, { value: "manual", label: "Enter DID" }))
33839
33958
  )), recipientType !== "manual" ? /* @__PURE__ */ React300.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React300.createElement(
33840
33959
  TextInput11,
33841
33960
  {
@@ -33846,9 +33965,9 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
33846
33965
  onChange: (e) => setSearchQuery(e.currentTarget.value),
33847
33966
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
33848
33967
  }
33849
- ), selectedRecipient ? /* @__PURE__ */ React300.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React300.createElement(Group112, { justify: "space-between" }, /* @__PURE__ */ React300.createElement(Group112, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React300.createElement(IconRobot5, { size: 16 }) : /* @__PURE__ */ React300.createElement(IconUser15, { size: 16 }), /* @__PURE__ */ React300.createElement(Text183, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React300.createElement(Badge44, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React300.createElement(ActionIcon38, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React300.createElement(IconX16, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React300.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React300.createElement(Stack208, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React300.createElement(Button61, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React300.createElement(TextInput11, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React300.createElement(Divider29, null), /* @__PURE__ */ React300.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React300.createElement(Text183, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
33968
+ ), selectedRecipient ? /* @__PURE__ */ React300.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React300.createElement(Group113, { justify: "space-between" }, /* @__PURE__ */ React300.createElement(Group113, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React300.createElement(IconRobot5, { size: 16 }) : /* @__PURE__ */ React300.createElement(IconUser15, { size: 16 }), /* @__PURE__ */ React300.createElement(Text183, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React300.createElement(Badge44, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React300.createElement(ActionIcon38, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React300.createElement(IconX16, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React300.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React300.createElement(Stack208, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React300.createElement(Button61, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React300.createElement(TextInput11, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React300.createElement(Divider29, null), /* @__PURE__ */ React300.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React300.createElement(Text183, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
33850
33969
  // Single block mode: show fixed block info
33851
- /* @__PURE__ */ React300.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React300.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React300.createElement(Badge44, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React300.createElement(Text183, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React300.createElement(Text183, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
33970
+ /* @__PURE__ */ React300.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React300.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React300.createElement(Badge44, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React300.createElement(Text183, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React300.createElement(Text183, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
33852
33971
  ) : (
33853
33972
  // Multi-block mode: show scope selection
33854
33973
  /* @__PURE__ */ React300.createElement(React300.Fragment, null, /* @__PURE__ */ React300.createElement(Radio5.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React300.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React300.createElement(Radio5, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React300.createElement(Radio5, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React300.createElement(Paper20, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React300.createElement(Stack208, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React300.createElement(
@@ -33874,7 +33993,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
33874
33993
  checked: canDelegate,
33875
33994
  onChange: (e) => setCanDelegate(e.currentTarget.checked)
33876
33995
  }
33877
- ), /* @__PURE__ */ React300.createElement(Divider29, null), /* @__PURE__ */ React300.createElement(TextInput11, { label: "Enter your PIN to sign this delegation", type: "password", placeholder: "PIN", value: pin, onChange: (e) => setPin(e.currentTarget.value) }), error && /* @__PURE__ */ React300.createElement(Alert60, { color: "red" }, error), /* @__PURE__ */ React300.createElement(Group112, { justify: "flex-end" }, /* @__PURE__ */ React300.createElement(Button61, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React300.createElement(Button61, { onClick: handleGrant, loading }, "Grant Permission")))
33996
+ ), /* @__PURE__ */ React300.createElement(Divider29, null), /* @__PURE__ */ React300.createElement(TextInput11, { label: "Enter your PIN to sign this delegation", type: "password", placeholder: "PIN", value: pin, onChange: (e) => setPin(e.currentTarget.value) }), error && /* @__PURE__ */ React300.createElement(Alert60, { color: "red" }, error), /* @__PURE__ */ React300.createElement(Group113, { justify: "flex-end" }, /* @__PURE__ */ React300.createElement(Button61, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React300.createElement(Button61, { onClick: handleGrant, loading }, "Grant Permission")))
33878
33997
  );
33879
33998
  };
33880
33999
 
@@ -33988,4 +34107,4 @@ export {
33988
34107
  getExtraSlashMenuItems,
33989
34108
  useCreateIxoEditor
33990
34109
  };
33991
- //# sourceMappingURL=chunk-YWL7V44B.mjs.map
34110
+ //# sourceMappingURL=chunk-MKNM3L24.mjs.map