@seed-ship/mcp-ui-solid 2.13.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import { delegateEvents, getNextElement, template, getNextMarker, insert, createComponent, effect, setAttribute, runHydrationEvents, memo, className, setStyleProperty, setProperty } from "solid-js/web";
2
2
  import { createSignal, createEffect, onCleanup, Show, For, Switch, Match } from "solid-js";
3
3
  import { FormFieldRenderer } from "./FormFieldRenderer.js";
4
- var _tmpl$ = /* @__PURE__ */ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"aria-label=Close><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>&#128269;</span><p class="text-sm text-gray-500 dark:text-gray-400">No results for these filters</p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">Modify filters`), _tmpl$6 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">Code: <!$><!/>`), _tmpl$8 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">&#128260; Retry`), _tmpl$9 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">Close`), _tmpl$0 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">⚠️</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Search`), _tmpl$10 = /* @__PURE__ */ template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>&#128221;</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
4
+ var _tmpl$ = /* @__PURE__ */ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"aria-label=Close><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>&#128269;</span><p class="text-sm text-gray-500 dark:text-gray-400">No results for these filters</p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">Modify filters`), _tmpl$6 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">Code: <!$><!/>`), _tmpl$8 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">&#128260; Retry`), _tmpl$9 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">Close`), _tmpl$0 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">⚠️</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Search`), _tmpl$10 = /* @__PURE__ */ template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ template(`<div class="absolute bottom-1 right-1 px-2 py-1 text-[9px] font-mono bg-black/80 text-green-400 rounded z-50 pointer-events-none"><!$><!/> | ev:<!$><!/> | sec:<!$><!/> | <!$><!/> | last:<!$><!/>`), _tmpl$12 = /* @__PURE__ */ template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>&#128221;</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
5
5
  @keyframes scratchpad-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
