import { D as N, F as D, a as R, b as P, c as W, I as A, O as E, T as C, V as I, d as B, e as O, f as V, g as z, h as L, i as H, j as q, k as M, E as _, l as $, m as j, n as G, o as U, p as Y, q as J, r as K, s as Q, t as X, u as Z, v as ee, w as se, x as ae, y as re, z as oe, A as te, B as ie, C as ne } from "./index-DiMKhXmL.js";
import { F as ce, S as de, a as pe, u as ue } from "./SchemaBuilderDrawer-7BwTadGH.js";
import "react/jsx-runtime";
import "react";
import "@mui/material";
import "react-icons/md";
import { NodeTypeRegistry as me, nodeTypeRegistry as he } from "./index-Dcur-XJ9.js";
import { TemplateRegistry as be, templateRegistry as Fe } from "./index-B6xrei80.js";
import { F as Te, a as ye, S as ke, F as Se, W as xe, b as ve } from "./WorkflowExecutionHistory-CKZKD532.js";
import { d as De } from "./messages-CRZgWFU-.js";
import { l as Pe, s as We } from "./bpmn-CtfWDaOY.js";
import { A as Ee, b as Ce, E as Ie, c as Be, F as Oe, R as Ve, S as ze, T as Le, W as He, e as qe } from "./GatewayBranchEdge-PsxBbEky.js";
import { b as _e } from "./buildBackendPayload-4SwOp7St.js";
import { b as je, c as Ge, d as Ue, e as Ye, m as Je, n as Ke, r as Qe, s as Xe, a as Ze, w as es, f as ss } from "./subWorkflowDescriptor-DYOYgBzX.js";
class g {
  constructor() {
    this.channels = /* @__PURE__ */ new Map();
  }
  register(s, a) {
    this.channels.set(s, a);
  }
  get(s) {
    return this.channels.get(s);
  }
  list() {
    return Array.from(this.channels.entries()).map(([s, a]) => ({ key: s, ...a }));
  }
  has(s) {
    return this.channels.has(s);
  }
}
const k = new g();
function S(e) {
  const {
    currentNodeId: s,
    nodes: a,
    getParents: t,
    getOutputSchema: r,
    nodePath: i,
    nodeLabel: n,
    getNodeId: l = (o) => o.id
  } = e, c = a.find((o) => l(o) === s);
  if (!c) return [];
  const m = b(c, a, t, l), p = [];
  for (const o of m) {
    const d = r(o);
    if (!d || d.length === 0) continue;
    const u = i(o);
    p.push({
      label: n ? n(o) : u,
      items: d.map((h) => f(h, u))
    });
  }
  return p;
}
function b(e, s, a, t) {
  const r = /* @__PURE__ */ new Set(), i = [], n = [...a(e, s)];
  for (; n.length > 0; ) {
    const l = n.shift(), c = t(l);
    r.has(c) || (r.add(c), i.push(l), n.push(...a(l, s)));
  }
  return i;
}
function f(e, s) {
  const a = `${s}.${e.key}`, t = e.description ?? (e.sample !== void 0 && e.sample !== null ? String(e.sample) : void 0), r = { label: e.label, path: a };
  return t !== void 0 && (r.description = t), e.children && e.children.length > 0 && (r.children = e.children.map((i) => f(i, a))), r;
}
export {
  Ee as ActionNode,
  Ce as ApprovalNode,
  N as DynamicFormRenderer,
  Ie as EdgeWithPlusLabel,
  Be as EndNode,
  D as FF,
  ce as FIELD_TYPE_OPTIONS,
  Oe as FilterNode,
  Te as FlowForgeCanvas,
  ye as FlowForgeHeader,
  R as FlowForgeRegistry,
  P as FlowForm,
  W as FormulaInput,
  A as InfiniteSelectField,
  me as NodeTypeRegistry,
  E as OptionsResolversProvider,
  Ve as RestApiNode,
  de as SchemaBuilder,
  pe as SchemaBuilderDrawer,
  ze as StartNode,
  ke as SubWorkflowPreviewDrawer,
  C as TablePickerField,
  be as TemplateRegistry,
  Le as TriggerNode,
  I as VariablePicker,
  B as VariablePickerProvider,
  He as WebhookTriggerNode,
  Se as WorkflowCanvas,
  xe as WorkflowExecutionHistory,
  ve as WorkflowTemplateLibrary,
  O as astHasRefs,
  V as astToTokens,
  je as baseNodeDefaults,
  _e as buildBackendPayload,
  z as buildEvaluationPayload,
  L as buildFieldConfig,
  H as buildFormulaPath,
  q as buildSelectStyles,
  M as buildValidationSchema,
  S as buildVariableGroups,
  qe as builtInNodeTypes,
  Ge as conditionBranchDescriptor,
  _ as dataSourceRegistry,
  De as defaultFlowForgeMessages,
  Ue as defineNode,
  Ye as endEventDescriptor,
  $ as errorTextStyle,
  j as extractLabel,
  G as fieldRegistry,
  U as hasFormulaTokens,
  Y as helperTextStyle,
  J as inputStyle,
  K as isFormula,
  Pe as loadWorkflowFromBpmn,
  Je as makeSubWorkflowDescriptor,
  he as nodeTypeRegistry,
  k as notificationChannelRegistry,
  Ke as notificationDescriptor,
  Q as parseToAST,
  Qe as restApiDescriptor,
  We as saveWorkflowToBpmn,
  X as serializeAST,
  Z as serializeASTAsConfig,
  ee as serializeConditionExpressions,
  Xe as startEventDescriptor,
  se as stripFormulaTokens,
  Ze as subWorkflowDescriptor,
  Fe as templateRegistry,
  ae as tokenize,
  re as unwrapFormula,
  oe as useDynamicOptions,
  ue as useFlowForm,
  te as useOptionsResolvers,
  ie as useVariablePickerContext,
  es as webhookTriggerDescriptor,
  ss as webhookTriggerTemplate,
  ne as wrapFormula
};
//# sourceMappingURL=index.js.map
