@datatechsolutions/ui 2.11.61 → 2.11.63

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.
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
4
5
  var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
5
6
  var chunkS7KHTUHA_js = require('./chunk-S7KHTUHA.js');
6
- var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
7
7
  var Headless6 = require('@headlessui/react');
8
8
  var clsx = require('clsx');
9
9
  var React12 = require('react');
@@ -2182,10 +2182,10 @@ function ChartRenderer({ spec, width = 640, height = 280, className }) {
2182
2182
  ] });
2183
2183
  }
2184
2184
  function buildTicks(min, max, count) {
2185
- const step = (max - min) / (count - 1);
2185
+ const step2 = (max - min) / (count - 1);
2186
2186
  const ticks = [];
2187
2187
  for (let index = 0; index < count; index += 1) {
2188
- ticks.push(min + step * index);
2188
+ ticks.push(min + step2 * index);
2189
2189
  }
2190
2190
  return ticks;
2191
2191
  }
@@ -6031,8 +6031,8 @@ function SidebarLayout({
6031
6031
  const identityEl = findSlot(sidebarChildren, IDENTITY_TYPE);
6032
6032
  const sidebarFooterEl = findSlot(sidebarChildren, SIDEBAR_FOOTER_TYPE);
6033
6033
  const sections = [];
6034
- function collectSections(node, group) {
6035
- React12.Children.forEach(node, (child) => {
6034
+ function collectSections(node2, group) {
6035
+ React12.Children.forEach(node2, (child) => {
6036
6036
  if (!React12.isValidElement(child)) return;
6037
6037
  if (isSlotType(child, GROUP_TYPE)) {
6038
6038
  const groupProps = child.props;
@@ -7290,20 +7290,20 @@ function StepTimeline({
7290
7290
  {
7291
7291
  role: "list",
7292
7292
  className: "overflow-hidden rounded-md lg:flex lg:rounded-none lg:border-r lg:border-l lg:border-gray-200 dark:lg:border-white/15",
7293
- children: steps.map((step, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "relative overflow-hidden lg:flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
7293
+ children: steps.map((step2, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "relative overflow-hidden lg:flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
7294
7294
  "button",
7295
7295
  {
7296
7296
  type: "button",
7297
7297
  onClick: () => onStepClick?.(stepIndex),
7298
- disabled: step.status === "upcoming",
7298
+ disabled: step2.status === "upcoming",
7299
7299
  className: classNames(
7300
- step.status === "upcoming" ? "cursor-not-allowed" : "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",
7300
+ step2.status === "upcoming" ? "cursor-not-allowed" : "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",
7301
7301
  stepIndex === 0 ? "rounded-t-md border-b-0" : "",
7302
7302
  stepIndex === steps.length - 1 ? "rounded-b-md border-t-0" : "",
7303
7303
  "w-full overflow-hidden border border-gray-200 text-left transition-colors lg:border-0 dark:border-white/15"
7304
7304
  ),
7305
7305
  children: [
7306
- step.status === "complete" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
7306
+ step2.status === "complete" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
7307
7307
  /* @__PURE__ */ jsxRuntime.jsx(
7308
7308
  "span",
7309
7309
  {
@@ -7311,14 +7311,14 @@ function StepTimeline({
7311
7311
  className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
7312
7312
  }
7313
7313
  ),
7314
- renderCompleteContent ? renderCompleteContent(step) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7314
+ renderCompleteContent ? renderCompleteContent(step2) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7315
7315
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx(solid$1.CheckIcon, { "aria-hidden": "true", className: "h-5 w-5 text-white" }) }) }),
7316
7316
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
7317
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: step.name }),
7318
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step.description })
7317
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: step2.name }),
7318
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
7319
7319
  ] })
7320
7320
  ] })
7321
- ] }) : step.status === "current" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-current": "step", children: [
7321
+ ] }) : step2.status === "current" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-current": "step", children: [
7322
7322
  /* @__PURE__ */ jsxRuntime.jsx(
7323
7323
  "span",
7324
7324
  {
@@ -7327,10 +7327,10 @@ function StepTimeline({
7327
7327
  }
7328
7328
  ),
7329
7329
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7330
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-600 dark:border-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-blue-600 dark:text-blue-400", children: step.id }) }) }),
7330
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-600 dark:border-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-blue-600 dark:text-blue-400", children: step2.id }) }) }),
7331
7331
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
7332
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: step.name }),
7333
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step.description })
7332
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: step2.name }),
7333
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
7334
7334
  ] })
7335
7335
  ] })
7336
7336
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
@@ -7342,10 +7342,10 @@ function StepTimeline({
7342
7342
  }
7343
7343
  ),
7344
7344
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
7345
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-gray-300 dark:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400", children: step.id }) }) }),
7345
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-gray-300 dark:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400", children: step2.id }) }) }),
7346
7346
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
7347
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step.name }),
7348
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step.description })
7347
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.name }),
7348
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
7349
7349
  ] })
7350
7350
  ] })
7351
7351
  ] }),
@@ -7361,7 +7361,7 @@ function StepTimeline({
7361
7361
  ) }) : null
7362
7362
  ]
7363
7363
  }
7364
- ) }, step.id))
7364
+ ) }, step2.id))
7365
7365
  }
7366
7366
  ) }) });
7367
7367
  }
@@ -7511,7 +7511,7 @@ function FormPriceInput({
7511
7511
  currencySymbol,
7512
7512
  value,
7513
7513
  onValueChange,
7514
- step = "0.01",
7514
+ step: step2 = "0.01",
7515
7515
  placeholder = "0.00",
7516
7516
  colorClass,
7517
7517
  disabled,
@@ -7544,7 +7544,7 @@ function FormPriceInput({
7544
7544
  {
7545
7545
  id: inputId,
7546
7546
  type: "number",
7547
- step,
7547
+ step: step2,
7548
7548
  value,
7549
7549
  onChange: (event) => onValueChange?.(event.target.value),
7550
7550
  placeholder,
@@ -8005,7 +8005,7 @@ function StepFormPage({
8005
8005
  ] }),
8006
8006
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mt-2 text-2xl font-bold tracking-tight text-slate-900 dark:text-white sm:text-3xl", children: steps[currentStep]?.title ?? title }),
8007
8007
  steps[currentStep]?.description ?? subtitle ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 max-w-xl text-sm text-slate-500 dark:text-white/60 sm:text-base", children: steps[currentStep]?.description ?? subtitle }) : null,
8008
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex items-center gap-2", children: steps.map((step, index) => {
8008
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex items-center gap-2", children: steps.map((step2, index) => {
8009
8009
  const isCompleted = index < currentStep;
8010
8010
  const isCurrent = index === currentStep;
8011
8011
  const isClickable = index < currentStep;
@@ -8019,12 +8019,12 @@ function StepFormPage({
8019
8019
  className: `flex items-center gap-2 rounded-full px-3 py-1.5 text-xs font-medium transition-all duration-200 ${isCurrent ? "bg-blue-500/15 text-blue-700 shadow-sm backdrop-blur-sm dark:bg-blue-500/25 dark:text-blue-300" : isCompleted ? "bg-emerald-500/10 text-emerald-700 cursor-pointer hover:bg-emerald-500/20 backdrop-blur-sm dark:bg-emerald-500/20 dark:text-emerald-300" : "bg-slate-500/8 text-slate-400 dark:bg-white/5 dark:text-white/30"}`,
8020
8020
  children: [
8021
8021
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: `flex h-5 w-5 items-center justify-center rounded-full text-[10px] font-bold ${isCurrent ? "bg-blue-500 text-white" : isCompleted ? "bg-emerald-500 text-white" : "bg-slate-200 text-slate-400 dark:bg-white/10 dark:text-white/30"}`, children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckIcon, { className: "h-3 w-3" }) : index + 1 }),
8022
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: step.title })
8022
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: step2.title })
8023
8023
  ]
8024
8024
  }
8025
8025
  ),
