opencode-rag-plugin 2.10.1 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/ReadMe.md +40 -28
  2. package/dist/api.js +1 -0
  3. package/dist/chunker/grammar.d.ts +4 -1
  4. package/dist/chunker/grammar.js +9 -3
  5. package/dist/chunker/skeleton.js +61 -4
  6. package/dist/cli/commands/clickhouse.d.ts +61 -0
  7. package/dist/cli/commands/clickhouse.js +335 -0
  8. package/dist/cli/commands/eval-tuner.js +1 -1
  9. package/dist/cli/commands/eval.js +1 -1
  10. package/dist/cli/commands/index-command.js +2 -1
  11. package/dist/cli/commands/index.d.ts +1 -0
  12. package/dist/cli/commands/index.js +1 -0
  13. package/dist/cli/commands/init-helpers.js +2 -2
  14. package/dist/cli/commands/init.js +49 -11
  15. package/dist/cli/commands/quirk.js +6 -6
  16. package/dist/cli/commands/status.js +70 -6
  17. package/dist/cli/commands/ui.js +2 -2
  18. package/dist/cli/index.js +2 -1
  19. package/dist/cli/types.d.ts +14 -0
  20. package/dist/core/bootstrap.d.ts +7 -0
  21. package/dist/core/bootstrap.js +40 -9
  22. package/dist/core/config.d.ts +128 -5
  23. package/dist/core/config.js +205 -8
  24. package/dist/core/interfaces.d.ts +54 -0
  25. package/dist/core/runtime-overrides.d.ts +9 -0
  26. package/dist/core/runtime-overrides.js +44 -0
  27. package/dist/core/state-sync.d.ts +91 -0
  28. package/dist/core/state-sync.js +273 -0
  29. package/dist/eval/fast-index.js +2 -2
  30. package/dist/eval/rerank-eval.js +2 -2
  31. package/dist/eval/run-branch-compare.js +2 -2
  32. package/dist/eval/run-token-test.js +2 -2
  33. package/dist/index.d.ts +5 -2
  34. package/dist/index.js +2 -1
  35. package/dist/indexer/pipeline.d.ts +6 -0
  36. package/dist/indexer/pipeline.js +173 -56
  37. package/dist/indexer/progress.d.ts +75 -0
  38. package/dist/indexer/progress.js +114 -0
  39. package/dist/indexer/stats.d.ts +14 -0
  40. package/dist/plugin.d.ts +6 -3
  41. package/dist/plugin.js +39 -20
  42. package/dist/quirks/quirk-store.d.ts +10 -0
  43. package/dist/quirks/quirk-store.js +110 -15
  44. package/dist/quirks/types.d.ts +7 -0
  45. package/dist/tui.js +128 -111
  46. package/dist/vectorstore/clickhouse.d.ts +150 -0
  47. package/dist/vectorstore/clickhouse.js +931 -0
  48. package/dist/vectorstore/dimension.d.ts +19 -0
  49. package/dist/vectorstore/dimension.js +36 -0
  50. package/dist/vectorstore/factory.d.ts +9 -3
  51. package/dist/vectorstore/factory.js +11 -2
  52. package/dist/vectorstore/lancedb.d.ts +2 -2
  53. package/dist/watcher.d.ts +29 -0
  54. package/dist/watcher.js +76 -2
  55. package/dist/web/api.d.ts +3 -4
  56. package/dist/web/api.js +18 -3
  57. package/dist/web/server.js +28 -2
  58. package/dist/web/ui/assets/{ScatterPlot3D-CKwyh1Ec.js → ScatterPlot3D-XjXIwavM.js} +5 -5
  59. package/dist/web/ui/assets/index-B-RH6fko.css +2 -0
  60. package/dist/web/ui/assets/index-FFPRbgLx.js +4 -0
  61. package/dist/web/ui/index.html +2 -2
  62. package/package.json +7 -2
  63. package/dist/web/ui/assets/index-CWcp0jNf.css +0 -2
  64. package/dist/web/ui/assets/index-DbXFrn53.js +0 -4
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-900:oklch(37.8% .077 168.94);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-indigo-400:oklch(67.3% .182 276.935);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-900:oklch(41% .159 10.272);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:.25rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-400:#22d3ee;--color-brand-500:#06b6d4;--color-brand-600:#0891b2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.chunk-row.selected{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.chunk-row.selected{background:color-mix(in srgb, var(--accent) 10%, transparent)}}.chunk-row.selected{border-left:2px solid var(--accent)}.chunk-row:hover{background:var(--bg-tertiary)}.file-item.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.file-item.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.file-item.active{color:var(--text-primary)}.file-item:hover{background:var(--bg-tertiary)}.sidebar-resizer{cursor:col-resize;touch-action:none;background:0 0;width:7px;transition:background-color .15s;position:absolute;top:0;bottom:0;right:-3px}.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:color-mix(in srgb, var(--accent) 55%, transparent)}}.kpi-card{background:var(--bg-card);border:1px solid var(--border);border-radius:.75rem}.nav-btn{color:var(--text-muted);border-radius:.25rem;padding:.375rem .75rem;font-size:.875rem;transition:color .15s,background-color .15s}.nav-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}.nav-btn.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.nav-btn.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.nav-btn.active{color:var(--accent)}pre,code{background:var(--bg-code)}table thead{background:var(--bg-secondary)}table tbody tr{border-top:1px solid var(--border)}table tbody tr:hover{background:var(--bg-tertiary)}input,select,textarea{background:var(--bg-secondary);border-color:var(--border);color:var(--text-primary)}input::-moz-placeholder{color:var(--text-muted)}textarea::-moz-placeholder{color:var(--text-muted)}input::placeholder,textarea::placeholder{color:var(--text-muted)}.chart-svg rect{transition:opacity .15s}.chart-svg rect:hover{opacity:.85}.chart-svg circle:hover{r:5}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1{top:var(--spacing)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-0{left:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[calc\(100vh-220px\)\]{max-height:calc(100vh - 220px)}.min-h-0{min-height:0}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-96{width:calc(var(--spacing) * 96)}.w-full{width:100%}.max-w-\[85vw\]{max-width:85vw}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-700{border-color:var(--color-amber-700)}.border-green-700{border-color:var(--color-green-700)}.border-red-700{border-color:var(--color-red-700)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.border-slate-700\/50{border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.bg-\[var\(--bg-primary\)\]{background-color:var(--bg-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-900\/20{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/20{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.bg-amber-900\/30{background-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/30{background-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.bg-brand-500{background-color:var(--color-brand-500)}.bg-brand-600{background-color:var(--color-brand-600)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-emerald-900\/20{background-color:#004e3b33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-900\/20{background-color:color-mix(in oklab, var(--color-emerald-900) 20%, transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/30{background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.bg-green-900\/50{background-color:#0d542b80}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/50{background-color:color-mix(in oklab, var(--color-green-900) 50%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/30{background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.bg-rose-900\/20{background-color:#8b083633}@supports (color:color-mix(in lab, red, red)){.bg-rose-900\/20{background-color:color-mix(in oklab, var(--color-rose-900) 20%, transparent)}}.bg-sky-900\/20{background-color:#024a7033}@supports (color:color-mix(in lab, red, red)){.bg-sky-900\/20{background-color:color-mix(in oklab, var(--color-sky-900) 20%, transparent)}}.bg-slate-600{background-color:var(--color-slate-600)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/80{background-color:#1d293dcc}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/80{background-color:color-mix(in oklab, var(--color-slate-800) 80%, transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-slate-700{--tw-gradient-from:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-slate-600{--tw-gradient-via:var(--color-slate-600);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-slate-700{--tw-gradient-to:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-brand-400{color:var(--color-brand-400)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-indigo-400{color:var(--color-indigo-400)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-pink-400{color:var(--color-pink-400)}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.accent-brand-500{accent-color:var(--color-brand-500)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.select-none{-webkit-user-select:none;user-select:none}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-brand-500\/50:hover{border-color:#06b6d480}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand-500\/50:hover{border-color:color-mix(in oklab, var(--color-brand-500) 50%, transparent)}}.hover\:bg-brand-500:hover{background-color:var(--color-brand-500)}.hover\:bg-slate-600:hover{background-color:var(--color-slate-600)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:text-brand-400:hover{color:var(--color-brand-400)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-slate-200:hover{color:var(--color-slate-200)}.hover\:text-white:hover{color:var(--color-white)}}.focus\:border-brand-400:focus{border-color:var(--color-brand-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=64rem){.lg\:relative{position:relative}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:max-w-none{max-width:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}:root{--bg-primary:#fff;--bg-secondary:#f8fafc;--bg-tertiary:#f1f5f9;--bg-card:#fff;--bg-code:#f8fafc;--bg-surface:#fff;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--border:#e2e8f0;--border-hover:#cbd5e1;--accent:#0891b2;--accent-hover:#0e7490;--chart-grid:#e2e8f0;--skeleton-from:#e2e8f0;--skeleton-to:#cbd5e1;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.dark{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-card:#1e293b;--bg-code:#0f172a;--bg-surface:#0f172a;--text-primary:#e2e8f0;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--border-hover:#475569;--accent:#06b6d4;--accent-hover:#22d3ee;--chart-grid:#334155;--skeleton-from:#334155;--skeleton-to:#475569;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{background:var(--bg-primary);color:var(--text-primary);transition:background-color .2s,color .2s}.scrollbar-thin::-webkit-scrollbar{width:6px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.scrollbar-thin::-webkit-scrollbar-thumb{background:var(--text-muted);border-radius:3px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.animate-shimmer{background-size:200% 100%;background-image:linear-gradient(to right, var(--skeleton-from), var(--skeleton-to), var(--skeleton-from));animation:1.5s ease-in-out infinite shimmer}@media (width<=768px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-overlay{z-index:40;background:#00000080;position:fixed;inset:0}}@media (width<=640px){.kpi-grid{grid-template-columns:repeat(1,minmax(0,1fr))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
@@ -0,0 +1,4 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ScatterPlot3D-XjXIwavM.js","assets/vendor-Dg8wMT7C.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"./vendor-Dg8wMT7C.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function p(){let e=location.hash.slice(1)||`dashboard`,t=e.indexOf(`?`),n=t>=0?e.slice(0,t):e,r={};if(t>=0){let n=e.slice(t+1);for(let e of n.split(`&`)){let t=e.indexOf(`=`);if(t>=0)try{r[decodeURIComponent(e.slice(0,t))]=decodeURIComponent(e.slice(t+1))}catch{}}}return{view:n||`dashboard`,params:r}}function m(){let[e,t]=s(p);return u(()=>{let e=()=>t(p());return addEventListener(`hashchange`,e),()=>removeEventListener(`hashchange`,e)},[]),e}var h=Symbol.for(`preact-signals`);function g(){if(S>1)S--;else{var e,t=!1;for((function(){var e=T;for(T=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();x!==void 0;){var n=x;for(x=void 0,C++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&re(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(C=0,S--,t)throw e}}function _(e){if(S>0)return e();w=++ee,S++;try{return e()}finally{g()}}var v,y=void 0;function b(e){var t=y,n=v;y=void 0,v=void 0;try{return e()}finally{y=t,v=n}}var x=void 0,S=0,C=0,ee=0,w=0,T=void 0,te=0;function ne(e){if(y!==void 0){var t=e.n;if(t===void 0||t.t!==y)return t={i:0,S:e,p:y.s,n:void 0,t:y,e:void 0,x:void 0,r:t},y.s!==void 0&&(y.s.n=t),y.s=t,e.n=t,32&y.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=y.s,t.n=void 0,y.s.n=t,y.s=t),t}}function E(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}E.prototype.brand=h,E.prototype.h=function(){return!0},E.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?b(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},E.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&b(function(){var e;(e=t.Z)==null||e.call(t)}))}},E.prototype.subscribe=function(e){var t=this;return j(function(){var n=t.value;b(function(){return e(n)})},{name:`sub`})},E.prototype.valueOf=function(){return this.value},E.prototype.toString=function(){return this.value+``},E.prototype.toJSON=function(){return this.value},E.prototype.peek=function(){var e=this;return b(function(){return e.value})},Object.defineProperty(E.prototype,"value",{get:function(){var e=ne(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(C>100)throw Error(`Cycle detected`);(function(e){S!==0&&C===0&&e.l!==w&&(e.l=w,T={S:e,v:e.v,i:e.i,o:T})})(this),this.v=e,this.i++,te++,S++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{g()}}}});function D(e,t){return new E(e,t)}function re(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ie(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ae(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function O(e,t){E.call(this,void 0,t),this.x=e,this.s=void 0,this.g=te-1,this.f=4}O.prototype=new E,O.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===te))return!0;if(this.g=te,this.f|=1,this.i>0&&!re(this))return this.f&=-2,!0;var e=y;try{ie(this),y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return y=e,ae(this),this.f&=-2,!0},O.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}E.prototype.S.call(this,e)},O.prototype.U=function(e){if(this.t!==void 0&&(E.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},O.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(O.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=ne(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function oe(e,t){return new O(e,t)}function se(e){var t=e.m;if(e.m=void 0,typeof t==`function`){S++;var n=y;y=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,ce(e),t}finally{y=n,g()}}}function ce(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,se(e)}function k(e){if(y!==this)throw Error(`Out-of-order effect`);ae(this),y=e,this.f&=-2,8&this.f&&ce(this),g()}function A(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,v&&v.push(this)}A.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},A.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,se(this),ie(this),S++;var e=y;return y=this,k.bind(this,e)},A.prototype.N=function(){2&this.f||(this.f|=2,this.u=x,x=this)},A.prototype.d=function(){this.f|=8,1&this.f||ce(this)},A.prototype.dispose=function(){this.d()};function j(e,t){var n=new A(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var M,N,le=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,ue=[],de=[];j(function(){M=this.N})();function fe(e,t){r[e]=t.bind(null,r[e]||function(){})}function pe(e){if(N){var t=N;N=void 0,t()}N=e&&e.S()}function me(t){var n=this,r=t.data,i=ge(r);i.name=`ReactiveDom`,i.value=r;var a=e(function(){for(var e=n,t=n.__v;t=t.__;)if(t.__c){t.__c.__$f|=4;break}var r=oe(function(){var e=i.value.value;return e===0?0:!0===e?``:e||``}),a=oe(function(){return!Array.isArray(r.value)&&!c(r.value)}),o=j(function(){if(this.N=Se,a.value){var t=r.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=n.__$u.d;return n.__$u.d=function(){o(),s.call(this)},[a,r]},[]),o=a[0],s=a[1];return o.value?s.peek():s.value}me.displayName=`ReactiveTextNode`,Object.defineProperties(E.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:me},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),fe(`__b`,function(e,t){if(typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof E&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),fe(`__r`,function(e,t){if(e(t),t.type!==n){pe();var r,i=t.__c;i&&(i.__$f&=-2,(r=i.__$u)===void 0&&(i.__$u=r=function(e,t){var n;return j(function(){n=this},{name:t}),n.c=e,n}(function(){var e;le&&((e=r.y)==null||e.call(r)),i.__$f|=1,i.setState({})},typeof t.type==`function`?t.type.displayName||t.type.name:``))),pe(r)}}),fe(`__e`,function(e,t,n,r){pe(),e(t,n,r)}),fe(`diffed`,function(e,t){pe();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props,a=n.U;if(a)for(var o in a){var s=a[o];s===void 0||r&&o in r||(s.d(),a[o]=void 0)}if(r)for(var c in a||(a={},n.U=a),r){var l=a[c],u=r[c];l===void 0?(l=he(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function he(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=D(n);return{o:function(e,t){a.value=e,r=t},d:j(function(){this.N=Se;var n=a.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}fe(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}var o=t.__np;if(o){var s=t.props;for(var c in o)s[c]=o[c]}t.__np=void 0}else{var l=t.__c;if(l){var u=l.__$u;u&&(l.__$u=void 0,u.d())}}e(t)}),fe(`__h`,function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),a.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function ge(t,n){return e(function(){return D(t,n)},[])}var _e=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},ve=function(e){queueMicrotask(function(){queueMicrotask(e)})};function ye(){_(function(){for(var e;e=ue.shift();)M.call(e)})}function be(){ue.push(this)===1&&(r.requestAnimationFrame||_e)(ye)}function xe(){_(function(){for(var e;e=de.shift();)M.call(e)})}function Se(){de.push(this)===1&&(r.requestAnimationFrame||ve)(xe)}function Ce(e,t){var n=i(e);n.current=e,u(function(){return j(function(){return this.N=be,n.current()},t)},[])}var we=D(`dashboard`),P=D(null),Te=D(null),Ee=D(null),De=D(0),Oe=D(50),F=D(new Set),ke=D(new Set),I=D(``),L=D({topK:10,minScore:.35,keywordWeight:.4,hybrid:!0,pathFilter:``,langFilter:``,extFilter:``}),R=D([]),Ae=D([]);D(!1),D(null),D([]),D(new Set),D(null),D(null);var z=D(typeof localStorage<`u`?localStorage.getItem(`theme`)??`dark`:`dark`),je=D(!0);function Me(e){return Math.min(560,Math.max(180,Math.round(e)))}function Ne(){if(typeof localStorage>`u`)return 256;let e=Number(localStorage.getItem(`sidebarWidth`));return Number.isFinite(e)&&e>0?Me(e):256}var B=D(Ne());function Pe(e){B.value=Me(e)}function Fe(){try{localStorage.setItem(`sidebarWidth`,String(B.value))}catch{}}var Ie=D([]),Le=0;function V(e,t,n=4e3){let r=Le++;Ie.value=[...Ie.value,{id:r,type:e,message:t,duration:n}],setTimeout(()=>{Ie.value=Ie.value.filter(e=>e.id!==r)},n)}function H(e){window.location.hash=e}function Re(){return u(()=>{document.documentElement.classList.toggle(`dark`,z.value===`dark`),localStorage.setItem(`theme`,z.value)},[z.value]),{theme:z.value,toggle:()=>{z.value=z.value===`dark`?`light`:`dark`}}}function ze(){u(()=>{let e=null,t=null,n=()=>{e&&=(clearTimeout(e),null),t&&=(window.removeEventListener(`keydown`,t),null)},r=r=>{let i=r.target,a=i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.isContentEditable;if((r.metaKey||r.ctrlKey)&&r.key===`k`)r.preventDefault(),H(`search`),setTimeout(()=>{document.querySelector(`.global-search-input`)?.focus()},0);else if(!a&&r.key===`g`){let r={d:()=>H(`dashboard`),s:()=>H(`search`),c:()=>H(`chunks`),f:()=>H(`files`),e:()=>H(`evaluate`),q:()=>H(`quirks`)};n();let i=e=>{r[e.key]?.(),n()};t=i,window.addEventListener(`keydown`,i),e=setTimeout(n,500)}};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r),n()}},[])}function Be(){return l(`div`,{className:`fixed top-4 right-4 z-[9999] flex flex-col gap-2 pointer-events-none`,children:Ie.value.map(e=>l(`div`,{className:`pointer-events-auto px-4 py-2.5 rounded-lg shadow-lg text-sm font-medium transition-all duration-300 animate-slide-in ${e.type===`success`?`bg-green-600 text-white`:e.type===`error`?`bg-red-600 text-white`:`bg-brand-600 text-white`}`,children:e.message},e.id))})}function Ve(){let e=z.value===`dark`;return l(`button`,{className:`p-2 rounded-lg transition-colors`,style:{color:`var(--text-muted)`},onClick:()=>{z.value=e?`light`:`dark`},"aria-label":e?`Switch to light mode`:`Switch to dark mode`,title:e?`Light mode`:`Dark mode`,children:[l(`span`,{className:`sr-only`,children:e?`Switch to light mode`:`Switch to dark mode`}),e?l(`svg`,{className:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`,children:l(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z`})}):l(`svg`,{className:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`,children:l(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z`})})]})}function He(e,t){let[n,r]=s(e);return u(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}var Ue=`/api`,We=`opencode-rag-token`;function Ge(){let e=new URLSearchParams(window.location.search).get(`token`);if(e){sessionStorage.setItem(We,e);let t=window.location.pathname+window.location.hash;return window.history.replaceState(null,``,t),e}return sessionStorage.getItem(We)}function Ke(){let e=Ge();return e?{Authorization:`Bearer ${e}`}:{}}function qe(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&r!==``&&t.set(n,String(r));return t.toString()}async function U(e,t){let n={...t?.headers??{},...Ke()},r=await fetch(Ue+e,{...t,headers:n}),i=await r.json();if(!r.ok)throw Error(i.error??r.statusText);return i}var W={stats:()=>U(`/stats`),files:()=>U(`/files`),chunks:e=>U(`/chunks?${qe(e)}`),chunk:e=>U(`/chunks/${encodeURIComponent(e)}`),search:(e,t=20)=>U(`/search?q=${encodeURIComponent(e)}&topK=${t}`),compare:e=>U(`/compare?ids=${e.join(`,`)}`),retrieve:e=>U(`/retrieve?${qe(e)}`),evalSessions:()=>U(`/eval/sessions`),evalSession:e=>U(`/eval/sessions/${encodeURIComponent(e)}`),evalDeleteSession:e=>U(`/eval/sessions/${encodeURIComponent(e)}`,{method:`DELETE`}),evalCompare:(e,t)=>U(`/eval/compare?a=${e}&b=${t}`),evalTokenCompare:(e,t)=>U(`/eval/token-compare?a=${e}&b=${t}`),evalAnalysis:e=>U(`/eval/sessions/${encodeURIComponent(e)}/analysis`),evalProjectSavings:e=>U(`/eval/project-savings`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),quirks:()=>U(`/quirks`),quirkLint:()=>U(`/quirks/lint`),deleteQuirk:e=>U(`/quirks/${encodeURIComponent(e)}`,{method:`DELETE`}),indexStatus:()=>U(`/indexing/status`),triggerReindex:()=>U(`/indexing/reindex`,{method:`POST`}),config:()=>U(`/config`),updateConfig:e=>U(`/config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),tree:()=>U(`/tree`),embeddingProj:(e=5e3,t=2)=>U(`/embeddings/projection?maxChunks=${e}&dims=${t}`)},Je={typescript:`text-blue-400`,javascript:`text-yellow-400`,python:`text-green-400`,java:`text-red-400`,go:`text-cyan-400`,rust:`text-orange-400`,ruby:`text-pink-400`,csharp:`text-purple-400`,cpp:`text-indigo-400`,c:`text-gray-400`,markdown:`text-gray-300`,html:`text-orange-300`,css:`text-blue-300`,json:`text-yellow-300`,kotlin:`text-purple-300`,swift:`text-orange-400`,tex:`text-emerald-400`,sql:`text-cyan-300`};function Ye(e){return Je[e]??`text-slate-400`}function G(e){return`<span class="inline-block px-1.5 py-0.5 rounded text-xs font-mono ${Ye(e)} bg-slate-800">${Xe(e)}</span>`}function Xe(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function K(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`):``}function Ze(e,t=80){let n=typeof e==`string`?e:String(e??``);return n.length>t?n.slice(0,t)+`...`:n}function Qe(){let[e,t]=s(``),[n,r]=s([]),[a,o]=s(!1),c=i(null),d=i(null),f=He(e,300);u(()=>{if(!f.trim()){r([]),o(!1);return}let e=!1;return W.search(f,10).then(t=>{e||(r(t?.results??[]),o(!0))}).catch(()=>{e||o(!1)}),()=>{e=!0}},[f]),u(()=>{let e=e=>{d.current&&!d.current.contains(e.target)&&o(!1)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let p=e=>{e.key===`Escape`&&o(!1)},m=async e=>{o(!1),t(``),H(`chunks`)};return l(`div`,{ref:d,className:`relative`,children:[l(`input`,{ref:c,type:`text`,placeholder:`Search codebase...`,value:e,onInput:e=>t(e.target.value),onKeyDown:p,className:`global-search-input w-56 px-3 py-1.5 bg-slate-800 border border-slate-600 rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-brand-400`,"aria-label":`Global search`,role:`combobox`,"aria-expanded":a}),a&&n.length>0&&l(`div`,{className:`absolute top-full right-0 mt-1 w-96 bg-slate-800 border border-slate-600 rounded-lg shadow-xl z-50 max-h-80 overflow-y-auto`,role:`listbox`,children:n.map(e=>l(`div`,{className:`search-result p-2 hover:bg-slate-700 cursor-pointer border-b border-slate-700 last:border-0`,onClick:()=>m(e.chunk.id),role:`option`,children:[l(`div`,{className:`flex items-center gap-2 text-xs`,children:[l(`span`,{className:`text-yellow-400 font-mono`,children:[K(e.chunk.filePath),`:`,e.chunk.startLine,`-`,e.chunk.endLine]}),l(`span`,{dangerouslySetInnerHTML:{__html:G(e.chunk.language)}}),l(`span`,{className:`ml-auto text-slate-500`,children:e.score})]}),l(`div`,{className:`text-xs text-slate-400 mt-1 truncate`,children:K(e.chunk.content??``).slice(0,80)})]},e.chunk.id))}),a&&e.trim()&&n.length===0&&l(`div`,{className:`absolute top-full right-0 mt-1 w-96 bg-slate-800 border border-slate-600 rounded-lg shadow-xl z-50 p-3 text-sm text-slate-500`,children:`No results`})]})}function q(e,t=[]){let[n,r]=s(null),[i,a]=s(!0),[o,c]=s(null),[l,d]=s(0);return u(()=>{let t=!1;return a(!0),c(null),e().then(e=>{t||(r(e),a(!1))}).catch(e=>{t||(c(e.message),a(!1))}),()=>{t=!0}},[...t,l]),{data:n,isLoading:i,error:o,refresh:()=>d(e=>e+1)}}function $e(){let{data:e}=q(()=>W.files()),t=e??[],[n,r]=s(``),i=He(n,300),a=i?t.filter(e=>e.filePath.toLowerCase().includes(i.toLowerCase())):t;return l(`div`,{className:`flex flex-col h-full`,children:[l(`div`,{className:`flex items-center justify-between mb-2 px-3 pt-3`,children:[l(`h2`,{className:`text-xs font-semibold text-slate-400 uppercase tracking-wide`,children:`Files`}),l(`span`,{className:`text-xs text-slate-500`,children:a.length})]}),l(`div`,{className:`px-3 mb-2`,children:l(`input`,{type:`text`,placeholder:`Filter files...`,value:n,onInput:e=>r(e.target.value),className:`w-full px-2 py-1 bg-slate-900 border border-slate-700 rounded text-xs focus:outline-none focus:border-brand-400 text-slate-200 placeholder-slate-500`})}),l(`div`,{className:`flex-1 overflow-y-auto px-1`,children:l(et,{files:a})})]})}function et({files:e}){let t={};for(let n of e){let e=n.filePath.split(`/`),r=t;for(let t=0;t<e.length-1;t++)r[e[t]]||(r[e[t]]={}),r=r[e[t]];r.__files||(r.__files=[]),r.__files.push(n)}return l(nt,{obj:t,depth:0,parentPath:``})}function tt(e){let t=(e.__files||[]).length;for(let[n,r]of Object.entries(e))n!==`__files`&&(t+=tt(r));return t}function nt({obj:e,depth:t,parentPath:r}){let i=Object.entries(e).filter(([e])=>e!==`__files`).sort(([e],[t])=>e.localeCompare(t)),a=e.__files||[];return l(n,{children:[i.map(([e,n])=>{let i=r?`${r}/${e}`:e,a=tt(n),o=ke.value.has(i),s=o?`▸`:`▾`;return l(`div`,{children:[l(`div`,{className:`file-item flex items-center gap-1 py-0.5 px-2 rounded cursor-pointer text-slate-400 hover:text-white`,style:{paddingLeft:`${t*12+8}px`},onClick:()=>{let e=new Set(ke.value);e.has(i)?e.delete(i):e.add(i),ke.value=e},role:`treeitem`,"aria-expanded":!o,children:[l(`span`,{className:`text-xs`,children:s}),l(`span`,{className:`text-xs`,children:`📁`}),l(`span`,{className:`text-xs`,children:K(e)}),l(`span`,{className:`text-xs text-slate-600 ml-auto`,children:a})]}),!o&&l(`div`,{className:`dir-children`,children:l(nt,{obj:n,depth:t+1,parentPath:i})})]},i)}),a.map(e=>{let n=e.filePath.split(`/`).pop()??e.filePath,r=P.value===e.filePath;return l(`div`,{className:`file-item flex items-center gap-1 py-0.5 px-2 rounded cursor-pointer ${r?`active text-white`:`text-slate-400 hover:text-white`}`,style:{paddingLeft:`${t*12+8}px`},onClick:()=>{P.value=e.filePath,H(`chunks?file=${encodeURIComponent(e.filePath)}`)},role:`treeitem`,tabIndex:0,children:[l(`span`,{className:`text-xs ${Ye(e.language)}`,children:`♦`}),l(`span`,{className:`text-xs truncate`,children:K(n)}),l(`span`,{className:`text-xs text-slate-600 ml-auto`,children:e.chunkCount})]},e.filePath)})]})}function rt(e){let t=[...e].sort(),n=[];for(let e of t)n.some(t=>e.startsWith(`${t}/`))||n.push(e);return n}function it(e,t){return t.includes(e)?`checked`:t.some(t=>t.startsWith(`${e}/`))?`partial`:`unchecked`}function at(){let e=q(()=>W.tree()),t=q(()=>W.config()),[r,i]=s(!1),[a,o]=s([]),[c,d]=s([]),[f,p]=s(!1),[m,h]=s(!1),[g,_]=s(!1),v=t.data?.body?.config??t.data?.config,y=e.data?.body?.tree??e.data?.tree;u(()=>{if(v&&!f){let e=v.indexing?.includeDirs??[];o(e),d(e),p(!0)}},[v,f]);let b=rt(a),x=rt(c).join(`|`)!==b.join(`|`),S=b.length===0;function C(e){let t=new Set(a);if(it(e,a)===`checked`)for(let n of a)(n===e||n.startsWith(`${e}/`))&&t.delete(n);else{t.add(e);for(let n of a)n.startsWith(`${e}/`)&&t.delete(n)}o([...t])}function ee(){o([])}async function w(){if(!m){h(!0);try{await W.updateConfig({indexing:{includeDirs:b}}),o(b),d(b),_(!0)}catch(e){V(`error`,`Failed to save scope: ${e.message}`)}finally{h(!1)}}}async function T(){_(!1),V(`info`,`Scope saved — starting reindex…`);try{await W.triggerReindex(),V(`success`,`Reindex started in the background.`)}catch(e){V(`error`,`Reindex failed to start: ${e.message}`)}}return l(`div`,{className:`border-b`,style:{borderColor:`var(--border)`},children:[l(`button`,{type:`button`,className:`w-full flex items-center gap-1 px-3 py-2 text-xs font-semibold text-slate-400 uppercase tracking-wide hover:text-white`,onClick:()=>i(e=>!e),"aria-expanded":r,children:[l(`span`,{className:`text-xs`,children:r?`▾`:`▸`}),l(`span`,{children:`Indexing scope`}),b.length>0&&l(`span`,{className:`ml-auto text-xs text-slate-500`,children:[b.length,` folder`,b.length===1?``:`s`]})]}),r&&l(`div`,{className:`px-2 pb-3 text-xs`,children:[e.error&&l(`p`,{className:`text-red-400 px-2 py-1`,children:[`Could not load workspace tree: `,e.error,l(`button`,{type:`button`,className:`ml-2 underline`,onClick:e.refresh,children:`Retry`})]}),!e.error&&!y&&l(`p`,{className:`px-2 py-1 text-slate-500`,children:`Loading folders…`}),y&&l(n,{children:[l(`label`,{className:`flex items-center gap-1.5 py-1 px-2 rounded cursor-pointer text-slate-300 hover:text-white`,children:[l(`input`,{type:`checkbox`,checked:S,onChange:ee}),l(`span`,{children:`Whole workspace`}),!S&&l(`span`,{className:`text-slate-500`,children:`(include all folders)`})]}),l(`p`,{className:`px-2 py-1 text-slate-600`,children:`Selecting a folder includes all of its subfolders. Files directly in the workspace root are only indexed with "Whole workspace".`}),l(`div`,{className:`max-h-48 overflow-y-auto border rounded`,style:{borderColor:`var(--border)`},children:l(ot,{dirs:y,depth:0,selection:a,onToggle:C})}),l(`button`,{type:`button`,disabled:!x||m,className:`mt-2 w-full px-3 py-1.5 rounded font-semibold disabled:opacity-40 disabled:cursor-not-allowed`,style:{background:`var(--accent)`,color:`#fff`},onClick:w,children:m?`Saving…`:x?`Save scope`:`Saved`}),l(`p`,{className:`mt-1.5 px-2 text-slate-600`,children:[`Saved to `,l(`code`,{children:`opencode-rag.json`}),`. The background watcher applies the new scope after an OpenCode restart.`]})]})]}),g&&l(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,style:{background:`rgba(0,0,0,0.55)`},children:l(`div`,{className:`rounded-lg p-5 max-w-sm w-full shadow-xl`,style:{background:`var(--bg-secondary)`,border:`1px solid var(--border)`},children:[l(`h3`,{className:`text-base font-bold mb-2`,children:`Scope saved`}),l(`p`,{className:`text-sm mb-4`,style:{color:`var(--text-muted)`},children:`The includeDirs setting was written to opencode-rag.json. Reindex now so the index matches the new scope?`}),l(`div`,{className:`flex justify-end gap-2`,children:[l(`button`,{type:`button`,className:`px-3 py-1.5 rounded text-sm`,style:{background:`var(--bg-primary)`,border:`1px solid var(--border)`},onClick:()=>{_(!1),V(`success`,`Scope saved — applies on the next index pass.`)},children:`Later`}),l(`button`,{type:`button`,className:`px-3 py-1.5 rounded text-sm font-semibold text-white`,style:{background:`var(--accent)`},onClick:T,children:`Reindex now`})]})]})})]})}function ot({dirs:e,depth:t,selection:r,onToggle:i}){return l(n,{children:e.map(e=>{let n=it(e.path,r);return l(`div`,{children:[l(`label`,{className:`flex items-center gap-1.5 py-0.5 px-2 rounded cursor-pointer text-slate-400 hover:text-white`,style:{paddingLeft:`${t*12+8}px`},children:[l(`input`,{type:`checkbox`,checked:n===`checked`,ref:e=>{e&&(e.indeterminate=n===`partial`)},onChange:()=>i(e.path)}),l(`span`,{className:`text-xs`,children:`📁`}),l(`span`,{className:`text-xs truncate`,children:e.name})]}),e.children.length>0&&l(ot,{dirs:e.children,depth:t+1,selection:r,onToggle:i})]},e.path)})})}function st(e){let t=i(null),[n,r]=s(!1);Ce(()=>{let t=e.current;t&&(t.style.width=`${B.value}px`)});let a=()=>{t.current=null,r(!1),document.body.style.cursor=``,document.body.style.userSelect=``},o=e=>{if(e.button===0){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}t.current={pointerId:e.pointerId,startX:e.clientX,startWidth:B.peek()},r(!0),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`}},c=e=>{let n=t.current;n&&n.pointerId===e.pointerId&&Pe(n.startWidth+(e.clientX-n.startX))},l=e=>{let n=t.current;n&&n.pointerId===e.pointerId&&(a(),Fe())};return{dragging:n,handleProps:{onPointerDown:o,onPointerMove:c,onPointerUp:l,onPointerCancel:l,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-16:16;Pe(B.peek()+t),Fe()},onDblClick:()=>{Pe(256),Fe()}}}}function ct({targetRef:e}){let{dragging:t,handleProps:n}=st(e);return l(`div`,{className:`sidebar-resizer hidden lg:block ${t?`dragging`:``}`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize file tree`,"aria-valuemin":180,"aria-valuemax":560,"aria-valuenow":B.value,tabIndex:0,title:`Drag to resize · double-click to reset`,...n})}var J=`bg-gradient-to-r from-slate-700 via-slate-600 to-slate-700 bg-[length:200%_100%]`;function Y({type:e=`card`}){return l(`div`,{className:`animate-pulse space-y-4`,children:[l(`div`,{className:`h-8 ${J} rounded w-48`}),e===`card`&&l(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[1,2,3,4].map(e=>l(`div`,{className:`h-24 bg-slate-800 rounded-lg border border-slate-700 p-4`,children:[l(`div`,{className:`h-3 ${J} rounded w-16 mb-2`}),l(`div`,{className:`h-6 ${J} rounded w-24`})]},e))}),e===`table`&&l(`div`,{className:`space-y-2`,children:[l(`div`,{className:`h-10 ${J} rounded w-full`}),[1,2,3,4,5].map(e=>l(`div`,{className:`h-8 ${J} rounded w-full`},e))]}),e===`chart`&&l(`div`,{className:`h-64 ${J} rounded-lg`}),e===`detail`&&l(`div`,{className:`flex gap-4`,children:[l(`div`,{className:`flex-1 space-y-3`,children:[l(`div`,{className:`h-6 ${J} rounded w-48`}),l(`div`,{className:`h-4 ${J} rounded w-32`}),l(`div`,{className:`h-32 ${J} rounded-lg`})]}),l(`div`,{className:`flex-1 space-y-3`,children:[l(`div`,{className:`h-6 ${J} rounded w-48`}),l(`div`,{className:`h-4 ${J} rounded w-32`}),l(`div`,{className:`h-32 ${J} rounded-lg`})]})]})]})}function X({message:e,onRetry:t}){return l(`div`,{className:`flex flex-col items-center justify-center py-12 text-center`,role:`alert`,children:[l(`span`,{className:`text-4xl mb-3`,children:`⚠️`}),l(`p`,{className:`text-slate-400 mb-4`,children:e}),t&&l(`button`,{className:`bg-brand-600 hover:bg-brand-500 text-white px-4 py-2 rounded transition-colors`,onClick:t,children:`Retry`})]})}function Z({icon:e,message:t,action:n}){return l(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,role:`status`,children:[l(`span`,{className:`text-5xl mb-4`,role:`img`,"aria-label":e,children:e}),l(`p`,{className:`text-slate-400 mb-4`,children:t}),n&&l(`button`,{className:`bg-brand-600 hover:bg-brand-500 text-white px-4 py-2 rounded transition-colors`,onClick:n.onClick,children:n.label})]})}function Q({label:e,value:t,icon:n}){return l(`div`,{className:`kpi-card p-4`,children:[n&&l(`span`,{className:`text-lg mb-1 block`,children:n}),l(`div`,{className:`text-slate-400 text-xs mb-1`,children:e}),l(`div`,{className:`text-3xl font-bold text-white`,children:t})]})}function $(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`k`:String(e)}function lt(e){return e===0?`$0.00`:e<.01?`$`+e.toFixed(4):`$`+e.toFixed(2)}function ut(e){return e>=6e4?(e/6e4).toFixed(1)+`m`:e>=1e3?(e/1e3).toFixed(1)+`s`:e+`ms`}function dt(e){if(!e)return`-`;let t=new Date(e);return t.toLocaleDateString()+` `+t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}function ft(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function pt(){let[e,t]=s(null),[n,r]=s(!0),[a,o]=s(!1),c=i(null),d=async()=>{try{let e=await W.indexStatus();t(e.body??e)}catch{}r(!1)};u(()=>{d()},[]),u(()=>()=>{c.current&&clearInterval(c.current)},[]);let f=async()=>{o(!0);try{await W.triggerReindex(),V(`info`,`Reindex started in background`);let n=e?.manifest?.lastIndexedAt,r=Date.now();c.current=setInterval(async()=>{if(Date.now()-r>6e5)c.current&&clearInterval(c.current),c.current=null,o(!1),V(`info`,`Reindex is still running — check back later`);else try{let e=await W.indexStatus(),r=e.body??e;r.manifest?.lastIndexedAt!==n&&(c.current&&clearInterval(c.current),c.current=null,t(r),o(!1),V(`success`,`Reindex complete!`))}catch{}},2e3)}catch(e){let t=e.message??``;V(`error`,/already running/i.test(t)?`A reindex is already running`:`Reindex failed: ${t}`),o(!1)}};if(n)return null;let p=e?.manifest?.lastIndexedAt?ft(e.manifest.lastIndexedAt):`Never`,m=e?.staleFileCount??0,h=m===0?`text-green-400`:m<50?`text-amber-400`:`text-red-400`;return l(`div`,{className:`kpi-card p-4 mb-6`,children:[l(`div`,{className:`flex items-center justify-between mb-3`,children:l(`h2`,{className:`text-lg font-semibold`,children:`Index Status`})}),e?.manifest?l(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-4`,children:[l(`div`,{children:[l(`span`,{className:`text-xs text-slate-500 block`,children:`Last Indexed`}),l(`span`,{className:`text-sm font-mono`,children:p})]}),l(`div`,{children:[l(`span`,{className:`text-xs text-slate-500 block`,children:`Total Chunks`}),l(`span`,{className:`text-sm font-mono`,children:$(e.manifest.totalChunks)})]}),l(`div`,{children:[l(`span`,{className:`text-xs text-slate-500 block`,children:`Total Files`}),l(`span`,{className:`text-sm font-mono`,children:$(e.manifest.totalFiles)})]}),l(`div`,{children:[l(`span`,{className:`text-xs text-slate-500 block`,children:`Schema Version`}),l(`span`,{className:`text-sm font-mono`,children:e.manifest.schemaVersion})]}),l(`div`,{className:`col-span-2`,children:[l(`span`,{className:`text-xs text-slate-500 block`,children:`Index Freshness`}),l(`span`,{className:`text-sm font-mono ${h}`,children:m===0?`✓ Up to date`:`⚠ ${m} file${m===1?``:`s`} modified since last index`})]}),l(`div`,{className:`col-span-2 flex items-end`,children:a?l(`div`,{className:`flex items-center gap-2`,children:[l(`span`,{className:`animate-spin`,children:`⟳`}),l(`span`,{className:`text-sm text-amber-400`,children:`Reindexing...`})]}):l(`button`,{className:`bg-brand-600 hover:bg-brand-500 text-white px-4 py-1.5 rounded text-sm transition-colors`,onClick:f,children:`Reindex Now`})})]}):l(`div`,{className:`text-sm text-slate-400`,children:[`No index found. Run `,l(`code`,{className:`text-brand-400`,children:`opencode-rag index`}),` first.`]})]})}function mt(){let{data:e,isLoading:t,error:n,refresh:r}=q(()=>W.stats()),{data:i}=q(()=>W.files());if(t)return l(Y,{type:`card`});if(n)return l(X,{message:n,onRetry:r});if(!e)return l(Z,{icon:`📊`,message:`No dashboard data available.`});let a=e,o=i?.body?.length??a.totalFiles??0,s=a.totalChunks??0,c=a.languages?.length??0,u=o>0?(s/o).toFixed(1):`0`,d=(a.languages??[]).slice(0,8),f=d[0]?.count??1;return l(`div`,{children:[l(`h1`,{className:`text-2xl font-bold mb-6`,children:`Dashboard`}),l(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8`,children:[l(Q,{label:`Total Chunks`,value:s.toLocaleString(),icon:`🧩`}),l(Q,{label:`Total Files`,value:o.toLocaleString(),icon:`📄`}),l(Q,{label:`Languages`,value:c,icon:`🔤`}),l(Q,{label:`Avg Chunks/File`,value:u,icon:`📊`})]}),l(`div`,{className:`kpi-card p-4`,children:[l(`h3`,{className:`text-sm font-semibold text-slate-300 mb-3`,children:`Language Distribution`}),l(`div`,{className:`space-y-2`,children:d.map(e=>l(`div`,{className:`flex items-center gap-3`,children:[l(`span`,{className:`w-24 text-xs text-right ${Ye(e.language)}`,children:e.language}),l(`div`,{className:`flex-1 bg-slate-800 rounded-full h-5 overflow-hidden`,children:l(`div`,{className:`h-full rounded-full bg-brand-500 flex items-center pl-2`,style:{width:`${Math.max(8,e.count/f*100)}%`},children:l(`span`,{className:`text-xs font-medium text-white`,children:e.count})})}),l(`span`,{className:`text-xs text-slate-500 w-12 text-right`,children:[(e.count/s*100).toFixed(0),`%`]})]},e.language))})]}),l(pt,{}),l(`div`,{className:`mt-6`,children:l(`h2`,{className:`text-lg font-semibold mb-3`,children:l(`a`,{href:`#config`,className:`hover:text-brand-400 transition-colors`,children:`Configuration`})})})]})}function ht({text:e,color:t,onDismiss:n}){return l(`span`,{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-mono bg-slate-800 ${t??`text-slate-400`}`,children:[e,n&&l(`button`,{className:`ml-0.5 text-slate-500 hover:text-white`,onClick:n,"aria-label":`Dismiss ${e} filter`,children:`×`})]})}function gt(){let e=m();u(()=>{e.params.file&&(P.value=e.params.file),e.params.lang&&(Te.value=e.params.lang)},[e.params.file,e.params.lang]);let t=De.value,n=Oe.value,r=P.value,i=Te.value,{data:a,isLoading:o,error:s,refresh:c}=q(()=>W.chunks({offset:t,limit:n,lang:i??``,file:r??``}),[t,n,r,i]);if(o)return l(Y,{type:`detail`});if(s)return l(X,{message:s,onRetry:c});let d=a?.chunks??[],f=a?.total??d.length,p=Math.ceil(f/n),h=Math.floor(t/n)+1;return l(`div`,{className:`flex gap-4 h-full`,children:[l(`div`,{className:`w-1/2 flex flex-col`,children:[l(`div`,{className:`flex items-center gap-3 mb-3 flex-wrap`,children:[l(`h2`,{className:`text-lg font-semibold text-white`,children:`Chunks`}),l(`span`,{className:`text-sm text-slate-400`,children:[f,` total`]}),Te.value&&l(ht,{text:Te.value,color:Ye(Te.value),onDismiss:()=>{Te.value=null,Ee.value=null,De.value=0}}),P.value&&l(ht,{text:P.value,onDismiss:()=>{P.value=null,Ee.value=null,De.value=0}})]}),l(`div`,{className:`bg-slate-900 rounded-lg border border-slate-700 overflow-hidden flex-1`,children:l(`table`,{className:`w-full text-sm`,role:`table`,children:[l(`thead`,{children:l(`tr`,{className:`bg-slate-800 text-slate-400 text-xs`,children:[l(`th`,{className:`px-2 py-2 w-8`,children:l(`input`,{type:`checkbox`,className:`accent-brand-500`,checked:d.length>0&&d.every(e=>F.value.has(e.id||`chunk-${d.indexOf(e)}`)),onChange:()=>{let e=d.map((e,t)=>e.id||`chunk-${t}`),t=e.every(e=>F.value.has(e)),n=new Set(F.value);for(let r of e)t?n.delete(r):n.add(r);F.value=n},"aria-label":`Select all chunks on this page`})}),l(`th`,{className:`px-3 py-2 text-left`,children:`File`}),l(`th`,{className:`px-3 py-2 text-left w-20`,children:`Lang`}),l(`th`,{className:`px-3 py-2 text-left`,children:`Description`})]})}),l(`tbody`,{children:d.length===0?l(`tr`,{children:l(`td`,{colSpan:4,className:`px-3 py-8 text-center text-slate-500`,children:[l(`span`,{className:`text-2xl block mb-2`,children:`🔍`}),`No chunks found`]})}):d.map((e,t)=>{let n=e.id||`chunk-${t}`,r=Ee.value===n,i=F.value.has(n);return l(`tr`,{className:`chunk-row border-t border-slate-800 cursor-pointer ${r?`selected`:``}`,onClick:()=>{Ee.value=n},role:`row`,tabIndex:0,children:[l(`td`,{className:`px-2 py-2`,onClick:e=>e.stopPropagation(),children:l(`input`,{type:`checkbox`,className:`accent-brand-500`,checked:i,onChange:()=>{let e=new Set(F.value);e.has(n)?e.delete(n):e.add(n),F.value=e},"aria-label":`Select chunk ${n}`})}),l(`td`,{className:`px-3 py-2 text-yellow-400 font-mono text-xs`,children:[K(e.filePath),`:`,e.startLine,`-`,e.endLine]}),l(`td`,{className:`px-3 py-2`,dangerouslySetInnerHTML:{__html:G(e.language)}}),l(`td`,{className:`px-3 py-2 text-slate-400 text-xs`,children:K(e.description??``).slice(0,50)})]},n)})})]})}),l(`div`,{className:`flex items-center justify-between mt-3`,children:[l(`button`,{className:`px-3 py-1 bg-slate-700 rounded text-sm hover:bg-slate-600 disabled:opacity-50`,disabled:h<=1,onClick:()=>{De.value=Math.max(0,t-n)},children:`Previous`}),l(`span`,{className:`text-sm text-slate-400`,children:[`Page `,h,` of `,p||1]}),l(`button`,{className:`px-3 py-1 bg-slate-700 rounded text-sm hover:bg-slate-600 disabled:opacity-50`,disabled:h>=p,onClick:()=>{De.value+=n},children:`Next`})]}),F.value.size>=2&&F.value.size<=3&&l(`div`,{className:`fixed bottom-6 right-6 z-50`,children:l(`button`,{className:`bg-brand-600 hover:bg-brand-500 text-white px-6 py-3 rounded-full shadow-lg font-bold transition-all transform hover:scale-105`,onClick:()=>{let e=[...F.value];F.value=new Set,H(`compare?ids=${e.join(`,`)}`)},children:[`Compare (`,F.value.size,`)`]})})]}),l(`div`,{className:`w-1/2 overflow-y-auto`,children:Ee.value?l(_t,{chunkId:Ee.value,chunks:d}):l(`div`,{className:`flex items-center justify-center h-full text-slate-500`,children:l(`div`,{className:`text-center`,children:[l(`div`,{className:`text-4xl mb-2`,children:`📄`}),l(`div`,{className:`text-sm`,children:`Select a chunk to view details`})]})})})]})}function _t({chunkId:e,chunks:t}){let[n,r]=s(null),[a,o]=s(!1),c=i(null);if(u(()=>{let n=!1,i=t.find(t=>t.id===e);return i?r(i):W.chunk(e).then(e=>{n||r(e)}).catch(()=>{n||r({id:e,content:``,filePath:`not found`,language:``,startLine:0,endLine:0,description:``})}),()=>{n=!0}},[e,t]),u(()=>()=>{c.current&&clearTimeout(c.current)},[]),!n)return l(Y,{type:`detail`});let d=n,f=d.language===`image`;return l(`div`,{children:[l(`div`,{className:`mb-3`,children:[l(`div`,{className:`flex items-center gap-3 mb-1`,children:l(`span`,{className:`text-yellow-400 font-mono text-sm`,children:K(d.filePath)})}),l(`div`,{className:`flex items-center gap-3 text-sm text-slate-400`,children:[l(`span`,{children:[`Lines `,d.startLine,`-`,d.endLine]}),l(`span`,{dangerouslySetInnerHTML:{__html:G(d.language)}}),d.id&&l(`span`,{className:`text-xs text-slate-600 font-mono`,children:d.id})]})]}),d.description&&l(`div`,{className:`kpi-card p-3 mb-3`,children:[l(`h3`,{className:`text-xs font-semibold text-slate-400 mb-1`,children:`Description`}),l(`p`,{className:`text-sm text-slate-300`,children:K(d.description)})]}),f&&l(`div`,{className:`bg-slate-900 rounded-lg border border-slate-700 overflow-hidden mb-3`,children:[l(`div`,{className:`px-3 py-1.5 bg-slate-800 border-b border-slate-700`,children:l(`span`,{className:`text-xs text-slate-400`,children:`Image Preview`})}),l(`div`,{className:`p-3 flex items-center justify-center bg-slate-950`,children:l(`img`,{src:`/api/file?path=${encodeURIComponent(d.filePath)}`,alt:d.filePath,className:`max-w-full max-h-[60vh] object-contain rounded`,onError:e=>{let t=e.currentTarget;t.style.display=`none`,t.parentElement.innerHTML=`<span class="text-slate-500 text-sm">Image not available</span>`}})})]}),l(`div`,{className:`bg-slate-900 rounded-lg border border-slate-700 overflow-hidden`,children:[l(`div`,{className:`px-3 py-1.5 bg-slate-800 border-b border-slate-700 flex items-center justify-between`,children:[l(`span`,{className:`text-xs text-slate-400`,children:f?`Vision Analysis`:`Source Code`}),l(`button`,{className:`text-xs text-slate-500 hover:text-white transition-colors`,onClick:()=>{navigator.clipboard.writeText(d.content).then(()=>{o(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>o(!1),1500)})},children:a?`Copied!`:`Copy`})]}),l(`pre`,{className:`p-3 overflow-x-auto text-sm max-h-[calc(100vh-220px)]`,children:l(`code`,{className:`language-${f?`text`:d.language}`,children:K(d.content)})})]})]})}function vt(){let{data:e,isLoading:t,error:n,refresh:r}=q(()=>W.files());if(t)return l(Y,{type:`table`});if(n)return l(X,{message:n,onRetry:r});let i=e??[];if(i.length===0)return l(Z,{icon:`📂`,message:`No files indexed yet.`});let a=i.reduce((e,t)=>e+t.chunkCount,0);return l(`div`,{children:[l(`div`,{className:`flex items-center gap-3 mb-4`,children:[l(`h1`,{className:`text-2xl font-bold`,children:`Files`}),l(`span`,{className:`text-sm text-slate-400`,children:[i.length,` files, `,a,` chunks`]})]}),l(`div`,{className:`bg-slate-900 rounded-lg border border-slate-700 overflow-hidden`,children:l(`table`,{className:`w-full text-sm`,role:`table`,"aria-label":`Indexed files`,children:[l(`thead`,{children:l(`tr`,{className:`bg-slate-800 text-slate-400 text-xs`,children:[l(`th`,{className:`px-3 py-2 text-left`,children:`File`}),l(`th`,{className:`px-3 py-2 text-left w-28`,children:`Language`}),l(`th`,{className:`px-3 py-2 text-left w-20`,children:`Chunks`}),l(`th`,{className:`px-3 py-2 text-left w-24`})]})}),l(`tbody`,{children:i.map(e=>l(`tr`,{className:`border-t border-slate-800 hover:bg-slate-800 cursor-pointer`,onClick:()=>H(`chunks?file=${encodeURIComponent(e.filePath)}`),role:`row`,tabIndex:0,onKeyDown:t=>{t.key===`Enter`&&H(`chunks?file=${encodeURIComponent(e.filePath)}`)},children:[l(`td`,{className:`px-3 py-2 text-yellow-400 font-mono text-xs`,children:e.filePath}),l(`td`,{className:`px-3 py-2`,dangerouslySetInnerHTML:{__html:G(e.language)}}),l(`td`,{className:`px-3 py-2 text-slate-300`,children:e.chunkCount}),l(`td`,{className:`px-3 py-2 text-slate-500 text-xs`,children:l(`span`,{className:`hover:text-white transition-colors`,children:`View chunks`})})]},e.filePath))})]})})]})}function yt({segments:e,size:t=180,innerRadius:n,centerLabel:r}){let i=t/2,a=t/2,o=t/2-10,s=n??o*.6,c=e.reduce((e,t)=>e+t.value,0);if(c===0)return l(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[l(`circle`,{cx:i,cy:a,r:o,fill:`none`,stroke:`#334155`,"stroke-width":o-s}),l(`circle`,{cx:i,cy:a,r:s,fill:`#0f172a`})]});let u=0,d=e.map(e=>{let t=e.value/c*360,n=u,r=u+t;return u+=t,`<path d="${bt(i,a,o,n,r,s)}" fill="${e.color}" />`}).join(``),f=r??``;return l(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:`chart-svg`,children:[l(`g`,{dangerouslySetInnerHTML:{__html:d}}),l(`text`,{x:i,y:a-6,"text-anchor":`middle`,fill:`white`,"font-size":`22`,"font-weight":`bold`,children:f}),l(`text`,{x:i,y:a+14,"text-anchor":`middle`,fill:`#64748b`,"font-size":`11`,children:`tokens`})]})}function bt(e,t,n,r,i,a){let o=i-r;if(o>=359.99)return`M${e},${t-n} A${n},${n} 0 1,1 ${e-.01},${t-n} L${e-.01},${t-a} A${a},${a} 0 1,0 ${e},${t-a} Z`;let s=e=>(e-90)*Math.PI/180,c=e+n*Math.cos(s(r)),l=t+n*Math.sin(s(r)),u=e+n*Math.cos(s(i)),d=t+n*Math.sin(s(i)),f=e+a*Math.cos(s(i)),p=t+a*Math.sin(s(i)),m=e+a*Math.cos(s(r)),h=t+a*Math.sin(s(r)),g=+(o>180);return[`M${c},${l}`,`A${n},${n} 0 ${g} 1 ${u},${d}`,`L${f},${p}`,`A${a},${a} 0 ${g} 0 ${m},${h}`,`Z`].join(` `)}function xt(){let e=m();return e.params.compare?l(wt,{ids:[e.params.a??``,e.params.b??``]}):e.params.session?l(Ct,{sessionId:e.params.session}):l(St,{})}function St(){let{data:e,isLoading:t,error:n,refresh:r}=q(()=>W.evalSessions()),[i,a]=s(new Set);if(t)return l(Y,{type:`table`});if(n)return l(X,{message:n,onRetry:r});let o=e?.sessions??[];if(o.length===0)return l(Z,{icon:`📊`,message:`No sessions recorded yet.`});let c=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),a(t)};return l(`div`,{children:[l(`div`,{className:`flex items-center justify-between mb-4`,children:[l(`h1`,{className:`text-2xl font-bold`,children:`Evaluate`}),l(`div`,{className:`flex gap-2`,children:[i.size===2&&l(`button`,{className:`bg-brand-600 hover:bg-brand-500 text-white px-3 py-1 rounded text-sm transition-colors`,onClick:()=>{let[e,t]=[...i];H(`evaluate?compare&a=${encodeURIComponent(e)}&b=${encodeURIComponent(t)}`)},children:`Compare Selected`}),i.size>0&&l(`button`,{className:`text-xs text-slate-400 hover:text-white`,onClick:()=>a(new Set),children:[`Clear (`,i.size,`)`]})]})]}),l(`div`,{className:`bg-slate-900 rounded-lg border border-slate-700 overflow-x-auto`,children:l(`table`,{className:`w-full text-sm`,role:`table`,children:[l(`thead`,{children:l(`tr`,{className:`bg-slate-800 text-slate-400 text-xs`,children:[l(`th`,{className:`px-2 py-2 w-8`}),l(`th`,{className:`px-3 py-2 text-left`,children:`Session`}),l(`th`,{className:`px-3 py-2 text-left`,children:`Last Activity`}),l(`th`,{className:`px-3 py-2 text-right`,children:`Messages`}),l(`th`,{className:`px-3 py-2 text-right`,children:`Input Tokens`}),l(`th`,{className:`px-3 py-2 text-right`,children:`Output Tokens`}),l(`th`,{className:`px-3 py-2 text-right`,children:`Cost`}),l(`th`,{className:`px-3 py-2 text-right`,children:`RAG Calls`}),l(`th`,{className:`px-3 py-2 text-right`,children:`RAG Tokens`}),l(`th`,{className:`px-3 py-2 text-left`,children:`Model`}),l(`th`,{className:`px-3 py-2 w-8`})]})}),l(`tbody`,{children:o.map(e=>l(`tr`,{className:`border-t border-slate-800 hover:bg-slate-800 cursor-pointer`,onClick:()=>H(`evaluate?session=${encodeURIComponent(e.sessionID)}`),children:[l(`td`,{className:`px-2 py-2`,onClick:e=>e.stopPropagation(),children:l(`input`,{type:`checkbox`,className:`accent-brand-500`,checked:i.has(e.sessionID),onChange:()=>c(e.sessionID),"aria-label":`Select session ${e.title??e.sessionID}`})}),l(`td`,{className:`px-3 py-2 text-slate-200 font-mono text-xs`,children:e.title??e.sessionID.slice(0,8)}),l(`td`,{className:`px-3 py-2 text-slate-400 text-xs`,children:dt(e.lastEventAt)}),l(`td`,{className:`px-3 py-2 text-slate-300 text-right`,children:e.messageCount}),l(`td`,{className:`px-3 py-2 text-slate-300 text-right`,children:$((e.totalTokens?.input??0)+(e.totalTokens?.cacheRead??0))}),l(`td`,{className:`px-3 py-2 text-slate-300 text-right`,children:$(e.totalTokens?.output??0)}),l(`td`,{className:`px-3 py-2 text-slate-300 text-right`,children:lt(e.totalCost??0)}),l(`td`,{className:`px-3 py-2 text-slate-300 text-right`,children:e.ragContextCount??0}),l(`td`,{className:`px-3 py-2 text-slate-300 text-right`,children:$(e.ragContextTokens??0)}),l(`td`,{className:`px-3 py-2 text-slate-400 text-xs`,children:e.models?.[0]??`-`}),l(`td`,{className:`px-3 py-2`,onClick:e=>e.stopPropagation(),children:l(`button`,{className:`text-slate-600 hover:text-red-400 text-xs`,onClick:async()=>{if(confirm(`Delete this session?`))try{await W.evalDeleteSession(e.sessionID),V(`success`,`Session deleted`),r()}catch(e){V(`error`,`Delete failed: ${e.message}`)}},"aria-label":`Delete session`,children:`🗑`})})]},e.sessionID))})]})})]})}function Ct({sessionId:e}){let{data:t,isLoading:n,error:r,refresh:i}=q(()=>W.evalSession(e));if(n)return l(Y,{type:`detail`});if(r)return l(X,{message:r,onRetry:i});let a=t?.summary??t,o=t?.events??[],s=a.toolCallCounts??{};[`search_semantic`,`get_file_skeleton`,`find_usages`,`describe_image`].reduce((e,t)=>e+(s[t]??0),0);let c=[{label:`Input`,value:(a.totalTokens?.input??0)+(a.totalTokens?.cacheRead??0),color:`#3b82f6`},{label:`Output`,value:a.totalTokens?.output??0,color:`#a855f7`},{label:`RAG`,value:a.ragContextTokens??0,color:`#06b6d4`},{label:`Reasoning`,value:a.totalTokens?.reasoning??0,color:`#f59e0b`}].filter(e=>e.value>0),u=c.reduce((e,t)=>e+t.value,0);return l(`div`,{children:[l(`div`,{className:`flex items-center gap-3 mb-4`,children:[l(`button`,{className:`text-sm text-slate-400 hover:text-white`,onClick:()=>H(`evaluate`),children:`← Back`}),l(`h1`,{className:`text-xl font-bold`,children:a.title??a.sessionID?.slice(0,12)})]}),l(`div`,{className:`grid grid-cols-3 lg:grid-cols-5 gap-3 mb-6`,children:[l(Q,{label:`Total Tokens`,value:$(u)}),l(Q,{label:`Input`,value:$((a.totalTokens?.input??0)+(a.totalTokens?.cacheRead??0))}),l(Q,{label:`Output`,value:$(a.totalTokens?.output??0)}),l(Q,{label:`Cost`,value:lt(a.totalCost??0)}),l(Q,{label:`RAG Context`,value:$(a.ragContextTokens??0)})]}),l(`div`,{className:`flex items-center gap-6 mb-6`,children:[l(yt,{segments:c,centerLabel:$(u)}),l(`div`,{className:`flex flex-wrap gap-3`,children:c.map(e=>l(`div`,{className:`flex items-center gap-1.5 text-xs text-slate-400`,children:[l(`span`,{className:`inline-block w-3 h-3 rounded-sm`,style:{background:e.color}}),e.label,`: `,$(e.value),` (`,(e.value/u*100).toFixed(1),`%)`]},e.label))})]}),l(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6`,children:[l(Q,{label:`Messages`,value:a.messageCount??0}),l(Q,{label:`Steps`,value:a.totalSteps??0}),l(Q,{label:`RAG Injections`,value:a.ragContextCount??0}),l(Q,{label:`Avg Response`,value:ut(a.avgResponseTimeMs??0)})]}),Object.keys(s).length>0&&l(`div`,{className:`kpi-card p-4 mb-6`,children:[l(`h3`,{className:`text-sm font-semibold text-slate-300 mb-3`,children:`Tool Calls`}),l(`div`,{className:`grid grid-cols-2 lg:grid-cols-4 gap-2`,children:Object.entries(s).map(([e,t])=>l(`div`,{className:`flex justify-between text-xs text-slate-400`,children:[l(`span`,{className:`font-mono`,children:e}),l(`span`,{className:`text-white`,children:String(t)})]},e))})]}),a.models&&a.models.length>0&&l(`div`,{className:`kpi-card p-4 mb-6`,children:[l(`h3`,{className:`text-sm font-semibold text-slate-300 mb-2`,children:`Models`}),l(`div`,{className:`flex flex-wrap gap-2`,children:a.models.map(e=>l(`span`,{className:`px-2 py-0.5 rounded text-xs font-mono bg-slate-800 text-slate-300`,children:e},e))})]}),o.length>0&&l(`div`,{className:`kpi-card p-4`,children:[l(`h3`,{className:`text-sm font-semibold text-slate-300 mb-3`,children:`Event Timeline`}),l(`div`,{className:`space-y-1 max-h-64 overflow-y-auto`,children:o.map((e,t)=>l(`div`,{className:`flex gap-2 text-xs border-b border-slate-700/50 py-1`,children:[l(`span`,{className:`text-slate-500 shrink-0 w-16`,children:dt(e.ts)}),l(`span`,{className:`text-slate-400`,children:e.event}),e.tool&&l(`span`,{className:`text-slate-500 font-mono`,children:e.tool}),e.toolStatus&&l(`span`,{className:`text-xs ${e.toolStatus===`completed`?`text-green-400`:e.toolStatus===`running`?`text-amber-400`:`text-slate-500`}`,children:e.toolStatus})]},t))})]})]})}function wt({ids:e}){let[t,n]=e,{data:r,isLoading:i,error:a}=q(()=>Promise.all([W.evalCompare(t,n),W.evalTokenCompare(t,n)]),[t,n]);if(i)return l(Y,{type:`chart`});if(a)return l(X,{message:a});if(!r)return null;let o=r[0],s=r[1],c=s.sessionA?.savings??0,u=s.sessionB?.savings??0;return l(`div`,{children:[l(`div`,{className:`flex items-center gap-3 mb-4`,children:[l(`button`,{className:`text-sm text-slate-400 hover:text-white`,onClick:()=>H(`evaluate`),children:`← Back`}),l(`h1`,{className:`text-xl font-bold`,children:`Session Comparison`})]}),l(`div`,{className:`px-4 py-3 rounded-lg mb-4 font-semibold text-sm ${c>0&&u>0?`bg-green-900/50 text-green-300 border border-green-700`:`bg-amber-900/50 text-amber-300 border border-amber-700`}`,children:c>0&&u>0?`RAG saves tokens`:`Mixed results`}),l(`div`,{className:`grid grid-cols-2 gap-4`,children:[l(`div`,{className:`kpi-card p-4`,children:[l(`h3`,{className:`text-sm font-semibold text-slate-300 mb-2`,children:o.sessionA?.title??`Session A`}),l(`div`,{className:`space-y-1 text-sm`,children:[l(`div`,{className:`flex justify-between`,children:[l(`span`,{className:`text-slate-400`,children:`Total Tokens`}),l(`span`,{children:$(o.sessionA?.totalTokens??0)})]}),l(`div`,{className:`flex justify-between`,children:[l(`span`,{className:`text-slate-400`,children:`Cost`}),l(`span`,{children:lt(o.sessionA?.totalCost??0)})]}),l(`div`,{className:`flex justify-between`,children:[l(`span`,{className:`text-slate-400`,children:`RAG Savings`}),l(`span`,{className:c>0?`text-green-400`:`text-red-400`,children:[$(Math.abs(c)),` (`,c>0?`+`:``,c>0?`+`:``,`)`]})]})]})]}),l(`div`,{className:`kpi-card p-4`,children:[l(`h3`,{className:`text-sm font-semibold text-slate-300 mb-2`,children:o.sessionB?.title??`Session B`}),l(`div`,{className:`space-y-1 text-sm`,children:[l(`div`,{className:`flex justify-between`,children:[l(`span`,{className:`text-slate-400`,children:`Total Tokens`}),l(`span`,{children:$(o.sessionB?.totalTokens??0)})]}),l(`div`,{className:`flex justify-between`,children:[l(`span`,{className:`text-slate-400`,children:`Cost`}),l(`span`,{children:lt(o.sessionB?.totalCost??0)})]}),l(`div`,{className:`flex justify-between`,children:[l(`span`,{className:`text-slate-400`,children:`RAG Savings`}),l(`span`,{className:u>0?`text-green-400`:`text-red-400`,children:$(Math.abs(u))})]})]})]})]})]})}var Tt={gotcha:`text-amber-400 bg-amber-900/20`,preference:`text-emerald-400 bg-emerald-900/20`,decision:`text-sky-400 bg-sky-900/20`,"environment-constraint":`text-rose-400 bg-rose-900/20`};function Et(e){return`<span class="inline-block px-1.5 py-0.5 rounded text-xs font-mono ${Tt[e]??`text-slate-400 bg-slate-800`}">${K(e||`general`)}</span>`}function Dt(){let{data:e,isLoading:t,error:n,refresh:r}=q(()=>W.quirks()),[i,a]=s(null),[o,c]=s(null),[u,d]=s(!1);if(t)return l(Y,{type:`card`});if(n)return l(X,{message:n,onRetry:r});let f=e?.quirks??[],p=[...new Set(f.map(e=>e.type||`general`))],m=i?f.filter(e=>(e.type||`general`)===i):f,h=async e=>{if(confirm(`Delete this quirk?`))try{await W.deleteQuirk(e),V(`success`,`Quirk deleted`),r()}catch(e){V(`error`,`Delete failed: ${e.message}`)}};return l(`div`,{children:[l(`div`,{className:`flex items-center justify-between mb-4`,children:[l(`h1`,{className:`text-2xl font-bold`,children:`Quirks`}),l(`button`,{className:`bg-slate-700 hover:bg-slate-600 text-white px-3 py-1 rounded text-sm transition-colors`,onClick:async()=>{d(!0);try{let e=await W.quirkLint();c(e)}catch(e){c({error:e.message})}d(!1)},disabled:u,children:u?`Linting...`:`Lint`})]}),l(`div`,{className:`flex gap-2 mb-4 flex-wrap`,children:[l(`button`,{className:`px-2 py-1 rounded text-xs font-medium transition-colors ${i===null?`bg-brand-600 text-white`:`bg-slate-700 text-slate-300 hover:bg-slate-600`}`,onClick:()=>a(null),children:`All`}),p.map(e=>l(`button`,{className:`px-2 py-1 rounded text-xs font-medium transition-colors ${i===e?`bg-brand-600 text-white`:`bg-slate-700 text-slate-300 hover:bg-slate-600`}`,onClick:()=>a(e),children:e},e))]}),o&&l(`div`,{className:`mb-4 p-3 rounded-lg border text-sm ${o.success?`bg-green-900/30 border-green-700 text-green-300`:o.error?`bg-red-900/30 border-red-700 text-red-300`:`bg-amber-900/30 border-amber-700 text-amber-300`}`,children:l(`pre`,{className:`text-xs whitespace-pre-wrap`,children:JSON.stringify(o,null,2)})}),m.length===0?l(Z,{icon:`💡`,message:`No quirks stored yet.`}):l(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-3`,children:m.map(e=>l(`div`,{className:`bg-slate-900 rounded-lg border border-slate-700 p-3 flex flex-col`,children:[l(`div`,{className:`flex items-center justify-between mb-2`,children:[l(`span`,{dangerouslySetInnerHTML:{__html:Et(e.type)}}),l(`span`,{className:`text-xs font-mono ${e.confidence>.7?`text-green-400`:e.confidence>.4?`text-amber-400`:`text-red-400`}`,children:[(e.confidence*100).toFixed(0),`%`]})]}),l(`p`,{className:`text-sm text-slate-200 mb-2 flex-1`,children:K(e.content)}),e.tags&&e.tags.length>0&&l(`div`,{className:`flex gap-1 flex-wrap mb-2`,children:e.tags.map(e=>l(`span`,{className:`text-xs bg-slate-800 text-slate-400 px-1.5 py-0.5 rounded`,children:[`#`,e]},e))}),l(`div`,{className:`flex items-center justify-between text-xs text-slate-600 mt-auto`,children:[e.sourceRef&&l(`span`,{className:`font-mono`,children:K(e.sourceRef)}),l(`span`,{className:`font-mono`,children:e.id})]}),l(`button`,{className:`self-end mt-2 text-xs text-slate-600 hover:text-red-400 transition-colors`,onClick:()=>h(e.id),"aria-label":`Delete quirk`,children:`Delete`})]},e.id))})]})}function Ot(){let[e,t]=s([]),[n,r]=s(!1),[i,a]=s(null),[o,c]=s(!1),l=He(L.value,300);return u(()=>{let e=I.value.trim();if(!e){t([]),a(null),r(!1),R.value=[];return}let n=!1;return(async()=>{r(!0),a(null);try{let i=await W.retrieve({q:e,topK:l.topK,minScore:l.minScore,keywordWeight:l.keywordWeight,hybrid:l.hybrid?`true`:`false`,path:l.pathFilter||void 0,lang:l.langFilter||void 0,ext:l.extFilter||void 0,explain:`true`});if(n)return;if(i.status===503){a(i.body?.error??`Embedding model unavailable`),r(!1);return}c(!1);let o=i.body?.results??i.results??[];t(o),R.value=o,Ae.value=[{query:e,params:{...l}},...Ae.value.filter(t=>t.query!==e).slice(0,19)]}catch(e){n||a(e.message)}finally{n||r(!1)}})(),()=>{n=!0}},[I.value,l]),{results:e,isLoading:n,isInitializing:o,error:i,setResults:t}}function kt({explanation:e}){let{vectorScore:t,keywordScore:n,rawVectorScore:r,rawKeywordScore:i,keywordWeight:a,vectorRank:o,keywordRank:s}=e.scoreBreakdown,c=Math.max(t+n,.001),u=(t/c*100).toFixed(0),d=(n/c*100).toFixed(0);return l(`div`,{className:`mb-2`,children:[l(`div`,{className:`flex items-center gap-2 text-xs mb-1`,children:[l(`span`,{className:`text-cyan-400`,title:`Vector: ${r.toFixed(3)}${o===void 0?``:`, rank #${o+1}`}`,children:[`Vector `,u,`%`]}),l(`span`,{className:`text-amber-400`,title:`Keyword: ${i.toFixed(3)}${s===void 0?``:`, rank #${s+1}`}`,children:[`Keyword `,d,`%`]}),l(`span`,{className:`text-slate-500 ml-auto`,children:[`kw=`,a.toFixed(1)]})]}),l(`div`,{className:`h-2 bg-slate-700 rounded-full overflow-hidden flex`,children:[l(`div`,{className:`h-full bg-cyan-500 transition-all duration-200`,style:{width:`${u}%`}}),l(`div`,{className:`h-full bg-amber-500 transition-all duration-200`,style:{width:`${d}%`}})]})]})}function At(){let e=m(),{results:t,isLoading:n,isInitializing:r,error:i}=Ot();return u(()=>{e.params.query&&(I.value=e.params.query,L.value={...L.value,topK:parseInt(e.params.topK??`10`,10),minScore:parseFloat(e.params.minScore??`0.35`),keywordWeight:parseFloat(e.params.keywordWeight??`0.4`),hybrid:e.params.hybrid!==`false`,pathFilter:e.params.path??``,langFilter:e.params.lang??``,extFilter:e.params.ext??``})},[]),u(()=>{if(I.value.trim()){let e=new URLSearchParams({query:I.value,topK:String(L.value.topK),minScore:String(L.value.minScore),keywordWeight:String(L.value.keywordWeight),hybrid:String(L.value.hybrid)});L.value.pathFilter&&e.set(`path`,L.value.pathFilter),L.value.langFilter&&e.set(`lang`,L.value.langFilter),L.value.extFilter&&e.set(`ext`,L.value.extFilter);let t=`search?${e.toString()}`;location.hash!==`#${t}`&&history.replaceState(null,``,`#${t}`)}},[I.value,L.value]),l(`div`,{children:[l(`h1`,{className:`text-2xl font-bold mb-4`,children:`Semantic Search`}),l(`div`,{className:`flex gap-3 mb-4`,children:l(`input`,{type:`text`,value:I.value,onInput:e=>{I.value=e.target.value,R.value=[]},onKeyDown:e=>{e.key===`Enter`&&I.value.trim()},placeholder:`Search your codebase semantically... (e.g., 'how does authentication work?')`,className:`flex-1 px-4 py-2 bg-slate-800 border border-slate-600 rounded-lg text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-brand-400`,autoFocus:!0,"aria-label":`Semantic search query`})}),l(`details`,{className:`mb-4 bg-slate-800 rounded-lg border border-slate-700`,children:[l(`summary`,{className:`px-3 py-2 text-xs text-slate-400 cursor-pointer hover:text-white font-medium`,children:`Search Parameters`}),l(`div`,{className:`px-3 pb-3 space-y-3`,children:[l(Nt,{label:`topK`,min:1,max:25,step:1,value:L.value.topK,onChange:e=>{L.value={...L.value,topK:e}}}),l(Nt,{label:`minScore`,min:0,max:1,step:.05,value:L.value.minScore,onChange:e=>{L.value={...L.value,minScore:e}}}),l(Nt,{label:`keywordWeight`,min:0,max:1,step:.1,value:L.value.keywordWeight,onChange:e=>{L.value={...L.value,keywordWeight:e}}}),l(`div`,{className:`flex items-center gap-2`,children:[l(`label`,{className:`text-xs text-slate-400 w-28`,children:`Hybrid mode`}),l(`input`,{type:`checkbox`,checked:L.value.hybrid,onChange:e=>{L.value={...L.value,hybrid:e.target.checked}},className:`accent-brand-500`})]}),l(`div`,{className:`flex items-center gap-3`,children:[l(`label`,{className:`text-xs text-slate-400 w-28 shrink-0`,children:`Extensions`}),l(`input`,{type:`text`,value:L.value.extFilter,onInput:e=>{L.value={...L.value,extFilter:e.target.value}},placeholder:`.ts, .py (comma-separated)`,className:`flex-1 px-2 py-1 bg-slate-900 border border-slate-600 rounded text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-brand-400`,"aria-label":`File extension filter`})]}),l(`div`,{className:`flex items-center gap-3`,children:[l(`label`,{className:`text-xs text-slate-400 w-28 shrink-0`,children:`Languages`}),l(`input`,{type:`text`,value:L.value.langFilter,onInput:e=>{L.value={...L.value,langFilter:e.target.value}},placeholder:`typescript, python (comma-separated)`,className:`flex-1 px-2 py-1 bg-slate-900 border border-slate-600 rounded text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-brand-400`,"aria-label":`Language filter`})]}),l(`div`,{className:`flex items-center gap-3`,children:[l(`label`,{className:`text-xs text-slate-400 w-28 shrink-0`,children:`Path`}),l(`input`,{type:`text`,value:L.value.pathFilter,onInput:e=>{L.value={...L.value,pathFilter:e.target.value}},placeholder:`src/** (comma-separated)`,className:`flex-1 px-2 py-1 bg-slate-900 border border-slate-600 rounded text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-brand-400`,"aria-label":`Path filter`})]})]})]}),r&&l(`div`,{className:`text-center py-10 text-slate-400`,children:[l(`span`,{className:`animate-spin inline-block mr-2`,children:`⟳`}),`Initializing embedding model...`]}),i&&l(X,{message:i}),!n&&!i&&I.value.trim()&&t.length===0&&l(`div`,{className:`text-center py-16 text-slate-500`,children:[l(`div`,{className:`text-4xl mb-2`,children:`🔍`}),l(`div`,{children:[`No results found for "`,K(I.value),`"`]})]}),!n&&!i&&!I.value.trim()&&l(`div`,{className:`text-center py-16 text-slate-500`,children:[l(`div`,{className:`text-4xl mb-2`,children:`🔍`}),l(`div`,{children:`Enter a query to search your codebase`}),Ae.value.length>0&&l(`div`,{className:`mt-6`,children:[l(`p`,{className:`text-xs text-slate-600 mb-2`,children:`Recent queries:`}),l(`div`,{className:`flex flex-wrap gap-2 justify-center`,children:Ae.value.slice(0,10).map((e,t)=>l(`button`,{className:`px-2 py-1 bg-slate-800 rounded text-xs text-slate-400 hover:text-white hover:bg-slate-700 transition-colors`,onClick:()=>{I.value=e.query},children:K(e.query)},t))})]})]}),t.length>0&&l(`div`,{className:`space-y-3`,children:[l(`div`,{className:`flex items-center justify-between text-sm text-slate-400 mb-2`,children:[l(`span`,{children:[t.length,` result`,t.length===1?``:`s`]}),n&&l(`span`,{className:`text-xs text-brand-400 animate-pulse`,children:`Searching...`})]}),t.map(e=>l(jt,{result:e},e.chunk.id))]}),n&&t.length===0&&l(`div`,{className:`text-center py-10 text-slate-400`,children:[l(`span`,{className:`animate-spin inline-block mr-2`,children:`⟳`}),`Searching...`]})]})}function jt({result:e}){let t=e.chunk,n=e.score;return l(`div`,{className:`bg-slate-800 rounded-lg p-4 border border-slate-700 hover:border-brand-500/50 transition-colors cursor-pointer`,onClick:()=>H(`chunks?id=${encodeURIComponent(t.id)}`),children:[l(`div`,{className:`flex items-center justify-between mb-2`,children:[l(`div`,{className:`flex items-center gap-2 min-w-0`,children:[l(`span`,{className:`text-sm text-yellow-400 font-mono truncate`,children:[K(t.filePath),`:`,t.startLine,`-`,t.endLine]}),l(`span`,{dangerouslySetInnerHTML:{__html:G(t.language)}})]}),l(`span`,{className:`text-lg font-bold shrink-0 ml-2`,style:{color:Mt(n)},children:n.toFixed(2)})]}),e.explanation&&l(kt,{explanation:e.explanation}),e.explanation?.matchedTerms?.length>0&&l(`div`,{className:`flex gap-1 flex-wrap mb-2`,children:e.explanation.matchedTerms.map(e=>l(`span`,{className:`text-xs bg-amber-500/20 text-amber-300 px-1.5 py-0.5 rounded`,children:K(e)},e))}),t.description&&l(`p`,{className:`text-sm text-slate-400 mb-2 line-clamp-2`,children:K(t.description)}),l(`pre`,{className:`text-xs overflow-x-auto max-h-32 rounded bg-slate-900/50 p-2`,children:l(`code`,{children:K(t.content??``).slice(0,500)})})]})}function Mt(e){return e>=.8?`#22c55e`:e>=.6?`#06b6d4`:e>=.4?`#f59e0b`:`#ef4444`}function Nt({label:e,min:t,max:n,step:r,value:i,onChange:a}){return l(`div`,{className:`flex items-center gap-3`,children:[l(`label`,{className:`text-xs text-slate-400 w-28 shrink-0`,children:e}),l(`input`,{type:`range`,min:t,max:n,step:r,value:i,onInput:e=>a(parseFloat(e.target.value)),className:`flex-1 accent-brand-500`}),l(`span`,{className:`text-xs text-slate-300 font-mono w-12 text-right`,children:i})]})}function Pt(){let e=m().params.ids?.split(`,`).filter(Boolean)??[],[t,n]=s([]),[r,i]=s(!0),[a,o]=s(null);return u(()=>{let t=!1;if(e.length<2)o(`Select 2-3 chunks to compare.`),i(!1);else return W.compare(e).then(e=>{t||(n(e?.body?.chunks??e?.chunks??[]),i(!1))}).catch(e=>{t||(o(e.message),i(!1))}),()=>{t=!0}},[e.join(`,`)]),r?l(Y,{type:`detail`}):a?l(X,{message:a}):t.length<2?l(Z,{icon:`📋`,message:`Select 2-3 chunks from the Chunks view to compare them.`}):l(`div`,{children:[l(`div`,{className:`flex items-center justify-between mb-4`,children:[l(`h1`,{className:`text-2xl font-bold`,children:`Chunk Comparison`}),l(`button`,{className:`text-sm text-slate-400 hover:text-white transition-colors`,onClick:()=>H(`chunks`),children:`← Back to Chunks`})]}),l(`div`,{className:`grid gap-4 ${t.length===2?`grid-cols-2`:`grid-cols-3`}`,children:t.map((e,n)=>l(Ft,{chunk:e,index:n,baseChunk:n>0?t[0]:void 0},e.id))})]})}function Ft({chunk:e,index:t,baseChunk:n}){let r=e.content.split(`
3
+ `),i=n?.content.split(`
4
+ `)??[];return l(`div`,{className:`bg-slate-800 rounded-lg border border-slate-700 overflow-hidden flex flex-col`,children:[l(`div`,{className:`p-3 border-b border-slate-700 bg-slate-800/80`,children:[l(`div`,{className:`flex items-center justify-between mb-1`,children:[l(`span`,{className:`text-sm font-mono text-brand-400 truncate mr-2`,children:[K(e.filePath),`:`,e.startLine,`-`,e.endLine]}),l(`span`,{className:`shrink-0`,dangerouslySetInnerHTML:{__html:G(e.language)}})]}),e.description&&l(`p`,{className:`text-xs text-slate-400 truncate`,children:K(e.description)})]}),l(`div`,{className:`overflow-x-auto flex-1 max-h-[70vh]`,children:l(`table`,{className:`w-full text-xs font-mono border-collapse`,children:l(`tbody`,{children:r.map((t,n)=>{let r=(e.startLine??1)+n,a=i[n]===void 0?`bg-green-900/30`:t===``&&i[n]!==``?`bg-red-900/30`:t===i[n]?``:`bg-amber-900/20`;return l(`tr`,{className:a,children:[l(`td`,{className:`text-right text-slate-600 select-none px-2 w-10 border-r border-slate-700 align-top`,children:r}),l(`td`,{className:`px-3 py-0 whitespace-pre-wrap break-all`,children:K(t)||`\xA0`})]},n)})})})}),l(`div`,{className:`px-3 py-1.5 bg-slate-900 border-t border-slate-700 text-xs text-slate-500`,children:[`Chunk `,t+1,t===0&&l(`span`,{className:`text-slate-600 ml-1`,children:`(reference)`})]})]})}function It(){let{data:e,isLoading:t,error:n,refresh:r}=q(()=>W.config());if(t)return l(Y,{type:`card`});if(n)return l(X,{message:n,onRetry:r});let i=e?.body?.config??e?.config;return i?l(`div`,{children:[l(`h1`,{className:`text-2xl font-bold mb-6`,children:`Configuration`}),l(`p`,{className:`text-sm text-slate-400 mb-4`,children:[`Effective configuration from `,l(`code`,{className:`text-brand-400`,children:`opencode-rag.json`}),`. API keys are redacted.`]}),l(`div`,{className:`space-y-4`,children:Object.entries(i).map(([e,t])=>l(`details`,{className:`bg-slate-800 rounded-lg border border-slate-700`,open:!0,children:[l(`summary`,{className:`px-4 py-2 cursor-pointer hover:bg-slate-700 font-mono text-sm font-semibold capitalize text-slate-300`,children:e.replace(/([A-Z])/g,` $1`)}),l(`div`,{className:`px-4 pb-3`,children:typeof t==`object`&&t?Object.entries(t).map(([e,t])=>l(`div`,{className:`flex justify-between py-1 border-b border-slate-700/50 text-sm`,children:[l(`span`,{className:`text-slate-400 font-mono`,children:e}),l(`span`,{className:`text-slate-200 font-mono text-xs text-right ml-4`,children:Lt(t)})]},e)):l(`div`,{className:`flex justify-between py-1 text-sm`,children:l(`span`,{className:`text-slate-200 font-mono`,children:String(t)})})})]},e))})]}):l(Z,{icon:`⚙`,message:`No configuration available.`})}function Lt(e){return e===null?`null`:e===void 0?`undefined`:typeof e==`boolean`?e?`true`:`false`:Array.isArray(e)?`[${e.join(`, `)}]`:typeof e==`object`?JSON.stringify(e).slice(0,150):String(e)}var Rt=10;function zt({points:e,width:n=800,height:r=600,onPointClick:a,renderTooltip:o}){let c=i(null),[d,f]=s({x:0,y:0,scale:1}),[p,m]=s(null),[h,g]=s(!1),_=i({x:0,y:0}),v=i(null),y=i(null),b=i(e);b.current=e;let x=t(e=>{v.current=e(v.current??d),y.current===null&&(y.current=requestAnimationFrame(()=>{y.current=null,v.current&&=(f(v.current),null)}))},[d]);u(()=>()=>{y.current!==null&&cancelAnimationFrame(y.current)},[]);let S=t((e,t)=>{let i=c.current;if(!i)return null;let a=i.getBoundingClientRect(),o=v.current??d,s=e-a.left,l=t-a.top,u=null,f=Rt;for(let e of b.current){let t=e.x*n*o.scale+o.x,i=e.y*r*o.scale+o.y,a=s-t,c=l-i,d=Math.sqrt(a*a+c*c);d<=f&&(f=d,u=e)}return u},[d,n,r]);u(()=>{let t=c.current;if(!t)return;let i=t.getContext(`2d`);if(!i)return;let a=window.devicePixelRatio||1;t.width=n*a,t.height=r*a,i.scale(a,a),i.clearRect(0,0,n,r),i.save(),i.translate(d.x,d.y),i.scale(d.scale,d.scale);for(let t of e){let e=t.x*n,a=t.y*r,o=(t.radius??3)*(t.highlighted?2:1);i.beginPath(),i.arc(e,a,o,0,Math.PI*2),i.fillStyle=t.color,i.globalAlpha=t.highlighted?1:.6,i.fill(),t.highlighted&&(i.strokeStyle=`#22d3ee`,i.lineWidth=2,i.stroke())}i.restore()},[e,d,n,r]);let C=e=>{e.preventDefault();let t=e.deltaY>0?.9:1.1;x(e=>({...e,scale:Math.max(.5,Math.min(10,e.scale*t))}))},ee=e=>{g(!0),_.current={x:e.clientX-d.x,y:e.clientY-d.y}},w=e=>{if(h){x(t=>({...t,x:e.clientX-_.current.x,y:e.clientY-_.current.y}));return}let t=S(e.clientX,e.clientY);m(e=>e?.id===t?.id?e:t)},T=()=>g(!1);return l(`div`,{className:`relative overflow-hidden rounded-lg border border-slate-700 bg-slate-900`,style:{width:n,height:r},children:[l(`canvas`,{ref:c,className:`absolute inset-0 cursor-grab active:cursor-grabbing`,onMouseDown:ee,onMouseMove:w,onMouseUp:T,onMouseLeave:T,onClick:e=>{if(h)return;let t=S(e.clientX,e.clientY);t&&a?.(t.id)},onWheel:C}),p&&o&&l(`div`,{className:`absolute bg-slate-800 border border-slate-600 rounded-lg p-3 shadow-xl text-sm z-10 pointer-events-none`,style:{left:Math.min(p.x*n*d.scale+d.x+12,n-200),top:Math.min(p.y*r*d.scale+d.y-12,r-80)},children:o(p)}),d.scale!==1&&l(`button`,{className:`absolute bottom-3 right-3 px-2 py-1 bg-slate-700 hover:bg-slate-600 rounded text-xs text-white transition-colors z-20`,onClick:()=>{f({x:0,y:0,scale:1}),v.current=null},children:`Reset zoom`})]})}function Bt(e,t){let n=e.x-t.x,r=e.y-t.y,i=(e.z??0)-(t.z??0);return Math.sqrt(n*n+r*r+i*i)}function Vt(e,t=8,n=20){let r=e.length;if(r<=t)return e.map((e,t)=>t);let i=Array(r).fill(0),a=[];a.push(e[Math.floor(Math.random()*r)]);for(let n=1;n<t;n++){let t=e.map(e=>Math.min(...a.map(t=>Bt(e,t)))),n=t.reduce((e,t)=>e+t*t,0),i=Math.random()*n;for(let n=0;n<r;n++)if(i-=t[n]*t[n],i<=0){a.push(e[n]);break}}for(let t=0;t<n;t++){for(let t=0;t<r;t++){let n=0,r=Bt(e[t],a[0]);for(let i=1;i<a.length;i++){let o=Bt(e[t],a[i]);o<r&&(r=o,n=i)}i[t]=n}let t=a.map(()=>({x:0,y:0,z:0,count:0}));for(let n=0;n<r;n++){let r=i[n];t[r].x+=e[n].x,t[r].y+=e[n].y,t[r].z+=e[n].z??0,t[r].count++}a.forEach((e,n)=>{t[n].count>0&&(e.x=t[n].x/t[n].count,e.y=t[n].y/t[n].count,e.z!==void 0&&(e.z=t[n].z/t[n].count))})}return i}function Ht(e,t,n){let r=n.map((n,r)=>{let i=e.filter((e,n)=>t[n]===r).map(e=>Bt(e,n)),a=i.reduce((e,t)=>e+t,0)/i.length,o=i.reduce((e,t)=>e+(t-a)**2,0)/i.length;return Math.sqrt(o)}),i=new Set;for(let a=0;a<e.length;a++){let o=t[a];Bt(e[a],n[o])>2*(r[o]??0)&&i.add(a)}return i}var Ut=`modulepreload`,Wt=function(e){return`/ui/`+e},Gt={},Kt=function(e){return e.pathname.endsWith(`.css`)},qt=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Jt=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Wt(t,n);let r=s(t),i=Kt(r);return qt(Gt,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Ut,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Yt=o(()=>Jt(()=>import(`./ScatterPlot3D-XjXIwavM.js`).then(e=>({default:e.ScatterPlot3D})),__vite__mapDeps([0,1]))),Xt=[`#3b82f6`,`#ef4444`,`#22c55e`,`#f59e0b`,`#a855f7`,`#06b6d4`,`#ec4899`,`#84cc16`,`#f97316`,`#14b8a6`,`#8b5cf6`,`#e11d48`,`#65a30d`,`#0ea5e9`,`#d946ef`,`#ca8a04`,`#64748b`,`#4ade80`,`#fb7185`,`#38bdf8`],Zt=2,Qt=50,$t=5,en=200,tn=20,nn=12;function rn(){let{data:t,isLoading:r,error:a,refresh:o}=q(()=>W.embeddingProj(5e3,3)),[c,f]=s(`language`),[p,m]=s(`3d`),[h,g]=s(!1),[_,v]=s(8),[y,b]=s(20),[x,S]=s(!1),[C,ee]=s(new Set),[w,T]=s(5),[te,ne]=s(0),[E,D]=s(null),[re,ie]=s(!1),ae=i(0),[O,oe]=s(null),[se,ce]=s(new Set),k=t?.body?.points??t?.points??[],A=t?.body?.totalChunks??t?.totalChunks??0;if(u(()=>{if(c===`cluster`&&k.length>0){let e=Math.max(Zt,Math.min(_,k.length)),t=Vt(k,e,y);if(oe(t),h){let n=[];for(let r=0;r<e;r++){let e=k.filter((e,n)=>t[n]===r);if(e.length>0){let t=e[0]?.z!==void 0;n.push({x:e.reduce((e,t)=>e+t.x,0)/e.length,y:e.reduce((e,t)=>e+t.y,0)/e.length,...t?{z:e.reduce((e,t)=>e+(t.z??0),0)/e.length}:{}})}}ce(Ht(k,t,n))}}else oe(null),ce(new Set)},[c,h,_,y,k]),u(()=>{x&&R.value.length>0?ee(new Set(R.value.map(e=>e.chunk.id))):ee(new Set)},[x,R.value]),r)return l(Y,{type:`chart`});if(a)return l(X,{message:a,onRetry:o});if(k.length===0)return l(Z,{icon:`🌐`,message:`No embedding data available. Index some files first.`});let j=e(()=>sn(k),[k]),M=e(()=>k.map((e,t)=>{let n;n=c===`language`?Ye(e.language)===`text-slate-400`?`#94a3b8`:cn(e.language):c===`file`?j.get(e.filePath)??`#94a3b8`:Xt[(O?.[t]??0)%Xt.length];let r=se.has(t),i=C.has(e.id);return{id:e.id,x:e.x,y:e.y,z:e.z??.5,color:i?`#22d3ee`:r?`#f97316`:n,label:`${e.filePath}:${e.startLine}-${e.endLine} [${e.language}]`,radius:i?6:r?5:3,highlighted:i}}),[k,c,O,se,C,j]),N=e(()=>{if(c!==`file`)return[];let e=on(k.map(e=>e.filePath)),t=new Map;for(let e of k)t.set(e.filePath,(t.get(e.filePath)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]).slice(0,nn).map(([t,n])=>({label:t.slice(e.length)||t,count:n,color:j.get(t)??`#94a3b8`}))},[c,k,j]),le=e(()=>c===`file`?new Set(k.map(e=>e.filePath)).size-N.length:0,[c,k,N]),ue=e=>{let t=++ae.current;D(null),ie(!0),W.chunk(e).then(e=>{t===ae.current&&(D(e),ie(!1))}).catch(()=>{t===ae.current&&(D({id:e,content:``,filePath:`not found`,language:``,startLine:0,endLine:0,description:`Error loading chunk details.`}),ie(!1))})};return l(`div`,{children:[l(`h1`,{className:`text-2xl font-bold mb-4`,children:`Embedding Space Explorer`}),l(`div`,{className:`flex flex-wrap gap-3 mb-4 items-center`,children:[l(`div`,{className:`flex items-center gap-1 bg-slate-800 border border-slate-600 rounded-lg p-0.5`,children:[`2d`,`3d`].map(e=>l(`button`,{className:`px-2 py-0.5 rounded text-xs transition-colors ${p===e?`bg-slate-600 text-white`:`text-slate-400 hover:text-slate-200`}`,onClick:()=>m(e),children:e.toUpperCase()},e))}),l(`label`,{className:`text-xs text-slate-400`,children:`Color by:`}),l(`select`,{className:`bg-slate-800 border border-slate-600 rounded text-xs text-slate-200 px-2 py-1`,value:c,onChange:e=>f(e.target.value),children:[l(`option`,{value:`language`,children:`Language`}),l(`option`,{value:`file`,children:`File`}),l(`option`,{value:`cluster`,children:`Cluster`})]}),c===`cluster`&&l(n,{children:[l(`label`,{className:`text-xs text-slate-400`,children:`K:`}),l(`input`,{type:`number`,min:Zt,max:Qt,value:_,onChange:e=>v(an(e.target,Zt,Qt,8)),className:`bg-slate-800 border border-slate-600 rounded text-xs text-slate-200 px-2 py-1 w-16`,title:`Number of clusters`}),l(`label`,{className:`text-xs text-slate-400`,children:`Iterations:`}),l(`input`,{type:`number`,min:$t,max:en,value:y,onChange:e=>b(an(e.target,$t,en,20)),className:`bg-slate-800 border border-slate-600 rounded text-xs text-slate-200 px-2 py-1 w-20`,title:`Maximum k-means iterations`})]}),l(`label`,{className:`flex items-center gap-1.5 text-xs text-slate-400`,children:[l(`input`,{type:`checkbox`,className:`accent-brand-500`,checked:h,onChange:e=>g(e.target.checked)}),`Outliers`]}),R.value.length>0&&l(`label`,{className:`flex items-center gap-1.5 text-xs text-slate-400`,children:[l(`input`,{type:`checkbox`,className:`accent-brand-500`,checked:x,onChange:e=>S(e.target.checked)}),`Search overlay (`,R.value.length,` results)`]}),p===`3d`&&l(n,{children:[l(`label`,{className:`text-xs text-slate-400`,children:`Point size:`}),l(`input`,{type:`range`,min:1,max:20,value:w,onChange:e=>T(Number(e.target.value)),className:`w-24 accent-brand-500`}),l(`button`,{className:`px-2 py-1 bg-slate-700 hover:bg-slate-600 rounded text-xs text-white transition-colors`,onClick:()=>ne(e=>e+1),children:`Reset camera`})]})]}),c===`cluster`&&O&&l(`div`,{className:`flex flex-wrap gap-2 mb-3 text-xs`,children:(()=>{let e=Array.from(new Set(O)).sort((e,t)=>e-t),t=e.slice(0,tn),r=e.length-t.length;return l(n,{children:[t.map(e=>l(`span`,{className:`flex items-center gap-1 text-slate-400`,children:[l(`span`,{className:`inline-block w-2 h-2 rounded-full`,style:{background:Xt[e%Xt.length]}}),`Cluster `,e+1]},e)),r>0&&l(`span`,{className:`text-slate-500`,children:[`+`,r,` more`]})]})})()}),c===`file`&&N.length>0&&l(`div`,{className:`flex flex-wrap gap-2 mb-3 text-xs`,children:[N.map(({label:e,count:t,color:n})=>l(`span`,{className:`flex items-center gap-1 text-slate-400`,title:e,children:[l(`span`,{className:`inline-block w-2 h-2 rounded-full`,style:{background:n}}),K(Ze(e,40)),` (`,t,`)`]},e)),le>0&&l(`span`,{className:`text-slate-500`,children:[`+`,le,` more files`]})]}),p===`3d`?l(d,{fallback:l(Y,{type:`chart`}),children:l(Yt,{points:M,width:900,height:600,onPointClick:ue,pointSize:w,resetKey:te,selectedId:E?.id??null})}):l(zt,{points:M,width:900,height:600,onPointClick:ue,renderTooltip:e=>{let t=k.find(t=>t.id===e.id);return l(`div`,{children:[l(`div`,{className:`text-yellow-400 font-mono text-xs`,children:K(e.label)}),t?.description&&l(`div`,{className:`text-slate-400 text-xs mt-1`,children:K(Ze(t.description,80))})]})}}),re&&l(Y,{type:`detail`}),E&&!re&&l(`div`,{className:`kpi-card p-4 mt-4`,children:[l(`div`,{className:`flex items-center gap-3 mb-1 flex-wrap`,children:[l(`span`,{className:`text-yellow-400 font-mono text-sm`,children:K(E.filePath)}),l(`span`,{className:`text-slate-400 text-xs`,children:[`Lines `,E.startLine,`-`,E.endLine]}),l(`span`,{dangerouslySetInnerHTML:{__html:G(E.language)}}),E.id&&l(`span`,{className:`text-xs text-slate-600 font-mono`,children:E.id}),l(`button`,{className:`ml-auto px-2 py-1 bg-slate-700 hover:bg-slate-600 rounded text-xs text-white transition-colors`,onClick:()=>H(`chunks?id=${encodeURIComponent(E.id)}`),children:`Open in Chunks`})]}),E.description&&l(`div`,{className:`mb-3`,children:[l(`h3`,{className:`text-xs font-semibold text-slate-400 mb-1`,children:`Description`}),l(`p`,{className:`text-sm text-slate-300`,children:K(E.description)})]}),E.content&&l(`div`,{children:[l(`h3`,{className:`text-xs font-semibold text-slate-400 mb-1`,children:`Content`}),l(`pre`,{className:`text-xs text-slate-300 bg-slate-900 border border-slate-700 rounded p-3 overflow-auto max-h-64 font-mono whitespace-pre`,children:K(E.content)})]})]}),l(`p`,{className:`text-xs text-slate-500 mt-2`,children:[M.length,` of `,A,` chunks displayed`,M.length<A&&` (chunks without embeddings omitted)`]})]})}function an(e,t,n,r){let i=parseInt(e?.value??``,10);return Number.isNaN(i)?r:Math.max(t,Math.min(n,i))}function on(e){if(e.length===0)return``;let t=e[0]??``;for(let n of e)for(;n&&t&&!n.startsWith(t);)t=t.slice(0,-1);let n=t.lastIndexOf(`/`);return n>=0?t.slice(0,n+1):``}function sn(e){let t=new Map;for(let n of e){let e=t.get(n.filePath)??{x:0,y:0,z:0,n:0};e.x+=n.x,e.y+=n.y,e.z+=n.z??0,e.n++,t.set(n.filePath,e)}let n=[];for(let[e,r]of t)n.push({file:e,x:r.x/r.n,y:r.y/r.n,z:r.z/r.n});let r=n.reduce((e,t)=>e+t.x,0)/n.length,i=n.reduce((e,t)=>e+t.y,0)/n.length,a=n.reduce((e,t)=>e+t.z,0)/n.length,o=n.reduce((e,t)=>e+(t.x-r)**2,0),s=n.reduce((e,t)=>e+(t.y-i)**2,0),c=n.reduce((e,t)=>e+(t.z-a)**2,0),l=o>=s&&o>=c?`x`:s>=c?`y`:`z`,u=[`x`,`y`,`z`].filter(e=>e!==l);n.sort((e,t)=>e[l]-t[l]||e[u[0]]-t[u[0]]||e[u[1]]-t[u[1]]);let d=new Map;for(let e=0;e<n.length;e++){let t=e*137.508%360,r=e%2==0?55:40;d.set(n[e].file,`hsl(${t.toFixed(1)}, 80%, ${r}%)`)}return d}function cn(e){return{typescript:`#60a5fa`,javascript:`#facc15`,python:`#4ade80`,java:`#f87171`,go:`#22d3ee`,rust:`#fb923c`,ruby:`#f472b6`,csharp:`#a78bfa`,cpp:`#818cf8`,c:`#9ca3af`,markdown:`#d1d5db`,html:`#fdba74`,css:`#60a5fa`,json:`#fde047`,kotlin:`#c084fc`,swift:`#fb923c`,tex:`#34d399`,sql:`#67e8f9`,text:`#94a3b8`,image:`#a78bfa`,quirk:`#fbbf24`}[e]??`#94a3b8`}var ln=[{view:`dashboard`,label:`Dashboard`,icon:`📊`},{view:`search`,label:`Search`,icon:`🔍`},{view:`embeddings`,label:`Embeddings`,icon:`🌐`},{view:`chunks`,label:`Chunks`,icon:`🧩`},{view:`files`,label:`Files`,icon:`📄`},{view:`evaluate`,label:`Evaluate`,icon:`📈`},{view:`quirks`,label:`Quirks`,icon:`💡`}];function un(){Re(),ze();let e=m(),t=i(null);we.value=e.view;let r=()=>{je.value=!je.value};return l(`div`,{className:`h-screen flex flex-col overflow-hidden`,children:[l(`header`,{className:`flex items-center gap-3 px-4 py-2 border-b shrink-0`,style:{borderColor:`var(--border)`},children:[l(`h1`,{className:`text-lg font-bold shrink-0`,style:{color:`var(--accent)`},children:`OpenCodeRAG`}),l(`nav`,{className:`flex gap-1 flex-1`,role:`navigation`,"aria-label":`Main navigation`,children:ln.map(e=>l(`button`,{id:`nav-${e.view}`,className:`nav-btn ${we.value===e.view?`active`:``}`,onClick:()=>window.location.hash=e.view,role:`tab`,"aria-selected":we.value===e.view,children:[e.icon,` `,e.label]},e.view))}),l(Qe,{}),l(Ve,{}),l(`button`,{className:`p-2 rounded-lg transition-colors hidden lg:block`,style:{color:`var(--text-muted)`},onClick:r,"aria-label":`Toggle file tree`,title:`Toggle file tree`,children:`☰`}),l(`button`,{className:`p-2 rounded-lg transition-colors lg:hidden`,style:{color:`var(--text-muted)`},onClick:r,"aria-label":`Toggle file tree`,title:`Toggle file tree`,children:`☰`})]}),l(`div`,{className:`flex flex-1 overflow-hidden`,children:[je.value&&l(n,{children:[l(`div`,{className:`fixed inset-0 z-30 lg:hidden`,style:{background:`rgba(0,0,0,0.5)`},onClick:()=>{je.value=!1}}),l(`aside`,{ref:t,className:`shrink-0 border-r z-40 fixed lg:relative inset-y-0 left-0 flex flex-col max-w-[85vw] lg:max-w-none`,style:{background:`var(--bg-secondary)`,borderColor:`var(--border)`,width:`${B.peek()}px`},children:[l(`div`,{className:`flex-1 min-h-0 overflow-y-auto`,role:`tree`,"aria-label":`File tree`,children:[l(at,{}),l($e,{})]}),l(ct,{targetRef:t})]})]}),l(`main`,{className:`flex-1 overflow-y-auto p-6`,id:`main-content`,tabIndex:-1,children:[e.view===`dashboard`&&l(mt,{}),e.view===`search`&&l(At,{}),e.view===`embeddings`&&l(rn,{}),e.view===`compare`&&l(Pt,{}),e.view===`chunks`&&l(gt,{}),e.view===`files`&&l(vt,{}),e.view===`evaluate`&&l(xt,{}),e.view===`quirks`&&l(Dt,{}),e.view===`config`&&l(It,{})]})]}),l(Be,{})]})}f(l(un,{}),document.getElementById(`app`));
@@ -5,9 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>OpenCodeRAG</title>
7
7
  <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔎</text></svg>">