6
- `), _tmpl$12 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$13 = /* @__PURE__ */ template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$14 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$15 = /* @__PURE__ */ template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$16 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$17 = /* @__PURE__ */ template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$18 = /* @__PURE__ */ template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$19 = /* @__PURE__ */ template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$20 = /* @__PURE__ */ template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$21 = /* @__PURE__ */ template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$22 = /* @__PURE__ */ template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$23 = /* @__PURE__ */ template(`<div class="px-4 py-3"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$24 = /* @__PURE__ */ template(`<div class=space-y-1>`), _tmpl$25 = /* @__PURE__ */ template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$26 = /* @__PURE__ */ template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$27 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$28 = /* @__PURE__ */ template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$29 = /* @__PURE__ */ template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$30 = /* @__PURE__ */ template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$31 = /* @__PURE__ */ template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$32 = /* @__PURE__ */ template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$33 = /* @__PURE__ */ template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$34 = /* @__PURE__ */ template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$35 = /* @__PURE__ */ template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$36 = /* @__PURE__ */ template(`<span class=ml-1>✓`), _tmpl$37 = /* @__PURE__ */ template(`<button type=button><!$><!/><!$><!/>`), _tmpl$38 = /* @__PURE__ */ template(`<form class="flex flex-col gap-3"><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$39 = /* @__PURE__ */ template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$40 = /* @__PURE__ */ template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$41 = /* @__PURE__ */ template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$42 = /* @__PURE__ */ template(`<div class="mt-2 ml-6">`), _tmpl$43 = /* @__PURE__ */ template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$44 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-2">`), _tmpl$45 = /* @__PURE__ */ template(`<span class=mr-1>`), _tmpl$46 = /* @__PURE__ */ template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$47 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$48 = /* @__PURE__ */ template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>⚠️</span><span>`), _tmpl$49 = /* @__PURE__ */ template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$50 = /* @__PURE__ */ template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><div class="flex flex-wrap gap-2"></div><!$><!/>`), _tmpl$51 = /* @__PURE__ */ template(`<span>`), _tmpl$52 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$53 = /* @__PURE__ */ template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$54 = /* @__PURE__ */ template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">&#9998; Modify`), _tmpl$55 = /* @__PURE__ */ template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$56 = /* @__PURE__ */ template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$57 = /* @__PURE__ */ template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$58 = /* @__PURE__ */ template(`<div class=space-y-2>`), _tmpl$59 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$60 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$61 = /* @__PURE__ */ template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$62 = /* @__PURE__ */ template(`<span class="text-[10px] opacity-75">`), _tmpl$63 = /* @__PURE__ */ template(`<div><span></span><span></span><!$><!/>`);
6
+ </style><!$><!/>`), _tmpl$13 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$14 = /* @__PURE__ */ template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$15 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$16 = /* @__PURE__ */ template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$17 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$18 = /* @__PURE__ */ template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$19 = /* @__PURE__ */ template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$20 = /* @__PURE__ */ template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$21 = /* @__PURE__ */ template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$22 = /* @__PURE__ */ template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$23 = /* @__PURE__ */ template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$24 = /* @__PURE__ */ template(`<div class="px-4 py-3"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$25 = /* @__PURE__ */ template(`<div class=space-y-1>`), _tmpl$26 = /* @__PURE__ */ template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$27 = /* @__PURE__ */ template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$28 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$30 = /* @__PURE__ */ template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$31 = /* @__PURE__ */ template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$32 = /* @__PURE__ */ template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$33 = /* @__PURE__ */ template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$34 = /* @__PURE__ */ template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$35 = /* @__PURE__ */ template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$36 = /* @__PURE__ */ template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$37 = /* @__PURE__ */ template(`<span class=ml-1>✓`), _tmpl$38 = /* @__PURE__ */ template(`<button type=button><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ template(`<form class="flex flex-col gap-3"><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$40 = /* @__PURE__ */ template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$41 = /* @__PURE__ */ template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$42 = /* @__PURE__ */ template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$43 = /* @__PURE__ */ template(`<div class="mt-2 ml-6">`), _tmpl$44 = /* @__PURE__ */ template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$45 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-2">`), _tmpl$46 = /* @__PURE__ */ template(`<span class=mr-1>`), _tmpl$47 = /* @__PURE__ */ template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$48 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$49 = /* @__PURE__ */ template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>⚠️</span><span>`), _tmpl$50 = /* @__PURE__ */ template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$51 = /* @__PURE__ */ template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><div class="flex flex-wrap gap-2"></div><!$><!/>`), _tmpl$52 = /* @__PURE__ */ template(`<span>`), _tmpl$53 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$54 = /* @__PURE__ */ template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$55 = /* @__PURE__ */ template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">&#9998; Modify`), _tmpl$56 = /* @__PURE__ */ template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$57 = /* @__PURE__ */ template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$58 = /* @__PURE__ */ template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$59 = /* @__PURE__ */ template(`<div class=space-y-2>`), _tmpl$60 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$61 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$62 = /* @__PURE__ */ template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$63 = /* @__PURE__ */ template(`<span class="text-[10px] opacity-75">`), _tmpl$64 = /* @__PURE__ */ template(`<div><span></span><span></span><!$><!/>`), _tmpl$65 = /* @__PURE__ */ template(`<button type=button>&#128260; <!$><!/>`), _tmpl$66 = /* @__PURE__ */ template(`<button type=button class="px-2 py-1 text-xs opacity-70 hover:opacity-100">&#9654; Details`), _tmpl$67 = /* @__PURE__ */ template(`<pre class="mt-2 text-xs opacity-70 overflow-x-auto">`), _tmpl$68 = /* @__PURE__ */ template(`<div><div class="flex items-start gap-2"><span class=flex-shrink-0></span><div class=flex-1><p></p><div class="flex gap-2 mt-2"><!$><!/><!$><!/></div><!$><!/>`), _tmpl$69 = /* @__PURE__ */ template(`<span class="text-xs font-bold text-blue-600 dark:text-blue-400"><!$><!/> results`), _tmpl$70 = /* @__PURE__ */ template(`<p class="text-[10px] text-gray-400">`), _tmpl$71 = /* @__PURE__ */ template(`<div class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-2"><div class="flex items-center justify-between mb-1.5"><span class="text-sm font-medium text-gray-900 dark:text-white"><!$><!/> <!$><!/></span><!$><!/></div><div class="flex flex-wrap gap-1.5 mb-1"></div><!$><!/>`), _tmpl$72 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/>`), _tmpl$73 = /* @__PURE__ */ template(`<div class=overflow-x-auto><table class="min-w-full text-xs"><thead><tr><th class="px-2 py-1 text-left text-gray-500 dark:text-gray-400"></th><th class="px-2 py-1 text-left font-medium text-blue-600 dark:text-blue-400"></th><th class="px-2 py-1 text-left font-medium text-purple-600 dark:text-purple-400"></th></tr></thead><tbody>`), _tmpl$74 = /* @__PURE__ */ template(`<tr><td class="px-2 py-1 font-mono text-gray-500 dark:text-gray-400"></td><td class="px-2 py-1 text-gray-900 dark:text-white"></td><td class="px-2 py-1 text-gray-900 dark:text-white">`);
7
7
  const STATUS_BADGES = {
8
8
  loading: {
9
9
  label: "Loading...",
@@ -33,28 +33,57 @@ const STATUS_BADGES = {
33
33
  const ScratchpadPanel = (props) => {
34
34
  const [collapsed, setCollapsed] = createSignal(false);
35
35
  const [localPreview, setLocalPreview] = createSignal(void 0);
36
+ const [loadingAction, setLoadingAction] = createSignal(null);
36
37
  let previewTimer = null;
37
38
  const badge = () => STATUS_BADGES[props.state.status] || STATUS_BADGES.loading;
38
39
  const isClosable = () => props.closable !== false;
39
40
  const isCollapsible = () => props.collapsible !== false;
40
41
  const preview = () => localPreview() || props.state.preview;
41
42
  const hasFilters = () => Object.keys(props.state.filters || {}).length > 0;
43
+ const [eventCount, setEventCount] = createSignal(0);
44
+ const [lastEvent, setLastEvent] = createSignal("");
45
+ const debugLog = (event, data) => {
46
+ if (!props.debug) return;
47
+ setEventCount((c) => c + 1);
48
+ setLastEvent(event);
49
+ console.log(`[ScratchpadPanel:${props.state.id}] ${event}`, data || "");
50
+ };
42
51
  const CLOSE_ALIASES = /* @__PURE__ */ new Set(["done", "close", "dismiss", "validate", "cancel", "sufficient"]);
43
52
  const handleAction = (action, data) => {
44
53
  var _a;
54
+ debugLog("onAction", {
55
+ action,
56
+ asyncAction: props.asyncAction,
57
+ data
58
+ });
59
+ if (props.asyncAction && !CLOSE_ALIASES.has(action)) {
60
+ setLoadingAction(action);
61
+ }
45
62
  (_a = props.onAction) == null ? void 0 : _a.call(props, action, data);
46
63
  if (CLOSE_ALIASES.has(action) && props.onClose) {
47
64
  props.onClose();
48
65
  }
49
66
  };
50
67
  createEffect(() => {
51
- if (props.state.status === "complete" && props.autoCloseDelay) {
68
+ var _a;
69
+ debugLog("state", {
70
+ status: props.state.status,
71
+ sections: (_a = props.state.sections) == null ? void 0 : _a.length,
72
+ filters: Object.keys(props.state.filters || {}),
73
+ turn: props.state.turn
74
+ });
75
+ });
76
+ createEffect(() => {
77
+ if (props.state.status === "complete" && props.autoCloseDelay && !props.pinned) {
52
78
  const timer = setTimeout(() => {
53
79
  var _a;
54
80
  return (_a = props.onClose) == null ? void 0 : _a.call(props);
55
81
  }, props.autoCloseDelay);
56
82
  onCleanup(() => clearTimeout(timer));
57
83
  }
84
+ if (props.state.status !== "processing" && loadingAction()) {
85
+ setLoadingAction(null);
86
+ }
58
87
  });
59
88
  createEffect(() => {
60
89
  const endpoint = props.state.previewEndpoint;
@@ -84,8 +113,7 @@ const ScratchpadPanel = (props) => {
84
113
  if (previewTimer) clearTimeout(previewTimer);
85
114
  });
86
115
  return (() => {
87
- var _el$ = getNextElement(_tmpl$11), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = getNextMarker(_el$7.nextSibling), _el$9 = _el$3.nextSibling, _el$0 = _el$9.firstChild, _el$10 = _el$0.nextSibling, [_el$11, _co$2] = getNextMarker(_el$10.nextSibling), _el$52 = _el$2.nextSibling, [_el$53, _co$10] = getNextMarker(_el$52.nextSibling);
88
- _el$53.nextSibling;
116
+ var _el$ = getNextElement(_tmpl$12), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = getNextMarker(_el$7.nextSibling), _el$9 = _el$3.nextSibling, _el$0 = _el$9.firstChild, _el$10 = _el$0.nextSibling, [_el$11, _co$2] = getNextMarker(_el$10.nextSibling), _el$67 = _el$2.nextSibling, [_el$68, _co$15] = getNextMarker(_el$67.nextSibling), _el$51 = _el$68.nextSibling, _el$69 = _el$51.nextSibling, [_el$70, _co$16] = getNextMarker(_el$69.nextSibling);
89
117
  _el$2.$$click = () => isCollapsible() && setCollapsed(!collapsed());
90
118
  insert(_el$5, () => props.state.title);
91
119
  insert(_el$3, createComponent(Show, {
@@ -135,27 +163,27 @@ const ScratchpadPanel = (props) => {
135
163
  return i() > 0;
136
164
  },
137
165
  get children() {
138
- return getNextElement(_tmpl$12);
166
+ return getNextElement(_tmpl$13);
139
167
  }
140
168
  }), (() => {
141
- var _el$55 = getNextElement(_tmpl$14), _el$61 = _el$55.firstChild, [_el$62, _co$12] = getNextMarker(_el$61.nextSibling), _el$56 = _el$62.nextSibling, _el$63 = _el$56.nextSibling, [_el$64, _co$13] = getNextMarker(_el$63.nextSibling), _el$65 = _el$64.nextSibling, [_el$66, _co$14] = getNextMarker(_el$65.nextSibling);
142
- insert(_el$55, (() => {
169
+ var _el$72 = getNextElement(_tmpl$15), _el$78 = _el$72.firstChild, [_el$79, _co$18] = getNextMarker(_el$78.nextSibling), _el$73 = _el$79.nextSibling, _el$80 = _el$73.nextSibling, [_el$81, _co$19] = getNextMarker(_el$80.nextSibling), _el$82 = _el$81.nextSibling, [_el$83, _co$20] = getNextMarker(_el$82.nextSibling);
170
+ insert(_el$72, (() => {
143
171
  var _c$ = memo(() => turn.status === "done");
144
172
  return () => _c$() ? "✅" : turn.status === "active" ? "●" : "○";
145
- })(), _el$62, _co$12);
146
- insert(_el$55, () => turn.label, _el$64, _co$13);
147
- insert(_el$55, createComponent(Show, {
173
+ })(), _el$79, _co$18);
174
+ insert(_el$72, () => turn.label, _el$81, _co$19);
175
+ insert(_el$72, createComponent(Show, {
148
176
  get when() {
149
177
  return turn.summary;
150
178
  },
151
179
  get children() {
152
- var _el$57 = getNextElement(_tmpl$13), _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, [_el$60, _co$11] = getNextMarker(_el$59.nextSibling);
153
- insert(_el$57, () => turn.summary, _el$60, _co$11);
154
- return _el$57;
180
+ var _el$74 = getNextElement(_tmpl$14), _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling, [_el$77, _co$17] = getNextMarker(_el$76.nextSibling);
181
+ insert(_el$74, () => turn.summary, _el$77, _co$17);
182
+ return _el$74;
155
183
  }
156
- }), _el$66, _co$14);
157
- effect(() => className(_el$55, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
158
- return _el$55;
184
+ }), _el$83, _co$20);
185
+ effect(() => className(_el$72, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
186
+ return _el$72;
159
187
  })()]
160
188
  }));
161
189
  return _el$13;
@@ -193,14 +221,14 @@ const ScratchpadPanel = (props) => {
193
221
  return props.state.agentMessages;
194
222
  },
195
223
  children: (msg) => (() => {
196
- var _el$67 = getNextElement(_tmpl$15), _el$68 = _el$67.firstChild, _el$69 = _el$68.nextSibling;
197
- insert(_el$68, (() => {
224
+ var _el$84 = getNextElement(_tmpl$16), _el$85 = _el$84.firstChild, _el$86 = _el$85.nextSibling;
225
+ insert(_el$85, (() => {
198
226
  var _c$2 = memo(() => msg.type === "warning");
199
227
  return () => _c$2() ? "⚠️" : msg.type === "question" ? "❓" : "ℹ️";
200
228
  })());
201
- insert(_el$69, () => msg.text);
202
- effect(() => className(_el$67, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
203
- return _el$67;
229
+ insert(_el$86, () => msg.text);
230
+ effect(() => className(_el$84, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
231
+ return _el$84;
204
232
  })()
205
233
  }));
206
234
  return _el$15;
@@ -218,49 +246,49 @@ const ScratchpadPanel = (props) => {
218
246
  },
219
247
  get fallback() {
220
248
  return [(() => {
221
- var _el$70 = getNextElement(_tmpl$16), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling;
222
- insert(_el$72, () => preview().count.toLocaleString());
223
- return _el$70;
249
+ var _el$87 = getNextElement(_tmpl$17), _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling;
250
+ insert(_el$89, () => preview().count.toLocaleString());
251
+ return _el$87;
224
252
  })(), (() => {
225
- var _el$73 = getNextElement(_tmpl$17);
226
- insert(_el$73, () => preview().summary);
227
- return _el$73;
253
+ var _el$90 = getNextElement(_tmpl$18);
254
+ insert(_el$90, () => preview().summary);
255
+ return _el$90;
228
256
  })(), createComponent(Show, {
229
257
  get when() {
230
258
  return memo(() => !!preview().rows)() && preview().rows.length > 0;
231
259
  },
232
260
  get children() {
233
- var _el$74 = getNextElement(_tmpl$18), _el$75 = _el$74.firstChild, _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild, _el$78 = _el$76.nextSibling;
234
- insert(_el$77, createComponent(For, {
261
+ var _el$91 = getNextElement(_tmpl$19), _el$92 = _el$91.firstChild, _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$95 = _el$93.nextSibling;
262
+ insert(_el$94, createComponent(For, {
235
263
  get each() {
236
264
  return Object.keys(preview().rows[0]);
237
265
  },
238
266
  children: (k) => (() => {
239
- var _el$79 = getNextElement(_tmpl$19);
240
- insert(_el$79, k);
241
- return _el$79;
267
+ var _el$96 = getNextElement(_tmpl$20);
268
+ insert(_el$96, k);
269
+ return _el$96;
242
270
  })()
243
271
  }));
244
- insert(_el$78, createComponent(For, {
272
+ insert(_el$95, createComponent(For, {
245
273
  get each() {
246
274
  return preview().rows.slice(0, 5);
247
275
  },
248
276
  children: (row) => (() => {
249
- var _el$80 = getNextElement(_tmpl$20);
250
- insert(_el$80, createComponent(For, {
277
+ var _el$97 = getNextElement(_tmpl$21);
278
+ insert(_el$97, createComponent(For, {
251
279
  get each() {
252
280
  return Object.values(row);
253
281
  },
254
282
  children: (v) => (() => {
255
- var _el$81 = getNextElement(_tmpl$21);
256
- insert(_el$81, () => String(v));
257
- return _el$81;
283
+ var _el$98 = getNextElement(_tmpl$22);
284
+ insert(_el$98, () => String(v));
285
+ return _el$98;
258
286
  })()
259
287
  }));
260
- return _el$80;
288
+ return _el$97;
261
289
  })()
262
290
  }));
263
- return _el$74;
291
+ return _el$91;
264
292
  }
265
293
  })];
266
294
  },
@@ -341,7 +369,24 @@ const ScratchpadPanel = (props) => {
341
369
  effect((_$p) => setStyleProperty(_el$12, "max-height", props.maxHeight || "500px"));
342
370
  return _el$12;
343
371
  }
344
- }), _el$53, _co$10);
372
+ }), _el$68, _co$15);
373
+ insert(_el$, createComponent(Show, {
374
+ get when() {
375
+ return props.debugOverlay;
376
+ },
377
+ get children() {
378
+ var _el$52 = getNextElement(_tmpl$11), _el$57 = _el$52.firstChild, [_el$58, _co$10] = getNextMarker(_el$57.nextSibling), _el$53 = _el$58.nextSibling, _el$59 = _el$53.nextSibling, [_el$60, _co$11] = getNextMarker(_el$59.nextSibling), _el$54 = _el$60.nextSibling, _el$61 = _el$54.nextSibling, [_el$62, _co$12] = getNextMarker(_el$61.nextSibling), _el$55 = _el$62.nextSibling, _el$63 = _el$55.nextSibling, [_el$64, _co$13] = getNextMarker(_el$63.nextSibling), _el$56 = _el$64.nextSibling, _el$65 = _el$56.nextSibling, [_el$66, _co$14] = getNextMarker(_el$65.nextSibling);
379
+ insert(_el$52, () => props.state.id, _el$58, _co$10);
380
+ insert(_el$52, eventCount, _el$60, _co$11);
381
+ insert(_el$52, () => {
382
+ var _a;
383
+ return ((_a = props.state.sections) == null ? void 0 : _a.length) || 0;
384
+ }, _el$62, _co$12);
385
+ insert(_el$52, () => props.state.status, _el$64, _co$13);
386
+ insert(_el$52, lastEvent, _el$66, _co$14);
387
+ return _el$52;
388
+ }
389
+ }), _el$70, _co$16);
345
390
  effect((_p$) => {
346
391
  var _v$ = `w-full bg-white dark:bg-gray-800 rounded-xl border shadow-lg overflow-visible ${props.state.status === "waiting_human" ? "border-blue-300 dark:border-blue-600" : "border-gray-200 dark:border-gray-700"}`, _v$2 = `flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-700 ${isCollapsible() ? "cursor-pointer select-none hover:bg-gray-50 dark:hover:bg-gray-750" : ""}`, _v$3 = `px-2 py-0.5 text-xs font-medium rounded-full ${badge().class}`;
347
392
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
@@ -359,9 +404,9 @@ const ScratchpadPanel = (props) => {
359
404
  };
360
405
  const SectionRenderer = (props) => {
361
406
  return (() => {
362
- var _el$82 = getNextElement(_tmpl$23), _el$83 = _el$82.firstChild, _el$86 = _el$83.nextSibling, [_el$87, _co$15] = getNextMarker(_el$86.nextSibling);
363
- insert(_el$83, () => props.section.title);
364
- insert(_el$82, createComponent(Switch, {
407
+ var _el$99 = getNextElement(_tmpl$24), _el$100 = _el$99.firstChild, _el$103 = _el$100.nextSibling, [_el$104, _co$21] = getNextMarker(_el$103.nextSibling);
408
+ insert(_el$100, () => props.section.title);
409
+ insert(_el$99, createComponent(Switch, {
365
410
  get children() {
366
411
  return [createComponent(Match, {
367
412
  get when() {
@@ -396,9 +441,9 @@ const SectionRenderer = (props) => {
396
441
  return props.section.type === "message";
397
442
  },
398
443
  get children() {
399
- var _el$84 = getNextElement(_tmpl$17);
400
- insert(_el$84, () => String(props.section.content));
401
- return _el$84;
444
+ var _el$101 = getNextElement(_tmpl$18);
445
+ insert(_el$101, () => String(props.section.content));
446
+ return _el$101;
402
447
  }
403
448
  }), createComponent(Match, {
404
449
  get when() {
@@ -501,40 +546,76 @@ const SectionRenderer = (props) => {
501
546
  }
502
547
  });
503
548
  }
549
+ }), createComponent(Match, {
550
+ get when() {
551
+ return props.section.type === "error";
552
+ },
553
+ get children() {
554
+ return createComponent(ErrorSectionRenderer, {
555
+ get content() {
556
+ return props.section.content;
557
+ },
558
+ get onAction() {
559
+ return props.onAction;
560
+ }
561
+ });
562
+ }
563
+ }), createComponent(Match, {
564
+ get when() {
565
+ return props.section.type === "source_card";
566
+ },
567
+ get children() {
568
+ return createComponent(SourceCardSection, {
569
+ get content() {
570
+ return props.section.content;
571
+ }
572
+ });
573
+ }
574
+ }), createComponent(Match, {
575
+ get when() {
576
+ return props.section.type === "diff";
577
+ },
578
+ get children() {
579
+ return createComponent(DiffSection, {
580
+ get content() {
581
+ return props.section.content;
582
+ }
583
+ });
584
+ }
504
585
  }), createComponent(Match, {
505
586
  when: true,
506
587
  get children() {
507
- var _el$85 = getNextElement(_tmpl$22);
508
- insert(_el$85, () => JSON.stringify(props.section.content, null, 2));
509
- return _el$85;
588
+ var _el$102 = getNextElement(_tmpl$23);
589
+ insert(_el$102, () => JSON.stringify(props.section.content, null, 2));
590
+ return _el$102;
510
591
  }
511
592
  })];
512
593
  }
513
- }), _el$87, _co$15);
514
- return _el$82;
594
+ }), _el$104, _co$21);
595
+ return _el$99;
515
596
  })();
516
597
  };
517
598
  const DataSection = (props) => {
518
599
  const entries = () => typeof props.content === "object" && props.content ? Object.entries(props.content) : [];
519
600
  return (() => {
520
- var _el$88 = getNextElement(_tmpl$24);
521
- insert(_el$88, createComponent(For, {
601
+ var _el$105 = getNextElement(_tmpl$25);
602
+ insert(_el$105, createComponent(For, {
522
603
  get each() {
523
604
  return entries();
524
605
  },
525
606
  children: ([k, v]) => (() => {
526
- var _el$89 = getNextElement(_tmpl$25), _el$90 = _el$89.firstChild, _el$92 = _el$90.firstChild, [_el$93, _co$16] = getNextMarker(_el$92.nextSibling);
527
- _el$93.nextSibling;
528
- var _el$94 = _el$90.nextSibling;
529
- insert(_el$90, k, _el$93, _co$16);
530
- insert(_el$94, (() => {
607
+ var _el$106 = getNextElement(_tmpl$26), _el$107 = _el$106.firstChild, _el$109 = _el$107.firstChild, [_el$110, _co$22] = getNextMarker(_el$109.nextSibling);
608
+ _el$110.nextSibling;
609
+ var _el$111 = _el$107.nextSibling;
610
+ insert(_el$107, k, _el$110, _co$22);
611
+ insert(_el$111, (() => {
531
612
  var _c$3 = memo(() => !!Array.isArray(v));
532
613
  return () => _c$3() ? v.join(", ") : String(v);
533
614
  })());
534
- return _el$89;
615
+ return _el$106;
535
616
  })()
536
617
  }));
537
- return _el$88;
618
+ return _el$105;
538
619
  })();
539
620
  };
540
621
  const InteractiveFilterSection = (props) => {
@@ -568,8 +649,8 @@ const InteractiveFilterSection = (props) => {
568
649
  };
569
650
  const getDef = (key) => filterDefs()[key] || {};
570
651
  return (() => {
571
- var _el$95 = getNextElement(_tmpl$27), _el$97 = _el$95.firstChild, [_el$98, _co$17] = getNextMarker(_el$97.nextSibling), _el$99 = _el$98.nextSibling, [_el$100, _co$18] = getNextMarker(_el$99.nextSibling);
572
- insert(_el$95, createComponent(For, {
652
+ var _el$112 = getNextElement(_tmpl$28), _el$114 = _el$112.firstChild, [_el$115, _co$23] = getNextMarker(_el$114.nextSibling), _el$116 = _el$115.nextSibling, [_el$117, _co$24] = getNextMarker(_el$116.nextSibling);
653
+ insert(_el$112, createComponent(For, {
573
654
  get each() {
574
655
  return allKeys();
575
656
  },
@@ -578,136 +659,136 @@ const InteractiveFilterSection = (props) => {
578
659
  const value = () => props.filters[key];
579
660
  const hasValue = () => value() !== void 0 && value() !== "";
580
661
  return (() => {
581
- var _el$101 = getNextElement(_tmpl$33), _el$117 = _el$101.firstChild, [_el$118, _co$22] = getNextMarker(_el$117.nextSibling), _el$119 = _el$118.nextSibling, [_el$120, _co$23] = getNextMarker(_el$119.nextSibling);
582
- insert(_el$101, createComponent(Show, {
662
+ var _el$118 = getNextElement(_tmpl$34), _el$134 = _el$118.firstChild, [_el$135, _co$28] = getNextMarker(_el$134.nextSibling), _el$136 = _el$135.nextSibling, [_el$137, _co$29] = getNextMarker(_el$136.nextSibling);
663
+ insert(_el$118, createComponent(Show, {
583
664
  get when() {
584
665
  return hasValue();
585
666
  },
586
667
  get fallback() {
587
668
  return (() => {
588
- var _el$121 = getNextElement(_tmpl$34), _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling, [_el$124, _co$24] = getNextMarker(_el$123.nextSibling);
589
- _el$121.$$click = () => {
669
+ var _el$138 = getNextElement(_tmpl$35), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling, [_el$141, _co$30] = getNextMarker(_el$140.nextSibling);
670
+ _el$138.$$click = () => {
590
671
  setEditingKey(key);
591
672
  setEditValue("");
592
673
  };
593
- insert(_el$121, () => {
674
+ insert(_el$138, () => {
594
675
  var _a;
595
676
  return ((_a = def()) == null ? void 0 : _a.label) || key;
596
- }, _el$124, _co$24);
677
+ }, _el$141, _co$30);
597
678
  runHydrationEvents();
598
- return _el$121;
679
+ return _el$138;
599
680
  })();
600
681
  },
601
682
  get children() {
602
- var _el$102 = getNextElement(_tmpl$29), _el$103 = _el$102.firstChild, _el$104 = _el$103.firstChild, _el$106 = _el$104.firstChild, [_el$107, _co$19] = getNextMarker(_el$106.nextSibling);
603
- _el$107.nextSibling;
604
- var _el$108 = _el$104.nextSibling, _el$109 = _el$108.nextSibling, [_el$110, _co$20] = getNextMarker(_el$109.nextSibling), _el$112 = _el$103.nextSibling, [_el$113, _co$21] = getNextMarker(_el$112.nextSibling);
605
- _el$103.$$click = () => {
683
+ var _el$119 = getNextElement(_tmpl$30), _el$120 = _el$119.firstChild, _el$121 = _el$120.firstChild, _el$123 = _el$121.firstChild, [_el$124, _co$25] = getNextMarker(_el$123.nextSibling);
684
+ _el$124.nextSibling;
685
+ var _el$125 = _el$121.nextSibling, _el$126 = _el$125.nextSibling, [_el$127, _co$26] = getNextMarker(_el$126.nextSibling), _el$129 = _el$120.nextSibling, [_el$130, _co$27] = getNextMarker(_el$129.nextSibling);
686
+ _el$120.$$click = () => {
606
687
  setEditingKey(key);
607
688
  setEditValue(String(value() || ""));
608
689
  };
609
- insert(_el$104, () => {
690
+ insert(_el$121, () => {
610
691
  var _a;
611
692
  return ((_a = def()) == null ? void 0 : _a.label) || key;
612
- }, _el$107, _co$19);
613
- insert(_el$103, (() => {
693
+ }, _el$124, _co$25);
694
+ insert(_el$120, (() => {
614
695
  var _c$4 = memo(() => !!Array.isArray(value()));
615
696
  return () => _c$4() ? value().join(", ") : String(value());
616
- })(), _el$110, _co$20);
617
- insert(_el$102, createComponent(Show, {
697
+ })(), _el$127, _co$26);
698
+ insert(_el$119, createComponent(Show, {
618
699
  get when() {
619
700
  return props.onFilterChange;
620
701
  },
621
702
  get children() {
622
- var _el$111 = getNextElement(_tmpl$28);
623
- _el$111.$$click = () => removeFilter(key);
624
- setAttribute(_el$111, "aria-label", `Remove ${key}`);
703
+ var _el$128 = getNextElement(_tmpl$29);
704
+ _el$128.$$click = () => removeFilter(key);
705
+ setAttribute(_el$128, "aria-label", `Remove ${key}`);
625
706
  runHydrationEvents();
626
- return _el$111;
707
+ return _el$128;
627
708
  }
628
- }), _el$113, _co$21);
709
+ }), _el$130, _co$27);
629
710
  runHydrationEvents();
630
- return _el$102;
711
+ return _el$119;
631
712
  }
632
- }), _el$118, _co$22);
633
- insert(_el$101, createComponent(Show, {
713
+ }), _el$135, _co$28);
714
+ insert(_el$118, createComponent(Show, {
634
715
  get when() {
635
716
  return editingKey() === key;
636
717
  },
637
718
  get children() {
638
- var _el$114 = getNextElement(_tmpl$32);
639
- insert(_el$114, createComponent(Show, {
719
+ var _el$131 = getNextElement(_tmpl$33);
720
+ insert(_el$131, createComponent(Show, {
640
721
  get when() {
641
722
  var _a;
642
723
  return (_a = def()) == null ? void 0 : _a.options;
643
724
  },
644
725
  get fallback() {
645
726
  return (() => {
646
- var _el$125 = getNextElement(_tmpl$35), _el$126 = _el$125.firstChild, _el$127 = _el$126.nextSibling, _el$128 = _el$127.nextSibling;
647
- _el$125.addEventListener("submit", (e) => {
727
+ var _el$142 = getNextElement(_tmpl$36), _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling, _el$145 = _el$144.nextSibling;
728
+ _el$142.addEventListener("submit", (e) => {
648
729
  e.preventDefault();
649
730
  setFilter(key, editValue());
650
731
  });
651
- _el$126.$$input = (e) => setEditValue(e.currentTarget.value);
652
- _el$128.$$click = () => setEditingKey(null);
732
+ _el$143.$$input = (e) => setEditValue(e.currentTarget.value);
733
+ _el$145.$$click = () => setEditingKey(null);
653
734
  effect(() => {
654
735
  var _a;
655
- return setAttribute(_el$126, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
736
+ return setAttribute(_el$143, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
656
737
  });
657
- effect(() => setProperty(_el$126, "value", editValue()));
738
+ effect(() => setProperty(_el$143, "value", editValue()));
658
739
  runHydrationEvents();
659
- return _el$125;
740
+ return _el$142;
660
741
  })();
661
742
  },
662
743
  get children() {
663
744
  return [(() => {
664
- var _el$115 = getNextElement(_tmpl$30);
665
- insert(_el$115, createComponent(For, {
745
+ var _el$132 = getNextElement(_tmpl$31);
746
+ insert(_el$132, createComponent(For, {
666
747
  get each() {
667
748
  return def().options;
668
749
  },
669
750
  children: (opt) => (() => {
670
- var _el$129 = getNextElement(_tmpl$37), _el$131 = _el$129.firstChild, [_el$132, _co$25] = getNextMarker(_el$131.nextSibling), _el$133 = _el$132.nextSibling, [_el$134, _co$26] = getNextMarker(_el$133.nextSibling);
671
- _el$129.$$click = () => setFilter(key, opt.value);
672
- insert(_el$129, () => opt.label, _el$132, _co$25);
673
- insert(_el$129, createComponent(Show, {
751
+ var _el$146 = getNextElement(_tmpl$38), _el$148 = _el$146.firstChild, [_el$149, _co$31] = getNextMarker(_el$148.nextSibling), _el$150 = _el$149.nextSibling, [_el$151, _co$32] = getNextMarker(_el$150.nextSibling);
752
+ _el$146.$$click = () => setFilter(key, opt.value);
753
+ insert(_el$146, () => opt.label, _el$149, _co$31);
754
+ insert(_el$146, createComponent(Show, {
674
755
  get when() {
675
756
  return String(value()) === opt.value;
676
757
  },
677
758
  get children() {
678
- return getNextElement(_tmpl$36);
759
+ return getNextElement(_tmpl$37);
679
760
  }
680
- }), _el$134, _co$26);
681
- effect(() => className(_el$129, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
761
+ }), _el$151, _co$32);
762
+ effect(() => className(_el$146, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
682
763
  runHydrationEvents();
683
- return _el$129;
764
+ return _el$146;
684
765
  })()
685
766
  }));
686
- return _el$115;
767
+ return _el$132;
687
768
  })(), (() => {
688
- var _el$116 = getNextElement(_tmpl$31);
689
- _el$116.$$click = () => setEditingKey(null);
769
+ var _el$133 = getNextElement(_tmpl$32);
770
+ _el$133.$$click = () => setEditingKey(null);
690
771
  runHydrationEvents();
691
- return _el$116;
772
+ return _el$133;
692
773
  })()];
693
774
  }
694
775
  }));
695
- return _el$114;
776
+ return _el$131;
696
777
  }
697
- }), _el$120, _co$23);
698
- return _el$101;
778
+ }), _el$137, _co$29);
779
+ return _el$118;
699
780
  })();
700
781
  }
701
- }), _el$98, _co$17);
702
- insert(_el$95, createComponent(Show, {
782
+ }), _el$115, _co$23);
783
+ insert(_el$112, createComponent(Show, {
703
784
  get when() {
704
785
  return allKeys().length === 0;
705
786
  },
706
787
  get children() {
707
- return getNextElement(_tmpl$26);
788
+ return getNextElement(_tmpl$27);
708
789
  }
709
- }), _el$100, _co$18);
710
- return _el$95;
790
+ }), _el$117, _co$24);
791
+ return _el$112;
711
792
  })();
712
793
  };
713
794
  const EmbeddedFormSection = (props) => {
@@ -773,9 +854,9 @@ const EmbeddedFormSection = (props) => {
773
854
  }
774
855
  };
775
856
  return (() => {
776
- var _el$135 = getNextElement(_tmpl$38), _el$138 = _el$135.firstChild, [_el$139, _co$27] = getNextMarker(_el$138.nextSibling), _el$136 = _el$139.nextSibling, _el$137 = _el$136.firstChild;
777
- _el$135.addEventListener("submit", handleSubmit);
778
- insert(_el$135, createComponent(For, {
857
+ var _el$152 = getNextElement(_tmpl$39), _el$155 = _el$152.firstChild, [_el$156, _co$33] = getNextMarker(_el$155.nextSibling), _el$153 = _el$156.nextSibling, _el$154 = _el$153.firstChild;
858
+ _el$152.addEventListener("submit", handleSubmit);
859
+ insert(_el$152, createComponent(For, {
779
860
  get each() {
780
861
  return config().fields;
781
862
  },
@@ -789,9 +870,9 @@ const EmbeddedFormSection = (props) => {
789
870
  onChange: (val) => updateField(field.name, val),
790
871
  formData
791
872
  })
792
- }), _el$139, _co$27);
793
- insert(_el$137, () => config().submitLabel);
794
- return _el$135;
873
+ }), _el$156, _co$33);
874
+ insert(_el$154, () => config().submitLabel);
875
+ return _el$152;
795
876
  })();
796
877
  };
797
878
  const EnrichedStepsSection = (props) => {
@@ -803,35 +884,35 @@ const EnrichedStepsSection = (props) => {
803
884
  };
804
885
  };
805
886
  return (() => {
806
- var _el$140 = getNextElement(_tmpl$40), _el$143 = _el$140.firstChild, [_el$144, _co$28] = getNextMarker(_el$143.nextSibling), _el$145 = _el$144.nextSibling, [_el$146, _co$29] = getNextMarker(_el$145.nextSibling);
807
- insert(_el$140, createComponent(For, {
887
+ var _el$157 = getNextElement(_tmpl$41), _el$160 = _el$157.firstChild, [_el$161, _co$34] = getNextMarker(_el$160.nextSibling), _el$162 = _el$161.nextSibling, [_el$163, _co$35] = getNextMarker(_el$162.nextSibling);
888
+ insert(_el$157, createComponent(For, {
808
889
  get each() {
809
890
  return stepsData().steps;
810
891
  },
811
892
  children: (step) => (() => {
812
- var _el$147 = getNextElement(_tmpl$43), _el$148 = _el$147.firstChild, _el$149 = _el$148.firstChild, _el$154 = _el$149.nextSibling, [_el$155, _co$31] = getNextMarker(_el$154.nextSibling), _el$156 = _el$155.nextSibling, [_el$157, _co$32] = getNextMarker(_el$156.nextSibling), _el$159 = _el$148.nextSibling, [_el$160, _co$33] = getNextMarker(_el$159.nextSibling);
813
- insert(_el$149, (() => {
893
+ var _el$164 = getNextElement(_tmpl$44), _el$165 = _el$164.firstChild, _el$166 = _el$165.firstChild, _el$171 = _el$166.nextSibling, [_el$172, _co$37] = getNextMarker(_el$171.nextSibling), _el$173 = _el$172.nextSibling, [_el$174, _co$38] = getNextMarker(_el$173.nextSibling), _el$176 = _el$165.nextSibling, [_el$177, _co$39] = getNextMarker(_el$176.nextSibling);
894
+ insert(_el$166, (() => {
814
895
  var _c$5 = memo(() => step.status === "done");
815
896
  return () => _c$5() ? "✅" : step.status === "active" ? "●" : "○";
816
897
  })());
817
- insert(_el$148, () => step.label, _el$155, _co$31);
818
- insert(_el$148, createComponent(Show, {
898
+ insert(_el$165, () => step.label, _el$172, _co$37);
899
+ insert(_el$165, createComponent(Show, {
819
900
  get when() {
820
901
  return memo(() => !!step.description)() && step.status === "active";
821
902
  },
822
903
  get children() {
823
- var _el$150 = getNextElement(_tmpl$41), _el$151 = _el$150.firstChild, _el$152 = _el$151.nextSibling, [_el$153, _co$30] = getNextMarker(_el$152.nextSibling);
824
- insert(_el$150, () => step.description, _el$153, _co$30);
825
- return _el$150;
904
+ var _el$167 = getNextElement(_tmpl$42), _el$168 = _el$167.firstChild, _el$169 = _el$168.nextSibling, [_el$170, _co$36] = getNextMarker(_el$169.nextSibling);
905
+ insert(_el$167, () => step.description, _el$170, _co$36);
906
+ return _el$167;
826
907
  }
827
- }), _el$157, _co$32);
828
- insert(_el$147, createComponent(Show, {
908
+ }), _el$174, _co$38);
909
+ insert(_el$164, createComponent(Show, {
829
910
  get when() {
830
911
  return memo(() => step.status === "active")() && step.content;
831
912
  },
832
913
  get children() {
833
- var _el$158 = getNextElement(_tmpl$42);
834
- insert(_el$158, createComponent(SectionRenderer, {
914
+ var _el$175 = getNextElement(_tmpl$43);
915
+ insert(_el$175, createComponent(SectionRenderer, {
835
916
  get section() {
836
917
  return step.content;
837
918
  },
@@ -843,71 +924,71 @@ const EnrichedStepsSection = (props) => {
843
924
  return props.onAction;
844
925
  }
845
926
  }));
846
- return _el$158;
927
+ return _el$175;
847
928
  }
848
- }), _el$160, _co$33);
929
+ }), _el$177, _co$39);
849
930
  effect((_p$) => {
850
931
  var _v$4 = `rounded-lg ${step.status === "active" ? "bg-blue-50/50 dark:bg-blue-900/10 border border-blue-200 dark:border-blue-800 p-3" : "px-1"}`, _v$5 = `flex items-center gap-2 text-sm font-medium ${step.status === "done" ? "text-green-600 dark:text-green-400" : step.status === "active" ? "text-blue-600 dark:text-blue-400" : "text-gray-400"}`;
851
- _v$4 !== _p$.e && className(_el$147, _p$.e = _v$4);
852
- _v$5 !== _p$.t && className(_el$148, _p$.t = _v$5);
932
+ _v$4 !== _p$.e && className(_el$164, _p$.e = _v$4);
933
+ _v$5 !== _p$.t && className(_el$165, _p$.t = _v$5);
853
934
  return _p$;
854
935
  }, {
855
936
  e: void 0,
856
937
  t: void 0
857
938
  });
858
- return _el$147;
939
+ return _el$164;
859
940
  })()
860
- }), _el$144, _co$28);
861
- insert(_el$140, createComponent(Show, {
941
+ }), _el$161, _co$34);
942
+ insert(_el$157, createComponent(Show, {
862
943
  get when() {
863
944
  return stepsData().steps.some((s) => s.status === "active");
864
945
  },
865
946
  get children() {
866
- var _el$141 = getNextElement(_tmpl$39), _el$142 = _el$141.firstChild;
867
- _el$142.$$click = () => {
947
+ var _el$158 = getNextElement(_tmpl$40), _el$159 = _el$158.firstChild;
948
+ _el$159.$$click = () => {
868
949
  var _a;
869
950
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "next_step", {
870
951
  step: stepsData().currentStep
871
952
  });
872
953
  };
873
954
  runHydrationEvents();
874
- return _el$141;
955
+ return _el$158;
875
956
  }
876
- }), _el$146, _co$29);
877
- return _el$140;
957
+ }), _el$163, _co$35);
958
+ return _el$157;
878
959
  })();
879
960
  };
880
961
  const ActionSection = (props) => {
881
962
  const actions = () => Array.isArray(props.content) ? props.content : [];
882
963
  return (() => {
883
- var _el$161 = getNextElement(_tmpl$44);
884
- insert(_el$161, createComponent(For, {
964
+ var _el$178 = getNextElement(_tmpl$45);
965
+ insert(_el$178, createComponent(For, {
885
966
  get each() {
886
967
  return actions();
887
968
  },
888
969
  children: (item) => (() => {
889
- var _el$162 = getNextElement(_tmpl$37), _el$164 = _el$162.firstChild, [_el$165, _co$34] = getNextMarker(_el$164.nextSibling), _el$166 = _el$165.nextSibling, [_el$167, _co$35] = getNextMarker(_el$166.nextSibling);
890
- _el$162.$$click = () => {
970
+ var _el$179 = getNextElement(_tmpl$38), _el$181 = _el$179.firstChild, [_el$182, _co$40] = getNextMarker(_el$181.nextSibling), _el$183 = _el$182.nextSibling, [_el$184, _co$41] = getNextMarker(_el$183.nextSibling);
971
+ _el$179.$$click = () => {
891
972
  var _a;
892
973
  return (_a = props.onAction) == null ? void 0 : _a.call(props, item.value || item.action || item.label, item);
893
974
  };
894
- insert(_el$162, createComponent(Show, {
975
+ insert(_el$179, createComponent(Show, {
895
976
  get when() {
896
977
  return item.icon;
897
978
  },
898
979
  get children() {
899
- var _el$163 = getNextElement(_tmpl$45);
900
- insert(_el$163, () => item.icon);
901
- return _el$163;
980
+ var _el$180 = getNextElement(_tmpl$46);
981
+ insert(_el$180, () => item.icon);
982
+ return _el$180;
902
983
  }
903
- }), _el$165, _co$34);
904
- insert(_el$162, () => item.label, _el$167, _co$35);
905
- effect(() => className(_el$162, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
984
+ }), _el$182, _co$40);
985
+ insert(_el$179, () => item.label, _el$184, _co$41);
986
+ effect(() => className(_el$179, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
906
987
  runHydrationEvents();
907
- return _el$162;
988
+ return _el$179;
908
989
  })()
909
990
  }));
910
- return _el$161;
991
+ return _el$178;
911
992
  })();
912
993
  };
913
994
  const UnderstandingSection = (props) => {
@@ -931,39 +1012,39 @@ const UnderstandingSection = (props) => {
931
1012
  }
932
1013
  };
933
1014
  return (() => {
934
- var _el$168 = getNextElement(_tmpl$46), _el$169 = _el$168.firstChild, _el$171 = _el$169.nextSibling, [_el$172, _co$36] = getNextMarker(_el$171.nextSibling);
935
- insert(_el$169, createComponent(For, {
1015
+ var _el$185 = getNextElement(_tmpl$47), _el$186 = _el$185.firstChild, _el$188 = _el$186.nextSibling, [_el$189, _co$42] = getNextMarker(_el$188.nextSibling);
1016
+ insert(_el$186, createComponent(For, {
936
1017
  get each() {
937
1018
  return data().detections;
938
1019
  },
939
1020
  children: (det) => (() => {
940
- var _el$173 = getNextElement(_tmpl$47), _el$174 = _el$173.firstChild, _el$175 = _el$174.nextSibling;
941
- insert(_el$174, () => det.label);
942
- insert(_el$175, () => det.value);
943
- effect(() => className(_el$174, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
944
- return _el$173;
1021
+ var _el$190 = getNextElement(_tmpl$48), _el$191 = _el$190.firstChild, _el$192 = _el$191.nextSibling;
1022
+ insert(_el$191, () => det.label);
1023
+ insert(_el$192, () => det.value);
1024
+ effect(() => className(_el$191, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
1025
+ return _el$190;
945
1026
  })()
946
1027
  }));
947
- insert(_el$168, createComponent(Show, {
1028
+ insert(_el$185, createComponent(Show, {
948
1029
  get when() {
949
1030
  return data().warnings.length > 0;
950
1031
  },
951
1032
  get children() {
952
- var _el$170 = getNextElement(_tmpl$24);
953
- insert(_el$170, createComponent(For, {
1033
+ var _el$187 = getNextElement(_tmpl$25);
1034
+ insert(_el$187, createComponent(For, {
954
1035
  get each() {
955
1036
  return data().warnings;
956
1037
  },
957
1038
  children: (w) => (() => {
958
- var _el$176 = getNextElement(_tmpl$48), _el$177 = _el$176.firstChild, _el$178 = _el$177.nextSibling;
959
- insert(_el$178, w);
960
- return _el$176;
1039
+ var _el$193 = getNextElement(_tmpl$49), _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling;
1040
+ insert(_el$195, w);
1041
+ return _el$193;
961
1042
  })()
962
1043
  }));
963
- return _el$170;
1044
+ return _el$187;
964
1045
  }
965
- }), _el$172, _co$36);
966
- return _el$168;
1046
+ }), _el$189, _co$42);
1047
+ return _el$185;
967
1048
  })();
968
1049
  };
969
1050
  const FeedbackSection = (props) => {
@@ -1001,39 +1082,39 @@ const FeedbackSection = (props) => {
1001
1082
  });
1002
1083
  };
1003
1084
  return (() => {
1004
- var _el$179 = getNextElement(_tmpl$50), _el$180 = _el$179.firstChild, _el$181 = _el$180.nextSibling, _el$185 = _el$181.nextSibling, [_el$186, _co$37] = getNextMarker(_el$185.nextSibling);
1005
- insert(_el$180, () => data().question);
1006
- insert(_el$181, createComponent(For, {
1085
+ var _el$196 = getNextElement(_tmpl$51), _el$197 = _el$196.firstChild, _el$198 = _el$197.nextSibling, _el$202 = _el$198.nextSibling, [_el$203, _co$43] = getNextMarker(_el$202.nextSibling);
1086
+ insert(_el$197, () => data().question);
1087
+ insert(_el$198, createComponent(For, {
1007
1088
  get each() {
1008
1089
  return data().options;
1009
1090
  },
1010
1091
  children: (option) => (() => {
1011
- var _el$187 = getNextElement(_tmpl$37), _el$189 = _el$187.firstChild, [_el$190, _co$38] = getNextMarker(_el$189.nextSibling), _el$191 = _el$190.nextSibling, [_el$192, _co$39] = getNextMarker(_el$191.nextSibling);
1012
- _el$187.$$click = () => handleOption(option);
1013
- insert(_el$187, createComponent(Show, {
1092
+ var _el$204 = getNextElement(_tmpl$38), _el$206 = _el$204.firstChild, [_el$207, _co$44] = getNextMarker(_el$206.nextSibling), _el$208 = _el$207.nextSibling, [_el$209, _co$45] = getNextMarker(_el$208.nextSibling);
1093
+ _el$204.$$click = () => handleOption(option);
1094
+ insert(_el$204, createComponent(Show, {
1014
1095
  get when() {
1015
1096
  return option.icon;
1016
1097
  },
1017
1098
  get children() {
1018
- var _el$188 = getNextElement(_tmpl$51);
1019
- insert(_el$188, () => option.icon);
1020
- return _el$188;
1099
+ var _el$205 = getNextElement(_tmpl$52);
1100
+ insert(_el$205, () => option.icon);
1101
+ return _el$205;
1021
1102
  }
1022
- }), _el$190, _co$38);
1023
- insert(_el$187, () => option.label, _el$192, _co$39);
1024
- effect(() => className(_el$187, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1103
+ }), _el$207, _co$44);
1104
+ insert(_el$204, () => option.label, _el$209, _co$45);
1105
+ effect(() => className(_el$204, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1025
1106
  runHydrationEvents();
1026
- return _el$187;
1107
+ return _el$204;
1027
1108
  })()
1028
1109
  }));
1029
- insert(_el$179, createComponent(Show, {
1110
+ insert(_el$196, createComponent(Show, {
1030
1111
  get when() {
1031
1112
  return data().allowFreeText || showComment();
1032
1113
  },
1033
1114
  get children() {
1034
- var _el$182 = getNextElement(_tmpl$49), _el$183 = _el$182.firstChild, _el$184 = _el$183.nextSibling;
1035
- _el$183.$$input = (e) => setComment(e.currentTarget.value);
1036
- _el$184.$$click = () => {
1115
+ var _el$199 = getNextElement(_tmpl$50), _el$200 = _el$199.firstChild, _el$201 = _el$200.nextSibling;
1116
+ _el$200.$$input = (e) => setComment(e.currentTarget.value);
1117
+ _el$201.$$click = () => {
1037
1118
  var _a;
1038
1119
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
1039
1120
  option: "comment",
@@ -1042,19 +1123,19 @@ const FeedbackSection = (props) => {
1042
1123
  };
1043
1124
  effect((_p$) => {
1044
1125
  var _v$6 = data().placeholder, _v$7 = showComment();
1045
- _v$6 !== _p$.e && setAttribute(_el$183, "placeholder", _p$.e = _v$6);
1046
- _v$7 !== _p$.t && setProperty(_el$183, "autofocus", _p$.t = _v$7);
1126
+ _v$6 !== _p$.e && setAttribute(_el$200, "placeholder", _p$.e = _v$6);
1127
+ _v$7 !== _p$.t && setProperty(_el$200, "autofocus", _p$.t = _v$7);
1047
1128
  return _p$;
1048
1129
  }, {
1049
1130
  e: void 0,
1050
1131
  t: void 0
1051
1132
  });
1052
- effect(() => setProperty(_el$183, "value", comment()));
1133
+ effect(() => setProperty(_el$200, "value", comment()));
1053
1134
  runHydrationEvents();
1054
- return _el$182;
1135
+ return _el$199;
1055
1136
  }
1056
- }), _el$186, _co$37);
1057
- return _el$179;
1137
+ }), _el$203, _co$43);
1138
+ return _el$196;
1058
1139
  })();
1059
1140
  };
1060
1141
  const PromptSection = (props) => {
@@ -1069,56 +1150,56 @@ const PromptSection = (props) => {
1069
1150
  };
1070
1151
  };
1071
1152
  return (() => {
1072
- var _el$193 = getNextElement(_tmpl$55), _el$206 = _el$193.firstChild, [_el$207, _co$42] = getNextMarker(_el$206.nextSibling), _el$199 = _el$207.nextSibling, _el$208 = _el$199.nextSibling, [_el$209, _co$43] = getNextMarker(_el$208.nextSibling), _el$210 = _el$209.nextSibling, [_el$211, _co$44] = getNextMarker(_el$210.nextSibling);
1073
- insert(_el$193, createComponent(Show, {
1153
+ var _el$210 = getNextElement(_tmpl$56), _el$223 = _el$210.firstChild, [_el$224, _co$48] = getNextMarker(_el$223.nextSibling), _el$216 = _el$224.nextSibling, _el$225 = _el$216.nextSibling, [_el$226, _co$49] = getNextMarker(_el$225.nextSibling), _el$227 = _el$226.nextSibling, [_el$228, _co$50] = getNextMarker(_el$227.nextSibling);
1154
+ insert(_el$210, createComponent(Show, {
1074
1155
  get when() {
1075
1156
  return data().originalQuery;
1076
1157
  },
1077
1158
  get children() {
1078
- var _el$194 = getNextElement(_tmpl$52), _el$195 = _el$194.firstChild, _el$197 = _el$195.nextSibling, [_el$198, _co$40] = getNextMarker(_el$197.nextSibling);
1079
- _el$198.nextSibling;
1080
- insert(_el$194, () => data().originalQuery, _el$198, _co$40);
1081
- return _el$194;
1159
+ var _el$211 = getNextElement(_tmpl$53), _el$212 = _el$211.firstChild, _el$214 = _el$212.nextSibling, [_el$215, _co$46] = getNextMarker(_el$214.nextSibling);
1160
+ _el$215.nextSibling;
1161
+ insert(_el$211, () => data().originalQuery, _el$215, _co$46);
1162
+ return _el$211;
1082
1163
  }
1083
- }), _el$207, _co$42);
1084
- insert(_el$199, createComponent(For, {
1164
+ }), _el$224, _co$48);
1165
+ insert(_el$216, createComponent(For, {
1085
1166
  get each() {
1086
1167
  return Object.entries(data().extracted);
1087
1168
  },
1088
1169
  children: ([key, value]) => (() => {
1089
- var _el$212 = getNextElement(_tmpl$56), _el$213 = _el$212.firstChild, _el$215 = _el$213.firstChild, [_el$216, _co$45] = getNextMarker(_el$215.nextSibling);
1090
- _el$216.nextSibling;
1091
- var _el$217 = _el$213.nextSibling;
1092
- insert(_el$213, key, _el$216, _co$45);
1093
- insert(_el$217, () => String(value));
1094
- return _el$212;
1170
+ var _el$229 = getNextElement(_tmpl$57), _el$230 = _el$229.firstChild, _el$232 = _el$230.firstChild, [_el$233, _co$51] = getNextMarker(_el$232.nextSibling);
1171
+ _el$233.nextSibling;
1172
+ var _el$234 = _el$230.nextSibling;
1173
+ insert(_el$230, key, _el$233, _co$51);
1174
+ insert(_el$234, () => String(value));
1175
+ return _el$229;
1095
1176
  })()
1096
1177
  }));
1097
- insert(_el$193, createComponent(Show, {
1178
+ insert(_el$210, createComponent(Show, {
1098
1179
  get when() {
1099
1180
  return data().plan;
1100
1181
  },
1101
1182
  get children() {
1102
- var _el$200 = getNextElement(_tmpl$53), _el$201 = _el$200.firstChild, _el$202 = _el$201.nextSibling, _el$203 = _el$202.nextSibling, [_el$204, _co$41] = getNextMarker(_el$203.nextSibling);
1103
- insert(_el$200, () => data().plan, _el$204, _co$41);
1104
- return _el$200;
1183
+ var _el$217 = getNextElement(_tmpl$54), _el$218 = _el$217.firstChild, _el$219 = _el$218.nextSibling, _el$220 = _el$219.nextSibling, [_el$221, _co$47] = getNextMarker(_el$220.nextSibling);
1184
+ insert(_el$217, () => data().plan, _el$221, _co$47);
1185
+ return _el$217;
1105
1186
  }
1106
- }), _el$209, _co$43);
1107
- insert(_el$193, createComponent(Show, {
1187
+ }), _el$226, _co$49);
1188
+ insert(_el$210, createComponent(Show, {
1108
1189
  get when() {
1109
1190
  return data().editable;
1110
1191
  },
1111
1192
  get children() {
1112
- var _el$205 = getNextElement(_tmpl$54);
1113
- _el$205.$$click = () => {
1193
+ var _el$222 = getNextElement(_tmpl$55);
1194
+ _el$222.$$click = () => {
1114
1195
  var _a;
1115
1196
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "edit_prompt", data());
1116
1197
  };
1117
1198
  runHydrationEvents();
1118
- return _el$205;
1199
+ return _el$222;
1119
1200
  }
1120
- }), _el$211, _co$44);
1121
- return _el$193;
1201
+ }), _el$228, _co$50);
1202
+ return _el$210;
1122
1203
  })();
1123
1204
  };
1124
1205
  const StepperProgressSection = (props) => {
@@ -1148,46 +1229,46 @@ const StepperProgressSection = (props) => {
1148
1229
  },
1149
1230
  get fallback() {
1150
1231
  return (() => {
1151
- var _el$219 = getNextElement(_tmpl$58);
1152
- insert(_el$219, createComponent(For, {
1232
+ var _el$236 = getNextElement(_tmpl$59);
1233
+ insert(_el$236, createComponent(For, {
1153
1234
  get each() {
1154
1235
  return data().steps;
1155
1236
  },
1156
1237
  children: (step) => (() => {
1157
- var _el$220 = getNextElement(_tmpl$61), _el$221 = _el$220.firstChild, _el$222 = _el$221.nextSibling, _el$223 = _el$222.firstChild, _el$233 = _el$223.nextSibling, [_el$234, _co$48] = getNextMarker(_el$233.nextSibling), _el$235 = _el$234.nextSibling, [_el$236, _co$49] = getNextMarker(_el$235.nextSibling);
1158
- insert(_el$221, () => statusIcon(step.status));
1159
- insert(_el$223, () => step.label);
1160
- insert(_el$222, createComponent(Show, {
1238
+ var _el$237 = getNextElement(_tmpl$62), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, _el$240 = _el$239.firstChild, _el$250 = _el$240.nextSibling, [_el$251, _co$54] = getNextMarker(_el$250.nextSibling), _el$252 = _el$251.nextSibling, [_el$253, _co$55] = getNextMarker(_el$252.nextSibling);
1239
+ insert(_el$238, () => statusIcon(step.status));
1240
+ insert(_el$240, () => step.label);
1241
+ insert(_el$239, createComponent(Show, {
1161
1242
  get when() {
1162
1243
  return step.summary;
1163
1244
  },
1164
1245
  get children() {
1165
- var _el$224 = getNextElement(_tmpl$59), _el$225 = _el$224.firstChild, _el$226 = _el$225.nextSibling, [_el$227, _co$46] = getNextMarker(_el$226.nextSibling);
1166
- insert(_el$224, () => step.summary, _el$227, _co$46);
1167
- return _el$224;
1246
+ var _el$241 = getNextElement(_tmpl$60), _el$242 = _el$241.firstChild, _el$243 = _el$242.nextSibling, [_el$244, _co$52] = getNextMarker(_el$243.nextSibling);
1247
+ insert(_el$241, () => step.summary, _el$244, _co$52);
1248
+ return _el$241;
1168
1249
  }
1169
- }), _el$234, _co$48);
1170
- insert(_el$222, createComponent(Show, {
1250
+ }), _el$251, _co$54);
1251
+ insert(_el$239, createComponent(Show, {
1171
1252
  get when() {
1172
1253
  return step.duration_ms;
1173
1254
  },
1174
1255
  get children() {
1175
- var _el$228 = getNextElement(_tmpl$60), _el$229 = _el$228.firstChild, _el$231 = _el$229.nextSibling, [_el$232, _co$47] = getNextMarker(_el$231.nextSibling);
1176
- _el$232.nextSibling;
1177
- insert(_el$228, () => step.duration_ms, _el$232, _co$47);
1178
- return _el$228;
1256
+ var _el$245 = getNextElement(_tmpl$61), _el$246 = _el$245.firstChild, _el$248 = _el$246.nextSibling, [_el$249, _co$53] = getNextMarker(_el$248.nextSibling);
1257
+ _el$249.nextSibling;
1258
+ insert(_el$245, () => step.duration_ms, _el$249, _co$53);
1259
+ return _el$245;
1179
1260
  }
1180
- }), _el$236, _co$49);
1181
- effect(() => className(_el$220, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
1182
- return _el$220;
1261
+ }), _el$253, _co$55);
1262
+ effect(() => className(_el$237, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
1263
+ return _el$237;
1183
1264
  })()
1184
1265
  }));
1185
- return _el$219;
1266
+ return _el$236;
1186
1267
  })();
1187
1268
  },
1188
1269
  get children() {
1189
- var _el$218 = getNextElement(_tmpl$57);
1190
- insert(_el$218, createComponent(For, {
1270
+ var _el$235 = getNextElement(_tmpl$58);
1271
+ insert(_el$235, createComponent(For, {
1191
1272
  get each() {
1192
1273
  return data().steps;
1193
1274
  },
@@ -1196,30 +1277,206 @@ const StepperProgressSection = (props) => {
1196
1277
  return i() > 0;
1197
1278
  },
1198
1279
  get children() {
1199
- return getNextElement(_tmpl$12);
1280
+ return getNextElement(_tmpl$13);
1200
1281
  }
1201
1282
  }), (() => {
1202
- var _el$238 = getNextElement(_tmpl$63), _el$239 = _el$238.firstChild, _el$240 = _el$239.nextSibling, _el$242 = _el$240.nextSibling, [_el$243, _co$50] = getNextMarker(_el$242.nextSibling);
1203
- insert(_el$239, () => statusIcon(step.status));
1204
- insert(_el$240, () => step.label);
1205
- insert(_el$238, createComponent(Show, {
1283
+ var _el$255 = getNextElement(_tmpl$64), _el$256 = _el$255.firstChild, _el$257 = _el$256.nextSibling, _el$259 = _el$257.nextSibling, [_el$260, _co$56] = getNextMarker(_el$259.nextSibling);
1284
+ insert(_el$256, () => statusIcon(step.status));
1285
+ insert(_el$257, () => step.label);
1286
+ insert(_el$255, createComponent(Show, {
1206
1287
  get when() {
1207
1288
  return step.summary;
1208
1289
  },
1209
1290
  get children() {
1210
- var _el$241 = getNextElement(_tmpl$62);
1211
- insert(_el$241, () => step.summary);
1212
- return _el$241;
1291
+ var _el$258 = getNextElement(_tmpl$63);
1292
+ insert(_el$258, () => step.summary);
1293
+ return _el$258;
1213
1294
  }
1214
- }), _el$243, _co$50);
1215
- effect(() => className(_el$238, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
1216
- return _el$238;
1295
+ }), _el$260, _co$56);
1296
+ effect(() => className(_el$255, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
1297
+ return _el$255;
1217
1298
  })()]
1218
1299
  }));
1219
- return _el$218;
1300
+ return _el$235;
1220
1301
  }
1221
1302
  });
1222
1303
  };
1304
+ const ErrorSectionRenderer = (props) => {
1305
+ const [showDetails, setShowDetails] = createSignal(false);
1306
+ const data = () => {
1307
+ const c = props.content;
1308
+ return {
1309
+ message: (c == null ? void 0 : c.message) || "Error",
1310
+ severity: (c == null ? void 0 : c.severity) || "error",
1311
+ retryAction: c == null ? void 0 : c.retryAction,
1312
+ retryLabel: (c == null ? void 0 : c.retryLabel) || "Retry",
1313
+ details: c == null ? void 0 : c.details,
1314
+ timestamp: c == null ? void 0 : c.timestamp
1315
+ };
1316
+ };
1317
+ const isWarning = () => data().severity === "warning";
1318
+ return (() => {
1319
+ var _el$261 = getNextElement(_tmpl$68), _el$262 = _el$261.firstChild, _el$263 = _el$262.firstChild, _el$264 = _el$263.nextSibling, _el$265 = _el$264.firstChild, _el$266 = _el$265.nextSibling, _el$272 = _el$266.firstChild, [_el$273, _co$58] = getNextMarker(_el$272.nextSibling), _el$274 = _el$273.nextSibling, [_el$275, _co$59] = getNextMarker(_el$274.nextSibling), _el$277 = _el$266.nextSibling, [_el$278, _co$60] = getNextMarker(_el$277.nextSibling);
1320
+ insert(_el$263, () => isWarning() ? "⚠️" : "❌");
1321
+ insert(_el$265, () => data().message);
1322
+ insert(_el$266, createComponent(Show, {
1323
+ get when() {
1324
+ return data().retryAction;
1325
+ },
1326
+ get children() {
1327
+ var _el$267 = getNextElement(_tmpl$65), _el$268 = _el$267.firstChild, _el$269 = _el$268.nextSibling, [_el$270, _co$57] = getNextMarker(_el$269.nextSibling);
1328
+ _el$267.$$click = () => {
1329
+ var _a;
1330
+ return (_a = props.onAction) == null ? void 0 : _a.call(props, data().retryAction);
1331
+ };
1332
+ insert(_el$267, () => data().retryLabel, _el$270, _co$57);
1333
+ effect(() => className(_el$267, `px-2 py-1 text-xs font-medium rounded ${isWarning() ? "bg-amber-600 text-white hover:bg-amber-700" : "bg-red-600 text-white hover:bg-red-700"} transition-colors`));
1334
+ runHydrationEvents();
1335
+ return _el$267;
1336
+ }
1337
+ }), _el$273, _co$58);
1338
+ insert(_el$266, createComponent(Show, {
1339
+ get when() {
1340
+ return data().details;
1341
+ },
1342
+ get children() {
1343
+ var _el$271 = getNextElement(_tmpl$66);
1344
+ _el$271.$$click = () => setShowDetails(!showDetails());
1345
+ runHydrationEvents();
1346
+ return _el$271;
1347
+ }
1348
+ }), _el$275, _co$59);
1349
+ insert(_el$264, createComponent(Show, {
1350
+ get when() {
1351
+ return memo(() => !!showDetails())() && data().details;
1352
+ },
1353
+ get children() {
1354
+ var _el$276 = getNextElement(_tmpl$67);
1355
+ insert(_el$276, () => data().details);
1356
+ return _el$276;
1357
+ }
1358
+ }), _el$278, _co$60);
1359
+ effect(() => className(_el$261, `rounded-lg px-3 py-2 text-sm ${isWarning() ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-800" : "bg-red-50 dark:bg-red-900/10 text-red-700 dark:text-red-400 border border-red-200 dark:border-red-800"}`));
1360
+ return _el$261;
1361
+ })();
1362
+ };
1363
+ const SourceCardSection = (props) => {
1364
+ const data = () => {
1365
+ const c = props.content;
1366
+ return {
1367
+ name: (c == null ? void 0 : c.name) || "Source",
1368
+ status: (c == null ? void 0 : c.status) || "available",
1369
+ capabilities: (c == null ? void 0 : c.capabilities) || [],
1370
+ latency_ms: c == null ? void 0 : c.latency_ms,
1371
+ freshness: c == null ? void 0 : c.freshness,
1372
+ row_count: c == null ? void 0 : c.row_count
1373
+ };
1374
+ };
1375
+ const statusIcon = () => ({
1376
+ queried: "✅",
1377
+ available: "📦",
1378
+ error: "❌"
1379
+ })[data().status] || "📦";
1380
+ return (() => {
1381
+ var _el$279 = getNextElement(_tmpl$71), _el$280 = _el$279.firstChild, _el$281 = _el$280.firstChild, _el$283 = _el$281.firstChild, [_el$284, _co$61] = getNextMarker(_el$283.nextSibling), _el$282 = _el$284.nextSibling, _el$285 = _el$282.nextSibling, [_el$286, _co$62] = getNextMarker(_el$285.nextSibling), _el$291 = _el$281.nextSibling, [_el$292, _co$64] = getNextMarker(_el$291.nextSibling), _el$293 = _el$280.nextSibling, _el$295 = _el$293.nextSibling, [_el$296, _co$65] = getNextMarker(_el$295.nextSibling);
1382
+ insert(_el$281, statusIcon, _el$284, _co$61);
1383
+ insert(_el$281, () => data().name, _el$286, _co$62);
1384
+ insert(_el$280, createComponent(Show, {
1385
+ get when() {
1386
+ return data().row_count !== void 0;
1387
+ },
1388
+ get children() {
1389
+ var _el$287 = getNextElement(_tmpl$69), _el$289 = _el$287.firstChild, [_el$290, _co$63] = getNextMarker(_el$289.nextSibling);
1390
+ _el$290.nextSibling;
1391
+ insert(_el$287, () => {
1392
+ var _a;
1393
+ return (_a = data().row_count) == null ? void 0 : _a.toLocaleString();
1394
+ }, _el$290, _co$63);
1395
+ return _el$287;
1396
+ }
1397
+ }), _el$292, _co$64);
1398
+ insert(_el$293, createComponent(For, {
1399
+ get each() {
1400
+ return data().capabilities;
1401
+ },
1402
+ children: (cap) => (() => {
1403
+ var _el$297 = getNextElement(_tmpl$72), _el$299 = _el$297.firstChild, [_el$300, _co$66] = getNextMarker(_el$299.nextSibling), _el$298 = _el$300.nextSibling, _el$301 = _el$298.nextSibling, [_el$302, _co$67] = getNextMarker(_el$301.nextSibling);
1404
+ insert(_el$297, () => cap.supported ? "✅" : "❌", _el$300, _co$66);
1405
+ insert(_el$297, () => cap.label, _el$302, _co$67);
1406
+ effect(() => className(_el$297, `text-[10px] px-1.5 py-0.5 rounded ${cap.supported ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : "bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400"}`));
1407
+ return _el$297;
1408
+ })()
1409
+ }));
1410
+ insert(_el$279, createComponent(Show, {
1411
+ get when() {
1412
+ return data().freshness || data().latency_ms;
1413
+ },
1414
+ get children() {
1415
+ var _el$294 = getNextElement(_tmpl$70);
1416
+ insert(_el$294, () => [data().freshness, data().latency_ms ? `${data().latency_ms}ms` : ""].filter(Boolean).join(" · "));
1417
+ return _el$294;
1418
+ }
1419
+ }), _el$296, _co$65);
1420
+ return _el$279;
1421
+ })();
1422
+ };
1423
+ const DiffSection = (props) => {
1424
+ const data = () => {
1425
+ const c = props.content;
1426
+ return {
1427
+ left: (c == null ? void 0 : c.left) || {
1428
+ label: "A",
1429
+ rows: []
1430
+ },
1431
+ right: (c == null ? void 0 : c.right) || {
1432
+ label: "B",
1433
+ rows: []
1434
+ },
1435
+ highlight: (c == null ? void 0 : c.highlight_columns) || []
1436
+ };
1437
+ };
1438
+ const allKeys = () => {
1439
+ const l = data().left.rows[0] || {};
1440
+ const r = data().right.rows[0] || {};
1441
+ return [.../* @__PURE__ */ new Set([...Object.keys(l), ...Object.keys(r)])];
1442
+ };
1443
+ return (() => {
1444
+ var _el$303 = getNextElement(_tmpl$73), _el$304 = _el$303.firstChild, _el$305 = _el$304.firstChild, _el$306 = _el$305.firstChild, _el$307 = _el$306.firstChild, _el$308 = _el$307.nextSibling, _el$309 = _el$308.nextSibling, _el$310 = _el$305.nextSibling;
1445
+ insert(_el$308, () => data().left.label);
1446
+ insert(_el$309, () => data().right.label);
1447
+ insert(_el$310, createComponent(For, {
1448
+ get each() {
1449
+ return allKeys();
1450
+ },
1451
+ children: (key) => {
1452
+ const lVal = () => {
1453
+ var _a;
1454
+ return (_a = data().left.rows[0]) == null ? void 0 : _a[key];
1455
+ };
1456
+ const rVal = () => {
1457
+ var _a;
1458
+ return (_a = data().right.rows[0]) == null ? void 0 : _a[key];
1459
+ };
1460
+ const isDiff = () => String(lVal()) !== String(rVal()) && data().highlight.includes(key);
1461
+ return (() => {
1462
+ var _el$311 = getNextElement(_tmpl$74), _el$312 = _el$311.firstChild, _el$313 = _el$312.nextSibling, _el$314 = _el$313.nextSibling;
1463
+ insert(_el$312, key);
1464
+ insert(_el$313, (() => {
1465
+ var _c$6 = memo(() => lVal() !== void 0);
1466
+ return () => _c$6() ? String(lVal()) : "—";
1467
+ })());
1468
+ insert(_el$314, (() => {
1469
+ var _c$7 = memo(() => rVal() !== void 0);
1470
+ return () => _c$7() ? String(rVal()) : "—";
1471
+ })());
1472
+ effect(() => className(_el$311, `border-t border-gray-100 dark:border-gray-700 ${isDiff() ? "bg-yellow-50 dark:bg-yellow-900/10" : ""}`));
1473
+ return _el$311;
1474
+ })();
1475
+ }
1476
+ }));
1477
+ return _el$303;
1478
+ })();
1479
+ };
1223
1480
  delegateEvents(["click", "input"]);
1224
1481
  export {
1225
1482
  ScratchpadPanel