@bynlk/codeomnivis 0.0.0-bootstrap.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +77 -0
- package/README.md +62 -0
- package/bin/codeomnivis.js +19 -0
- package/dist/chunk-D2FE2QSJ.js +10271 -0
- package/dist/dist-YNCI4IFF.js +462 -0
- package/dist/index.js +2219 -0
- package/dist/ui/assets/index-BlLl2ApB.css +1 -0
- package/dist/ui/assets/index-RYkt2Yk8.js +1 -0
- package/dist/ui/assets/vendor-cytoscape-CUqq0XTU.js +331 -0
- package/dist/ui/assets/vendor-i18n-DMayGKXS.js +1 -0
- package/dist/ui/assets/vendor-l0sNRNKZ.js +1 -0
- package/dist/ui/assets/vendor-query-CdMHRlIH.js +1 -0
- package/dist/ui/assets/vendor-react-CHCXY0b5.js +48 -0
- package/dist/ui/brand/favicon.svg +4 -0
- package/dist/ui/brand/logo-mark-dark.svg +5 -0
- package/dist/ui/brand/logo-mark-light.svg +5 -0
- package/dist/ui/brand/logo-mark-mono.svg +5 -0
- package/dist/ui/index.html +18 -0
- package/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- package/package.json +87 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-4{bottom:1rem}.bottom-6{bottom:1.5rem}.bottom-\[20\%\]{bottom:20%}.bottom-ds-4{bottom:1rem}.left-12{left:3rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[18\%\]{left:18%}.left-\[46\%\]{left:46%}.left-ds-4{left:1rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-\[16\%\]{right:16%}.top-0{top:0}.top-0\.5{top:.125rem}.top-1\/2{top:50%}.top-12{top:3rem}.top-3{top:.75rem}.top-\[22\%\]{top:22%}.top-\[43\%\]{top:43%}.z-0{z-index:0}.z-10,.z-canvas-ui{z-index:10}.z-drawer{z-index:40}.z-modal{z-index:50}.z-tooltip{z-index:45}.col-span-full{grid-column:1 / -1}.m-3{margin:.75rem}.m-5{margin:1.25rem}.m-6{margin:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-ds-2{margin-bottom:.5rem}.mb-ds-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-auto{margin-top:auto}.mt-ds-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-full{height:100%}.h-screen{height:100vh}.max-h-72{max-height:18rem}.min-h-0{min-height:0px}.min-h-14{min-height:3.5rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-2{width:.5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[18px\]{width:18px}.w-\[min\(300px\,calc\(100vw-48px\)\)\]{width:min(300px,calc(100vw - 48px))}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-8{min-width:2rem}.max-w-40{max-width:10rem}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fadeIn{animation:fadeIn .15s ease-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[48px_248px_minmax\(0\,1fr\)_auto\]{grid-template-columns:48px 248px minmax(0,1fr) auto}.grid-rows-\[48px_minmax\(0\,1fr\)_24px\]{grid-template-rows:48px minmax(0,1fr) 24px}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-ds-2{gap:.5rem}.gap-ds-3{gap:.75rem}.gap-ds-4{gap:1rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-ds-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-ds-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-ds-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border-subtle>:not([hidden])~:not([hidden]){border-color:var(--border-subtle)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-ds-lg{border-radius:.75rem}.rounded-ds-md{border-radius:.5rem}.rounded-ds-sm{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-500\/35{border-color:#f59e0b59}.border-black\/20{border-color:#0003}.border-border-strong{border-color:var(--border-strong)}.border-border-subtle{border-color:var(--border-subtle)}.border-content-muted{border-color:var(--text-muted)}.border-emerald-500\/30{border-color:#10b9814d}.border-rose-400{--tw-border-opacity: 1;border-color:rgb(251 113 133 / var(--tw-border-opacity, 1))}.border-rose-500\/30{border-color:#f43f5e4d}.border-rose-500\/40{border-color:#f43f5e66}.bg-\[\#090b0f\]{--tw-bg-opacity: 1;background-color:rgb(9 11 15 / var(--tw-bg-opacity, 1))}.bg-\[\#0b0e13\]{--tw-bg-opacity: 1;background-color:rgb(11 14 19 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-black\/70{background-color:#000000b3}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-primary-500\/10{background-color:#5b8cff1a}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(71 118 230 / var(--tw-bg-opacity, 1))}.bg-primary-600\/30{background-color:#4776e64d}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-rose-400{--tw-bg-opacity: 1;background-color:rgb(251 113 133 / var(--tw-bg-opacity, 1))}.bg-rose-500\/5{background-color:#f43f5e0d}.bg-sky-400{--tw-bg-opacity: 1;background-color:rgb(56 189 248 / var(--tw-bg-opacity, 1))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-surface{background-color:var(--surface-base)}.bg-surface-hover{background-color:var(--surface-hover)}.bg-surface-overlay{background-color:var(--surface-overlay)}.bg-surface-panel{background-color:var(--surface-panel)}.bg-surface-raised{background-color:var(--surface-raised)}.bg-transparent{background-color:transparent}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-ds-1{padding:.25rem}.p-ds-2{padding:.5rem}.p-ds-3{padding:.75rem}.p-ds-4{padding:1rem}.p-ds-6{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-ds-1{padding-left:.25rem;padding-right:.25rem}.px-ds-2{padding-left:.5rem;padding-right:.5rem}.px-ds-3{padding-left:.75rem;padding-right:.75rem}.px-ds-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-ds-2{padding-top:.5rem;padding-bottom:.5rem}.py-ds-3{padding-top:.75rem;padding-bottom:.75rem}.py-ds-4{padding-top:1rem;padding-bottom:1rem}.py-ds-6{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pt-\[18vh\]{padding-top:18vh}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base,.text-ds-base{font-size:1rem;line-height:1.5rem}.text-ds-lg{font-size:1.125rem;line-height:1.75rem}.text-ds-sm{font-size:.875rem;line-height:1.25rem}.text-ds-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[650\]{font-weight:650}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.tracking-\[-0\.025em\]{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#6F83FF\]{--tw-text-opacity: 1;color:rgb(111 131 255 / var(--tw-text-opacity, 1))}.text-amber-200{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.text-amber-200\/70{color:#fde68ab3}.text-border-strong{color:var(--border-strong)}.text-content{color:var(--text-primary)}.text-content-muted{color:var(--text-muted)}.text-content-secondary{color:var(--text-secondary)}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-primary-300{--tw-text-opacity: 1;color:rgb(166 188 255 / var(--tw-text-opacity, 1))}.text-primary-400{--tw-text-opacity: 1;color:rgb(120 161 255 / var(--tw-text-opacity, 1))}.text-primary-600{--tw-text-opacity: 1;color:rgb(71 118 230 / var(--tw-text-opacity, 1))}.text-rose-200{--tw-text-opacity: 1;color:rgb(254 205 211 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-300\/80{color:#fda4afcc}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-border-strong{text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.placeholder-content-muted::-moz-placeholder{color:var(--text-muted)}.placeholder-content-muted::placeholder{color:var(--text-muted)}.opacity-40{opacity:.4}.shadow-ds-card{--tw-shadow: 0 1px 3px rgba(0, 0, 0, .28);--tw-shadow-colored: 0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-ds-panel{--tw-shadow: 0 8px 24px rgba(0, 0, 0, .34);--tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.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)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:dark;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--surface-base: #090b0f;--surface-panel: #0d1016;--surface-raised: #12161e;--surface-overlay: #12161e;--surface-hover: #181e28;--border-subtle: #242b36;--border-strong: #343e4d;--text-primary: #e7eaf0;--text-secondary: #a9b1be;--text-muted: #7f8998;--accent: #5b8cff;--accent-hover: #78a1ff;color:var(--text-primary);background-color:var(--surface-base)}html,body,#root{width:100%;height:100%}body{min-height:100vh;overflow:hidden}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:inherit;margin:inherit;overflow:visible;clip:auto;white-space:normal}.placeholder\:text-content-muted::-moz-placeholder{color:var(--text-muted)}.placeholder\:text-content-muted::placeholder{color:var(--text-muted)}.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:bg-primary-500:hover{--tw-bg-opacity: 1;background-color:rgb(91 140 255 / var(--tw-bg-opacity, 1))}.hover\:bg-surface-hover:hover{background-color:var(--surface-hover)}.hover\:bg-surface-overlay:hover{background-color:var(--surface-overlay)}.hover\:text-content:hover{color:var(--text-primary)}.hover\:text-content-secondary:hover{color:var(--text-secondary)}.hover\:underline:hover{text-decoration-line:underline}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:fixed:focus{position:fixed}.focus\:left-2:focus{left:.5rem}.focus\:top-2:focus{top:.5rem}.focus\:z-modal:focus{z-index:50}.focus\:rounded-md:focus{border-radius:.375rem}.focus\:border-primary-500:focus{--tw-border-opacity: 1;border-color:rgb(91 140 255 / var(--tw-border-opacity, 1))}.focus\:bg-primary-600:focus{--tw-bg-opacity: 1;background-color:rgb(71 118 230 / var(--tw-bg-opacity, 1))}.focus\:px-3:focus{padding-left:.75rem;padding-right:.75rem}.focus\:py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:text-xs:focus{font-size:.75rem;line-height:1rem}.focus\:font-medium:focus{font-weight:500}.focus\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-primary-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(91 140 255 / var(--tw-ring-opacity, 1))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary-400:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(120 161 255 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media not all and (min-width: 1024px){.max-lg\:fixed{position:fixed}.max-lg\:bottom-6{bottom:1.5rem}.max-lg\:right-0{right:0}.max-lg\:top-12{top:3rem}.max-lg\:z-drawer{z-index:40}.max-lg\:w-\[min\(360px\,calc\(100vw-48px\)\)\]{width:min(360px,calc(100vw - 48px))}.max-lg\:shadow-ds-panel{--tw-shadow: 0 8px 24px rgba(0, 0, 0, .34);--tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media not all and (min-width: 768px){.max-md\:hidden{display:none}.max-md\:grid-cols-\[48px_minmax\(0\,1fr\)\]{grid-template-columns:48px minmax(0,1fr)}}@media (min-width: 640px){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:h-14{height:3.5rem}.sm\:grid-cols-\[88px_minmax\(0\,1fr\)\]{grid-template-columns:88px minmax(0,1fr)}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:px-2\.5{padding-left:.625rem;padding-right:.625rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-0{padding-top:0;padding-bottom:0}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:text-\[11px\]{font-size:11px}}@media (min-width: 768px){.md\:static{position:static}.md\:z-auto{z-index:auto}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-full{height:100%}.md\:w-64{width:16rem}.md\:w-80{width:20rem}.md\:max-w-none{max-width:none}.md\:shrink-0{flex-shrink:0}}@media (min-width: 1024px){.lg\:inline{display:inline}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ue=Object.defineProperty;var Ge=(e,s,r)=>s in e?Ue(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r;var E=(e,s,r)=>Ge(e,typeof s!="symbol"?s+"":s,r);import{r as b,u as w,j as t,i as Qe,c as Be,R as We}from"./vendor-react-CHCXY0b5.js";import{u as F,a as Q,Q as He,b as Ye}from"./vendor-query-CdMHRlIH.js";import{c as Ze}from"./vendor-cytoscape-CUqq0XTU.js";import{i as Je}from"./vendor-i18n-DMayGKXS.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function g(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xe=["page","component","api_route","trpc_procedure","tsrpc_service","tsrpc_api","tsrpc_msg","express_route","handler","service","db_model","module","kotlin_class","kotlin_interface","kotlin_object","kotlin_function","kotlin_route","test_suite","test_case","test_fixture"],et=new Set(Xe);function ke(e){return et.has(e)}function oe(e,s){return e.type===s}var tt=["renders","navigates_to","calls_api","handles","calls_service","queries_db","db_relation","imports","contains","kotlin_inherits","kotlin_implements","kotlin_uses","data_flows_to","sends_msg","listens_msg","tests","covers","uses_fixture"];new Set(tt);function st(e){return e==="fresh"||e==="analyzing"||e==="stale"}function ve(e){if(!g(e))return!1;const{state:s,lastAnalyzedAt:r,pendingChanges:n}=e;return!(!st(s)||!(r===null||typeof r=="number")||typeof n!="number")}var D={page:"#6366f1",component:"#3b82f6",api_route:"#10b981",trpc_procedure:"#06b6d4",tsrpc_service:"#14b8a6",tsrpc_api:"#0d9488",tsrpc_msg:"#2dd4bf",express_route:"#f59e0b",handler:"#f59e0b",service:"#8b5cf6",db_model:"#ec4899",module:"#374151",kotlin_class:"#a855f7",kotlin_interface:"#3b82f6",kotlin_object:"#f97316",kotlin_function:"#22c55e",kotlin_route:"#eab308",test_suite:"#64748b",test_case:"#22c55e",test_fixture:"#f59e0b"};function rt(e){const s=[],r=new Set(e.nodes.map(n=>n.id));for(const n of e.nodes)s.push(nt(n));for(const n of e.edges)r.has(n.source)&&r.has(n.target)&&s.push(ot(n));return s}function nt(e){return{group:"nodes",data:{id:e.id,label:e.name,type:e.type,filePath:e.filePath,line:e.line,metadata:e.metadata,color:D[e.type]||"#94a3b8"}}}function ot(e){return{group:"edges",data:{id:e.id,source:e.source,target:e.target,type:e.type,confidence:e.confidence,metadata:e.metadata}}}const at=["renders","navigates_to","calls_api","handles","calls_service","queries_db","db_relation","imports","contains","kotlin_inherits","kotlin_implements","kotlin_uses","data_flows_to","sends_msg","listens_msg","tests","covers","uses_fixture"],ae={renders:"#06b6d4",navigates_to:"#8b5cf6",calls_api:"#10b981",handles:"#f59e0b",calls_service:"#ef4444",queries_db:"#ec4899",db_relation:"#ec4899",imports:"#475569",contains:"#64748b",kotlin_inherits:"#a855f7",kotlin_implements:"#3b82f6",kotlin_uses:"#64748b",data_flows_to:"#06b6d4",sends_msg:"#f97316",listens_msg:"#14b8a6",tests:"#64748b",covers:"#22c55e",uses_fixture:"#f59e0b"};function it(e){const s=e.data("type");return typeof s=="string"&&ke(s)?s:void 0}function ct(e){const s=e.data("label");return typeof s=="string"?s:void 0}const lt={renders:{width:1.5},calls_api:{width:2},queries_db:{width:2},kotlin_inherits:{"line-style":"dashed"},kotlin_implements:{"line-style":"dashed"},kotlin_uses:{opacity:.5},sends_msg:{"line-style":"dashed",width:2},listens_msg:{"line-style":"dashed",width:2},contains:{"line-style":"dotted"},data_flows_to:{width:2},imports:{opacity:.3},tests:{"line-style":"dotted"},covers:{width:2},uses_fixture:{"line-style":"dashed"}};function dt(){return[{selector:"node",style:{"background-color":"#12161e","border-width":1.5,"border-color":e=>{const s=it(e);return s?D[s]:"#343e4d"},label:e=>{const s=ct(e);return s&&s.length>20?s.slice(0,18)+"…":s??"?"},"text-valign":"center","text-halign":"center","font-size":"10px","font-weight":500,color:"#e7eaf0","text-outline-width":0,"text-wrap":"wrap","text-max-width":"100px",width:104,height:34,padding:"6px",shape:"roundrectangle","corner-radius":"6"}},{selector:'node[type="db_model"]',style:{shape:"roundrectangle"}},{selector:"edge",style:{width:1.5,"line-color":"#4b5565","target-arrow-color":"#4b5565","target-arrow-shape":"triangle","curve-style":"bezier","control-point-step-size":40,"arrow-scale":.7,opacity:.62}},...at.map(e=>{const s=lt[e]??{};return{selector:`edge[type="${e}"]`,style:{"line-color":ae[e],"target-arrow-color":ae[e],...s}}}),{selector:'edge[confidence="inferred"]',style:{"line-style":"dashed","line-dash-pattern":[6,3],opacity:.6}},{selector:"node.selected",style:{"border-width":2.5,"border-color":"#78a1ff","background-color":"#1a2540","font-weight":"bold"}},{selector:".highlighted",style:{opacity:1}},{selector:"node:active",style:{"overlay-opacity":.1}},{selector:"node.trace-active",style:{"border-width":5,"border-color":"#fbbf24","background-color":"#b45309","font-weight":"bold","z-index":20}},{selector:"edge.trace-path",style:{"line-color":"#fbbf24","target-arrow-color":"#fbbf24",width:3,opacity:1,"z-index":19}},{selector:"node.trace-path",style:{"border-width":3,"border-color":"#f59e0b",opacity:1}}]}const je=b.createContext(null);function ut(){return b.useContext(je)}const Ne="codeomnivis-legend-collapsed";function pt(){try{return localStorage.getItem(Ne)==="1"}catch{return!1}}const ht={selectedNodeId:null,activeTab:null,searchQuery:"",isCommandPaletteOpen:!1,isSettingsOpen:!1,isMobileDrawerOpen:!1,isLegendCollapsed:pt(),wsStatus:"connecting",activeView:"architecture",architectureDepth:"overview"};let _;const G=new Set;function T(e){let s=!1;for(const r of Object.keys(e))if(_[r]!==e[r]){s=!0;break}s&&(_={..._,...e},G.forEach(r=>r()))}_={...ht,selectNode:e=>T(e?{selectedNodeId:e,activeTab:null}:{selectedNodeId:e}),setActiveTab:e=>T(e?{activeTab:e,selectedNodeId:null}:{activeTab:e}),setSearchQuery:e=>T({searchQuery:e}),toggleCommandPalette:e=>{const s=e??!_.isCommandPaletteOpen;T(s?{isCommandPaletteOpen:!0,isSettingsOpen:!1,isMobileDrawerOpen:!1}:{isCommandPaletteOpen:!1})},toggleSettings:e=>{const s=e??!_.isSettingsOpen;T(s?{isSettingsOpen:!0,isCommandPaletteOpen:!1,isMobileDrawerOpen:!1}:{isSettingsOpen:!1})},toggleMobileDrawer:e=>{const s=e??!_.isMobileDrawerOpen;T(s?{isMobileDrawerOpen:!0,isCommandPaletteOpen:!1,isSettingsOpen:!1}:{isMobileDrawerOpen:!1})},setWsStatus:e=>T({wsStatus:e}),setActiveView:e=>T({activeView:e,selectedNodeId:null,..._.architectureDepth==="focus"?{architectureDepth:"overview"}:{}}),setArchitectureDepth:e=>T({architectureDepth:e}),toggleLegend:e=>{const s=e??!_.isLegendCollapsed;try{localStorage.setItem(Ne,s?"1":"0")}catch{}T({isLegendCollapsed:s})}};function mt(e){return G.add(e),()=>{G.delete(e)}}function k(e){return b.useSyncExternalStore(mt,()=>e(_),()=>e(_))}function bt(e){return e.isCommandPaletteOpen||e.isSettingsOpen}function ie(){return _}const ft=600;function ce(e,s,r){const n=e.data(s);return typeof n=="string"?n:r}function xt(e,s,r){const n=e.data(s);return typeof n=="number"?n:r}function yt(e){const s=e.data("type");return typeof s=="string"&&ke(s)?s:"module"}function gt(){const{t:e}=w(),s=ut(),r=k(bt),[n,o]=b.useState(null),a=b.useRef(null);if(b.useEffect(()=>{const i=s==null?void 0:s.current;if(!i)return;const u=p=>{const h=p.target,l=h.renderedPosition(),y=i.container(),m=y==null?void 0:y.getBoundingClientRect();m&&(a.current=setTimeout(()=>{o({x:m.left+l.x,y:m.top+l.y-20,nodeId:h.id(),type:yt(h),name:ce(h,"label",h.id()),filePath:ce(h,"filePath",""),line:xt(h,"line",0),edgeCount:{in:h.indegree(!1),out:h.outdegree(!1)}})},ft))},d=()=>{a.current&&(clearTimeout(a.current),a.current=null),o(null)};return i.on("tap","node",d),i.on("mouseover","node",u),i.on("mouseout","node",d),()=>{i.off("mouseover","node",u),i.off("mouseout","node",d),i.off("tap","node",d),a.current&&clearTimeout(a.current)}},[s]),!n||r)return null;const c=D[n.type]??"#6b7280";return t.jsxs("div",{className:"pointer-events-none fixed z-tooltip animate-fadeIn rounded-md border border-border-strong bg-surface-overlay p-ds-3 text-ds-sm shadow-ds-card",style:{left:n.x+12,top:n.y-60},children:[t.jsxs("div",{className:"mb-1 flex items-center gap-1.5",children:[t.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:c},"aria-hidden":"true"}),t.jsx("span",{className:"text-ds-xs font-medium text-content-secondary",children:e(`nodeType.${n.type}`)})]}),t.jsx("div",{className:"font-medium text-content",children:n.name}),n.filePath&&t.jsxs("div",{className:"mt-1 max-w-xs truncate text-ds-xs text-content-muted",children:[n.filePath,n.line>0&&t.jsxs("span",{className:"ml-1 text-content-muted",children:[":",n.line]})]}),t.jsxs("div",{className:"mt-1.5 flex gap-ds-3 text-ds-xs text-content-muted",children:[t.jsxs("span",{children:["↙ ",n.edgeCount.in," ",e("tooltip.in")]}),t.jsxs("span",{children:["↗ ",n.edgeCount.out," ",e("tooltip.out")]})]})]})}const wt={page:0,component:1,api_route:2,trpc_procedure:2,tsrpc_service:2,tsrpc_api:2,tsrpc_msg:2,express_route:2,handler:3,service:3,db_model:4,module:4,kotlin_class:3,kotlin_interface:3,kotlin_object:3,kotlin_function:3,kotlin_route:2},kt=[0,300,600,900,1200];function vt(e){const s=e.nodes();if(s.length===0)return;const r=new Map;s.forEach(n=>{const o=n.data("type"),a=typeof o=="string"?o:"unknown",c=r.get(a)??[];c.push(n),r.set(a,c)});for(const[n,o]of r){const a=wt[n]??2,c=kt[a]||600,i=o.length;if(i===0)continue;const u=a===0?Math.max(150,i*50):c,d=2*Math.PI/i;o.forEach((p,h)=>{const l=d*h-Math.PI/2;p.position({x:u*Math.cos(l),y:u*Math.sin(l)})})}e.layout({name:"cose",randomize:!1,animate:!1,nodeRepulsion:()=>5e5,idealEdgeLength:()=>150,edgeElasticity:()=>50,gravity:.01,numIter:300,nestingFactor:.1,padding:30,initialTemp:500,coolingFactor:.95,minTemp:1}).run()}function le({graph:e,selectedNode:s,onNodeSelect:r,onNodeFocus:n,onCyInit:o}){const{t:a}=w(),c=b.useRef(null),i=b.useRef(null),u=b.useRef(r),d=b.useRef(o),p=b.useRef(n),h=b.useRef(!1);return u.current=r,d.current=o,p.current=n,b.useEffect(()=>{var x;if(!c.current)return;const l=Ze({container:c.current,style:dt(),layout:{name:"null"},minZoom:.05,maxZoom:3});i.current=l,(x=d.current)==null||x.call(d,l),l.on("tap",v=>{v.target===l&&u.current(null)}),l.on("tap","node",v=>{u.current(v.target.id())}),l.on("dbltap","node",v=>{var S;(S=p.current)==null||S.call(p,v.target.id())});let y=0;const m=new ResizeObserver(()=>{cancelAnimationFrame(y),y=requestAnimationFrame(()=>{l.resize()})});return m.observe(c.current),()=>{cancelAnimationFrame(y),m.disconnect(),l.destroy(),i.current=null}},[]),b.useEffect(()=>{const l=i.current;if(!l||!e)return;const y=rt(e);l.elements().remove(),l.add(y);const m=h.current?{zoom:l.zoom(),pan:l.pan()}:null;vt(l),m?l.viewport(m):(l.fit(void 0,50),h.current=!0)},[e]),b.useEffect(()=>{const l=i.current;if(l&&(l.elements().removeClass("selected highlighted"),s)){const y=l.getElementById(s);y.length>0&&(y.addClass("selected"),y.neighborhood().addClass("highlighted"),y.addClass("highlighted"))}},[s]),t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:c,className:"h-full w-full bg-[#090b0f]","aria-label":a("graph.canvasLabel"),role:"application",tabIndex:0,onKeyDown:l=>{const y=i.current;if(!y)return;if(l.key==="Escape"){l.preventDefault(),r(null);return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(l.key))return;const m=y.nodes();if(m.length===0)return;l.preventDefault();const x=s?m.toArray().findIndex(R=>R.id()===s):-1,v=l.key==="ArrowLeft"||l.key==="ArrowUp"?-1:1,S=(x+v+m.length)%m.length;r(m[S].id())}}),t.jsx(gt,{})]})}const _e="codeomnivis-lang";function jt(e){try{return(e==null?void 0:e.getItem(_e))==="zh-CN"?"zh-CN":"en-US"}catch{return"en-US"}}function Nt(e,s){try{e==null||e.setItem(_e,s)}catch{}}function _t(){return jt(typeof localStorage>"u"?void 0:localStorage)}function Se(e){Nt(typeof localStorage>"u"?void 0:localStorage,e)}function St(){const{i18n:e}=w(),s=e.language==="zh-CN",r=()=>{const n=s?"en-US":"zh-CN";e.changeLanguage(n),Se(n)};return t.jsx("button",{onClick:r,"aria-label":s?"Switch to English":"切换为中文",className:"flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-[11px] font-medium text-content-secondary transition-colors hover:bg-surface-hover hover:text-content",children:t.jsx("span",{"aria-hidden":"true",children:s?"EN":"中"})})}class Te extends Error{constructor(r,n,o){super(o??`Request failed: ${r} ${n}`);E(this,"status");E(this,"statusText");this.name="ApiError",this.status=r,this.statusText=n}}async function Ce(e){const s=await e.json().catch(()=>{}),r=g(s)?s.error:void 0,n=g(r)&&typeof r.message=="string"?r.message:void 0;return new Te(e.status,e.statusText,n)}async function O(e,s){const r=await fetch(e,s);if(!r.ok)throw await Ce(r);return await r.json()}async function Tt(e,s){const r=await fetch(e,s);if(!r.ok)throw await Ce(r)}function Ct(e){if(g(e)&&"data"in e)return e.data}function Et(e,s){return{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:s}}function Pt(e){return g(e)&&g(e.data)&&g(e.meta)}async function qt(e){const s=await O("/api/graph",void 0);if(!Pt(s))throw new Error("Invalid graph response");return s}function Rt(e){return g(e)&&typeof e.file=="string"&&typeof e.message=="string"&&(e.severity==="error"||e.severity==="warning"||e.severity==="info")}async function At(){const e=await O("/api/graph/errors"),s=Ct(e);return Array.isArray(s)?s.filter(Rt):[]}const Mt=new Set(["consistency","security","performance","framework"]),It=new Set(["critical","warning","info"]),Lt=new Set(["dead_api_call","unused_route","method_mismatch","missing_procedure","param_mismatch","dead_route","dead_component","dead_service","circular_dependency","n_plus_one_query","unguarded_route","rsc_boundary_violation"]),Dt=new Set(["dead_api_call","unused_route","orphan_node","method_mismatch","missing_procedure","param_mismatch","dead_route","dead_component","dead_service","circular_dependency","n_plus_one_query","unguarded_route","rsc_boundary_violation"]),Ft=new Set(["consistency","auth","n_plus_one","rsc"]);function Ot(e){return g(e)&&typeof e.file=="string"&&(e.line===void 0||typeof e.line=="number")&&(e.note===void 0||typeof e.note=="string")}function de(e){return Array.isArray(e)&&e.every(s=>typeof s=="string")}function Kt(e){return e.messageKey===void 0&&e.messageParams===void 0?!0:typeof e.messageKey!="string"||!Dt.has(e.messageKey)?!1:e.messageParams===void 0?!0:g(e.messageParams)&&Object.values(e.messageParams).every(s=>typeof s=="string"||typeof s=="number")}function $t(e){return g(e)&&typeof e.id=="string"&&typeof e.source=="string"&&Mt.has(e.source)&&typeof e.severity=="string"&&It.has(e.severity)&&typeof e.type=="string"&&Lt.has(e.type)&&typeof e.description=="string"&&Kt(e)&&Array.isArray(e.locations)&&e.locations.every(Ot)&&de(e.relatedNodeIds)&&de(e.relatedEdgeIds)}function zt(e){return g(e)&&typeof e.id=="string"&&Ft.has(e.id)&&(e.status==="complete"||e.status==="failed")&&(e.message===void 0||typeof e.message=="string")}async function Vt(){const e=await O("/api/graph/issues");if(!g(e)||!Array.isArray(e.data)||!g(e.meta))throw new Error("Invalid graph issues response");const s=e.data.filter($t),{meta:r}=e,o=(Array.isArray(r.detectors)?r.detectors:[]).filter(zt),a=new Set(o.map(p=>p.id)),c=s.filter(p=>p.severity==="critical").length,i=s.filter(p=>p.severity==="warning").length,u=s.filter(p=>p.severity==="info").length;if(!(typeof r.count=="number"&&typeof r.total=="number"&&typeof r.critical=="number"&&typeof r.warning=="number"&&typeof r.info=="number"&&r.count===s.length&&r.total===r.count&&o.length===4&&a.size===4&&r.critical===c&&r.warning===i&&r.info===u))throw new Error("Invalid graph issues response");return{issues:s,summary:{total:r.total,critical:r.critical,warning:r.warning,info:r.info},detectors:o}}async function Ut(){const e=await O("/api/status"),s=g(e)?e.data:void 0;if(!ve(s))throw new Error("Invalid status response");return s}async function Gt(){const e=await O("/api/project"),s=g(e)?e.data:void 0;if(!g(s)||typeof s.projectRoot!="string")throw new Error("Invalid project response");return{projectRoot:s.projectRoot}}function ue(e){const s=e.trim();return s.startsWith("/")||/^[A-Za-z]:[\\/]/.test(s)||/^\\\\[^\\]+\\[^\\]+/.test(s)}async function Qt(){await Tt("/api/analyze",{method:"POST"})}async function Bt(e){const s=await fetch("/api/project",Et({projectRoot:e})),r=await s.json().catch(()=>{});if(s.ok){const a=g(r)?r.data:void 0;return{ok:!0,projectRoot:g(a)&&typeof a.projectRoot=="string"?a.projectRoot:void 0}}const n=g(r)?r.error:void 0;return{ok:!1,errorMessage:g(n)&&typeof n.message=="string"?n.message:void 0}}const Ee=["status"],Wt={state:"stale",lastAnalyzedAt:null,pendingChanges:0};function Pe(){return F({queryKey:Ee,queryFn:Ut,initialData:Wt,initialDataUpdatedAt:0,refetchInterval:15e3})}const Ht=[["graph"],["graph-stats"],["graph-errors"],["graph-issues"],["status"]];async function B(e){await Promise.all(Ht.map(s=>e.invalidateQueries({queryKey:s})))}const Yt={architecture:t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:"3",y:"3",width:"6",height:"6",rx:"1"}),t.jsx("rect",{x:"15",y:"3",width:"6",height:"6",rx:"1"}),t.jsx("rect",{x:"9",y:"15",width:"6",height:"6",rx:"1"}),t.jsx("path",{d:"M6 9v3h12V9M12 12v3"})]}),requests:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M4 7h11"}),t.jsx("path",{d:"m12 4 3 3-3 3"}),t.jsx("path",{d:"M20 17H9"}),t.jsx("path",{d:"m12 14-3 3 3 3"})]}),data:t.jsxs(t.Fragment,{children:[t.jsx("ellipse",{cx:"12",cy:"5",rx:"8",ry:"3"}),t.jsx("path",{d:"M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5"}),t.jsx("path",{d:"M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6"})]}),quality:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M12 3 4 7v5c0 4.8 3.2 7.7 8 9 4.8-1.3 8-4.2 8-9V7l-8-4Z"}),t.jsx("path",{d:"m9 12 2 2 4-5"})]}),tests:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M9 3h6M10 3v5l-5 9a2 2 0 0 0 1.7 3h10.6a2 2 0 0 0 1.7-3l-5-9V3"}),t.jsx("path",{d:"M8 14h8"})]}),search:t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"11",cy:"11",r:"6"}),t.jsx("path",{d:"m16 16 4 4"})]}),refresh:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M20 7v5h-5"}),t.jsx("path",{d:"M4 17v-5h5"}),t.jsx("path",{d:"M6.1 8A7 7 0 0 1 18 6l2 6M18 16a7 7 0 0 1-11.9 2L4 12"})]}),settings:t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"12",cy:"12",r:"3"}),t.jsx("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1A1.7 1.7 0 0 0 9 4.6 1.7 1.7 0 0 0 10 3V2.8h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1Z"})]}),layers:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"m12 3-9 5 9 5 9-5-9-5Z"}),t.jsx("path",{d:"m3 12 9 5 9-5"}),t.jsx("path",{d:"m3 16 9 5 9-5"})]}),focus:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M8 3H3v5M16 3h5v5M8 21H3v-5M16 21h5v-5"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),chevron:t.jsx("path",{d:"m9 18 6-6-6-6"}),file:t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M6 2h8l4 4v16H6z"}),t.jsx("path",{d:"M14 2v5h5"})]}),branch:t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"6",cy:"5",r:"2"}),t.jsx("circle",{cx:"18",cy:"6",r:"2"}),t.jsx("circle",{cx:"6",cy:"19",r:"2"}),t.jsx("path",{d:"M6 7v10M8 8c6 0 4-2 8-2"})]}),database:t.jsxs(t.Fragment,{children:[t.jsx("ellipse",{cx:"12",cy:"5",rx:"7",ry:"3"}),t.jsx("path",{d:"M5 5v7c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 12v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6"})]})};function q({name:e,...s}){return t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s,children:Yt[e]})}function pe({decorative:e,className:s}){return t.jsxs("svg",{viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:e?void 0:"img","aria-label":e?void 0:"CodeOmniVis","aria-hidden":e?!0:void 0,className:`shrink-0 ${s}`,children:[t.jsx("path",{d:"M48 15A22 22 0 1 0 48 49",stroke:"currentColor",strokeWidth:"5.5",strokeLinecap:"round"}),t.jsx("circle",{cx:"33",cy:"32",r:"11",stroke:"#6F83FF",strokeWidth:"3.5"}),t.jsx("path",{d:"M26 26.5L33 38L40 26.5",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"square",strokeLinejoin:"miter"})]})}function qe({showWordmark:e=!1,className:s="",markClassName:r="h-6 w-6"}){return e?t.jsxs("span",{className:`inline-flex items-center gap-1.5 ${s}`.trim(),children:[t.jsx(pe,{decorative:!0,className:r}),t.jsxs("span",{"data-brand-wordmark":"true",className:"font-[650] tracking-[-0.025em] text-content",children:["Code",t.jsx("span",{className:"text-[#6F83FF]",children:"O"}),"mniVis"]})]}):t.jsx("span",{className:`inline-flex ${s}`.trim(),children:t.jsx(pe,{decorative:!1,className:r})})}function Zt({query:e,onQueryChange:s,onOpenSettings:r}){const{t:n}=w(),o=b.useRef(null),a=Q(),{data:c}=Pe(),[i,u]=b.useState(!1),[d,p]=b.useState(null),h=k(m=>m.toggleMobileDrawer),l=async()=>{u(!0),p(null);try{await Qt(),await B(a)}catch(m){const x=m instanceof Te?n("header.refreshFailed",{status:m.status,statusText:m.statusText}):m instanceof Error?m.message:n("common.unknownError");p(x)}finally{u(!1)}},y=c.lastAnalyzedAt===null?n("freshness.never"):n(`freshness.${c.state}`,c.state);return t.jsxs("header",{className:"flex h-full min-w-0 items-center justify-between gap-3 px-2.5",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[t.jsx("button",{onClick:()=>h(!0),className:"flex h-8 w-8 items-center justify-center rounded-md text-content-secondary transition-colors hover:bg-surface-hover hover:text-content md:hidden","aria-label":n("menu.open"),title:n("menu.open"),children:t.jsx("span",{"aria-hidden":"true",className:"text-base",children:"≡"})}),t.jsx("div",{className:"flex h-7 items-center gap-2 border-r border-border-subtle pr-3",children:t.jsx("h1",{className:"truncate text-xs text-content",children:t.jsx(qe,{showWordmark:!0,markClassName:"h-6 w-6"})})}),t.jsxs("div",{className:"hidden min-w-0 items-center gap-2 text-[11px] sm:flex",children:[t.jsx("span",{className:"text-content-muted",children:n("workbench.workspace","Workspace")}),t.jsx("span",{className:"text-border-strong",children:"/"}),t.jsx("span",{className:"truncate text-content-secondary",children:n("workbench.localProject","Local project")})]})]}),t.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[s&&t.jsxs("div",{className:"relative hidden sm:block",children:[t.jsx(q,{name:"search",className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-content-muted"}),t.jsx("input",{ref:o,type:"text",value:e||"",onChange:m=>s(m.target.value),placeholder:n("header.searchPlaceholder",{shortcut:"⌘K"}),className:"h-8 w-48 rounded-md border border-border-subtle bg-[#090b0f] pl-8 pr-10 text-[11px] text-content placeholder:text-content-muted focus:border-primary-500 focus:outline-none md:w-64","aria-label":n("header.searchNodes")}),t.jsx("kbd",{className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 rounded border border-border-subtle px-1 py-0.5 font-mono text-[9px] text-content-muted",children:"⌘K"})]}),t.jsxs("div",{className:"hidden h-8 items-center gap-2 rounded-md px-2 text-[10px] text-content-muted md:flex",title:y,children:[t.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${c.state==="fresh"?"bg-emerald-400":c.state==="analyzing"?"bg-amber-400":"bg-slate-400"}`}),y]}),t.jsx(St,{}),r&&t.jsx("button",{onClick:r,className:"flex h-8 w-8 items-center justify-center rounded-md text-content-muted transition-colors hover:bg-surface-hover hover:text-content","aria-label":n("settings.open"),title:n("settings.title"),children:t.jsx(q,{name:"settings",className:"h-4 w-4"})}),t.jsxs("button",{onClick:l,disabled:i,className:"flex h-8 items-center gap-1.5 rounded-md bg-primary-600 px-2.5 text-[11px] font-medium text-white transition-colors hover:bg-primary-500 disabled:opacity-50","aria-label":n("header.refreshGraph"),children:[t.jsx(q,{name:"refresh",className:`h-3.5 w-3.5 ${i?"animate-spin":""}`}),t.jsx("span",{className:"hidden sm:inline",children:n(i?"header.refreshing":"header.refresh")})]}),d&&t.jsx("span",{role:"alert",className:"ml-1 max-w-40 truncate text-[10px] text-rose-400",children:d})]})]})}const Jt=/^[A-Za-z]:[\\/]/;function he(e){return e.startsWith("/")||Jt.test(e)||e.startsWith("\\\\")}function me(e){return e.replace(/\\/g,"/")}function Xt(e){return e.split("/").map(s=>encodeURIComponent(s).replace(/%3A/gi,":")).join("/")}function Re(e,s,r){const n=me(s);let o=n;if(!he(s)){if(!e||!he(e))return;o=`${me(e).replace(/\/+$/,"")}/${n.replace(/^\/+/,"")}`}const a=o.startsWith("/")?o.slice(1):o,c=Number.isFinite(r)&&r>0?Math.trunc(r):1;return`vscode://file/${Xt(a)}:${c}`}function $({children:e}){return t.jsx("h4",{className:"mb-ds-2 text-[11px] font-semibold text-content-secondary",children:e})}function es({node:e,projectRoot:s,inEdges:r,outEdges:n,onClose:o,onNodeSelect:a}){const{t:c}=w();if(!e)return null;const i=D[e.type]||"#94a3b8",u=Re(s,e.filePath,e.line),d=(p,h)=>t.jsx("ul",{className:"divide-y divide-border-subtle border-y border-border-subtle",children:p.map(l=>t.jsx("li",{children:t.jsxs("button",{className:"flex w-full items-center justify-between gap-ds-2 px-1 py-2 text-left text-[11px] text-content-secondary transition-colors hover:bg-surface-hover hover:text-content",onClick:()=>a(h(l)),children:[t.jsx("span",{className:"truncate",children:h(l).split(":").pop()}),t.jsx("span",{className:"shrink-0 rounded border border-border-subtle px-1.5 font-mono text-[10px] text-content-muted",children:l.type})]})},l.id))});return t.jsx(t.Fragment,{children:t.jsxs("div",{className:"z-drawer flex h-full w-full flex-col overflow-hidden bg-surface-panel md:static md:z-auto md:h-full md:w-80 md:max-w-none md:shrink-0",role:"complementary","aria-label":c("detail.inspectorLabel","Node inspector"),children:[t.jsx("div",{className:"shrink-0 border-b border-border-subtle p-ds-4",children:t.jsxs("div",{className:"flex items-start justify-between gap-ds-2",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-ds-2",children:[t.jsx("span",{className:"h-7 w-1 shrink-0 rounded-full",style:{backgroundColor:i},"aria-hidden":"true"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("h3",{className:"truncate text-sm font-semibold text-content",children:e.name}),t.jsxs("p",{className:"flex items-center gap-1.5 text-ds-xs text-content-muted",children:[t.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:i},"aria-hidden":"true"}),c(`nodeType.${e.type}`)]})]})]}),t.jsx("button",{onClick:o,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-ds-md text-content-muted transition-colors hover:bg-surface-hover hover:text-content","aria-label":c("detail.closePanel"),children:"×"})]})}),t.jsxs("div",{className:"flex-1 space-y-ds-5 overflow-y-auto p-ds-4",children:[t.jsxs("div",{children:[t.jsx($,{children:c("detail.location")}),t.jsxs("p",{className:"break-all rounded-md border border-border-subtle bg-surface px-ds-2 py-2 font-mono text-[11px] leading-5 text-content-secondary",children:[e.filePath,t.jsxs("span",{className:"ml-1 text-content-muted",children:[":",e.line]})]})]}),e.metadata&&Object.keys(e.metadata).length>0&&t.jsxs("div",{children:[t.jsx($,{children:c("detail.details")}),t.jsx("pre",{className:"overflow-x-auto rounded-md border border-border-subtle bg-surface p-ds-2 text-[11px] leading-5 text-content-secondary",children:JSON.stringify(e.metadata,null,2)})]}),r.length>0&&t.jsxs("div",{children:[t.jsxs($,{children:[c("detail.upstream")," (",r.length,")"]}),d(r,p=>p.source)]}),n.length>0&&t.jsxs("div",{children:[t.jsxs($,{children:[c("detail.downstream")," (",n.length,")"]}),d(n,p=>p.target)]})]}),t.jsx("div",{className:"shrink-0 border-t border-border-subtle p-ds-3",children:u?t.jsxs("a",{href:u,className:"flex w-full items-center justify-center gap-1.5 rounded-md bg-primary-600 py-2 text-xs font-medium text-white transition-colors hover:bg-primary-500",children:[t.jsx("span",{"aria-hidden":"true",children:"↗"}),c("detail.openVSCode")]}):t.jsxs("span",{"aria-disabled":"true",className:"flex w-full cursor-not-allowed items-center justify-center gap-1.5 rounded-md bg-primary-600 py-2 text-xs font-medium text-white opacity-40",children:[t.jsx("span",{"aria-hidden":"true",children:"↗"}),c("detail.openVSCode")]})})]})})}function Ae(e,s){const r=s.trim();if(!r)return e;const n=r.toLowerCase();return e.filter(o=>o.name.toLowerCase().includes(n)||o.filePath.toLowerCase().includes(n))}function ts(e,s){if(!(!s.trim()||!e))return new Set(Ae(e,s).map(r=>r.id))}function ss(e,s){return!e||!s?e:{nodes:e.nodes.filter(r=>s.has(r.id)),edges:e.edges.filter(r=>s.has(r.source)&&s.has(r.target))}}const rs=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function ns(e,s,r){return s<=0?-1:e<0?r?s-1:0:r?(e-1+s)%s:(e+1)%s}function Me(e,s){const r=b.useRef(null),n=b.useRef(s);return b.useEffect(()=>{n.current=s},[s]),b.useEffect(()=>{if(!e||!r.current)return;const o=r.current,a=document.activeElement instanceof HTMLElement?document.activeElement:null,c=()=>Array.from(o.querySelectorAll(rs)).filter(d=>d.getAttribute("aria-hidden")!=="true");(c()[0]??o).focus();const u=d=>{if(d.key==="Escape"&&!d.defaultPrevented){d.preventDefault(),n.current();return}if(d.key!=="Tab")return;const p=c(),h=p.indexOf(document.activeElement),l=ns(h,p.length,d.shiftKey);d.preventDefault(),l>=0?p[l].focus():o.focus()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),a==null||a.focus()}},[e]),r}function os({graph:e,isOpen:s,onClose:r,onNodeSelect:n}){const{t:o}=w(),a=k(m=>m.searchQuery),c=k(m=>m.setSearchQuery),[i,u]=b.useState(0),d=b.useRef(null),p=Me(s,r),h=b.useMemo(()=>!e||!a.trim()?[]:Ae(e.nodes,a).slice(0,20),[e,a]);b.useEffect(()=>{s&&u(0)},[s]);const l=b.useCallback(m=>{switch(m.key){case"ArrowDown":m.preventDefault(),u(x=>Math.min(x+1,h.length-1));break;case"ArrowUp":m.preventDefault(),u(x=>Math.max(x-1,0));break;case"Enter":m.preventDefault(),h[i]&&(n(h[i].id),r());break;case"Escape":m.preventDefault(),r();break}},[h,i,n,r]);if(b.useEffect(()=>{if(d.current){const m=d.current.children.item(i);m instanceof HTMLElement&&m.scrollIntoView({block:"nearest"})}},[i]),!s)return null;const y=h[i]?`cmd-option-${h[i].id}`:void 0;return t.jsxs("div",{className:"fixed inset-0 z-modal flex items-start justify-center pt-[18vh]",children:[t.jsx("div",{className:"absolute inset-0 bg-black/70",onClick:r,"aria-hidden":"true"}),t.jsxs("div",{ref:p,tabIndex:-1,"data-modal-focus-trap":"command-palette",className:"relative w-full max-w-xl overflow-hidden rounded-lg border border-border-strong bg-surface-raised shadow-ds-panel",role:"dialog","aria-modal":"true","aria-label":o("commandPalette.placeholder"),children:[t.jsxs("div",{className:"flex items-center gap-ds-3 border-b border-border-subtle px-ds-4 py-ds-3",children:[t.jsx("span",{className:"h-3 w-3 rounded-full border border-content-muted","aria-hidden":"true"}),t.jsx("input",{type:"text",role:"combobox","aria-expanded":h.length>0,"aria-controls":"cmd-results","aria-activedescendant":y,"aria-autocomplete":"list","aria-label":o("commandPalette.placeholder"),value:a,onChange:m=>{c(m.target.value),u(0)},onKeyDown:l,placeholder:o("commandPalette.placeholder"),className:"flex-1 bg-transparent text-ds-base text-content placeholder-content-muted outline-none"}),t.jsx("kbd",{className:"rounded-ds-sm border border-border-subtle bg-surface px-1.5 py-0.5 text-ds-xs text-content-muted",children:o("commandPalette.esc")})]}),t.jsxs("div",{ref:d,id:"cmd-results",role:"listbox","aria-label":o("commandPalette.placeholder"),className:"max-h-72 overflow-y-auto p-ds-1",children:[h.length===0&&a.trim()&&t.jsx("div",{className:"px-ds-4 py-ds-6 text-center text-ds-sm text-content-muted",children:o("commandPalette.noResults")}),h.map((m,x)=>t.jsxs("button",{id:`cmd-option-${m.id}`,role:"option","aria-selected":x===i,className:`flex w-full items-center gap-ds-3 rounded-ds-md px-ds-3 py-ds-2 text-left text-ds-sm transition-colors ${x===i?"bg-primary-600/30 text-content":"text-content-secondary hover:bg-surface-hover"}`,onClick:()=>{n(m.id),r()},onMouseEnter:()=>u(x),children:[t.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:D[m.type]},"aria-hidden":"true"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:"truncate",children:m.name}),t.jsx("div",{className:"truncate text-ds-xs text-content-muted",children:m.filePath})]})]},m.id))]}),h.length>0&&t.jsxs("div",{className:"flex items-center gap-ds-4 border-t border-border-subtle px-ds-4 py-ds-2 text-ds-xs text-content-muted",children:[t.jsxs("span",{children:[t.jsx("kbd",{className:"rounded-ds-sm bg-surface px-1 py-0.5",children:"↑↓"})," ",o("commandPalette.navigate")]}),t.jsxs("span",{children:[t.jsx("kbd",{className:"rounded-ds-sm bg-surface px-1 py-0.5",children:"↵"})," ",o("commandPalette.select")]}),t.jsxs("span",{children:[t.jsx("kbd",{className:"rounded-ds-sm bg-surface px-1 py-0.5",children:"esc"})," ",o("commandPalette.close")]})]})]})]})}const V={name:"PolyForm Noncommercial License 1.0.0",url:"https://polyformproject.org/licenses/noncommercial/1.0.0/",summaryKey:"about.licenseSummary"},Ie=["project"];function as(){return F({queryKey:Ie,queryFn:Gt,staleTime:Number.POSITIVE_INFINITY})}function is({open:e,onClose:s}){const{t:r,i18n:n}=w(),o=Q(),a=Me(e,s),[c,i]=b.useState(""),[u,d]=b.useState(!1),[p,h]=b.useState(null),[l,y]=b.useState(null),m=b.useCallback(async()=>{const j=c.trim();if(!(j===""||u||!ue(j))){d(!0),h(null),y(null);try{const C=await Bt(j);C.ok?(h(C.projectRoot??j),await B(o),await o.invalidateQueries({queryKey:Ie})):y(C.errorMessage??r("settings.project.failed"))}catch(C){y(C instanceof Error?C.message:r("settings.project.failed"))}finally{d(!1)}}},[c,u,o,r]),x=c.trim()!==""&&!ue(c),v=l??(x?r("settings.project.absoluteRequired","Enter an absolute project path"):null),S=n.language==="zh-CN",R=b.useCallback(j=>{n.changeLanguage(j),Se(j)},[n]);return e?t.jsxs("div",{className:"fixed inset-0 z-modal flex justify-end",role:"dialog","aria-modal":"true","aria-label":r("settings.title"),children:[t.jsx("div",{"data-settings":"backdrop",className:"absolute inset-0 bg-black/70","aria-hidden":"true",onClick:s}),t.jsxs("aside",{ref:a,tabIndex:-1,"data-modal-focus-trap":"settings",className:"relative flex h-full w-96 max-w-full flex-col overflow-y-auto border-l border-border-strong bg-surface-raised shadow-ds-panel",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex shrink-0 items-center justify-between border-b border-border-subtle bg-surface-raised px-ds-4 py-ds-3",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-ds-sm font-semibold text-content",children:r("settings.title")}),t.jsx("p",{className:"mt-0.5 text-[11px] text-content-muted",children:r("settings.subtitle","Workspace preferences")})]}),t.jsx("button",{onClick:s,className:"flex h-8 w-8 items-center justify-center rounded-ds-md text-content-muted transition-colors hover:bg-surface-hover hover:text-content","aria-label":r("settings.close"),children:"×"})]}),t.jsxs("section",{className:"space-y-ds-2 border-b border-border-subtle px-ds-4 py-ds-4",children:[t.jsx("h3",{className:"text-ds-xs font-semibold text-content-secondary",children:r("settings.group.project")}),t.jsx("input",{type:"text",value:c,onChange:j=>i(j.target.value),placeholder:r("settings.project.placeholder"),"aria-invalid":x,className:"w-full rounded-ds-md border border-border-subtle bg-surface px-ds-2 py-1.5 text-ds-xs text-content placeholder-content-muted focus:border-primary-500 focus:outline-none"}),t.jsx("button",{onClick:m,disabled:!c.trim()||x||u,className:"w-full rounded-ds-md bg-primary-600 px-ds-2 py-1.5 text-ds-xs font-medium text-white transition-colors hover:bg-primary-500 disabled:opacity-50",children:r(u?"settings.project.switching":"settings.project.switch")}),p&&t.jsxs("p",{className:"break-all text-ds-xs text-emerald-400",children:[r("settings.project.switched"),": ",p]}),v&&t.jsx("p",{className:"break-all text-ds-xs text-rose-400",children:v})]}),t.jsxs("section",{className:"space-y-ds-2 border-b border-border-subtle px-ds-4 py-ds-4",children:[t.jsx("h3",{className:"text-ds-xs font-semibold text-content-secondary",children:r("settings.group.display")}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-ds-xs text-content-secondary",children:r("settings.display.language")}),t.jsxs("div",{className:"flex gap-1",children:[t.jsx("button",{onClick:()=>R("zh-CN"),className:`rounded-ds-md px-ds-2 py-1 text-ds-xs transition-colors ${S?"bg-primary-600 text-white":"bg-surface text-content-secondary hover:bg-surface-hover"}`,children:"中文"}),t.jsx("button",{onClick:()=>R("en-US"),className:`rounded-ds-md px-ds-2 py-1 text-ds-xs transition-colors ${S?"bg-surface text-content-secondary hover:bg-surface-hover":"bg-primary-600 text-white"}`,children:"EN"})]})]})]}),t.jsxs("section",{className:"space-y-ds-3 px-ds-4 py-ds-4",children:[t.jsx("h3",{className:"text-ds-xs font-semibold text-content-secondary",children:r("settings.group.about")}),t.jsxs("div",{className:"space-y-1 rounded-md border border-border-subtle bg-surface-panel p-3",children:[t.jsx("p",{className:"text-ds-xs font-medium text-content",children:"CodeOmniVis"}),t.jsx("p",{className:"text-ds-xs text-content-muted",children:r(V.summaryKey)}),t.jsx("a",{href:V.url,target:"_blank",rel:"noreferrer",className:"break-all text-ds-xs text-primary-300 hover:underline",children:V.name})]})]})]})]}):null}class cs extends b.Component{constructor(s){super(s),this.state={hasError:!1}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}componentDidCatch(s,r){console.error("[OmniVis] Uncaught error:",s,r)}render(){var s;return this.state.hasError?this.props.fallback??t.jsx("div",{className:"flex h-screen items-center justify-center bg-surface",children:t.jsxs("div",{className:"max-w-sm rounded-lg border border-border-strong bg-surface-raised p-ds-6 text-center",children:[t.jsx("div",{className:"mx-auto mb-ds-4 flex h-9 w-9 items-center justify-center rounded-full border border-rose-500/40 text-sm font-semibold text-rose-300",children:"!"}),t.jsx("div",{className:"mb-ds-2 text-ds-lg font-semibold text-content",children:"Something went wrong"}),t.jsx("div",{className:"mb-ds-4 text-ds-sm text-content-muted",children:(s=this.state.error)==null?void 0:s.message}),t.jsx("button",{onClick:()=>this.setState({hasError:!1}),className:"rounded-ds-md bg-primary-600 px-ds-4 py-ds-2 text-ds-sm font-medium text-white transition-colors hover:bg-primary-500",children:"Try Again"})]})}):this.props.children}}function ls({commandBar:e,viewRail:s,explorer:r,main:n,inspector:o,statusBar:a,mobileExplorerOpen:c=!1,onCloseMobileExplorer:i}){const{t:u}=w();return t.jsxs("div",{"data-testid":"workbench",className:"grid h-screen min-h-0 grid-rows-[48px_minmax(0,1fr)_24px] overflow-hidden bg-[#090b0f] text-content",children:[t.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-modal focus:rounded-md focus:bg-primary-600 focus:px-3 focus:py-2 focus:text-xs focus:font-medium focus:text-white",children:u("a11y.skipToMain","Skip to main content")}),t.jsx("div",{"data-workbench":"command-bar",className:"col-span-full border-b border-border-subtle bg-surface-raised",children:e}),t.jsxs("div",{className:"grid min-h-0 grid-cols-[48px_248px_minmax(0,1fr)_auto] max-md:grid-cols-[48px_minmax(0,1fr)]",children:[t.jsx("nav",{"data-workbench":"view-rail","aria-label":u("workbench.workspaceViews","Workspace views"),className:"min-h-0 border-r border-border-subtle bg-[#0b0e13]",children:s}),t.jsx("aside",{"data-workbench":"explorer",className:"min-h-0 overflow-hidden border-r border-border-subtle bg-surface-panel max-md:hidden",children:r}),t.jsx("main",{"data-workbench":"canvas",id:"main-content",tabIndex:-1,className:"relative min-h-0 min-w-0 overflow-hidden bg-[#090b0f]",children:n}),o?t.jsx("aside",{"data-workbench":"inspector",className:"min-h-0 w-80 overflow-hidden border-l border-border-subtle bg-surface-panel max-lg:fixed max-lg:bottom-6 max-lg:right-0 max-lg:top-12 max-lg:z-drawer max-lg:w-[min(360px,calc(100vw-48px))] max-lg:shadow-ds-panel",children:o}):null,c?t.jsxs("div",{className:"fixed bottom-6 left-12 right-0 top-12 z-drawer md:hidden",children:[t.jsx("button",{type:"button","data-workbench":"mobile-explorer-backdrop",className:"absolute inset-0 z-0 bg-black/70","aria-label":u("workbench.closeExplorer","Close explorer"),onClick:i}),t.jsx("aside",{"data-workbench":"mobile-explorer",className:"relative z-10 h-full w-[min(300px,calc(100vw-48px))] border-r border-border-strong bg-surface-panel shadow-ds-panel",children:r})]}):null]}),t.jsx("footer",{"data-workbench":"status-bar",className:"col-span-full border-t border-border-subtle bg-[#0b0e13]",children:a})]})}const ds=[{id:"architecture",labelKey:"workbench.view.architecture",defaultLabel:"Architecture",icon:"architecture"},{id:"requests",labelKey:"workbench.view.requests",defaultLabel:"Requests",icon:"requests"},{id:"data",labelKey:"workbench.view.data",defaultLabel:"Data model",icon:"data"},{id:"tests",labelKey:"workbench.view.tests",defaultLabel:"Tests",icon:"tests"},{id:"quality",labelKey:"workbench.view.quality",defaultLabel:"Quality",icon:"quality"}];function us({activeView:e,onViewChange:s,issueCount:r=0}){const{t:n}=w();return t.jsxs("div",{className:"flex h-full flex-col items-center py-2",children:[t.jsx(qe,{className:"mb-3 text-content",markClassName:"h-8 w-8"}),t.jsx("div",{className:"flex w-full flex-1 flex-col items-center gap-1 px-1.5",children:ds.map(o=>{const a=e===o.id,c=n(o.labelKey,o.defaultLabel);return t.jsxs("button",{"data-testid":`view-${o.id}`,type:"button","aria-label":c,title:c,"aria-current":a?"page":void 0,onClick:()=>s(o.id),className:`relative flex h-9 w-9 items-center justify-center rounded-md transition-colors duration-150 ${a?"bg-primary-600 text-white":"text-content-muted hover:bg-surface-hover hover:text-content"}`,children:[t.jsx(q,{name:o.icon,className:"h-[18px] w-[18px]"}),o.id==="quality"&&r>0?t.jsx("span",{className:"absolute right-0.5 top-0.5 h-1.5 w-1.5 rounded-full bg-rose-400"}):null]},o.id)})})]})}const ps={architecture:{titleKey:"workbench.view.architecture",title:"Architecture",descriptionKey:"workbench.description.architectureShort",description:"System shape and ownership"},requests:{titleKey:"workbench.view.requestFlow",title:"Request flow",descriptionKey:"workbench.description.requestsShort",description:"UI to API to data"},data:{titleKey:"workbench.view.data",title:"Data model",descriptionKey:"workbench.description.dataShort",description:"Queries and schema relations"},tests:{titleKey:"workbench.view.tests",title:"Tests",descriptionKey:"workbench.description.testsShort",description:"Suites and production coverage"},quality:{titleKey:"workbench.view.quality",title:"Quality",descriptionKey:"workbench.description.qualityShort",description:"Parser findings and risks"}},be={architecture:{key:"workbench.empty.architecture.explorer",value:"No architecture nodes detected. Open Full graph or run analysis again."},requests:{key:"workbench.empty.requests.explorer",value:"No request nodes detected in the latest analysis."},data:{key:"workbench.empty.data.explorer",value:"No data nodes detected in the latest analysis."},tests:{key:"workbench.empty.tests.explorer",value:"No test nodes detected in the latest analysis."}};function hs({graph:e,view:s,isAnalyzed:r=!0,selectedNodeId:n,onNodeSelect:o}){const{t:a}=w(),c=b.useMemo(()=>{const u=new Map;for(const d of(e==null?void 0:e.nodes)??[])u.set(d.type,[...u.get(d.type)??[],d]);return[...u.entries()]},[e]),i=ps[s];return t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("div",{className:"border-b border-border-subtle px-3 py-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(q,{name:"layers",className:"h-4 w-4 text-content-muted"}),t.jsx("h2",{className:"text-xs font-semibold text-content",children:a(i.titleKey,i.title)})]}),t.jsx("p",{className:"mt-1 pl-6 text-[11px] text-content-muted",children:a(i.descriptionKey,i.description)})]}),t.jsxs("div",{className:"flex items-center justify-between border-b border-border-subtle px-3 py-2 text-[11px] text-content-muted",children:[t.jsx("span",{children:a("workbench.explorer","Explorer")}),t.jsx("span",{className:"font-mono tabular-nums",children:(e==null?void 0:e.nodes.length)??0})]}),t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto py-2",children:c.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-[11px] leading-5 text-content-muted",children:r?s==="quality"?a("workbench.quality.noLatest","No findings in the latest analysis."):a(be[s].key,be[s].value):a("workbench.empty.notAnalyzed.explorer","Run the first analysis to populate this workspace.")}):c.map(([u,d])=>t.jsxs("section",{className:"mb-3",children:[t.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 text-[10px] font-medium text-content-muted",children:[t.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:D[u]}}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:a(`nodeType.${u}`,u.replaceAll("_"," "))}),t.jsx("span",{className:"font-mono",children:d.length})]}),t.jsx("div",{children:d.map(p=>t.jsxs("button",{type:"button",onClick:()=>o(p.id),title:p.filePath,className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-[11px] transition-colors ${n===p.id?"bg-primary-500/10 text-content":"text-content-secondary hover:bg-surface-hover hover:text-content"}`,children:[t.jsx(q,{name:p.type==="db_model"?"database":"file",className:`h-3.5 w-3.5 shrink-0 ${n===p.id?"text-primary-400":"text-content-muted"}`}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:p.name})]},p.id))})]},u))})]})}const ms=[{id:"overview",labelKey:"workbench.depth.overview",defaultLabel:"Overview"},{id:"full",labelKey:"workbench.depth.full",defaultLabel:"Full graph"},{id:"focus",labelKey:"workbench.depth.focus",defaultLabel:"Focus"}];function bs({view:e,depth:s,focusAvailable:r,onDepthChange:n,onFit:o}){const{t:a}=w();return t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e==="architecture"?t.jsx("div",{className:"flex min-w-0 items-center rounded-md border border-border-subtle bg-surface p-0.5","aria-label":a("workbench.depth.label","Architecture detail level"),children:ms.map(c=>t.jsx("button",{type:"button","aria-pressed":s===c.id,disabled:c.id==="focus"&&!r,title:c.id==="focus"&&!r?a("workbench.depth.focusHint","Select a node to enter focus mode"):void 0,onClick:()=>n(c.id),className:`h-7 whitespace-nowrap rounded px-2 text-[10px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40 sm:px-2.5 sm:text-[11px] ${s===c.id?"bg-surface-hover text-content":"text-content-muted hover:text-content-secondary"}`,children:a(c.labelKey,c.defaultLabel)},c.id))}):null,t.jsxs("button",{type:"button",onClick:o,className:"flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-border-subtle bg-surface px-2 text-[11px] font-medium text-content-secondary hover:border-border-strong hover:text-content sm:px-2.5","aria-label":a("workbench.fitView","Fit view"),children:[t.jsx(q,{name:"focus",className:"h-3.5 w-3.5"}),t.jsx("span",{className:"hidden sm:inline",children:a("workbench.fitView","Fit view")})]})]})}const fs={architecture:{titleKey:"workbench.view.architecture",title:"Architecture",descriptionKey:"workbench.description.architecture",description:"Explore system boundaries and implementation layers"},requests:{titleKey:"workbench.view.requestFlow",title:"Request flow",descriptionKey:"workbench.description.requests",description:"Follow runtime paths from interface to persistence"},data:{titleKey:"workbench.view.data",title:"Data model",descriptionKey:"workbench.description.data",description:"Inspect queries, ownership, and schema relations"},tests:{titleKey:"workbench.view.tests",title:"Tests",descriptionKey:"workbench.description.tests",description:"Explore suites, fixtures, and static production coverage"},quality:{titleKey:"workbench.view.quality",title:"Quality",descriptionKey:"workbench.description.quality",description:"Review parser output and deterministic project risks"}};function xs({view:e,graph:s,depth:r,focusAvailable:n,findingCount:o=0,onDepthChange:a,onFit:c}){const{t:i}=w(),u=fs[e];return t.jsxs("header",{className:"flex min-h-14 shrink-0 flex-col items-stretch justify-between gap-2 border-b border-border-subtle bg-[#0b0e13] px-3 py-2 sm:h-14 sm:flex-row sm:items-center sm:gap-3 sm:px-4 sm:py-0",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-content",children:i(u.titleKey,u.title)}),t.jsx("span",{className:"hidden text-[10px] text-content-muted lg:inline",children:"/"}),t.jsx("span",{className:"hidden truncate text-[11px] text-content-muted lg:inline",children:i(u.descriptionKey,u.description)})]}),t.jsx("div",{className:"mt-1 hidden items-center gap-3 font-mono text-[10px] text-content-muted sm:flex",children:e==="quality"?t.jsx("span",{children:i("workbench.count.findings",{defaultValue:`${o} findings`,count:o})}):t.jsxs(t.Fragment,{children:[t.jsx("span",{children:i("workbench.count.nodes",{defaultValue:`${(s==null?void 0:s.nodes.length)??0} nodes`,count:(s==null?void 0:s.nodes.length)??0})}),t.jsx("span",{children:i("workbench.count.edges",{defaultValue:`${(s==null?void 0:s.edges.length)??0} edges`,count:(s==null?void 0:s.edges.length)??0})})]})})]}),e!=="quality"?t.jsx(bs,{view:e,depth:r,focusAvailable:n,onDepthChange:a,onFit:c}):null]})}const fe=["critical","error","warning","info"],xe={critical:"bg-red-400",error:"bg-rose-400",warning:"bg-amber-400",info:"bg-sky-400"};function U(e){return e.replace(/_/g," ").replace(/^./,s=>s.toUpperCase())}function ys({findings:e,isLoading:s,detectors:r=[],parserError:n,issuesError:o,projectRoot:a}){const{t:c}=w(),i=r.filter(l=>l.status==="failed"),u=!!(n&&o),d=!u&&!!(n||o||i.length>0),p=r.length===4&&i.length===0;if(s&&e.length===0)return t.jsxs("div",{className:"h-full overflow-auto p-6","aria-label":c("workbench.quality.loading","Loading quality findings"),children:[t.jsx("div",{className:"mb-6 h-5 w-40 animate-pulse rounded bg-surface-hover"}),t.jsx("div",{className:"space-y-2",children:[1,2,3].map(l=>t.jsx("div",{className:"h-20 animate-pulse rounded-md border border-border-subtle bg-surface"},l))})]});if(u)return t.jsxs("div",{className:"m-6 rounded-md border border-rose-500/40 bg-rose-500/5 p-4",role:"alert",children:[t.jsx("h2",{className:"text-sm font-semibold text-rose-200",children:c("workbench.quality.unavailable","Quality data unavailable")}),t.jsx("p",{className:"mt-1 text-xs leading-5 text-rose-300/80",children:c("workbench.quality.unavailableDescription","Parser output and project risks could not be loaded.")})]});if(e.length===0&&!d&&p)return t.jsx("div",{className:"flex h-full items-center justify-center p-8",children:t.jsxs("div",{className:"max-w-md text-center",children:[t.jsx("div",{className:"mx-auto mb-4 flex h-10 w-10 items-center justify-center rounded-full border border-emerald-500/30 bg-emerald-500/10 text-emerald-300","aria-hidden":"true",children:"✓"}),t.jsx("h2",{className:"text-sm font-semibold text-content",children:c("workbench.quality.none","No quality findings")}),t.jsx("p",{className:"mt-2 text-xs leading-5 text-content-muted",children:c("workbench.quality.noneDescription","No deterministic parser or project risks were reported by the latest analysis.")})]})});const h=Object.fromEntries(fe.map(l=>[l,e.filter(y=>y.severity===l).length]));return t.jsxs("section",{className:"h-full overflow-auto px-4 py-4 sm:px-6 sm:py-5","aria-label":c("workbench.view.quality","Quality"),children:[d||!p?t.jsxs("div",{className:"mb-4 rounded-md border border-amber-500/35 bg-amber-500/5 px-3 py-2.5",role:"status",children:[t.jsx("p",{className:"text-xs font-semibold text-amber-200",children:c("workbench.quality.partial","Partial quality results")}),t.jsx("p",{className:"mt-1 text-[11px] leading-5 text-amber-200/70",children:c("workbench.quality.partialDescription","Some quality sources were unavailable. Visible findings remain valid, but this is not a complete health result.")}),i.length>0?t.jsx("p",{className:"mt-1 font-mono text-[10px] text-amber-200/70",children:i.map(l=>c(`workbench.detector.${l.id}`,U(l.id))).join(", ")}):null]}):null,t.jsxs("div",{className:"mb-4 flex flex-col gap-3 border-b border-border-subtle pb-4 sm:flex-row sm:items-end sm:justify-between",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-sm font-semibold text-content",children:c("workbench.count.findings",{defaultValue:`${e.length} findings`,count:e.length})}),t.jsx("p",{className:"mt-1 text-xs text-content-muted",children:c("workbench.quality.output","Deterministic parser output and project risks from the latest analysis.")})]}),t.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 text-[11px] text-content-secondary",children:fe.map(l=>t.jsxs("span",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${xe[l]}`,"aria-hidden":"true"}),h[l]," ",c(`workbench.severity.${l}`,l)]},l))})]}),t.jsx("ol",{className:"divide-y divide-border-subtle border-y border-border-subtle",children:e.map(l=>{const y=l.locations[0],m=y?`${y.file}${y.line?`:${y.line}`:""}`:void 0,x=y?Re(a,y.file,y.line??1):void 0,v=l.messageKey?c(`workbench.issueMessage.${l.messageKey}`,{defaultValue:l.message,...l.messageParams}):l.message;return t.jsxs("li",{className:"grid gap-2 px-2 py-3.5 hover:bg-surface-hover/50 sm:grid-cols-[88px_minmax(0,1fr)] sm:gap-4",children:[t.jsxs("span",{className:"flex items-center gap-2 text-[11px] capitalize text-content-secondary",children:[t.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${xe[l.severity]}`,"aria-hidden":"true"}),c(`workbench.severity.${l.severity}`,l.severity)]}),t.jsxs("div",{className:"min-w-0",children:[t.jsxs("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5 text-[10px]",children:[t.jsx("span",{className:"rounded border border-border-subtle bg-surface px-1.5 py-0.5 text-content-secondary",children:c(`workbench.source.${l.source}`,U(l.source))}),t.jsx("span",{className:"rounded border border-border-subtle px-1.5 py-0.5 text-content-muted",children:c(`workbench.issueType.${l.type}`,U(l.type))})]}),t.jsx("p",{className:"text-xs leading-5 text-content",children:v}),m?x?t.jsx("a",{href:x,className:"mt-1 inline-block max-w-full truncate font-mono text-[11px] text-content-muted underline decoration-border-strong underline-offset-2 hover:text-content focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400","aria-label":c("workbench.quality.openLocation",{defaultValue:`Open ${m} in VS Code`,location:m}),children:m}):t.jsx("p",{className:"mt-1 truncate font-mono text-[11px] text-content-muted",children:m}):null]})]},l.id)})})]})}function gs({status:e,nodeCount:s,edgeCount:r}){const{t:n}=w(),o=k(i=>i.wsStatus),a=e.state==="fresh"?"bg-emerald-400":e.state==="analyzing"?"bg-amber-400":"bg-slate-400",c=e.lastAnalyzedAt===null?n("freshness.never","Not analyzed yet"):n(`freshness.${e.state}`,e.state);return t.jsxs("div",{className:"flex h-full items-center justify-between px-2.5 font-mono text-[10px] text-content-muted",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("span",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${a}`}),c]}),t.jsx("span",{children:n(`ws.${o}`,o)})]}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("span",{children:n("workbench.count.nodes",{defaultValue:`${s} nodes`,count:s})}),t.jsx("span",{children:n("workbench.count.edges",{defaultValue:`${r} edges`,count:r})}),t.jsx("span",{className:"hidden sm:inline",children:n("workbench.shortcut.search","⌘K search")}),t.jsx("span",{className:"hidden lg:inline",children:n("workbench.shortcut.navigate","↑↓ navigate")})]})]})}const ws={architecture:{titleKey:"workbench.empty.architecture.title",title:"No architecture nodes detected",descriptionKey:"workbench.empty.architecture.description",description:"Run analysis again or open Full graph to inspect every parsed implementation node."},requests:{titleKey:"workbench.empty.requests.title",title:"No request paths detected",descriptionKey:"workbench.empty.requests.description",description:"Request flow appears after render, API call, handler, service, or query relationships are found."},data:{titleKey:"workbench.empty.data.title",title:"No data relationships detected",descriptionKey:"workbench.empty.data.description",description:"This project has no parsed Prisma, TypeORM, or query relationships in the current analysis."},tests:{titleKey:"workbench.empty.tests.title",title:"No tests discovered",descriptionKey:"workbench.empty.tests.description",description:"Add supported TypeScript or Kotlin tests and run analysis again."}};function ks({view:e,hasSearchQuery:s,isAnalyzed:r=!0}){const{t:n}=w(),o=r?s?{titleKey:"workbench.empty.search.title",title:"No nodes match this search",descriptionKey:"workbench.empty.search.description",description:"Clear the search or use a broader file, symbol, or node-type query."}:ws[e]:{titleKey:"workbench.empty.notAnalyzed.title",title:"Project not analyzed yet",descriptionKey:"workbench.empty.notAnalyzed.description",description:"Run the first analysis to populate this workspace with architecture nodes and relationships."};return t.jsx("div",{className:"flex h-full items-center justify-center p-8 text-center",children:t.jsxs("div",{className:"max-w-sm",children:[t.jsx("div",{className:"mx-auto mb-4 h-8 w-8 rounded-md border border-border-strong bg-surface-panel","aria-hidden":"true"}),t.jsx("h2",{className:"text-sm font-semibold text-content",children:n(o.titleKey,o.title)}),t.jsx("p",{className:"mt-2 text-xs leading-5 text-content-muted",children:n(o.descriptionKey,o.description)})]})})}const vs={architecture:{key:"workbench.error.architecture",value:"Unable to load the architecture graph"},requests:{key:"workbench.error.requests",value:"Unable to load request flow"},data:{key:"workbench.error.data",value:"Unable to load the data model"},tests:{key:"workbench.error.tests",value:"Unable to load the test view"}};function js({view:e,error:s}){const{t:r}=w(),n=vs[e];return t.jsxs("div",{"data-testid":"canvas-error",className:"m-5 border-l-2 border-rose-400 bg-rose-500/5 px-4 py-3 text-xs text-rose-200",role:"alert",children:[t.jsx("p",{className:"font-medium",children:r(n.key,n.value)}),t.jsx("p",{className:"mt-1 break-all font-mono text-[10px] text-rose-300/80",children:s.message})]})}const Ns=[{id:"critical",color:"bg-red-400"},{id:"error",color:"bg-rose-400"},{id:"warning",color:"bg-amber-400"},{id:"info",color:"bg-sky-400"}],ye=["parser","consistency","security","performance","framework"];function _s(e){return e.replace(/_/g," ").replace(/^./,s=>s.toUpperCase())}function Ss({findings:e,isLoading:s=!1,detectors:r=[],parserError:n,issuesError:o}){const{t:a}=w(),c=r.filter(d=>d.status==="failed"),i=!!(n&&o),u=!i&&!!(n||o||c.length>0||s&&e.length>0);return t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("div",{className:"border-b border-border-subtle px-3 py-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(q,{name:"quality",className:"h-4 w-4 text-content-muted"}),t.jsx("h2",{className:"text-xs font-semibold text-content",children:a("workbench.view.quality","Quality")})]}),t.jsx("p",{className:"mt-1 pl-6 text-[11px] text-content-muted",children:a("workbench.description.qualityShort","Parser output and deterministic risks")})]}),t.jsx("div",{className:"border-b border-border-subtle px-3 py-2 text-[11px] text-content-muted",children:a("workbench.latestAnalysis","Latest analysis")}),s&&e.length===0?t.jsx("div",{className:"space-y-2 p-3","aria-label":a("workbench.quality.loading","Loading quality findings"),children:[1,2,3].map(d=>t.jsx("div",{className:"h-8 animate-pulse rounded-md bg-surface-hover"},d))}):i?t.jsx("div",{className:"m-3 rounded-md border border-rose-500/30 bg-rose-500/5 p-3 text-[11px] leading-5 text-rose-300",role:"alert",children:a("workbench.quality.unavailable","Quality data unavailable")}):t.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[u?t.jsx("div",{className:"m-3 rounded-md border border-amber-500/30 bg-amber-500/5 p-2.5 text-[11px] leading-5 text-amber-200",role:"status",children:a("workbench.quality.partial","Partial quality results")}):null,t.jsx("div",{className:"border-b border-border-subtle px-3 py-2 text-[10px] font-semibold uppercase tracking-wide text-content-muted",children:a("workbench.quality.severitySection","Severity")}),t.jsx("div",{className:"space-y-1 p-2",children:Ns.map(d=>{const p=e.filter(h=>h.severity===d.id).length;return t.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-[11px] text-content-secondary",children:[t.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.color}`,"aria-hidden":"true"}),t.jsx("span",{className:"flex-1 capitalize",children:a(`workbench.severity.${d.id}`,d.id)}),t.jsx("span",{className:"font-mono tabular-nums text-content-muted",children:p})]},d.id)})}),ye.some(d=>e.some(p=>p.source===d))?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"border-y border-border-subtle px-3 py-2 text-[10px] font-semibold uppercase tracking-wide text-content-muted",children:a("workbench.quality.sourcesSection","Sources")}),t.jsx("div",{className:"space-y-1 p-2",children:ye.map(d=>{const p=e.filter(l=>l.source===d).length;if(p===0)return null;const h=a(`workbench.source.${d}`,_s(d));return t.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-[11px] text-content-secondary",children:[t.jsx("span",{className:"flex-1",children:h}),t.jsx("span",{className:"font-mono tabular-nums text-content-muted",children:p})]},d)})})]}):null]}),t.jsx("p",{className:"mt-auto border-t border-border-subtle p-3 text-[11px] leading-5 text-content-muted",children:a("workbench.quality.note","Findings are deterministic parser output and project risks from the latest analysis.")})]})}function Ts(e){const s=new Map(e.nodes.map(r=>[r.id,r]));return e.nodes.filter(r=>r.type==="test_suite").map(r=>{const o=[...new Set(e.edges.filter(i=>i.type==="tests"&&i.source===r.id).map(i=>i.target))].map(i=>s.get(i)).filter(i=>(i==null?void 0:i.type)==="test_case"),a=new Set(o.map(i=>i.filePath)),c=e.nodes.filter(i=>i.type==="test_fixture"&&(i.filePath===r.filePath||a.has(i.filePath)));return{suite:r,cases:o,fixtures:c}})}function Cs(e,s){return e.flatMap(r=>{if(!oe(r.suite,"test_suite"))return[];if(s.framework!=="all"&&r.suite.metadata.framework!==s.framework)return[];const n=r.cases.filter(o=>!oe(o,"test_case")||s.framework!=="all"&&o.metadata.framework!==s.framework?!1:s.status==="enabled"?!o.metadata.disabled:s.status==="disabled"?o.metadata.disabled:!0);return s.status!=="all"&&n.length===0?[]:[{...r,cases:n}]})}function Es(e,s){const r=new Set(e.nodes.filter(a=>a.type==="test_suite"||a.type==="test_case"||a.type==="test_fixture").map(a=>a.id)),n=e.edges.filter(a=>(a.type==="tests"||a.type==="uses_fixture")&&r.has(a.source)&&r.has(a.target)||a.type==="covers"&&(!s||a.source===s)),o=new Set([...r,...n.flatMap(a=>[a.source,a.target])]);return{nodes:e.nodes.filter(a=>o.has(a.id)),edges:n}}function Ps({graph:e,selectedNodeId:s,onNodeSelect:r}){const{t:n}=w(),[o,a]=b.useState("all"),[c,i]=b.useState("all"),u=b.useMemo(()=>e?Ts(e):[],[e]),d=b.useMemo(()=>Cs(u,{framework:o,status:c}),[u,o,c]),p=b.useMemo(()=>[...new Set(u.flatMap(h=>{const l=h.suite.metadata;return l.framework?[l.framework]:[]}))].sort(),[u]);return t.jsxs("section",{"data-testid":"test-explorer",className:"h-full overflow-auto bg-[#0b0e13] p-3","aria-label":n("workbench.tests.explorer","Test explorer"),children:[t.jsx("h2",{className:"mb-1 text-xs font-semibold text-content",children:n("workbench.view.tests","Tests")}),t.jsx("p",{className:"mb-3 text-[11px] text-content-muted",children:n("workbench.tests.description","Static suites and production coverage")}),t.jsxs("div",{className:"mb-3 grid grid-cols-2 gap-2",children:[t.jsxs("label",{className:"text-[10px] text-content-muted",children:[t.jsx("span",{className:"mb-1 block",children:n("workbench.tests.framework","Framework")}),t.jsxs("select",{value:o,onChange:h=>a(h.target.value),className:"w-full rounded border border-border-subtle bg-surface px-2 py-1 text-[11px] text-content",children:[t.jsx("option",{value:"all",children:n("workbench.tests.all","All")}),p.map(h=>t.jsx("option",{value:h,children:h},h))]})]}),t.jsxs("label",{className:"text-[10px] text-content-muted",children:[t.jsx("span",{className:"mb-1 block",children:n("workbench.tests.status","Status")}),t.jsxs("select",{value:c,onChange:h=>i(h.target.value),className:"w-full rounded border border-border-subtle bg-surface px-2 py-1 text-[11px] text-content",children:[t.jsx("option",{value:"all",children:n("workbench.tests.all","All")}),t.jsx("option",{value:"enabled",children:n("workbench.tests.enabled","Enabled")}),t.jsx("option",{value:"disabled",children:n("workbench.tests.disabled","Disabled")})]})]})]}),d.length===0?t.jsx("p",{className:"text-xs text-content-muted",children:n("workbench.tests.empty","No tests discovered")}):d.map(h=>t.jsxs("details",{open:!0,className:"mb-2 rounded-md border border-border-subtle bg-surface/40",children:[t.jsx("summary",{className:"cursor-pointer px-2 py-2 text-xs text-content",children:h.suite.name}),t.jsxs("div",{className:"border-t border-border-subtle p-1",children:[h.cases.map(l=>t.jsx("button",{type:"button",onClick:()=>r(l.id),className:`block w-full rounded px-2 py-1.5 text-left text-[11px] ${s===l.id?"bg-primary-600 text-white":"text-content-secondary hover:bg-surface-hover"}`,children:l.name.split(" > ").at(-1)},l.id)),h.fixtures.length>0?t.jsxs("div",{className:"mt-1 border-t border-border-subtle px-2 py-1.5 text-[10px] text-content-muted",children:[n("workbench.tests.fixtures","Fixtures"),":"," ",h.fixtures.map(l=>l.name).join(", ")]}):null]})]},h.suite.id))]})}function qs({graph:e,children:s}){const{t:r}=w(),n=e.nodes.filter(a=>a.type==="test_case").length,o=new Set(e.edges.filter(a=>a.type==="covers").map(a=>a.target)).size;return t.jsxs("section",{className:"relative h-full","aria-label":r("workbench.tests.canvas","Test coverage canvas"),children:[t.jsxs("div",{className:"absolute right-3 top-3 z-10 flex gap-2 rounded-md border border-border-subtle bg-[#0b0e13] px-2 py-1 font-mono text-[10px] text-content-muted",children:[t.jsxs("span",{children:[n," ",r("workbench.tests.cases","cases")]}),t.jsxs("span",{children:[o," ",r("workbench.tests.targets","targets")]})]}),s]})}const Rs=b.createContext(null);function As(){return F({queryKey:["graph"],queryFn:()=>qt(),select:e=>e.data,refetchInterval:3e4})}const Ms=["graph-errors"];function Is(){return F({queryKey:Ms,queryFn:At,refetchInterval:3e4})}const Ls=["graph-issues"];function Ds(){return F({queryKey:Ls,queryFn:Vt})}const Fs=(e,s)=>{const r=setTimeout(e,s);return()=>clearTimeout(r)};class Os{constructor(s){E(this,"options");E(this,"socket",null);E(this,"cancelReconnect",null);E(this,"disposed",!1);E(this,"shouldReconnect",!0);E(this,"reconnectAttempt",0);this.options=s}connect(){if(this.disposed||!this.shouldReconnect||this.socket)return;let s;try{s=this.options.createSocket()}catch{return}this.socket=s,s.onopen=()=>{var r,n;this.disposed||(this.reconnectAttempt=0,(n=(r=this.options).onConnectedChange)==null||n.call(r,!0))},s.onmessage=r=>{if(this.disposed)return;const n=typeof r.data=="string"?r.data:"";let o;try{o=JSON.parse(n)}catch{return}this.options.onMessage(o)},s.onclose=()=>{var r,n;if(this.socket=null,!this.disposed&&((n=(r=this.options).onConnectedChange)==null||n.call(r,!1),this.shouldReconnect)){const o=this.options.reconnectDelayMs??1e3,a=this.options.maxReconnectDelayMs??3e4,c=Math.min(o*2**this.reconnectAttempt,a);this.reconnectAttempt+=1;const i=this.options.scheduleReconnect??Fs;this.cancelReconnect=i(()=>{this.cancelReconnect=null,this.connect()},c)}},s.onerror=()=>{s.close()}}dispose(){var s,r;this.disposed=!0,this.shouldReconnect=!1,this.cancelReconnect!==null&&(this.cancelReconnect(),this.cancelReconnect=null),this.socket&&(this.socket.close(),this.socket=null),(r=(s=this.options).onConnectedChange)==null||r.call(s,!1)}}async function Ks(e,s){g(e)&&e.type==="graph_updated"?await B(s):g(e)&&e.type==="status_changed"&&ve(e.payload)&&s.setQueryData(Ee,e.payload)}function $s(e){const s={onopen:null,onmessage:null,onclose:null,onerror:null,close:()=>e.close()};return e.onopen=()=>{var r;return(r=s.onopen)==null?void 0:r.call(s)},e.onmessage=r=>{var n;return(n=s.onmessage)==null?void 0:n.call(s,{data:r.data})},e.onclose=()=>{var r;return(r=s.onclose)==null?void 0:r.call(s)},e.onerror=r=>{var n;return(n=s.onerror)==null?void 0:n.call(s,r)},s}function zs(e){return`${e.protocol==="https:"?"wss:":"ws:"}//${e.host}/ws`}function Vs(e={}){const s=e.enabled??!0,r=e.url??zs(window.location),n=Q(),[o,a]=b.useState(!1),c=b.useRef(null),i=b.useRef(null);return b.useEffect(()=>{if(!s)return;const u=()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},d=new Os({createSocket:()=>$s(new WebSocket(r)),onConnectedChange:p=>{a(p);const{setWsStatus:h}=ie();p?(u(),h("connected")):(u(),i.current=setTimeout(()=>{i.current=null,ie().setWsStatus("reconnecting")},600))},onMessage:p=>{Ks(p,n)}});return c.current=d,d.connect(),()=>{u(),d.dispose(),c.current=null}},[r,s,n]),{isConnected:o}}const Us=new Set(["renders","navigates_to","calls_api","handles","calls_service","queries_db","data_flows_to","sends_msg","listens_msg"]),Gs=new Set(["queries_db","db_relation","data_flows_to"]),M="module:workbench/";function ge(e,s){const r=e.edges.filter(o=>s.has(o.type)),n=new Set(r.flatMap(o=>[o.source,o.target]));return{nodes:e.nodes.filter(o=>n.has(o.id)),edges:r}}function Qs(e,s){if(s!=null&&s.startsWith(M)){const o=s.slice(M.length),a=o.slice(0,o.lastIndexOf(":")),c=e.nodes.filter(u=>{const d=Le(u.filePath);return a.includes("/")?d.leaf===a:d.root===a}),i=new Set(c.map(u=>u.id));return{nodes:c,edges:e.edges.filter(u=>i.has(u.source)&&i.has(u.target))}}if(!s||!e.nodes.some(o=>o.id===s))return e;const r=e.edges.filter(o=>o.source===s||o.target===s),n=new Set([s,...r.flatMap(o=>[o.source,o.target])]);return{nodes:e.nodes.filter(o=>n.has(o.id)),edges:r}}function Le(e){const s=e.replaceAll("\\","/").split("/").filter(Boolean);if(s.length<=1)return{root:"project",leaf:"project"};const r=s[0];return(r==="frontend"||r==="backend")&&s[1]==="src"&&s.length>3?{root:r,leaf:`${r}/${s[2]}`}:s.length>2?{root:r,leaf:`${r}/${s[1]}`}:{root:r,leaf:r}}function Bs(e,s){const r=[...new Set(s.map(n=>n.type))];return{id:`${M}${e}:${e.split("/").at(-1)??e}`,type:"module",name:e.replaceAll("/"," / "),filePath:e,line:1,column:1,metadata:{childCount:s.length,childTypes:r,dirPath:e}}}function Ws(e){const s=new Map,r=new Map;for(const i of e.nodes){const{root:u,leaf:d}=Le(i.filePath);r.set(i.id,d),s.set(d,[...s.get(d)??[],i]),s.has(u)||s.set(u,[])}const n=[...s.keys()].sort((i,u)=>i.localeCompare(u)),o=n.map(i=>{const u=e.nodes.filter(d=>{const p=d.filePath.replaceAll("\\","/");return p===i||p.startsWith(`${i}/`)});return Bs(i,u)}),a=[];for(const i of n){if(!i.includes("/"))continue;const u=i.split("/")[0],d=`${M}${u}:${u}`,p=`${M}${i}:${i.split("/").at(-1)??i}`;a.push({id:`${d}--contains--${p}`,source:d,target:p,type:"contains",confidence:"certain",metadata:{reason:"directory"}})}const c=new Set;for(const i of e.edges){const u=r.get(i.source),d=r.get(i.target);if(!u||!d||u===d)continue;const p=`${M}${u}:${u.split("/").at(-1)??u}`,h=`${M}${d}:${d.split("/").at(-1)??d}`,l=`${p}--${i.type}--${h}`;c.has(l)||(c.add(l),a.push({...i,id:l,source:p,target:h}))}return{nodes:o,edges:a}}function Hs(e,s){var r;return s.view==="architecture"&&((r=s.searchQuery)!=null&&r.trim())?e:s.depth==="focus"?Qs(e,s.focusNodeId):s.view==="requests"?ge(e,Us):s.view==="data"?ge(e,Gs):s.view==="tests"?Es(e,s.focusNodeId):s.view==="architecture"&&s.depth==="overview"?Ws(e):e}const we={critical:0,error:1,warning:2,info:3};function Ys(e){return{id:`parser:${e.file}:${e.severity}:${e.message}`,source:"parser",severity:e.severity,type:"parser",message:e.message,locations:[{file:e.file}],relatedNodeIds:[]}}function Zs(e){return{id:`issue:${e.id}`,source:e.source,severity:e.severity,type:e.type,message:e.description,messageKey:e.messageKey,messageParams:e.messageParams,locations:e.locations,relatedNodeIds:e.relatedNodeIds}}function Js(e,s){const r=we[e.severity]-we[s.severity];if(r!==0)return r;const n=e.locations[0],o=s.locations[0],a=((n==null?void 0:n.file)??"").localeCompare((o==null?void 0:o.file)??"");if(a!==0)return a;const c=((n==null?void 0:n.line)??0)-((o==null?void 0:o.line)??0);return c!==0?c:e.id.localeCompare(s.id)}function Xs(e=[],s=[]){return[...e.map(Ys),...s.map(Zs)].sort(Js)}function er(e,s){const r=e.metaKey||e.ctrlKey;if(r&&e.key.toLowerCase()==="k"&&(e.preventDefault(),s.toggleCommandPalette()),r&&["1","2","3","4","5"].includes(e.key)){e.preventDefault();const o=["architecture","requests","data","tests","quality"][Number(e.key)-1];o&&s.setActiveView(o)}}function tr(){const{t:e}=w();return t.jsx("div",{className:"h-full p-5","aria-label":e("workbench.loadingGraph","Building architecture index…"),children:t.jsxs("div",{className:"relative h-full overflow-hidden rounded-md border border-border-subtle bg-[#090b0f]",children:[t.jsx("div",{className:"absolute left-[18%] top-[22%] h-10 w-28 animate-pulse rounded-md border border-border-subtle bg-surface"}),t.jsx("div",{className:"absolute left-[46%] top-[43%] h-10 w-32 animate-pulse rounded-md border border-border-subtle bg-surface"}),t.jsx("div",{className:"absolute bottom-[20%] right-[16%] h-10 w-28 animate-pulse rounded-md border border-border-subtle bg-surface"}),t.jsx("p",{className:"absolute bottom-4 left-4 font-mono text-[10px] text-content-muted",children:e("workbench.loadingGraph","Building architecture index…")})]})})}function sr(){const e=k(f=>f.selectedNodeId),s=k(f=>f.searchQuery),r=k(f=>f.activeView),n=k(f=>f.architectureDepth),o=k(f=>f.isCommandPaletteOpen),a=k(f=>f.isSettingsOpen),c=k(f=>f.isMobileDrawerOpen),i=k(f=>f.selectNode),u=k(f=>f.setSearchQuery),d=k(f=>f.setActiveView),p=k(f=>f.setArchitectureDepth),h=k(f=>f.toggleCommandPalette),l=k(f=>f.toggleSettings),y=k(f=>f.toggleMobileDrawer),m=b.useRef(null),{data:x,isLoading:v,error:S}=As(),{data:R,isLoading:j,error:C}=Is(),{data:N,isLoading:W,error:H}=Ds(),{data:Y}=Pe(),{data:I}=as(),Z=!!Y.lastAnalyzedAt||!!(x!=null&&x.nodes.length),K=b.useMemo(()=>Xs(R,N==null?void 0:N.issues),[R,N==null?void 0:N.issues]);Vs({enabled:!0});const P=b.useMemo(()=>{if(x)return Hs(x,{view:r,depth:r==="architecture"?n:"full",focusNodeId:e,searchQuery:s})},[x,r,n,e,s]),J=b.useMemo(()=>ts(P==null?void 0:P.nodes,s),[P==null?void 0:P.nodes,s]),A=b.useMemo(()=>ss(P,J),[P,J]),X=b.useMemo(()=>(x==null?void 0:x.nodes.find(f=>f.id===e))??null,[x,e]),Fe=b.useMemo(()=>(x==null?void 0:x.edges.filter(f=>f.target===e))??[],[x,e]),Oe=b.useMemo(()=>(x==null?void 0:x.edges.filter(f=>f.source===e))??[],[x,e]);b.useEffect(()=>{const f=L=>er(L,{setActiveView:d,toggleCommandPalette:h});return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[d,h]);const ee=b.useCallback(f=>{m.current=f},[]),Ke=b.useCallback(()=>{var f;(f=m.current)==null||f.fit(void 0,48)},[]),$e=b.useCallback(f=>{var re,ne;i(f);const L=(re=m.current)==null?void 0:re.getElementById(f);L!=null&&L.length&&((ne=m.current)==null||ne.animate({center:{eles:L},zoom:1.35,duration:180}))},[i]),ze=b.useCallback(f=>{f==="focus"&&!e||p(f)},[e,p]),te=b.useCallback(f=>{i(f),p("focus")},[i,p]),z=b.useCallback(f=>{i(f),!f&&n==="focus"&&p("full")},[n,i,p]),se=b.useCallback(f=>{i(f),y(!1)},[i,y]),Ve=t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsx(xs,{view:r,graph:A,depth:n,focusAvailable:!!e,findingCount:K.length,onDepthChange:ze,onFit:Ke}),t.jsx("div",{className:"relative min-h-0 flex-1",children:r==="quality"?t.jsx(ys,{findings:K,isLoading:j||W,detectors:N==null?void 0:N.detectors,parserError:C,issuesError:H,projectRoot:I==null?void 0:I.projectRoot}):v?t.jsx(tr,{}):S?t.jsx(js,{view:r,error:S}):A&&A.nodes.length>0?r==="tests"?t.jsx(qs,{graph:A,children:t.jsx(le,{graph:A,selectedNode:e,onNodeSelect:z,onNodeFocus:te,onCyInit:ee})}):t.jsx(le,{graph:A,selectedNode:e,onNodeSelect:z,onNodeFocus:te,onCyInit:ee}):t.jsx(ks,{view:r,hasSearchQuery:!!s.trim(),isAnalyzed:Z})})]});return t.jsx(cs,{children:t.jsx(je.Provider,{value:m,children:t.jsxs(Rs.Provider,{value:e,children:[t.jsx(os,{graph:x,isOpen:o,onClose:()=>h(!1),onNodeSelect:$e}),t.jsx(is,{open:a,onClose:()=>l(!1)}),t.jsx(ls,{commandBar:t.jsx(Zt,{query:s,onQueryChange:u,onOpenSettings:()=>l(!0)}),viewRail:t.jsx(us,{activeView:r,onViewChange:d,issueCount:K.length}),explorer:r==="quality"?t.jsx(Ss,{findings:K,isLoading:j||W,detectors:N==null?void 0:N.detectors,parserError:C,issuesError:H}):r==="tests"?t.jsx(Ps,{graph:x,selectedNodeId:e,onNodeSelect:se}):t.jsx(hs,{graph:A,view:r,isAnalyzed:Z,selectedNodeId:e,onNodeSelect:se}),main:Ve,inspector:X?t.jsx(es,{node:X,projectRoot:I==null?void 0:I.projectRoot,inEdges:Fe,outEdges:Oe,onClose:()=>z(null),onNodeSelect:i}):void 0,statusBar:t.jsx(gs,{status:Y,nodeCount:(x==null?void 0:x.nodes.length)??0,edgeCount:(x==null?void 0:x.edges.length)??0}),mobileExplorerOpen:c,onCloseMobileExplorer:()=>y(!1)})]})})})}const rr={connected:"已连接",connecting:"连接中",reconnecting:"重连中"},nr={skipToMain:"跳转到主内容"},or={"tab.graph":"图谱","tab.filter":"筛选","tab.issues":"问题","tab.ai":"AI","tab.stats":"统计","tab.dataflow":"数据流","filter.nodeTypes":"节点类型","filter.edgeTypes":"边类型","filter.confidence":"置信度","filter.display":"显示选项","filter.showIsolated":"显示孤立节点","filter.reset":"重置筛选","nodeType.page":"页面","nodeType.component":"组件","nodeType.api_route":"API 路由","nodeType.trpc_procedure":"tRPC 接口","nodeType.tsrpc_service":"TSRPC 服务","nodeType.tsrpc_api":"TSRPC API","nodeType.tsrpc_msg":"WebSocket 消息","nodeType.express_route":"Express 路由","nodeType.handler":"Handler","nodeType.service":"Service","nodeType.db_model":"数据库模型","nodeType.module":"模块","nodeType.test_suite":"测试套件","nodeType.test_case":"测试用例","nodeType.test_fixture":"测试夹具","edgeType.renders":"渲染","edgeType.navigates_to":"跳转","edgeType.calls_api":"调用 API","edgeType.handles":"处理","edgeType.calls_service":"调用 Service","edgeType.queries_db":"查询 DB","edgeType.db_relation":"数据库关系","edgeType.imports":"导入","edgeType.contains":"包含","edgeType.sends_msg":"发送消息","edgeType.listens_msg":"监听消息","edgeType.tests":"包含测试","edgeType.covers":"覆盖","edgeType.uses_fixture":"使用夹具","confidence.certain":"确定","confidence.inferred":"推断","tooltip.in":"条入边","tooltip.out":"条出边","common.loading":"加载中...","common.error":"错误","common.unknownError":"未知错误","app.loadingGraph":"加载图谱中...","app.errorLoadingGraph":"加载图谱失败:","header.refresh":"刷新","header.refreshing":"刷新中...","header.subtitle":"架构可视化","header.searchPlaceholder":"搜索节点...({{shortcut}})","header.searchNodes":"搜索节点","header.refreshGraph":"刷新图谱","header.refreshFailed":"刷新失败:{{status}} {{statusText}}","sidebar.nodes":"节点","sidebar.noNodesFound":"未找到节点","detail.location":"位置","detail.details":"详情","detail.line":"行","detail.upstream":"上游","detail.downstream":"下游","detail.openVSCode":"在 VS Code 中打开","detail.closePanel":"关闭面板","detail.inspectorLabel":"节点检查器","graph.canvasLabel":"图谱可视化画布","issues.deadLink":"死链 API 调用","issues.unusedRoute":"未使用的路由","issues.methodMismatch":"HTTP Method 不匹配","issues.isolated":"孤立节点","issues.deadRoute":"死路由","issues.deadComponent":"未使用组件","issues.deadService":"未使用服务","issues.circularDep":"循环依赖","issues.loading":"加载中...","issues.failedToLoad":"加载问题失败","issues.noIssuesFound":"未发现问题","issues.errors":"个错误","issues.warnings":"个警告","issues.info":"个信息","dataflow.title":"选择一个数据库模型,追踪数据流向","dataflow.noModels":"未找到数据库模型","dataflow.tracing":"正在追踪数据流...","dataflow.routes":"个路由","dataflow.components":"个组件","dataflow.apiRoutes":"API 路由","dataflow.consumingComponents":"消费组件","dataflow.noFlow":"未找到该模型的数据流","stats.nodes":"节点","stats.edges":"边","stats.isolated":"孤立节点","stats.coverage":"连通率","stats.loading":"加载中...","stats.failedToLoad":"加载统计失败","stats.overview":"概览","ai.assistant":"AI 助手","ai.askAboutArchitecture":"询问项目架构相关问题","ai.thinking":"思考中...","ai.placeholder":"询问你的架构...","ai.send":"发送","ai.noResponse":"无响应","ai.serviceUnavailable":"AI 服务不可用。连接 AI 提供商以启用此功能。","commandPalette.placeholder":"搜索节点...","commandPalette.noResults":"未找到结果","commandPalette.navigate":"导航","commandPalette.select":"选择","commandPalette.close":"关闭","commandPalette.esc":"ESC","ai.notConfigured":"未配置 AI","ai.configure":"配置","ai.saveConfig":"保存配置","freshness.fresh":"已是最新","freshness.analyzing":"分析中…","freshness.stale":"待刷新","freshness.pending":"{{count}} 个待处理变更","freshness.lastAnalyzed":"上次分析 {{time}}","freshness.never":"尚未分析","tab.trace":"链路","trace.title":"在图谱上选中一个节点,即可追踪它的完整上游→下游链路。","trace.selectNode":"请选择一个节点开始追踪","trace.run":"追踪链路","trace.running":"追踪中…","trace.replay":"重放","trace.stop":"停止","trace.noPath":"该节点没有可追踪的链路。","trace.station":"第 {{n}} 站","trace.totalStations":"共 {{count}} 站","trace.layer.frontend":"前端","trace.layer.api":"接口","trace.layer.logic":"逻辑","trace.layer.data":"数据","trace.layer.other":"其他","trace.colNode":"节点","trace.colVia":"经由","trace.colExplain":"说明","trace.explaining":"生成说明中…","settings.title":"设置","settings.open":"打开设置","settings.close":"关闭设置","settings.group.ai":"AI 助手","settings.group.project":"项目","settings.group.display":"显示","settings.group.about":"关于","settings.ai.save":"保存","settings.ai.clear":"清除","settings.ai.current":"当前模型","settings.project.placeholder":"项目根目录的绝对路径","settings.project.switch":"切换项目","settings.project.switching":"切换中…","settings.project.switched":"已切换到","settings.project.failed":"切换项目失败","settings.project.absoluteRequired":"请输入项目的绝对路径","settings.display.language":"语言","promo.primary.title":"⭐ 在 GitHub 上 Star CodeOmniVis","promo.primary.desc":"如果这个工具帮到了你,一个 star 能让它走得更远。","promo.primary.cta":"打开仓库","promo.secondary.title":"🐛 反馈问题 / 提交需求","promo.secondary.desc":"发现 bug 或有想法?告诉我们。","promo.secondary.cta":"打开 issues","promo.tertiary.title":"📖 阅读文档","promo.tertiary.desc":"安装、使用与架构概览。","promo.tertiary.cta":"查看 README","about.licenseSummary":"采用 PolyForm Noncommercial 1.0.0 许可 —— 仅限非商业用途免费使用,商业使用需另行授权。","settings.ai.invalidUrl":"Base URL 无效或被安全策略拒绝(仅允许 https 公网地址或本地环回地址)","settings.ai.rememberKey":"在本设备记住密钥(否则仅在本标签页有效)","nodeType.kotlin_class":"Kotlin 类","nodeType.kotlin_interface":"Kotlin 接口","nodeType.kotlin_object":"Kotlin 对象","nodeType.kotlin_function":"Kotlin 函数","nodeType.kotlin_route":"Kotlin 路由","legend.title":"图例","legend.expand":"展开图例","legend.collapse":"折叠图例","legend.empty":"暂无节点类型","group.graph":"图谱","group.analysis":"分析","group.issues":"问题","group.intelligence":"智能","panel.close":"关闭面板",ws:rr,"menu.open":"打开菜单","menu.close":"关闭菜单","drawer.close":"关闭抽屉","sidebar.expand":"展开侧边栏","sidebar.collapse":"收起侧边栏",a11y:nr,"edgeType.kotlin_inherits":"继承","edgeType.kotlin_implements":"实现","edgeType.kotlin_uses":"使用","edgeType.data_flows_to":"数据流向","legend.nodes":"节点","legend.edges":"关系","workbench.workspace":"工作区","workbench.localProject":"本地项目","workbench.workspaceViews":"工作区视图","workbench.closeExplorer":"关闭资源浏览器","workbench.explorer":"资源浏览器","workbench.latestAnalysis":"最近一次分析","workbench.view.architecture":"架构","workbench.view.requests":"请求","workbench.view.requestFlow":"请求流","workbench.view.data":"数据模型","workbench.view.quality":"质量","workbench.view.tests":"测试","workbench.description.tests":"查看测试套件、夹具与静态生产代码覆盖关系","workbench.description.testsShort":"测试套件与生产代码覆盖","workbench.tests.explorer":"测试浏览器","workbench.tests.description":"静态测试结构与生产代码覆盖关系","workbench.tests.empty":"尚未发现测试","workbench.tests.canvas":"测试覆盖画布","workbench.tests.cases":"用例","workbench.tests.targets":"目标","workbench.tests.framework":"框架","workbench.tests.status":"状态","workbench.tests.all":"全部","workbench.tests.enabled":"启用","workbench.tests.disabled":"禁用","workbench.tests.fixtures":"夹具","workbench.empty.tests.title":"尚未发现测试","workbench.empty.tests.description":"添加受支持的 TypeScript 或 Kotlin 测试后重新分析。","workbench.empty.tests.explorer":"最近一次分析中没有测试节点。","workbench.error.tests":"无法加载测试视图","workbench.description.architecture":"浏览系统边界与实现层级","workbench.description.architectureShort":"系统结构与模块归属","workbench.description.requests":"沿运行时路径追踪界面、接口与持久层","workbench.description.requestsShort":"从界面到 API 再到数据层","workbench.description.data":"检查查询、归属与数据结构关系","workbench.description.dataShort":"查询与数据结构关系","workbench.description.quality":"检查解析输出与确定性的项目风险","workbench.description.qualityShort":"解析输出与确定性风险","workbench.depth.label":"架构详情层级","workbench.depth.overview":"概览","workbench.depth.full":"完整图谱","workbench.depth.focus":"聚焦","workbench.depth.focusHint":"选择节点后进入聚焦模式","workbench.fitView":"适配视图","workbench.count.nodes":"{{count}} 个节点","workbench.count.edges":"{{count}} 条关系","workbench.count.findings":"{{count}} 个问题","workbench.shortcut.search":"⌘K 搜索","workbench.shortcut.navigate":"↑↓ 导航","workbench.loadingGraph":"正在构建架构索引…","workbench.graphLoadError":"无法加载架构图谱。","workbench.error.architecture":"无法加载架构图谱","workbench.error.requests":"无法加载请求流","workbench.error.data":"无法加载数据模型","workbench.empty.architecture.title":"未检测到架构节点","workbench.empty.notAnalyzed.title":"项目尚未分析","workbench.empty.notAnalyzed.description":"请先运行一次分析,以生成架构节点和关系。","workbench.empty.notAnalyzed.explorer":"请先运行一次分析以填充工作区。","workbench.empty.architecture.description":"请重新分析,或打开完整图谱查看所有已解析的实现节点。","workbench.empty.architecture.explorer":"未检测到架构节点。请打开完整图谱或重新分析。","workbench.empty.requests.title":"未检测到请求路径","workbench.empty.requests.description":"发现渲染、API 调用、Handler、Service 或查询关系后,这里将显示请求流。","workbench.empty.requests.explorer":"最近一次分析未检测到请求节点。","workbench.empty.data.title":"未检测到数据关系","workbench.empty.data.description":"当前分析未发现 Prisma、TypeORM 或数据库查询关系。","workbench.empty.data.explorer":"最近一次分析未检测到数据节点。","workbench.empty.search.title":"没有节点符合当前搜索","workbench.empty.search.description":"请清除搜索,或使用更宽泛的文件名、符号名或节点类型。","workbench.quality.loading":"正在加载质量问题","workbench.quality.loadError":"无法加载质量问题。","workbench.quality.unavailable":"质量数据暂不可用","workbench.quality.none":"未发现质量问题","workbench.quality.noneDescription":"最近一次分析未报告确定性的解析问题或项目风险。","workbench.quality.output":"最近一次分析产生的确定性解析输出与项目风险。","workbench.quality.note":"这里汇总最近一次分析产生的确定性解析输出与项目风险。","workbench.quality.noLatest":"最近一次分析未发现质量问题。","workbench.quality.partial":"质量结果不完整","workbench.quality.partialDescription":"部分质量来源暂不可用。当前显示的问题仍然有效,但不能视为完整的健康结论。","workbench.quality.unavailableDescription":"无法加载解析输出与项目风险。","workbench.quality.severitySection":"严重级别","workbench.quality.sourcesSection":"来源","workbench.quality.openLocation":"在 VS Code 中打开 {{location}}","workbench.severity.critical":"严重","workbench.severity.error":"错误","workbench.severity.warning":"警告","workbench.severity.info":"信息","workbench.source.parser":"解析器","workbench.source.consistency":"一致性","workbench.source.security":"安全","workbench.source.performance":"性能","workbench.source.framework":"框架","workbench.detector.consistency":"一致性检测器","workbench.detector.auth":"鉴权检测器","workbench.detector.n_plus_one":"N+1 检测器","workbench.detector.rsc":"RSC 检测器","workbench.issueType.parser":"解析问题","workbench.issueType.dead_api_call":"失效的 API 调用","workbench.issueType.unused_route":"未使用路由","workbench.issueType.method_mismatch":"请求方法不匹配","workbench.issueType.missing_procedure":"缺失的 Procedure","workbench.issueType.param_mismatch":"参数不匹配","workbench.issueType.dead_route":"无调用方路由","workbench.issueType.dead_component":"未使用组件","workbench.issueType.dead_service":"未使用服务","workbench.issueType.circular_dependency":"循环依赖","workbench.issueType.n_plus_one_query":"N+1 查询","workbench.issueType.unguarded_route":"未鉴权路由","workbench.issueType.rsc_boundary_violation":"RSC 边界违规","workbench.issueMessage.dead_api_call":"API 调用指向不存在的节点:{{target}}","workbench.issueMessage.unused_route":"路由可能未被使用:{{name}}","workbench.issueMessage.orphan_node":"节点没有任何连接:{{name}}","workbench.issueMessage.method_mismatch":"HTTP 方法不匹配:{{source}} 使用 {{method}} 调用 {{target}},但该路由仅支持 {{supported}}","workbench.issueMessage.missing_procedure":"未找到 tRPC Procedure:{{procedure}}(调用方:{{source}})","workbench.issueMessage.param_mismatch":"路由参数不匹配","workbench.issueMessage.dead_route":"路由没有调用方:{{name}}","workbench.issueMessage.dead_component":"组件未被任何父级渲染:{{name}}","workbench.issueMessage.dead_service":"服务没有调用方:{{name}}","workbench.issueMessage.circular_dependency":"检测到循环依赖:{{cycle}}","workbench.issueMessage.n_plus_one_query":"检测到 N+1 查询:在 {{loopType}} 循环中调用 prisma.{{model}}.{{operation}}()","workbench.issueMessage.unguarded_route":"API 路由“{{route}}”缺少身份验证保护","workbench.issueMessage.rsc_boundary_violation":"服务端组件“{{component}}”从“{{importPath}}”导入了客户端组件","settings.subtitle":"工作区偏好设置"},ar={connected:"Connected",connecting:"Connecting",reconnecting:"Reconnecting"},ir={skipToMain:"Skip to main content"},cr={"tab.graph":"Graph","tab.filter":"Filter","tab.issues":"Issues","tab.ai":"AI","tab.stats":"Stats","tab.dataflow":"Data Flow","filter.nodeTypes":"Node Types","filter.edgeTypes":"Edge Types","filter.confidence":"Confidence","filter.display":"Display","filter.showIsolated":"Show Isolated Nodes","filter.reset":"Reset Filters","nodeType.page":"Page","nodeType.component":"Component","nodeType.api_route":"API Route","nodeType.trpc_procedure":"tRPC Procedure","nodeType.tsrpc_service":"TSRPC Service","nodeType.tsrpc_api":"TSRPC API","nodeType.tsrpc_msg":"WebSocket Message","nodeType.express_route":"Express Route","nodeType.handler":"Handler","nodeType.service":"Service","nodeType.db_model":"DB Model","nodeType.module":"Module","nodeType.test_suite":"Test suite","nodeType.test_case":"Test case","nodeType.test_fixture":"Test fixture","edgeType.renders":"Renders","edgeType.navigates_to":"Navigates To","edgeType.calls_api":"Calls API","edgeType.handles":"Handles","edgeType.calls_service":"Calls Service","edgeType.queries_db":"Queries DB","edgeType.db_relation":"DB Relation","edgeType.imports":"Imports","edgeType.contains":"Contains","edgeType.sends_msg":"Sends Message","edgeType.listens_msg":"Listens Message","edgeType.tests":"Contains Test","edgeType.covers":"Covers","edgeType.uses_fixture":"Uses Fixture","confidence.certain":"Certain","confidence.inferred":"Inferred","tooltip.in":"in","tooltip.out":"out","common.loading":"Loading...","common.error":"Error","common.unknownError":"Unknown error","app.loadingGraph":"Loading graph...","app.errorLoadingGraph":"Error loading graph:","header.refresh":"Refresh","header.refreshing":"Refreshing...","header.subtitle":"Architecture Visualizer","header.searchPlaceholder":"Search nodes... ({{shortcut}})","header.searchNodes":"Search nodes","header.refreshGraph":"Refresh graph","header.refreshFailed":"Refresh failed: {{status}} {{statusText}}","sidebar.nodes":"Nodes","sidebar.noNodesFound":"No nodes found","detail.location":"Location","detail.details":"Details","detail.line":"Line","detail.upstream":"Upstream","detail.downstream":"Downstream","detail.openVSCode":"Open in VS Code","detail.closePanel":"Close panel","detail.inspectorLabel":"Node inspector","graph.canvasLabel":"Graph visualization canvas","issues.deadLink":"Dead API Call","issues.unusedRoute":"Unused Route","issues.methodMismatch":"HTTP Method Mismatch","issues.isolated":"Isolated Node","issues.deadRoute":"Dead Route","issues.deadComponent":"Unused Component","issues.deadService":"Unused Service","issues.circularDep":"Circular Dependency","issues.loading":"Loading...","issues.failedToLoad":"Failed to load issues","issues.noIssuesFound":"No issues found","issues.errors":"errors","issues.warnings":"warnings","issues.info":"info","dataflow.title":"Select a database model to trace its data flow","dataflow.noModels":"No database models found","dataflow.tracing":"Tracing data flow...","dataflow.routes":"routes","dataflow.components":"components","dataflow.apiRoutes":"API Routes","dataflow.consumingComponents":"Consuming Components","dataflow.noFlow":"No data flow found for this model","stats.nodes":"Nodes","stats.edges":"Edges","stats.isolated":"Isolated","stats.coverage":"Coverage","stats.loading":"Loading...","stats.failedToLoad":"Failed to load stats","stats.overview":"Overview","ai.assistant":"AI Assistant","ai.askAboutArchitecture":"Ask questions about your project architecture","ai.thinking":"Thinking...","ai.placeholder":"Ask about your architecture...","ai.send":"Send","ai.noResponse":"No response","ai.serviceUnavailable":"AI service not available. Connect an AI provider to enable this feature.","commandPalette.placeholder":"Search nodes...","commandPalette.noResults":"No results found","commandPalette.navigate":"Navigate","commandPalette.select":"Select","commandPalette.close":"Close","commandPalette.esc":"ESC","ai.notConfigured":"AI not configured","ai.configure":"Configure","ai.saveConfig":"Save","freshness.fresh":"Up to date","freshness.analyzing":"Analyzing…","freshness.stale":"Out of date","freshness.pending":"{{count}} pending change(s)","freshness.lastAnalyzed":"Last analyzed {{time}}","freshness.never":"Not analyzed yet","tab.trace":"Trace","trace.title":"Pick a node on the graph, then trace its full upstream→downstream link.","trace.selectNode":"Select a node to start tracing","trace.run":"Trace link","trace.running":"Tracing…","trace.replay":"Replay","trace.stop":"Stop","trace.noPath":"No traceable link from this node.","trace.station":"Station {{n}}","trace.totalStations":"{{count}} stations","trace.layer.frontend":"Frontend","trace.layer.api":"API","trace.layer.logic":"Logic","trace.layer.data":"Data","trace.layer.other":"Other","trace.colNode":"Node","trace.colVia":"Via","trace.colExplain":"Explanation","trace.explaining":"Explaining…","settings.title":"Settings","settings.open":"Open settings","settings.close":"Close settings","settings.group.ai":"AI Assistant","settings.group.project":"Project","settings.group.display":"Display","settings.group.about":"About","settings.ai.save":"Save","settings.ai.clear":"Clear","settings.ai.current":"Current model","settings.project.placeholder":"Absolute path to project root","settings.project.switch":"Switch project","settings.project.switching":"Switching…","settings.project.switched":"Switched to","settings.project.failed":"Failed to switch project","settings.project.absoluteRequired":"Enter an absolute project path","settings.display.language":"Language","promo.primary.title":"⭐ Star CodeOmniVis on GitHub","promo.primary.desc":"If this tool helps you, a star keeps it growing.","promo.primary.cta":"Open repository","promo.secondary.title":"🐛 Report an issue / request a feature","promo.secondary.desc":"Found a bug or have an idea? Let us know.","promo.secondary.cta":"Open issues","promo.tertiary.title":"📖 Read the docs","promo.tertiary.desc":"Setup, usage and architecture overview.","promo.tertiary.cta":"View README","about.licenseSummary":"Licensed under PolyForm Noncommercial 1.0.0 — free for non-commercial use only. Commercial use requires a separate license.","settings.ai.invalidUrl":"Base URL is invalid or blocked by the security policy (only https public hosts or local loopback are allowed)","settings.ai.rememberKey":"Remember key on this device (otherwise kept only for this tab)","nodeType.kotlin_class":"Kotlin Class","nodeType.kotlin_interface":"Kotlin Interface","nodeType.kotlin_object":"Kotlin Object","nodeType.kotlin_function":"Kotlin Function","nodeType.kotlin_route":"Kotlin Route","legend.title":"Legend","legend.expand":"Expand legend","legend.collapse":"Collapse legend","legend.empty":"No node types to show","group.graph":"Graph","group.analysis":"Analysis","group.issues":"Issues","group.intelligence":"Insights","panel.close":"Close panel",ws:ar,"menu.open":"Open menu","menu.close":"Close menu","drawer.close":"Close drawer","sidebar.expand":"Expand sidebar","sidebar.collapse":"Collapse sidebar",a11y:ir,"edgeType.kotlin_inherits":"Inherits","edgeType.kotlin_implements":"Implements","edgeType.kotlin_uses":"Uses","edgeType.data_flows_to":"Data Flows To","legend.nodes":"Nodes","legend.edges":"Edges","workbench.workspace":"Workspace","workbench.localProject":"Local project","workbench.workspaceViews":"Workspace views","workbench.closeExplorer":"Close explorer","workbench.explorer":"Explorer","workbench.latestAnalysis":"Latest analysis","workbench.view.architecture":"Architecture","workbench.view.requests":"Requests","workbench.view.requestFlow":"Request flow","workbench.view.data":"Data model","workbench.view.quality":"Quality","workbench.view.tests":"Tests","workbench.description.tests":"Explore suites, fixtures, and static production coverage","workbench.description.testsShort":"Suites and production coverage","workbench.tests.explorer":"Test explorer","workbench.tests.description":"Static suites and production coverage","workbench.tests.empty":"No tests discovered","workbench.tests.canvas":"Test coverage canvas","workbench.tests.cases":"cases","workbench.tests.targets":"targets","workbench.tests.framework":"Framework","workbench.tests.status":"Status","workbench.tests.all":"All","workbench.tests.enabled":"Enabled","workbench.tests.disabled":"Disabled","workbench.tests.fixtures":"Fixtures","workbench.empty.tests.title":"No tests discovered","workbench.empty.tests.description":"Add supported TypeScript or Kotlin tests and run analysis again.","workbench.empty.tests.explorer":"No test nodes detected in the latest analysis.","workbench.error.tests":"Unable to load the test view","workbench.description.architecture":"Explore system boundaries and implementation layers","workbench.description.architectureShort":"System shape and ownership","workbench.description.requests":"Follow runtime paths from interface to persistence","workbench.description.requestsShort":"UI to API to data","workbench.description.data":"Inspect queries, ownership, and schema relations","workbench.description.dataShort":"Queries and schema relations","workbench.description.quality":"Review parser output and deterministic project risks","workbench.description.qualityShort":"Parser output and deterministic risks","workbench.depth.label":"Architecture detail level","workbench.depth.overview":"Overview","workbench.depth.full":"Full graph","workbench.depth.focus":"Focus","workbench.depth.focusHint":"Select a node to enter focus mode","workbench.fitView":"Fit view","workbench.count.nodes":"{{count}} nodes","workbench.count.edges":"{{count}} edges","workbench.count.findings":"{{count}} findings","workbench.shortcut.search":"⌘K search","workbench.shortcut.navigate":"↑↓ navigate","workbench.loadingGraph":"Building architecture index…","workbench.graphLoadError":"Unable to load the architecture graph.","workbench.error.architecture":"Unable to load the architecture graph","workbench.error.requests":"Unable to load request flow","workbench.error.data":"Unable to load the data model","workbench.empty.architecture.title":"No architecture nodes detected","workbench.empty.notAnalyzed.title":"Project not analyzed yet","workbench.empty.notAnalyzed.description":"Run the first analysis to populate this workspace with architecture nodes and relationships.","workbench.empty.notAnalyzed.explorer":"Run the first analysis to populate this workspace.","workbench.empty.architecture.description":"Run analysis again or open Full graph to inspect every parsed implementation node.","workbench.empty.architecture.explorer":"No architecture nodes detected. Open Full graph or run analysis again.","workbench.empty.requests.title":"No request paths detected","workbench.empty.requests.description":"Request flow appears after render, API call, handler, service, or query relationships are found.","workbench.empty.requests.explorer":"No request nodes detected in the latest analysis.","workbench.empty.data.title":"No data relationships detected","workbench.empty.data.description":"This project has no parsed Prisma, TypeORM, or query relationships in the current analysis.","workbench.empty.data.explorer":"No data nodes detected in the latest analysis.","workbench.empty.search.title":"No nodes match this search","workbench.empty.search.description":"Clear the search or use a broader file, symbol, or node-type query.","workbench.quality.loading":"Loading quality findings","workbench.quality.loadError":"Unable to load quality findings.","workbench.quality.unavailable":"Quality data unavailable","workbench.quality.none":"No quality findings","workbench.quality.noneDescription":"No deterministic parser or project risks were reported by the latest analysis.","workbench.quality.output":"Deterministic parser output and project risks from the latest analysis.","workbench.quality.note":"Findings are deterministic parser output and project risks from the latest analysis.","workbench.quality.noLatest":"No quality findings in the latest analysis.","workbench.quality.partial":"Partial quality results","workbench.quality.partialDescription":"Some quality sources were unavailable. Visible findings remain valid, but this is not a complete health result.","workbench.quality.unavailableDescription":"Parser output and project risks could not be loaded.","workbench.quality.severitySection":"Severity","workbench.quality.sourcesSection":"Sources","workbench.quality.openLocation":"Open {{location}} in VS Code","workbench.severity.critical":"critical","workbench.severity.error":"error","workbench.severity.warning":"warning","workbench.severity.info":"info","workbench.source.parser":"Parser","workbench.source.consistency":"Consistency","workbench.source.security":"Security","workbench.source.performance":"Performance","workbench.source.framework":"Framework","workbench.detector.consistency":"Consistency detector","workbench.detector.auth":"Auth detector","workbench.detector.n_plus_one":"N+1 detector","workbench.detector.rsc":"RSC detector","workbench.issueType.parser":"Parser","workbench.issueType.dead_api_call":"Dead API call","workbench.issueType.unused_route":"Unused route","workbench.issueType.method_mismatch":"Method mismatch","workbench.issueType.missing_procedure":"Missing procedure","workbench.issueType.param_mismatch":"Parameter mismatch","workbench.issueType.dead_route":"Dead route","workbench.issueType.dead_component":"Dead component","workbench.issueType.dead_service":"Dead service","workbench.issueType.circular_dependency":"Circular dependency","workbench.issueType.n_plus_one_query":"N+1 query","workbench.issueType.unguarded_route":"Unguarded route","workbench.issueType.rsc_boundary_violation":"RSC boundary violation","workbench.issueMessage.dead_api_call":"API call points to non-existent node: {{target}}","workbench.issueMessage.unused_route":"Route appears to be unused: {{name}}","workbench.issueMessage.orphan_node":"Node has no connections: {{name}}","workbench.issueMessage.method_mismatch":"HTTP method mismatch: {{source}} calls {{target}} with {{method}}, but the route only supports {{supported}}","workbench.issueMessage.missing_procedure":"tRPC procedure not found: {{procedure}} (called from {{source}})","workbench.issueMessage.param_mismatch":"Route parameters do not match","workbench.issueMessage.dead_route":"Route has no callers: {{name}}","workbench.issueMessage.dead_component":"Component is not rendered by any parent: {{name}}","workbench.issueMessage.dead_service":"Service has no callers: {{name}}","workbench.issueMessage.circular_dependency":"Circular dependency detected: {{cycle}}","workbench.issueMessage.n_plus_one_query":"N+1 query: prisma.{{model}}.{{operation}}() inside a {{loopType}} loop","workbench.issueMessage.unguarded_route":"API route “{{route}}” has no authentication guard","workbench.issueMessage.rsc_boundary_violation":"Server Component “{{component}}” imports a Client Component from “{{importPath}}”","settings.subtitle":"Workspace preferences"};Je.use(Qe).init({resources:{"zh-CN":{translation:or},"en-US":{translation:cr}},lng:_t(),fallbackLng:"en-US",interpolation:{escapeValue:!1}});const lr=new He({defaultOptions:{queries:{staleTime:5*1e3,retry:1}}}),De=document.getElementById("root");if(!De)throw new Error("Root element #root not found");Be.createRoot(De).render(t.jsx(We.StrictMode,{children:t.jsx(Ye,{client:lr,children:t.jsx(sr,{})})}));
|