8
- <script type="module" crossorigin src="/ui/assets/index-DbXFrn53.js"></script>
8
+ <script type="module" crossorigin src="/ui/assets/index-FFPRbgLx.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/ui/assets/vendor-Dg8wMT7C.js">
10
- <link rel="stylesheet" crossorigin href="/ui/assets/index-CWcp0jNf.css">
10
+ <link rel="stylesheet" crossorigin href="/ui/assets/index-B-RH6fko.css">
11
11
  </head>
12
12
  <body class="h-screen flex flex-col overflow-hidden bg-slate-900 text-slate-200">
13
13
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-rag-plugin",
3
- "version": "2.10.1",
3
+ "version": "2.11.1",
4
4
  "description": "OpenCode plugin for local-first RAG-based semantic code search",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin-entry.js",
@@ -102,6 +102,7 @@
102
102
  }
103
103
  },
104
104
  "dependencies": {
105
+ "@clickhouse/client": "^1.24.1",
105
106
  "@e965/xlsx": "^0.20.3",
106
107
  "@lancedb/lancedb": "^0.29.0",
107
108
  "@modelcontextprotocol/sdk": "^1.29.0",
@@ -150,7 +151,11 @@
150
151
  "web-tree-sitter": "$web-tree-sitter",
151
152
  "@babel/core": "^7.29.7",
152
153
  "@opentelemetry/core": "^2.8.0",
153
- "seroval": "^1.6.8"
154
+ "seroval": "^1.6.8",
155
+ "@opencode-ai/plugin": {
156
+ "effect": "^4.0.6"
157
+ },
158
+ "zod": "^4.6.7"
154
159
  },