8026
8026
  index < steps.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-px flex-1 transition-colors duration-200 ${index < currentStep ? "bg-emerald-500/30 dark:bg-emerald-500/20" : "bg-slate-200 dark:bg-white/10"}` }) : null
8027
- ] }, step.id);
8027
+ ] }, step2.id);
8028
8028
  }) })
8029
8029
  ] })
8030
8030
  ] }),
@@ -13466,16 +13466,16 @@ function PipelinePreview({ activeFuel, activeState, activeStation, onActiveFuelC
13466
13466
  if (intervalRef.current) clearInterval(intervalRef.current);
13467
13467
  setActiveStep(0);
13468
13468
  onStepChange?.(0);
13469
- let step = 0;
13469
+ let step2 = 0;
13470
13470
  intervalRef.current = setInterval(() => {
13471
- step += 1;
13472
- if (step > 7) {
13471
+ step2 += 1;
13472
+ if (step2 > 7) {
13473
13473
  if (intervalRef.current) clearInterval(intervalRef.current);
13474
13474
  setActiveStep(7);
13475
13475
  onStepChange?.(7);
13476
13476
  } else {
13477
- setActiveStep(step);
13478
- onStepChange?.(step);
13477
+ setActiveStep(step2);
13478
+ onStepChange?.(step2);
13479
13479
  }
13480
13480
  }, 1400);
13481
13481
  }, [onStepChange]);
@@ -13487,21 +13487,21 @@ function PipelinePreview({ activeFuel, activeState, activeStation, onActiveFuelC
13487
13487
  React12.useEffect(() => () => {
13488
13488
  if (intervalRef.current) clearInterval(intervalRef.current);
13489
13489
  }, []);
13490
- const getStatus = (node) => {
13490
+ const getStatus = (node2) => {
13491
13491
  if (activeStep < 0) return "idle";
13492
- if (node.step < activeStep) return "complete";
13493
- if (node.step === activeStep) return "active";
13492
+ if (node2.step < activeStep) return "complete";
13493
+ if (node2.step === activeStep) return "active";
13494
13494
  return "idle";
13495
13495
  };
13496
13496
  const rows = React12.useMemo(() => {
13497
13497
  const result = [];
13498
- let step = -1;
13499
- for (const node of pipelineNodes) {
13500
- if (node.step !== step) {
13498
+ let step2 = -1;
13499
+ for (const node2 of pipelineNodes) {
13500
+ if (node2.step !== step2) {
13501
13501
  result.push([]);
13502
- step = node.step;
13502
+ step2 = node2.step;
13503
13503
  }
13504
- result[result.length - 1].push(node);
13504
+ result[result.length - 1].push(node2);
13505
13505
  }
13506
13506
  return result;
13507
13507
  }, [pipelineNodes]);
@@ -13615,26 +13615,26 @@ function PipelinePreview({ activeFuel, activeState, activeStation, onActiveFuelC
13615
13615
  ` }),
13616
13616
  rows.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0 shrink-0", children: [
13617
13617
  rowIndex > 0 && row[0] && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "40", height: "2", className: "shrink-0 mx-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "0", y1: "1", x2: "40", y2: "1", stroke: activeStep >= row[0].step ? "#10b981" : "#374151", strokeWidth: "2", strokeDasharray: "4 3", style: { animation: activeStep === row[0].step ? "edgeFlow 0.8s linear infinite" : "none" } }) }),
13618
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node) => {
13619
- const status = getStatus(node);
13618
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node2) => {
13619
+ const status = getStatus(node2);
13620
13620
  return /* @__PURE__ */ jsxRuntime.jsxs(
13621
13621
  "div",
13622
13622
  {
13623
13623
  className: `liquid-surface rounded-2xl px-4 py-3 transition-all duration-500 ${row.length > 1 ? "w-[180px]" : "w-[220px]"} ${status === "active" ? "ring-2 ring-blue-500/50 scale-[1.03]" : status === "complete" ? "ring-1 ring-emerald-500/30" : "opacity-40"}`,
13624
- style: status === "active" ? { "--glow": node.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
13624
+ style: status === "active" ? { "--glow": node2.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
13625
13625
  children: [
13626
13626
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5 mb-1.5", children: [
13627
- node.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: node.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(node.icon, { className: `h-5 w-5 ${node.color}` }) }),
13627
+ node2.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: node2.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node2.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(node2.icon, { className: `h-5 w-5 ${node2.color}` }) }),
13628
13628
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
13629
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[13px] font-semibold text-white truncate", children: node.label }),
13630
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[9px] text-gray-500 truncate", children: node.subtitle })
13629
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[13px] font-semibold text-white truncate", children: node2.label }),
13630
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[9px] text-gray-500 truncate", children: node2.subtitle })
13631
13631
  ] }),
13632
13632
  status === "complete" ? /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-5 w-5 text-emerald-400 shrink-0" }) : null
13633
13633
  ] }),
13634
- node.badges && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node.badges.map((badge) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
13634
+ node2.badges && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node2.badges.map((badge) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
13635
13635
  ]
13636
13636
  },
13637
- node.id
13637
+ node2.id
13638
13638
  );
13639
13639
  }) })
13640
13640
  ] }, rowIndex))