155
160
  "allowScripts": {
156
161
  "opencode-rag-plugin": true,
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-900:oklch(37.8% .077 168.94);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-indigo-400:oklch(67.3% .182 276.935);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-900:oklch(41% .159 10.272);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:.25rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-400:#22d3ee;--color-brand-500:#06b6d4;--color-brand-600:#0891b2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.chunk-row.selected{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.chunk-row.selected{background:color-mix(in srgb, var(--accent) 10%, transparent)}}.chunk-row.selected{border-left:2px solid var(--accent)}.chunk-row:hover{background:var(--bg-tertiary)}.file-item.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.file-item.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.file-item.active{color:var(--text-primary)}.file-item:hover{background:var(--bg-tertiary)}.sidebar-resizer{cursor:col-resize;touch-action:none;background:0 0;width:7px;transition:background-color .15s;position:absolute;top:0;bottom:0;right:-3px}.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.sidebar-resizer:hover,.sidebar-resizer.dragging,.sidebar-resizer:focus-visible{background:color-mix(in srgb, var(--accent) 55%, transparent)}}.kpi-card{background:var(--bg-card);border:1px solid var(--border);border-radius:.75rem}.nav-btn{color:var(--text-muted);border-radius:.25rem;padding:.375rem .75rem;font-size:.875rem;transition:color .15s,background-color .15s}.nav-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}.nav-btn.active{background:var(--accent)}@supports (color:color-mix(in lab, red, red)){.nav-btn.active{background:color-mix(in srgb, var(--accent) 20%, transparent)}}.nav-btn.active{color:var(--accent)}pre,code{background:var(--bg-code)}table thead{background:var(--bg-secondary)}table tbody tr{border-top:1px solid var(--border)}table tbody tr:hover{background:var(--bg-tertiary)}input,select,textarea{background:var(--bg-secondary);border-color:var(--border);color:var(--text-primary)}input::-moz-placeholder{color:var(--text-muted)}textarea::-moz-placeholder{color:var(--text-muted)}input::placeholder,textarea::placeholder{color:var(--text-muted)}.chart-svg rect{transition:opacity .15s}.chart-svg rect:hover{opacity:.85}.chart-svg circle:hover{r:5}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1{top:var(--spacing)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-0{left:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[calc\(100vh-220px\)\]{max-height:calc(100vh - 220px)}.min-h-0{min-height:0}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-96{width:calc(var(--spacing) * 96)}.w-full{width:100%}.max-w-\[85vw\]{max-width:85vw}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-700{border-color:var(--color-amber-700)}.border-green-700{border-color:var(--color-green-700)}.border-red-700{border-color:var(--color-red-700)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.border-slate-700\/50{border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.bg-\[var\(--bg-primary\)\]{background-color:var(--bg-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-900\/20{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/20{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.bg-amber-900\/30{background-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/30{background-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.bg-brand-500{background-color:var(--color-brand-500)}.bg-brand-600{background-color:var(--color-brand-600)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-emerald-900\/20{background-color:#004e3b33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-900\/20{background-color:color-mix(in oklab, var(--color-emerald-900) 20%, transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/30{background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.bg-green-900\/50{background-color:#0d542b80}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/50{background-color:color-mix(in oklab, var(--color-green-900) 50%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/30{background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.bg-rose-900\/20{background-color:#8b083633}@supports (color:color-mix(in lab, red, red)){.bg-rose-900\/20{background-color:color-mix(in oklab, var(--color-rose-900) 20%, transparent)}}.bg-sky-900\/20{background-color:#024a7033}@supports (color:color-mix(in lab, red, red)){.bg-sky-900\/20{background-color:color-mix(in oklab, var(--color-sky-900) 20%, transparent)}}.bg-slate-600{background-color:var(--color-slate-600)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/80{background-color:#1d293dcc}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/80{background-color:color-mix(in oklab, var(--color-slate-800) 80%, transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-slate-700{--tw-gradient-from:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-slate-600{--tw-gradient-via:var(--color-slate-600);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-slate-700{--tw-gradient-to:var(--color-slate-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-brand-400{color:var(--color-brand-400)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-indigo-400{color:var(--color-indigo-400)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-pink-400{color:var(--color-pink-400)}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.accent-brand-500{accent-color:var(--color-brand-500)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.select-none{-webkit-user-select:none;user-select:none}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-brand-500\/50:hover{border-color:#06b6d480}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand-500\/50:hover{border-color:color-mix(in oklab, var(--color-brand-500) 50%, transparent)}}.hover\:bg-brand-500:hover{background-color:var(--color-brand-500)}.hover\:bg-slate-600:hover{background-color:var(--color-slate-600)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:text-brand-400:hover{color:var(--color-brand-400)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-slate-200:hover{color:var(--color-slate-200)}.hover\:text-white:hover{color:var(--color-white)}}.focus\:border-brand-400:focus{border-color:var(--color-brand-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=64rem){.lg\:relative{position:relative}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:max-w-none{max-width:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}:root{--bg-primary:#fff;--bg-secondary:#f8fafc;--bg-tertiary:#f1f5f9;--bg-card:#fff;--bg-code:#f8fafc;--bg-surface:#fff;--text-primary:#0f172a;--text-secondary:#475569;--text-muted:#94a3b8;--border:#e2e8f0;--border-hover:#cbd5e1;--accent:#0891b2;--accent-hover:#0e7490;--chart-grid:#e2e8f0;--skeleton-from:#e2e8f0;--skeleton-to:#cbd5e1;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.dark{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-card:#1e293b;--bg-code:#0f172a;--bg-surface:#0f172a;--text-primary:#e2e8f0;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--border-hover:#475569;--accent:#06b6d4;--accent-hover:#22d3ee;--chart-grid:#334155;--skeleton-from:#334155;--skeleton-to:#475569;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{background:var(--bg-primary);color:var(--text-primary);transition:background-color .2s,color .2s}.scrollbar-thin::-webkit-scrollbar{width:6px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.scrollbar-thin::-webkit-scrollbar-thumb{background:var(--text-muted);border-radius:3px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.animate-shimmer{background-size:200% 100%;background-image:linear-gradient(to right, var(--skeleton-from), var(--skeleton-to), var(--skeleton-from));animation:1.5s ease-in-out infinite shimmer}@media (width<=768px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-overlay{z-index:40;background:#00000080;position:fixed;inset:0}}@media (width<=640px){.kpi-grid{grid-template-columns:repeat(1,minmax(0,1fr))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}