@@ -13975,14 +13975,14 @@ function IncidentPipelineDemo({
13975
13975
  const handleRun = React12.useCallback(() => {
13976
13976
  if (intervalRef.current) clearInterval(intervalRef.current);
13977
13977
  setActiveStep(0);
13978
- let step = 0;
13978
+ let step2 = 0;
13979
13979
  intervalRef.current = setInterval(() => {
13980
- step += 1;
13981
- if (step > 7) {
13980
+ step2 += 1;
13981
+ if (step2 > 7) {
13982
13982
  if (intervalRef.current) clearInterval(intervalRef.current);
13983
13983
  setActiveStep(7);
13984
13984
  } else {
13985
- setActiveStep(step);
13985
+ setActiveStep(step2);
13986
13986
  }
13987
13987
  }, 1200);
13988
13988
  }, []);
@@ -13998,21 +13998,21 @@ function IncidentPipelineDemo({
13998
13998
  React12.useEffect(() => () => {
13999
13999
  if (intervalRef.current) clearInterval(intervalRef.current);
14000
14000
  }, []);
14001
- const getStatus = (node) => {
14001
+ const getStatus = (node2) => {
14002
14002
  if (activeStep < 0) return "idle";
14003
- if (node.step < activeStep) return "complete";
14004
- if (node.step === activeStep) return "active";
14003
+ if (node2.step < activeStep) return "complete";
14004
+ if (node2.step === activeStep) return "active";
14005
14005
  return "idle";
14006
14006
  };
14007
14007
  const rows = React12.useMemo(() => {
14008
14008
  const result = [];
14009
- let step = -1;
14010
- for (const node of nodes) {
14011
- if (node.step !== step) {
14009
+ let step2 = -1;
14010
+ for (const node2 of nodes) {
14011
+ if (node2.step !== step2) {
14012
14012
  result.push([]);
14013
- step = node.step;
14013
+ step2 = node2.step;
14014
14014
  }
14015
- result[result.length - 1].push(node);
14015
+ result[result.length - 1].push(node2);
14016
14016
  }
14017
14017
  return result;
14018
14018
  }, [nodes]);
@@ -14058,26 +14058,26 @@ function IncidentPipelineDemo({
14058
14058
  ` }),
14059
14059
  rows.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-0", children: [
14060
14060
  rowIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "40", height: "2", className: "mx-1.5 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "0", y1: "1", x2: "40", y2: "1", stroke: activeStep >= rows[rowIndex][0].step ? "#10b981" : "#374151", strokeWidth: "2", strokeDasharray: "4 3", style: { animation: activeStep === rows[rowIndex][0].step ? "edgeFlow 0.8s linear infinite" : "none" } }) }),
14061
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node) => {
14062
- const status = getStatus(node);
14061
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node2) => {
14062
+ const status = getStatus(node2);
14063
14063
  return /* @__PURE__ */ jsxRuntime.jsxs(
14064
14064
  "div",
14065
14065
  {
14066
14066
  className: `liquid-surface rounded-2xl px-4 py-3 transition-all duration-500 ${row.length > 1 ? "w-[180px]" : "w-[220px]"} ${status === "active" ? "scale-[1.03] ring-2 ring-red-500/50" : status === "complete" ? "ring-1 ring-emerald-500/30" : "opacity-40"}`,
14067
- style: status === "active" ? { "--glow": node.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
14067
+ style: status === "active" ? { "--glow": node2.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
14068
14068
  children: [
14069
14069
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1.5 flex items-center gap-2.5", children: [
14070
- node.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: node.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(node.icon, { className: `h-5 w-5 ${node.color}` }) }),
14070
+ node2.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: node2.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node2.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(node2.icon, { className: `h-5 w-5 ${node2.color}` }) }),
14071
14071
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
14072
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[13px] font-semibold text-white", children: node.label }),
14073
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[9px] text-gray-500", children: node.subtitle })
14072
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[13px] font-semibold text-white", children: node2.label }),
14073
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[9px] text-gray-500", children: node2.subtitle })
14074
14074
  ] }),
14075
14075
  status === "complete" && /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-5 w-5 shrink-0 text-emerald-400" })
14076
14076
  ] }),
14077
- node.badges && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node.badges.map((badge) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
14077
+ node2.badges && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node2.badges.map((badge) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
14078
14078
  ]
14079
14079
  },
14080
- node.id
14080
+ node2.id
14081
14081
  );
14082
14082
  }) })
14083
14083
  ] }, rowIndex))
@@ -16415,6 +16415,789 @@ var DashboardDemo = ({
16415
16415
  }
16416
16416
  );
16417
16417
  };
16418
+ var NODE_TYPE_META = {
16419
+ start: { icon: HeroIcons.PlayIcon, color: "text-emerald-300", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.45)" },
16420
+ end: { icon: HeroIcons.CheckCircleIcon, color: "text-emerald-300", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.45)" },
16421
+ datasource: { icon: HeroIcons.CircleStackIcon, color: "text-sky-300", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.45)" },
16422
+ entity: { icon: HeroIcons.RectangleStackIcon, color: "text-sky-300", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.45)" },
16423
+ http_request: { icon: HeroIcons.CloudIcon, color: "text-cyan-300", bg: "bg-cyan-500/15", glow: "rgba(34,211,238,0.45)" },
16424
+ knowledge_base: { icon: HeroIcons.ServerStackIcon, color: "text-cyan-300", bg: "bg-cyan-500/15", glow: "rgba(34,211,238,0.45)" },
16425
+ agent: { icon: HeroIcons.CpuChipIcon, color: "text-purple-300", bg: "bg-purple-500/15", glow: "rgba(168,85,247,0.5)" },
16426
+ agent_tool: { icon: HeroIcons.BeakerIcon, color: "text-violet-300", bg: "bg-violet-500/15", glow: "rgba(139,92,246,0.5)" },
16427
+ tool: { icon: HeroIcons.BeakerIcon, color: "text-violet-300", bg: "bg-violet-500/15", glow: "rgba(139,92,246,0.5)" },
16428
+ code: { icon: HeroIcons.CodeBracketIcon, color: "text-amber-300", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.45)" },
16429
+ template_transform: { icon: HeroIcons.DocumentTextIcon, color: "text-amber-300", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.45)" },
16430
+ if_else: { icon: HeroIcons.BoltIcon, color: "text-orange-300", bg: "bg-orange-500/15", glow: "rgba(251,146,60,0.5)" },
16431
+ question_classifier: { icon: HeroIcons.BoltIcon, color: "text-orange-300", bg: "bg-orange-500/15", glow: "rgba(251,146,60,0.5)" },
16432
+ parameter_extractor: { icon: HeroIcons.AdjustmentsHorizontalIcon, color: "text-orange-300", bg: "bg-orange-500/15", glow: "rgba(251,146,60,0.5)" },
16433
+ variable_aggregator: { icon: HeroIcons.AdjustmentsHorizontalIcon, color: "text-yellow-300", bg: "bg-yellow-500/15", glow: "rgba(234,179,8,0.45)" },
16434
+ variable_assigner: { icon: HeroIcons.AdjustmentsHorizontalIcon, color: "text-yellow-300", bg: "bg-yellow-500/15", glow: "rgba(234,179,8,0.45)" },
16435
+ iteration: { icon: HeroIcons.ArrowPathIcon, color: "text-fuchsia-300", bg: "bg-fuchsia-500/15", glow: "rgba(232,121,249,0.5)" },
16436
+ iteration_start: { icon: HeroIcons.ArrowPathIcon, color: "text-fuchsia-300", bg: "bg-fuchsia-500/15", glow: "rgba(232,121,249,0.5)" },
16437
+ list_operator: { icon: HeroIcons.AdjustmentsHorizontalIcon, color: "text-fuchsia-300", bg: "bg-fuchsia-500/15", glow: "rgba(232,121,249,0.5)" },
16438
+ answer: { icon: HeroIcons.ChartBarIcon, color: "text-emerald-300", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.45)" },
16439
+ dashboard_output: { icon: HeroIcons.ChartBarIcon, color: "text-emerald-300", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.45)" },
16440
+ rule: { icon: HeroIcons.BoltIcon, color: "text-rose-300", bg: "bg-rose-500/15", glow: "rgba(244,63,94,0.5)" },
16441
+ document_extractor: { icon: HeroIcons.DocumentTextIcon, color: "text-amber-300", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.45)" },
16442
+ model_provider: { icon: HeroIcons.CpuChipIcon, color: "text-violet-300", bg: "bg-violet-500/15", glow: "rgba(139,92,246,0.5)" },
16443
+ note: { icon: HeroIcons.DocumentTextIcon, color: "text-slate-300", bg: "bg-slate-500/15", glow: "rgba(100,116,139,0.4)" },
16444
+ group: { icon: HeroIcons.RectangleStackIcon, color: "text-slate-300", bg: "bg-slate-500/15", glow: "rgba(100,116,139,0.4)" }
16445
+ };
16446
+ var FALLBACK_META = { icon: HeroIcons.BoltIcon, color: "text-gray-300", bg: "bg-gray-500/15", glow: "rgba(100,116,139,0.4)" };
16447
+ function getNodeMeta(type) {
16448
+ return NODE_TYPE_META[type] ?? FALLBACK_META;
16449
+ }
16450
+ var NODE_W = 180;
16451
+ var NODE_H = 80;
16452
+ var PADDING = 24;
16453
+ function DepartmentWorkflowDemo({
16454
+ workflow,
16455
+ stepDurationMs = 1100,
16456
+ autoPlay = false,
16457
+ className,
16458
+ hideHeader = false,
16459
+ onComplete
16460
+ }) {
16461
+ const { graph, steps, title, description, accentBadge = "bg-indigo-500/15 text-indigo-300", completionSummary } = workflow;
16462
+ const [stepIndex, setStepIndex] = React12.useState(-1);
16463
+ const intervalRef = React12.useRef(null);
16464
+ const completedRef = React12.useRef(false);
16465
+ const total = steps.length;
16466
+ const isIdle = stepIndex === -1;
16467
+ const isRunning = stepIndex >= 0 && stepIndex < total - 1;
16468
+ const isComplete = stepIndex === total - 1 && total > 0;
16469
+ const activeNodeIds = React12.useMemo(() => {
16470
+ if (stepIndex < 0) return /* @__PURE__ */ new Set();
16471
+ return new Set(steps[stepIndex]?.nodes ?? []);
16472
+ }, [stepIndex, steps]);
16473
+ const completedNodeIds = React12.useMemo(() => {
16474
+ if (stepIndex < 0) return /* @__PURE__ */ new Set();
16475
+ const ids = /* @__PURE__ */ new Set();
16476
+ for (let i = 0; i < stepIndex; i++) {
16477
+ for (const id of steps[i]?.nodes ?? []) ids.add(id);
16478
+ }
16479
+ return ids;
16480
+ }, [stepIndex, steps]);
16481
+ const getStatus = React12.useCallback(
16482
+ (node2) => {
16483
+ if (activeNodeIds.has(node2.id)) return "running";
16484
+ if (completedNodeIds.has(node2.id)) return "complete";
16485
+ return "idle";
16486
+ },
16487
+ [activeNodeIds, completedNodeIds]
16488
+ );
16489
+ const handleRun = React12.useCallback(() => {
16490
+ if (intervalRef.current) clearInterval(intervalRef.current);
16491
+ completedRef.current = false;
16492
+ setStepIndex(0);
16493
+ let index = 0;
16494
+ intervalRef.current = setInterval(() => {
16495
+ index += 1;
16496
+ if (index >= total) {
16497
+ if (intervalRef.current) clearInterval(intervalRef.current);
16498
+ setStepIndex(total - 1);
16499
+ if (!completedRef.current) {
16500
+ completedRef.current = true;
16501
+ onComplete?.();
16502
+ }
16503
+ } else {
16504
+ setStepIndex(index);
16505
+ }
16506
+ }, stepDurationMs);
16507
+ }, [stepDurationMs, total, onComplete]);
16508
+ const handleStop = React12.useCallback(() => {
16509
+ if (intervalRef.current) clearInterval(intervalRef.current);
16510
+ setStepIndex(-1);
16511
+ }, []);
16512
+ React12.useEffect(() => {
16513
+ if (autoPlay) handleRun();
16514
+ return () => {
16515
+ if (intervalRef.current) clearInterval(intervalRef.current);
16516
+ };
16517
+ }, [autoPlay, handleRun]);
16518
+ const bounds = React12.useMemo(() => {
16519
+ if (graph.nodes.length === 0) return { width: 800, height: 400 };
16520
+ let maxX = 0;
16521
+ let maxY = 0;
16522
+ for (const node2 of graph.nodes) {
16523
+ if (node2.position.x > maxX) maxX = node2.position.x;
16524
+ if (node2.position.y > maxY) maxY = node2.position.y;
16525
+ }
16526
+ return { width: maxX + NODE_W + PADDING * 2, height: maxY + NODE_H + PADDING * 2 };
16527
+ }, [graph.nodes]);
16528
+ const currentStepLabel = stepIndex >= 0 ? steps[stepIndex]?.label : "Ready to run";
16529
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `liquid-surface rounded-2xl overflow-hidden ${className ?? ""}`, children: [
16530
+ !hideHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-5 py-4 flex items-start gap-4", children: [
16531
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
16532
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider ${accentBadge}`, children: [
16533
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BoltIcon, { className: "h-3 w-3" }),
16534
+ "Astrlabe workflow"
16535
+ ] }),
16536
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mt-2 text-lg font-bold text-white", children: title }),
16537
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-gray-400", children: description })
16538
+ ] }),
16539
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
16540
+ stepIndex >= 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: steps.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
16541
+ "div",
16542
+ {
16543
+ className: `h-1 w-3 rounded-full transition-all duration-500 ${index < stepIndex || isComplete ? "bg-emerald-500" : index === stepIndex ? "bg-indigo-500 animate-pulse" : "bg-white/10"}`
16544
+ },
16545
+ index
16546
+ )) }),
16547
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[180px] truncate text-[10px] text-gray-400", children: currentStepLabel }),
16548
+ isIdle ? /* @__PURE__ */ jsxRuntime.jsxs(
16549
+ "button",
16550
+ {
16551
+ type: "button",
16552
+ onClick: handleRun,
16553
+ className: "flex items-center gap-1 rounded-lg bg-gradient-to-r from-indigo-600 to-violet-600 px-3 py-1 text-[11px] font-semibold text-white shadow-lg shadow-indigo-500/20 hover:shadow-indigo-500/30 hover:scale-105 active:scale-95 transition-all",
16554
+ children: [
16555
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.PlayIcon, { className: "h-3 w-3" }),
16556
+ " Run"
16557
+ ]
16558
+ }
16559
+ ) : isRunning ? /* @__PURE__ */ jsxRuntime.jsxs(
16560
+ "button",
16561
+ {
16562
+ type: "button",
16563
+ onClick: handleStop,
16564
+ className: "flex items-center gap-1 rounded-lg bg-rose-600/80 px-3 py-1 text-[11px] font-semibold text-white",
16565
+ children: [
16566
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.StopIcon, { className: "h-3 w-3" }),
16567
+ " Stop"
16568
+ ]
16569
+ }
16570
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
16571
+ "button",
16572
+ {
16573
+ type: "button",
16574
+ onClick: handleRun,
16575
+ className: "flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1 text-[11px] font-medium text-gray-300 hover:bg-white/5",
16576
+ children: [
16577
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.ArrowPathIcon, { className: "h-3 w-3" }),
16578
+ " Replay"
16579
+ ]
16580
+ }
16581
+ )
16582
+ ] })
16583
+ ] }),
16584
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-auto p-6", style: { minHeight: bounds.height + PADDING * 2 }, children: [
16585
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
16586
+ @keyframes astGlow { 0%, 100% { box-shadow: 0 0 12px var(--glow); } 50% { box-shadow: 0 0 28px var(--glow); } }
16587
+ @keyframes astEdge { to { stroke-dashoffset: -16; } }
16588
+ ` }),
16589
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", style: { width: bounds.width, height: bounds.height }, children: [
16590
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "absolute inset-0 pointer-events-none", width: bounds.width, height: bounds.height, children: graph.edges.map((edge2) => {
16591
+ const source = graph.nodes.find((n) => n.id === edge2.source);
16592
+ const target = graph.nodes.find((n) => n.id === edge2.target);
16593
+ if (!source || !target) return null;
16594
+ const x1 = source.position.x + NODE_W;
16595
+ const y1 = source.position.y + NODE_H / 2;
16596
+ const x2 = target.position.x;
16597
+ const y2 = target.position.y + NODE_H / 2;
16598
+ const midX = (x1 + x2) / 2;
16599
+ const isActive = activeNodeIds.has(edge2.source) || completedNodeIds.has(edge2.source) && (activeNodeIds.has(edge2.target) || completedNodeIds.has(edge2.target));
16600
+ const isComplete2 = completedNodeIds.has(edge2.source) && completedNodeIds.has(edge2.target);
16601
+ const stroke = isComplete2 ? "#10b981" : isActive ? "#818cf8" : "#334155";
16602
+ return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
16603
+ /* @__PURE__ */ jsxRuntime.jsx(
16604
+ "path",
16605
+ {
16606
+ d: `M ${x1} ${y1} C ${midX} ${y1}, ${midX} ${y2}, ${x2} ${y2}`,
16607
+ fill: "none",
16608
+ stroke,
16609
+ strokeWidth: 2,
16610
+ strokeDasharray: "6 4",
16611
+ style: { animation: isActive && !isComplete2 ? "astEdge 0.8s linear infinite" : "none" }
16612
+ }
16613
+ ),
16614
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: x2, cy: y2, r: "3", fill: stroke })
16615
+ ] }, edge2.id);
16616
+ }) }),
16617
+ graph.nodes.map((node2) => {
16618
+ const status = getStatus(node2);
16619
+ const meta = getNodeMeta(node2.type);
16620
+ const statusBorder = status === "running" ? "ring-2 ring-indigo-500/60 scale-[1.04]" : status === "complete" ? "ring-1 ring-emerald-500/40" : "opacity-60";
16621
+ return /* @__PURE__ */ jsxRuntime.jsx(
16622
+ "div",
16623
+ {
16624
+ className: `absolute liquid-surface rounded-2xl px-3 py-2.5 transition-all duration-500 ${statusBorder}`,
16625
+ style: {
16626
+ left: node2.position.x,
16627
+ top: node2.position.y,
16628
+ width: NODE_W,
16629
+ height: NODE_H,
16630
+ ...status === "running" ? { "--glow": meta.glow, animation: "astGlow 1.4s ease-in-out infinite" } : {}
16631
+ },
16632
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2.5", children: [
16633
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${meta.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(meta.icon, { className: `h-4 w-4 ${meta.color}` }) }),
16634
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
16635
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[12px] font-semibold text-white", children: node2.data.label }),
16636
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-[9px] text-gray-500 font-mono", children: [
16637
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: node2.type }),
16638
+ status === "running" && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 text-indigo-300", children: [
16639
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.ArrowRightIcon, { className: "h-2.5 w-2.5 animate-pulse" }),
16640
+ "running"
16641
+ ] }),
16642
+ status === "complete" && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 text-emerald-400", children: [
16643
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-2.5 w-2.5" }),
16644
+ "done"
16645
+ ] })
16646
+ ] })
16647
+ ] })
16648
+ ] })
16649
+ },
16650
+ node2.id
16651
+ );
16652
+ })
16653
+ ] })
16654
+ ] }),
16655
+ isComplete && completionSummary && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-white/5 bg-emerald-500/[0.06] px-5 py-3 flex items-center gap-2", children: [
16656
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-4 w-4 shrink-0 text-emerald-400" }),
16657
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-semibold text-emerald-300", children: completionSummary })
16658
+ ] })
16659
+ ] });
16660
+ }
16661
+
16662
+ // src/components/department-workflow-demo/workflows.ts
16663
+ function node(id, type, label, x, y) {
16664
+ return { id, type, position: { x, y }, data: { entityId: id, label } };
16665
+ }
16666
+ function edge(from, to) {
16667
+ return { id: `${from}->${to}`, source: from, target: to, sourceHandle: null, targetHandle: null };
16668
+ }
16669
+ function buildGraph(nodes, edges) {
16670
+ return { nodes, edges };
16671
+ }
16672
+ function step(label, ...nodes) {
16673
+ return { nodes, label };
16674
+ }
16675
+ var financialWorkflow = {
16676
+ title: "Financial planning & tax compliance",
16677
+ description: "Q4 close \u2014 aggregate transactions, compute Brazilian taxes in parallel, audit for compliance, publish report.",
16678
+ accentBadge: "bg-emerald-500/15 text-emerald-300",
16679
+ completionSummary: "Quarterly report published \xB7 R$ 387k taxes calculated \xB7 0 compliance violations",
16680
+ graph: buildGraph(
16681
+ [
16682
+ node("start", "start", "Trigger Q4 close", 0, 120),
16683
+ node("fetch-tx", "datasource", "Fetch transactions", 220, 120),
16684
+ node("icms", "code", "Calculate ICMS", 460, 10),
16685
+ node("pis-cofins", "code", "Calculate PIS/COFINS", 460, 120),
16686
+ node("iss", "code", "Calculate ISS", 460, 230),
16687
+ node("aggregate", "variable_aggregator", "Aggregate taxes", 700, 120),
16688
+ node("audit", "agent", "Compliance audit", 940, 120),
16689
+ node("report", "dashboard_output", "Publish report", 1180, 120)
16690
+ ],
16691
+ [
16692
+ edge("start", "fetch-tx"),
16693
+ edge("fetch-tx", "icms"),
16694
+ edge("fetch-tx", "pis-cofins"),
16695
+ edge("fetch-tx", "iss"),
16696
+ edge("icms", "aggregate"),
16697
+ edge("pis-cofins", "aggregate"),
16698
+ edge("iss", "aggregate"),
16699
+ edge("aggregate", "audit"),
16700
+ edge("audit", "report")
16701
+ ]
16702
+ ),
16703
+ steps: [
16704
+ step("Triggering quarterly close\u2026", "start"),
16705
+ step("Fetching Q4 transactions\u2026", "fetch-tx"),
16706
+ step("Calculating ICMS / PIS / ISS in parallel\u2026", "icms", "pis-cofins", "iss"),
16707
+ step("Aggregating tax breakdown\u2026", "aggregate"),
16708
+ step("Agent auditing compliance rules\u2026", "audit"),
16709
+ step("Publishing financial report\u2026", "report")
16710
+ ]
16711
+ };
16712
+ var salesWorkflow = {
16713
+ title: "Sales pipeline \u2014 lead to close",
16714
+ description: "Lead arrives \u2192 agents score, qualify, draft proposal, and drive negotiation to close.",
16715
+ accentBadge: "bg-blue-500/15 text-blue-300",
16716
+ completionSummary: "Deal closed \xB7 R$ 45k/m\xEAs \xB7 14-day cycle \xB7 Score 85/100",
16717
+ graph: buildGraph(
16718
+ [
16719
+ node("start", "start", "New lead (XPTO)", 0, 120),
16720
+ node("intake", "datasource", "CRM intake", 220, 120),
16721
+ node("score", "agent", "Lead scoring agent", 460, 120),
16722
+ node("gate", "if_else", "Score \u2265 80?", 700, 120),
16723
+ node("qualify", "agent", "Qualify SQL", 940, 10),
16724
+ node("nurture", "agent", "Nurture queue", 940, 230),
16725
+ node("proposal", "template_transform", "Draft proposal", 1180, 10),
16726
+ node("negotiate", "agent", "Negotiation agent", 1420, 10),
16727
+ node("close", "dashboard_output", "Deal closed", 1660, 10)
16728
+ ],
16729
+ [
16730
+ edge("start", "intake"),
16731
+ edge("intake", "score"),
16732
+ edge("score", "gate"),
16733
+ edge("gate", "qualify"),
16734
+ edge("gate", "nurture"),
16735
+ edge("qualify", "proposal"),
16736
+ edge("proposal", "negotiate"),
16737
+ edge("negotiate", "close")
16738
+ ]
16739
+ ),
16740
+ steps: [
16741
+ step("New lead arrived \u2014 XPTO Ltda\u2026", "start"),
16742
+ step("CRM intake and enrichment\u2026", "intake"),
16743
+ step("Scoring agent analyzing fit\u2026", "score"),
16744
+ step("Routing by score (85/100 \u2192 qualify)\u2026", "gate"),
16745
+ step("Qualifying as SQL\u2026", "qualify"),
16746
+ step("Generating proposal from template\u2026", "proposal"),
16747
+ step("Negotiation agent driving deal\u2026", "negotiate"),
16748
+ step("Deal closed \u2014 booking revenue\u2026", "close")
16749
+ ]
16750
+ };
16751
+ var marketingWorkflow = {
16752
+ title: "Marketing campaign \u2014 Black Friday",
16753
+ description: "Brief \u2192 parallel design, copy, audience \u2192 assemble \u2192 schedule \u2192 ship \u2192 measure.",
16754
+ accentBadge: "bg-pink-500/15 text-pink-300",
16755
+ completionSummary: "Campaign shipped \xB7 142k emails \xB7 6.8% CTR \xB7 +18% ROAS vs. target",
16756
+ graph: buildGraph(
16757
+ [
16758
+ node("start", "start", "Campaign brief", 0, 120),
16759
+ node("strategist", "agent", "Strategy agent", 220, 120),
16760
+ node("design", "agent", "Design agent", 460, 10),
16761
+ node("copy", "agent", "Copy agent", 460, 120),
16762
+ node("audience", "agent", "Audience builder", 460, 230),
16763
+ node("assemble", "variable_aggregator", "Assemble campaign", 700, 120),
16764
+ node("schedule", "agent", "Schedule blast", 940, 120),
16765
+ node("send", "http_request", "Send via email", 1180, 120),
16766
+ node("metrics", "dashboard_output", "Campaign metrics", 1420, 120)
16767
+ ],
16768
+ [
16769
+ edge("start", "strategist"),
16770
+ edge("strategist", "design"),
16771
+ edge("strategist", "copy"),
16772
+ edge("strategist", "audience"),
16773
+ edge("design", "assemble"),
16774
+ edge("copy", "assemble"),
16775
+ edge("audience", "assemble"),
16776
+ edge("assemble", "schedule"),
16777
+ edge("schedule", "send"),
16778
+ edge("send", "metrics")
16779
+ ]
16780
+ ),
16781
+ steps: [
16782
+ step("Receiving campaign brief\u2026", "start"),
16783
+ step("Strategist decomposing brief\u2026", "strategist"),
16784
+ step("Design, copy, and audience agents working in parallel\u2026", "design", "copy", "audience"),
16785
+ step("Assembling final campaign package\u2026", "assemble"),
16786
+ step("Scheduling send window\u2026", "schedule"),
16787
+ step("Dispatching through email provider\u2026", "send"),
16788
+ step("Measuring reach and engagement\u2026", "metrics")
16789
+ ]
16790
+ };
16791
+ var inventoryWorkflow = {
16792
+ title: "Inventory \u2014 predictive reorder",
16793
+ description: "Read stock \u2192 forecast demand \u2192 filter low-stock SKUs \u2192 iterate orders \u2192 publish report.",
16794
+ accentBadge: "bg-orange-500/15 text-orange-300",
16795
+ completionSummary: "12 SKUs reordered \xB7 R$ 84k committed \xB7 projected stockout avoided",
16796
+ graph: buildGraph(
16797
+ [
16798
+ node("start", "start", "Daily sweep", 0, 120),
16799
+ node("stock", "datasource", "Read stock levels", 220, 120),
16800
+ node("forecast", "agent", "Demand forecaster", 460, 120),
16801
+ node("filter", "list_operator", "Filter low-stock", 700, 120),
16802
+ node("loop", "iteration", "Per SKU", 940, 120),
16803
+ node("supplier", "agent", "Supplier selection", 1180, 120),
16804
+ node("order", "http_request", "Place purchase order", 1420, 120),
16805
+ node("report", "dashboard_output", "Reorder report", 1660, 120)
16806
+ ],
16807
+ [
16808
+ edge("start", "stock"),
16809
+ edge("stock", "forecast"),
16810
+ edge("forecast", "filter"),
16811
+ edge("filter", "loop"),
16812
+ edge("loop", "supplier"),
16813
+ edge("supplier", "order"),
16814
+ edge("order", "report")
16815
+ ]
16816
+ ),
16817
+ steps: [
16818
+ step("Kicking off daily inventory sweep\u2026", "start"),
16819
+ step("Reading current stock levels\u2026", "stock"),
16820
+ step("Forecasting demand with seasonality\u2026", "forecast"),
16821
+ step("Filtering SKUs below reorder threshold\u2026", "filter"),
16822
+ step("Iterating over flagged SKUs\u2026", "loop"),
16823
+ step("Selecting supplier per SKU\u2026", "supplier"),
16824
+ step("Placing purchase orders\u2026", "order"),
16825
+ step("Publishing reorder report\u2026", "report")
16826
+ ]
16827
+ };
16828
+ var hrWorkflow = {
16829
+ title: "HR \u2014 recruitment pipeline",
16830
+ description: "Screen resumes \u2192 rank by fit \u2192 interview scheduling \u2192 decision \u2192 hiring dashboard.",
16831
+ accentBadge: "bg-green-500/15 text-green-300",
16832
+ completionSummary: "3 offers extended \xB7 48 candidates processed \xB7 avg cycle 6 days",
16833
+ graph: buildGraph(
16834
+ [
16835
+ node("start", "start", "New posting", 0, 120),
16836
+ node("pool", "datasource", "Resume pool", 220, 120),
16837
+ node("screen", "agent", "Resume screener", 460, 120),
16838
+ node("rank", "list_operator", "Rank by fit", 700, 120),
16839
+ node("schedule", "agent", "Schedule interviews", 940, 120),
16840
+ node("assess", "agent", "Skills assessment", 1180, 120),
16841
+ node("decide", "agent", "Decision engine", 1420, 120),
16842
+ node("hire", "dashboard_output", "Hiring dashboard", 1660, 120)
16843
+ ],
16844
+ [
16845
+ edge("start", "pool"),
16846
+ edge("pool", "screen"),
16847
+ edge("screen", "rank"),
16848
+ edge("rank", "schedule"),
16849
+ edge("schedule", "assess"),
16850
+ edge("assess", "decide"),
16851
+ edge("decide", "hire")
16852
+ ]
16853
+ ),
16854
+ steps: [
16855
+ step("Job posting published\u2026", "start"),
16856
+ step("Pulling resume pool\u2026", "pool"),
16857
+ step("Screener agent filtering candidates\u2026", "screen"),
16858
+ step("Ranking candidates by role fit\u2026", "rank"),
16859
+ step("Scheduling interviews with top tier\u2026", "schedule"),
16860
+ step("Running skills assessment\u2026", "assess"),
16861
+ step("Decision engine producing offers\u2026", "decide"),
16862
+ step("Publishing to hiring dashboard\u2026", "hire")
16863
+ ]
16864
+ };
16865
+ var customerAnalyticsWorkflow = {
16866
+ title: "Customer analytics \u2014 churn & LTV",
16867
+ description: "Segment customers \u2192 parallel churn and LTV models \u2192 combine \u2192 recommend retention plays.",
16868
+ accentBadge: "bg-indigo-500/15 text-indigo-300",
16869
+ completionSummary: "4 at-risk segments identified \xB7 17 retention plays ranked by expected LTV lift",
16870
+ graph: buildGraph(
16871
+ [
16872
+ node("start", "start", "Nightly analytics", 0, 120),
16873
+ node("events", "datasource", "Customer events", 220, 120),
16874
+ node("segment", "agent", "Segmentation agent", 460, 120),
16875
+ node("churn", "agent", "Churn model", 700, 10),
16876
+ node("ltv", "agent", "LTV model", 700, 230),
16877
+ node("combine", "variable_aggregator", "Combine insights", 940, 120),
16878
+ node("actions", "agent", "Action recommender", 1180, 120),
16879
+ node("dashboard", "dashboard_output", "Analytics dashboard", 1420, 120)
16880
+ ],
16881
+ [
16882
+ edge("start", "events"),
16883
+ edge("events", "segment"),
16884
+ edge("segment", "churn"),
16885
+ edge("segment", "ltv"),
16886
+ edge("churn", "combine"),
16887
+ edge("ltv", "combine"),
16888
+ edge("combine", "actions"),
16889
+ edge("actions", "dashboard")
16890
+ ]
16891
+ ),
16892
+ steps: [
16893
+ step("Triggering nightly analytics\u2026", "start"),
16894
+ step("Pulling customer event stream\u2026", "events"),
16895
+ step("Segmentation agent clustering customers\u2026", "segment"),
16896
+ step("Churn and LTV models scoring in parallel\u2026", "churn", "ltv"),
16897
+ step("Combining predictions per segment\u2026", "combine"),
16898
+ step("Recommender ranking retention plays\u2026", "actions"),
16899
+ step("Publishing analytics dashboard\u2026", "dashboard")
16900
+ ]
16901
+ };
16902
+ var lgpdWorkflow = {
16903
+ title: "LGPD compliance \u2014 privacy sweep",
16904
+ description: "Scan audit logs \u2192 detect PII access violations \u2192 remediate \u2192 notify DPO \u2192 report.",
16905
+ accentBadge: "bg-red-500/15 text-red-300",
16906
+ completionSummary: "2 violations remediated \xB7 DPO notified \xB7 compliance report filed",
16907
+ graph: buildGraph(
16908
+ [
16909
+ node("start", "start", "Daily privacy sweep", 0, 120),
16910
+ node("logs", "datasource", "Audit logs", 220, 120),
16911
+ node("scan", "agent", "PII access scanner", 460, 120),
16912
+ node("gate", "if_else", "Violations?", 700, 120),
16913
+ node("remediate", "agent", "Remediation agent", 940, 10),
16914
+ node("notify", "http_request", "Notify DPO", 1180, 10),
16915
+ node("report", "dashboard_output", "Compliance report", 1420, 120)
16916
+ ],
16917
+ [
16918
+ edge("start", "logs"),
16919
+ edge("logs", "scan"),
16920
+ edge("scan", "gate"),
16921
+ edge("gate", "remediate"),
16922
+ edge("gate", "report"),
16923
+ edge("remediate", "notify"),
16924
+ edge("notify", "report")
16925
+ ]
16926
+ ),
16927
+ steps: [
16928
+ step("Starting daily privacy sweep\u2026", "start"),
16929
+ step("Pulling access audit logs\u2026", "logs"),
16930
+ step("Scanning for PII access violations\u2026", "scan"),
16931
+ step("Branching on findings\u2026", "gate"),
16932
+ step("Remediation agent applying fixes\u2026", "remediate"),
16933
+ step("Notifying data protection officer\u2026", "notify"),
16934
+ step("Filing compliance report\u2026", "report")
16935
+ ]
16936
+ };
16937
+ function DepartmentAssistantDemo({
16938
+ flows,
16939
+ initialIndex = 0,
16940
+ autoRotate = true,
16941
+ dashboardHoldMs = 1e4,
16942
+ typingSpeedMs = 32,
16943
+ workflowStepMs = 1050,
16944
+ className
16945
+ }) {
16946
+ const [flowIndex, setFlowIndex] = React12.useState(initialIndex);
16947
+ const [stage, setStage] = React12.useState("input");
16948
+ const [typed, setTyped] = React12.useState("");
16949
+ const rotateTimerRef = React12.useRef(null);
16950
+ const flow = flows[flowIndex];
16951
+ React12.useEffect(() => {
16952
+ if (stage !== "input") return void 0;
16953
+ setTyped("");
16954
+ let i = 0;
16955
+ const interval = setInterval(() => {
16956
+ i += 1;
16957
+ if (i <= flow.prompt.length) {
16958
+ setTyped(flow.prompt.slice(0, i));
16959
+ } else {
16960
+ clearInterval(interval);
16961
+ const t = setTimeout(() => setStage("workflow"), 700);
16962
+ return () => clearTimeout(t);
16963
+ }
16964
+ return void 0;
16965
+ }, typingSpeedMs);
16966
+ return () => clearInterval(interval);
16967
+ }, [stage, flow.prompt, typingSpeedMs]);
16968
+ const handleWorkflowComplete = React12.useCallback(() => {
16969
+ const t = setTimeout(() => setStage("dashboard"), 1200);
16970
+ rotateTimerRef.current = t;
16971
+ }, []);
16972
+ React12.useEffect(() => {
16973
+ if (stage !== "dashboard") return void 0;
16974
+ if (!autoRotate) return void 0;
16975
+ const t = setTimeout(() => {
16976
+ setFlowIndex((prev) => (prev + 1) % flows.length);
16977
+ setStage("input");
16978
+ }, dashboardHoldMs);
16979
+ return () => clearTimeout(t);
16980
+ }, [stage, autoRotate, dashboardHoldMs, flows.length]);
16981
+ const handleDepartmentSelect = React12.useCallback((next) => {
16982
+ if (rotateTimerRef.current) clearTimeout(rotateTimerRef.current);
16983
+ setFlowIndex(next);
16984
+ setStage("input");
16985
+ }, []);
16986
+ const stageIndex = React12.useMemo(() => stage === "input" ? 0 : stage === "workflow" ? 1 : 2, [stage]);
16987
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `liquid-surface rounded-3xl overflow-hidden ${className ?? ""}`, children: [
16988
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-4 py-3 flex flex-wrap items-center gap-2", children: [
16989
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pr-3", children: [
16990
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-blue-500 to-purple-600", children: /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CpuChipIcon, { className: "h-4 w-4 text-white" }) }),
16991
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-gray-900 dark:text-white", children: "Kori AI Assistant" })
16992
+ ] }),
16993
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
16994
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: flows.map((entry, index) => {
16995
+ const isActive = index === flowIndex;
16996
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16997
+ "button",
16998
+ {
16999
+ type: "button",
17000
+ onClick: () => handleDepartmentSelect(index),
17001
+ className: `group inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all ${isActive ? `bg-gradient-to-r ${entry.accent} text-white shadow-lg shadow-indigo-500/20 scale-105` : "text-gray-600 dark:text-gray-400 hover:bg-white/5 hover:text-gray-900 dark:hover:text-white"}`,
17002
+ children: [
17003
+ /* @__PURE__ */ jsxRuntime.jsx(entry.icon, { className: "h-3.5 w-3.5" }),
17004
+ entry.name
17005
+ ]
17006
+ },
17007
+ entry.id
17008
+ );
17009
+ }) })
17010
+ ] }),
17011
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-6 py-3 flex items-center gap-3 text-[11px]", children: [
17012
+ /* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: "Ask", stageIndex, mine: 0 }),
17013
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-white/10 to-white/5" }),
17014
+ /* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: "Orchestrate", stageIndex, mine: 1 }),
17015
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-white/5 to-white/10" }),
17016
+ /* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: "Deliver", stageIndex, mine: 2 })
17017
+ ] }),
17018
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", style: { minHeight: 600 }, children: /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.AnimatePresence, { mode: "wait", children: [
17019
+ stage === "input" && /* @__PURE__ */ jsxRuntime.jsx(
17020
+ framerMotion.motion.div,
17021
+ {
17022
+ initial: { opacity: 0, y: 12 },
17023
+ animate: { opacity: 1, y: 0 },
17024
+ exit: { opacity: 0, y: -12 },
17025
+ transition: { duration: 0.45 },
17026
+ className: "flex items-center justify-center p-10",
17027
+ children: /* @__PURE__ */ jsxRuntime.jsx(InputStage3, { prompt: typed, department: flow.name, agents: flow.agents })
17028
+ },
17029
+ `input-${flow.id}`
17030
+ ),
17031
+ stage === "workflow" && /* @__PURE__ */ jsxRuntime.jsx(
17032
+ framerMotion.motion.div,
17033
+ {
17034
+ initial: { opacity: 0, scale: 0.98 },
17035
+ animate: { opacity: 1, scale: 1 },
17036
+ exit: { opacity: 0, scale: 0.98 },
17037
+ transition: { duration: 0.45 },
17038
+ className: "p-6",
17039
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17040
+ DepartmentWorkflowDemo,
17041
+ {
17042
+ workflow: flow.workflow,
17043
+ autoPlay: true,
17044
+ hideHeader: true,
17045
+ stepDurationMs: workflowStepMs,
17046
+ onComplete: handleWorkflowComplete
17047
+ },
17048
+ `wf-${flow.id}`
17049
+ )
17050
+ },
17051
+ `workflow-${flow.id}`
17052
+ ),
17053
+ stage === "dashboard" && /* @__PURE__ */ jsxRuntime.jsx(
17054
+ framerMotion.motion.div,
17055
+ {
17056
+ initial: { opacity: 0, y: 12 },
17057
+ animate: { opacity: 1, y: 0 },
17058
+ exit: { opacity: 0, y: -12 },
17059
+ transition: { duration: 0.45 },
17060
+ className: "p-4",
17061
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-white/10 bg-white dark:bg-zinc-950 shadow-2xl overflow-hidden", style: { height: 580 }, children: flow.dashboard })
17062
+ },
17063
+ `dashboard-${flow.id}`
17064
+ )
17065
+ ] }) }),
17066
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-t border-white/5 px-5 py-3", children: [
17067
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-[11px] text-gray-500 dark:text-gray-400", children: [
17068
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BoltIcon, { className: "h-3.5 w-3.5 text-indigo-500" }),
17069
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
17070
+ stage === "input" && "Usu\xE1rio envia um pedido ao assistente\u2026",
17071
+ stage === "workflow" && "Astrlabe orquestrando agentes e datasources\u2026",
17072
+ stage === "dashboard" && "Pronto \u2014 dashboard do ERP atualizado."
17073
+ ] })
17074
+ ] }),
17075
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: flows.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
17076
+ "span",
17077
+ {
17078
+ className: `h-1 rounded-full transition-all duration-500 ${index === flowIndex ? "w-8 bg-indigo-500" : "w-1.5 bg-gray-300 dark:bg-white/10"}`
17079
+ },
17080
+ entry.id
17081
+ )) })
17082
+ ] })
17083
+ ] });
17084
+ }
17085
+ function StageChip({ label, stageIndex, mine }) {
17086
+ const isActive = stageIndex === mine;
17087
+ const isDone = stageIndex > mine;
17088
+ return /* @__PURE__ */ jsxRuntime.jsxs(
17089
+ "div",
17090
+ {
17091
+ className: `inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 font-semibold transition-colors ${isActive ? "bg-indigo-500/15 text-indigo-600 dark:text-indigo-300" : isDone ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-300" : "bg-white/5 text-gray-500 dark:text-gray-500"}`,
17092
+ children: [
17093
+ isDone ? /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-3.5 w-3.5" }) : isActive ? /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BoltIcon, { className: "h-3.5 w-3.5 animate-pulse" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }),
17094
+ label
17095
+ ]
17096
+ }
17097
+ );
17098
+ }
17099
+ function InputStage3({ prompt, department, agents }) {
17100
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-white/10 bg-white/70 dark:bg-zinc-900/70 p-8 shadow-2xl backdrop-blur-sm", children: [
17101
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 flex items-center gap-3", children: [
17102
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-12 rounded-xl bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.SparklesIcon, { className: "h-6 w-6 text-white" }) }),
17103
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17104
+ /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-base font-bold text-gray-900 dark:text-white", children: [
17105
+ "Assistente \u2014 ",
17106
+ department
17107
+ ] }),
17108
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Digite um pedido e veja os agentes atuarem." })
17109
+ ] })
17110
+ ] }),
17111
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border-2 border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-400/30 dark:bg-indigo-500/5 p-4 min-h-[120px]", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-base font-medium text-gray-900 dark:text-white", children: [
17112
+ prompt,
17113
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-block w-0.5 h-5 bg-indigo-500 animate-pulse" })
17114
+ ] }) }),
17115
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400", children: [
17116
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BoltIcon, { className: "h-3.5 w-3.5 text-indigo-500" }),
17117
+ "Agentes prontos:",
17118
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: agents.map((agent) => /* @__PURE__ */ jsxRuntime.jsx(
17119
+ "span",
17120
+ {
17121
+ className: "inline-flex items-center rounded-full border border-indigo-200 bg-indigo-50 px-2 py-0.5 text-[10px] font-semibold text-indigo-700 dark:border-indigo-500/30 dark:bg-indigo-500/10 dark:text-indigo-300",
17122
+ children: agent
17123
+ },
17124
+ agent
17125
+ )) })
17126
+ ] })
17127
+ ] }) });
17128
+ }
17129
+ var koriDepartmentFlows = [
17130
+ {
17131
+ id: "sales",
17132
+ name: "Vendas",
17133
+ icon: HeroIcons.ShoppingCartIcon,
17134
+ accent: "from-blue-500 to-indigo-500",
17135
+ prompt: "Qualificar lead empresa XPTO e preparar proposta comercial",
17136
+ agents: ["Sales", "CRM", "Scoring", "Proposal"],
17137
+ workflow: salesWorkflow,
17138
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(SalesDemo, {})
17139
+ },
17140
+ {
17141
+ id: "financial",
17142
+ name: "Financeiro",
17143
+ icon: HeroIcons.BanknotesIcon,
17144
+ accent: "from-emerald-500 to-teal-500",
17145
+ prompt: "Gerar relat\xF3rio financeiro e calcular impostos do trimestre",
17146
+ agents: ["Finance", "Tax", "Reports", "Compliance"],
17147
+ workflow: financialWorkflow,
17148
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(FinancialDemo, {})
17149
+ },
17150
+ {
17151
+ id: "marketing",
17152
+ name: "Marketing",
17153
+ icon: HeroIcons.MegaphoneIcon,
17154
+ accent: "from-pink-500 to-rose-500",
17155
+ prompt: "Criar campanha de Black Friday para e-commerce",
17156
+ agents: ["Marketing", "Design", "E-commerce", "Email"],
17157
+ workflow: marketingWorkflow,
17158
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(MarketingDemo, {})
17159
+ },
17160
+ {
17161
+ id: "inventory",
17162
+ name: "Estoque",
17163
+ icon: HeroIcons.CubeIcon,
17164
+ accent: "from-orange-500 to-amber-500",
17165
+ prompt: "Verificar estoque e sugerir reposi\xE7\xF5es autom\xE1ticas",
17166
+ agents: ["Inventory", "Supply", "Forecast", "Logistics"],
17167
+ workflow: inventoryWorkflow,
17168
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(InventoryDemo, {})
17169
+ },
17170
+ {
17171
+ id: "hr",
17172
+ name: "RH",
17173
+ icon: HeroIcons.UsersIcon,
17174
+ accent: "from-green-500 to-emerald-500",
17175
+ prompt: "Processar candidaturas para vaga de Desenvolvedor Senior",
17176
+ agents: ["HR", "Recruiter", "Skills", "Interview"],
17177
+ workflow: hrWorkflow,
17178
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(HRRecruitmentDemo, {})
17179
+ },
17180
+ {
17181
+ id: "analytics",
17182
+ name: "Analytics",
17183
+ icon: HeroIcons.DocumentTextIcon,
17184
+ accent: "from-indigo-500 to-violet-500",
17185
+ prompt: "Analisar comportamento dos clientes e identificar oportunidades",
17186
+ agents: ["Analytics", "CRM", "Insights", "Reports"],
17187
+ workflow: customerAnalyticsWorkflow,
17188
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(CustomerAnalyticsDemo, {})
17189
+ },
17190
+ {
17191
+ id: "lgpd",
17192
+ name: "LGPD",
17193
+ icon: HeroIcons.ShieldCheckIcon,
17194
+ accent: "from-red-500 to-rose-500",
17195
+ prompt: "Auditar dados pessoais e verificar conformidade LGPD",
17196
+ agents: ["LGPD", "Privacy", "Audit", "Security"],
17197
+ workflow: lgpdWorkflow,
17198
+ dashboard: /* @__PURE__ */ jsxRuntime.jsx(LGPDComplianceDemo, {})
17199
+ }
17200
+ ];
16418
17201
  function EntityDrawer({
16419
17202
  open,
16420
17203
  onClose,
@@ -23704,6 +24487,8 @@ exports.DashboardView = DashboardView;
23704
24487
  exports.DataPagination = DataPagination;
23705
24488
  exports.DatePicker = DatePicker;
23706
24489
  exports.DeleteSwipeAction = DeleteSwipeAction;
24490
+ exports.DepartmentAssistantDemo = DepartmentAssistantDemo;
24491
+ exports.DepartmentWorkflowDemo = DepartmentWorkflowDemo;
23707
24492
  exports.Description = Description4;
23708
24493
  exports.DetailsPopover = DetailsPopover;
23709
24494
  exports.DevModeBanner = DevModeBanner;
@@ -24068,12 +24853,14 @@ exports.cardPress = cardPress;
24068
24853
  exports.computeDomain = computeDomain;
24069
24854
  exports.computeSeries = computeSeries;
24070
24855
  exports.createMotionProps = createMotionProps;
24856
+ exports.customerAnalyticsWorkflow = customerAnalyticsWorkflow;
24071
24857
  exports.durations = durations;
24072
24858
  exports.durationsReduced = durationsReduced;
24073
24859
  exports.easings = easings;
24074
24860
  exports.fadeOnly = fadeOnly;
24075
24861
  exports.fadeScale = fadeScale;
24076
24862
  exports.filterByPermission = filterByPermission;
24863
+ exports.financialWorkflow = financialWorkflow;
24077
24864
  exports.formatAddress = formatAddress;
24078
24865
  exports.formatCurrency = formatCurrency;
24079
24866
  exports.formatCurrency2 = formatCurrency2;
@@ -24270,6 +25057,8 @@ exports.getUsGradient = getUsGradient;
24270
25057
  exports.getUsHexColor = getUsHexColor;
24271
25058
  exports.getUsPalette = getUsPalette;
24272
25059
  exports.getVariants = getVariants;
25060
+ exports.hrWorkflow = hrWorkflow;
25061
+ exports.inventoryWorkflow = inventoryWorkflow;
24273
25062
  exports.iosColors = iosColors;
24274
25063
  exports.isValidArgentinaProvince = isValidArgentinaProvince;
24275
25064
  exports.isValidAustraliaState = isValidAustraliaState;
@@ -24302,8 +25091,11 @@ exports.isValidThailandProvince = isValidThailandProvince;
24302
25091
  exports.isValidTurkeyProvince = isValidTurkeyProvince;
24303
25092
  exports.isValidUKNation = isValidUKNation;
24304
25093
  exports.isValidUsState = isValidUsState;
25094
+ exports.koriDepartmentFlows = koriDepartmentFlows;
25095
+ exports.lgpdWorkflow = lgpdWorkflow;
24305
25096
  exports.listItem = listItem;
24306
25097
  exports.listItemReduced = listItemReduced;
25098
+ exports.marketingWorkflow = marketingWorkflow;
24307
25099
  exports.notificationBanner = notificationBanner;
24308
25100
  exports.notificationBannerReduced = notificationBannerReduced;
24309
25101
  exports.pageControlDot = pageControlDot;
@@ -24311,6 +25103,7 @@ exports.prefersReducedMotion = prefersReducedMotion;
24311
25103
  exports.registerCountry = registerCountry;
24312
25104
  exports.registerSubdivisionTheme = registerSubdivisionTheme;
24313
25105
  exports.resolveGlassAccentRgb = resolveGlassAccentRgb;
25106
+ exports.salesWorkflow = salesWorkflow;
24314
25107
  exports.selectIsAuthenticated = selectIsAuthenticated;
24315
25108
  exports.selectShowShellChrome = selectShowShellChrome;
24316
25109
  exports.selectUserInitial = selectUserInitial;
@@ -24332,5 +25125,5 @@ exports.usePullToRefresh = usePullToRefresh;
24332
25125
  exports.validateDashboardSpec = validateDashboardSpec;
24333
25126
  exports.xScale = xScale;
24334
25127
  exports.yScale = yScale;
24335
- //# sourceMappingURL=chunk-3BR5TG34.js.map
24336
- //# sourceMappingURL=chunk-3BR5TG34.js.map
25128
+ //# sourceMappingURL=chunk-KTGWGJZ6.js.map
25129
+ //# sourceMappingURL=chunk-KTGWGJZ6.js.map