diff --git a/frontend/dist/assets/index-bw6S4bF_.css b/frontend/dist/assets/index-BA8F-FbW.css similarity index 88% rename from frontend/dist/assets/index-bw6S4bF_.css rename to frontend/dist/assets/index-BA8F-FbW.css index 6ad7347..225a1ba 100644 --- a/frontend/dist/assets/index-bw6S4bF_.css +++ b/frontend/dist/assets/index-BA8F-FbW.css @@ -1 +1 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-none{fill:none}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.stroke-amber-500{stroke:var(--color-amber-500)}.stroke-muted{stroke:hsl(var(--muted))}.stroke-primary{stroke:hsl(var(--primary))}.stroke-red-500{stroke:var(--color-red-500)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.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,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/20{--tw-shadow-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.blur-\[130px\]{--tw-blur:blur(130px);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,)}.blur-\[140px\]{--tw-blur:blur(140px);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,)}.blur-\[160px\]{--tw-blur:blur(160px);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,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);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,)}.grayscale{--tw-grayscale:grayscale(100%);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,)}.invert{--tw-invert:invert(100%);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,)}.sepia{--tw-sepia:sepia(100%);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,)}.\!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,)!important}.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{--tw-backdrop-blur:blur(8px);-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,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-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,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-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,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-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,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-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,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-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,)}.backdrop-filter{-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{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-none{fill:none}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.stroke-amber-500{stroke:var(--color-amber-500)}.stroke-muted{stroke:hsl(var(--muted))}.stroke-primary{stroke:hsl(var(--primary))}.stroke-red-500{stroke:var(--color-red-500)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.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,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/20{--tw-shadow-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.blur-\[130px\]{--tw-blur:blur(130px);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,)}.blur-\[140px\]{--tw-blur:blur(140px);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,)}.blur-\[160px\]{--tw-blur:blur(160px);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,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);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,)}.grayscale{--tw-grayscale:grayscale(100%);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,)}.invert{--tw-invert:invert(100%);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,)}.sepia{--tw-sepia:sepia(100%);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,)}.\!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,)!important}.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{--tw-backdrop-blur:blur(8px);-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,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-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,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-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,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-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,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-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,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-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,)}.backdrop-filter{-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{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-Bb8BpQr4.js b/frontend/dist/assets/index-Bb8BpQr4.js deleted file mode 100644 index 3178397..0000000 --- a/frontend/dist/assets/index-Bb8BpQr4.js +++ /dev/null @@ -1,397 +0,0 @@ -var dp=s=>{throw TypeError(s)};var yd=(s,o,a)=>o.has(s)||dp("Cannot "+a);var N=(s,o,a)=>(yd(s,o,"read from private field"),a?a.call(s):o.get(s)),ye=(s,o,a)=>o.has(s)?dp("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,a),re=(s,o,a,d)=>(yd(s,o,"write to private field"),d?d.call(s,a):o.set(s,a),a),Ee=(s,o,a)=>(yd(s,o,"access private method"),a);var aa=(s,o,a,d)=>({set _(u){re(s,o,u,a)},get _(){return N(s,o,d)}});function jg(s,o){for(var a=0;ad[u]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))d(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&d(h)}).observe(document,{childList:!0,subtree:!0});function a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function d(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function fm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var bd={exports:{}},Mo={},wd={exports:{}},Ce={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var cp;function kg(){if(cp)return Ce;cp=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.iterator;function M(E){return E===null||typeof E!="object"?null:(E=j&&E[j]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,S={};function b(E,C,K){this.props=E,this.context=C,this.refs=S,this.updater=K||R}b.prototype.isReactComponent={},b.prototype.setState=function(E,C){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,C,"setState")},b.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function P(){}P.prototype=b.prototype;function O(E,C,K){this.props=E,this.context=C,this.refs=S,this.updater=K||R}var H=O.prototype=new P;H.constructor=O,F(H,b.prototype),H.isPureReactComponent=!0;var z=Array.isArray,$=Object.prototype.hasOwnProperty,I={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function ne(E,C,K){var J,q={},ae=null,me=null;if(C!=null)for(J in C.ref!==void 0&&(me=C.ref),C.key!==void 0&&(ae=""+C.key),C)$.call(C,J)&&!B.hasOwnProperty(J)&&(q[J]=C[J]);var je=arguments.length-2;if(je===1)q.children=K;else if(1>>1,C=Z[E];if(0>>1;Eu(q,X))aeu(me,q)?(Z[E]=me,Z[ae]=X,E=ae):(Z[E]=q,Z[J]=X,E=J);else if(aeu(me,X))Z[E]=me,Z[ae]=X,E=ae;else break e}}return se}function u(Z,se){var X=Z.sortIndex-se.sortIndex;return X!==0?X:Z.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();s.unstable_now=function(){return h.now()-p}}var v=[],x=[],w=1,j=null,M=3,R=!1,F=!1,S=!1,b=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function H(Z){for(var se=a(x);se!==null;){if(se.callback===null)d(x);else if(se.startTime<=Z)d(x),se.sortIndex=se.expirationTime,o(v,se);else break;se=a(x)}}function z(Z){if(S=!1,H(Z),!F)if(a(v)!==null)F=!0,Pe($);else{var se=a(x);se!==null&&Me(z,se.startTime-Z)}}function $(Z,se){F=!1,S&&(S=!1,P(ne),ne=-1),R=!0;var X=M;try{for(H(se),j=a(v);j!==null&&(!(j.expirationTime>se)||Z&&!fe());){var E=j.callback;if(typeof E=="function"){j.callback=null,M=j.priorityLevel;var C=E(j.expirationTime<=se);se=s.unstable_now(),typeof C=="function"?j.callback=C:j===a(v)&&d(v),H(se)}else d(v);j=a(v)}if(j!==null)var K=!0;else{var J=a(x);J!==null&&Me(z,J.startTime-se),K=!1}return K}finally{j=null,M=X,R=!1}}var I=!1,B=null,ne=-1,le=5,pe=-1;function fe(){return!(s.unstable_now()-peZ||125E?(Z.sortIndex=X,o(x,Z),a(v)===null&&Z===a(x)&&(S?(P(ne),ne=-1):S=!0,Me(z,X-E))):(Z.sortIndex=C,o(v,Z),F||R||(F=!0,Pe($))),Z},s.unstable_shouldYield=fe,s.unstable_wrapCallback=function(Z){var se=M;return function(){var X=M;M=se;try{return Z.apply(this,arguments)}finally{M=X}}}})(Nd)),Nd}var hp;function Eg(){return hp||(hp=1,kd.exports=Cg()),kd.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var xp;function _g(){if(xp)return wt;xp=1;var s=cc(),o=Eg();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},j={};function M(e){return v.call(j,e)?!0:v.call(w,e)?!1:x.test(e)?j[e]=!0:(w[e]=!0,!1)}function R(e,t,n,l){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,t,n,l){if(t===null||typeof t>"u"||R(e,t,n,l))return!0;if(l)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function S(e,t,n,l,i,c,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=m}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(P,O);b[t]=new S(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(P,O);b[t]=new S(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(P,O);b[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function H(e,t,n,l){var i=b.hasOwnProperty(t)?b[t]:null;(i!==null?i.type!==0:l||!(2y||i[m]!==c[y]){var k=` -`+i[m].replace(" at new "," at ");return e.displayName&&k.includes("")&&(k=k.replace("",e.displayName)),k}while(1<=m&&0<=y);break}}}finally{K=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?C(e):""}function q(e){switch(e.tag){case 5:return C(e.type);case 16:return C("Lazy");case 13:return C("Suspense");case 19:return C("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function ae(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case I:return"Portal";case le:return"Profiler";case ne:return"StrictMode";case Te:return"Suspense";case Se:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fe:return(e.displayName||"Context")+".Consumer";case pe:return(e._context.displayName||"Context")+".Provider";case ue:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ze:return t=e.displayName||null,t!==null?t:ae(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}function me(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(t);case 8:return t===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function je(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xe(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){l=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ct(e){e._valueTracker||(e._valueTracker=xe(e))}function Jo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=U(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function zn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $s(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ln(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=je(t.value!=null?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fn(e,t){t=t.checked,t!=null&&H(e,"checked",t,!1)}function In(e,t){Fn(e,t);var n=je(t.value),l=t.type;if(n!=null)l==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$n(e,t.type,n):t.hasOwnProperty("defaultValue")&&$n(e,t.type,je(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Us(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $n(e,t,n){(t!=="number"||zn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bt=Array.isArray;function cr(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=we.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var At={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vs=["Webkit","ms","Moz","O"];Object.keys(At).forEach(function(e){Vs.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),At[t]=At[e]})});function Bn(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||At.hasOwnProperty(e)&&At[e]?(""+t).trim():t+"px"}function Xo(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,i=Bn(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,i):e[n]=i}}var Eh=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ra(e,t){if(t){if(Eh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function Oa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Da=null;function Aa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ta=null,Hn=null,Gn=null;function Sc(e){if(e=mo(e)){if(typeof Ta!="function")throw Error(a(280));var t=e.stateNode;t&&(t=jl(t),Ta(e.stateNode,e.type,t))}}function Cc(e){Hn?Gn?Gn.push(e):Gn=[e]:Hn=e}function Ec(){if(Hn){var e=Hn,t=Gn;if(Gn=Hn=null,Sc(e),t)for(e=0;e>>=0,e===0?32:31-(Fh(e)/Ih|0)|0}var sl=64,ol=4194304;function qs(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ll(e,t){var n=e.pendingLanes;if(n===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes,m=n&268435455;if(m!==0){var y=m&~i;y!==0?l=qs(y):(c&=m,c!==0&&(l=qs(c)))}else m=n&~i,m!==0?l=qs(m):c!==0&&(l=qs(c));if(l===0)return 0;if(t!==0&&t!==l&&(t&i)===0&&(i=l&-l,c=t&-t,i>=c||i===16&&(c&4194240)!==0))return t;if((l&4)!==0&&(l|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0n;n++)t.push(e);return t}function Zs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=n}function Hh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=so),tu=" ",ru=!1;function nu(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function su(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kn=!1;function yx(e,t){switch(e){case"compositionend":return su(t);case"keypress":return t.which!==32?null:(ru=!0,tu);case"textInput":return e=t.data,e===tu&&ru?null:e;default:return null}}function bx(e,t){if(Kn)return e==="compositionend"||!Xa&&nu(e,t)?(e=qc(),ul=Ka=Mr=null,Kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uu(n)}}function pu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mu(){for(var e=window,t=zn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zn(e.document)}return t}function ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Mx(e){var t=mu(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pu(n.ownerDocument.documentElement,n)){if(l!==null&&ri(n)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,c=Math.min(l.start,i);l=l.end===void 0?c:Math.min(l.end,i),!e.extend&&c>l&&(i=l,l=c,c=i),i=fu(n,c);var m=fu(n,l);i&&m&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),c>l?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Qn=null,ni=null,io=null,si=!1;function hu(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;si||Qn==null||Qn!==zn(l)||(l=Qn,"selectionStart"in l&&ri(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),io&&ao(io,l)||(io=l,l=yl(ni,"onSelect"),0Xn||(e.current=xi[Xn],xi[Xn]=null,Xn--)}function Ie(e,t){Xn++,xi[Xn]=e.current,e.current=t}var Dr={},it=Or(Dr),xt=Or(!1),cn=Dr;function es(e,t){var n=e.type.contextTypes;if(!n)return Dr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var i={},c;for(c in n)i[c]=t[c];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function gt(e){return e=e.childContextTypes,e!=null}function kl(){Ue(xt),Ue(it)}function Pu(e,t,n){if(it.current!==Dr)throw Error(a(168));Ie(it,t),Ie(xt,n)}function Ru(e,t,n){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return n;l=l.getChildContext();for(var i in l)if(!(i in t))throw Error(a(108,me(e)||"Unknown",i));return X({},n,l)}function Nl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dr,cn=it.current,Ie(it,e),Ie(xt,xt.current),!0}function Ou(e,t,n){var l=e.stateNode;if(!l)throw Error(a(169));n?(e=Ru(e,t,cn),l.__reactInternalMemoizedMergedChildContext=e,Ue(xt),Ue(it),Ie(it,e)):Ue(xt),Ie(xt,n)}var fr=null,Sl=!1,gi=!1;function Du(e){fr===null?fr=[e]:fr.push(e)}function Ux(e){Sl=!0,Du(e)}function Ar(){if(!gi&&fr!==null){gi=!0;var e=0,t=Le;try{var n=fr;for(Le=1;e>=m,i-=m,pr=1<<32-Ht(t)+i|n<ke?(rt=ve,ve=null):rt=ve.sibling;var De=G(A,ve,T[ke],Q);if(De===null){ve===null&&(ve=rt);break}e&&ve&&De.alternate===null&&t(A,ve),_=c(De,_,ke),ge===null?ce=De:ge.sibling=De,ge=De,ve=rt}if(ke===T.length)return n(A,ve),He&&fn(A,ke),ce;if(ve===null){for(;keke?(rt=ve,ve=null):rt=ve.sibling;var Hr=G(A,ve,De.value,Q);if(Hr===null){ve===null&&(ve=rt);break}e&&ve&&Hr.alternate===null&&t(A,ve),_=c(Hr,_,ke),ge===null?ce=Hr:ge.sibling=Hr,ge=Hr,ve=rt}if(De.done)return n(A,ve),He&&fn(A,ke),ce;if(ve===null){for(;!De.done;ke++,De=T.next())De=W(A,De.value,Q),De!==null&&(_=c(De,_,ke),ge===null?ce=De:ge.sibling=De,ge=De);return He&&fn(A,ke),ce}for(ve=l(A,ve);!De.done;ke++,De=T.next())De=te(ve,A,ke,De.value,Q),De!==null&&(e&&De.alternate!==null&&ve.delete(De.key===null?ke:De.key),_=c(De,_,ke),ge===null?ce=De:ge.sibling=De,ge=De);return e&&ve.forEach(function(wg){return t(A,wg)}),He&&fn(A,ke),ce}function Ze(A,_,T,Q){if(typeof T=="object"&&T!==null&&T.type===B&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case $:e:{for(var ce=T.key,ge=_;ge!==null;){if(ge.key===ce){if(ce=T.type,ce===B){if(ge.tag===7){n(A,ge.sibling),_=i(ge,T.props.children),_.return=A,A=_;break e}}else if(ge.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Pe&&Iu(ce)===ge.type){n(A,ge.sibling),_=i(ge,T.props),_.ref=ho(A,ge,T),_.return=A,A=_;break e}n(A,ge);break}else t(A,ge);ge=ge.sibling}T.type===B?(_=bn(T.props.children,A.mode,Q,T.key),_.return=A,A=_):(Q=Xl(T.type,T.key,T.props,null,A.mode,Q),Q.ref=ho(A,_,T),Q.return=A,A=Q)}return m(A);case I:e:{for(ge=T.key;_!==null;){if(_.key===ge)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(A,_.sibling),_=i(_,T.children||[]),_.return=A,A=_;break e}else{n(A,_);break}else t(A,_);_=_.sibling}_=md(T,A.mode,Q),_.return=A,A=_}return m(A);case Pe:return ge=T._init,Ze(A,_,ge(T._payload),Q)}if(Bt(T))return ie(A,_,T,Q);if(se(T))return de(A,_,T,Q);Ml(A,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(A,_.sibling),_=i(_,T),_.return=A,A=_):(n(A,_),_=pd(T,A.mode,Q),_.return=A,A=_),m(A)):n(A,_)}return Ze}var ss=$u(!0),Uu=$u(!1),Pl=Or(null),Rl=null,os=null,ki=null;function Ni(){ki=os=Rl=null}function Si(e){var t=Pl.current;Ue(Pl),e._currentValue=t}function Ci(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function ls(e,t){Rl=e,ki=os=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(vt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(ki!==e)if(e={context:e,memoizedValue:t,next:null},os===null){if(Rl===null)throw Error(a(308));os=e,Rl.dependencies={lanes:0,firstContext:e}}else os=os.next=e;return t}var pn=null;function Ei(e){pn===null?pn=[e]:pn.push(e)}function Bu(e,t,n,l){var i=t.interleaved;return i===null?(n.next=n,Ei(t)):(n.next=i.next,i.next=n),t.interleaved=n,hr(e,l)}function hr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Tr=!1;function _i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zr(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Re&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,hr(e,n)}return i=l.interleaved,i===null?(t.next=t,Ei(l)):(t.next=i.next,i.next=t),l.interleaved=t,hr(e,n)}function Ol(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ba(e,n)}}function Gu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};c===null?i=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:l.shared,effects:l.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Dl(e,t,n,l){var i=e.updateQueue;Tr=!1;var c=i.firstBaseUpdate,m=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var k=y,L=k.next;k.next=null,m===null?c=L:m.next=L,m=k;var V=e.alternate;V!==null&&(V=V.updateQueue,y=V.lastBaseUpdate,y!==m&&(y===null?V.firstBaseUpdate=L:y.next=L,V.lastBaseUpdate=k))}if(c!==null){var W=i.baseState;m=0,V=L=k=null,y=c;do{var G=y.lane,te=y.eventTime;if((l&G)===G){V!==null&&(V=V.next={eventTime:te,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var ie=e,de=y;switch(G=t,te=n,de.tag){case 1:if(ie=de.payload,typeof ie=="function"){W=ie.call(te,W,G);break e}W=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=de.payload,G=typeof ie=="function"?ie.call(te,W,G):ie,G==null)break e;W=X({},W,G);break e;case 2:Tr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,G=i.effects,G===null?i.effects=[y]:G.push(y))}else te={eventTime:te,lane:G,tag:y.tag,payload:y.payload,callback:y.callback,next:null},V===null?(L=V=te,k=W):V=V.next=te,m|=G;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;G=y,y=G.next,G.next=null,i.lastBaseUpdate=G,i.shared.pending=null}}while(!0);if(V===null&&(k=W),i.baseState=k,i.firstBaseUpdate=L,i.lastBaseUpdate=V,t=i.shared.interleaved,t!==null){i=t;do m|=i.lane,i=i.next;while(i!==t)}else c===null&&(i.shared.lanes=0);xn|=m,e.lanes=m,e.memoizedState=W}}function Vu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var l=Di.transition;Di.transition={};try{e(!1),t()}finally{Le=n,Di.transition=l}}function uf(){return Ft().memoizedState}function Vx(e,t,n){var l=$r(e);if(n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},ff(e))pf(t,n);else if(n=Bu(e,t,n,l),n!==null){var i=mt();qt(n,e,l,i),mf(n,t,l)}}function Wx(e,t,n){var l=$r(e),i={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(ff(e))pf(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,y=c(m,n);if(i.hasEagerState=!0,i.eagerState=y,Gt(y,m)){var k=t.interleaved;k===null?(i.next=i,Ei(t)):(i.next=k.next,k.next=i),t.interleaved=i;return}}catch{}finally{}n=Bu(e,t,i,l),n!==null&&(i=mt(),qt(n,e,l,i),mf(n,t,l))}}function ff(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function pf(e,t){yo=zl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mf(e,t,n){if((n&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ba(e,n)}}var Il={readContext:Lt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},Kx={readContext:Lt,useCallback:function(e,t){return rr().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:rf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ll(4194308,4,of.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ll(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ll(4,2,e,t)},useMemo:function(e,t){var n=rr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=rr();return t=n!==void 0?n(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Vx.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var t=rr();return e={current:e},t.memoizedState=e},useState:ef,useDebugValue:$i,useDeferredValue:function(e){return rr().memoizedState=e},useTransition:function(){var e=ef(!1),t=e[0];return e=Gx.bind(null,e[1]),rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=Ve,i=rr();if(He){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),tt===null)throw Error(a(349));(hn&30)!==0||qu(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,rf(Yu.bind(null,l,c,e),[e]),l.flags|=2048,jo(9,Zu.bind(null,l,c,n,t),void 0,null),n},useId:function(){var e=rr(),t=tt.identifierPrefix;if(He){var n=mr,l=pr;n=(l&~(1<<32-Ht(l)-1)).toString(32)+n,t=":"+t+"R"+n,n=bo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(n,{is:l.is}):(e=m.createElement(n),n==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,n),e[er]=t,e[po]=l,Af(e,t,!1,!1),t.stateNode=e;e:{switch(m=Oa(n,l),n){case"dialog":$e("cancel",e),$e("close",e),i=l;break;case"iframe":case"object":case"embed":$e("load",e),i=l;break;case"video":case"audio":for(i=0;ius&&(t.flags|=128,l=!0,ko(c,!1),t.lanes=4194304)}else{if(!l)if(e=Al(m),e!==null){if(t.flags|=128,l=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ko(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!He)return ct(t),null}else 2*qe()-c.renderingStartTime>us&&n!==1073741824&&(t.flags|=128,l=!0,ko(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(n=c.last,n!==null?n.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=qe(),t.sibling=null,n=Ge.current,Ie(Ge,l?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return cd(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(Pt&1073741824)!==0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function tg(e,t){switch(yi(t),t.tag){case 1:return gt(t.type)&&kl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return as(),Ue(xt),Ue(it),Oi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Pi(t),null;case 13:if(Ue(Ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ge),null;case 4:return as(),null;case 10:return Si(t.type._context),null;case 22:case 23:return cd(),null;case 24:return null;default:return null}}var Hl=!1,ut=!1,rg=typeof WeakSet=="function"?WeakSet:Set,oe=null;function ds(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(l){We(e,t,l)}else n.current=null}function Ji(e,t,n){try{n()}catch(l){We(e,t,l)}}var Lf=!1;function ng(e,t){if(ci=dl,e=mu(),ri(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,y=-1,k=-1,L=0,V=0,W=e,G=null;t:for(;;){for(var te;W!==n||i!==0&&W.nodeType!==3||(y=m+i),W!==c||l!==0&&W.nodeType!==3||(k=m+l),W.nodeType===3&&(m+=W.nodeValue.length),(te=W.firstChild)!==null;)G=W,W=te;for(;;){if(W===e)break t;if(G===n&&++L===i&&(y=m),G===c&&++V===l&&(k=m),(te=W.nextSibling)!==null)break;W=G,G=W.parentNode}W=te}n=y===-1||k===-1?null:{start:y,end:k}}else n=null}n=n||{start:0,end:0}}else n=null;for(ui={focusedElem:e,selectionRange:n},dl=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var ie=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var de=ie.memoizedProps,Ze=ie.memoizedState,A=t.stateNode,_=A.getSnapshotBeforeUpdate(t.elementType===t.type?de:Wt(t.type,de),Ze);A.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Q){We(t,t.return,Q)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return ie=Lf,Lf=!1,ie}function No(e,t,n){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var i=l=l.next;do{if((i.tag&e)===e){var c=i.destroy;i.destroy=void 0,c!==void 0&&Ji(t,n,c)}i=i.next}while(i!==l)}}function Gl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var l=n.create;n.destroy=l()}n=n.next}while(n!==t)}}function Xi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[er],delete t[po],delete t[hi],delete t[Ix],delete t[$x])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function If(e){return e.tag===5||e.tag===3||e.tag===4}function $f(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||If(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ed(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wl));else if(l!==4&&(e=e.child,e!==null))for(ed(e,t,n),e=e.sibling;e!==null;)ed(e,t,n),e=e.sibling}function td(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(td(e,t,n),e=e.sibling;e!==null;)td(e,t,n),e=e.sibling}var st=null,Kt=!1;function Lr(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(nl,n)}catch{}switch(n.tag){case 5:ut||ds(n,t);case 6:var l=st,i=Kt;st=null,Lr(e,t,n),st=l,Kt=i,st!==null&&(Kt?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(Kt?(e=st,n=n.stateNode,e.nodeType===8?mi(e.parentNode,n):e.nodeType===1&&mi(e,n),to(e)):mi(st,n.stateNode));break;case 4:l=st,i=Kt,st=n.stateNode.containerInfo,Kt=!0,Lr(e,t,n),st=l,Kt=i;break;case 0:case 11:case 14:case 15:if(!ut&&(l=n.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){i=l=l.next;do{var c=i,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&Ji(n,t,m),i=i.next}while(i!==l)}Lr(e,t,n);break;case 1:if(!ut&&(ds(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=n.memoizedProps,l.state=n.memoizedState,l.componentWillUnmount()}catch(y){We(n,t,y)}Lr(e,t,n);break;case 21:Lr(e,t,n);break;case 22:n.mode&1?(ut=(l=ut)||n.memoizedState!==null,Lr(e,t,n),ut=l):Lr(e,t,n);break;default:Lr(e,t,n)}}function Bf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rg),t.forEach(function(l){var i=fg.bind(null,e,l);n.has(l)||(n.add(l),l.then(i,i))})}}function Qt(e,t){var n=t.deletions;if(n!==null)for(var l=0;li&&(i=m),l&=~c}if(l=i,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*og(l/1960))-l,10e?16:e,Ir===null)var l=!1;else{if(e=Ir,Ir=null,ql=0,(Re&6)!==0)throw Error(a(331));var i=Re;for(Re|=4,oe=e.current;oe!==null;){var c=oe,m=c.child;if((oe.flags&16)!==0){var y=c.deletions;if(y!==null){for(var k=0;kqe()-sd?vn(e,0):nd|=n),bt(e,t)}function tp(e,t){t===0&&((e.mode&1)===0?t=1:(t=ol,ol<<=1,(ol&130023424)===0&&(ol=4194304)));var n=mt();e=hr(e,t),e!==null&&(Zs(e,t,n),bt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tp(e,n)}function fg(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}l!==null&&l.delete(t),tp(e,n)}var rp;rp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)vt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return vt=!1,Xx(e,t,n);vt=(e.flags&131072)!==0}else vt=!1,He&&(t.flags&1048576)!==0&&Au(t,El,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Bl(e,t),e=t.pendingProps;var i=es(t,it.current);ls(t,n),i=Ti(null,t,l,e,i,n);var c=zi();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(l)?(c=!0,Nl(t)):c=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,_i(t),i.updater=$l,t.stateNode=i,i._reactInternals=t,Bi(t,l,e,n),t=Wi(null,t,l,!0,c,n)):(t.tag=0,He&&c&&vi(t),pt(null,t,i,n),t=t.child),t;case 16:l=t.elementType;e:{switch(Bl(e,t),e=t.pendingProps,i=l._init,l=i(l._payload),t.type=l,i=t.tag=mg(l),e=Wt(l,e),i){case 0:t=Vi(null,t,l,e,n);break e;case 1:t=_f(null,t,l,e,n);break e;case 11:t=kf(null,t,l,e,n);break e;case 14:t=Nf(null,t,l,Wt(l.type,e),n);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Wt(l,i),Vi(e,t,l,i,n);case 1:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Wt(l,i),_f(e,t,l,i,n);case 3:e:{if(Mf(t),e===null)throw Error(a(387));l=t.pendingProps,c=t.memoizedState,i=c.element,Hu(e,t),Dl(t,l,null,n);var m=t.memoizedState;if(l=m.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){i=is(Error(a(423)),t),t=Pf(e,t,l,n,i);break e}else if(l!==i){i=is(Error(a(424)),t),t=Pf(e,t,l,n,i);break e}else for(Mt=Rr(t.stateNode.containerInfo.firstChild),_t=t,He=!0,Vt=null,n=Uu(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ns(),l===i){t=gr(e,t,n);break e}pt(e,t,l,n)}t=t.child}return t;case 5:return Wu(t),e===null&&wi(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,m=i.children,fi(l,i)?m=null:c!==null&&fi(l,c)&&(t.flags|=32),Ef(e,t),pt(e,t,m,n),t.child;case 6:return e===null&&wi(t),null;case 13:return Rf(e,t,n);case 4:return Mi(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ss(t,null,l,n):pt(e,t,l,n),t.child;case 11:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Wt(l,i),kf(e,t,l,i,n);case 7:return pt(e,t,t.pendingProps,n),t.child;case 8:return pt(e,t,t.pendingProps.children,n),t.child;case 12:return pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,i=t.pendingProps,c=t.memoizedProps,m=i.value,Ie(Pl,l._currentValue),l._currentValue=m,c!==null)if(Gt(c.value,m)){if(c.children===i.children&&!xt.current){t=gr(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var y=c.dependencies;if(y!==null){m=c.child;for(var k=y.firstContext;k!==null;){if(k.context===l){if(c.tag===1){k=xr(-1,n&-n),k.tag=2;var L=c.updateQueue;if(L!==null){L=L.shared;var V=L.pending;V===null?k.next=k:(k.next=V.next,V.next=k),L.pending=k}}c.lanes|=n,k=c.alternate,k!==null&&(k.lanes|=n),Ci(c.return,n,t),y.lanes|=n;break}k=k.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(a(341));m.lanes|=n,y=m.alternate,y!==null&&(y.lanes|=n),Ci(m,n,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}pt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,l=t.pendingProps.children,ls(t,n),i=Lt(i),l=l(i),t.flags|=1,pt(e,t,l,n),t.child;case 14:return l=t.type,i=Wt(l,t.pendingProps),i=Wt(l.type,i),Nf(e,t,l,i,n);case 15:return Sf(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Wt(l,i),Bl(e,t),t.tag=1,gt(l)?(e=!0,Nl(t)):e=!1,ls(t,n),xf(t,l,i),Bi(t,l,i,n),Wi(null,t,l,!0,e,n);case 19:return Df(e,t,n);case 22:return Cf(e,t,n)}throw Error(a(156,t.tag))};function np(e,t){return Tc(e,t)}function pg(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,n,l){return new pg(e,t,n,l)}function fd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mg(e){if(typeof e=="function")return fd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ue)return 11;if(e===ze)return 14}return 2}function Br(e,t){var n=e.alternate;return n===null?(n=$t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,l,i,c){var m=2;if(l=e,typeof e=="function")fd(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case B:return bn(n.children,i,c,t);case ne:m=8,i|=8;break;case le:return e=$t(12,n,t,i|2),e.elementType=le,e.lanes=c,e;case Te:return e=$t(13,n,t,i),e.elementType=Te,e.lanes=c,e;case Se:return e=$t(19,n,t,i),e.elementType=Se,e.lanes=c,e;case Me:return ea(n,i,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pe:m=10;break e;case fe:m=9;break e;case ue:m=11;break e;case ze:m=14;break e;case Pe:m=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=$t(m,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function bn(e,t,n,l){return e=$t(7,e,l,t),e.lanes=n,e}function ea(e,t,n,l){return e=$t(22,e,l,t),e.elementType=Me,e.lanes=n,e.stateNode={isHidden:!1},e}function pd(e,t,n){return e=$t(6,e,null,t),e.lanes=n,e}function md(e,t,n){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hg(e,t,n,l,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ua(0),this.expirationTimes=Ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ua(0),this.identifierPrefix=l,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hd(e,t,n,l,i,c,m,y,k){return e=new hg(e,t,n,y,k),t===1?(t=1,c===!0&&(t|=8)):t=0,c=$t(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_i(c),e}function xg(e,t,n){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),jd.exports=_g(),jd.exports}var vp;function Mg(){if(vp)return ia;vp=1;var s=mm();return ia.createRoot=s.createRoot,ia.hydrateRoot=s.hydrateRoot,ia}var Pg=Mg();const Rg=fm(Pg);var Zo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kn,Qr,ws,rm,Og=(rm=class extends Zo{constructor(){super();ye(this,kn);ye(this,Qr);ye(this,ws);re(this,ws,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){N(this,Qr)||this.setEventListener(N(this,ws))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Qr))==null||o.call(this),re(this,Qr,void 0))}setEventListener(o){var a;re(this,ws,o),(a=N(this,Qr))==null||a.call(this),re(this,Qr,o(d=>{typeof d=="boolean"?this.setFocused(d):this.onFocus()}))}setFocused(o){N(this,kn)!==o&&(re(this,kn,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(a=>{a(o)})}isFocused(){var o;return typeof N(this,kn)=="boolean"?N(this,kn):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},kn=new WeakMap,Qr=new WeakMap,ws=new WeakMap,rm),fc=new Og,Dg={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},qr,dc,nm,Ag=(nm=class{constructor(){ye(this,qr,Dg);ye(this,dc,!1)}setTimeoutProvider(s){re(this,qr,s)}setTimeout(s,o){return N(this,qr).setTimeout(s,o)}clearTimeout(s){N(this,qr).clearTimeout(s)}setInterval(s,o){return N(this,qr).setInterval(s,o)}clearInterval(s){N(this,qr).clearInterval(s)}},qr=new WeakMap,dc=new WeakMap,nm),jn=new Ag;function Tg(s){setTimeout(s,0)}var zg=typeof window>"u"||"Deno"in globalThis;function kt(){}function Lg(s,o){return typeof s=="function"?s(o):s}function Ld(s){return typeof s=="number"&&s>=0&&s!==1/0}function hm(s,o){return Math.max(s+(o||0)-Date.now(),0)}function rn(s,o){return typeof s=="function"?s(o):s}function Ot(s,o){return typeof s=="function"?s(o):s}function yp(s,o){const{type:a="all",exact:d,fetchStatus:u,predicate:f,queryKey:h,stale:p}=s;if(h){if(d){if(o.queryHash!==pc(h,o.options))return!1}else if(!To(o.queryKey,h))return!1}if(a!=="all"){const v=o.isActive();if(a==="active"&&!v||a==="inactive"&&v)return!1}return!(typeof p=="boolean"&&o.isStale()!==p||u&&u!==o.state.fetchStatus||f&&!f(o))}function bp(s,o){const{exact:a,status:d,predicate:u,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(a){if(Ao(o.options.mutationKey)!==Ao(f))return!1}else if(!To(o.options.mutationKey,f))return!1}return!(d&&o.state.status!==d||u&&!u(o))}function pc(s,o){return((o==null?void 0:o.queryKeyHashFn)||Ao)(s)}function Ao(s){return JSON.stringify(s,(o,a)=>Id(a)?Object.keys(a).sort().reduce((d,u)=>(d[u]=a[u],d),{}):a)}function To(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(a=>To(s[a],o[a])):!1}var Fg=Object.prototype.hasOwnProperty;function xm(s,o,a=0){if(s===o)return s;if(a>500)return o;const d=wp(s)&&wp(o);if(!d&&!(Id(s)&&Id(o)))return o;const f=(d?s:Object.keys(s)).length,h=d?o:Object.keys(o),p=h.length,v=d?new Array(p):{};let x=0;for(let w=0;w{jn.setTimeout(o,s)})}function $d(s,o,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,o):a.structuralSharing!==!1?xm(s,o):o}function $g(s,o,a=0){const d=[...s,o];return a&&d.length>a?d.slice(1):d}function Ug(s,o,a=0){const d=[o,...s];return a&&d.length>a?d.slice(0,-1):d}var mc=Symbol();function gm(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===mc?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function vm(s,o){return typeof s=="function"?s(...o):!!s}function Bg(s,o,a){let d=!1,u;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(u??(u=o()),d||(d=!0,u.aborted?a():u.addEventListener("abort",a,{once:!0})),u)}),s}var zo=(()=>{let s=()=>zg;return{isServer(){return s()},setIsServer(o){s=o}}})();function Ud(){let s,o;const a=new Promise((u,f)=>{s=u,o=f});a.status="pending",a.catch(()=>{});function d(u){Object.assign(a,u),delete a.resolve,delete a.reject}return a.resolve=u=>{d({status:"fulfilled",value:u}),s(u)},a.reject=u=>{d({status:"rejected",reason:u}),o(u)},a}var Hg=Tg;function Gg(){let s=[],o=0,a=p=>{p()},d=p=>{p()},u=Hg;const f=p=>{o?s.push(p):u(()=>{a(p)})},h=()=>{const p=s;s=[],p.length&&u(()=>{d(()=>{p.forEach(v=>{a(v)})})})};return{batch:p=>{let v;o++;try{v=p()}finally{o--,o||h()}return v},batchCalls:p=>(...v)=>{f(()=>{p(...v)})},schedule:f,setNotifyFunction:p=>{a=p},setBatchNotifyFunction:p=>{d=p},setScheduler:p=>{u=p}}}var lt=Gg(),js,Zr,ks,sm,Vg=(sm=class extends Zo{constructor(){super();ye(this,js,!0);ye(this,Zr);ye(this,ks);re(this,ks,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o(!0),d=()=>o(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",d,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",d)}}})}onSubscribe(){N(this,Zr)||this.setEventListener(N(this,ks))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Zr))==null||o.call(this),re(this,Zr,void 0))}setEventListener(o){var a;re(this,ks,o),(a=N(this,Zr))==null||a.call(this),re(this,Zr,o(this.setOnline.bind(this)))}setOnline(o){N(this,js)!==o&&(re(this,js,o),this.listeners.forEach(d=>{d(o)}))}isOnline(){return N(this,js)}},js=new WeakMap,Zr=new WeakMap,ks=new WeakMap,sm),ka=new Vg;function Wg(s){return Math.min(1e3*2**s,3e4)}function ym(s){return(s??"online")==="online"?ka.isOnline():!0}var Bd=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function bm(s){let o=!1,a=0,d;const u=Ud(),f=()=>u.status!=="pending",h=S=>{var b;if(!f()){const P=new Bd(S);M(P),(b=s.onCancel)==null||b.call(s,P)}},p=()=>{o=!0},v=()=>{o=!1},x=()=>fc.isFocused()&&(s.networkMode==="always"||ka.isOnline())&&s.canRun(),w=()=>ym(s.networkMode)&&s.canRun(),j=S=>{f()||(d==null||d(),u.resolve(S))},M=S=>{f()||(d==null||d(),u.reject(S))},R=()=>new Promise(S=>{var b;d=P=>{(f()||x())&&S(P)},(b=s.onPause)==null||b.call(s)}).then(()=>{var S;d=void 0,f()||(S=s.onContinue)==null||S.call(s)}),F=()=>{if(f())return;let S;const b=a===0?s.initialPromise:void 0;try{S=b??s.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(j).catch(P=>{var I;if(f())return;const O=s.retry??(zo.isServer()?0:3),H=s.retryDelay??Wg,z=typeof H=="function"?H(a,P):H,$=O===!0||typeof O=="number"&&ax()?void 0:R()).then(()=>{o?M(P):F()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(d==null||d(),u),cancelRetry:p,continueRetry:v,canStart:w,start:()=>(w()?F():R().then(F),u)}}var Nn,om,wm=(om=class{constructor(){ye(this,Nn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ld(this.gcTime)&&re(this,Nn,jn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(zo.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,Nn)!==void 0&&(jn.clearTimeout(N(this,Nn)),re(this,Nn,void 0))}},Nn=new WeakMap,om);function Kg(s){return{onFetch:(o,a)=>{var w,j,M,R,F;const d=o.options,u=(M=(j=(w=o.fetchOptions)==null?void 0:w.meta)==null?void 0:j.fetchMore)==null?void 0:M.direction,f=((R=o.state.data)==null?void 0:R.pages)||[],h=((F=o.state.data)==null?void 0:F.pageParams)||[];let p={pages:[],pageParams:[]},v=0;const x=async()=>{let S=!1;const b=H=>{Bg(H,()=>o.signal,()=>S=!0)},P=gm(o.options,o.fetchOptions),O=async(H,z,$)=>{if(S)return Promise.reject(o.signal.reason);if(z==null&&H.pages.length)return Promise.resolve(H);const B=(()=>{const fe={client:o.client,queryKey:o.queryKey,pageParam:z,direction:$?"backward":"forward",meta:o.options.meta};return b(fe),fe})(),ne=await P(B),{maxPages:le}=o.options,pe=$?Ug:$g;return{pages:pe(H.pages,ne,le),pageParams:pe(H.pageParams,z,le)}};if(u&&f.length){const H=u==="backward",z=H?Qg:kp,$={pages:f,pageParams:h},I=z(d,$);p=await O($,I,H)}else{const H=s??f.length;do{const z=v===0?h[0]??d.initialPageParam:kp(d,p);if(v>0&&z==null)break;p=await O(p,z),v++}while(v{var S,b;return(b=(S=o.options).persister)==null?void 0:b.call(S,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},a)}:o.fetchFn=x}}}function kp(s,{pages:o,pageParams:a}){const d=o.length-1;return o.length>0?s.getNextPageParam(o[d],o,a[d],a):void 0}function Qg(s,{pages:o,pageParams:a}){var d;return o.length>0?(d=s.getPreviousPageParam)==null?void 0:d.call(s,o[0],o,a[0],a):void 0}var Ns,Sn,Ss,Ut,Cn,nt,Vo,En,Rt,jm,br,lm,qg=(lm=class extends wm{constructor(o){super();ye(this,Rt);ye(this,Ns);ye(this,Sn);ye(this,Ss);ye(this,Ut);ye(this,Cn);ye(this,nt);ye(this,Vo);ye(this,En);re(this,En,!1),re(this,Vo,o.defaultOptions),this.setOptions(o.options),this.observers=[],re(this,Cn,o.client),re(this,Ut,N(this,Cn).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,re(this,Sn,Sp(this.options)),this.state=o.state??N(this,Sn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,Ns)}get promise(){var o;return(o=N(this,nt))==null?void 0:o.promise}setOptions(o){if(this.options={...N(this,Vo),...o},o!=null&&o._type&&re(this,Ns,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Sp(this.options);a.data!==void 0&&(this.setState(Np(a.data,a.dataUpdatedAt)),re(this,Sn,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Ut).remove(this)}setData(o,a){const d=$d(this.state.data,o,this.options);return Ee(this,Rt,br).call(this,{data:d,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),d}setState(o){Ee(this,Rt,br).call(this,{type:"setState",state:o})}cancel(o){var d,u;const a=(d=N(this,nt))==null?void 0:d.promise;return(u=N(this,nt))==null||u.cancel(o),a?a.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,Sn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Ot(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>rn(o.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(o=>o.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(o=0){return this.state.data===void 0?!0:o==="static"?!1:this.state.isInvalidated?!0:!hm(this.state.dataUpdatedAt,o)}onFocus(){var a;const o=this.observers.find(d=>d.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,nt))==null||a.continue()}onOnline(){var a;const o=this.observers.find(d=>d.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,nt))==null||a.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),N(this,Ut).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(a=>a!==o),this.observers.length||(N(this,nt)&&(N(this,En)||Ee(this,Rt,jm).call(this)?N(this,nt).cancel({revert:!0}):N(this,nt).cancelRetry()),this.scheduleGc()),N(this,Ut).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,Rt,br).call(this,{type:"invalidate"})}async fetch(o,a){var x,w,j,M,R,F,S,b,P,O,H;if(this.state.fetchStatus!=="idle"&&((x=N(this,nt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(N(this,nt))return N(this,nt).continueRetry(),N(this,nt).promise}if(o&&this.setOptions(o),!this.options.queryFn){const z=this.observers.find($=>$.options.queryFn);z&&this.setOptions(z.options)}const d=new AbortController,u=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(re(this,En,!0),d.signal)})},f=()=>{const z=gm(this.options,a),I=(()=>{const B={client:N(this,Cn),queryKey:this.queryKey,meta:this.meta};return u(B),B})();return re(this,En,!1),this.options.persister?this.options.persister(z,I,this):z(I)},p=(()=>{const z={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:N(this,Cn),state:this.state,fetchFn:f};return u(z),z})(),v=N(this,Ns)==="infinite"?Kg(this.options.pages):this.options.behavior;v==null||v.onFetch(p,this),re(this,Ss,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=p.fetchOptions)==null?void 0:w.meta))&&Ee(this,Rt,br).call(this,{type:"fetch",meta:(j=p.fetchOptions)==null?void 0:j.meta}),re(this,nt,bm({initialPromise:a==null?void 0:a.initialPromise,fn:p.fetchFn,onCancel:z=>{z instanceof Bd&&z.revert&&this.setState({...N(this,Ss),fetchStatus:"idle"}),d.abort()},onFail:(z,$)=>{Ee(this,Rt,br).call(this,{type:"failed",failureCount:z,error:$})},onPause:()=>{Ee(this,Rt,br).call(this,{type:"pause"})},onContinue:()=>{Ee(this,Rt,br).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const z=await N(this,nt).start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(R=(M=N(this,Ut).config).onSuccess)==null||R.call(M,z,this),(S=(F=N(this,Ut).config).onSettled)==null||S.call(F,z,this.state.error,this),z}catch(z){if(z instanceof Bd){if(z.silent)return N(this,nt).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Ee(this,Rt,br).call(this,{type:"error",error:z}),(P=(b=N(this,Ut).config).onError)==null||P.call(b,z,this),(H=(O=N(this,Ut).config).onSettled)==null||H.call(O,this.state.data,z,this),z}finally{this.scheduleGc()}}},Ns=new WeakMap,Sn=new WeakMap,Ss=new WeakMap,Ut=new WeakMap,Cn=new WeakMap,nt=new WeakMap,Vo=new WeakMap,En=new WeakMap,Rt=new WeakSet,jm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},br=function(o){const a=d=>{switch(o.type){case"failed":return{...d,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...d,fetchStatus:"paused"};case"continue":return{...d,fetchStatus:"fetching"};case"fetch":return{...d,...km(d.data,this.options),fetchMeta:o.meta??null};case"success":const u={...d,...Np(o.data,o.dataUpdatedAt),dataUpdateCount:d.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Ss,o.manual?u:void 0),u;case"error":const f=o.error;return{...d,error:f,errorUpdateCount:d.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:d.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...d,isInvalidated:!0};case"setState":return{...d,...o.state}}};this.state=a(this.state),lt.batch(()=>{this.observers.forEach(d=>{d.onQueryUpdate()}),N(this,Ut).notify({query:this,type:"updated",action:o})})},lm);function km(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ym(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function Np(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Sp(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,a=o!==void 0,d=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:a?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var jt,_e,Wo,ht,_n,Cs,wr,Yr,Ko,Es,_s,Mn,Pn,Jr,Ms,Ae,Do,Hd,Gd,Vd,Wd,Kd,Qd,qd,Nm,am,Zg=(am=class extends Zo{constructor(o,a){super();ye(this,Ae);ye(this,jt);ye(this,_e);ye(this,Wo);ye(this,ht);ye(this,_n);ye(this,Cs);ye(this,wr);ye(this,Yr);ye(this,Ko);ye(this,Es);ye(this,_s);ye(this,Mn);ye(this,Pn);ye(this,Jr);ye(this,Ms,new Set);this.options=a,re(this,jt,o),re(this,Yr,null),re(this,wr,Ud()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,_e).addObserver(this),Cp(N(this,_e),this.options)?Ee(this,Ae,Do).call(this):this.updateResult(),Ee(this,Ae,Wd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zd(N(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zd(N(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,Ae,Kd).call(this),Ee(this,Ae,Qd).call(this),N(this,_e).removeObserver(this)}setOptions(o){const a=this.options,d=N(this,_e);if(this.options=N(this,jt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ot(this.options.enabled,N(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,Ae,qd).call(this),N(this,_e).setOptions(this.options),a._defaulted&&!Fd(this.options,a)&&N(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,_e),observer:this});const u=this.hasListeners();u&&Ep(N(this,_e),d,this.options,a)&&Ee(this,Ae,Do).call(this),this.updateResult(),u&&(N(this,_e)!==d||Ot(this.options.enabled,N(this,_e))!==Ot(a.enabled,N(this,_e))||rn(this.options.staleTime,N(this,_e))!==rn(a.staleTime,N(this,_e)))&&Ee(this,Ae,Hd).call(this);const f=Ee(this,Ae,Gd).call(this);u&&(N(this,_e)!==d||Ot(this.options.enabled,N(this,_e))!==Ot(a.enabled,N(this,_e))||f!==N(this,Jr))&&Ee(this,Ae,Vd).call(this,f)}getOptimisticResult(o){const a=N(this,jt).getQueryCache().build(N(this,jt),o),d=this.createResult(a,o);return Jg(this,d)&&(re(this,ht,d),re(this,Cs,this.options),re(this,_n,N(this,_e).state)),d}getCurrentResult(){return N(this,ht)}trackResult(o,a){return new Proxy(o,{get:(d,u)=>(this.trackProp(u),a==null||a(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,wr).status==="pending"&&N(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(d,u))})}trackProp(o){N(this,Ms).add(o)}getCurrentQuery(){return N(this,_e)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const a=N(this,jt).defaultQueryOptions(o),d=N(this,jt).getQueryCache().build(N(this,jt),a);return d.fetch().then(()=>this.createResult(d,a))}fetch(o){return Ee(this,Ae,Do).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,ht)))}createResult(o,a){var le;const d=N(this,_e),u=this.options,f=N(this,ht),h=N(this,_n),p=N(this,Cs),x=o!==d?o.state:N(this,Wo),{state:w}=o;let j={...w},M=!1,R;if(a._optimisticResults){const pe=this.hasListeners(),fe=!pe&&Cp(o,a),ue=pe&&Ep(o,d,a,u);(fe||ue)&&(j={...j,...km(w.data,o.options)}),a._optimisticResults==="isRestoring"&&(j.fetchStatus="idle")}let{error:F,errorUpdatedAt:S,status:b}=j;R=j.data;let P=!1;if(a.placeholderData!==void 0&&R===void 0&&b==="pending"){let pe;f!=null&&f.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData)?(pe=f.data,P=!0):pe=typeof a.placeholderData=="function"?a.placeholderData((le=N(this,_s))==null?void 0:le.state.data,N(this,_s)):a.placeholderData,pe!==void 0&&(b="success",R=$d(f==null?void 0:f.data,pe,a),M=!0)}if(a.select&&R!==void 0&&!P)if(f&&R===(h==null?void 0:h.data)&&a.select===N(this,Ko))R=N(this,Es);else try{re(this,Ko,a.select),R=a.select(R),R=$d(f==null?void 0:f.data,R,a),re(this,Es,R),re(this,Yr,null)}catch(pe){re(this,Yr,pe)}N(this,Yr)&&(F=N(this,Yr),R=N(this,Es),S=Date.now(),b="error");const O=j.fetchStatus==="fetching",H=b==="pending",z=b==="error",$=H&&O,I=R!==void 0,ne={status:b,fetchStatus:j.fetchStatus,isPending:H,isSuccess:b==="success",isError:z,isInitialLoading:$,isLoading:$,data:R,dataUpdatedAt:j.dataUpdatedAt,error:F,errorUpdatedAt:S,failureCount:j.fetchFailureCount,failureReason:j.fetchFailureReason,errorUpdateCount:j.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:j.dataUpdateCount>x.dataUpdateCount||j.errorUpdateCount>x.errorUpdateCount,isFetching:O,isRefetching:O&&!H,isLoadingError:z&&!I,isPaused:j.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:z&&I,isStale:hc(o,a),refetch:this.refetch,promise:N(this,wr),isEnabled:Ot(a.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const pe=ne.data!==void 0,fe=ne.status==="error"&&!pe,ue=ze=>{fe?ze.reject(ne.error):pe&&ze.resolve(ne.data)},Te=()=>{const ze=re(this,wr,ne.promise=Ud());ue(ze)},Se=N(this,wr);switch(Se.status){case"pending":o.queryHash===d.queryHash&&ue(Se);break;case"fulfilled":(fe||ne.data!==Se.value)&&Te();break;case"rejected":(!fe||ne.error!==Se.reason)&&Te();break}}return ne}updateResult(){const o=N(this,ht),a=this.createResult(N(this,_e),this.options);if(re(this,_n,N(this,_e).state),re(this,Cs,this.options),N(this,_n).data!==void 0&&re(this,_s,N(this,_e)),Fd(a,o))return;re(this,ht,a);const d=()=>{if(!o)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!N(this,Ms).size)return!0;const h=new Set(f??N(this,Ms));return this.options.throwOnError&&h.add("error"),Object.keys(N(this,ht)).some(p=>{const v=p;return N(this,ht)[v]!==o[v]&&h.has(v)})};Ee(this,Ae,Nm).call(this,{listeners:d()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,Ae,Wd).call(this)}},jt=new WeakMap,_e=new WeakMap,Wo=new WeakMap,ht=new WeakMap,_n=new WeakMap,Cs=new WeakMap,wr=new WeakMap,Yr=new WeakMap,Ko=new WeakMap,Es=new WeakMap,_s=new WeakMap,Mn=new WeakMap,Pn=new WeakMap,Jr=new WeakMap,Ms=new WeakMap,Ae=new WeakSet,Do=function(o){Ee(this,Ae,qd).call(this);let a=N(this,_e).fetch(this.options,o);return o!=null&&o.throwOnError||(a=a.catch(kt)),a},Hd=function(){Ee(this,Ae,Kd).call(this);const o=rn(this.options.staleTime,N(this,_e));if(zo.isServer()||N(this,ht).isStale||!Ld(o))return;const d=hm(N(this,ht).dataUpdatedAt,o)+1;re(this,Mn,jn.setTimeout(()=>{N(this,ht).isStale||this.updateResult()},d))},Gd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,_e)):this.options.refetchInterval)??!1},Vd=function(o){Ee(this,Ae,Qd).call(this),re(this,Jr,o),!(zo.isServer()||Ot(this.options.enabled,N(this,_e))===!1||!Ld(N(this,Jr))||N(this,Jr)===0)&&re(this,Pn,jn.setInterval(()=>{(this.options.refetchIntervalInBackground||fc.isFocused())&&Ee(this,Ae,Do).call(this)},N(this,Jr)))},Wd=function(){Ee(this,Ae,Hd).call(this),Ee(this,Ae,Vd).call(this,Ee(this,Ae,Gd).call(this))},Kd=function(){N(this,Mn)!==void 0&&(jn.clearTimeout(N(this,Mn)),re(this,Mn,void 0))},Qd=function(){N(this,Pn)!==void 0&&(jn.clearInterval(N(this,Pn)),re(this,Pn,void 0))},qd=function(){const o=N(this,jt).getQueryCache().build(N(this,jt),this.options);if(o===N(this,_e))return;const a=N(this,_e);re(this,_e,o),re(this,Wo,o.state),this.hasListeners()&&(a==null||a.removeObserver(this),o.addObserver(this))},Nm=function(o){lt.batch(()=>{o.listeners&&this.listeners.forEach(a=>{a(N(this,ht))}),N(this,jt).getQueryCache().notify({query:N(this,_e),type:"observerResultsUpdated"})})},am);function Yg(s,o){return Ot(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Ot(o.retryOnMount,s)===!1)}function Cp(s,o){return Yg(s,o)||s.state.data!==void 0&&Zd(s,o,o.refetchOnMount)}function Zd(s,o,a){if(Ot(o.enabled,s)!==!1&&rn(o.staleTime,s)!=="static"){const d=typeof a=="function"?a(s):a;return d==="always"||d!==!1&&hc(s,o)}return!1}function Ep(s,o,a,d){return(s!==o||Ot(d.enabled,s)===!1)&&(!a.suspense||s.state.status!=="error")&&hc(s,a)}function hc(s,o){return Ot(o.enabled,s)!==!1&&s.isStaleByTime(rn(o.staleTime,s))}function Jg(s,o){return!Fd(s.getCurrentResult(),o)}var Qo,or,ft,Rn,lr,Wr,im,Xg=(im=class extends wm{constructor(o){super();ye(this,lr);ye(this,Qo);ye(this,or);ye(this,ft);ye(this,Rn);re(this,Qo,o.client),this.mutationId=o.mutationId,re(this,ft,o.mutationCache),re(this,or,[]),this.state=o.state||e0(),this.setOptions(o.options),this.scheduleGc()}setOptions(o){this.options=o,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(o){N(this,or).includes(o)||(N(this,or).push(o),this.clearGcTimeout(),N(this,ft).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){re(this,or,N(this,or).filter(a=>a!==o)),this.scheduleGc(),N(this,ft).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){N(this,or).length||(this.state.status==="pending"?this.scheduleGc():N(this,ft).remove(this))}continue(){var o;return((o=N(this,Rn))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var h,p,v,x,w,j,M,R,F,S,b,P,O,H,z,$,I,B;const a=()=>{Ee(this,lr,Wr).call(this,{type:"continue"})},d={client:N(this,Qo),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Rn,bm({fn:()=>this.options.mutationFn?this.options.mutationFn(o,d):Promise.reject(new Error("No mutationFn found")),onFail:(ne,le)=>{Ee(this,lr,Wr).call(this,{type:"failed",failureCount:ne,error:le})},onPause:()=>{Ee(this,lr,Wr).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,ft).canRun(this)}));const u=this.state.status==="pending",f=!N(this,Rn).canStart();try{if(u)a();else{Ee(this,lr,Wr).call(this,{type:"pending",variables:o,isPaused:f}),N(this,ft).config.onMutate&&await N(this,ft).config.onMutate(o,this,d);const le=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,o,d));le!==this.state.context&&Ee(this,lr,Wr).call(this,{type:"pending",context:le,variables:o,isPaused:f})}const ne=await N(this,Rn).start();return await((x=(v=N(this,ft).config).onSuccess)==null?void 0:x.call(v,ne,o,this.state.context,this,d)),await((j=(w=this.options).onSuccess)==null?void 0:j.call(w,ne,o,this.state.context,d)),await((R=(M=N(this,ft).config).onSettled)==null?void 0:R.call(M,ne,null,this.state.variables,this.state.context,this,d)),await((S=(F=this.options).onSettled)==null?void 0:S.call(F,ne,null,o,this.state.context,d)),Ee(this,lr,Wr).call(this,{type:"success",data:ne}),ne}catch(ne){try{await((P=(b=N(this,ft).config).onError)==null?void 0:P.call(b,ne,o,this.state.context,this,d))}catch(le){Promise.reject(le)}try{await((H=(O=this.options).onError)==null?void 0:H.call(O,ne,o,this.state.context,d))}catch(le){Promise.reject(le)}try{await(($=(z=N(this,ft).config).onSettled)==null?void 0:$.call(z,void 0,ne,this.state.variables,this.state.context,this,d))}catch(le){Promise.reject(le)}try{await((B=(I=this.options).onSettled)==null?void 0:B.call(I,void 0,ne,o,this.state.context,d))}catch(le){Promise.reject(le)}throw Ee(this,lr,Wr).call(this,{type:"error",error:ne}),ne}finally{N(this,ft).runNext(this)}}},Qo=new WeakMap,or=new WeakMap,ft=new WeakMap,Rn=new WeakMap,lr=new WeakSet,Wr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...d,isPaused:!0};case"continue":return{...d,isPaused:!1};case"pending":return{...d,context:o.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:o.isPaused,status:"pending",variables:o.variables,submittedAt:Date.now()};case"success":return{...d,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...d,data:void 0,error:o.error,failureCount:d.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=a(this.state),lt.batch(()=>{N(this,or).forEach(d=>{d.onMutationUpdate(o)}),N(this,ft).notify({mutation:this,type:"updated",action:o})})},im);function e0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jr,Yt,qo,dm,t0=(dm=class extends Zo{constructor(o={}){super();ye(this,jr);ye(this,Yt);ye(this,qo);this.config=o,re(this,jr,new Set),re(this,Yt,new Map),re(this,qo,0)}build(o,a,d){const u=new Xg({client:o,mutationCache:this,mutationId:++aa(this,qo)._,options:o.defaultMutationOptions(a),state:d});return this.add(u),u}add(o){N(this,jr).add(o);const a=da(o);if(typeof a=="string"){const d=N(this,Yt).get(a);d?d.push(o):N(this,Yt).set(a,[o])}this.notify({type:"added",mutation:o})}remove(o){if(N(this,jr).delete(o)){const a=da(o);if(typeof a=="string"){const d=N(this,Yt).get(a);if(d)if(d.length>1){const u=d.indexOf(o);u!==-1&&d.splice(u,1)}else d[0]===o&&N(this,Yt).delete(a)}}this.notify({type:"removed",mutation:o})}canRun(o){const a=da(o);if(typeof a=="string"){const d=N(this,Yt).get(a),u=d==null?void 0:d.find(f=>f.state.status==="pending");return!u||u===o}else return!0}runNext(o){var d;const a=da(o);if(typeof a=="string"){const u=(d=N(this,Yt).get(a))==null?void 0:d.find(f=>f!==o&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{N(this,jr).forEach(o=>{this.notify({type:"removed",mutation:o})}),N(this,jr).clear(),N(this,Yt).clear()})}getAll(){return Array.from(N(this,jr))}find(o){const a={exact:!0,...o};return this.getAll().find(d=>bp(a,d))}findAll(o={}){return this.getAll().filter(a=>bp(o,a))}notify(o){lt.batch(()=>{this.listeners.forEach(a=>{a(o)})})}resumePausedMutations(){const o=this.getAll().filter(a=>a.state.isPaused);return lt.batch(()=>Promise.all(o.map(a=>a.continue().catch(kt))))}},jr=new WeakMap,Yt=new WeakMap,qo=new WeakMap,dm);function da(s){var o;return(o=s.options.scope)==null?void 0:o.id}var ar,cm,r0=(cm=class extends Zo{constructor(o={}){super();ye(this,ar);this.config=o,re(this,ar,new Map)}build(o,a,d){const u=a.queryKey,f=a.queryHash??pc(u,a);let h=this.get(f);return h||(h=new qg({client:o,queryKey:u,queryHash:f,options:o.defaultQueryOptions(a),state:d,defaultOptions:o.getQueryDefaults(u)}),this.add(h)),h}add(o){N(this,ar).has(o.queryHash)||(N(this,ar).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const a=N(this,ar).get(o.queryHash);a&&(o.destroy(),a===o&&N(this,ar).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){lt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return N(this,ar).get(o)}getAll(){return[...N(this,ar).values()]}find(o){const a={exact:!0,...o};return this.getAll().find(d=>yp(a,d))}findAll(o={}){const a=this.getAll();return Object.keys(o).length>0?a.filter(d=>yp(o,d)):a}notify(o){lt.batch(()=>{this.listeners.forEach(a=>{a(o)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},ar=new WeakMap,cm),Ke,Xr,en,Ps,Rs,tn,Os,Ds,um,n0=(um=class{constructor(s={}){ye(this,Ke);ye(this,Xr);ye(this,en);ye(this,Ps);ye(this,Rs);ye(this,tn);ye(this,Os);ye(this,Ds);re(this,Ke,s.queryCache||new r0),re(this,Xr,s.mutationCache||new t0),re(this,en,s.defaultOptions||{}),re(this,Ps,new Map),re(this,Rs,new Map),re(this,tn,0)}mount(){aa(this,tn)._++,N(this,tn)===1&&(re(this,Os,fc.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onFocus())})),re(this,Ds,ka.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onOnline())})))}unmount(){var s,o;aa(this,tn)._--,N(this,tn)===0&&((s=N(this,Os))==null||s.call(this),re(this,Os,void 0),(o=N(this,Ds))==null||o.call(this),re(this,Ds,void 0))}isFetching(s){return N(this,Ke).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return N(this,Xr).findAll({...s,status:"pending"}).length}getQueryData(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Ke).get(o.queryHash))==null?void 0:a.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),a=N(this,Ke).build(this,o),d=a.state.data;return d===void 0?this.fetchQuery(s):(s.revalidateIfStale&&a.isStaleByTime(rn(o.staleTime,a))&&this.prefetchQuery(o),Promise.resolve(d))}getQueriesData(s){return N(this,Ke).findAll(s).map(({queryKey:o,state:a})=>{const d=a.data;return[o,d]})}setQueryData(s,o,a){const d=this.defaultQueryOptions({queryKey:s}),u=N(this,Ke).get(d.queryHash),f=u==null?void 0:u.state.data,h=Lg(o,f);if(h!==void 0)return N(this,Ke).build(this,d).setData(h,{...a,manual:!0})}setQueriesData(s,o,a){return lt.batch(()=>N(this,Ke).findAll(s).map(({queryKey:d})=>[d,this.setQueryData(d,o,a)]))}getQueryState(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Ke).get(o.queryHash))==null?void 0:a.state}removeQueries(s){const o=N(this,Ke);lt.batch(()=>{o.findAll(s).forEach(a=>{o.remove(a)})})}resetQueries(s,o){const a=N(this,Ke);return lt.batch(()=>(a.findAll(s).forEach(d=>{d.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const a={revert:!0,...o},d=lt.batch(()=>N(this,Ke).findAll(s).map(u=>u.cancel(a)));return Promise.all(d).then(kt).catch(kt)}invalidateQueries(s,o={}){return lt.batch(()=>(N(this,Ke).findAll(s).forEach(a=>{a.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},o)))}refetchQueries(s,o={}){const a={...o,cancelRefetch:o.cancelRefetch??!0},d=lt.batch(()=>N(this,Ke).findAll(s).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,a);return a.throwOnError||(f=f.catch(kt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(d).then(kt)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const a=N(this,Ke).build(this,o);return a.isStaleByTime(rn(o.staleTime,a))?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(kt).catch(kt)}fetchInfiniteQuery(s){return s._type="infinite",this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(kt).catch(kt)}ensureInfiniteQueryData(s){return s._type="infinite",this.ensureQueryData(s)}resumePausedMutations(){return ka.isOnline()?N(this,Xr).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Ke)}getMutationCache(){return N(this,Xr)}getDefaultOptions(){return N(this,en)}setDefaultOptions(s){re(this,en,s)}setQueryDefaults(s,o){N(this,Ps).set(Ao(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...N(this,Ps).values()],a={};return o.forEach(d=>{To(s,d.queryKey)&&Object.assign(a,d.defaultOptions)}),a}setMutationDefaults(s,o){N(this,Rs).set(Ao(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...N(this,Rs).values()],a={};return o.forEach(d=>{To(s,d.mutationKey)&&Object.assign(a,d.defaultOptions)}),a}defaultQueryOptions(s){if(s._defaulted)return s;const o={...N(this,en).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=pc(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===mc&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...N(this,en).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){N(this,Ke).clear(),N(this,Xr).clear()}},Ke=new WeakMap,Xr=new WeakMap,en=new WeakMap,Ps=new WeakMap,Rs=new WeakMap,tn=new WeakMap,Os=new WeakMap,Ds=new WeakMap,um),Sm=g.createContext(void 0),ln=s=>{const o=g.useContext(Sm);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},s0=({client:s,children:o})=>(g.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),r.jsx(Sm.Provider,{value:s,children:o})),Cm=g.createContext(!1),o0=()=>g.useContext(Cm);Cm.Provider;function l0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var a0=g.createContext(l0()),i0=()=>g.useContext(a0),d0=(s,o,a)=>{const d=a!=null&&a.state.error&&typeof s.throwOnError=="function"?vm(s.throwOnError,[a.state.error,a]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||d)&&(o.isReset()||(s.retryOnMount=!1))},c0=s=>{g.useEffect(()=>{s.clearReset()},[s])},u0=({result:s,errorResetBoundary:o,throwOnError:a,query:d,suspense:u})=>s.isError&&!o.isReset()&&!s.isFetching&&d&&(u&&s.data===void 0||vm(a,[s.error,d])),f0=s=>{if(s.suspense){const a=u=>u==="static"?u:Math.max(u??1e3,1e3),d=s.staleTime;s.staleTime=typeof d=="function"?(...u)=>a(d(...u)):a(d),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},p0=(s,o)=>s.isLoading&&s.isFetching&&!o,m0=(s,o)=>(s==null?void 0:s.suspense)&&o.isPending,_p=(s,o,a)=>o.fetchOptimistic(s).catch(()=>{a.clearReset()});function h0(s,o,a){var R,F,S,b;const d=o0(),u=i0(),f=ln(),h=f.defaultQueryOptions(s);(F=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||F.call(R,h);const p=f.getQueryCache().get(h.queryHash),v=s.subscribed!==!1;h._optimisticResults=d?"isRestoring":v?"optimistic":void 0,f0(h),d0(h,u,p),c0(u);const x=!f.getQueryCache().get(h.queryHash),[w]=g.useState(()=>new o(f,h)),j=w.getOptimisticResult(h),M=!d&&v;if(g.useSyncExternalStore(g.useCallback(P=>{const O=M?w.subscribe(lt.batchCalls(P)):kt;return w.updateResult(),O},[w,M]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),g.useEffect(()=>{w.setOptions(h)},[h,w]),m0(h,j))throw _p(h,w,u);if(u0({result:j,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw j.error;if((b=(S=f.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||b.call(S,h,j),h.experimental_prefetchInRender&&!zo.isServer()&&p0(j,d)){const P=x?_p(h,w,u):p==null?void 0:p.promise;P==null||P.catch(kt).finally(()=>{w.updateResult()})}return h.notifyOnChangeProps?j:w.trackResult(j)}function St(s,o){return h0(s,Zg)}/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x0=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Em=(...s)=>s.filter((o,a,d)=>!!o&&o.trim()!==""&&d.indexOf(o)===a).join(" ").trim();/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var g0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const v0=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:d,className:u="",children:f,iconNode:h,...p},v)=>g.createElement("svg",{ref:v,...g0,width:o,height:o,stroke:s,strokeWidth:d?Number(a)*24/Number(o):a,className:Em("lucide",u),...p},[...h.map(([x,w])=>g.createElement(x,w)),...Array.isArray(f)?f:[f]]));/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const he=(s,o)=>{const a=g.forwardRef(({className:d,...u},f)=>g.createElement(v0,{ref:f,iconNode:o,className:Em(`lucide-${x0(s)}`,d),...u}));return a.displayName=`${s}`,a};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lo=he("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mp=he("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _m=he("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const As=he("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y0=he("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fo=he("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dr=he("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b0=he("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const w0=he("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j0=he("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k0=he("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N0=he("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S0=he("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yd=he("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C0=he("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E0=he("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jd=he("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _0=he("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mm=he("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dt=he("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sn=he("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Na=he("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pp=he("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xd=he("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M0=he("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P0=he("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ba=he("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R0=he("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O0=he("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Io=he("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D0=he("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A0=he("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T0=he("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z0=he("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const L0=he("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pm=he("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rm=he("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const On=he("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F0=he("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I0=he("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xc=he("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $0=he("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U0=he("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ts=he("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B0=he("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Om=he("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H0=he("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sa=he("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ec=he("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tc=he("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G0=he("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $o=he("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kr=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Uo=he("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),rc=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:D0},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:y0},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Dt},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Fo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:L0},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:As},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:N0}];var Rp=1,V0=.9,W0=.8,K0=.17,Sd=.1,Cd=.999,Q0=.9999,q0=.99,Z0=/[\\\/_+.#"@\[\(\{&]/,Y0=/[\\\/_+.#"@\[\(\{&]/g,J0=/[\s-]/,Dm=/[\s-]/g;function nc(s,o,a,d,u,f,h){if(f===o.length)return u===s.length?Rp:q0;var p=`${u},${f}`;if(h[p]!==void 0)return h[p];for(var v=d.charAt(f),x=a.indexOf(v,u),w=0,j,M,R,F;x>=0;)j=nc(s,o,a,d,x+1,f+1,h),j>w&&(x===u?j*=Rp:Z0.test(s.charAt(x-1))?(j*=W0,R=s.slice(u,x-1).match(Y0),R&&u>0&&(j*=Math.pow(Cd,R.length))):J0.test(s.charAt(x-1))?(j*=V0,F=s.slice(u,x-1).match(Dm),F&&u>0&&(j*=Math.pow(Cd,F.length))):(j*=K0,u>0&&(j*=Math.pow(Cd,x-u))),s.charAt(x)!==o.charAt(f)&&(j*=Q0)),(jj&&(j=M*Sd)),j>w&&(w=j),x=a.indexOf(v,x+1);return h[p]=w,w}function Op(s){return s.toLowerCase().replace(Dm," ")}function X0(s,o,a){return s=a&&a.length>0?`${s+" "+a.join(" ")}`:s,nc(s,o,Op(s),Op(o),0,0,{})}function nn(s,o,{checkForDefaultPrevented:a=!0}={}){return function(u){if(s==null||s(u),a===!1||!u.defaultPrevented)return o==null?void 0:o(u)}}function Dp(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function zs(...s){return o=>{let a=!1;const d=s.map(u=>{const f=Dp(u,o);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u{var P;const{scope:M,children:R,...F}=j,S=((P=M==null?void 0:M[s])==null?void 0:P[v])||p,b=g.useMemo(()=>F,Object.values(F));return r.jsx(S.Provider,{value:b,children:R})};x.displayName=f+"Provider";function w(j,M){var S;const R=((S=M==null?void 0:M[s])==null?void 0:S[v])||p,F=g.useContext(R);if(F)return F;if(h!==void 0)return h;throw new Error(`\`${j}\` must be used within \`${f}\``)}return[x,w]}const u=()=>{const f=a.map(h=>g.createContext(h));return function(p){const v=(p==null?void 0:p[s])||f;return g.useMemo(()=>({[`__scope${s}`]:{...p,[s]:v}}),[p,v])}};return u.scopeName=s,[d,tv(u,...o)]}function tv(...s){const o=s[0];if(s.length===1)return o;const a=()=>{const d=s.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const h=d.reduce((p,{useScope:v,scopeName:x})=>{const j=v(f)[`__scope${x}`];return{...p,...j}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:h}),[h])}};return a.scopeName=o.scopeName,a}var Bo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},rv=uc[" useId ".trim().toString()]||(()=>{}),nv=0;function Nr(s){const[o,a]=g.useState(rv());return Bo(()=>{a(d=>d??String(nv++))},[s]),o?`radix-${o}`:""}var sv=uc[" useInsertionEffect ".trim().toString()]||Bo;function ov({prop:s,defaultProp:o,onChange:a=()=>{},caller:d}){const[u,f,h]=lv({defaultProp:o,onChange:a}),p=s!==void 0,v=p?s:u;{const w=g.useRef(s!==void 0);g.useEffect(()=>{const j=w.current;j!==p&&console.warn(`${d} is changing from ${j?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),w.current=p},[p,d])}const x=g.useCallback(w=>{var j;if(p){const M=av(w)?w(s):w;M!==s&&((j=h.current)==null||j.call(h,M))}else f(w)},[p,s,f,h]);return[v,x]}function lv({defaultProp:s,onChange:o}){const[a,d]=g.useState(s),u=g.useRef(a),f=g.useRef(o);return sv(()=>{f.current=o},[o]),g.useEffect(()=>{var h;u.current!==a&&((h=f.current)==null||h.call(f,a),u.current=a)},[a,u]),[a,d,f]}function av(s){return typeof s=="function"}var Am=mm();function Tm(s){const o=g.forwardRef((a,d)=>{let{children:u,...f}=a,h=null,p=!1;const v=[];Ap(u)&&typeof ca=="function"&&(u=ca(u._payload)),g.Children.forEach(u,M=>{var R;if(fv(M)){p=!0;const F=M;let S="child"in F.props?F.props.child:F.props.children;Ap(S)&&typeof ca=="function"&&(S=ca(S._payload)),h=dv(F,S),v.push((R=h==null?void 0:h.props)==null?void 0:R.children)}else v.push(M)}),h?h=g.cloneElement(h,void 0,v):!p&&g.Children.count(u)===1&&g.isValidElement(u)&&(h=u);const x=h?uv(h):void 0,w=An(d,x);if(!h){if(u||u===0)throw new Error(p?xv(s):hv(s));return u}const j=cv(f,h.props??{});return h.type!==g.Fragment&&(j.ref=d?w:x),g.cloneElement(h,j)});return o.displayName=`${s}.Slot`,o}var iv=Symbol.for("radix.slottable"),dv=(s,o)=>{if("child"in s.props){const a=s.props.child;return g.isValidElement(a)?g.cloneElement(a,void 0,s.props.children(a.props.children)):null}return g.isValidElement(o)?o:null};function cv(s,o){const a={...o};for(const d in o){const u=s[d],f=o[d];/^on[A-Z]/.test(d)?u&&f?a[d]=(...p)=>{const v=f(...p);return u(...p),v}:u&&(a[d]=u):d==="style"?a[d]={...u,...f}:d==="className"&&(a[d]=[u,f].filter(Boolean).join(" "))}return{...s,...a}}function uv(s){var d,u;let o=(d=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:d.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?s.ref:(o=(u=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:u.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?s.props.ref:s.props.ref||s.ref)}function fv(s){return g.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===iv}var pv=Symbol.for("react.lazy");function Ap(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===pv&&"_payload"in s&&mv(s._payload)}function mv(s){return typeof s=="object"&&s!==null&&"then"in s}var hv=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,xv=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ca=uc[" use ".trim().toString()],gv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],at=gv.reduce((s,o)=>{const a=Tm(`Primitive.${o}`),d=g.forwardRef((u,f)=>{const{asChild:h,...p}=u,v=h?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(v,{...p,ref:f})});return d.displayName=`Primitive.${o}`,{...s,[o]:d}},{});function vv(s,o){s&&Am.flushSync(()=>s.dispatchEvent(o))}function Ho(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...a)=>{var d;return(d=o.current)==null?void 0:d.call(o,...a)}),[])}function yv(s,o=globalThis==null?void 0:globalThis.document){const a=Ho(s);g.useEffect(()=>{const d=u=>{u.key==="Escape"&&a(u)};return o.addEventListener("keydown",d,{capture:!0}),()=>o.removeEventListener("keydown",d,{capture:!0})},[a,o])}var bv="DismissableLayer",sc="dismissableLayer.update",wv="dismissableLayer.pointerDownOutside",jv="dismissableLayer.focusOutside",Tp,gc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),zm=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,...x}=s,w=g.useContext(gc),[j,M]=g.useState(null),R=(j==null?void 0:j.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,F]=g.useState({}),S=An(o,le=>M(le)),b=Array.from(w.layers),[P]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),O=b.indexOf(P),H=j?b.indexOf(j):-1,z=w.layersWithOutsidePointerEventsDisabled.size>0,$=H>=O,I=g.useRef(!1),B=Cv(le=>{const pe=le.target;if(!(pe instanceof Node))return;const fe=[...w.branches].some(ue=>ue.contains(pe));!$||fe||(f==null||f(le),p==null||p(le),le.defaultPrevented||v==null||v())},{ownerDocument:R,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:w.dismissableSurfaces}),ne=Ev(le=>{if(d&&I.current)return;const pe=le.target;[...w.branches].some(ue=>ue.contains(pe))||(h==null||h(le),p==null||p(le),le.defaultPrevented||v==null||v())},R);return yv(le=>{H===w.layers.size-1&&(u==null||u(le),!le.defaultPrevented&&v&&(le.preventDefault(),v()))},R),g.useEffect(()=>{if(j)return a&&(w.layersWithOutsidePointerEventsDisabled.size===0&&(Tp=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(j)),w.layers.add(j),zp(),()=>{a&&(w.layersWithOutsidePointerEventsDisabled.delete(j),w.layersWithOutsidePointerEventsDisabled.size===0&&(R.body.style.pointerEvents=Tp))}},[j,R,a,w]),g.useEffect(()=>()=>{j&&(w.layers.delete(j),w.layersWithOutsidePointerEventsDisabled.delete(j),zp())},[j,w]),g.useEffect(()=>{const le=()=>F({});return document.addEventListener(sc,le),()=>document.removeEventListener(sc,le)},[]),r.jsx(at.div,{...x,ref:S,style:{pointerEvents:z?$?"auto":"none":void 0,...s.style},onFocusCapture:nn(s.onFocusCapture,ne.onFocusCapture),onBlurCapture:nn(s.onBlurCapture,ne.onBlurCapture),onPointerDownCapture:nn(s.onPointerDownCapture,B.onPointerDownCapture)})});zm.displayName=bv;var kv="DismissableLayerBranch",Nv=g.forwardRef((s,o)=>{const a=g.useContext(gc),d=g.useRef(null),u=An(o,d);return g.useEffect(()=>{const f=d.current;if(f)return a.branches.add(f),()=>{a.branches.delete(f)}},[a.branches]),r.jsx(at.div,{...s,ref:u})});Nv.displayName=kv;function Sv(){const s=g.useContext(gc),[o,a]=g.useState(null);return g.useEffect(()=>{if(o)return s.dismissableSurfaces.add(o),()=>{s.dismissableSurfaces.delete(o)}},[o,s.dismissableSurfaces]),a}function Cv(s,o){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:d=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f}=o,h=Ho(s),p=g.useRef(!1),v=g.useRef(!1),x=g.useRef(new Map),w=g.useRef(()=>{});return g.useEffect(()=>{function j(){v.current=!1,u.current=!1,x.current.clear()}function M(){return Array.from(x.current.values()).some(Boolean)}function R(O){if(!v.current)return;const H=O.target;H instanceof Node&&[...f].some($=>$.contains(H))||x.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{v.current&&w.current()},0)}function F(O){v.current&&x.current.set(O.type,!1)}const S=O=>{if(O.target&&!p.current){let H=function(){a.removeEventListener("click",w.current);const $=M();j(),$||Lm(wv,h,z,{discrete:!0})};const z={originalEvent:O};v.current=!0,u.current=d&&O.button===0,x.current.clear(),!d||O.button!==0?H():(a.removeEventListener("click",w.current),w.current=H,a.addEventListener("click",w.current,{once:!0}))}else a.removeEventListener("click",w.current),j();p.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of b)a.addEventListener(O,R,!0),a.addEventListener(O,F);const P=window.setTimeout(()=>{a.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(P),a.removeEventListener("pointerdown",S),a.removeEventListener("click",w.current);for(const O of b)a.removeEventListener(O,R,!0),a.removeEventListener(O,F)}},[a,h,d,u,f]),{onPointerDownCapture:()=>p.current=!0}}function Ev(s,o=globalThis==null?void 0:globalThis.document){const a=Ho(s),d=g.useRef(!1);return g.useEffect(()=>{const u=f=>{f.target&&!d.current&&Lm(jv,a,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,a]),{onFocusCapture:()=>d.current=!0,onBlurCapture:()=>d.current=!1}}function zp(){const s=new CustomEvent(sc);document.dispatchEvent(s)}function Lm(s,o,a,{discrete:d}){const u=a.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:a});o&&u.addEventListener(s,o,{once:!0}),d?vv(u,f):u.dispatchEvent(f)}var Ed="focusScope.autoFocusOnMount",_d="focusScope.autoFocusOnUnmount",Lp={bubbles:!1,cancelable:!0},_v="FocusScope",Fm=g.forwardRef((s,o)=>{const{loop:a=!1,trapped:d=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...h}=s,[p,v]=g.useState(null),x=Ho(u),w=Ho(f),j=g.useRef(null),M=An(o,S=>v(S)),R=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(d){let S=function(H){if(R.paused||!p)return;const z=H.target;p.contains(z)?j.current=z:Kr(j.current,{select:!0})},b=function(H){if(R.paused||!p)return;const z=H.relatedTarget;z!==null&&(p.contains(z)||Kr(j.current,{select:!0}))},P=function(H){if(document.activeElement===document.body)for(const $ of H)$.removedNodes.length>0&&Kr(p)};document.addEventListener("focusin",S),document.addEventListener("focusout",b);const O=new MutationObserver(P);return p&&O.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",b),O.disconnect()}}},[d,p,R.paused]),g.useEffect(()=>{if(p){Ip.add(R);const S=document.activeElement;if(!p.contains(S)){const P=new CustomEvent(Ed,Lp);p.addEventListener(Ed,x),p.dispatchEvent(P),P.defaultPrevented||(Mv(Av(Im(p)),{select:!0}),document.activeElement===S&&Kr(p))}return()=>{p.removeEventListener(Ed,x),setTimeout(()=>{const P=new CustomEvent(_d,Lp);p.addEventListener(_d,w),p.dispatchEvent(P),P.defaultPrevented||Kr(S??document.body,{select:!0}),p.removeEventListener(_d,w),Ip.remove(R)},0)}}},[p,x,w,R]);const F=g.useCallback(S=>{if(!a&&!d||R.paused)return;const b=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(b&&P){const O=S.currentTarget,[H,z]=Pv(O);H&&z?!S.shiftKey&&P===z?(S.preventDefault(),a&&Kr(H,{select:!0})):S.shiftKey&&P===H&&(S.preventDefault(),a&&Kr(z,{select:!0})):P===O&&S.preventDefault()}},[a,d,R.paused]);return r.jsx(at.div,{tabIndex:-1,...h,ref:M,onKeyDown:F})});Fm.displayName=_v;function Mv(s,{select:o=!1}={}){const a=document.activeElement;for(const d of s)if(Kr(d,{select:o}),document.activeElement!==a)return}function Pv(s){const o=Im(s),a=Fp(o,s),d=Fp(o.reverse(),s);return[a,d]}function Im(s){const o=[],a=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:d=>{const u=d.tagName==="INPUT"&&d.type==="hidden";return d.disabled||d.hidden||u?NodeFilter.FILTER_SKIP:d.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function Fp(s,o){for(const a of s)if(!Rv(a,{upTo:o}))return a}function Rv(s,{upTo:o}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(o!==void 0&&s===o)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function Ov(s){return s instanceof HTMLInputElement&&"select"in s}function Kr(s,{select:o=!1}={}){if(s&&s.focus){const a=document.activeElement;s.focus({preventScroll:!0}),s!==a&&Ov(s)&&o&&s.select()}}var Ip=Dv();function Dv(){let s=[];return{add(o){const a=s[0];o!==a&&(a==null||a.pause()),s=$p(s,o),s.unshift(o)},remove(o){var a;s=$p(s,o),(a=s[0])==null||a.resume()}}}function $p(s,o){const a=[...s],d=a.indexOf(o);return d!==-1&&a.splice(d,1),a}function Av(s){return s.filter(o=>o.tagName!=="A")}var Tv="Portal",$m=g.forwardRef((s,o)=>{var p;const{container:a,...d}=s,[u,f]=g.useState(!1);Bo(()=>f(!0),[]);const h=a||u&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return h?Am.createPortal(r.jsx(at.div,{...d,ref:o}),h):null});$m.displayName=Tv;function zv(s,o){return g.useReducer((a,d)=>o[a][d]??a,s)}var Ea=s=>{const{present:o,children:a}=s,d=Lv(o),u=typeof a=="function"?a({present:d.isPresent}):g.Children.only(a),f=Fv(d.ref,Iv(u));return typeof a=="function"||d.isPresent?g.cloneElement(u,{ref:f}):null};Ea.displayName="Presence";function Lv(s){const[o,a]=g.useState(),d=g.useRef(null),u=g.useRef(s),f=g.useRef("none"),h=s?"mounted":"unmounted",[p,v]=zv(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=ua(d.current);f.current=p==="mounted"?x:"none"},[p]),Bo(()=>{const x=d.current,w=u.current;if(w!==s){const M=f.current,R=ua(x);s?v("MOUNT"):R==="none"||(x==null?void 0:x.display)==="none"?v("UNMOUNT"):v(w&&M!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=s}},[s,v]),Bo(()=>{if(o){let x;const w=o.ownerDocument.defaultView??window,j=R=>{const S=ua(d.current).includes(CSS.escape(R.animationName));if(R.target===o&&S&&(v("ANIMATION_END"),!u.current)){const b=o.style.animationFillMode;o.style.animationFillMode="forwards",x=w.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=b)})}},M=R=>{R.target===o&&(f.current=ua(d.current))};return o.addEventListener("animationstart",M),o.addEventListener("animationcancel",j),o.addEventListener("animationend",j),()=>{w.clearTimeout(x),o.removeEventListener("animationstart",M),o.removeEventListener("animationcancel",j),o.removeEventListener("animationend",j)}}else v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{d.current=x?getComputedStyle(x):null,a(x)},[])}}function Up(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Fv(...s){const o=g.useRef(s);return o.current=s,g.useCallback(a=>{const d=o.current;let u=!1;const f=d.map(h=>{const p=Up(h,a);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let h=0;h{sr||(sr={start:Bp(),end:Bp()});const{start:s,end:o}=sr;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),fa++,()=>{fa===1&&(sr==null||sr.start.remove(),sr==null||sr.end.remove(),sr=null),fa=Math.max(0,fa-1)}},[])}function Bp(){const s=document.createElement("span");return s.setAttribute("data-radix-focus-guard",""),s.tabIndex=0,s.style.outline="none",s.style.opacity="0",s.style.position="fixed",s.style.pointerEvents="none",s}var ir=function(){return ir=Object.assign||function(o){for(var a,d=1,u=arguments.length;d"u")return ny;var o=sy(s),a=document.documentElement.clientWidth,d=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,d-a+o[2]-o[0])}},ly=Gm(),ys="data-scroll-locked",ay=function(s,o,a,d){var u=s.left,f=s.top,h=s.right,p=s.gap;return a===void 0&&(a="margin"),` - .`.concat(Bv,` { - overflow: hidden `).concat(d,`; - padding-right: `).concat(p,"px ").concat(d,`; - } - body[`).concat(ys,`] { - overflow: hidden `).concat(d,`; - overscroll-behavior: contain; - `).concat([o&&"position: relative ".concat(d,";"),a==="margin"&&` - padding-left: `.concat(u,`px; - padding-top: `).concat(f,`px; - padding-right: `).concat(h,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(p,"px ").concat(d,`; - `),a==="padding"&&"padding-right: ".concat(p,"px ").concat(d,";")].filter(Boolean).join(""),` - } - - .`).concat(wa,` { - right: `).concat(p,"px ").concat(d,`; - } - - .`).concat(ja,` { - margin-right: `).concat(p,"px ").concat(d,`; - } - - .`).concat(wa," .").concat(wa,` { - right: 0 `).concat(d,`; - } - - .`).concat(ja," .").concat(ja,` { - margin-right: 0 `).concat(d,`; - } - - body[`).concat(ys,`] { - `).concat(Hv,": ").concat(p,`px; - } -`)},Gp=function(){var s=parseInt(document.body.getAttribute(ys)||"0",10);return isFinite(s)?s:0},iy=function(){g.useEffect(function(){return document.body.setAttribute(ys,(Gp()+1).toString()),function(){var s=Gp()-1;s<=0?document.body.removeAttribute(ys):document.body.setAttribute(ys,s.toString())}},[])},dy=function(s){var o=s.noRelative,a=s.noImportant,d=s.gapMode,u=d===void 0?"margin":d;iy();var f=g.useMemo(function(){return oy(u)},[u]);return g.createElement(ly,{styles:ay(f,!o,u,a?"":"!important")})},oc=!1;if(typeof window<"u")try{var pa=Object.defineProperty({},"passive",{get:function(){return oc=!0,!0}});window.addEventListener("test",pa,pa),window.removeEventListener("test",pa,pa)}catch{oc=!1}var ps=oc?{passive:!1}:!1,cy=function(s){return s.tagName==="TEXTAREA"},Vm=function(s,o){if(!(s instanceof Element))return!1;var a=window.getComputedStyle(s);return a[o]!=="hidden"&&!(a.overflowY===a.overflowX&&!cy(s)&&a[o]==="visible")},uy=function(s){return Vm(s,"overflowY")},fy=function(s){return Vm(s,"overflowX")},Vp=function(s,o){var a=o.ownerDocument,d=o;do{typeof ShadowRoot<"u"&&d instanceof ShadowRoot&&(d=d.host);var u=Wm(s,d);if(u){var f=Km(s,d),h=f[1],p=f[2];if(h>p)return!0}d=d.parentNode}while(d&&d!==a.body);return!1},py=function(s){var o=s.scrollTop,a=s.scrollHeight,d=s.clientHeight;return[o,a,d]},my=function(s){var o=s.scrollLeft,a=s.scrollWidth,d=s.clientWidth;return[o,a,d]},Wm=function(s,o){return s==="v"?uy(o):fy(o)},Km=function(s,o){return s==="v"?py(o):my(o)},hy=function(s,o){return s==="h"&&o==="rtl"?-1:1},xy=function(s,o,a,d,u){var f=hy(s,window.getComputedStyle(o).direction),h=f*d,p=a.target,v=o.contains(p),x=!1,w=h>0,j=0,M=0;do{if(!p)break;var R=Km(s,p),F=R[0],S=R[1],b=R[2],P=S-b-f*F;(F||P)&&Wm(s,p)&&(j+=P,M+=F);var O=p.parentNode;p=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!v&&p!==document.body||v&&(o.contains(p)||o===p));return(w&&Math.abs(j)<1||!w&&Math.abs(M)<1)&&(x=!0),x},ma=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Wp=function(s){return[s.deltaX,s.deltaY]},Kp=function(s){return s&&"current"in s?s.current:s},gy=function(s,o){return s[0]===o[0]&&s[1]===o[1]},vy=function(s){return` - .block-interactivity-`.concat(s,` {pointer-events: none;} - .allow-interactivity-`).concat(s,` {pointer-events: all;} -`)},yy=0,ms=[];function by(s){var o=g.useRef([]),a=g.useRef([0,0]),d=g.useRef(),u=g.useState(yy++)[0],f=g.useState(Gm)[0],h=g.useRef(s);g.useEffect(function(){h.current=s},[s]),g.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(u));var S=Uv([s.lockRef.current],(s.shards||[]).map(Kp),!0).filter(Boolean);return S.forEach(function(b){return b.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(u))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(S,b){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!h.current.allowPinchZoom;var P=ma(S),O=a.current,H="deltaX"in S?S.deltaX:O[0]-P[0],z="deltaY"in S?S.deltaY:O[1]-P[1],$,I=S.target,B=Math.abs(H)>Math.abs(z)?"h":"v";if("touches"in S&&B==="h"&&I.type==="range")return!1;var ne=window.getSelection(),le=ne&&ne.anchorNode,pe=le?le===I||le.contains(I):!1;if(pe)return!1;var fe=Vp(B,I);if(!fe)return!0;if(fe?$=B:($=B==="v"?"h":"v",fe=Vp(B,I)),!fe)return!1;if(!d.current&&"changedTouches"in S&&(H||z)&&(d.current=$),!$)return!0;var ue=d.current||$;return xy(ue,b,S,ue==="h"?H:z)},[]),v=g.useCallback(function(S){var b=S;if(!(!ms.length||ms[ms.length-1]!==f)){var P="deltaY"in b?Wp(b):ma(b),O=o.current.filter(function($){return $.name===b.type&&($.target===b.target||b.target===$.shadowParent)&&gy($.delta,P)})[0];if(O&&O.should){b.cancelable&&b.preventDefault();return}if(!O){var H=(h.current.shards||[]).map(Kp).filter(Boolean).filter(function($){return $.contains(b.target)}),z=H.length>0?p(b,H[0]):!h.current.noIsolation;z&&b.cancelable&&b.preventDefault()}}},[]),x=g.useCallback(function(S,b,P,O){var H={name:S,delta:b,target:P,should:O,shadowParent:wy(P)};o.current.push(H),setTimeout(function(){o.current=o.current.filter(function(z){return z!==H})},1)},[]),w=g.useCallback(function(S){a.current=ma(S),d.current=void 0},[]),j=g.useCallback(function(S){x(S.type,Wp(S),S.target,p(S,s.lockRef.current))},[]),M=g.useCallback(function(S){x(S.type,ma(S),S.target,p(S,s.lockRef.current))},[]);g.useEffect(function(){return ms.push(f),s.setCallbacks({onScrollCapture:j,onWheelCapture:j,onTouchMoveCapture:M}),document.addEventListener("wheel",v,ps),document.addEventListener("touchmove",v,ps),document.addEventListener("touchstart",w,ps),function(){ms=ms.filter(function(S){return S!==f}),document.removeEventListener("wheel",v,ps),document.removeEventListener("touchmove",v,ps),document.removeEventListener("touchstart",w,ps)}},[]);var R=s.removeScrollBar,F=s.inert;return g.createElement(g.Fragment,null,F?g.createElement(f,{styles:vy(u)}):null,R?g.createElement(dy,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function wy(s){for(var o=null;s!==null;)s instanceof ShadowRoot&&(o=s.host,s=s.host),s=s.parentNode;return o}const jy=Zv(Hm,by);var Qm=g.forwardRef(function(s,o){return g.createElement(_a,ir({},s,{ref:o,sideCar:jy}))});Qm.classNames=_a.classNames;var ky=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},hs=new WeakMap,ha=new WeakMap,xa={},Od=0,qm=function(s){return s&&(s.host||qm(s.parentNode))},Ny=function(s,o){return o.map(function(a){if(s.contains(a))return a;var d=qm(a);return d&&s.contains(d)?d:(console.error("aria-hidden",a,"in not contained inside",s,". Doing nothing"),null)}).filter(function(a){return!!a})},Sy=function(s,o,a,d){var u=Ny(o,Array.isArray(s)?s:[s]);xa[a]||(xa[a]=new WeakMap);var f=xa[a],h=[],p=new Set,v=new Set(u),x=function(j){!j||p.has(j)||(p.add(j),x(j.parentNode))};u.forEach(x);var w=function(j){!j||v.has(j)||Array.prototype.forEach.call(j.children,function(M){if(p.has(M))w(M);else try{var R=M.getAttribute(d),F=R!==null&&R!=="false",S=(hs.get(M)||0)+1,b=(f.get(M)||0)+1;hs.set(M,S),f.set(M,b),h.push(M),S===1&&F&&ha.set(M,!0),b===1&&M.setAttribute(a,"true"),F||M.setAttribute(d,"true")}catch(P){console.error("aria-hidden: cannot operate on ",M,P)}})};return w(o),p.clear(),Od++,function(){h.forEach(function(j){var M=hs.get(j)-1,R=f.get(j)-1;hs.set(j,M),f.set(j,R),M||(ha.has(j)||j.removeAttribute(d),ha.delete(j)),R||j.removeAttribute(a)}),Od--,Od||(hs=new WeakMap,hs=new WeakMap,ha=new WeakMap,xa={})}},Cy=function(s,o,a){a===void 0&&(a="data-aria-hidden");var d=Array.from(Array.isArray(s)?s:[s]),u=ky(s);return u?(d.push.apply(d,Array.from(u.querySelectorAll("[aria-live], script"))),Sy(d,u,a,"aria-hidden")):function(){return null}},Ma="Dialog",[Zm]=ev(Ma),[Ey,Jt]=Zm(Ma),Ym=s=>{const{__scopeDialog:o,children:a,open:d,defaultOpen:u,onOpenChange:f,modal:h=!0}=s,p=g.useRef(null),v=g.useRef(null),[x,w]=ov({prop:d,defaultProp:u??!1,onChange:f,caller:Ma});return r.jsx(Ey,{scope:o,triggerRef:p,contentRef:v,contentId:Nr(),titleId:Nr(),descriptionId:Nr(),open:x,onOpenChange:w,onOpenToggle:g.useCallback(()=>w(j=>!j),[w]),modal:h,children:a})};Ym.displayName=Ma;var Jm="DialogTrigger",_y=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Jt(Jm,a),f=An(o,u.triggerRef);return r.jsx(at.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":yc(u.open),...d,ref:f,onClick:nn(s.onClick,u.onOpenToggle)})});_y.displayName=Jm;var vc="DialogPortal",[My,Xm]=Zm(vc,{forceMount:void 0}),eh=s=>{const{__scopeDialog:o,forceMount:a,children:d,container:u}=s,f=Jt(vc,o);return r.jsx(My,{scope:o,forceMount:a,children:g.Children.map(d,h=>r.jsx(Ea,{present:a||f.open,children:r.jsx($m,{asChild:!0,container:u,children:h})}))})};eh.displayName=vc;var Ca="DialogOverlay",th=g.forwardRef((s,o)=>{const a=Xm(Ca,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Jt(Ca,s.__scopeDialog);return f.modal?r.jsx(Ea,{present:d||f.open,children:r.jsx(Ry,{...u,ref:o})}):null});th.displayName=Ca;var Py=Tm("DialogOverlay.RemoveScroll"),Ry=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Jt(Ca,a),f=Sv(),h=An(o,f);return r.jsx(Qm,{as:Py,allowPinchZoom:!0,shards:[u.contentRef],children:r.jsx(at.div,{"data-state":yc(u.open),...d,ref:h,style:{pointerEvents:"auto",...d.style}})})}),Ls="DialogContent",rh=g.forwardRef((s,o)=>{const a=Xm(Ls,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Jt(Ls,s.__scopeDialog);return r.jsx(Ea,{present:d||f.open,children:f.modal?r.jsx(Oy,{...u,ref:o}):r.jsx(Dy,{...u,ref:o})})});rh.displayName=Ls;var Oy=g.forwardRef((s,o)=>{const a=Jt(Ls,s.__scopeDialog),d=g.useRef(null),u=An(o,a.contentRef,d);return g.useEffect(()=>{const f=d.current;if(f)return Cy(f)},[]),r.jsx(nh,{...s,ref:u,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:nn(s.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:nn(s.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0;(h.button===2||p)&&f.preventDefault()}),onFocusOutside:nn(s.onFocusOutside,f=>f.preventDefault())})}),Dy=g.forwardRef((s,o)=>{const a=Jt(Ls,s.__scopeDialog),d=g.useRef(!1),u=g.useRef(!1);return r.jsx(nh,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,p;(h=s.onCloseAutoFocus)==null||h.call(s,f),f.defaultPrevented||(d.current||(p=a.triggerRef.current)==null||p.focus(),f.preventDefault()),d.current=!1,u.current=!1},onInteractOutside:f=>{var v,x;(v=s.onInteractOutside)==null||v.call(s,f),f.defaultPrevented||(d.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const h=f.target;((x=a.triggerRef.current)==null?void 0:x.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})}),nh=g.forwardRef((s,o)=>{const{__scopeDialog:a,trapFocus:d,onOpenAutoFocus:u,onCloseAutoFocus:f,...h}=s,p=Jt(Ls,a);return $v(),r.jsx(r.Fragment,{children:r.jsx(Fm,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:u,onUnmountAutoFocus:f,children:r.jsx(zm,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":yc(p.open),...h,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),sh="DialogTitle",Ay=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Jt(sh,a);return r.jsx(at.h2,{id:u.titleId,...d,ref:o})});Ay.displayName=sh;var oh="DialogDescription",Ty=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Jt(oh,a);return r.jsx(at.p,{id:u.descriptionId,...d,ref:o})});Ty.displayName=oh;var lh="DialogClose",zy=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Jt(lh,a);return r.jsx(at.button,{type:"button",...d,ref:o,onClick:nn(s.onClick,()=>u.onOpenChange(!1))})});zy.displayName=lh;function yc(s){return s?"open":"closed"}var Po='[cmdk-group=""]',Dd='[cmdk-group-items=""]',Ly='[cmdk-group-heading=""]',ah='[cmdk-item=""]',Qp=`${ah}:not([aria-disabled="true"])`,lc="cmdk-item-select",gs="data-value",Fy=(s,o,a)=>X0(s,o,a),ih=g.createContext(void 0),Yo=()=>g.useContext(ih),dh=g.createContext(void 0),bc=()=>g.useContext(dh),ch=g.createContext(void 0),uh=g.forwardRef((s,o)=>{let a=vs(()=>{var C,K;return{search:"",value:(K=(C=s.value)!=null?C:s.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=vs(()=>new Set),u=vs(()=>new Map),f=vs(()=>new Map),h=vs(()=>new Set),p=fh(s),{label:v,children:x,value:w,onValueChange:j,filter:M,shouldFilter:R,loop:F,disablePointerSelection:S=!1,vimBindings:b=!0,...P}=s,O=Nr(),H=Nr(),z=Nr(),$=g.useRef(null),I=qy();Dn(()=>{if(w!==void 0){let C=w.trim();a.current.value=C,B.emit()}},[w]),Dn(()=>{I(6,Te)},[]);let B=g.useMemo(()=>({subscribe:C=>(h.current.add(C),()=>h.current.delete(C)),snapshot:()=>a.current,setState:(C,K,J)=>{var q,ae,me,je;if(!Object.is(a.current[C],K)){if(a.current[C]=K,C==="search")ue(),pe(),I(1,fe);else if(C==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(z);U?U.focus():(q=document.getElementById(O))==null||q.focus()}if(I(7,()=>{var U;a.current.selectedItemId=(U=Se())==null?void 0:U.id,B.emit()}),J||I(5,Te),((ae=p.current)==null?void 0:ae.value)!==void 0){let U=K??"";(je=(me=p.current).onValueChange)==null||je.call(me,U);return}}B.emit()}},emit:()=>{h.current.forEach(C=>C())}}),[]),ne=g.useMemo(()=>({value:(C,K,J)=>{var q;K!==((q=f.current.get(C))==null?void 0:q.value)&&(f.current.set(C,{value:K,keywords:J}),a.current.filtered.items.set(C,le(K,J)),I(2,()=>{pe(),B.emit()}))},item:(C,K)=>(d.current.add(C),K&&(u.current.has(K)?u.current.get(K).add(C):u.current.set(K,new Set([C]))),I(3,()=>{ue(),pe(),a.current.value||fe(),B.emit()}),()=>{f.current.delete(C),d.current.delete(C),a.current.filtered.items.delete(C);let J=Se();I(4,()=>{ue(),(J==null?void 0:J.getAttribute("id"))===C&&fe(),B.emit()})}),group:C=>(u.current.has(C)||u.current.set(C,new Set),()=>{f.current.delete(C),u.current.delete(C)}),filter:()=>p.current.shouldFilter,label:v||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:O,inputId:z,labelId:H,listInnerRef:$}),[]);function le(C,K){var J,q;let ae=(q=(J=p.current)==null?void 0:J.filter)!=null?q:Fy;return C?ae(C,a.current.search,K):0}function pe(){if(!a.current.search||p.current.shouldFilter===!1)return;let C=a.current.filtered.items,K=[];a.current.filtered.groups.forEach(q=>{let ae=u.current.get(q),me=0;ae.forEach(je=>{let U=C.get(je);me=Math.max(U,me)}),K.push([q,me])});let J=$.current;ze().sort((q,ae)=>{var me,je;let U=q.getAttribute("id"),xe=ae.getAttribute("id");return((me=C.get(xe))!=null?me:0)-((je=C.get(U))!=null?je:0)}).forEach(q=>{let ae=q.closest(Dd);ae?ae.appendChild(q.parentElement===ae?q:q.closest(`${Dd} > *`)):J.appendChild(q.parentElement===J?q:q.closest(`${Dd} > *`))}),K.sort((q,ae)=>ae[1]-q[1]).forEach(q=>{var ae;let me=(ae=$.current)==null?void 0:ae.querySelector(`${Po}[${gs}="${encodeURIComponent(q[0])}"]`);me==null||me.parentElement.appendChild(me)})}function fe(){let C=ze().find(J=>J.getAttribute("aria-disabled")!=="true"),K=C==null?void 0:C.getAttribute(gs);B.setState("value",K||void 0)}function ue(){var C,K,J,q;if(!a.current.search||p.current.shouldFilter===!1){a.current.filtered.count=d.current.size;return}a.current.filtered.groups=new Set;let ae=0;for(let me of d.current){let je=(K=(C=f.current.get(me))==null?void 0:C.value)!=null?K:"",U=(q=(J=f.current.get(me))==null?void 0:J.keywords)!=null?q:[],xe=le(je,U);a.current.filtered.items.set(me,xe),xe>0&&ae++}for(let[me,je]of u.current)for(let U of je)if(a.current.filtered.items.get(U)>0){a.current.filtered.groups.add(me);break}a.current.filtered.count=ae}function Te(){var C,K,J;let q=Se();q&&(((C=q.parentElement)==null?void 0:C.firstChild)===q&&((J=(K=q.closest(Po))==null?void 0:K.querySelector(Ly))==null||J.scrollIntoView({block:"nearest"})),q.scrollIntoView({block:"nearest"}))}function Se(){var C;return(C=$.current)==null?void 0:C.querySelector(`${ah}[aria-selected="true"]`)}function ze(){var C;return Array.from(((C=$.current)==null?void 0:C.querySelectorAll(Qp))||[])}function Pe(C){let K=ze()[C];K&&B.setState("value",K.getAttribute(gs))}function Me(C){var K;let J=Se(),q=ze(),ae=q.findIndex(je=>je===J),me=q[ae+C];(K=p.current)!=null&&K.loop&&(me=ae+C<0?q[q.length-1]:ae+C===q.length?q[0]:q[ae+C]),me&&B.setState("value",me.getAttribute(gs))}function Z(C){let K=Se(),J=K==null?void 0:K.closest(Po),q;for(;J&&!q;)J=C>0?Ky(J,Po):Qy(J,Po),q=J==null?void 0:J.querySelector(Qp);q?B.setState("value",q.getAttribute(gs)):Me(C)}let se=()=>Pe(ze().length-1),X=C=>{C.preventDefault(),C.metaKey?se():C.altKey?Z(1):Me(1)},E=C=>{C.preventDefault(),C.metaKey?Pe(0):C.altKey?Z(-1):Me(-1)};return g.createElement(at.div,{ref:o,tabIndex:-1,...P,"cmdk-root":"",onKeyDown:C=>{var K;(K=P.onKeyDown)==null||K.call(P,C);let J=C.nativeEvent.isComposing||C.keyCode===229;if(!(C.defaultPrevented||J))switch(C.key){case"n":case"j":{b&&C.ctrlKey&&X(C);break}case"ArrowDown":{X(C);break}case"p":case"k":{b&&C.ctrlKey&&E(C);break}case"ArrowUp":{E(C);break}case"Home":{C.preventDefault(),Pe(0);break}case"End":{C.preventDefault(),se();break}case"Enter":{C.preventDefault();let q=Se();if(q){let ae=new Event(lc);q.dispatchEvent(ae)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ne.inputId,id:ne.labelId,style:Yy},v),Pa(s,C=>g.createElement(dh.Provider,{value:B},g.createElement(ih.Provider,{value:ne},C))))}),Iy=g.forwardRef((s,o)=>{var a,d;let u=Nr(),f=g.useRef(null),h=g.useContext(ch),p=Yo(),v=fh(s),x=(d=(a=v.current)==null?void 0:a.forceMount)!=null?d:h==null?void 0:h.forceMount;Dn(()=>{if(!x)return p.item(u,h==null?void 0:h.id)},[x]);let w=ph(u,f,[s.value,s.children,f],s.keywords),j=bc(),M=on(I=>I.value&&I.value===w.current),R=on(I=>x||p.filter()===!1?!0:I.search?I.filtered.items.get(u)>0:!0);g.useEffect(()=>{let I=f.current;if(!(!I||s.disabled))return I.addEventListener(lc,F),()=>I.removeEventListener(lc,F)},[R,s.onSelect,s.disabled]);function F(){var I,B;S(),(B=(I=v.current).onSelect)==null||B.call(I,w.current)}function S(){j.setState("value",w.current,!0)}if(!R)return null;let{disabled:b,value:P,onSelect:O,forceMount:H,keywords:z,...$}=s;return g.createElement(at.div,{ref:zs(f,o),...$,id:u,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!M,"data-disabled":!!b,"data-selected":!!M,onPointerMove:b||p.getDisablePointerSelection()?void 0:S,onClick:b?void 0:F},s.children)}),$y=g.forwardRef((s,o)=>{let{heading:a,children:d,forceMount:u,...f}=s,h=Nr(),p=g.useRef(null),v=g.useRef(null),x=Nr(),w=Yo(),j=on(R=>u||w.filter()===!1?!0:R.search?R.filtered.groups.has(h):!0);Dn(()=>w.group(h),[]),ph(h,p,[s.value,s.heading,v]);let M=g.useMemo(()=>({id:h,forceMount:u}),[u]);return g.createElement(at.div,{ref:zs(p,o),...f,"cmdk-group":"",role:"presentation",hidden:j?void 0:!0},a&&g.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:x},a),Pa(s,R=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?x:void 0},g.createElement(ch.Provider,{value:M},R))))}),Uy=g.forwardRef((s,o)=>{let{alwaysRender:a,...d}=s,u=g.useRef(null),f=on(h=>!h.search);return!a&&!f?null:g.createElement(at.div,{ref:zs(u,o),...d,"cmdk-separator":"",role:"separator"})}),By=g.forwardRef((s,o)=>{let{onValueChange:a,...d}=s,u=s.value!=null,f=bc(),h=on(x=>x.search),p=on(x=>x.selectedItemId),v=Yo();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(at.input,{ref:o,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":p,id:v.inputId,type:"text",value:u?s.value:h,onChange:x=>{u||f.setState("search",x.target.value),a==null||a(x.target.value)}})}),Hy=g.forwardRef((s,o)=>{let{children:a,label:d="Suggestions",...u}=s,f=g.useRef(null),h=g.useRef(null),p=on(x=>x.selectedItemId),v=Yo();return g.useEffect(()=>{if(h.current&&f.current){let x=h.current,w=f.current,j,M=new ResizeObserver(()=>{j=requestAnimationFrame(()=>{let R=x.offsetHeight;w.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return M.observe(x),()=>{cancelAnimationFrame(j),M.unobserve(x)}}},[]),g.createElement(at.div,{ref:zs(f,o),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":d,id:v.listId},Pa(s,x=>g.createElement("div",{ref:zs(h,v.listInnerRef),"cmdk-list-sizer":""},x)))}),Gy=g.forwardRef((s,o)=>{let{open:a,onOpenChange:d,overlayClassName:u,contentClassName:f,container:h,...p}=s;return g.createElement(Ym,{open:a,onOpenChange:d},g.createElement(eh,{container:h},g.createElement(th,{"cmdk-overlay":"",className:u}),g.createElement(rh,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(uh,{ref:o,...p}))))}),Vy=g.forwardRef((s,o)=>on(a=>a.filtered.count===0)?g.createElement(at.div,{ref:o,...s,"cmdk-empty":"",role:"presentation"}):null),Wy=g.forwardRef((s,o)=>{let{progress:a,children:d,label:u="Loading...",...f}=s;return g.createElement(at.div,{ref:o,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},Pa(s,h=>g.createElement("div",{"aria-hidden":!0},h)))}),xs=Object.assign(uh,{List:Hy,Item:Iy,Input:By,Group:$y,Separator:Uy,Dialog:Gy,Empty:Vy,Loading:Wy});function Ky(s,o){let a=s.nextElementSibling;for(;a;){if(a.matches(o))return a;a=a.nextElementSibling}}function Qy(s,o){let a=s.previousElementSibling;for(;a;){if(a.matches(o))return a;a=a.previousElementSibling}}function fh(s){let o=g.useRef(s);return Dn(()=>{o.current=s}),o}var Dn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function vs(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function on(s){let o=bc(),a=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,a,a)}function ph(s,o,a,d=[]){let u=g.useRef(),f=Yo();return Dn(()=>{var h;let p=(()=>{var x;for(let w of a){if(typeof w=="string")return w.trim();if(typeof w=="object"&&"current"in w)return w.current?(x=w.current.textContent)==null?void 0:x.trim():u.current}})(),v=d.map(x=>x.trim());f.value(s,p,v),(h=o.current)==null||h.setAttribute(gs,p),u.current=p}),u}var qy=()=>{let[s,o]=g.useState(),a=vs(()=>new Map);return Dn(()=>{a.current.forEach(d=>d()),a.current=new Map},[s]),(d,u)=>{a.current.set(d,u),o({})}};function Zy(s){let o=s.type;return typeof o=="function"?o(s.props):"render"in o?o.render(s.props):s}function Pa({asChild:s,children:o},a){return s&&g.isValidElement(o)?g.cloneElement(Zy(o),{ref:o.ref},a(o.props.children)):a(o)}var Yy={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Jy({onNavigate:s}){const[o,a]=g.useState(!1);return g.useEffect(()=>{const d=u=>{(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),a(f=>!f))};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[]),r.jsx(xs.Dialog,{open:o,onOpenChange:a,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>a(!1),children:r.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:d=>d.stopPropagation(),children:[r.jsx(xs.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),r.jsxs(xs.List,{className:"max-h-80 overflow-y-auto p-2",children:[r.jsx(xs.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),r.jsx(xs.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:rc.map(d=>r.jsxs(xs.Item,{value:`${d.label} ${d.hint}`,onSelect:()=>{s(d.id),a(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[r.jsx(d.icon,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:d.label}),r.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:d.hint})]},d.id))})]})]})})}async function be(s,o){var v;const a={"Content-Type":"application/json",...o==null?void 0:o.headers},d=localStorage.getItem("mc_sudo_password"),u=localStorage.getItem("mc_hf_token");d&&(a["X-Sudo-Password"]=d);let f=o==null?void 0:o.body;if((((v=o==null?void 0:o.method)==null?void 0:v.toUpperCase())||"GET")==="POST"){if(typeof f=="string")try{const x=JSON.parse(f);let w=!1;d&&!("sudo_password"in x)&&(x.sudo_password=d,w=!0),u&&!("hf_token"in x)&&(x.hf_token=u,w=!0),w&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};d&&(x.sudo_password=d),u&&(x.hf_token=u),Object.keys(x).length>0&&(f=JSON.stringify(x))}}const p=await fetch(s,{...o,headers:a,body:f});if(!p.ok)throw new Error(`${p.status} ${p.statusText}`);return p.json()}const Qe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:s=>["drafts",s??""],connect:s=>["connect",s??""],memory:(s,o)=>["memory",s??"",o??""]},Xy=()=>St({queryKey:Qe.health,queryFn:()=>be("/api/health"),refetchInterval:1e4}),wc=(s=5e3)=>St({queryKey:Qe.systemStatus,queryFn:()=>be("/api/system/status"),refetchInterval:s}),eb=(s=3e3)=>St({queryKey:Qe.services,queryFn:()=>be("/api/system/services"),refetchInterval:s}),Fs=(s=4e3)=>St({queryKey:Qe.models,queryFn:()=>be("/api/models"),refetchInterval:s}),tb=(s=4e3)=>St({queryKey:Qe.routing,queryFn:()=>be("/api/routing"),refetchInterval:s}),mh=(s=2e3)=>St({queryKey:Qe.jobs,queryFn:()=>be("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),hh=(s=3e3)=>St({queryKey:Qe.tokenStats,queryFn:()=>be("/api/system/token-stats"),refetchInterval:s}),xh=(s=5e3)=>St({queryKey:Qe.agentStatus,queryFn:()=>be("/api/agent/status"),refetchInterval:s}),rb=(s=6e4)=>St({queryKey:Qe.hermesBrain,queryFn:()=>be("/api/agent/brain"),refetchInterval:s}),jc=s=>St({queryKey:Qe.updates,queryFn:()=>be("/api/maintenance/updates"),refetchInterval:s}),nb=()=>St({queryKey:Qe.discover,queryFn:()=>be("/api/discover")}),sb=s=>St({queryKey:Qe.drafts(s),queryFn:()=>be(`/api/models/drafts?target=${encodeURIComponent(s??"")}`),enabled:!!s}),gh=s=>St({queryKey:Qe.connect(s),queryFn:()=>be(s?`/api/connect?${s}`:"/api/connect")}),vh=s=>St({queryKey:Qe.memory(s==null?void 0:s.q,s==null?void 0:s.category),queryFn:()=>{const o=new URLSearchParams;return s!=null&&s.q&&o.set("q",s.q),s!=null&&s.category&&o.set("category",s.category),be(`/api/memory?${o}`)},select:o=>s!=null&&s.limit?o.slice(0,s.limit):o});function Nt(s){return(s/1024**3).toFixed(1)}function ac(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function Zt(s){if(!s)return"—";const o=s/1024**3;return o>=1?`${o.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function ob(s){if(!s)return"";const o=Math.floor(s/60);return o>0?`${o} min`:`${s} s`}function qp(s){return s?`${Math.round(s/1024)}k`:"—"}function yh(s){var o,a,d="";if(typeof s=="string"||typeof s=="number")d+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(o=0;o{const o=db(s),{conflictingClassGroups:a,conflictingClassGroupModifiers:d}=s;return{getClassGroupId:h=>{const p=h.split(kc);return p[0]===""&&p.length!==1&&p.shift(),bh(p,o)||ib(h)},getConflictingClassGroupIds:(h,p)=>{const v=a[h]||[];return p&&d[h]?[...v,...d[h]]:v}}},bh=(s,o)=>{var h;if(s.length===0)return o.classGroupId;const a=s[0],d=o.nextPart.get(a),u=d?bh(s.slice(1),d):void 0;if(u)return u;if(o.validators.length===0)return;const f=s.join(kc);return(h=o.validators.find(({validator:p})=>p(f)))==null?void 0:h.classGroupId},Zp=/^\[(.+)\]$/,ib=s=>{if(Zp.test(s)){const o=Zp.exec(s)[1],a=o==null?void 0:o.substring(0,o.indexOf(":"));if(a)return"arbitrary.."+a}},db=s=>{const{theme:o,prefix:a}=s,d={nextPart:new Map,validators:[]};return ub(Object.entries(s.classGroups),a).forEach(([f,h])=>{ic(h,d,f,o)}),d},ic=(s,o,a,d)=>{s.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Yp(o,u);f.classGroupId=a;return}if(typeof u=="function"){if(cb(u)){ic(u(d),o,a,d);return}o.validators.push({validator:u,classGroupId:a});return}Object.entries(u).forEach(([f,h])=>{ic(h,Yp(o,f),a,d)})})},Yp=(s,o)=>{let a=s;return o.split(kc).forEach(d=>{a.nextPart.has(d)||a.nextPart.set(d,{nextPart:new Map,validators:[]}),a=a.nextPart.get(d)}),a},cb=s=>s.isThemeGetter,ub=(s,o)=>o?s.map(([a,d])=>{const u=d.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,p])=>[o+h,p])):f);return[a,u]}):s,fb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,a=new Map,d=new Map;const u=(f,h)=>{a.set(f,h),o++,o>s&&(o=0,d=a,a=new Map)};return{get(f){let h=a.get(f);if(h!==void 0)return h;if((h=d.get(f))!==void 0)return u(f,h),h},set(f,h){a.has(f)?a.set(f,h):u(f,h)}}},wh="!",pb=s=>{const{separator:o,experimentalParseClassName:a}=s,d=o.length===1,u=o[0],f=o.length,h=p=>{const v=[];let x=0,w=0,j;for(let b=0;bw?j-w:void 0;return{modifiers:v,hasImportantModifier:R,baseClassName:F,maybePostfixModifierPosition:S}};return a?p=>a({className:p,parseClassName:h}):h},mb=s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(d=>{d[0]==="["?(o.push(...a.sort(),d),a=[]):a.push(d)}),o.push(...a.sort()),o},hb=s=>({cache:fb(s.cacheSize),parseClassName:pb(s),...ab(s)}),xb=/\s+/,gb=(s,o)=>{const{parseClassName:a,getClassGroupId:d,getConflictingClassGroupIds:u}=o,f=[],h=s.trim().split(xb);let p="";for(let v=h.length-1;v>=0;v-=1){const x=h[v],{modifiers:w,hasImportantModifier:j,baseClassName:M,maybePostfixModifierPosition:R}=a(x);let F=!!R,S=d(F?M.substring(0,R):M);if(!S){if(!F){p=x+(p.length>0?" "+p:p);continue}if(S=d(M),!S){p=x+(p.length>0?" "+p:p);continue}F=!1}const b=mb(w).join(":"),P=j?b+wh:b,O=P+S;if(f.includes(O))continue;f.push(O);const H=u(S,F);for(let z=0;z0?" "+p:p)}return p};function vb(){let s=0,o,a,d="";for(;s{if(typeof s=="string")return s;let o,a="";for(let d=0;dj(w),s());return a=hb(x),d=a.cache.get,u=a.cache.set,f=p,p(v)}function p(v){const x=d(v);if(x)return x;const w=gb(v,a);return u(v,w),w}return function(){return f(vb.apply(null,arguments))}}const Be=s=>{const o=a=>a[s]||[];return o.isThemeGetter=!0,o},kh=/^\[(?:([a-z-]+):)?(.+)\]$/i,bb=/^\d+\/\d+$/,wb=new Set(["px","full","screen"]),jb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yr=s=>bs(s)||wb.has(s)||bb.test(s),Gr=s=>Is(s,"length",Ab),bs=s=>!!s&&!Number.isNaN(Number(s)),Ad=s=>Is(s,"number",bs),Ro=s=>!!s&&Number.isInteger(Number(s)),Eb=s=>s.endsWith("%")&&bs(s.slice(0,-1)),Ne=s=>kh.test(s),Vr=s=>jb.test(s),_b=new Set(["length","size","percentage"]),Mb=s=>Is(s,_b,Nh),Pb=s=>Is(s,"position",Nh),Rb=new Set(["image","url"]),Ob=s=>Is(s,Rb,zb),Db=s=>Is(s,"",Tb),Oo=()=>!0,Is=(s,o,a)=>{const d=kh.exec(s);return d?d[1]?typeof o=="string"?d[1]===o:o.has(d[1]):a(d[2]):!1},Ab=s=>kb.test(s)&&!Nb.test(s),Nh=()=>!1,Tb=s=>Sb.test(s),zb=s=>Cb.test(s),Lb=()=>{const s=Be("colors"),o=Be("spacing"),a=Be("blur"),d=Be("brightness"),u=Be("borderColor"),f=Be("borderRadius"),h=Be("borderSpacing"),p=Be("borderWidth"),v=Be("contrast"),x=Be("grayscale"),w=Be("hueRotate"),j=Be("invert"),M=Be("gap"),R=Be("gradientColorStops"),F=Be("gradientColorStopPositions"),S=Be("inset"),b=Be("margin"),P=Be("opacity"),O=Be("padding"),H=Be("saturate"),z=Be("scale"),$=Be("sepia"),I=Be("skew"),B=Be("space"),ne=Be("translate"),le=()=>["auto","contain","none"],pe=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",Ne,o],ue=()=>[Ne,o],Te=()=>["",yr,Gr],Se=()=>["auto",bs,Ne],ze=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Pe=()=>["solid","dashed","dotted","double","none"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",Ne],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[bs,Ne];return{cacheSize:500,separator:":",theme:{colors:[Oo],spacing:[yr,Gr],blur:["none","",Vr,Ne],brightness:E(),borderColor:[s],borderRadius:["none","","full",Vr,Ne],borderSpacing:ue(),borderWidth:Te(),contrast:E(),grayscale:se(),hueRotate:E(),invert:se(),gap:ue(),gradientColorStops:[s],gradientColorStopPositions:[Eb,Gr],inset:fe(),margin:fe(),opacity:E(),padding:ue(),saturate:E(),scale:E(),sepia:se(),skew:E(),space:ue(),translate:ue()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Vr]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ze(),Ne]}],overflow:[{overflow:pe()}],"overflow-x":[{"overflow-x":pe()}],"overflow-y":[{"overflow-y":pe()}],overscroll:[{overscroll:le()}],"overscroll-x":[{"overscroll-x":le()}],"overscroll-y":[{"overscroll-y":le()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ro,Ne]}],basis:[{basis:fe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Ro,Ne]}],"grid-cols":[{"grid-cols":[Oo]}],"col-start-end":[{col:["auto",{span:["full",Ro,Ne]},Ne]}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":[Oo]}],"row-start-end":[{row:["auto",{span:[Ro,Ne]},Ne]}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,o]}],"min-w":[{"min-w":[Ne,o,"min","max","fit"]}],"max-w":[{"max-w":[Ne,o,"none","full","min","max","fit","prose",{screen:[Vr]},Vr]}],h:[{h:[Ne,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Vr,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ad]}],"font-family":[{font:[Oo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",bs,Ad]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yr,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yr,Gr]}],"underline-offset":[{"underline-offset":["auto",yr,Ne]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ue()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ze(),Pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ob]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[F]}],"gradient-via-pos":[{via:[F]}],"gradient-to-pos":[{to:[F]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...Pe(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:Pe()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...Pe()]}],"outline-offset":[{"outline-offset":[yr,Ne]}],"outline-w":[{outline:[yr,Gr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[yr,Gr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Vr,Db]}],"shadow-color":[{shadow:[Oo]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...Me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Me()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[d]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Vr,Ne]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[j]}],saturate:[{saturate:[H]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[d]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[j]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[Ro,Ne]}],"translate-x":[{"translate-x":[ne]}],"translate-y":[{"translate-y":[ne]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",s]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ue()}],"scroll-mx":[{"scroll-mx":ue()}],"scroll-my":[{"scroll-my":ue()}],"scroll-ms":[{"scroll-ms":ue()}],"scroll-me":[{"scroll-me":ue()}],"scroll-mt":[{"scroll-mt":ue()}],"scroll-mr":[{"scroll-mr":ue()}],"scroll-mb":[{"scroll-mb":ue()}],"scroll-ml":[{"scroll-ml":ue()}],"scroll-p":[{"scroll-p":ue()}],"scroll-px":[{"scroll-px":ue()}],"scroll-py":[{"scroll-py":ue()}],"scroll-ps":[{"scroll-ps":ue()}],"scroll-pe":[{"scroll-pe":ue()}],"scroll-pt":[{"scroll-pt":ue()}],"scroll-pr":[{"scroll-pr":ue()}],"scroll-pb":[{"scroll-pb":ue()}],"scroll-pl":[{"scroll-pl":ue()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[yr,Gr,Ad]}],stroke:[{stroke:[s,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Fb=yb(Lb);function Y(...s){return Fb(lb(s))}function Go(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Sh=["fast","heavy","coder","vision","scout"],Ib={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},Nc=s=>s&&Ib[s]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function $b({fit:s}){const o={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[s.level];return r.jsxs("span",{className:Y("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",o),children:[s.text," • ",s.req_gb," GB RAM"]})}function Jp(s){const o=s.toLowerCase();return o.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:o.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:o.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:o.includes("mistral")||o.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:o.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:o.includes("hermes")||o.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:o.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function Ub(){const{data:s}=Fs(2e3),{data:o}=hh(2e3),a=(s==null?void 0:s.models)??[],d=(s==null?void 0:s.running)??[],u=a.filter(v=>d.includes(v.name)),f=g.useRef(null),[h,p]=g.useState(!1);return g.useEffect(()=>{if(!o)return;const v=o.total_tokens;if(f.current!==null&&v>f.current){p(!0);const x=setTimeout(()=>p(!1),4e3);return f.current=v,()=>clearTimeout(x)}f.current=v},[o==null?void 0:o.total_tokens]),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Lo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),r.jsxs("span",{className:Y("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",h?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[h?r.jsx(Uo,{className:"h-3 w-3 animate-pulse"}):r.jsx(T0,{className:"h-3 w-3"}),h?"Inferenz aktiv":"Idle"]})]}),u.length===0?r.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):r.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:u.map(v=>{var x;return r.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[v.role&&r.jsx("span",{className:Y("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Nc(v.role)),children:v.role}),r.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(x=v.name.split("/").pop())==null?void 0:x.replace(/\.gguf$/i,"")})]}),r.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Zt(v.size_bytes)," im Unified-RAM"]})]}),r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[r.jsx("span",{className:Y("h-1.5 w-1.5 rounded-full bg-emerald-500",h&&"animate-pulse")})," warm"]})]},v.name)})})]})}function ga({value:s,label:o,detail:a}){const u=2*Math.PI*24,f=u-Math.min(s,100)/100*u,h=s>90?"stroke-red-500":s>75?"stroke-amber-500":"stroke-primary";return r.jsxs("div",{className:"flex flex-col items-center gap-1.5 p-2 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[r.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90",children:[r.jsx("circle",{cx:"32",cy:"32",r:24,className:"stroke-muted fill-none",strokeWidth:"4.5"}),r.jsx("circle",{cx:"32",cy:"32",r:24,className:Y("fill-none transition-all duration-700 ease-out",h),strokeWidth:"4.5",strokeDasharray:u,strokeDashoffset:f,strokeLinecap:"round"})]}),r.jsxs("span",{className:"text-xs font-mono font-bold tracking-tight text-foreground",children:[Math.round(s),"%"]})]}),r.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:o}),a&&r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function Bb(){const{data:s}=wc(3e3);return r.jsxs("div",{className:"md:col-span-2 flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Dt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"System-Status"})]}),s?r.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[r.jsx(ga,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),r.jsx(ga,{value:s.ram.percent,label:"RAM",detail:`${Nt(s.ram.used)} / ${Nt(s.ram.total)} GB`}),s.gpu&&s.gpu.busy_percent!=null&&s.gpu.gtt_used!=null&&s.gpu.gtt_total!=null&&r.jsx(ga,{value:s.gpu.busy_percent,label:"GPU",detail:`${Nt(s.gpu.gtt_used)} / ${Nt(s.gpu.gtt_total)} GB`}),s.disk&&r.jsx(ga,{value:s.disk.percent,label:"Disk",detail:`${Nt(s.disk.used)} / ${Nt(s.disk.total)} GB`})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(s==null?void 0:s.temp)&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"mt-4 flex gap-4 text-xs font-mono text-muted-foreground/80 border-t border-border/30 pt-3",children:[s.temp.cpu!=null&&r.jsxs("span",{children:["CPU Temp: ",s.temp.cpu," °C"]}),s.temp.gpu!=null&&r.jsxs("span",{children:["GPU Temp: ",s.temp.gpu," °C"]})]})]})}function Ch({type:s,title:o,message:a,defaultValue:d,onConfirm:u,onCancel:f}){const h=g.useRef(null);return r.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:o}),r.jsx("button",{onClick:f||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:a}),s==="prompt"&&r.jsx("input",{ref:h,type:"text",defaultValue:d,className:"w-full h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:p=>{var v;p.key==="Enter"&&u((v=h.current)==null?void 0:v.value)}}),r.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&r.jsx("button",{onClick:f,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:()=>{var v;const p=s==="prompt"?(v=h.current)==null?void 0:v.value:void 0;u(p)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:s==="confirm"?"Ja, fortfahren":s==="prompt"?"Übernehmen":"OK"})]})]})})}function Tn(){const[s,o]=g.useState(null),a=g.useCallback(()=>o(null),[]),d=g.useCallback((p,v,x)=>{o({type:"alert",title:p,message:v,onConfirm:()=>{o(null),x==null||x()}})},[]),u=g.useCallback((p,v,x,w)=>{o({type:"confirm",title:p,message:v,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),w==null||w()}})},[]),f=g.useCallback((p,v,x,w,j)=>{o({type:"prompt",title:p,message:v,defaultValue:x,onConfirm:M=>{o(null),w(M)},onCancel:()=>{o(null),j==null||j()}})},[]),h=s?r.jsx(Ch,{...s}):null;return{showAlert:d,showConfirm:u,showPrompt:f,close:a,dialogElement:h}}function Hb(){var $;const s=ln(),{data:o}=jc(3e3),{data:a=[]}=mh(3e3),{showConfirm:d,dialogElement:u}=Tn(),[f,h]=g.useState(""),[p,v]=g.useState(!1),[x,w]=g.useState(""),[j,M]=g.useState(!1),[R,F]=g.useState({open:!1,actionPath:"",actionLabel:""}),S=()=>{s.invalidateQueries({queryKey:Qe.updates}),s.invalidateQueries({queryKey:Qe.jobs}),s.invalidateQueries({queryKey:Qe.models})};async function b(I,B,ne,le){h(`${B} wird ausgeführt...`),v(!0);try{const pe={...ne},fe=await be(I,{method:"POST",body:JSON.stringify(pe)});if(fe.status==="password_required"||fe.status==="incorrect_password"){F({open:!0,actionPath:I,actionLabel:B,payload:ne,error:fe.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),h("");return}fe.job_id?h(`${B} gestartet (Job-ID: ${fe.job_id})`):fe.ok?h(`${B} erfolgreich ausgeführt.`):h(`Fehler: ${fe.err||"Unbekannter Fehler"}`),S()}catch(pe){h(`Fehler bei ${B}: ${pe.message}`)}finally{v(!1)}}async function P(){M(!0);try{const I={...R.payload,sudo_password:x},B=await be(R.actionPath,{method:"POST",body:JSON.stringify(I)});if(B.status==="password_required"||B.status==="incorrect_password"){F(ne=>({...ne,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}B.job_id?h(`${R.actionLabel} gestartet (Job-ID: ${B.job_id})`):B.ok?h(`${R.actionLabel} erfolgreich ausgeführt.`):h(`Fehler: ${B.err||"Unbekannter Fehler"}`),F({open:!1,actionPath:"",actionLabel:""}),w(""),S()}catch(I){h(`Fehler: ${I.message}`),F({open:!1,actionPath:"",actionLabel:""}),w("")}finally{M(!1)}}async function O(I,B){h(`Upgrade für ${I} wird gestartet...`);try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:I,role:B,quant:"Q4_K_M",jinja:!0})}),h("Upgrade-Download gestartet."),S()}catch(ne){h(`Upgrade fehlgeschlagen: ${ne.message}`)}}const H=a.find(I=>I.label.includes("OS-Update")&&(I.state==="running"||I.state==="queued")),z=a.find(I=>I.label.includes("Engine-Update")&&(I.state==="running"||I.state==="queued"));return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[R.open&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/60 bg-card/90 backdrop-blur-xl p-5 shadow-2xl space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),r.jsx("button",{onClick:()=>{F({open:!1,actionPath:"",actionLabel:""}),w("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",r.jsx("strong",{children:R.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{type:"password",value:x,onChange:I=>w(I.target.value),placeholder:"Sudo-Passwort eingeben...",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground",onKeyDown:I=>I.key==="Enter"&&P(),autoFocus:!0}),R.error&&r.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:R.error})]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{onClick:()=>{F({open:!1,actionPath:"",actionLabel:""}),w("")},className:"h-8 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent transition-all cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:P,disabled:!x||j,className:"h-8 px-4 rounded-lg bg-primary text-primary-foreground text-[10px] font-bold uppercase hover:opacity-90 transition-all disabled:opacity-50 cursor-pointer flex items-center justify-center gap-1.5",children:j?"Prüfe...":"Ausführen"})]})]})}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(U0,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(o==null?void 0:o.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(o.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),o?r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:Y("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.os>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"OS-Pakete"}),r.jsx("span",{className:"font-mono",children:o.os>0?`${o.os} verfügbar`:"aktuell"})]}),r.jsxs("div",{className:Y("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.engine>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Engine (llama.cpp)"}),r.jsx("span",{className:"font-mono",children:o.engine>0?"Update verfügbar":"aktuell"})]}),r.jsxs("div",{className:Y("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.models>0?"border-primary/30 bg-primary/5 text-primary font-semibold animate-pulse":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Modell-Upgrades"}),r.jsx("span",{className:"font-mono",children:o.models>0?`${o.models} verfügbar`:"aktuell"})]}),($=o.components)==null?void 0:$.map(I=>{const B=I.update===!0;return r.jsxs("div",{className:Y("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",B?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[I.name,I.reachable===!1&&r.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),r.jsx("span",{className:"font-mono text-[10px]",title:I.current?`installiert: ${I.current}`:void 0,children:B?`Update: ${I.latest}`:I.update===!1?"aktuell":I.latest?`neueste: ${I.latest}`:"—"})]},I.key)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[r.jsx("button",{onClick:()=>b("/api/maintenance/os-update","OS-Update"),disabled:p||!!H,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:H?r.jsxs(r.Fragment,{children:[r.jsx(On,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",H.progress??0,"%)"]})]}):r.jsx("span",{children:"OS Update"})}),r.jsx("button",{onClick:()=>b("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!z,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:z?r.jsxs(r.Fragment,{children:[r.jsx(On,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",z.progress??0,"%)"]})]}):r.jsx("span",{children:"Engine Update"})})]}),r.jsxs("button",{onClick:()=>{d("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>b("/api/maintenance/reboot","Reboot"))},disabled:p,className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 text-red-400 text-[10px] font-bold uppercase hover:bg-red-500/10 transition-all cursor-pointer disabled:opacity-50",children:[r.jsx(Rm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Host Reboot"})]}),o.model_list.length>0&&r.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[r.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),r.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:o.model_list.map(I=>r.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-background/25 border border-border/30 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${I.role}: ${I.repo}`,children:[r.jsx("span",{className:"text-primary font-bold uppercase",children:I.role}),": ",I.repo.split("/").pop()]}),r.jsxs("button",{onClick:()=>O(I.repo,I.role),className:"px-2 py-0.5 text-[8px] font-bold uppercase rounded bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer flex items-center gap-0.5",children:[r.jsx(sn,{className:"h-2.5 w-2.5"})," Laden"]})]},I.repo))})]})]}):r.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),f&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:f}),r.jsxs("div",{className:"text-[9px] text-muted-foreground/60 leading-normal border-t border-border/10 pt-2.5 flex items-start gap-1",children:[r.jsx(Ts,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),r.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",r.jsx("code",{children:"/etc/sudoers"})," (z.B. ",r.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),r.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer")),className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer shadow-md shadow-primary/10",children:"System-Zentrale öffnen"})}),u]})}function Gb(){const s=ln(),{data:o}=xh(3e3),{data:a}=Fs(),{showAlert:d,dialogElement:u}=Tn(),[f,h]=g.useState(!1),p=(a==null?void 0:a.models)??[];async function v(x){try{await be("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:Qe.agentStatus}),h(!1)}catch(w){d("Fehler",`Fehler beim Wechseln des Gehirns: ${w.message}`)}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(As,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(o==null?void 0:o.webui_url)&&r.jsxs("a",{href:Go(o.webui_url),target:"_blank",rel:"noopener",className:Y("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[r.jsx(Na,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),o?r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:Y("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.gateway_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:Y("h-2 w-2 rounded-full",o.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.webui_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{onClick:()=>h(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),r.jsx(Dt,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[r.jsx(Io,{className:"h-3 w-3 shrink-0"}),o.brain_model||"auto"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),r.jsx($o,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[r.jsxs("div",{children:["Config: ",o.has_config?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Skills: ",o.has_skills?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Memory: ",o.has_memories?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),o&&r.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"Telegram"}),r.jsx("span",{className:Y("font-semibold",o.telegram_enabled?"text-emerald-400":""),children:o.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"MCP-Server"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[o.mcp_server_count??0," verbunden"]})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"PC Executor"}),r.jsx("span",{className:Y("font-semibold",o.pc_executor_reachable?"text-emerald-400":""),children:o.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),o&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>h(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...p.map(x=>{var w;return((w=x.name.split("/").pop())==null?void 0:w.replace(".gguf",""))||x.name})].map(x=>{const w=["auto","fast","heavy"].includes(x);return r.jsxs("button",{onClick:()=>v(x),className:Y("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",o.brain_model===x||!o.brain_model&&x==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:x}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:w?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(o.brain_model===x||!o.brain_model&&x==="auto")&&r.jsx(dr,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),u]})}function Vb(){const{data:s}=Fs(3e3),o=(s==null?void 0:s.models)??[],a=(s==null?void 0:s.running)??[];return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Io,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),r.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Sh.map(d=>{var h;const u=o.find(p=>p.role===d),f=u?a.includes(u.name):!1;return r.jsxs("div",{className:Y("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",f?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":u?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[r.jsx("div",{className:"min-w-0 flex-1 mr-2",children:r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:Y("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Nc(d)),children:d}),r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:u?(h=u.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,""):"nicht zugewiesen"}),u&&r.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[u.prompt_cache&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),u.spec_active&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${u.spec_draft_model})`,children:"SPEC"}),u.parallel_slots>1&&r.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${u.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",u.parallel_slots]}),u.incomplete&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),r.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:u?f?r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},d)})})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function Wb(){const s=ln(),{data:o=[]}=vh({limit:3}),[a,d]=g.useState(""),[u,f]=g.useState("stable"),[h,p]=g.useState(!1);async function v(){if(!(!a.trim()||h)){p(!0);try{await be("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"dashboard"})}),d(""),s.invalidateQueries({queryKey:["memory"]})}catch(x){console.error(x)}finally{p(!1)}}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Fo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsx("textarea",{value:a,onChange:x=>d(x.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),r.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[r.jsxs("select",{value:u,onChange:x=>f(x.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[r.jsx("option",{value:"stable",children:"🔵 Fakt"}),r.jsx("option",{value:"instruction",children:"📋 Regel"}),r.jsx("option",{value:"user",children:"👤 User"}),r.jsx("option",{value:"versioned",children:"🟡 Version"})]}),r.jsxs("button",{onClick:v,disabled:!a.trim()||h,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[r.jsx(Pm,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),r.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[r.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),r.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:o.length===0?r.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):o.map(x=>r.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[r.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:x.category}),r.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:x.content,children:x.content})]},x.id))})]})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}function Kb(){var o;const{data:s}=hh(3e3);return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(C0,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),s?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),r.jsxs("div",{className:"text-base font-bold text-emerald-400 mt-0.5 tracking-tight font-space",children:[s.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," €"]}),r.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",s.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),r.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:s.total_tokens.toLocaleString("de-DE")}),r.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),r.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Input (Prompts):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Output (Antworten):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),r.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet ggü. Cloud-APIs",(o=s==null?void 0:s.pricing)!=null&&o.heavy?` (Ø ${(s.pricing.heavy.in??0).toFixed(2).replace(".",",")} $ / ${(s.pricing.heavy.out??0).toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function Qb(){return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),r.jsx(Ub,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[r.jsx(Bb,{}),r.jsx(Hb,{})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[r.jsx(Gb,{}),r.jsx(Vb,{}),r.jsx(Wb,{}),r.jsx(Kb,{})]})]})}function qb(){const s=ln(),{data:o=[]}=mh(2e3),{showAlert:a,dialogElement:d}=Tn();async function u(p){try{await be(`/api/jobs/${p}/cancel`,{method:"POST"}),s.invalidateQueries({queryKey:Qe.jobs})}catch(v){a("Fehler",v.message)}}const f=o.filter(p=>p.state==="running"||p.state==="queued"),h=o.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&h.length===0?null:r.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),f.map(p=>r.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:p.label}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-muted-foreground font-mono",children:[p.progress??0,"% • ",ac(p.done_bytes),"/",ac(p.total_bytes),p.eta_s?` • ETA ${ob(p.eta_s)}`:""]}),r.jsx("button",{onClick:()=>u(p.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),r.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:r.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${p.progress??0}%`}})})]},p.id)),h.map(p=>r.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[r.jsx("span",{className:"truncate",children:p.label}),r.jsx("span",{className:Y("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",p.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:p.state})]},p.id)),d]})}function wn({children:s,tone:o="muted"}){const a={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return r.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${a[o]}`,children:s})}function Xp({caps:s}){return s?r.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&r.jsx(wn,{children:"💻 Code"}),s.vision&&r.jsx(wn,{children:"👁 Bild"}),s.reasoning&&r.jsx(wn,{children:"🧠 Reason"}),s.moe&&r.jsxs(wn,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&r.jsx(wn,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&r.jsx(wn,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&r.jsx(wn,{children:"🔢 Embed"})]}):null}function Zb({model:s,onClose:o,onChanged:a}){var S,b;const{data:d,isLoading:u}=sb(s.gguf_path),[f,h]=g.useState(null),[p,v]=g.useState(""),x=d==null?void 0:d.target_vocab,w=(d==null?void 0:d.drafts)??[],j=w.filter(P=>P.compatible===!0),M=s.spec_draft_model;async function R(P){h(P??"__clear__"),v("");try{await be(`/api/models/${encodeURIComponent(s.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:P})}),a(),o()}catch(O){v(String((O==null?void 0:O.message)||O)),h(null)}}const F=P=>{var O;return P?`${P.pre??"?"} · ${((O=P.n_vocab)==null?void 0:O.toLocaleString())??"?"} Tokens`:"—"};return r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[r.jsx(Uo,{className:"h-4 w-4"})," Speculative Draft"]}),r.jsx("button",{onClick:o,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',r.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),r.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[r.jsx("span",{className:"text-muted-foreground",children:(S=s.name.split("/").pop())==null?void 0:S.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-foreground",children:["Vocab: ",F(x)]})]}),s.spec_active&&M&&r.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[r.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[r.jsx(dr,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",M]}),r.jsx("button",{onClick:()=>R(null),disabled:f!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(d!=null&&d.target_exists)&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[r.jsx(tc,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),r.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:u?r.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):w.length===0?r.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",r.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):w.map(P=>{var z,$;const O=P.filename===M,H=P.compatible===!0;return r.jsxs("div",{className:Y("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",H?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",O&&"border-primary/40 bg-primary/10"),children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:P.filename}),r.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Zt(P.size_bytes)," · Vocab: ",F(P.vocab)]})]}),H?O?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[r.jsx(dr,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("button",{onClick:()=>R(P.path),disabled:f!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):r.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:P.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(z=P.vocab)==null?void 0:z.pre}/${($=P.vocab)==null?void 0:$.n_vocab} ≠ Modell ${x==null?void 0:x.pre}/${x==null?void 0:x.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[r.jsx(tc,{className:"h-3.5 w-3.5"})," ",P.compatible===!1?"Vocab ≠":"n/a"]})]},P.path)})}),!u&&(d==null?void 0:d.target_exists)&&w.length>0&&j.length===0&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",r.jsx("span",{className:"font-mono",children:x==null?void 0:x.pre}),", n_vocab=",r.jsx("span",{className:"font-mono",children:(b=x==null?void 0:x.n_vocab)==null?void 0:b.toLocaleString()}),")."]}),p&&r.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:p})]})})}function Yb(){var cr,Un,Bs,Hs,Gs;const s=ln(),{data:o,isLoading:a,error:d}=Fs(4e3),{data:u}=tb(4e3),{data:f}=gh(),{data:h}=jc(4e3),{data:p}=rb(),{showAlert:v,showConfirm:x,showPrompt:w,dialogElement:j}=Tn(),M=(o==null?void 0:o.models)??[],R=(o==null?void 0:o.running)??[],F=d?String(d):"",S=()=>{s.invalidateQueries({queryKey:Qe.models}),s.invalidateQueries({queryKey:Qe.routing})},[b,P]=g.useState(null),[O,H]=g.useState(null),[z,$]=g.useState(null),[I,B]=g.useState(!1),[ne,le]=g.useState(!1),[pe,fe]=g.useState(null),[ue,Te]=g.useState("grid"),[Se,ze]=g.useState("all"),Pe=M.filter(D=>Se==="in_use"?!!D.role||R.includes(D.name):!0),[Me,Z]=g.useState({width:800,height:360}),se=g.useRef(null),X=g.useCallback(D=>{if(se.current&&(se.current.disconnect(),se.current=null),D){const ee=new ResizeObserver(we=>{if(!we||we.length===0)return;const Oe=we[0].contentRect;Z({width:Oe.width,height:Oe.height})});ee.observe(D),se.current=ee}},[]),E=Me.width,C=Me.height,K=D=>{const ee=E*.1,we=C*D,Oe=E*.5,Fe=C*.5,At=E*.3,Vs=we,Bn=E*.3;return`M ${ee} ${we} C ${At} ${Vs}, ${Bn} ${Fe}, ${Oe} ${Fe}`},J=D=>{const ee=E*.5,we=C*.5,Oe=E*.9,Fe=C*D,At=E*.7,Vs=we,Bn=E*.7;return`M ${ee} ${we} C ${At} ${Vs}, ${Bn} ${Fe}, ${Oe} ${Fe}`};async function q(D){try{await be(`/api/models/${encodeURIComponent(D)}/load`,{method:"POST"}),S()}catch(ee){v("Fehler",`Fehler beim Laden des Modells: ${ee.message}`)}}async function ae(D){try{await be(`/api/models/${encodeURIComponent(D)}/unload`,{method:"POST"}),S()}catch(ee){v("Fehler",`Fehler beim Entladen des Modells: ${ee.message}`)}}async function me(){try{await be("/api/models/unload",{method:"POST"}),S()}catch(D){v("Fehler",`Fehler beim Entladen aller Modelle: ${D.message}`)}}async function je(D,ee){try{await be(`/api/models/${encodeURIComponent(ee)}/role`,{method:"POST",body:JSON.stringify({role:D||null})}),S()}catch(we){v("Fehler",`Fehler beim Zuweisen der Rolle: ${we.message||we}`)}}async function U(D,ee){w("Kontextlänge anpassen","Gib die gewünschte Kontextlänge in Tokens an:",String(ee||32768),async we=>{if(we)try{await be(`/api/models/${encodeURIComponent(D)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(we,10)})}),S()}catch(Oe){v("Fehler",`Fehler beim Setzen des Kontexts: ${Oe.message||Oe}`)}})}async function xe(D){x("Modell löschen?",`Modell '${D}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await be(`/api/models/${encodeURIComponent(D)}`,{method:"DELETE"}),S()}catch(ee){v("Fehler",`Fehler beim Löschen: ${ee.message||ee}`)}})}async function Ct(D,ee,we,Oe){try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:ee,quant:we,jinja:Oe})}),v("Herunterladen gestartet",`Download für '${D}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Fe){v("Fehler",`Fehler beim Starten des Upgrades: ${Fe.message||Fe}`)}}async function Jo(D){const ee=p==null?void 0:p.budget,we=ee&&!ee.fits?` - -⚠ Speicher-Warnung: Dieses Brain (~${ee.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${ee.largest_ondemand_gb} GB) sprengt das das Budget (${ee.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";x("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${D.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${we}`,async()=>{try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:"hermes",quant:"Q4_K_M",jinja:!0})}),v("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(Oe){v("Fehler",`Update fehlgeschlagen: ${Oe.message||Oe}`)}})}async function zn(D){x("Agent-Hirn wechseln?",`'${D.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await be("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:D})}),v("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),B(!1),S()}catch(ee){v("Fehler",`Wechsel fehlgeschlagen: ${ee.message||ee}`)}})}async function $s(D){D&&(await navigator.clipboard.writeText(D),le(!0),setTimeout(()=>le(!1),1500))}if(a)return r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(F)return r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",F,")."]});const Ln=M.filter(D=>R.includes(D.name)),Fn=Ln.reduce((D,ee)=>D+(ee.size_bytes||0),0),In=16*1024**3,Us=Fn>In?Fn*1.2:In,$n=D=>M.find(ee=>ee.role===D),Bt=D=>{const ee=$n(D);return ee?R.includes(ee.name):!1};return r.jsxs("div",{className:"space-y-8",children:[r.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ba,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Llama Swap VRAM-Pool: ",Zt(Fn)," / ",Zt(Us)," geladen"]}),R.length>0&&r.jsx("button",{onClick:me,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),r.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:Ln.length===0?r.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):Ln.map((D,ee)=>{var Fe;const we=(D.size_bytes||0)/Us*100,Oe=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][ee%4];return r.jsxs("div",{style:{width:`${we}%`},className:Y("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Oe),title:`${D.name} (${Zt(D.size_bytes)})`,children:[r.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[D.role?`[${D.role}] `:"",(Fe=D.name.split("/").pop())==null?void 0:Fe.replace(".gguf","")]}),r.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Zt(D.size_bytes)})]},D.name)})})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),r.jsxs("div",{ref:X,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:K(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(pe==="roocode"||b==="roocode")&&r.jsx("path",{d:K(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(pe==="cursor"||b==="cursor")&&r.jsx("path",{d:K(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(pe==="opencode"||b==="opencode")&&r.jsx("path",{d:K(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(pe==="zed"||b==="zed")&&r.jsx("path",{d:K(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(pe==="continue"||b==="continue")&&r.jsx("path",{d:K(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:J(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Bt("fast")&&r.jsx("path",{d:J(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:J(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Bt("heavy")&&r.jsx("path",{d:J(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:J(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Bt("coder")&&r.jsx("path",{d:J(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:J(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Bt("vision")&&r.jsx("path",{d:J(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:J(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Bt("scout")&&r.jsx("path",{d:J(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>fe("roocode"),onMouseLeave:()=>fe(null),onClick:()=>P(D=>D==="roocode"?null:"roocode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Roo Code"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>fe("cursor"),onMouseLeave:()=>fe(null),onClick:()=>P(D=>D==="cursor"?null:"cursor"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Cursor IDE"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>fe("opencode"),onMouseLeave:()=>fe(null),onClick:()=>P(D=>D==="opencode"?null:"opencode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"OpenCode"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>fe("zed"),onMouseLeave:()=>fe(null),onClick:()=>P(D=>D==="zed"?null:"zed"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Zed"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>fe("continue"),onMouseLeave:()=>fe(null),onClick:()=>P(D=>D==="continue"?null:"continue"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Continue"})]}),r.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[r.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",u!=null&&u.heavy_threshold_chars?u.heavy_threshold_chars/1e3:"4","k Zeichen"]}),r.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),Sh.map(D=>{var At;const ee=["12%","31%","50%","69%","88%"],we=$n(D),Oe=we?R.includes(we.name):!1;if(D==="agent")return null;const Fe={fast:0,heavy:1,coder:2,vision:3,scout:4}[D];return r.jsxs("div",{className:Y("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Oe?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":we?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:ee[Fe]},onClick:()=>H(D),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:D}),Oe&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:we?(At=we.name.split("/").pop())==null?void 0:At.replace(".gguf",""):"Keine Zuweisung"})]},D)}),b&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[b==="roocode"&&"Roo Code Setup",b==="cursor"&&"Cursor Setup",b==="opencode"&&"OpenCode Setup",b==="zed"&&"Zed Setup",b==="continue"&&"Continue Setup"]}),r.jsx("button",{onClick:()=>P(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[b==="roocode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),r.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",r.jsx("strong",{children:"OpenAI Compatible"}),"."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",r.jsx("code",{children:"settings.json"})," ein."]})]}),b==="cursor"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne Cursor Settings ➔ ",r.jsx("strong",{children:"Models"}),"."]}),r.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",r.jsx("strong",{children:"OpenAI API"})," auf."]}),r.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",r.jsx("strong",{children:"auto"}),"."]})]}),b==="opencode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die ",r.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),r.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",r.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),b==="zed"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die Zed Settings (",r.jsx("code",{children:"ctrl+,"}),")."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",r.jsx("code",{children:"language_models"})," ein."]})]}),b==="continue"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),r.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",r.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),f.tools&&r.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),r.jsxs("button",{onClick:()=>{var D,ee,we,Oe,Fe;return $s(b==="roocode"?(D=f.tools.cline)==null?void 0:D.snippet:b==="cursor"?(ee=f.tools.cursor)==null?void 0:ee.snippet:b==="opencode"?(we=f.tools.opencode)==null?void 0:we.snippet:b==="zed"?(Oe=f.tools.zed)==null?void 0:Oe.snippet:(Fe=f.tools.continue)==null?void 0:Fe.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[ne?r.jsx(dr,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Mm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:ne?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:r.jsxs("code",{children:[b==="roocode"&&((cr=f.tools.cline)==null?void 0:cr.snippet),b==="cursor"&&((Un=f.tools.cursor)==null?void 0:Un.snippet),b==="opencode"&&((Bs=f.tools.opencode)==null?void 0:Bs.snippet),b==="zed"&&((Hs=f.tools.zed)==null?void 0:Hs.snippet),b==="continue"&&((Gs=f.tools.continue)==null?void 0:Gs.snippet)]})})]}),r.jsx("button",{onClick:()=>P(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),r.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(D=>{var Oe;const ee=M.find(Fe=>Fe.role===D),we=ee?R.includes(ee.name):!1;return r.jsxs("div",{onClick:()=>H(D),className:Y("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",we?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":ee?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:Y("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",Nc(D)),children:D}),we&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:ee==null?void 0:ee.name,children:ee?(Oe=ee.name.split("/").pop())==null?void 0:Oe.replace(/\.gguf$/i,""):"nicht zugewiesen"}),r.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},D)})})]}),(p==null?void 0:p.current)&&r.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(As,{className:"h-4.5 w-4.5 text-indigo-400"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),p.current.version!=null&&r.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",p.current.version]})]}),r.jsx("button",{onClick:()=>B(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:p.current.name,children:p.current.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsx("span",{children:p.current.params_b?`${p.current.params_b}B`:"—"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:p.current.quant||"GGUF"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:Zt(p.current.size_bytes||0)})]})]}),p.update_available&&p.recommended?r.jsxs("button",{onClick:()=>Jo(p.recommended.repo),className:Y("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",p.budget&&!p.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[r.jsx(sn,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):r.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[r.jsx(dr,{className:"h-4 w-4"})," Neueste Generation"]})]}),p.update_available&&p.recommended&&r.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",r.jsx("span",{className:"font-mono font-bold",children:p.recommended.name.replace(/-GGUF$/i,"")}),"(v",p.recommended.version,", ",p.recommended.params_b,"B) — von NousResearch."]}),p.budget&&r.jsxs("div",{className:Y("text-[10px] flex items-start gap-1.5 leading-relaxed",p.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[r.jsx(ba,{className:"h-3 w-3 shrink-0 mt-0.5"}),r.jsxs("span",{children:["Always-On-Brain ~",p.budget.brain_gb," GB + größtes on-demand (~",p.budget.largest_ondemand_gb," GB) = ",(p.budget.brain_gb+p.budget.largest_ondemand_gb).toFixed(1)," / ",p.budget.gtt_gb," GB",p.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[r.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",Pe.length," von ",M.length,")"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>ze("all"),className:Y("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Se==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),r.jsx("button",{onClick:()=>ze("in_use"),className:Y("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Se==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>Te("grid"),className:Y("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ue==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),r.jsx("button",{onClick:()=>Te("list"),className:Y("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ue==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ue==="grid"?r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Pe.length===0?r.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:Se==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Pe.map(D=>{const ee=R.includes(D.name),we=h==null?void 0:h.model_list.find(Fe=>Fe.role===D.role),Oe=Jp(D.name);return r.jsxs("div",{className:Y("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",ee?"border-primary/45 shadow-primary/5":D.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"flex items-start justify-between gap-3",children:r.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[r.jsx("div",{className:Y("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Oe.color),title:Oe.name,children:Oe.initial}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:D.name,children:D.name.split("/").pop()}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:D.quant||"GGUF"}),ee&&r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[r.jsx(Lo,{className:"h-3 w-3 animate-pulse"})," Warm"]}),D.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:D.role}),D.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),D.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${D.spec_draft_model})`,children:"SPEC"}):D.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${D.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,D.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${D.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",D.parallel_slots]}),D.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),r.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:r.jsx(Xp,{caps:D.capabilities})})]}),r.jsxs("div",{className:"space-y-3 pt-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(ba,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),r.jsx("div",{className:"text-foreground font-semibold",children:Zt(D.size_bytes)})]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(z0,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),r.jsx("div",{className:"text-foreground font-semibold",children:qp(D.ctx)})]})]})]}),we&&r.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),r.jsxs("span",{children:["Upgrade verfügbar: ",we.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>Ct(we.repo,D.role,D.quant||"Q4_K_M",D.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[r.jsx(sn,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[r.jsx("button",{onClick:()=>ee?ae(D.name):q(D.name),disabled:D.incomplete&&!ee,className:Y("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",D.incomplete&&!ee?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ee?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:ee?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>U(D.name,D.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>$(D),className:Y("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",D.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":D.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Uo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>xe(D.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:r.jsx(ec,{className:"h-3.5 w-3.5"})})]})]})]},D.name)})}):r.jsx("div",{className:"space-y-2",children:Pe.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:Se==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Pe.map(D=>{const ee=R.includes(D.name),we=Jp(D.name);return r.jsxs("div",{className:Y("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",ee?"border-primary/45":D.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:Y("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",we.color),title:we.name,children:we.initial}),r.jsxs("div",{className:"min-w-0 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:D.name,children:D.name.split("/").pop()}),D.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:D.role}),D.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),D.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${D.spec_draft_model})`,children:"SPEC"}):D.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${D.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,D.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${D.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",D.parallel_slots]}),D.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),ee&&r.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsxs("span",{children:["Größe: ",Zt(D.size_bytes)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Kontext: ",qp(D.ctx)]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:"font-mono text-[9px]",children:D.quant||"GGUF"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[r.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:r.jsx(Xp,{caps:D.capabilities})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("button",{onClick:()=>ee?ae(D.name):q(D.name),disabled:D.incomplete&&!ee,className:Y("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",D.incomplete&&!ee?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ee?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:ee?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>U(D.name,D.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>$(D),className:Y("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",D.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":D.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Uo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>xe(D.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:r.jsx(ec,{className:"h-3.5 w-3.5"})})]})]})]},D.name)})})]}),O&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),r.jsx("button",{onClick:()=>H(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell aus deiner Bibliothek für die Rolle ",r.jsx("strong",{className:"text-foreground",children:O}),":"]}),r.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[r.jsx("button",{onClick:()=>{je(O,""),H(null)},className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:r.jsx("span",{children:"Zuweisung entfernen"})}),M.map(D=>{var ee;return r.jsxs("button",{onClick:()=>{je(O,D.name),H(null)},className:Y("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",D.role===O?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"truncate max-w-[280px] font-semibold",children:(ee=D.name.split("/").pop())==null?void 0:ee.replace(".gguf","")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[Zt(D.size_bytes)," · ",D.quant]})]}),D.role===O&&r.jsx(dr,{className:"h-4 w-4 shrink-0 text-primary"})]},D.name)})]})]})}),z&&r.jsx(Zb,{model:z,onClose:()=>$(null),onChanged:S}),I&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(As,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),r.jsx("button",{onClick:()=>B(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",r.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",r.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),r.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:M.map(D=>{var we;const ee=D.role==="hermes";return r.jsxs("button",{onClick:()=>!ee&&zn(D.name),disabled:ee||D.incomplete,className:Y("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",ee?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":D.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(we=D.name.split("/").pop())==null?void 0:we.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[D.capabilities.params_b?`${D.capabilities.params_b}B`:"?"," · ",Zt(D.size_bytes),D.role&&` · Rolle: ${D.role}`,D.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),ee?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[r.jsx(dr,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},D.name)})}),r.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[r.jsx("span",{children:"💡"}),r.jsxs("span",{children:["Für einen ",r.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),j]})}function Jb(){const[s,o]=g.useState(""),[a,d]=g.useState([]),[u,f]=g.useState("Q4_K_M"),[h,p]=g.useState(""),[v,x]=g.useState(""),[w,j]=g.useState(""),[M,R]=g.useState([]),F=["fast","heavy","coder","vision","scout"];async function S(O){const H=O??s;if(H.trim()){p("Analysiere HuggingFace Repository...");try{const z=await be(`/api/hf/quants?repo=${encodeURIComponent(H)}`);o(z.repo),d(z.quants),z.quants.length&&f(z.quants.includes("Q4_K_M")?"Q4_K_M":z.quants[0]),p(z.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden.")}catch(z){p(`Fehler: ${z}`)}}}async function b(){if(w.trim()){p("Durchsuche HuggingFace...");try{const O=await be(`/api/hf/search?q=${encodeURIComponent(w)}`);R(O.results),p(O.results.length?"":"Keine Ergebnisse gefunden.")}catch(O){p(`Suche fehlgeschlagen: ${O}`)}}}async function P(){if(s.trim()){p("Download-Job wird initiiert...");try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:u,role:v||void 0,jinja:!0})}),p(`Download gestartet: ${s} (${u})${v?`, Rolle: ${v}`:""}. Fortschritt oben.`+(v==="fast"||v==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(O){p(`Download-Fehler: ${O}`)}}}return r.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsx("input",{value:s,onChange:O=>o(O.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:()=>S(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),a.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("select",{value:u,onChange:O=>f(O.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:a.map(O=>r.jsx("option",{value:O,className:"bg-popover text-foreground",children:O},O))}),r.jsxs("select",{value:v,onChange:O=>x(O.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration wie parallele Slots",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[r.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),F.map(O=>r.jsx("option",{value:O,className:"bg-popover text-foreground",children:O},O))]}),r.jsxs("button",{onClick:P,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer flex items-center gap-1.5",children:[r.jsx(sn,{className:"h-3.5 w-3.5"})," Herunterladen"]})]})]})]}),r.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:w,onChange:O=>j(O.target.value),onKeyDown:O=>O.key==="Enter"&&b(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(xc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsx("button",{onClick:b,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),M.length>0&&r.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:M.map(O=>r.jsxs("button",{onClick:()=>{o(O.repo),R([]),j(""),S(O.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[r.jsx("span",{className:"font-semibold truncate",children:O.repo}),r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[r.jsx(sn,{className:"h-3 w-3"})," ",O.downloads.toLocaleString()]})]},O.repo))}),h&&r.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:h})]})}const Xb={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:Uo},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Fo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Yd},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Xd},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Jd}};function e1(){const{data:s,isLoading:o,error:a}=nb(),{data:d}=Fs(),{data:u}=jc(),f=(d==null?void 0:d.models)??[],h=a?String(a):"",[p,v]=g.useState({}),[x,w]=g.useState({}),[j,M]=g.useState(!1);async function R(F,S,b,P){v(O=>({...O,[F]:"Starte..."}));try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:S,quant:b,jinja:P})}),v(O=>({...O,[F]:"Download läuft"}))}catch{v(H=>({...H,[F]:"Fehler"}))}}return o?r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):h||!s?r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",h,")."]}):r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[r.jsxs("div",{children:["Modell-Registry geladen für ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.sys_ram_gb," GB"]})," System-RAM."]}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Om,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),r.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),r.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:s.categories.map(F=>{const S=Xb[F.role]||{title:F.title||F.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Io},b=S.icon,P=f.find(B=>B.role===F.role),O=u==null?void 0:u.model_list.find(B=>B.role===F.role),H=F.models.find(B=>B.repo===F.recommended)||F.models[0];if(!H)return null;const z=p[H.repo],$=F.models.filter(B=>B.repo!==F.recommended),I=!!x[F.role];return r.jsxs("div",{className:Y("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",P?"border-border/60":"border-primary/20 shadow-primary/5"),children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:r.jsx(b,{className:"h-5.5 w-5.5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:S.title}),r.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",F.role]})]})]}),P?r.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):r.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:S.desc}),r.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:P?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:P.name,children:P.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[r.jsxs("span",{children:["Größe: ",ac(P.size_bytes||0)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",P.quant||"GGUF"]})]})]}):r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:H.name,children:H.name}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{children:["Ersteller: ",H.author]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",H.quant]})]}),r.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:r.jsx($b,{fit:H.fit})})]})}),r.jsx("div",{className:"pt-1",children:P?O?r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),r.jsxs("span",{children:["Bessere Version in der Registry: ",O.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>R(O.repo,F.role,H.quant||"Q4_K_M",H.caps.tools!=="no"),disabled:!!p[O.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[r.jsx(sn,{className:"h-3.5 w-3.5"}),p[O.repo]||"Auf neue Version aktualisieren"]})]}):r.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[r.jsx(dr,{className:"h-4 w-4"})," Auf neuestem Stand"]}):r.jsxs("button",{onClick:()=>R(H.repo,F.role,H.quant||"Q4_K_M",H.caps.tools!=="no"),disabled:!!z,className:Y("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",z?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[r.jsx(sn,{className:"h-3.5 w-3.5"}),z||"Optimales Modell einsetzen"]})})]}),$.length>0&&r.jsxs("div",{className:"border-t border-border/20 pt-3",children:[r.jsxs("button",{onClick:()=>w(B=>({...B,[F.role]:!I})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[I?r.jsx(k0,{className:"h-3 w-3"}):r.jsx(b0,{className:"h-3 w-3"}),r.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",$.length,")"]})]}),I&&r.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:$.map(B=>r.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:B.name,children:B.name}),r.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[r.jsxs("span",{children:["Quant: ",B.quant]}),r.jsx("span",{children:"•"}),r.jsx("span",{children:B.fit.text})]})]}),r.jsx("button",{onClick:()=>R(B.repo,F.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[B.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:p[B.repo]||"Installieren"})]},B.repo))})]})]},F.role)})}),r.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[r.jsxs("button",{onClick:()=>M(!j),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(xc,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),r.jsx("span",{className:"text-[10px] text-primary hover:underline",children:j?"Ausblenden ▲":"Anzeigen ▼"})]}),j&&r.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:r.jsx(Jb,{})})]})]})}function t1(){const[s,o]=g.useState("cockpit");return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),r.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(a=>r.jsx("button",{onClick:()=>o(a),className:Y("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===a?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:a==="cockpit"?"Cockpit":"Modelle finden"},a))})]}),r.jsx(qb,{}),r.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?r.jsx(Yb,{}):r.jsx(e1,{})})]})}function va({label:s,percent:o,detail:a,icon:d}){const u=o>90?"bg-red-500 shadow-md shadow-red-500/20":o>75?"bg-amber-500 shadow-md shadow-amber-500/20":"bg-primary shadow-md shadow-primary/20";return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/30 transition-all duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(d,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:s})]}),r.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(o),"%"]})]}),r.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:r.jsx("div",{className:Y("h-full transition-all duration-700 ease-out",u),style:{width:`${Math.min(o,100)}%`}})}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function r1(){const{data:s,error:o}=wc(3e3),{data:a}=eb(3e3),{showAlert:d,dialogElement:u}=Tn(),f=o?String(o):"",[h,p]=g.useState(""),[v,x]=g.useState({});async function w(){p("Backup snapshotted...");try{const M=await be("/api/system/backup",{method:"POST"});p(M.ok?`Snapshot erzeugt: ${M.snapshot} (${M.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(M){p(`Fehler: ${M.message}`)}}async function j(M){x(R=>({...R,[M]:!0}));try{const R=await be("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:M})});R.ok?d("Erfolgreich",`Dienst ${M} wurde erfolgreich neu gestartet.`):d("Fehler beim Neustart",`Fehler beim Neustart: ${R.err||"Unbekannter Fehler"}`)}catch(R){d("Fehler",`Fehler: ${R.message}`)}finally{x(R=>({...R,[M]:!1}))}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"System-Diagnose & Status"}),r.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),f&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["System-Status nicht lesbar (",f,")."]}),s&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(va,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Dt}),r.jsx(va,{label:"RAM",percent:s.ram.percent,detail:`${Nt(s.ram.used)} / ${Nt(s.ram.total)} GB`,icon:Lo}),s.gpu&&s.gpu.busy_percent!=null&&r.jsx(va,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${Nt(s.gpu.gtt_used)} / ${Nt(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${Nt(s.gpu.vram_used)} / ${Nt(s.gpu.vram_total)} GB VRAM`:void 0,icon:Dt}),s.disk&&r.jsx(va,{label:"Disk",percent:s.disk.percent,detail:`${Nt(s.disk.used)} / ${Nt(s.disk.total)} GB`,icon:ba})]}),s.temp&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"flex gap-3 text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-2.5 rounded-xl self-start w-fit",children:[s.temp.cpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.cpu," °C"]})]}),s.temp.cpu!=null&&s.temp.gpu!=null&&r.jsx("span",{children:"|"}),s.temp.gpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.gpu," °C"]})]})]})]}),a&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"h-7 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",children:"System-Logs anzeigen"})]}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:a.services.map(M=>r.jsxs("div",{className:"flex items-center justify-between p-3.5 rounded-xl bg-background/20 border border-border/30 hover:border-primary/20 transition-all group",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("span",{className:Y("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",M.ok?"bg-emerald-500":"bg-amber-500")}),r.jsxs("div",{className:"truncate",children:[r.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:M.name}),r.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:M.url})]})]}),r.jsx("button",{onClick:()=>j(M.name),disabled:v[M.name],className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-primary hover:bg-primary/5 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",title:"Dienst neu starten",children:r.jsx(On,{className:Y("h-3.5 w-3.5",v[M.name]&&"animate-spin")})})]},M.name))}),r.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[r.jsxs("a",{href:Go(a.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(Na,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),r.jsxs("a",{href:Go(a.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(Na,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),r.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),r.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:r.jsxs("button",{onClick:w,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(F0,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),h&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:h}),u]})}function n1(){const[s,o]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[a,d]=g.useState(localStorage.getItem("mc_mcp_path")||""),[u,f]=g.useState("cline"),[h,p]=g.useState(!1),v=new URLSearchParams({host:s});a&&v.set("mcp_path",a);const{data:x,error:w}=gh(v.toString()),j=w?String(w):"";function M(b){o(b),b&&localStorage.setItem("mc_host",b)}function R(b){d(b),localStorage.setItem("mc_mcp_path",b)}const F=x==null?void 0:x.tools[u];async function S(){F&&(await navigator.clipboard.writeText(F.snippet),p(!0),setTimeout(()=>p(!1),1500))}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(P0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),r.jsx("input",{value:s,onChange:b=>M(b.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(M0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),r.jsx("input",{value:a,onChange:b=>R(b.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),j&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",j]}),x&&r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(x.tools).map(([b,P])=>r.jsx("button",{onClick:()=>f(b),className:Y("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",u===b?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:P.label},b))}),F&&r.jsxs("div",{className:"space-y-3",children:[F.note&&r.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[r.jsx(R0,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),r.jsx("span",{children:F.note})]}),r.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[r.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[r.jsx(Sa,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{children:u==="cline"||u==="cursor"?"config.json":"settings.json"})]}),r.jsxs("button",{onClick:S,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[h?r.jsx(dr,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Mm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:h?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:r.jsx("code",{children:F.snippet})})]})]})]})]})}const em=["user","instruction","stable","versioned","ephemeral"],Td={user:{label:"User",icon:G0,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:I0,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:Ts,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:H0,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:S0,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},tm={label:"Gedächtnis",icon:_m,bg:"bg-muted/10",text:"text-muted-foreground"},s1={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function o1(){const[s,o]=g.useState(""),[a,d]=g.useState(""),[u,f]=g.useState(""),[h,p]=g.useState("stable"),[v,x]=g.useState(!1),w=ln(),{showAlert:j,showConfirm:M,dialogElement:R}=Tn(),{data:F=[],error:S}=vh({q:a,category:s}),b=S?String(S):"",P=()=>w.invalidateQueries({queryKey:["memory"]});async function O(){u.trim()&&(await be("/api/memory",{method:"POST",body:JSON.stringify({content:u,category:h,source:"ui"})}),f(""),P())}async function H($){await be(`/api/memory/${$}`,{method:"DELETE"}),P()}async function z(){x(!0);try{const $=await be("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if($.duplicate_count===0){j("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}M("Deduplizierung bestätigen",`${$.duplicate_count} Dublette(n) in ${$.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await be("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),P()}catch(I){j("Fehler",`Fehler beim Löschen: ${I.message}`)}})}catch($){j("Fehler",`Fehler bei der Deduplizierung: ${$.message}`)}finally{x(!1)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),r.jsxs("button",{onClick:z,disabled:v,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[r.jsx(B0,{className:"h-4 w-4 text-primary animate-pulse"}),r.jsx("span",{children:"Deduplizieren"})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),r.jsx("textarea",{value:u,onChange:$=>f($.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),r.jsx("select",{value:h,onChange:$=>p($.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:em.map($=>{var I;return r.jsx("option",{value:$,className:"bg-popover text-foreground",children:((I=Td[$])==null?void 0:I.label)||$},$)})})]}),r.jsxs("button",{onClick:O,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(Pm,{className:"h-4 w-4"})," Speichern"]})]})]}),r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:a,onChange:$=>d($.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(xc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[r.jsx("button",{onClick:()=>o(""),className:Y("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",s?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),em.map($=>{const I=Td[$]||tm,B=I.icon;return r.jsxs("button",{onClick:()=>o($),className:Y("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",s===$?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[r.jsx(B,{className:"h-3 w-3"}),r.jsx("span",{children:I.label})]},$)})]})]}),b&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",b]}),r.jsx("div",{className:"space-y-3",children:F.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):F.map($=>{const I=Td[$.category]||tm,B=I.icon;return r.jsxs("div",{className:Y("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",s1[$.category]||"border-l-muted"),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsxs("span",{className:Y("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",I.bg,I.text),children:[r.jsx(B,{className:"h-3 w-3"}),r.jsx("span",{className:"hidden sm:inline",children:I.label})]}),r.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:$.content})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:$.source}),r.jsx("button",{onClick:()=>H($.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:r.jsx(ec,{className:"h-3.5 w-3.5"})})]})]},$.id)})}),R]})}function ya({label:s,ok:o,detail:a,icon:d,onClick:u}){return r.jsxs("div",{onClick:u,className:Y("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",o?"border-border/60":"border-amber-500/30",u&&"cursor-pointer hover:bg-card/70"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:s}),r.jsx(d,{className:Y("h-4.5 w-4.5",o?"text-primary":"text-amber-500")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:Y("h-2 w-2 rounded-full ring-2 ring-black/40",o?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:o?"Bereit / Online":"Offline / Inaktiv"})]}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:a,children:a})]}),u&&r.jsxs("button",{onClick:f=>{f.stopPropagation(),u()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[r.jsx(Dt,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Gehirn wechseln"})]})]})}function l1(){const{data:s,error:o}=xh(5e3),{data:a}=Fs(),{showAlert:d,dialogElement:u}=Tn(),f=ln(),h=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((a==null?void 0:a.models)??[]).map($=>{var I;return((I=$.name.split("/").pop())==null?void 0:I.replace(".gguf",""))||$.name})],[a]),[v,x]=g.useState(null),[w,j]=g.useState(!1),[M,R]=g.useState({width:800,height:360}),F=g.useRef(null),S=g.useCallback(z=>{if(F.current&&(F.current.disconnect(),F.current=null),z){const $=new ResizeObserver(I=>{if(!I||I.length===0)return;const B=I[0].contentRect;R({width:B.width,height:B.height})});$.observe(z),F.current=$}},[]),b=M.width,P=M.height,O=(z,$,I,B)=>{const ne=(z+I)/2;return`M ${z} ${$} C ${ne} ${$}, ${ne} ${B}, ${I} ${B}`};async function H(z){try{await be("/api/agent/brain",{method:"POST",body:JSON.stringify({model:z})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${z}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:Qe.agentStatus}),j(!1)}catch($){d("Fehler",`Fehler beim Wechseln des Gehirns: ${$.message}`)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",r.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(s==null?void 0:s.webui_url)&&r.jsxs("a",{href:Go(s.webui_url),target:"_blank",rel:"noopener",className:Y("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",s.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[r.jsx(Na,{className:"h-4 w-4"}),r.jsx("span",{children:"AnythingLLM öffnen"})]})]}),h&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",h,")."]}),s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(ya,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:As}),r.jsx(ya,{label:"AnythingLLM",ok:s.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:Lo}),r.jsx(ya,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Dt,onClick:()=>j(!0)}),r.jsx(ya,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:$o})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),r.jsxs("div",{ref:S,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:O(b*.15,P*.5,b*.5,P*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="webui"||s.webui_reachable)&&r.jsx("path",{d:O(b*.15,P*.5,b*.5,P*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:O(b*.5,P*.5,b*.85,P*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="brain"||s.gateway_reachable)&&r.jsx("path",{d:O(b*.5,P*.5,b*.85,P*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:O(b*.5,P*.5,b*.85,P*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="wiring"||s.gateway_reachable)&&r.jsx("path",{d:O(b*.5,P*.5,b*.85,P*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>x("webui"),onMouseLeave:()=>x(null),onClick:()=>s.webui_reachable&&window.open(Go(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[r.jsx(Lo,{className:Y("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),r.jsx("span",{children:"AnythingLLM"}),r.jsx("span",{className:Y("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",s.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),r.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>x("gateway"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(As,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),r.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),r.jsx("div",{className:Y("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",s.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:s.gateway_reachable?"Online":"Offline"})]}),r.jsxs("div",{className:Y("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",s.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>x("brain"),onMouseLeave:()=>x(null),onClick:()=>j(!0),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Dt,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),s.gateway_reachable&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:s.brain_model,children:s.brain_model||"auto"})]}),r.jsxs("div",{className:Y("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",s.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>x("wiring"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx($o,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.has_config&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[r.jsxs("span",{children:["Config: ",s.has_config?"✓":"—"]}),r.jsxs("span",{children:["Skills: ",s.has_skills?"✓":"—"]}),r.jsxs("span",{children:["Memory: ",s.has_memories?"✓":"—"]})]})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(A0,{className:"h-5 w-5 text-primary"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:Y("h-2 w-2 rounded-full",s.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:s.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("p",{children:["Der ",r.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),r.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),r.jsx("div",{className:"space-y-3",children:s.pc_executor_reachable?r.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[r.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),r.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",r.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",r.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",r.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),r.jsxs("p",{children:["Starte ",r.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",r.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),r.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!s.gateway_reachable&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ts,{className:"h-5 w-5 text-amber-500"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[r.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),r.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",r.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),r.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[r.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),r.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",r.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),s&&w&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>j(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:p.map(z=>{const $=["auto","fast","heavy"].includes(z);return r.jsxs("button",{onClick:()=>H(z),className:Y("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",s.brain_model===z||!s.brain_model&&z==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:z}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:$?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===z||!s.brain_model&&z==="auto")&&r.jsx(dr,{className:"h-4 w-4 shrink-0 text-primary"})]},z)})})]})}),u]})}function a1(){const[s,o]=g.useState("connect"),[a,d]=g.useState("roocode"),[u,f]=g.useState(null),h="192.168.178.151",[p,v]=g.useState(!1),[x,w]=g.useState(null);function j(){v(!0),be("/api/health").then(M=>{f(M),w(M.engine_reachable?"success":"partial")}).catch(()=>{f(null),w("fail")}).finally(()=>v(!1))}return g.useEffect(()=>{j()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),r.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[r.jsx("button",{onClick:()=>o("connect"),className:Y("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),r.jsx("button",{onClick:()=>o("concepts"),className:Y("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),s==="connect"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:Y("h-3 w-3 rounded-full ring-2 ring-black/40",x==="success"&&"bg-emerald-500 animate-pulse",x==="partial"&&"bg-amber-500",x==="fail"&&"bg-red-500",!x&&"bg-muted")}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),r.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[x==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(u==null?void 0:u.version)||""}).`,x==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",x==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!x&&"Verbindung wird geprüft..."]})]})]}),r.jsxs("button",{onClick:j,disabled:p,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[r.jsx(On,{className:Y("h-3.5 w-3.5",p&&"animate-spin")}),r.jsx("span",{children:"Testen"})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(_m,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4 text-cyan-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Io,{className:"h-4 w-4 text-violet-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",r.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Fo,{className:"h-4 w-4 text-indigo-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Yd,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),r.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[r.jsxs("button",{onClick:()=>d("roocode"),className:Y("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",a==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[r.jsx(Om,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),r.jsx("button",{onClick:()=>d("cursor"),className:Y("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),r.jsx("button",{onClick:()=>d("opencode"),className:Y("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[a==="roocode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),r.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),r.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),r.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),r.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",r.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",r.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),a==="cursor"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),r.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),r.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",r.jsx("strong",{children:"Models"}),"."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),r.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",r.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),r.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",r.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),a==="opencode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),r.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),r.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),r.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),r.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Sa,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),r.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",r.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",r.jsx("strong",{children:"Restart"}),"."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[r.jsx(Jd,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),r.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Io,{className:"h-5 w-5 text-cyan-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),r.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",r.jsx("em",{children:"Experts"}),"). Ein intelligenter ",r.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[r.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Jd,{className:"h-5 w-5 text-violet-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),r.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Fo,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",r.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",r.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),r.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- -name: tdd-pro -description: Drive development with strict TDD practices ---- -# Instructions -...`}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",r.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",r.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills find"}),r.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Globaler Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",r.jsx("i",{children:"code-simplification"}),", ",r.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Projekt-Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",r.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Dt,{className:"h-5 w-5 text-indigo-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),r.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),r.jsx("p",{children:r.jsx("strong",{children:"Best Practices für Hermes:"})}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",r.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx($o,{className:"h-5 w-5 text-amber-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),r.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Sa,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),r.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",r.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Yd,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),r.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",r.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx($o,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),r.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Ts,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[r.jsxs("p",{children:["Mission Control 2 ist als ",r.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),r.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(Mp,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),r.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),r.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(Mp,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),r.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[r.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function i1({title:s,hint:o}){return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold",children:s}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),r.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[r.jsx(_0,{className:"h-8 w-8 text-muted-foreground"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const d1=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function zd(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function c1({open:s,onClose:o,defaultTab:a="maintenance"}){const[d,u]=g.useState(null),[f,h]=g.useState([]),[p,v]=g.useState("llama-swap"),[x,w]=g.useState(""),[j,M]=g.useState(!1),[R,F]=g.useState(null),[S,b]=g.useState({}),[P,O]=g.useState("maintenance"),[H,z]=g.useState(!1),[$,I]=g.useState(null);function B(U,xe,Ct){I({type:"alert",title:U,message:xe,onConfirm:()=>{I(null),Ct&&Ct()}})}function ne(U,xe,Ct){I({type:"confirm",title:U,message:xe,onConfirm:()=>{I(null),Ct()},onCancel:()=>I(null)})}function le(U){return U?new Date(U*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[pe,fe]=g.useState(""),[ue,Te]=g.useState(""),[Se,ze]=g.useState(!1),[Pe,Me]=g.useState(!1);g.useEffect(()=>{s&&(fe(localStorage.getItem("mc_sudo_password")||""),Te(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&a&&O(a)},[s,a]);const Z=g.useRef(null);function se(){be("/api/maintenance/updates").then(u).catch(U=>console.error("Error loading updates",U))}function X(){be("/api/jobs").then(U=>h(U.jobs||[])).catch(U=>console.error("Error loading jobs",U))}function E(U){M(!0),F(null),be(`/api/maintenance/logs?service=${U}&lines=150`).then(xe=>{xe.ok?w(xe.text):(w(`Fehler beim Laden der Logs: ${xe.err||"Unbekannter Fehler"}`),(xe.status==="incorrect_password"||xe.status==="password_required")&&F(xe.status))}).catch(xe=>w(`Fehler: ${xe.message}`)).finally(()=>{M(!1),setTimeout(()=>{Z.current&&(Z.current.scrollTop=Z.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;se(),X();const U=setInterval(()=>{X(),se()},3e3);return()=>clearInterval(U)},[s]),g.useEffect(()=>{!s||P!=="logs"||E(p)},[s,P,p]);async function C(){try{await be("/api/maintenance/os-update",{method:"POST"}),X(),O("maintenance")}catch(U){B("Fehler",`Fehler beim Starten des OS-Updates: ${U.message}`)}}async function K(){try{await be("/api/maintenance/engine-update",{method:"POST"}),X(),O("maintenance")}catch(U){B("Fehler",`Fehler beim Engine-Update: ${U.message}`)}}async function J(){z(!0);try{await be("/api/maintenance/check-updates",{method:"POST"}),X(),O("maintenance")}catch(U){B("Fehler",`Fehler bei der Update-Suche: ${U.message}`)}finally{z(!1)}}async function q(U,xe){try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:xe})}),B("Gestartet",`Modell-Upgrade für '${xe}' (${U}) gestartet.`),X(),O("maintenance")}catch(Ct){B("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Ct.message}`)}}async function ae(){ne("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await be("/api/maintenance/reboot",{method:"POST"}),B("Reboot","Reboot ausgelöst. System startet neu...",()=>{o()})}catch(U){B("Fehler",`Fehler beim Reboot: ${U.message}`)}})}async function me(U){b(xe=>({...xe,[U]:!0}));try{const xe=await be("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:U})});xe.ok?B("Dienst neu gestartet",`Dienst ${U} wurde erfolgreich neu gestartet.`,()=>{P==="logs"&&p===U&&E(U)}):B("Fehler",`Fehler beim Neustart: ${xe.err||"Unbekannter Fehler"}`)}catch(xe){B("Fehler",`Fehler beim Neustart: ${xe.message}`)}finally{b(xe=>({...xe,[U]:!1}))}}async function je(U){try{await be(`/api/jobs/${U}/cancel`,{method:"POST"}),X()}catch(xe){B("Fehler",`Fehler beim Abbrechen: ${xe.message}`)}}return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Y("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:o}),r.jsxs("div",{className:Y("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",s?"translate-x-0":"translate-x-full"),children:[r.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Dt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),r.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:r.jsx(kr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[r.jsx("button",{onClick:()=>O("maintenance"),className:Y("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",P==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),r.jsx("button",{onClick:()=>O("logs"),className:Y("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",P==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),r.jsx("button",{onClick:()=>O("settings"),className:Y("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",P==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[P==="maintenance"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),r.jsxs("div",{className:"flex items-center gap-2",children:[(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",le(d.last_check)]}),r.jsxs("button",{onClick:J,disabled:H,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[r.jsx(On,{className:Y("h-3 w-3",H&&"animate-spin")}),"Nach Updates suchen"]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:C,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx(Ts,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:d!=null&&d.os?`${d.os} Updates verfügbar`:"Auf neuestem Stand"})]}),r.jsxs("button",{onClick:K,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx($0,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:d!=null&&d.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),r.jsxs("button",{onClick:ae,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[r.jsx(Rm,{className:"h-4.5 w-4.5"}),r.jsxs("div",{children:[r.jsx("div",{children:"Host-System neu starten (Reboot)"}),r.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(d==null?void 0:d.model_list)&&d.model_list.length>0&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",le(d.last_check)]})]}),r.jsx("div",{className:"space-y-2",children:d.model_list.map(U=>r.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-semibold",children:U.title}),r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:U.repo}),r.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",U.role]})]}),r.jsxs("button",{onClick:()=>q(U.repo,U.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[r.jsx(sn,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},U.role))})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),r.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter(U=>U.state==="running"||U.state==="queued").length," Aktiv"]})]}),r.jsx("div",{className:"space-y-3",children:f.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):f.map(U=>{const xe=U.state==="running"||U.state==="queued";return r.jsxs("div",{className:Y("p-3 rounded-xl border transition-all duration-300",xe?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[xe&&r.jsxs("span",{className:"flex h-2 w-2 relative",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),U.label]}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[r.jsxs("span",{children:["ID: ",U.id]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:Y(U.state==="done"&&"text-emerald-400",U.state==="failed"&&"text-red-400",U.state==="running"&&"text-primary",U.state==="queued"&&"text-amber-400",U.state==="canceled"&&"text-muted-foreground"),children:U.state})]})]}),xe&&r.jsx("button",{onClick:()=>je(U.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),U.state==="running"&&r.jsxs("div",{className:"mt-3 space-y-1",children:[r.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${U.progress??0}%`}})}),r.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[r.jsxs("span",{children:[U.progress??0,"%"]}),U.done_bytes!=null&&U.total_bytes!=null&&r.jsxs("span",{children:[zd(U.done_bytes)," / ",zd(U.total_bytes),U.rate_bps!=null&&` (${zd(U.rate_bps)}/s)`]}),U.eta_s!=null&&r.jsxs("span",{children:["ETA: ",U.eta_s,"s"]})]})]})]},U.id)})})]})]}),P==="logs"&&r.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{value:p,onChange:U=>v(U.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:d1.map(U=>r.jsxs("option",{value:U.id,children:[U.label," (",U.type==="system"?"systemd-root":"user",")"]},U.id))}),r.jsxs("button",{onClick:()=>me(p),disabled:S[p],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[r.jsx(On,{className:Y("h-3.5 w-3.5",S[p]&&"animate-spin")}),"Restart"]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[r.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[r.jsx(Sa,{className:"h-3 w-3 text-primary"}),r.jsxs("span",{children:["stdout/stderr - ",p]})]}),r.jsx("button",{onClick:()=>E(p),disabled:j,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(On,{className:Y("h-3 w-3",j&&"animate-spin")})})]}),r.jsx("pre",{ref:Z,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:R==="password_required"||R==="incorrect_password"?r.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[r.jsx(tc,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),r.jsx("div",{className:"text-xs font-semibold text-amber-300",children:R==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),r.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",p," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),r.jsx("button",{onClick:()=>O("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):j&&!x?r.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):x||r.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),P==="settings"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),r.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(Ts,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Se?"text":"password",value:pe,onChange:U=>fe(U.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>ze(!Se),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Se?r.jsx(Pp,{className:"h-4 w-4"}):r.jsx(Xd,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(O0,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Pe?"text":"password",value:ue,onChange:U=>Te(U.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Me(!Pe),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Pe?r.jsx(Pp,{className:"h-4 w-4"}):r.jsx(Xd,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),r.jsxs("div",{className:"flex gap-3 pt-2",children:[r.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",pe),localStorage.setItem("mc_hf_token",ue),B("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),r.jsx("button",{onClick:()=>{fe(""),Te(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),B("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})]})]}),$&&r.jsx(Ch,{type:$.type,title:$.title,message:$.message,onConfirm:$.onConfirm,onCancel:$.onCancel})]})}function u1(){var j,M,R,F,S;const[s,o]=g.useState("dashboard"),[a,d]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[u,f]=g.useState(!1),[h,p]=g.useState("maintenance"),{data:v}=Xy(),{data:x}=wc(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const b=P=>{var H;p(((H=P.detail)==null?void 0:H.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",b),()=>window.removeEventListener("open-system-drawer",b)},[]);const w=rc.find(b=>b.id===s);return r.jsxs("div",{className:"flex h-full relative",children:[r.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[r.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),r.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),r.jsx(Jy,{onNavigate:o}),r.jsx(c1,{open:u,onClose:()=>f(!1),defaultTab:h}),r.jsxs("aside",{className:Y("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",a?"w-16":"w-60"),children:[r.jsxs("div",{className:Y("flex items-center py-4 border-b border-border/40 shrink-0",a?"flex-col gap-3 px-2":"justify-between px-5"),children:[r.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[r.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!a&&r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r.jsx("button",{onClick:()=>{d(b=>{const P=!b;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:a?"Maximieren":"Minimieren",children:a?r.jsx(j0,{className:"h-4 w-4"}):r.jsx(w0,{className:"h-4 w-4"})})]}),r.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:rc.map(b=>r.jsxs("button",{onClick:()=>o(b.id),className:Y("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",a?"justify-center p-2.5":"gap-3 px-3 py-2",s===b.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:a?b.label:void 0,children:[r.jsx(b.icon,{className:"h-4.5 w-4.5 shrink-0"}),!a&&r.jsx("span",{className:"truncate",children:b.label})]},b.id))}),r.jsx("div",{className:Y("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",a?"px-2 text-center":"px-5"),children:a?r.jsx("div",{className:"flex justify-center",children:r.jsx("span",{className:Y("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",v?v.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:v?`Engine ${v.engine_reachable?"online":"offline"}`:"Backend offline"})}):r.jsxs("div",{className:"space-y-2 text-left",children:[v?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:Y("h-2 w-2 rounded-full animate-pulse",v.engine_reachable?"bg-emerald-500":"bg-amber-500")}),r.jsxs("span",{className:"truncate",children:["Engine ",v.engine_reachable?"online":"offline"]})]}):r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",r.jsx("span",{className:"truncate",children:"Backend offline"})]}),(x==null?void 0:x.versions)&&r.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[r.jsxs("div",{className:"truncate",title:x.versions.mc2?`${x.versions.mc2.branch}-${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""} (${x.versions.mc2.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"MC2:"})," ",x.versions.mc2?`${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:((j=x.versions.engine)==null?void 0:j.type)==="git"?`${x.versions.engine.branch}-${x.versions.engine.hash}${x.versions.engine.dirty?"*":""} (${x.versions.engine.date})`:((M=x.versions.engine)==null?void 0:M.version_text)||"unbekannt",children:[r.jsx("strong",{children:"Engine:"})," ",((R=x.versions.engine)==null?void 0:R.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((S=(F=x.versions.engine)==null?void 0:F.version_text)==null?void 0:S.split(" ").pop())||"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_ui?`${x.versions.hermes_ui.branch}-${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""} (${x.versions.hermes_ui.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes UI:"})," ",x.versions.hermes_ui?`${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_agent?`${x.versions.hermes_agent.branch}-${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""} (${x.versions.hermes_agent.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes Agent:"})," ",x.versions.hermes_agent?`${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[r.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:w.hint}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),r.jsxs("button",{onClick:()=>{const b=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(b)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[r.jsx(E0,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Suchen"}),r.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),r.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[s==="dashboard"&&r.jsx(Qb,{}),s==="models"&&r.jsx(t1,{}),s==="system"&&r.jsx(r1,{}),s==="connect"&&r.jsx(n1,{}),s==="memory"&&r.jsx(o1,{}),s==="agent"&&r.jsx(l1,{}),s==="guide"&&r.jsx(a1,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&r.jsx(i1,{title:w.label,hint:w.hint})]})]})]})}const f1=new n0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Rg.createRoot(document.getElementById("root")).render(r.jsx(pm.StrictMode,{children:r.jsx(s0,{client:f1,children:r.jsx(u1,{})})})); diff --git a/frontend/dist/assets/index-OBh42VZw.js b/frontend/dist/assets/index-OBh42VZw.js new file mode 100644 index 0000000..b0f03d8 --- /dev/null +++ b/frontend/dist/assets/index-OBh42VZw.js @@ -0,0 +1,397 @@ +var cp=s=>{throw TypeError(s)};var wd=(s,o,a)=>o.has(s)||cp("Cannot "+a);var N=(s,o,a)=>(wd(s,o,"read from private field"),a?a.call(s):o.get(s)),ge=(s,o,a)=>o.has(s)?cp("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,a),re=(s,o,a,d)=>(wd(s,o,"write to private field"),d?d.call(s,a):o.set(s,a),a),Ee=(s,o,a)=>(wd(s,o,"access private method"),a);var pa=(s,o,a,d)=>({set _(u){re(s,o,u,a)},get _(){return N(s,o,d)}});function jg(s,o){for(var a=0;ad[u]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))d(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&d(h)}).observe(document,{childList:!0,subtree:!0});function a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function d(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function pm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var jd={exports:{}},To={},kd={exports:{}},Se={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var up;function kg(){if(up)return Se;up=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),w=Symbol.iterator;function P(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,_={};function k(M,S,q){this.props=M,this.context=S,this.refs=_,this.updater=q||R}k.prototype.isReactComponent={},k.prototype.setState=function(M,S){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,S,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=k.prototype;function O(M,S,q){this.props=M,this.context=S,this.refs=_,this.updater=q||R}var B=O.prototype=new C;B.constructor=O,L(B,k.prototype),B.isPureReactComponent=!0;var z=Array.isArray,$=Object.prototype.hasOwnProperty,I={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function ne(M,S,q){var X,W={},ae=null,fe=null;if(S!=null)for(X in S.ref!==void 0&&(fe=S.ref),S.key!==void 0&&(ae=""+S.key),S)$.call(S,X)&&!H.hasOwnProperty(X)&&(W[X]=S[X]);var we=arguments.length-2;if(we===1)W.children=q;else if(1>>1,S=Z[M];if(0>>1;Mu(W,Y))aeu(fe,W)?(Z[M]=fe,Z[ae]=Y,M=ae):(Z[M]=W,Z[X]=Y,M=X);else if(aeu(fe,Y))Z[M]=fe,Z[ae]=Y,M=ae;else break e}}return de}function u(Z,de){var Y=Z.sortIndex-de.sortIndex;return Y!==0?Y:Z.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();s.unstable_now=function(){return h.now()-p}}var v=[],x=[],b=1,w=null,P=3,R=!1,L=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(Z){for(var de=a(x);de!==null;){if(de.callback===null)d(x);else if(de.startTime<=Z)d(x),de.sortIndex=de.expirationTime,o(v,de);else break;de=a(x)}}function z(Z){if(_=!1,B(Z),!L)if(a(v)!==null)L=!0,Te($);else{var de=a(x);de!==null&&Ce(z,de.startTime-Z)}}function $(Z,de){L=!1,_&&(_=!1,C(ne),ne=-1),R=!0;var Y=P;try{for(B(de),w=a(v);w!==null&&(!(w.expirationTime>de)||Z&&!be());){var M=w.callback;if(typeof M=="function"){w.callback=null,P=w.priorityLevel;var S=M(w.expirationTime<=de);de=s.unstable_now(),typeof S=="function"?w.callback=S:w===a(v)&&d(v),B(de)}else d(v);w=a(v)}if(w!==null)var q=!0;else{var X=a(x);X!==null&&Ce(z,X.startTime-de),q=!1}return q}finally{w=null,P=Y,R=!1}}var I=!1,H=null,ne=-1,oe=5,ye=-1;function be(){return!(s.unstable_now()-yeZ||125M?(Z.sortIndex=Y,o(x,Z),a(v)===null&&Z===a(x)&&(_?(C(ne),ne=-1):_=!0,Ce(z,Y-M))):(Z.sortIndex=S,o(v,Z),L||R||(L=!0,Te($))),Z},s.unstable_shouldYield=be,s.unstable_wrapCallback=function(Z){var de=P;return function(){var Y=P;P=de;try{return Z.apply(this,arguments)}finally{P=Y}}}})(Cd)),Cd}var xp;function Eg(){return xp||(xp=1,Sd.exports=Cg()),Sd.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gp;function _g(){if(gp)return jt;gp=1;var s=fc(),o=Eg();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,b={},w={};function P(e){return v.call(w,e)?!0:v.call(b,e)?!1:x.test(e)?w[e]=!0:(b[e]=!0,!1)}function R(e,t,n,l){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function L(e,t,n,l){if(t===null||typeof t>"u"||R(e,t,n,l))return!0;if(l)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,l,i,c,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=m}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(C,O);k[t]=new _(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(C,O);k[t]=new _(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(C,O);k[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,n,l){var i=k.hasOwnProperty(t)?k[t]:null;(i!==null?i.type!==0:l||!(2y||i[m]!==c[y]){var j=` +`+i[m].replace(" at new "," at ");return e.displayName&&j.includes("")&&(j=j.replace("",e.displayName)),j}while(1<=m&&0<=y);break}}}finally{q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?S(e):""}function W(e){switch(e.tag){case 5:return S(e.type);case 16:return S("Lazy");case 13:return S("Suspense");case 19:return S("SuspenseList");case 0:case 2:case 15:return e=X(e.type,!1),e;case 11:return e=X(e.type.render,!1),e;case 1:return e=X(e.type,!0),e;default:return""}}function ae(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case I:return"Portal";case oe:return"Profiler";case ne:return"StrictMode";case Ae:return"Suspense";case _e:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case be:return(e.displayName||"Context")+".Consumer";case ye:return(e._context.displayName||"Context")+".Provider";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Re:return t=e.displayName||null,t!==null?t:ae(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}function fe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(t);case 8:return t===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function we(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function me(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){l=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xt(e){e._valueTracker||(e._valueTracker=me(e))}function sl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=U(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Hn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Vs(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ol(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=we(t.value!=null?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gn(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function un(e,t){Gn(e,t);var n=we(t.value),l=t.type;if(n!=null)l==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vn(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vn(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ws(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vn(e,t,n){(t!=="number"||Hn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nr=Array.isArray;function dr(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Er={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},D=["Webkit","ms","Moz","O"];Object.keys(Er).forEach(function(e){D.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Er[t]=Er[e]})});function ee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Er.hasOwnProperty(e)&&Er[e]?(""+t).trim():t+"px"}function je(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,i=ee(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,i):e[n]=i}}var De=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Be(e,t){if(t){if(De[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function Yt(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pn=null;function mn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ys=null,Qn=null,qn=null;function Cc(e){if(e=bo(e)){if(typeof Ys!="function")throw Error(a(280));var t=e.stateNode;t&&(t=_l(t),Ys(e.stateNode,e.type,t))}}function Ec(e){Qn?qn?qn.push(e):qn=[e]:Qn=e}function _c(){if(Qn){var e=Qn,t=qn;if(qn=Qn=null,Cc(e),t)for(e=0;e>>=0,e===0?32:31-(Fh(e)/Ih|0)|0}var cl=64,ul=4194304;function to(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fl(e,t){var n=e.pendingLanes;if(n===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes,m=n&268435455;if(m!==0){var y=m&~i;y!==0?l=to(y):(c&=m,c!==0&&(l=to(c)))}else m=n&~i,m!==0?l=to(m):c!==0&&(l=to(c));if(l===0)return 0;if(t!==0&&t!==l&&(t&i)===0&&(i=l&-l,c=t&-t,i>=c||i===16&&(c&4194240)!==0))return t;if((l&4)!==0&&(l|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0n;n++)t.push(e);return t}function ro(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bt(t),e[t]=n}function Hh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=uo),ru=" ",nu=!1;function su(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jn=!1;function yx(e,t){switch(e){case"compositionend":return ou(t);case"keypress":return t.which!==32?null:(nu=!0,ru);case"textInput":return e=t.data,e===ru&&nu?null:e;default:return null}}function bx(e,t){if(Jn)return e==="compositionend"||!ti&&su(e,t)?(e=Zc(),gl=qa=Or=null,Jn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fu(n)}}function mu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hu(){for(var e=window,t=Hn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hn(e.document)}return t}function si(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Mx(e){var t=hu(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mu(n.ownerDocument.documentElement,n)){if(l!==null&&si(n)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,c=Math.min(l.start,i);l=l.end===void 0?c:Math.min(l.end,i),!e.extend&&c>l&&(i=l,l=c,c=i),i=pu(n,c);var m=pu(n,l);i&&m&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),c>l?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Xn=null,oi=null,ho=null,li=!1;function xu(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;li||Xn==null||Xn!==Hn(l)||(l=Xn,"selectionStart"in l&&si(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ho&&mo(ho,l)||(ho=l,l=Sl(oi,"onSelect"),0ss||(e.current=vi[ss],vi[ss]=null,ss--)}function Fe(e,t){ss++,vi[ss]=e.current,e.current=t}var zr={},it=Tr(zr),gt=Tr(!1),gn=zr;function os(e,t){var n=e.type.contextTypes;if(!n)return zr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var i={},c;for(c in n)i[c]=t[c];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function vt(e){return e=e.childContextTypes,e!=null}function Ml(){$e(gt),$e(it)}function Ru(e,t,n){if(it.current!==zr)throw Error(a(168));Fe(it,t),Fe(gt,n)}function Ou(e,t,n){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return n;l=l.getChildContext();for(var i in l)if(!(i in t))throw Error(a(108,fe(e)||"Unknown",i));return Y({},n,l)}function Pl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zr,gn=it.current,Fe(it,e),Fe(gt,gt.current),!0}function Du(e,t,n){var l=e.stateNode;if(!l)throw Error(a(169));n?(e=Ou(e,t,gn),l.__reactInternalMemoizedMergedChildContext=e,$e(gt),$e(it),Fe(it,e)):$e(gt),Fe(gt,n)}var ur=null,Rl=!1,yi=!1;function Au(e){ur===null?ur=[e]:ur.push(e)}function Ux(e){Rl=!0,Au(e)}function Lr(){if(!yi&&ur!==null){yi=!0;var e=0,t=Le;try{var n=ur;for(Le=1;e>=m,i-=m,fr=1<<32-Bt(t)+i|n<ke?(rt=xe,xe=null):rt=xe.sibling;var Oe=G(A,xe,T[ke],Q);if(Oe===null){xe===null&&(xe=rt);break}e&&xe&&Oe.alternate===null&&t(A,xe),E=c(Oe,E,ke),he===null?ue=Oe:he.sibling=Oe,he=Oe,xe=rt}if(ke===T.length)return n(A,xe),He&&yn(A,ke),ue;if(xe===null){for(;keke?(rt=xe,xe=null):rt=xe.sibling;var Wr=G(A,xe,Oe.value,Q);if(Wr===null){xe===null&&(xe=rt);break}e&&xe&&Wr.alternate===null&&t(A,xe),E=c(Wr,E,ke),he===null?ue=Wr:he.sibling=Wr,he=Wr,xe=rt}if(Oe.done)return n(A,xe),He&&yn(A,ke),ue;if(xe===null){for(;!Oe.done;ke++,Oe=T.next())Oe=K(A,Oe.value,Q),Oe!==null&&(E=c(Oe,E,ke),he===null?ue=Oe:he.sibling=Oe,he=Oe);return He&&yn(A,ke),ue}for(xe=l(A,xe);!Oe.done;ke++,Oe=T.next())Oe=te(xe,A,ke,Oe.value,Q),Oe!==null&&(e&&Oe.alternate!==null&&xe.delete(Oe.key===null?ke:Oe.key),E=c(Oe,E,ke),he===null?ue=Oe:he.sibling=Oe,he=Oe);return e&&xe.forEach(function(wg){return t(A,wg)}),He&&yn(A,ke),ue}function Ze(A,E,T,Q){if(typeof T=="object"&&T!==null&&T.type===H&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case $:e:{for(var ue=T.key,he=E;he!==null;){if(he.key===ue){if(ue=T.type,ue===H){if(he.tag===7){n(A,he.sibling),E=i(he,T.props.children),E.return=A,A=E;break e}}else if(he.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Te&&$u(ue)===he.type){n(A,he.sibling),E=i(he,T.props),E.ref=wo(A,he,T),E.return=A,A=E;break e}n(A,he);break}else t(A,he);he=he.sibling}T.type===H?(E=En(T.props.children,A.mode,Q,T.key),E.return=A,A=E):(Q=oa(T.type,T.key,T.props,null,A.mode,Q),Q.ref=wo(A,E,T),Q.return=A,A=Q)}return m(A);case I:e:{for(he=T.key;E!==null;){if(E.key===he)if(E.tag===4&&E.stateNode.containerInfo===T.containerInfo&&E.stateNode.implementation===T.implementation){n(A,E.sibling),E=i(E,T.children||[]),E.return=A,A=E;break e}else{n(A,E);break}else t(A,E);E=E.sibling}E=xd(T,A.mode,Q),E.return=A,A=E}return m(A);case Te:return he=T._init,Ze(A,E,he(T._payload),Q)}if(Nr(T))return ie(A,E,T,Q);if(de(T))return ce(A,E,T,Q);Tl(A,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,E!==null&&E.tag===6?(n(A,E.sibling),E=i(E,T),E.return=A,A=E):(n(A,E),E=hd(T,A.mode,Q),E.return=A,A=E),m(A)):n(A,E)}return Ze}var ds=Uu(!0),Bu=Uu(!1),zl=Tr(null),Ll=null,cs=null,Si=null;function Ci(){Si=cs=Ll=null}function Ei(e){var t=zl.current;$e(zl),e._currentValue=t}function _i(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function us(e,t){Ll=e,Si=cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(yt=!0),e.firstContext=null)}function zt(e){var t=e._currentValue;if(Si!==e)if(e={context:e,memoizedValue:t,next:null},cs===null){if(Ll===null)throw Error(a(308));cs=e,Ll.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return t}var bn=null;function Mi(e){bn===null?bn=[e]:bn.push(e)}function Hu(e,t,n,l){var i=t.interleaved;return i===null?(n.next=n,Mi(t)):(n.next=i.next,i.next=n),t.interleaved=n,mr(e,l)}function mr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fr=!1;function Pi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function hr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ir(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Pe&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,mr(e,n)}return i=l.interleaved,i===null?(t.next=t,Mi(l)):(t.next=i.next,i.next=t),l.interleaved=t,mr(e,n)}function Fl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ga(e,n)}}function Vu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};c===null?i=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:l.shared,effects:l.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,l){var i=e.updateQueue;Fr=!1;var c=i.firstBaseUpdate,m=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var j=y,F=j.next;j.next=null,m===null?c=F:m.next=F,m=j;var V=e.alternate;V!==null&&(V=V.updateQueue,y=V.lastBaseUpdate,y!==m&&(y===null?V.firstBaseUpdate=F:y.next=F,V.lastBaseUpdate=j))}if(c!==null){var K=i.baseState;m=0,V=F=j=null,y=c;do{var G=y.lane,te=y.eventTime;if((l&G)===G){V!==null&&(V=V.next={eventTime:te,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var ie=e,ce=y;switch(G=t,te=n,ce.tag){case 1:if(ie=ce.payload,typeof ie=="function"){K=ie.call(te,K,G);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,G=typeof ie=="function"?ie.call(te,K,G):ie,G==null)break e;K=Y({},K,G);break e;case 2:Fr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,G=i.effects,G===null?i.effects=[y]:G.push(y))}else te={eventTime:te,lane:G,tag:y.tag,payload:y.payload,callback:y.callback,next:null},V===null?(F=V=te,j=K):V=V.next=te,m|=G;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;G=y,y=G.next,G.next=null,i.lastBaseUpdate=G,i.shared.pending=null}}while(!0);if(V===null&&(j=K),i.baseState=j,i.firstBaseUpdate=F,i.lastBaseUpdate=V,t=i.shared.interleaved,t!==null){i=t;do m|=i.lane,i=i.next;while(i!==t)}else c===null&&(i.shared.lanes=0);kn|=m,e.lanes=m,e.memoizedState=K}}function Wu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var l=Ti.transition;Ti.transition={};try{e(!1),t()}finally{Le=n,Ti.transition=l}}function ff(){return Lt().memoizedState}function Vx(e,t,n){var l=Hr(e);if(n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},pf(e))mf(t,n);else if(n=Hu(e,t,n,l),n!==null){var i=mt();Qt(n,e,l,i),hf(n,t,l)}}function Wx(e,t,n){var l=Hr(e),i={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(pf(e))mf(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,y=c(m,n);if(i.hasEagerState=!0,i.eagerState=y,Ht(y,m)){var j=t.interleaved;j===null?(i.next=i,Mi(t)):(i.next=j.next,j.next=i),t.interleaved=i;return}}catch{}finally{}n=Hu(e,t,i,l),n!==null&&(i=mt(),Qt(n,e,l,i),hf(n,t,l))}}function pf(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function mf(e,t){So=Bl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hf(e,t,n){if((n&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ga(e,n)}}var Vl={readContext:zt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},Kx={readContext:zt,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:nf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hl(4194308,4,lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hl(4,2,e,t)},useMemo:function(e,t){var n=tr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=tr();return t=n!==void 0?n(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Vx.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:tf,useDebugValue:Bi,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=tf(!1),t=e[0];return e=Gx.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=Ve,i=tr();if(He){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),tt===null)throw Error(a(349));(jn&30)!==0||Zu(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,nf(Ju.bind(null,l,c,e),[e]),l.flags|=2048,_o(9,Yu.bind(null,l,c,n,t),void 0,null),n},useId:function(){var e=tr(),t=tt.identifierPrefix;if(He){var n=pr,l=fr;n=(l&~(1<<32-Bt(l)-1)).toString(32)+n,t=":"+t+"R"+n,n=Co++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(n,{is:l.is}):(e=m.createElement(n),n==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,n),e[Xt]=t,e[yo]=l,Tf(e,t,!1,!1),t.stateNode=e;e:{switch(m=Yt(n,l),n){case"dialog":Ie("cancel",e),Ie("close",e),i=l;break;case"iframe":case"object":case"embed":Ie("load",e),i=l;break;case"video":case"audio":for(i=0;ixs&&(t.flags|=128,l=!0,Mo(c,!1),t.lanes=4194304)}else{if(!l)if(e=$l(m),e!==null){if(t.flags|=128,l=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!He)return ct(t),null}else 2*qe()-c.renderingStartTime>xs&&n!==1073741824&&(t.flags|=128,l=!0,Mo(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(n=c.last,n!==null?n.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=qe(),t.sibling=null,n=Ge.current,Fe(Ge,l?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return fd(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(Pt&1073741824)!==0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function tg(e,t){switch(wi(t),t.tag){case 1:return vt(t.type)&&Ml(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),$e(gt),$e(it),Ai(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oi(t),null;case 13:if($e(Ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $e(Ge),null;case 4:return fs(),null;case 10:return Ei(t.type._context),null;case 22:case 23:return fd(),null;case 24:return null;default:return null}}var ql=!1,ut=!1,rg=typeof WeakSet=="function"?WeakSet:Set,se=null;function ms(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(l){We(e,t,l)}else n.current=null}function ed(e,t,n){try{n()}catch(l){We(e,t,l)}}var Ff=!1;function ng(e,t){if(fi=hl,e=hu(),si(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,y=-1,j=-1,F=0,V=0,K=e,G=null;t:for(;;){for(var te;K!==n||i!==0&&K.nodeType!==3||(y=m+i),K!==c||l!==0&&K.nodeType!==3||(j=m+l),K.nodeType===3&&(m+=K.nodeValue.length),(te=K.firstChild)!==null;)G=K,K=te;for(;;){if(K===e)break t;if(G===n&&++F===i&&(y=m),G===c&&++V===l&&(j=m),(te=K.nextSibling)!==null)break;K=G,G=K.parentNode}K=te}n=y===-1||j===-1?null:{start:y,end:j}}else n=null}n=n||{start:0,end:0}}else n=null;for(pi={focusedElem:e,selectionRange:n},hl=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var ie=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var ce=ie.memoizedProps,Ze=ie.memoizedState,A=t.stateNode,E=A.getSnapshotBeforeUpdate(t.elementType===t.type?ce:Vt(t.type,ce),Ze);A.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Q){We(t,t.return,Q)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return ie=Ff,Ff=!1,ie}function Po(e,t,n){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var i=l=l.next;do{if((i.tag&e)===e){var c=i.destroy;i.destroy=void 0,c!==void 0&&ed(t,n,c)}i=i.next}while(i!==l)}}function Zl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var l=n.create;n.destroy=l()}n=n.next}while(n!==t)}}function td(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function If(e){var t=e.alternate;t!==null&&(e.alternate=null,If(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xt],delete t[yo],delete t[gi],delete t[Ix],delete t[$x])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $f(e){return e.tag===5||e.tag===3||e.tag===4}function Uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$f(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rd(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=El));else if(l!==4&&(e=e.child,e!==null))for(rd(e,t,n),e=e.sibling;e!==null;)rd(e,t,n),e=e.sibling}function nd(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(nd(e,t,n),e=e.sibling;e!==null;)nd(e,t,n),e=e.sibling}var st=null,Wt=!1;function $r(e,t,n){for(n=n.child;n!==null;)Bf(e,t,n),n=n.sibling}function Bf(e,t,n){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(dl,n)}catch{}switch(n.tag){case 5:ut||ms(n,t);case 6:var l=st,i=Wt;st=null,$r(e,t,n),st=l,Wt=i,st!==null&&(Wt?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(Wt?(e=st,n=n.stateNode,e.nodeType===8?xi(e.parentNode,n):e.nodeType===1&&xi(e,n),ao(e)):xi(st,n.stateNode));break;case 4:l=st,i=Wt,st=n.stateNode.containerInfo,Wt=!0,$r(e,t,n),st=l,Wt=i;break;case 0:case 11:case 14:case 15:if(!ut&&(l=n.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){i=l=l.next;do{var c=i,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&ed(n,t,m),i=i.next}while(i!==l)}$r(e,t,n);break;case 1:if(!ut&&(ms(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=n.memoizedProps,l.state=n.memoizedState,l.componentWillUnmount()}catch(y){We(n,t,y)}$r(e,t,n);break;case 21:$r(e,t,n);break;case 22:n.mode&1?(ut=(l=ut)||n.memoizedState!==null,$r(e,t,n),ut=l):$r(e,t,n);break;default:$r(e,t,n)}}function Hf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rg),t.forEach(function(l){var i=fg.bind(null,e,l);n.has(l)||(n.add(l),l.then(i,i))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var l=0;li&&(i=m),l&=~c}if(l=i,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*og(l/1960))-l,10e?16:e,Br===null)var l=!1;else{if(e=Br,Br=null,ta=0,(Pe&6)!==0)throw Error(a(331));var i=Pe;for(Pe|=4,se=e.current;se!==null;){var c=se,m=c.child;if((se.flags&16)!==0){var y=c.deletions;if(y!==null){for(var j=0;jqe()-ld?Sn(e,0):od|=n),wt(e,t)}function rp(e,t){t===0&&((e.mode&1)===0?t=1:(t=ul,ul<<=1,(ul&130023424)===0&&(ul=4194304)));var n=mt();e=mr(e,t),e!==null&&(ro(e,t,n),wt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rp(e,n)}function fg(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}l!==null&&l.delete(t),rp(e,n)}var np;np=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gt.current)yt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return yt=!1,Xx(e,t,n);yt=(e.flags&131072)!==0}else yt=!1,He&&(t.flags&1048576)!==0&&Tu(t,Dl,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Ql(e,t),e=t.pendingProps;var i=os(t,it.current);us(t,n),i=Li(null,t,l,e,i,n);var c=Fi();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(l)?(c=!0,Pl(t)):c=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Pi(t),i.updater=Wl,t.stateNode=i,i._reactInternals=t,Gi(t,l,e,n),t=Qi(null,t,l,!0,c,n)):(t.tag=0,He&&c&&bi(t),pt(null,t,i,n),t=t.child),t;case 16:l=t.elementType;e:{switch(Ql(e,t),e=t.pendingProps,i=l._init,l=i(l._payload),t.type=l,i=t.tag=mg(l),e=Vt(l,e),i){case 0:t=Ki(null,t,l,e,n);break e;case 1:t=Mf(null,t,l,e,n);break e;case 11:t=Nf(null,t,l,e,n);break e;case 14:t=Sf(null,t,l,Vt(l.type,e),n);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Vt(l,i),Ki(e,t,l,i,n);case 1:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Vt(l,i),Mf(e,t,l,i,n);case 3:e:{if(Pf(t),e===null)throw Error(a(387));l=t.pendingProps,c=t.memoizedState,i=c.element,Gu(e,t),Il(t,l,null,n);var m=t.memoizedState;if(l=m.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){i=ps(Error(a(423)),t),t=Rf(e,t,l,n,i);break e}else if(l!==i){i=ps(Error(a(424)),t),t=Rf(e,t,l,n,i);break e}else for(Mt=Ar(t.stateNode.containerInfo.firstChild),_t=t,He=!0,Gt=null,n=Bu(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(is(),l===i){t=xr(e,t,n);break e}pt(e,t,l,n)}t=t.child}return t;case 5:return Ku(t),e===null&&ki(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,m=i.children,mi(l,i)?m=null:c!==null&&mi(l,c)&&(t.flags|=32),_f(e,t),pt(e,t,m,n),t.child;case 6:return e===null&&ki(t),null;case 13:return Of(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ds(t,null,l,n):pt(e,t,l,n),t.child;case 11:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Vt(l,i),Nf(e,t,l,i,n);case 7:return pt(e,t,t.pendingProps,n),t.child;case 8:return pt(e,t,t.pendingProps.children,n),t.child;case 12:return pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,i=t.pendingProps,c=t.memoizedProps,m=i.value,Fe(zl,l._currentValue),l._currentValue=m,c!==null)if(Ht(c.value,m)){if(c.children===i.children&&!gt.current){t=xr(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var y=c.dependencies;if(y!==null){m=c.child;for(var j=y.firstContext;j!==null;){if(j.context===l){if(c.tag===1){j=hr(-1,n&-n),j.tag=2;var F=c.updateQueue;if(F!==null){F=F.shared;var V=F.pending;V===null?j.next=j:(j.next=V.next,V.next=j),F.pending=j}}c.lanes|=n,j=c.alternate,j!==null&&(j.lanes|=n),_i(c.return,n,t),y.lanes|=n;break}j=j.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(a(341));m.lanes|=n,y=m.alternate,y!==null&&(y.lanes|=n),_i(m,n,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}pt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,l=t.pendingProps.children,us(t,n),i=zt(i),l=l(i),t.flags|=1,pt(e,t,l,n),t.child;case 14:return l=t.type,i=Vt(l,t.pendingProps),i=Vt(l.type,i),Sf(e,t,l,i,n);case 15:return Cf(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Vt(l,i),Ql(e,t),t.tag=1,vt(l)?(e=!0,Pl(t)):e=!1,us(t,n),gf(t,l,i),Gi(t,l,i,n),Qi(null,t,l,!0,e,n);case 19:return Af(e,t,n);case 22:return Ef(e,t,n)}throw Error(a(156,t.tag))};function sp(e,t){return zc(e,t)}function pg(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,l){return new pg(e,t,n,l)}function md(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mg(e){if(typeof e=="function")return md(e)?1:0;if(e!=null){if(e=e.$$typeof,e===le)return 11;if(e===Re)return 14}return 2}function Vr(e,t){var n=e.alternate;return n===null?(n=It(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function oa(e,t,n,l,i,c){var m=2;if(l=e,typeof e=="function")md(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case H:return En(n.children,i,c,t);case ne:m=8,i|=8;break;case oe:return e=It(12,n,t,i|2),e.elementType=oe,e.lanes=c,e;case Ae:return e=It(13,n,t,i),e.elementType=Ae,e.lanes=c,e;case _e:return e=It(19,n,t,i),e.elementType=_e,e.lanes=c,e;case Ce:return la(n,i,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ye:m=10;break e;case be:m=9;break e;case le:m=11;break e;case Re:m=14;break e;case Te:m=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=It(m,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function En(e,t,n,l){return e=It(7,e,l,t),e.lanes=n,e}function la(e,t,n,l){return e=It(22,e,l,t),e.elementType=Ce,e.lanes=n,e.stateNode={isHidden:!1},e}function hd(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function xd(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hg(e,t,n,l,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ha(0),this.expirationTimes=Ha(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ha(0),this.identifierPrefix=l,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gd(e,t,n,l,i,c,m,y,j){return e=new hg(e,t,n,y,j),t===1?(t=1,c===!0&&(t|=8)):t=0,c=It(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pi(c),e}function xg(e,t,n){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Nd.exports=_g(),Nd.exports}var yp;function Mg(){if(yp)return ma;yp=1;var s=hm();return ma.createRoot=s.createRoot,ma.hydrateRoot=s.hydrateRoot,ma}var Pg=Mg();const Rg=pm(Pg);var rl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Pn,Yr,Cs,nm,Og=(nm=class extends rl{constructor(){super();ge(this,Pn);ge(this,Yr);ge(this,Cs);re(this,Cs,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){N(this,Yr)||this.setEventListener(N(this,Cs))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Yr))==null||o.call(this),re(this,Yr,void 0))}setEventListener(o){var a;re(this,Cs,o),(a=N(this,Yr))==null||a.call(this),re(this,Yr,o(d=>{typeof d=="boolean"?this.setFocused(d):this.onFocus()}))}setFocused(o){N(this,Pn)!==o&&(re(this,Pn,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(a=>{a(o)})}isFocused(){var o;return typeof N(this,Pn)=="boolean"?N(this,Pn):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},Pn=new WeakMap,Yr=new WeakMap,Cs=new WeakMap,nm),mc=new Og,Dg={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},Jr,uc,sm,Ag=(sm=class{constructor(){ge(this,Jr,Dg);ge(this,uc,!1)}setTimeoutProvider(s){re(this,Jr,s)}setTimeout(s,o){return N(this,Jr).setTimeout(s,o)}clearTimeout(s){N(this,Jr).clearTimeout(s)}setInterval(s,o){return N(this,Jr).setInterval(s,o)}clearInterval(s){N(this,Jr).clearInterval(s)}},Jr=new WeakMap,uc=new WeakMap,sm),Mn=new Ag;function Tg(s){setTimeout(s,0)}var zg=typeof window>"u"||"Deno"in globalThis;function Nt(){}function Lg(s,o){return typeof s=="function"?s(o):s}function Id(s){return typeof s=="number"&&s>=0&&s!==1/0}function xm(s,o){return Math.max(s+(o||0)-Date.now(),0)}function on(s,o){return typeof s=="function"?s(o):s}function Ot(s,o){return typeof s=="function"?s(o):s}function bp(s,o){const{type:a="all",exact:d,fetchStatus:u,predicate:f,queryKey:h,stale:p}=s;if(h){if(d){if(o.queryHash!==hc(h,o.options))return!1}else if(!Uo(o.queryKey,h))return!1}if(a!=="all"){const v=o.isActive();if(a==="active"&&!v||a==="inactive"&&v)return!1}return!(typeof p=="boolean"&&o.isStale()!==p||u&&u!==o.state.fetchStatus||f&&!f(o))}function wp(s,o){const{exact:a,status:d,predicate:u,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(a){if($o(o.options.mutationKey)!==$o(f))return!1}else if(!Uo(o.options.mutationKey,f))return!1}return!(d&&o.state.status!==d||u&&!u(o))}function hc(s,o){return((o==null?void 0:o.queryKeyHashFn)||$o)(s)}function $o(s){return JSON.stringify(s,(o,a)=>Ud(a)?Object.keys(a).sort().reduce((d,u)=>(d[u]=a[u],d),{}):a)}function Uo(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(a=>Uo(s[a],o[a])):!1}var Fg=Object.prototype.hasOwnProperty;function gm(s,o,a=0){if(s===o)return s;if(a>500)return o;const d=jp(s)&&jp(o);if(!d&&!(Ud(s)&&Ud(o)))return o;const f=(d?s:Object.keys(s)).length,h=d?o:Object.keys(o),p=h.length,v=d?new Array(p):{};let x=0;for(let b=0;b{Mn.setTimeout(o,s)})}function Bd(s,o,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,o):a.structuralSharing!==!1?gm(s,o):o}function $g(s,o,a=0){const d=[...s,o];return a&&d.length>a?d.slice(1):d}function Ug(s,o,a=0){const d=[o,...s];return a&&d.length>a?d.slice(0,-1):d}var xc=Symbol();function vm(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===xc?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function ym(s,o){return typeof s=="function"?s(...o):!!s}function Bg(s,o,a){let d=!1,u;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(u??(u=o()),d||(d=!0,u.aborted?a():u.addEventListener("abort",a,{once:!0})),u)}),s}var Bo=(()=>{let s=()=>zg;return{isServer(){return s()},setIsServer(o){s=o}}})();function Hd(){let s,o;const a=new Promise((u,f)=>{s=u,o=f});a.status="pending",a.catch(()=>{});function d(u){Object.assign(a,u),delete a.resolve,delete a.reject}return a.resolve=u=>{d({status:"fulfilled",value:u}),s(u)},a.reject=u=>{d({status:"rejected",reason:u}),o(u)},a}var Hg=Tg;function Gg(){let s=[],o=0,a=p=>{p()},d=p=>{p()},u=Hg;const f=p=>{o?s.push(p):u(()=>{a(p)})},h=()=>{const p=s;s=[],p.length&&u(()=>{d(()=>{p.forEach(v=>{a(v)})})})};return{batch:p=>{let v;o++;try{v=p()}finally{o--,o||h()}return v},batchCalls:p=>(...v)=>{f(()=>{p(...v)})},schedule:f,setNotifyFunction:p=>{a=p},setBatchNotifyFunction:p=>{d=p},setScheduler:p=>{u=p}}}var lt=Gg(),Es,Xr,_s,om,Vg=(om=class extends rl{constructor(){super();ge(this,Es,!0);ge(this,Xr);ge(this,_s);re(this,_s,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o(!0),d=()=>o(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",d,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",d)}}})}onSubscribe(){N(this,Xr)||this.setEventListener(N(this,_s))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Xr))==null||o.call(this),re(this,Xr,void 0))}setEventListener(o){var a;re(this,_s,o),(a=N(this,Xr))==null||a.call(this),re(this,Xr,o(this.setOnline.bind(this)))}setOnline(o){N(this,Es)!==o&&(re(this,Es,o),this.listeners.forEach(d=>{d(o)}))}isOnline(){return N(this,Es)}},Es=new WeakMap,Xr=new WeakMap,_s=new WeakMap,om),Ma=new Vg;function Wg(s){return Math.min(1e3*2**s,3e4)}function bm(s){return(s??"online")==="online"?Ma.isOnline():!0}var Gd=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function wm(s){let o=!1,a=0,d;const u=Hd(),f=()=>u.status!=="pending",h=_=>{var k;if(!f()){const C=new Gd(_);P(C),(k=s.onCancel)==null||k.call(s,C)}},p=()=>{o=!0},v=()=>{o=!1},x=()=>mc.isFocused()&&(s.networkMode==="always"||Ma.isOnline())&&s.canRun(),b=()=>bm(s.networkMode)&&s.canRun(),w=_=>{f()||(d==null||d(),u.resolve(_))},P=_=>{f()||(d==null||d(),u.reject(_))},R=()=>new Promise(_=>{var k;d=C=>{(f()||x())&&_(C)},(k=s.onPause)==null||k.call(s)}).then(()=>{var _;d=void 0,f()||(_=s.onContinue)==null||_.call(s)}),L=()=>{if(f())return;let _;const k=a===0?s.initialPromise:void 0;try{_=k??s.fn()}catch(C){_=Promise.reject(C)}Promise.resolve(_).then(w).catch(C=>{var I;if(f())return;const O=s.retry??(Bo.isServer()?0:3),B=s.retryDelay??Wg,z=typeof B=="function"?B(a,C):B,$=O===!0||typeof O=="number"&&ax()?void 0:R()).then(()=>{o?P(C):L()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(d==null||d(),u),cancelRetry:p,continueRetry:v,canStart:b,start:()=>(b()?L():R().then(L),u)}}var Rn,lm,jm=(lm=class{constructor(){ge(this,Rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Id(this.gcTime)&&re(this,Rn,Mn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Bo.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,Rn)!==void 0&&(Mn.clearTimeout(N(this,Rn)),re(this,Rn,void 0))}},Rn=new WeakMap,lm);function Kg(s){return{onFetch:(o,a)=>{var b,w,P,R,L;const d=o.options,u=(P=(w=(b=o.fetchOptions)==null?void 0:b.meta)==null?void 0:w.fetchMore)==null?void 0:P.direction,f=((R=o.state.data)==null?void 0:R.pages)||[],h=((L=o.state.data)==null?void 0:L.pageParams)||[];let p={pages:[],pageParams:[]},v=0;const x=async()=>{let _=!1;const k=B=>{Bg(B,()=>o.signal,()=>_=!0)},C=vm(o.options,o.fetchOptions),O=async(B,z,$)=>{if(_)return Promise.reject(o.signal.reason);if(z==null&&B.pages.length)return Promise.resolve(B);const H=(()=>{const be={client:o.client,queryKey:o.queryKey,pageParam:z,direction:$?"backward":"forward",meta:o.options.meta};return k(be),be})(),ne=await C(H),{maxPages:oe}=o.options,ye=$?Ug:$g;return{pages:ye(B.pages,ne,oe),pageParams:ye(B.pageParams,z,oe)}};if(u&&f.length){const B=u==="backward",z=B?Qg:Np,$={pages:f,pageParams:h},I=z(d,$);p=await O($,I,B)}else{const B=s??f.length;do{const z=v===0?h[0]??d.initialPageParam:Np(d,p);if(v>0&&z==null)break;p=await O(p,z),v++}while(v{var _,k;return(k=(_=o.options).persister)==null?void 0:k.call(_,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},a)}:o.fetchFn=x}}}function Np(s,{pages:o,pageParams:a}){const d=o.length-1;return o.length>0?s.getNextPageParam(o[d],o,a[d],a):void 0}function Qg(s,{pages:o,pageParams:a}){var d;return o.length>0?(d=s.getPreviousPageParam)==null?void 0:d.call(s,o[0],o,a[0],a):void 0}var Ms,On,Ps,Ut,Dn,nt,Yo,An,Rt,km,yr,am,qg=(am=class extends jm{constructor(o){super();ge(this,Rt);ge(this,Ms);ge(this,On);ge(this,Ps);ge(this,Ut);ge(this,Dn);ge(this,nt);ge(this,Yo);ge(this,An);re(this,An,!1),re(this,Yo,o.defaultOptions),this.setOptions(o.options),this.observers=[],re(this,Dn,o.client),re(this,Ut,N(this,Dn).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,re(this,On,Cp(this.options)),this.state=o.state??N(this,On),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,Ms)}get promise(){var o;return(o=N(this,nt))==null?void 0:o.promise}setOptions(o){if(this.options={...N(this,Yo),...o},o!=null&&o._type&&re(this,Ms,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Cp(this.options);a.data!==void 0&&(this.setState(Sp(a.data,a.dataUpdatedAt)),re(this,On,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Ut).remove(this)}setData(o,a){const d=Bd(this.state.data,o,this.options);return Ee(this,Rt,yr).call(this,{data:d,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),d}setState(o){Ee(this,Rt,yr).call(this,{type:"setState",state:o})}cancel(o){var d,u;const a=(d=N(this,nt))==null?void 0:d.promise;return(u=N(this,nt))==null||u.cancel(o),a?a.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,On)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Ot(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>on(o.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(o=>o.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(o=0){return this.state.data===void 0?!0:o==="static"?!1:this.state.isInvalidated?!0:!xm(this.state.dataUpdatedAt,o)}onFocus(){var a;const o=this.observers.find(d=>d.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,nt))==null||a.continue()}onOnline(){var a;const o=this.observers.find(d=>d.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,nt))==null||a.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),N(this,Ut).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(a=>a!==o),this.observers.length||(N(this,nt)&&(N(this,An)||Ee(this,Rt,km).call(this)?N(this,nt).cancel({revert:!0}):N(this,nt).cancelRetry()),this.scheduleGc()),N(this,Ut).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,Rt,yr).call(this,{type:"invalidate"})}async fetch(o,a){var x,b,w,P,R,L,_,k,C,O,B;if(this.state.fetchStatus!=="idle"&&((x=N(this,nt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(N(this,nt))return N(this,nt).continueRetry(),N(this,nt).promise}if(o&&this.setOptions(o),!this.options.queryFn){const z=this.observers.find($=>$.options.queryFn);z&&this.setOptions(z.options)}const d=new AbortController,u=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(re(this,An,!0),d.signal)})},f=()=>{const z=vm(this.options,a),I=(()=>{const H={client:N(this,Dn),queryKey:this.queryKey,meta:this.meta};return u(H),H})();return re(this,An,!1),this.options.persister?this.options.persister(z,I,this):z(I)},p=(()=>{const z={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:N(this,Dn),state:this.state,fetchFn:f};return u(z),z})(),v=N(this,Ms)==="infinite"?Kg(this.options.pages):this.options.behavior;v==null||v.onFetch(p,this),re(this,Ps,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=p.fetchOptions)==null?void 0:b.meta))&&Ee(this,Rt,yr).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),re(this,nt,wm({initialPromise:a==null?void 0:a.initialPromise,fn:p.fetchFn,onCancel:z=>{z instanceof Gd&&z.revert&&this.setState({...N(this,Ps),fetchStatus:"idle"}),d.abort()},onFail:(z,$)=>{Ee(this,Rt,yr).call(this,{type:"failed",failureCount:z,error:$})},onPause:()=>{Ee(this,Rt,yr).call(this,{type:"pause"})},onContinue:()=>{Ee(this,Rt,yr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const z=await N(this,nt).start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(R=(P=N(this,Ut).config).onSuccess)==null||R.call(P,z,this),(_=(L=N(this,Ut).config).onSettled)==null||_.call(L,z,this.state.error,this),z}catch(z){if(z instanceof Gd){if(z.silent)return N(this,nt).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Ee(this,Rt,yr).call(this,{type:"error",error:z}),(C=(k=N(this,Ut).config).onError)==null||C.call(k,z,this),(B=(O=N(this,Ut).config).onSettled)==null||B.call(O,this.state.data,z,this),z}finally{this.scheduleGc()}}},Ms=new WeakMap,On=new WeakMap,Ps=new WeakMap,Ut=new WeakMap,Dn=new WeakMap,nt=new WeakMap,Yo=new WeakMap,An=new WeakMap,Rt=new WeakSet,km=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},yr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...d,fetchStatus:"paused"};case"continue":return{...d,fetchStatus:"fetching"};case"fetch":return{...d,...Nm(d.data,this.options),fetchMeta:o.meta??null};case"success":const u={...d,...Sp(o.data,o.dataUpdatedAt),dataUpdateCount:d.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Ps,o.manual?u:void 0),u;case"error":const f=o.error;return{...d,error:f,errorUpdateCount:d.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:d.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...d,isInvalidated:!0};case"setState":return{...d,...o.state}}};this.state=a(this.state),lt.batch(()=>{this.observers.forEach(d=>{d.onQueryUpdate()}),N(this,Ut).notify({query:this,type:"updated",action:o})})},am);function Nm(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bm(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function Sp(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Cp(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,a=o!==void 0,d=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:a?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var kt,Me,Jo,ht,Tn,Rs,br,en,Xo,Os,Ds,zn,Ln,tn,As,ze,Io,Vd,Wd,Kd,Qd,qd,Zd,Yd,Sm,im,Zg=(im=class extends rl{constructor(o,a){super();ge(this,ze);ge(this,kt);ge(this,Me);ge(this,Jo);ge(this,ht);ge(this,Tn);ge(this,Rs);ge(this,br);ge(this,en);ge(this,Xo);ge(this,Os);ge(this,Ds);ge(this,zn);ge(this,Ln);ge(this,tn);ge(this,As,new Set);this.options=a,re(this,kt,o),re(this,en,null),re(this,br,Hd()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Me).addObserver(this),Ep(N(this,Me),this.options)?Ee(this,ze,Io).call(this):this.updateResult(),Ee(this,ze,Qd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jd(N(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jd(N(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,ze,qd).call(this),Ee(this,ze,Zd).call(this),N(this,Me).removeObserver(this)}setOptions(o){const a=this.options,d=N(this,Me);if(this.options=N(this,kt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ot(this.options.enabled,N(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,ze,Yd).call(this),N(this,Me).setOptions(this.options),a._defaulted&&!$d(this.options,a)&&N(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Me),observer:this});const u=this.hasListeners();u&&_p(N(this,Me),d,this.options,a)&&Ee(this,ze,Io).call(this),this.updateResult(),u&&(N(this,Me)!==d||Ot(this.options.enabled,N(this,Me))!==Ot(a.enabled,N(this,Me))||on(this.options.staleTime,N(this,Me))!==on(a.staleTime,N(this,Me)))&&Ee(this,ze,Vd).call(this);const f=Ee(this,ze,Wd).call(this);u&&(N(this,Me)!==d||Ot(this.options.enabled,N(this,Me))!==Ot(a.enabled,N(this,Me))||f!==N(this,tn))&&Ee(this,ze,Kd).call(this,f)}getOptimisticResult(o){const a=N(this,kt).getQueryCache().build(N(this,kt),o),d=this.createResult(a,o);return Jg(this,d)&&(re(this,ht,d),re(this,Rs,this.options),re(this,Tn,N(this,Me).state)),d}getCurrentResult(){return N(this,ht)}trackResult(o,a){return new Proxy(o,{get:(d,u)=>(this.trackProp(u),a==null||a(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,br).status==="pending"&&N(this,br).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(d,u))})}trackProp(o){N(this,As).add(o)}getCurrentQuery(){return N(this,Me)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const a=N(this,kt).defaultQueryOptions(o),d=N(this,kt).getQueryCache().build(N(this,kt),a);return d.fetch().then(()=>this.createResult(d,a))}fetch(o){return Ee(this,ze,Io).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,ht)))}createResult(o,a){var oe;const d=N(this,Me),u=this.options,f=N(this,ht),h=N(this,Tn),p=N(this,Rs),x=o!==d?o.state:N(this,Jo),{state:b}=o;let w={...b},P=!1,R;if(a._optimisticResults){const ye=this.hasListeners(),be=!ye&&Ep(o,a),le=ye&&_p(o,d,a,u);(be||le)&&(w={...w,...Nm(b.data,o.options)}),a._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:L,errorUpdatedAt:_,status:k}=w;R=w.data;let C=!1;if(a.placeholderData!==void 0&&R===void 0&&k==="pending"){let ye;f!=null&&f.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData)?(ye=f.data,C=!0):ye=typeof a.placeholderData=="function"?a.placeholderData((oe=N(this,Ds))==null?void 0:oe.state.data,N(this,Ds)):a.placeholderData,ye!==void 0&&(k="success",R=Bd(f==null?void 0:f.data,ye,a),P=!0)}if(a.select&&R!==void 0&&!C)if(f&&R===(h==null?void 0:h.data)&&a.select===N(this,Xo))R=N(this,Os);else try{re(this,Xo,a.select),R=a.select(R),R=Bd(f==null?void 0:f.data,R,a),re(this,Os,R),re(this,en,null)}catch(ye){re(this,en,ye)}N(this,en)&&(L=N(this,en),R=N(this,Os),_=Date.now(),k="error");const O=w.fetchStatus==="fetching",B=k==="pending",z=k==="error",$=B&&O,I=R!==void 0,ne={status:k,fetchStatus:w.fetchStatus,isPending:B,isSuccess:k==="success",isError:z,isInitialLoading:$,isLoading:$,data:R,dataUpdatedAt:w.dataUpdatedAt,error:L,errorUpdatedAt:_,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:w.dataUpdateCount>x.dataUpdateCount||w.errorUpdateCount>x.errorUpdateCount,isFetching:O,isRefetching:O&&!B,isLoadingError:z&&!I,isPaused:w.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:z&&I,isStale:gc(o,a),refetch:this.refetch,promise:N(this,br),isEnabled:Ot(a.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const ye=ne.data!==void 0,be=ne.status==="error"&&!ye,le=Re=>{be?Re.reject(ne.error):ye&&Re.resolve(ne.data)},Ae=()=>{const Re=re(this,br,ne.promise=Hd());le(Re)},_e=N(this,br);switch(_e.status){case"pending":o.queryHash===d.queryHash&&le(_e);break;case"fulfilled":(be||ne.data!==_e.value)&&Ae();break;case"rejected":(!be||ne.error!==_e.reason)&&Ae();break}}return ne}updateResult(){const o=N(this,ht),a=this.createResult(N(this,Me),this.options);if(re(this,Tn,N(this,Me).state),re(this,Rs,this.options),N(this,Tn).data!==void 0&&re(this,Ds,N(this,Me)),$d(a,o))return;re(this,ht,a);const d=()=>{if(!o)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!N(this,As).size)return!0;const h=new Set(f??N(this,As));return this.options.throwOnError&&h.add("error"),Object.keys(N(this,ht)).some(p=>{const v=p;return N(this,ht)[v]!==o[v]&&h.has(v)})};Ee(this,ze,Sm).call(this,{listeners:d()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,ze,Qd).call(this)}},kt=new WeakMap,Me=new WeakMap,Jo=new WeakMap,ht=new WeakMap,Tn=new WeakMap,Rs=new WeakMap,br=new WeakMap,en=new WeakMap,Xo=new WeakMap,Os=new WeakMap,Ds=new WeakMap,zn=new WeakMap,Ln=new WeakMap,tn=new WeakMap,As=new WeakMap,ze=new WeakSet,Io=function(o){Ee(this,ze,Yd).call(this);let a=N(this,Me).fetch(this.options,o);return o!=null&&o.throwOnError||(a=a.catch(Nt)),a},Vd=function(){Ee(this,ze,qd).call(this);const o=on(this.options.staleTime,N(this,Me));if(Bo.isServer()||N(this,ht).isStale||!Id(o))return;const d=xm(N(this,ht).dataUpdatedAt,o)+1;re(this,zn,Mn.setTimeout(()=>{N(this,ht).isStale||this.updateResult()},d))},Wd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Me)):this.options.refetchInterval)??!1},Kd=function(o){Ee(this,ze,Zd).call(this),re(this,tn,o),!(Bo.isServer()||Ot(this.options.enabled,N(this,Me))===!1||!Id(N(this,tn))||N(this,tn)===0)&&re(this,Ln,Mn.setInterval(()=>{(this.options.refetchIntervalInBackground||mc.isFocused())&&Ee(this,ze,Io).call(this)},N(this,tn)))},Qd=function(){Ee(this,ze,Vd).call(this),Ee(this,ze,Kd).call(this,Ee(this,ze,Wd).call(this))},qd=function(){N(this,zn)!==void 0&&(Mn.clearTimeout(N(this,zn)),re(this,zn,void 0))},Zd=function(){N(this,Ln)!==void 0&&(Mn.clearInterval(N(this,Ln)),re(this,Ln,void 0))},Yd=function(){const o=N(this,kt).getQueryCache().build(N(this,kt),this.options);if(o===N(this,Me))return;const a=N(this,Me);re(this,Me,o),re(this,Jo,o.state),this.hasListeners()&&(a==null||a.removeObserver(this),o.addObserver(this))},Sm=function(o){lt.batch(()=>{o.listeners&&this.listeners.forEach(a=>{a(N(this,ht))}),N(this,kt).getQueryCache().notify({query:N(this,Me),type:"observerResultsUpdated"})})},im);function Yg(s,o){return Ot(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Ot(o.retryOnMount,s)===!1)}function Ep(s,o){return Yg(s,o)||s.state.data!==void 0&&Jd(s,o,o.refetchOnMount)}function Jd(s,o,a){if(Ot(o.enabled,s)!==!1&&on(o.staleTime,s)!=="static"){const d=typeof a=="function"?a(s):a;return d==="always"||d!==!1&&gc(s,o)}return!1}function _p(s,o,a,d){return(s!==o||Ot(d.enabled,s)===!1)&&(!a.suspense||s.state.status!=="error")&&gc(s,a)}function gc(s,o){return Ot(o.enabled,s)!==!1&&s.isStaleByTime(on(o.staleTime,s))}function Jg(s,o){return!$d(s.getCurrentResult(),o)}var el,sr,ft,Fn,or,qr,dm,Xg=(dm=class extends jm{constructor(o){super();ge(this,or);ge(this,el);ge(this,sr);ge(this,ft);ge(this,Fn);re(this,el,o.client),this.mutationId=o.mutationId,re(this,ft,o.mutationCache),re(this,sr,[]),this.state=o.state||e0(),this.setOptions(o.options),this.scheduleGc()}setOptions(o){this.options=o,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(o){N(this,sr).includes(o)||(N(this,sr).push(o),this.clearGcTimeout(),N(this,ft).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){re(this,sr,N(this,sr).filter(a=>a!==o)),this.scheduleGc(),N(this,ft).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){N(this,sr).length||(this.state.status==="pending"?this.scheduleGc():N(this,ft).remove(this))}continue(){var o;return((o=N(this,Fn))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var h,p,v,x,b,w,P,R,L,_,k,C,O,B,z,$,I,H;const a=()=>{Ee(this,or,qr).call(this,{type:"continue"})},d={client:N(this,el),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Fn,wm({fn:()=>this.options.mutationFn?this.options.mutationFn(o,d):Promise.reject(new Error("No mutationFn found")),onFail:(ne,oe)=>{Ee(this,or,qr).call(this,{type:"failed",failureCount:ne,error:oe})},onPause:()=>{Ee(this,or,qr).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,ft).canRun(this)}));const u=this.state.status==="pending",f=!N(this,Fn).canStart();try{if(u)a();else{Ee(this,or,qr).call(this,{type:"pending",variables:o,isPaused:f}),N(this,ft).config.onMutate&&await N(this,ft).config.onMutate(o,this,d);const oe=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,o,d));oe!==this.state.context&&Ee(this,or,qr).call(this,{type:"pending",context:oe,variables:o,isPaused:f})}const ne=await N(this,Fn).start();return await((x=(v=N(this,ft).config).onSuccess)==null?void 0:x.call(v,ne,o,this.state.context,this,d)),await((w=(b=this.options).onSuccess)==null?void 0:w.call(b,ne,o,this.state.context,d)),await((R=(P=N(this,ft).config).onSettled)==null?void 0:R.call(P,ne,null,this.state.variables,this.state.context,this,d)),await((_=(L=this.options).onSettled)==null?void 0:_.call(L,ne,null,o,this.state.context,d)),Ee(this,or,qr).call(this,{type:"success",data:ne}),ne}catch(ne){try{await((C=(k=N(this,ft).config).onError)==null?void 0:C.call(k,ne,o,this.state.context,this,d))}catch(oe){Promise.reject(oe)}try{await((B=(O=this.options).onError)==null?void 0:B.call(O,ne,o,this.state.context,d))}catch(oe){Promise.reject(oe)}try{await(($=(z=N(this,ft).config).onSettled)==null?void 0:$.call(z,void 0,ne,this.state.variables,this.state.context,this,d))}catch(oe){Promise.reject(oe)}try{await((H=(I=this.options).onSettled)==null?void 0:H.call(I,void 0,ne,o,this.state.context,d))}catch(oe){Promise.reject(oe)}throw Ee(this,or,qr).call(this,{type:"error",error:ne}),ne}finally{N(this,ft).runNext(this)}}},el=new WeakMap,sr=new WeakMap,ft=new WeakMap,Fn=new WeakMap,or=new WeakSet,qr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...d,isPaused:!0};case"continue":return{...d,isPaused:!1};case"pending":return{...d,context:o.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:o.isPaused,status:"pending",variables:o.variables,submittedAt:Date.now()};case"success":return{...d,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...d,data:void 0,error:o.error,failureCount:d.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=a(this.state),lt.batch(()=>{N(this,sr).forEach(d=>{d.onMutationUpdate(o)}),N(this,ft).notify({mutation:this,type:"updated",action:o})})},dm);function e0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wr,qt,tl,cm,t0=(cm=class extends rl{constructor(o={}){super();ge(this,wr);ge(this,qt);ge(this,tl);this.config=o,re(this,wr,new Set),re(this,qt,new Map),re(this,tl,0)}build(o,a,d){const u=new Xg({client:o,mutationCache:this,mutationId:++pa(this,tl)._,options:o.defaultMutationOptions(a),state:d});return this.add(u),u}add(o){N(this,wr).add(o);const a=ha(o);if(typeof a=="string"){const d=N(this,qt).get(a);d?d.push(o):N(this,qt).set(a,[o])}this.notify({type:"added",mutation:o})}remove(o){if(N(this,wr).delete(o)){const a=ha(o);if(typeof a=="string"){const d=N(this,qt).get(a);if(d)if(d.length>1){const u=d.indexOf(o);u!==-1&&d.splice(u,1)}else d[0]===o&&N(this,qt).delete(a)}}this.notify({type:"removed",mutation:o})}canRun(o){const a=ha(o);if(typeof a=="string"){const d=N(this,qt).get(a),u=d==null?void 0:d.find(f=>f.state.status==="pending");return!u||u===o}else return!0}runNext(o){var d;const a=ha(o);if(typeof a=="string"){const u=(d=N(this,qt).get(a))==null?void 0:d.find(f=>f!==o&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{N(this,wr).forEach(o=>{this.notify({type:"removed",mutation:o})}),N(this,wr).clear(),N(this,qt).clear()})}getAll(){return Array.from(N(this,wr))}find(o){const a={exact:!0,...o};return this.getAll().find(d=>wp(a,d))}findAll(o={}){return this.getAll().filter(a=>wp(o,a))}notify(o){lt.batch(()=>{this.listeners.forEach(a=>{a(o)})})}resumePausedMutations(){const o=this.getAll().filter(a=>a.state.isPaused);return lt.batch(()=>Promise.all(o.map(a=>a.continue().catch(Nt))))}},wr=new WeakMap,qt=new WeakMap,tl=new WeakMap,cm);function ha(s){var o;return(o=s.options.scope)==null?void 0:o.id}var lr,um,r0=(um=class extends rl{constructor(o={}){super();ge(this,lr);this.config=o,re(this,lr,new Map)}build(o,a,d){const u=a.queryKey,f=a.queryHash??hc(u,a);let h=this.get(f);return h||(h=new qg({client:o,queryKey:u,queryHash:f,options:o.defaultQueryOptions(a),state:d,defaultOptions:o.getQueryDefaults(u)}),this.add(h)),h}add(o){N(this,lr).has(o.queryHash)||(N(this,lr).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const a=N(this,lr).get(o.queryHash);a&&(o.destroy(),a===o&&N(this,lr).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){lt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return N(this,lr).get(o)}getAll(){return[...N(this,lr).values()]}find(o){const a={exact:!0,...o};return this.getAll().find(d=>bp(a,d))}findAll(o={}){const a=this.getAll();return Object.keys(o).length>0?a.filter(d=>bp(o,d)):a}notify(o){lt.batch(()=>{this.listeners.forEach(a=>{a(o)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},lr=new WeakMap,um),Ke,rn,nn,Ts,zs,sn,Ls,Fs,fm,n0=(fm=class{constructor(s={}){ge(this,Ke);ge(this,rn);ge(this,nn);ge(this,Ts);ge(this,zs);ge(this,sn);ge(this,Ls);ge(this,Fs);re(this,Ke,s.queryCache||new r0),re(this,rn,s.mutationCache||new t0),re(this,nn,s.defaultOptions||{}),re(this,Ts,new Map),re(this,zs,new Map),re(this,sn,0)}mount(){pa(this,sn)._++,N(this,sn)===1&&(re(this,Ls,mc.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onFocus())})),re(this,Fs,Ma.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onOnline())})))}unmount(){var s,o;pa(this,sn)._--,N(this,sn)===0&&((s=N(this,Ls))==null||s.call(this),re(this,Ls,void 0),(o=N(this,Fs))==null||o.call(this),re(this,Fs,void 0))}isFetching(s){return N(this,Ke).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return N(this,rn).findAll({...s,status:"pending"}).length}getQueryData(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Ke).get(o.queryHash))==null?void 0:a.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),a=N(this,Ke).build(this,o),d=a.state.data;return d===void 0?this.fetchQuery(s):(s.revalidateIfStale&&a.isStaleByTime(on(o.staleTime,a))&&this.prefetchQuery(o),Promise.resolve(d))}getQueriesData(s){return N(this,Ke).findAll(s).map(({queryKey:o,state:a})=>{const d=a.data;return[o,d]})}setQueryData(s,o,a){const d=this.defaultQueryOptions({queryKey:s}),u=N(this,Ke).get(d.queryHash),f=u==null?void 0:u.state.data,h=Lg(o,f);if(h!==void 0)return N(this,Ke).build(this,d).setData(h,{...a,manual:!0})}setQueriesData(s,o,a){return lt.batch(()=>N(this,Ke).findAll(s).map(({queryKey:d})=>[d,this.setQueryData(d,o,a)]))}getQueryState(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Ke).get(o.queryHash))==null?void 0:a.state}removeQueries(s){const o=N(this,Ke);lt.batch(()=>{o.findAll(s).forEach(a=>{o.remove(a)})})}resetQueries(s,o){const a=N(this,Ke);return lt.batch(()=>(a.findAll(s).forEach(d=>{d.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const a={revert:!0,...o},d=lt.batch(()=>N(this,Ke).findAll(s).map(u=>u.cancel(a)));return Promise.all(d).then(Nt).catch(Nt)}invalidateQueries(s,o={}){return lt.batch(()=>(N(this,Ke).findAll(s).forEach(a=>{a.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},o)))}refetchQueries(s,o={}){const a={...o,cancelRefetch:o.cancelRefetch??!0},d=lt.batch(()=>N(this,Ke).findAll(s).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,a);return a.throwOnError||(f=f.catch(Nt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(d).then(Nt)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const a=N(this,Ke).build(this,o);return a.isStaleByTime(on(o.staleTime,a))?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Nt).catch(Nt)}fetchInfiniteQuery(s){return s._type="infinite",this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Nt).catch(Nt)}ensureInfiniteQueryData(s){return s._type="infinite",this.ensureQueryData(s)}resumePausedMutations(){return Ma.isOnline()?N(this,rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Ke)}getMutationCache(){return N(this,rn)}getDefaultOptions(){return N(this,nn)}setDefaultOptions(s){re(this,nn,s)}setQueryDefaults(s,o){N(this,Ts).set($o(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...N(this,Ts).values()],a={};return o.forEach(d=>{Uo(s,d.queryKey)&&Object.assign(a,d.defaultOptions)}),a}setMutationDefaults(s,o){N(this,zs).set($o(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...N(this,zs).values()],a={};return o.forEach(d=>{Uo(s,d.mutationKey)&&Object.assign(a,d.defaultOptions)}),a}defaultQueryOptions(s){if(s._defaulted)return s;const o={...N(this,nn).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=hc(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===xc&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...N(this,nn).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){N(this,Ke).clear(),N(this,rn).clear()}},Ke=new WeakMap,rn=new WeakMap,nn=new WeakMap,Ts=new WeakMap,zs=new WeakMap,sn=new WeakMap,Ls=new WeakMap,Fs=new WeakMap,fm),Cm=g.createContext(void 0),cn=s=>{const o=g.useContext(Cm);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},s0=({client:s,children:o})=>(g.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),r.jsx(Cm.Provider,{value:s,children:o})),Em=g.createContext(!1),o0=()=>g.useContext(Em);Em.Provider;function l0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var a0=g.createContext(l0()),i0=()=>g.useContext(a0),d0=(s,o,a)=>{const d=a!=null&&a.state.error&&typeof s.throwOnError=="function"?ym(s.throwOnError,[a.state.error,a]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||d)&&(o.isReset()||(s.retryOnMount=!1))},c0=s=>{g.useEffect(()=>{s.clearReset()},[s])},u0=({result:s,errorResetBoundary:o,throwOnError:a,query:d,suspense:u})=>s.isError&&!o.isReset()&&!s.isFetching&&d&&(u&&s.data===void 0||ym(a,[s.error,d])),f0=s=>{if(s.suspense){const a=u=>u==="static"?u:Math.max(u??1e3,1e3),d=s.staleTime;s.staleTime=typeof d=="function"?(...u)=>a(d(...u)):a(d),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},p0=(s,o)=>s.isLoading&&s.isFetching&&!o,m0=(s,o)=>(s==null?void 0:s.suspense)&&o.isPending,Mp=(s,o,a)=>o.fetchOptimistic(s).catch(()=>{a.clearReset()});function h0(s,o,a){var R,L,_,k;const d=o0(),u=i0(),f=cn(),h=f.defaultQueryOptions(s);(L=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||L.call(R,h);const p=f.getQueryCache().get(h.queryHash),v=s.subscribed!==!1;h._optimisticResults=d?"isRestoring":v?"optimistic":void 0,f0(h),d0(h,u,p),c0(u);const x=!f.getQueryCache().get(h.queryHash),[b]=g.useState(()=>new o(f,h)),w=b.getOptimisticResult(h),P=!d&&v;if(g.useSyncExternalStore(g.useCallback(C=>{const O=P?b.subscribe(lt.batchCalls(C)):Nt;return b.updateResult(),O},[b,P]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),g.useEffect(()=>{b.setOptions(h)},[h,b]),m0(h,w))throw Mp(h,b,u);if(u0({result:w,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw w.error;if((k=(_=f.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||k.call(_,h,w),h.experimental_prefetchInRender&&!Bo.isServer()&&p0(w,d)){const C=x?Mp(h,b,u):p==null?void 0:p.promise;C==null||C.catch(Nt).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?w:b.trackResult(w)}function Ct(s,o){return h0(s,Zg)}/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x0=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_m=(...s)=>s.filter((o,a,d)=>!!o&&o.trim()!==""&&d.indexOf(o)===a).join(" ").trim();/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var g0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v0=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:d,className:u="",children:f,iconNode:h,...p},v)=>g.createElement("svg",{ref:v,...g0,width:o,height:o,stroke:s,strokeWidth:d?Number(a)*24/Number(o):a,className:_m("lucide",u),...p},[...h.map(([x,b])=>g.createElement(x,b)),...Array.isArray(f)?f:[f]]));/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pe=(s,o)=>{const a=g.forwardRef(({className:d,...u},f)=>g.createElement(v0,{ref:f,iconNode:o,className:_m(`lucide-${x0(s)}`,d),...u}));return a.displayName=`${s}`,a};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ho=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pp=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mm=pe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Is=pe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y0=pe("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Go=pe("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ir=pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b0=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w0=pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j0=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k0=pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N0=pe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S0=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xd=pe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C0=pe("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E0=pe("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ec=pe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _0=pe("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pm=pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dt=pe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const an=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pa=pe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rp=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tc=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M0=pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P0=pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ca=pe("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R0=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O0=pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vo=pe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D0=pe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A0=pe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T0=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z0=pe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L0=pe("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rm=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Om=pe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const In=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F0=pe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I0=pe("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vc=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $0=pe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U0=pe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $s=pe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B0=pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dm=pe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const H0=pe("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ra=pe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rc=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nc=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G0=pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wo=pe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jr=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ko=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),sc=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:D0},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:y0},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Dt},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Go},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:L0},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:Is},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:N0}];var Op=1,V0=.9,W0=.8,K0=.17,Ed=.1,_d=.999,Q0=.9999,q0=.99,Z0=/[\\\/_+.#"@\[\(\{&]/,Y0=/[\\\/_+.#"@\[\(\{&]/g,J0=/[\s-]/,Am=/[\s-]/g;function oc(s,o,a,d,u,f,h){if(f===o.length)return u===s.length?Op:q0;var p=`${u},${f}`;if(h[p]!==void 0)return h[p];for(var v=d.charAt(f),x=a.indexOf(v,u),b=0,w,P,R,L;x>=0;)w=oc(s,o,a,d,x+1,f+1,h),w>b&&(x===u?w*=Op:Z0.test(s.charAt(x-1))?(w*=W0,R=s.slice(u,x-1).match(Y0),R&&u>0&&(w*=Math.pow(_d,R.length))):J0.test(s.charAt(x-1))?(w*=V0,L=s.slice(u,x-1).match(Am),L&&u>0&&(w*=Math.pow(_d,L.length))):(w*=K0,u>0&&(w*=Math.pow(_d,x-u))),s.charAt(x)!==o.charAt(f)&&(w*=Q0)),(ww&&(w=P*Ed)),w>b&&(b=w),x=a.indexOf(v,x+1);return h[p]=b,b}function Dp(s){return s.toLowerCase().replace(Am," ")}function X0(s,o,a){return s=a&&a.length>0?`${s+" "+a.join(" ")}`:s,oc(s,o,Dp(s),Dp(o),0,0,{})}function ln(s,o,{checkForDefaultPrevented:a=!0}={}){return function(u){if(s==null||s(u),a===!1||!u.defaultPrevented)return o==null?void 0:o(u)}}function Ap(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Us(...s){return o=>{let a=!1;const d=s.map(u=>{const f=Ap(u,o);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u{var C;const{scope:P,children:R,...L}=w,_=((C=P==null?void 0:P[s])==null?void 0:C[v])||p,k=g.useMemo(()=>L,Object.values(L));return r.jsx(_.Provider,{value:k,children:R})};x.displayName=f+"Provider";function b(w,P){var _;const R=((_=P==null?void 0:P[s])==null?void 0:_[v])||p,L=g.useContext(R);if(L)return L;if(h!==void 0)return h;throw new Error(`\`${w}\` must be used within \`${f}\``)}return[x,b]}const u=()=>{const f=a.map(h=>g.createContext(h));return function(p){const v=(p==null?void 0:p[s])||f;return g.useMemo(()=>({[`__scope${s}`]:{...p,[s]:v}}),[p,v])}};return u.scopeName=s,[d,tv(u,...o)]}function tv(...s){const o=s[0];if(s.length===1)return o;const a=()=>{const d=s.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const h=d.reduce((p,{useScope:v,scopeName:x})=>{const w=v(f)[`__scope${x}`];return{...p,...w}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:h}),[h])}};return a.scopeName=o.scopeName,a}var Qo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},rv=pc[" useId ".trim().toString()]||(()=>{}),nv=0;function kr(s){const[o,a]=g.useState(rv());return Qo(()=>{a(d=>d??String(nv++))},[s]),o?`radix-${o}`:""}var sv=pc[" useInsertionEffect ".trim().toString()]||Qo;function ov({prop:s,defaultProp:o,onChange:a=()=>{},caller:d}){const[u,f,h]=lv({defaultProp:o,onChange:a}),p=s!==void 0,v=p?s:u;{const b=g.useRef(s!==void 0);g.useEffect(()=>{const w=b.current;w!==p&&console.warn(`${d} is changing from ${w?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=p},[p,d])}const x=g.useCallback(b=>{var w;if(p){const P=av(b)?b(s):b;P!==s&&((w=h.current)==null||w.call(h,P))}else f(b)},[p,s,f,h]);return[v,x]}function lv({defaultProp:s,onChange:o}){const[a,d]=g.useState(s),u=g.useRef(a),f=g.useRef(o);return sv(()=>{f.current=o},[o]),g.useEffect(()=>{var h;u.current!==a&&((h=f.current)==null||h.call(f,a),u.current=a)},[a,u]),[a,d,f]}function av(s){return typeof s=="function"}var Tm=hm();function zm(s){const o=g.forwardRef((a,d)=>{let{children:u,...f}=a,h=null,p=!1;const v=[];Tp(u)&&typeof xa=="function"&&(u=xa(u._payload)),g.Children.forEach(u,P=>{var R;if(fv(P)){p=!0;const L=P;let _="child"in L.props?L.props.child:L.props.children;Tp(_)&&typeof xa=="function"&&(_=xa(_._payload)),h=dv(L,_),v.push((R=h==null?void 0:h.props)==null?void 0:R.children)}else v.push(P)}),h?h=g.cloneElement(h,void 0,v):!p&&g.Children.count(u)===1&&g.isValidElement(u)&&(h=u);const x=h?uv(h):void 0,b=Un(d,x);if(!h){if(u||u===0)throw new Error(p?xv(s):hv(s));return u}const w=cv(f,h.props??{});return h.type!==g.Fragment&&(w.ref=d?b:x),g.cloneElement(h,w)});return o.displayName=`${s}.Slot`,o}var iv=Symbol.for("radix.slottable"),dv=(s,o)=>{if("child"in s.props){const a=s.props.child;return g.isValidElement(a)?g.cloneElement(a,void 0,s.props.children(a.props.children)):null}return g.isValidElement(o)?o:null};function cv(s,o){const a={...o};for(const d in o){const u=s[d],f=o[d];/^on[A-Z]/.test(d)?u&&f?a[d]=(...p)=>{const v=f(...p);return u(...p),v}:u&&(a[d]=u):d==="style"?a[d]={...u,...f}:d==="className"&&(a[d]=[u,f].filter(Boolean).join(" "))}return{...s,...a}}function uv(s){var d,u;let o=(d=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:d.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?s.ref:(o=(u=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:u.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?s.props.ref:s.props.ref||s.ref)}function fv(s){return g.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===iv}var pv=Symbol.for("react.lazy");function Tp(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===pv&&"_payload"in s&&mv(s._payload)}function mv(s){return typeof s=="object"&&s!==null&&"then"in s}var hv=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,xv=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,xa=pc[" use ".trim().toString()],gv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],at=gv.reduce((s,o)=>{const a=zm(`Primitive.${o}`),d=g.forwardRef((u,f)=>{const{asChild:h,...p}=u,v=h?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(v,{...p,ref:f})});return d.displayName=`Primitive.${o}`,{...s,[o]:d}},{});function vv(s,o){s&&Tm.flushSync(()=>s.dispatchEvent(o))}function qo(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...a)=>{var d;return(d=o.current)==null?void 0:d.call(o,...a)}),[])}function yv(s,o=globalThis==null?void 0:globalThis.document){const a=qo(s);g.useEffect(()=>{const d=u=>{u.key==="Escape"&&a(u)};return o.addEventListener("keydown",d,{capture:!0}),()=>o.removeEventListener("keydown",d,{capture:!0})},[a,o])}var bv="DismissableLayer",lc="dismissableLayer.update",wv="dismissableLayer.pointerDownOutside",jv="dismissableLayer.focusOutside",zp,yc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Lm=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,...x}=s,b=g.useContext(yc),[w,P]=g.useState(null),R=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,L]=g.useState({}),_=Un(o,oe=>P(oe)),k=Array.from(b.layers),[C]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),O=k.indexOf(C),B=w?k.indexOf(w):-1,z=b.layersWithOutsidePointerEventsDisabled.size>0,$=B>=O,I=g.useRef(!1),H=Cv(oe=>{const ye=oe.target;if(!(ye instanceof Node))return;const be=[...b.branches].some(le=>le.contains(ye));!$||be||(f==null||f(oe),p==null||p(oe),oe.defaultPrevented||v==null||v())},{ownerDocument:R,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:b.dismissableSurfaces}),ne=Ev(oe=>{if(d&&I.current)return;const ye=oe.target;[...b.branches].some(le=>le.contains(ye))||(h==null||h(oe),p==null||p(oe),oe.defaultPrevented||v==null||v())},R);return yv(oe=>{B===b.layers.size-1&&(u==null||u(oe),!oe.defaultPrevented&&v&&(oe.preventDefault(),v()))},R),g.useEffect(()=>{if(w)return a&&(b.layersWithOutsidePointerEventsDisabled.size===0&&(zp=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),Lp(),()=>{a&&(b.layersWithOutsidePointerEventsDisabled.delete(w),b.layersWithOutsidePointerEventsDisabled.size===0&&(R.body.style.pointerEvents=zp))}},[w,R,a,b]),g.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),Lp())},[w,b]),g.useEffect(()=>{const oe=()=>L({});return document.addEventListener(lc,oe),()=>document.removeEventListener(lc,oe)},[]),r.jsx(at.div,{...x,ref:_,style:{pointerEvents:z?$?"auto":"none":void 0,...s.style},onFocusCapture:ln(s.onFocusCapture,ne.onFocusCapture),onBlurCapture:ln(s.onBlurCapture,ne.onBlurCapture),onPointerDownCapture:ln(s.onPointerDownCapture,H.onPointerDownCapture)})});Lm.displayName=bv;var kv="DismissableLayerBranch",Nv=g.forwardRef((s,o)=>{const a=g.useContext(yc),d=g.useRef(null),u=Un(o,d);return g.useEffect(()=>{const f=d.current;if(f)return a.branches.add(f),()=>{a.branches.delete(f)}},[a.branches]),r.jsx(at.div,{...s,ref:u})});Nv.displayName=kv;function Sv(){const s=g.useContext(yc),[o,a]=g.useState(null);return g.useEffect(()=>{if(o)return s.dismissableSurfaces.add(o),()=>{s.dismissableSurfaces.delete(o)}},[o,s.dismissableSurfaces]),a}function Cv(s,o){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:d=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f}=o,h=qo(s),p=g.useRef(!1),v=g.useRef(!1),x=g.useRef(new Map),b=g.useRef(()=>{});return g.useEffect(()=>{function w(){v.current=!1,u.current=!1,x.current.clear()}function P(){return Array.from(x.current.values()).some(Boolean)}function R(O){if(!v.current)return;const B=O.target;B instanceof Node&&[...f].some($=>$.contains(B))||x.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{v.current&&b.current()},0)}function L(O){v.current&&x.current.set(O.type,!1)}const _=O=>{if(O.target&&!p.current){let B=function(){a.removeEventListener("click",b.current);const $=P();w(),$||Fm(wv,h,z,{discrete:!0})};const z={originalEvent:O};v.current=!0,u.current=d&&O.button===0,x.current.clear(),!d||O.button!==0?B():(a.removeEventListener("click",b.current),b.current=B,a.addEventListener("click",b.current,{once:!0}))}else a.removeEventListener("click",b.current),w();p.current=!1},k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of k)a.addEventListener(O,R,!0),a.addEventListener(O,L);const C=window.setTimeout(()=>{a.addEventListener("pointerdown",_)},0);return()=>{window.clearTimeout(C),a.removeEventListener("pointerdown",_),a.removeEventListener("click",b.current);for(const O of k)a.removeEventListener(O,R,!0),a.removeEventListener(O,L)}},[a,h,d,u,f]),{onPointerDownCapture:()=>p.current=!0}}function Ev(s,o=globalThis==null?void 0:globalThis.document){const a=qo(s),d=g.useRef(!1);return g.useEffect(()=>{const u=f=>{f.target&&!d.current&&Fm(jv,a,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,a]),{onFocusCapture:()=>d.current=!0,onBlurCapture:()=>d.current=!1}}function Lp(){const s=new CustomEvent(lc);document.dispatchEvent(s)}function Fm(s,o,a,{discrete:d}){const u=a.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:a});o&&u.addEventListener(s,o,{once:!0}),d?vv(u,f):u.dispatchEvent(f)}var Md="focusScope.autoFocusOnMount",Pd="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},_v="FocusScope",Im=g.forwardRef((s,o)=>{const{loop:a=!1,trapped:d=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...h}=s,[p,v]=g.useState(null),x=qo(u),b=qo(f),w=g.useRef(null),P=Un(o,_=>v(_)),R=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(d){let _=function(B){if(R.paused||!p)return;const z=B.target;p.contains(z)?w.current=z:Zr(w.current,{select:!0})},k=function(B){if(R.paused||!p)return;const z=B.relatedTarget;z!==null&&(p.contains(z)||Zr(w.current,{select:!0}))},C=function(B){if(document.activeElement===document.body)for(const $ of B)$.removedNodes.length>0&&Zr(p)};document.addEventListener("focusin",_),document.addEventListener("focusout",k);const O=new MutationObserver(C);return p&&O.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",k),O.disconnect()}}},[d,p,R.paused]),g.useEffect(()=>{if(p){$p.add(R);const _=document.activeElement;if(!p.contains(_)){const C=new CustomEvent(Md,Fp);p.addEventListener(Md,x),p.dispatchEvent(C),C.defaultPrevented||(Mv(Av($m(p)),{select:!0}),document.activeElement===_&&Zr(p))}return()=>{p.removeEventListener(Md,x),setTimeout(()=>{const C=new CustomEvent(Pd,Fp);p.addEventListener(Pd,b),p.dispatchEvent(C),C.defaultPrevented||Zr(_??document.body,{select:!0}),p.removeEventListener(Pd,b),$p.remove(R)},0)}}},[p,x,b,R]);const L=g.useCallback(_=>{if(!a&&!d||R.paused)return;const k=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,C=document.activeElement;if(k&&C){const O=_.currentTarget,[B,z]=Pv(O);B&&z?!_.shiftKey&&C===z?(_.preventDefault(),a&&Zr(B,{select:!0})):_.shiftKey&&C===B&&(_.preventDefault(),a&&Zr(z,{select:!0})):C===O&&_.preventDefault()}},[a,d,R.paused]);return r.jsx(at.div,{tabIndex:-1,...h,ref:P,onKeyDown:L})});Im.displayName=_v;function Mv(s,{select:o=!1}={}){const a=document.activeElement;for(const d of s)if(Zr(d,{select:o}),document.activeElement!==a)return}function Pv(s){const o=$m(s),a=Ip(o,s),d=Ip(o.reverse(),s);return[a,d]}function $m(s){const o=[],a=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:d=>{const u=d.tagName==="INPUT"&&d.type==="hidden";return d.disabled||d.hidden||u?NodeFilter.FILTER_SKIP:d.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function Ip(s,o){for(const a of s)if(!Rv(a,{upTo:o}))return a}function Rv(s,{upTo:o}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(o!==void 0&&s===o)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function Ov(s){return s instanceof HTMLInputElement&&"select"in s}function Zr(s,{select:o=!1}={}){if(s&&s.focus){const a=document.activeElement;s.focus({preventScroll:!0}),s!==a&&Ov(s)&&o&&s.select()}}var $p=Dv();function Dv(){let s=[];return{add(o){const a=s[0];o!==a&&(a==null||a.pause()),s=Up(s,o),s.unshift(o)},remove(o){var a;s=Up(s,o),(a=s[0])==null||a.resume()}}}function Up(s,o){const a=[...s],d=a.indexOf(o);return d!==-1&&a.splice(d,1),a}function Av(s){return s.filter(o=>o.tagName!=="A")}var Tv="Portal",Um=g.forwardRef((s,o)=>{var p;const{container:a,...d}=s,[u,f]=g.useState(!1);Qo(()=>f(!0),[]);const h=a||u&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return h?Tm.createPortal(r.jsx(at.div,{...d,ref:o}),h):null});Um.displayName=Tv;function zv(s,o){return g.useReducer((a,d)=>o[a][d]??a,s)}var Da=s=>{const{present:o,children:a}=s,d=Lv(o),u=typeof a=="function"?a({present:d.isPresent}):g.Children.only(a),f=Fv(d.ref,Iv(u));return typeof a=="function"||d.isPresent?g.cloneElement(u,{ref:f}):null};Da.displayName="Presence";function Lv(s){const[o,a]=g.useState(),d=g.useRef(null),u=g.useRef(s),f=g.useRef("none"),h=s?"mounted":"unmounted",[p,v]=zv(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=ga(d.current);f.current=p==="mounted"?x:"none"},[p]),Qo(()=>{const x=d.current,b=u.current;if(b!==s){const P=f.current,R=ga(x);s?v("MOUNT"):R==="none"||(x==null?void 0:x.display)==="none"?v("UNMOUNT"):v(b&&P!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=s}},[s,v]),Qo(()=>{if(o){let x;const b=o.ownerDocument.defaultView??window,w=R=>{const _=ga(d.current).includes(CSS.escape(R.animationName));if(R.target===o&&_&&(v("ANIMATION_END"),!u.current)){const k=o.style.animationFillMode;o.style.animationFillMode="forwards",x=b.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=k)})}},P=R=>{R.target===o&&(f.current=ga(d.current))};return o.addEventListener("animationstart",P),o.addEventListener("animationcancel",w),o.addEventListener("animationend",w),()=>{b.clearTimeout(x),o.removeEventListener("animationstart",P),o.removeEventListener("animationcancel",w),o.removeEventListener("animationend",w)}}else v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{d.current=x?getComputedStyle(x):null,a(x)},[])}}function Bp(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Fv(...s){const o=g.useRef(s);return o.current=s,g.useCallback(a=>{const d=o.current;let u=!1;const f=d.map(h=>{const p=Bp(h,a);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let h=0;h{nr||(nr={start:Hp(),end:Hp()});const{start:s,end:o}=nr;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),va++,()=>{va===1&&(nr==null||nr.start.remove(),nr==null||nr.end.remove(),nr=null),va=Math.max(0,va-1)}},[])}function Hp(){const s=document.createElement("span");return s.setAttribute("data-radix-focus-guard",""),s.tabIndex=0,s.style.outline="none",s.style.opacity="0",s.style.position="fixed",s.style.pointerEvents="none",s}var ar=function(){return ar=Object.assign||function(o){for(var a,d=1,u=arguments.length;d"u")return ny;var o=sy(s),a=document.documentElement.clientWidth,d=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,d-a+o[2]-o[0])}},ly=Vm(),Ns="data-scroll-locked",ay=function(s,o,a,d){var u=s.left,f=s.top,h=s.right,p=s.gap;return a===void 0&&(a="margin"),` + .`.concat(Bv,` { + overflow: hidden `).concat(d,`; + padding-right: `).concat(p,"px ").concat(d,`; + } + body[`).concat(Ns,`] { + overflow: hidden `).concat(d,`; + overscroll-behavior: contain; + `).concat([o&&"position: relative ".concat(d,";"),a==="margin"&&` + padding-left: `.concat(u,`px; + padding-top: `).concat(f,`px; + padding-right: `).concat(h,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(p,"px ").concat(d,`; + `),a==="padding"&&"padding-right: ".concat(p,"px ").concat(d,";")].filter(Boolean).join(""),` + } + + .`).concat(Ea,` { + right: `).concat(p,"px ").concat(d,`; + } + + .`).concat(_a,` { + margin-right: `).concat(p,"px ").concat(d,`; + } + + .`).concat(Ea," .").concat(Ea,` { + right: 0 `).concat(d,`; + } + + .`).concat(_a," .").concat(_a,` { + margin-right: 0 `).concat(d,`; + } + + body[`).concat(Ns,`] { + `).concat(Hv,": ").concat(p,`px; + } +`)},Vp=function(){var s=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(s)?s:0},iy=function(){g.useEffect(function(){return document.body.setAttribute(Ns,(Vp()+1).toString()),function(){var s=Vp()-1;s<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,s.toString())}},[])},dy=function(s){var o=s.noRelative,a=s.noImportant,d=s.gapMode,u=d===void 0?"margin":d;iy();var f=g.useMemo(function(){return oy(u)},[u]);return g.createElement(ly,{styles:ay(f,!o,u,a?"":"!important")})},ac=!1;if(typeof window<"u")try{var ya=Object.defineProperty({},"passive",{get:function(){return ac=!0,!0}});window.addEventListener("test",ya,ya),window.removeEventListener("test",ya,ya)}catch{ac=!1}var vs=ac?{passive:!1}:!1,cy=function(s){return s.tagName==="TEXTAREA"},Wm=function(s,o){if(!(s instanceof Element))return!1;var a=window.getComputedStyle(s);return a[o]!=="hidden"&&!(a.overflowY===a.overflowX&&!cy(s)&&a[o]==="visible")},uy=function(s){return Wm(s,"overflowY")},fy=function(s){return Wm(s,"overflowX")},Wp=function(s,o){var a=o.ownerDocument,d=o;do{typeof ShadowRoot<"u"&&d instanceof ShadowRoot&&(d=d.host);var u=Km(s,d);if(u){var f=Qm(s,d),h=f[1],p=f[2];if(h>p)return!0}d=d.parentNode}while(d&&d!==a.body);return!1},py=function(s){var o=s.scrollTop,a=s.scrollHeight,d=s.clientHeight;return[o,a,d]},my=function(s){var o=s.scrollLeft,a=s.scrollWidth,d=s.clientWidth;return[o,a,d]},Km=function(s,o){return s==="v"?uy(o):fy(o)},Qm=function(s,o){return s==="v"?py(o):my(o)},hy=function(s,o){return s==="h"&&o==="rtl"?-1:1},xy=function(s,o,a,d,u){var f=hy(s,window.getComputedStyle(o).direction),h=f*d,p=a.target,v=o.contains(p),x=!1,b=h>0,w=0,P=0;do{if(!p)break;var R=Qm(s,p),L=R[0],_=R[1],k=R[2],C=_-k-f*L;(L||C)&&Km(s,p)&&(w+=C,P+=L);var O=p.parentNode;p=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!v&&p!==document.body||v&&(o.contains(p)||o===p));return(b&&Math.abs(w)<1||!b&&Math.abs(P)<1)&&(x=!0),x},ba=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Kp=function(s){return[s.deltaX,s.deltaY]},Qp=function(s){return s&&"current"in s?s.current:s},gy=function(s,o){return s[0]===o[0]&&s[1]===o[1]},vy=function(s){return` + .block-interactivity-`.concat(s,` {pointer-events: none;} + .allow-interactivity-`).concat(s,` {pointer-events: all;} +`)},yy=0,ys=[];function by(s){var o=g.useRef([]),a=g.useRef([0,0]),d=g.useRef(),u=g.useState(yy++)[0],f=g.useState(Vm)[0],h=g.useRef(s);g.useEffect(function(){h.current=s},[s]),g.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(u));var _=Uv([s.lockRef.current],(s.shards||[]).map(Qp),!0).filter(Boolean);return _.forEach(function(k){return k.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),_.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(u))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(_,k){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!h.current.allowPinchZoom;var C=ba(_),O=a.current,B="deltaX"in _?_.deltaX:O[0]-C[0],z="deltaY"in _?_.deltaY:O[1]-C[1],$,I=_.target,H=Math.abs(B)>Math.abs(z)?"h":"v";if("touches"in _&&H==="h"&&I.type==="range")return!1;var ne=window.getSelection(),oe=ne&&ne.anchorNode,ye=oe?oe===I||oe.contains(I):!1;if(ye)return!1;var be=Wp(H,I);if(!be)return!0;if(be?$=H:($=H==="v"?"h":"v",be=Wp(H,I)),!be)return!1;if(!d.current&&"changedTouches"in _&&(B||z)&&(d.current=$),!$)return!0;var le=d.current||$;return xy(le,k,_,le==="h"?B:z)},[]),v=g.useCallback(function(_){var k=_;if(!(!ys.length||ys[ys.length-1]!==f)){var C="deltaY"in k?Kp(k):ba(k),O=o.current.filter(function($){return $.name===k.type&&($.target===k.target||k.target===$.shadowParent)&&gy($.delta,C)})[0];if(O&&O.should){k.cancelable&&k.preventDefault();return}if(!O){var B=(h.current.shards||[]).map(Qp).filter(Boolean).filter(function($){return $.contains(k.target)}),z=B.length>0?p(k,B[0]):!h.current.noIsolation;z&&k.cancelable&&k.preventDefault()}}},[]),x=g.useCallback(function(_,k,C,O){var B={name:_,delta:k,target:C,should:O,shadowParent:wy(C)};o.current.push(B),setTimeout(function(){o.current=o.current.filter(function(z){return z!==B})},1)},[]),b=g.useCallback(function(_){a.current=ba(_),d.current=void 0},[]),w=g.useCallback(function(_){x(_.type,Kp(_),_.target,p(_,s.lockRef.current))},[]),P=g.useCallback(function(_){x(_.type,ba(_),_.target,p(_,s.lockRef.current))},[]);g.useEffect(function(){return ys.push(f),s.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:P}),document.addEventListener("wheel",v,vs),document.addEventListener("touchmove",v,vs),document.addEventListener("touchstart",b,vs),function(){ys=ys.filter(function(_){return _!==f}),document.removeEventListener("wheel",v,vs),document.removeEventListener("touchmove",v,vs),document.removeEventListener("touchstart",b,vs)}},[]);var R=s.removeScrollBar,L=s.inert;return g.createElement(g.Fragment,null,L?g.createElement(f,{styles:vy(u)}):null,R?g.createElement(dy,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function wy(s){for(var o=null;s!==null;)s instanceof ShadowRoot&&(o=s.host,s=s.host),s=s.parentNode;return o}const jy=Zv(Gm,by);var qm=g.forwardRef(function(s,o){return g.createElement(Aa,ar({},s,{ref:o,sideCar:jy}))});qm.classNames=Aa.classNames;var ky=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},bs=new WeakMap,wa=new WeakMap,ja={},Ad=0,Zm=function(s){return s&&(s.host||Zm(s.parentNode))},Ny=function(s,o){return o.map(function(a){if(s.contains(a))return a;var d=Zm(a);return d&&s.contains(d)?d:(console.error("aria-hidden",a,"in not contained inside",s,". Doing nothing"),null)}).filter(function(a){return!!a})},Sy=function(s,o,a,d){var u=Ny(o,Array.isArray(s)?s:[s]);ja[a]||(ja[a]=new WeakMap);var f=ja[a],h=[],p=new Set,v=new Set(u),x=function(w){!w||p.has(w)||(p.add(w),x(w.parentNode))};u.forEach(x);var b=function(w){!w||v.has(w)||Array.prototype.forEach.call(w.children,function(P){if(p.has(P))b(P);else try{var R=P.getAttribute(d),L=R!==null&&R!=="false",_=(bs.get(P)||0)+1,k=(f.get(P)||0)+1;bs.set(P,_),f.set(P,k),h.push(P),_===1&&L&&wa.set(P,!0),k===1&&P.setAttribute(a,"true"),L||P.setAttribute(d,"true")}catch(C){console.error("aria-hidden: cannot operate on ",P,C)}})};return b(o),p.clear(),Ad++,function(){h.forEach(function(w){var P=bs.get(w)-1,R=f.get(w)-1;bs.set(w,P),f.set(w,R),P||(wa.has(w)||w.removeAttribute(d),wa.delete(w)),R||w.removeAttribute(a)}),Ad--,Ad||(bs=new WeakMap,bs=new WeakMap,wa=new WeakMap,ja={})}},Cy=function(s,o,a){a===void 0&&(a="data-aria-hidden");var d=Array.from(Array.isArray(s)?s:[s]),u=ky(s);return u?(d.push.apply(d,Array.from(u.querySelectorAll("[aria-live], script"))),Sy(d,u,a,"aria-hidden")):function(){return null}},Ta="Dialog",[Ym]=ev(Ta),[Ey,Zt]=Ym(Ta),Jm=s=>{const{__scopeDialog:o,children:a,open:d,defaultOpen:u,onOpenChange:f,modal:h=!0}=s,p=g.useRef(null),v=g.useRef(null),[x,b]=ov({prop:d,defaultProp:u??!1,onChange:f,caller:Ta});return r.jsx(Ey,{scope:o,triggerRef:p,contentRef:v,contentId:kr(),titleId:kr(),descriptionId:kr(),open:x,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(w=>!w),[b]),modal:h,children:a})};Jm.displayName=Ta;var Xm="DialogTrigger",_y=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Zt(Xm,a),f=Un(o,u.triggerRef);return r.jsx(at.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":wc(u.open),...d,ref:f,onClick:ln(s.onClick,u.onOpenToggle)})});_y.displayName=Xm;var bc="DialogPortal",[My,eh]=Ym(bc,{forceMount:void 0}),th=s=>{const{__scopeDialog:o,forceMount:a,children:d,container:u}=s,f=Zt(bc,o);return r.jsx(My,{scope:o,forceMount:a,children:g.Children.map(d,h=>r.jsx(Da,{present:a||f.open,children:r.jsx(Um,{asChild:!0,container:u,children:h})}))})};th.displayName=bc;var Oa="DialogOverlay",rh=g.forwardRef((s,o)=>{const a=eh(Oa,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Zt(Oa,s.__scopeDialog);return f.modal?r.jsx(Da,{present:d||f.open,children:r.jsx(Ry,{...u,ref:o})}):null});rh.displayName=Oa;var Py=zm("DialogOverlay.RemoveScroll"),Ry=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Zt(Oa,a),f=Sv(),h=Un(o,f);return r.jsx(qm,{as:Py,allowPinchZoom:!0,shards:[u.contentRef],children:r.jsx(at.div,{"data-state":wc(u.open),...d,ref:h,style:{pointerEvents:"auto",...d.style}})})}),Bs="DialogContent",nh=g.forwardRef((s,o)=>{const a=eh(Bs,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Zt(Bs,s.__scopeDialog);return r.jsx(Da,{present:d||f.open,children:f.modal?r.jsx(Oy,{...u,ref:o}):r.jsx(Dy,{...u,ref:o})})});nh.displayName=Bs;var Oy=g.forwardRef((s,o)=>{const a=Zt(Bs,s.__scopeDialog),d=g.useRef(null),u=Un(o,a.contentRef,d);return g.useEffect(()=>{const f=d.current;if(f)return Cy(f)},[]),r.jsx(sh,{...s,ref:u,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:ln(s.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:ln(s.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0;(h.button===2||p)&&f.preventDefault()}),onFocusOutside:ln(s.onFocusOutside,f=>f.preventDefault())})}),Dy=g.forwardRef((s,o)=>{const a=Zt(Bs,s.__scopeDialog),d=g.useRef(!1),u=g.useRef(!1);return r.jsx(sh,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,p;(h=s.onCloseAutoFocus)==null||h.call(s,f),f.defaultPrevented||(d.current||(p=a.triggerRef.current)==null||p.focus(),f.preventDefault()),d.current=!1,u.current=!1},onInteractOutside:f=>{var v,x;(v=s.onInteractOutside)==null||v.call(s,f),f.defaultPrevented||(d.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const h=f.target;((x=a.triggerRef.current)==null?void 0:x.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})}),sh=g.forwardRef((s,o)=>{const{__scopeDialog:a,trapFocus:d,onOpenAutoFocus:u,onCloseAutoFocus:f,...h}=s,p=Zt(Bs,a);return $v(),r.jsx(r.Fragment,{children:r.jsx(Im,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:u,onUnmountAutoFocus:f,children:r.jsx(Lm,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":wc(p.open),...h,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),oh="DialogTitle",Ay=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Zt(oh,a);return r.jsx(at.h2,{id:u.titleId,...d,ref:o})});Ay.displayName=oh;var lh="DialogDescription",Ty=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Zt(lh,a);return r.jsx(at.p,{id:u.descriptionId,...d,ref:o})});Ty.displayName=lh;var ah="DialogClose",zy=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Zt(ah,a);return r.jsx(at.button,{type:"button",...d,ref:o,onClick:ln(s.onClick,()=>u.onOpenChange(!1))})});zy.displayName=ah;function wc(s){return s?"open":"closed"}var zo='[cmdk-group=""]',Td='[cmdk-group-items=""]',Ly='[cmdk-group-heading=""]',ih='[cmdk-item=""]',qp=`${ih}:not([aria-disabled="true"])`,ic="cmdk-item-select",js="data-value",Fy=(s,o,a)=>X0(s,o,a),dh=g.createContext(void 0),nl=()=>g.useContext(dh),ch=g.createContext(void 0),jc=()=>g.useContext(ch),uh=g.createContext(void 0),fh=g.forwardRef((s,o)=>{let a=ks(()=>{var S,q;return{search:"",value:(q=(S=s.value)!=null?S:s.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=ks(()=>new Set),u=ks(()=>new Map),f=ks(()=>new Map),h=ks(()=>new Set),p=ph(s),{label:v,children:x,value:b,onValueChange:w,filter:P,shouldFilter:R,loop:L,disablePointerSelection:_=!1,vimBindings:k=!0,...C}=s,O=kr(),B=kr(),z=kr(),$=g.useRef(null),I=qy();$n(()=>{if(b!==void 0){let S=b.trim();a.current.value=S,H.emit()}},[b]),$n(()=>{I(6,Ae)},[]);let H=g.useMemo(()=>({subscribe:S=>(h.current.add(S),()=>h.current.delete(S)),snapshot:()=>a.current,setState:(S,q,X)=>{var W,ae,fe,we;if(!Object.is(a.current[S],q)){if(a.current[S]=q,S==="search")le(),ye(),I(1,be);else if(S==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(z);U?U.focus():(W=document.getElementById(O))==null||W.focus()}if(I(7,()=>{var U;a.current.selectedItemId=(U=_e())==null?void 0:U.id,H.emit()}),X||I(5,Ae),((ae=p.current)==null?void 0:ae.value)!==void 0){let U=q??"";(we=(fe=p.current).onValueChange)==null||we.call(fe,U);return}}H.emit()}},emit:()=>{h.current.forEach(S=>S())}}),[]),ne=g.useMemo(()=>({value:(S,q,X)=>{var W;q!==((W=f.current.get(S))==null?void 0:W.value)&&(f.current.set(S,{value:q,keywords:X}),a.current.filtered.items.set(S,oe(q,X)),I(2,()=>{ye(),H.emit()}))},item:(S,q)=>(d.current.add(S),q&&(u.current.has(q)?u.current.get(q).add(S):u.current.set(q,new Set([S]))),I(3,()=>{le(),ye(),a.current.value||be(),H.emit()}),()=>{f.current.delete(S),d.current.delete(S),a.current.filtered.items.delete(S);let X=_e();I(4,()=>{le(),(X==null?void 0:X.getAttribute("id"))===S&&be(),H.emit()})}),group:S=>(u.current.has(S)||u.current.set(S,new Set),()=>{f.current.delete(S),u.current.delete(S)}),filter:()=>p.current.shouldFilter,label:v||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:O,inputId:z,labelId:B,listInnerRef:$}),[]);function oe(S,q){var X,W;let ae=(W=(X=p.current)==null?void 0:X.filter)!=null?W:Fy;return S?ae(S,a.current.search,q):0}function ye(){if(!a.current.search||p.current.shouldFilter===!1)return;let S=a.current.filtered.items,q=[];a.current.filtered.groups.forEach(W=>{let ae=u.current.get(W),fe=0;ae.forEach(we=>{let U=S.get(we);fe=Math.max(U,fe)}),q.push([W,fe])});let X=$.current;Re().sort((W,ae)=>{var fe,we;let U=W.getAttribute("id"),me=ae.getAttribute("id");return((fe=S.get(me))!=null?fe:0)-((we=S.get(U))!=null?we:0)}).forEach(W=>{let ae=W.closest(Td);ae?ae.appendChild(W.parentElement===ae?W:W.closest(`${Td} > *`)):X.appendChild(W.parentElement===X?W:W.closest(`${Td} > *`))}),q.sort((W,ae)=>ae[1]-W[1]).forEach(W=>{var ae;let fe=(ae=$.current)==null?void 0:ae.querySelector(`${zo}[${js}="${encodeURIComponent(W[0])}"]`);fe==null||fe.parentElement.appendChild(fe)})}function be(){let S=Re().find(X=>X.getAttribute("aria-disabled")!=="true"),q=S==null?void 0:S.getAttribute(js);H.setState("value",q||void 0)}function le(){var S,q,X,W;if(!a.current.search||p.current.shouldFilter===!1){a.current.filtered.count=d.current.size;return}a.current.filtered.groups=new Set;let ae=0;for(let fe of d.current){let we=(q=(S=f.current.get(fe))==null?void 0:S.value)!=null?q:"",U=(W=(X=f.current.get(fe))==null?void 0:X.keywords)!=null?W:[],me=oe(we,U);a.current.filtered.items.set(fe,me),me>0&&ae++}for(let[fe,we]of u.current)for(let U of we)if(a.current.filtered.items.get(U)>0){a.current.filtered.groups.add(fe);break}a.current.filtered.count=ae}function Ae(){var S,q,X;let W=_e();W&&(((S=W.parentElement)==null?void 0:S.firstChild)===W&&((X=(q=W.closest(zo))==null?void 0:q.querySelector(Ly))==null||X.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function _e(){var S;return(S=$.current)==null?void 0:S.querySelector(`${ih}[aria-selected="true"]`)}function Re(){var S;return Array.from(((S=$.current)==null?void 0:S.querySelectorAll(qp))||[])}function Te(S){let q=Re()[S];q&&H.setState("value",q.getAttribute(js))}function Ce(S){var q;let X=_e(),W=Re(),ae=W.findIndex(we=>we===X),fe=W[ae+S];(q=p.current)!=null&&q.loop&&(fe=ae+S<0?W[W.length-1]:ae+S===W.length?W[0]:W[ae+S]),fe&&H.setState("value",fe.getAttribute(js))}function Z(S){let q=_e(),X=q==null?void 0:q.closest(zo),W;for(;X&&!W;)X=S>0?Ky(X,zo):Qy(X,zo),W=X==null?void 0:X.querySelector(qp);W?H.setState("value",W.getAttribute(js)):Ce(S)}let de=()=>Te(Re().length-1),Y=S=>{S.preventDefault(),S.metaKey?de():S.altKey?Z(1):Ce(1)},M=S=>{S.preventDefault(),S.metaKey?Te(0):S.altKey?Z(-1):Ce(-1)};return g.createElement(at.div,{ref:o,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:S=>{var q;(q=C.onKeyDown)==null||q.call(C,S);let X=S.nativeEvent.isComposing||S.keyCode===229;if(!(S.defaultPrevented||X))switch(S.key){case"n":case"j":{k&&S.ctrlKey&&Y(S);break}case"ArrowDown":{Y(S);break}case"p":case"k":{k&&S.ctrlKey&&M(S);break}case"ArrowUp":{M(S);break}case"Home":{S.preventDefault(),Te(0);break}case"End":{S.preventDefault(),de();break}case"Enter":{S.preventDefault();let W=_e();if(W){let ae=new Event(ic);W.dispatchEvent(ae)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ne.inputId,id:ne.labelId,style:Yy},v),za(s,S=>g.createElement(ch.Provider,{value:H},g.createElement(dh.Provider,{value:ne},S))))}),Iy=g.forwardRef((s,o)=>{var a,d;let u=kr(),f=g.useRef(null),h=g.useContext(uh),p=nl(),v=ph(s),x=(d=(a=v.current)==null?void 0:a.forceMount)!=null?d:h==null?void 0:h.forceMount;$n(()=>{if(!x)return p.item(u,h==null?void 0:h.id)},[x]);let b=mh(u,f,[s.value,s.children,f],s.keywords),w=jc(),P=dn(I=>I.value&&I.value===b.current),R=dn(I=>x||p.filter()===!1?!0:I.search?I.filtered.items.get(u)>0:!0);g.useEffect(()=>{let I=f.current;if(!(!I||s.disabled))return I.addEventListener(ic,L),()=>I.removeEventListener(ic,L)},[R,s.onSelect,s.disabled]);function L(){var I,H;_(),(H=(I=v.current).onSelect)==null||H.call(I,b.current)}function _(){w.setState("value",b.current,!0)}if(!R)return null;let{disabled:k,value:C,onSelect:O,forceMount:B,keywords:z,...$}=s;return g.createElement(at.div,{ref:Us(f,o),...$,id:u,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!P,"data-disabled":!!k,"data-selected":!!P,onPointerMove:k||p.getDisablePointerSelection()?void 0:_,onClick:k?void 0:L},s.children)}),$y=g.forwardRef((s,o)=>{let{heading:a,children:d,forceMount:u,...f}=s,h=kr(),p=g.useRef(null),v=g.useRef(null),x=kr(),b=nl(),w=dn(R=>u||b.filter()===!1?!0:R.search?R.filtered.groups.has(h):!0);$n(()=>b.group(h),[]),mh(h,p,[s.value,s.heading,v]);let P=g.useMemo(()=>({id:h,forceMount:u}),[u]);return g.createElement(at.div,{ref:Us(p,o),...f,"cmdk-group":"",role:"presentation",hidden:w?void 0:!0},a&&g.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:x},a),za(s,R=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?x:void 0},g.createElement(uh.Provider,{value:P},R))))}),Uy=g.forwardRef((s,o)=>{let{alwaysRender:a,...d}=s,u=g.useRef(null),f=dn(h=>!h.search);return!a&&!f?null:g.createElement(at.div,{ref:Us(u,o),...d,"cmdk-separator":"",role:"separator"})}),By=g.forwardRef((s,o)=>{let{onValueChange:a,...d}=s,u=s.value!=null,f=jc(),h=dn(x=>x.search),p=dn(x=>x.selectedItemId),v=nl();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(at.input,{ref:o,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":p,id:v.inputId,type:"text",value:u?s.value:h,onChange:x=>{u||f.setState("search",x.target.value),a==null||a(x.target.value)}})}),Hy=g.forwardRef((s,o)=>{let{children:a,label:d="Suggestions",...u}=s,f=g.useRef(null),h=g.useRef(null),p=dn(x=>x.selectedItemId),v=nl();return g.useEffect(()=>{if(h.current&&f.current){let x=h.current,b=f.current,w,P=new ResizeObserver(()=>{w=requestAnimationFrame(()=>{let R=x.offsetHeight;b.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return P.observe(x),()=>{cancelAnimationFrame(w),P.unobserve(x)}}},[]),g.createElement(at.div,{ref:Us(f,o),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":d,id:v.listId},za(s,x=>g.createElement("div",{ref:Us(h,v.listInnerRef),"cmdk-list-sizer":""},x)))}),Gy=g.forwardRef((s,o)=>{let{open:a,onOpenChange:d,overlayClassName:u,contentClassName:f,container:h,...p}=s;return g.createElement(Jm,{open:a,onOpenChange:d},g.createElement(th,{container:h},g.createElement(rh,{"cmdk-overlay":"",className:u}),g.createElement(nh,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(fh,{ref:o,...p}))))}),Vy=g.forwardRef((s,o)=>dn(a=>a.filtered.count===0)?g.createElement(at.div,{ref:o,...s,"cmdk-empty":"",role:"presentation"}):null),Wy=g.forwardRef((s,o)=>{let{progress:a,children:d,label:u="Loading...",...f}=s;return g.createElement(at.div,{ref:o,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},za(s,h=>g.createElement("div",{"aria-hidden":!0},h)))}),ws=Object.assign(fh,{List:Hy,Item:Iy,Input:By,Group:$y,Separator:Uy,Dialog:Gy,Empty:Vy,Loading:Wy});function Ky(s,o){let a=s.nextElementSibling;for(;a;){if(a.matches(o))return a;a=a.nextElementSibling}}function Qy(s,o){let a=s.previousElementSibling;for(;a;){if(a.matches(o))return a;a=a.previousElementSibling}}function ph(s){let o=g.useRef(s);return $n(()=>{o.current=s}),o}var $n=typeof window>"u"?g.useEffect:g.useLayoutEffect;function ks(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function dn(s){let o=jc(),a=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,a,a)}function mh(s,o,a,d=[]){let u=g.useRef(),f=nl();return $n(()=>{var h;let p=(()=>{var x;for(let b of a){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(x=b.current.textContent)==null?void 0:x.trim():u.current}})(),v=d.map(x=>x.trim());f.value(s,p,v),(h=o.current)==null||h.setAttribute(js,p),u.current=p}),u}var qy=()=>{let[s,o]=g.useState(),a=ks(()=>new Map);return $n(()=>{a.current.forEach(d=>d()),a.current=new Map},[s]),(d,u)=>{a.current.set(d,u),o({})}};function Zy(s){let o=s.type;return typeof o=="function"?o(s.props):"render"in o?o.render(s.props):s}function za({asChild:s,children:o},a){return s&&g.isValidElement(o)?g.cloneElement(Zy(o),{ref:o.ref},a(o.props.children)):a(o)}var Yy={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Jy({onNavigate:s}){const[o,a]=g.useState(!1);return g.useEffect(()=>{const d=u=>{(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),a(f=>!f))};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[]),r.jsx(ws.Dialog,{open:o,onOpenChange:a,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>a(!1),children:r.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:d=>d.stopPropagation(),children:[r.jsx(ws.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),r.jsxs(ws.List,{className:"max-h-80 overflow-y-auto p-2",children:[r.jsx(ws.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),r.jsx(ws.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:sc.map(d=>r.jsxs(ws.Item,{value:`${d.label} ${d.hint}`,onSelect:()=>{s(d.id),a(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[r.jsx(d.icon,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:d.label}),r.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:d.hint})]},d.id))})]})]})})}async function ve(s,o){var v;const a={"Content-Type":"application/json",...o==null?void 0:o.headers},d=localStorage.getItem("mc_sudo_password"),u=localStorage.getItem("mc_hf_token");d&&(a["X-Sudo-Password"]=d);let f=o==null?void 0:o.body;if((((v=o==null?void 0:o.method)==null?void 0:v.toUpperCase())||"GET")==="POST"){if(typeof f=="string")try{const x=JSON.parse(f);let b=!1;d&&!("sudo_password"in x)&&(x.sudo_password=d,b=!0),u&&!("hf_token"in x)&&(x.hf_token=u,b=!0),b&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};d&&(x.sudo_password=d),u&&(x.hf_token=u),Object.keys(x).length>0&&(f=JSON.stringify(x))}}const p=await fetch(s,{...o,headers:a,body:f});if(!p.ok)throw new Error(`${p.status} ${p.statusText}`);return p.json()}const Qe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:s=>["drafts",s??""],connect:s=>["connect",s??""],memory:(s,o)=>["memory",s??"",o??""]},Xy=()=>Ct({queryKey:Qe.health,queryFn:()=>ve("/api/health"),refetchInterval:1e4}),La=(s=5e3)=>Ct({queryKey:Qe.systemStatus,queryFn:()=>ve("/api/system/status"),refetchInterval:s}),eb=(s=3e3)=>Ct({queryKey:Qe.services,queryFn:()=>ve("/api/system/services"),refetchInterval:s}),Hs=(s=4e3)=>Ct({queryKey:Qe.models,queryFn:()=>ve("/api/models"),refetchInterval:s}),tb=(s=4e3)=>Ct({queryKey:Qe.routing,queryFn:()=>ve("/api/routing"),refetchInterval:s}),hh=(s=2e3)=>Ct({queryKey:Qe.jobs,queryFn:()=>ve("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),xh=(s=3e3)=>Ct({queryKey:Qe.tokenStats,queryFn:()=>ve("/api/system/token-stats"),refetchInterval:s}),gh=(s=5e3)=>Ct({queryKey:Qe.agentStatus,queryFn:()=>ve("/api/agent/status"),refetchInterval:s}),rb=(s=6e4)=>Ct({queryKey:Qe.hermesBrain,queryFn:()=>ve("/api/agent/brain"),refetchInterval:s}),kc=s=>Ct({queryKey:Qe.updates,queryFn:()=>ve("/api/maintenance/updates"),refetchInterval:s}),nb=()=>Ct({queryKey:Qe.discover,queryFn:()=>ve("/api/discover")}),sb=s=>Ct({queryKey:Qe.drafts(s),queryFn:()=>ve(`/api/models/drafts?target=${encodeURIComponent(s??"")}`),enabled:!!s}),vh=s=>Ct({queryKey:Qe.connect(s),queryFn:()=>ve(s?`/api/connect?${s}`:"/api/connect")}),yh=s=>Ct({queryKey:Qe.memory(s==null?void 0:s.q,s==null?void 0:s.category),queryFn:()=>{const o=new URLSearchParams;return s!=null&&s.q&&o.set("q",s.q),s!=null&&s.category&&o.set("category",s.category),ve(`/api/memory?${o}`)},select:o=>s!=null&&s.limit?o.slice(0,s.limit):o});function St(s){return(s/1024**3).toFixed(1)}function dc(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function $t(s){if(!s)return"—";const o=s/1024**3;return o>=1?`${o.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function ob(s){if(!s)return"";const o=Math.floor(s/60);return o>0?`${o} min`:`${s} s`}function Zp(s){return s?`${Math.round(s/1024)}k`:"—"}function bh(s){var o,a,d="";if(typeof s=="string"||typeof s=="number")d+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(o=0;o{const o=db(s),{conflictingClassGroups:a,conflictingClassGroupModifiers:d}=s;return{getClassGroupId:h=>{const p=h.split(Nc);return p[0]===""&&p.length!==1&&p.shift(),wh(p,o)||ib(h)},getConflictingClassGroupIds:(h,p)=>{const v=a[h]||[];return p&&d[h]?[...v,...d[h]]:v}}},wh=(s,o)=>{var h;if(s.length===0)return o.classGroupId;const a=s[0],d=o.nextPart.get(a),u=d?wh(s.slice(1),d):void 0;if(u)return u;if(o.validators.length===0)return;const f=s.join(Nc);return(h=o.validators.find(({validator:p})=>p(f)))==null?void 0:h.classGroupId},Yp=/^\[(.+)\]$/,ib=s=>{if(Yp.test(s)){const o=Yp.exec(s)[1],a=o==null?void 0:o.substring(0,o.indexOf(":"));if(a)return"arbitrary.."+a}},db=s=>{const{theme:o,prefix:a}=s,d={nextPart:new Map,validators:[]};return ub(Object.entries(s.classGroups),a).forEach(([f,h])=>{cc(h,d,f,o)}),d},cc=(s,o,a,d)=>{s.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Jp(o,u);f.classGroupId=a;return}if(typeof u=="function"){if(cb(u)){cc(u(d),o,a,d);return}o.validators.push({validator:u,classGroupId:a});return}Object.entries(u).forEach(([f,h])=>{cc(h,Jp(o,f),a,d)})})},Jp=(s,o)=>{let a=s;return o.split(Nc).forEach(d=>{a.nextPart.has(d)||a.nextPart.set(d,{nextPart:new Map,validators:[]}),a=a.nextPart.get(d)}),a},cb=s=>s.isThemeGetter,ub=(s,o)=>o?s.map(([a,d])=>{const u=d.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,p])=>[o+h,p])):f);return[a,u]}):s,fb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,a=new Map,d=new Map;const u=(f,h)=>{a.set(f,h),o++,o>s&&(o=0,d=a,a=new Map)};return{get(f){let h=a.get(f);if(h!==void 0)return h;if((h=d.get(f))!==void 0)return u(f,h),h},set(f,h){a.has(f)?a.set(f,h):u(f,h)}}},jh="!",pb=s=>{const{separator:o,experimentalParseClassName:a}=s,d=o.length===1,u=o[0],f=o.length,h=p=>{const v=[];let x=0,b=0,w;for(let k=0;kb?w-b:void 0;return{modifiers:v,hasImportantModifier:R,baseClassName:L,maybePostfixModifierPosition:_}};return a?p=>a({className:p,parseClassName:h}):h},mb=s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(d=>{d[0]==="["?(o.push(...a.sort(),d),a=[]):a.push(d)}),o.push(...a.sort()),o},hb=s=>({cache:fb(s.cacheSize),parseClassName:pb(s),...ab(s)}),xb=/\s+/,gb=(s,o)=>{const{parseClassName:a,getClassGroupId:d,getConflictingClassGroupIds:u}=o,f=[],h=s.trim().split(xb);let p="";for(let v=h.length-1;v>=0;v-=1){const x=h[v],{modifiers:b,hasImportantModifier:w,baseClassName:P,maybePostfixModifierPosition:R}=a(x);let L=!!R,_=d(L?P.substring(0,R):P);if(!_){if(!L){p=x+(p.length>0?" "+p:p);continue}if(_=d(P),!_){p=x+(p.length>0?" "+p:p);continue}L=!1}const k=mb(b).join(":"),C=w?k+jh:k,O=C+_;if(f.includes(O))continue;f.push(O);const B=u(_,L);for(let z=0;z0?" "+p:p)}return p};function vb(){let s=0,o,a,d="";for(;s{if(typeof s=="string")return s;let o,a="";for(let d=0;dw(b),s());return a=hb(x),d=a.cache.get,u=a.cache.set,f=p,p(v)}function p(v){const x=d(v);if(x)return x;const b=gb(v,a);return u(v,b),b}return function(){return f(vb.apply(null,arguments))}}const Ue=s=>{const o=a=>a[s]||[];return o.isThemeGetter=!0,o},Nh=/^\[(?:([a-z-]+):)?(.+)\]$/i,bb=/^\d+\/\d+$/,wb=new Set(["px","full","screen"]),jb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vr=s=>Ss(s)||wb.has(s)||bb.test(s),Kr=s=>Gs(s,"length",Ab),Ss=s=>!!s&&!Number.isNaN(Number(s)),zd=s=>Gs(s,"number",Ss),Lo=s=>!!s&&Number.isInteger(Number(s)),Eb=s=>s.endsWith("%")&&Ss(s.slice(0,-1)),Ne=s=>Nh.test(s),Qr=s=>jb.test(s),_b=new Set(["length","size","percentage"]),Mb=s=>Gs(s,_b,Sh),Pb=s=>Gs(s,"position",Sh),Rb=new Set(["image","url"]),Ob=s=>Gs(s,Rb,zb),Db=s=>Gs(s,"",Tb),Fo=()=>!0,Gs=(s,o,a)=>{const d=Nh.exec(s);return d?d[1]?typeof o=="string"?d[1]===o:o.has(d[1]):a(d[2]):!1},Ab=s=>kb.test(s)&&!Nb.test(s),Sh=()=>!1,Tb=s=>Sb.test(s),zb=s=>Cb.test(s),Lb=()=>{const s=Ue("colors"),o=Ue("spacing"),a=Ue("blur"),d=Ue("brightness"),u=Ue("borderColor"),f=Ue("borderRadius"),h=Ue("borderSpacing"),p=Ue("borderWidth"),v=Ue("contrast"),x=Ue("grayscale"),b=Ue("hueRotate"),w=Ue("invert"),P=Ue("gap"),R=Ue("gradientColorStops"),L=Ue("gradientColorStopPositions"),_=Ue("inset"),k=Ue("margin"),C=Ue("opacity"),O=Ue("padding"),B=Ue("saturate"),z=Ue("scale"),$=Ue("sepia"),I=Ue("skew"),H=Ue("space"),ne=Ue("translate"),oe=()=>["auto","contain","none"],ye=()=>["auto","hidden","clip","visible","scroll"],be=()=>["auto",Ne,o],le=()=>[Ne,o],Ae=()=>["",vr,Kr],_e=()=>["auto",Ss,Ne],Re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Te=()=>["solid","dashed","dotted","double","none"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",Ne],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Ss,Ne];return{cacheSize:500,separator:":",theme:{colors:[Fo],spacing:[vr,Kr],blur:["none","",Qr,Ne],brightness:M(),borderColor:[s],borderRadius:["none","","full",Qr,Ne],borderSpacing:le(),borderWidth:Ae(),contrast:M(),grayscale:de(),hueRotate:M(),invert:de(),gap:le(),gradientColorStops:[s],gradientColorStopPositions:[Eb,Kr],inset:be(),margin:be(),opacity:M(),padding:le(),saturate:M(),scale:M(),sepia:de(),skew:M(),space:le(),translate:le()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Qr]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Re(),Ne]}],overflow:[{overflow:ye()}],"overflow-x":[{"overflow-x":ye()}],"overflow-y":[{"overflow-y":ye()}],overscroll:[{overscroll:oe()}],"overscroll-x":[{"overscroll-x":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lo,Ne]}],basis:[{basis:be()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",Lo,Ne]}],"grid-cols":[{"grid-cols":[Fo]}],"col-start-end":[{col:["auto",{span:["full",Lo,Ne]},Ne]}],"col-start":[{"col-start":_e()}],"col-end":[{"col-end":_e()}],"grid-rows":[{"grid-rows":[Fo]}],"row-start-end":[{row:["auto",{span:[Lo,Ne]},Ne]}],"row-start":[{"row-start":_e()}],"row-end":[{"row-end":_e()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,o]}],"min-w":[{"min-w":[Ne,o,"min","max","fit"]}],"max-w":[{"max-w":[Ne,o,"none","full","min","max","fit","prose",{screen:[Qr]},Qr]}],h:[{h:[Ne,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Qr,Kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zd]}],"font-family":[{font:[Fo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",Ss,zd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vr,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vr,Kr]}],"underline-offset":[{"underline-offset":["auto",vr,Ne]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:le()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Re(),Pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ob]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...Te(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:Te()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...Te()]}],"outline-offset":[{"outline-offset":[vr,Ne]}],"outline-w":[{outline:[vr,Kr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:Ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[vr,Kr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Qr,Db]}],"shadow-color":[{shadow:[Fo]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ce()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[d]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Qr,Ne]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[w]}],saturate:[{saturate:[B]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[d]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[Lo,Ne]}],"translate-x":[{"translate-x":[ne]}],"translate-y":[{"translate-y":[ne]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",s]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":le()}],"scroll-mx":[{"scroll-mx":le()}],"scroll-my":[{"scroll-my":le()}],"scroll-ms":[{"scroll-ms":le()}],"scroll-me":[{"scroll-me":le()}],"scroll-mt":[{"scroll-mt":le()}],"scroll-mr":[{"scroll-mr":le()}],"scroll-mb":[{"scroll-mb":le()}],"scroll-ml":[{"scroll-ml":le()}],"scroll-p":[{"scroll-p":le()}],"scroll-px":[{"scroll-px":le()}],"scroll-py":[{"scroll-py":le()}],"scroll-ps":[{"scroll-ps":le()}],"scroll-pe":[{"scroll-pe":le()}],"scroll-pt":[{"scroll-pt":le()}],"scroll-pr":[{"scroll-pr":le()}],"scroll-pb":[{"scroll-pb":le()}],"scroll-pl":[{"scroll-pl":le()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[vr,Kr,zd]}],stroke:[{stroke:[s,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Fb=yb(Lb);function J(...s){return Fb(lb(s))}function Zo(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Ch=["fast","heavy","coder","vision","scout"],Ib={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},Sc=s=>s&&Ib[s]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function $b({fit:s}){const o={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[s.level];return r.jsxs("span",{className:J("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",o),children:[s.text," • ",s.req_gb," GB RAM"]})}function Xp(s){const o=s.toLowerCase();return o.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:o.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:o.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:o.includes("mistral")||o.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:o.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:o.includes("hermes")||o.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:o.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function Ub(){const{data:s}=Hs(2e3),{data:o}=xh(2e3),a=(s==null?void 0:s.models)??[],d=(s==null?void 0:s.running)??[],u=a.filter(v=>d.includes(v.name)),f=g.useRef(null),[h,p]=g.useState(!1);return g.useEffect(()=>{if(!o)return;const v=o.total_tokens;if(f.current!==null&&v>f.current){p(!0);const x=setTimeout(()=>p(!1),4e3);return f.current=v,()=>clearTimeout(x)}f.current=v},[o==null?void 0:o.total_tokens]),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ho,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),r.jsxs("span",{className:J("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",h?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[h?r.jsx(Ko,{className:"h-3 w-3 animate-pulse"}):r.jsx(T0,{className:"h-3 w-3"}),h?"Inferenz aktiv":"Idle"]})]}),u.length===0?r.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):r.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:u.map(v=>{var x;return r.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[v.role&&r.jsx("span",{className:J("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Sc(v.role)),children:v.role}),r.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(x=v.name.split("/").pop())==null?void 0:x.replace(/\.gguf$/i,"")})]}),r.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[$t(v.size_bytes)," im Unified-RAM"]})]}),r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[r.jsx("span",{className:J("h-1.5 w-1.5 rounded-full bg-emerald-500",h&&"animate-pulse")})," warm"]})]},v.name)})})]})}function ka({value:s,label:o,detail:a}){const u=2*Math.PI*24,f=u-Math.min(s,100)/100*u,h=s>90?"stroke-red-500":s>75?"stroke-amber-500":"stroke-primary";return r.jsxs("div",{className:"flex flex-col items-center gap-1.5 p-2 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[r.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90",children:[r.jsx("circle",{cx:"32",cy:"32",r:24,className:"stroke-muted fill-none",strokeWidth:"4.5"}),r.jsx("circle",{cx:"32",cy:"32",r:24,className:J("fill-none transition-all duration-700 ease-out",h),strokeWidth:"4.5",strokeDasharray:u,strokeDashoffset:f,strokeLinecap:"round"})]}),r.jsxs("span",{className:"text-xs font-mono font-bold tracking-tight text-foreground",children:[Math.round(s),"%"]})]}),r.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:o}),a&&r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function Bb(){const{data:s}=La(3e3);return r.jsxs("div",{className:"md:col-span-2 flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Dt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"System-Status"})]}),s?r.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[r.jsx(ka,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),r.jsx(ka,{value:s.ram.percent,label:"RAM",detail:`${St(s.ram.used)} / ${St(s.ram.total)} GB`}),s.gpu&&s.gpu.busy_percent!=null&&s.gpu.gtt_used!=null&&s.gpu.gtt_total!=null&&r.jsx(ka,{value:s.gpu.busy_percent,label:"GPU",detail:`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB`}),s.disk&&r.jsx(ka,{value:s.disk.percent,label:"Disk",detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(s==null?void 0:s.temp)&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"mt-4 flex gap-4 text-xs font-mono text-muted-foreground/80 border-t border-border/30 pt-3",children:[s.temp.cpu!=null&&r.jsxs("span",{children:["CPU Temp: ",s.temp.cpu," °C"]}),s.temp.gpu!=null&&r.jsxs("span",{children:["GPU Temp: ",s.temp.gpu," °C"]})]})]})}function Eh({type:s,title:o,message:a,defaultValue:d,onConfirm:u,onCancel:f}){const h=g.useRef(null);return r.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:o}),r.jsx("button",{onClick:f||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:a}),s==="prompt"&&r.jsx("input",{ref:h,type:"text",defaultValue:d,className:"w-full h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:p=>{var v;p.key==="Enter"&&u((v=h.current)==null?void 0:v.value)}}),r.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&r.jsx("button",{onClick:f,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:()=>{var v;const p=s==="prompt"?(v=h.current)==null?void 0:v.value:void 0;u(p)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:s==="confirm"?"Ja, fortfahren":s==="prompt"?"Übernehmen":"OK"})]})]})})}function Bn(){const[s,o]=g.useState(null),a=g.useCallback(()=>o(null),[]),d=g.useCallback((p,v,x)=>{o({type:"alert",title:p,message:v,onConfirm:()=>{o(null),x==null||x()}})},[]),u=g.useCallback((p,v,x,b)=>{o({type:"confirm",title:p,message:v,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),b==null||b()}})},[]),f=g.useCallback((p,v,x,b,w)=>{o({type:"prompt",title:p,message:v,defaultValue:x,onConfirm:P=>{o(null),b(P)},onCancel:()=>{o(null),w==null||w()}})},[]),h=s?r.jsx(Eh,{...s}):null;return{showAlert:d,showConfirm:u,showPrompt:f,close:a,dialogElement:h}}function Hb(){var $;const s=cn(),{data:o}=kc(3e3),{data:a=[]}=hh(3e3),{showConfirm:d,dialogElement:u}=Bn(),[f,h]=g.useState(""),[p,v]=g.useState(!1),[x,b]=g.useState(""),[w,P]=g.useState(!1),[R,L]=g.useState({open:!1,actionPath:"",actionLabel:""}),_=()=>{s.invalidateQueries({queryKey:Qe.updates}),s.invalidateQueries({queryKey:Qe.jobs}),s.invalidateQueries({queryKey:Qe.models})};async function k(I,H,ne,oe){h(`${H} wird ausgeführt...`),v(!0);try{const ye={...ne},be=await ve(I,{method:"POST",body:JSON.stringify(ye)});if(be.status==="password_required"||be.status==="incorrect_password"){L({open:!0,actionPath:I,actionLabel:H,payload:ne,error:be.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),h("");return}be.job_id?h(`${H} gestartet (Job-ID: ${be.job_id})`):be.ok?h(`${H} erfolgreich ausgeführt.`):h(`Fehler: ${be.err||"Unbekannter Fehler"}`),_()}catch(ye){h(`Fehler bei ${H}: ${ye.message}`)}finally{v(!1)}}async function C(){P(!0);try{const I={...R.payload,sudo_password:x},H=await ve(R.actionPath,{method:"POST",body:JSON.stringify(I)});if(H.status==="password_required"||H.status==="incorrect_password"){L(ne=>({...ne,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}H.job_id?h(`${R.actionLabel} gestartet (Job-ID: ${H.job_id})`):H.ok?h(`${R.actionLabel} erfolgreich ausgeführt.`):h(`Fehler: ${H.err||"Unbekannter Fehler"}`),L({open:!1,actionPath:"",actionLabel:""}),b(""),_()}catch(I){h(`Fehler: ${I.message}`),L({open:!1,actionPath:"",actionLabel:""}),b("")}finally{P(!1)}}async function O(I,H){h(`Upgrade für ${I} wird gestartet...`);try{await ve("/api/models/install",{method:"POST",body:JSON.stringify({repo:I,role:H,quant:"Q4_K_M",jinja:!0})}),h("Upgrade-Download gestartet."),_()}catch(ne){h(`Upgrade fehlgeschlagen: ${ne.message}`)}}const B=a.find(I=>I.label.includes("OS-Update")&&(I.state==="running"||I.state==="queued")),z=a.find(I=>I.label.includes("Engine-Update")&&(I.state==="running"||I.state==="queued"));return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[R.open&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/60 bg-card/90 backdrop-blur-xl p-5 shadow-2xl space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),r.jsx("button",{onClick:()=>{L({open:!1,actionPath:"",actionLabel:""}),b("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",r.jsx("strong",{children:R.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{type:"password",value:x,onChange:I=>b(I.target.value),placeholder:"Sudo-Passwort eingeben...",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground",onKeyDown:I=>I.key==="Enter"&&C(),autoFocus:!0}),R.error&&r.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:R.error})]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{onClick:()=>{L({open:!1,actionPath:"",actionLabel:""}),b("")},className:"h-8 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent transition-all cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:C,disabled:!x||w,className:"h-8 px-4 rounded-lg bg-primary text-primary-foreground text-[10px] font-bold uppercase hover:opacity-90 transition-all disabled:opacity-50 cursor-pointer flex items-center justify-center gap-1.5",children:w?"Prüfe...":"Ausführen"})]})]})}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(U0,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(o==null?void 0:o.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(o.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),o?r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.os>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"OS-Pakete"}),r.jsx("span",{className:"font-mono",children:o.os>0?`${o.os} verfügbar`:"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.engine>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Engine (llama.cpp)"}),r.jsx("span",{className:"font-mono",children:o.engine>0?"Update verfügbar":"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.models>0?"border-primary/30 bg-primary/5 text-primary font-semibold animate-pulse":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Modell-Upgrades"}),r.jsx("span",{className:"font-mono",children:o.models>0?`${o.models} verfügbar`:"aktuell"})]}),($=o.components)==null?void 0:$.map(I=>{const H=I.update===!0;return r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",H?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[I.name,I.reachable===!1&&r.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),r.jsx("span",{className:"font-mono text-[10px]",title:I.current?`installiert: ${I.current}`:void 0,children:H?`Update: ${I.latest}`:I.update===!1?"aktuell":I.latest?`neueste: ${I.latest}`:"—"})]},I.key)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[r.jsx("button",{onClick:()=>k("/api/maintenance/os-update","OS-Update"),disabled:p||!!B,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:B?r.jsxs(r.Fragment,{children:[r.jsx(In,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",B.progress??0,"%)"]})]}):r.jsx("span",{children:"OS Update"})}),r.jsx("button",{onClick:()=>k("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!z,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:z?r.jsxs(r.Fragment,{children:[r.jsx(In,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",z.progress??0,"%)"]})]}):r.jsx("span",{children:"Engine Update"})})]}),r.jsxs("button",{onClick:()=>{d("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>k("/api/maintenance/reboot","Reboot"))},disabled:p,className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 text-red-400 text-[10px] font-bold uppercase hover:bg-red-500/10 transition-all cursor-pointer disabled:opacity-50",children:[r.jsx(Om,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Host Reboot"})]}),o.model_list.length>0&&r.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[r.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),r.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:o.model_list.map(I=>r.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-background/25 border border-border/30 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${I.role}: ${I.repo}`,children:[r.jsx("span",{className:"text-primary font-bold uppercase",children:I.role}),": ",I.repo.split("/").pop()]}),r.jsxs("button",{onClick:()=>O(I.repo,I.role),className:"px-2 py-0.5 text-[8px] font-bold uppercase rounded bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer flex items-center gap-0.5",children:[r.jsx(an,{className:"h-2.5 w-2.5"})," Laden"]})]},I.repo))})]})]}):r.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),f&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:f}),r.jsxs("div",{className:"text-[9px] text-muted-foreground/60 leading-normal border-t border-border/10 pt-2.5 flex items-start gap-1",children:[r.jsx($s,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),r.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",r.jsx("code",{children:"/etc/sudoers"})," (z.B. ",r.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),r.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer")),className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer shadow-md shadow-primary/10",children:"System-Zentrale öffnen"})}),u]})}function Gb(){const s=cn(),{data:o}=gh(3e3),{data:a}=Hs(),{showAlert:d,dialogElement:u}=Bn(),[f,h]=g.useState(!1),p=(a==null?void 0:a.models)??[];async function v(x){try{await ve("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:Qe.agentStatus}),h(!1)}catch(b){d("Fehler",`Fehler beim Wechseln des Gehirns: ${b.message}`)}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Is,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(o==null?void 0:o.webui_url)&&r.jsxs("a",{href:Zo(o.webui_url),target:"_blank",rel:"noopener",className:J("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[r.jsx(Pa,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),o?r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.gateway_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.webui_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{onClick:()=>h(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),r.jsx(Dt,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[r.jsx(Vo,{className:"h-3 w-3 shrink-0"}),o.brain_model||"auto"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),r.jsx(Wo,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[r.jsxs("div",{children:["Config: ",o.has_config?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Skills: ",o.has_skills?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Memory: ",o.has_memories?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),o&&r.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"Telegram"}),r.jsx("span",{className:J("font-semibold",o.telegram_enabled?"text-emerald-400":""),children:o.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"MCP-Server"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[o.mcp_server_count??0," verbunden"]})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"PC Executor"}),r.jsx("span",{className:J("font-semibold",o.pc_executor_reachable?"text-emerald-400":""),children:o.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),o&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>h(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...p.map(x=>{var b;return((b=x.name.split("/").pop())==null?void 0:b.replace(".gguf",""))||x.name})].map(x=>{const b=["auto","fast","heavy"].includes(x);return r.jsxs("button",{onClick:()=>v(x),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",o.brain_model===x||!o.brain_model&&x==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:x}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:b?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(o.brain_model===x||!o.brain_model&&x==="auto")&&r.jsx(ir,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),u]})}function Vb(){const{data:s}=Hs(3e3),o=(s==null?void 0:s.models)??[],a=(s==null?void 0:s.running)??[];return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Vo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),r.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Ch.map(d=>{var h;const u=o.find(p=>p.role===d),f=u?a.includes(u.name):!1;return r.jsxs("div",{className:J("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",f?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":u?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[r.jsx("div",{className:"min-w-0 flex-1 mr-2",children:r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:J("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Sc(d)),children:d}),r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:u?(h=u.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,""):"nicht zugewiesen"}),u&&r.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[u.prompt_cache&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),u.spec_active&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${u.spec_draft_model})`,children:"SPEC"}),u.parallel_slots>1&&r.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${u.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",u.parallel_slots]}),u.incomplete&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),r.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:u?f?r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},d)})})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function Wb(){const s=cn(),{data:o=[]}=yh({limit:3}),[a,d]=g.useState(""),[u,f]=g.useState("stable"),[h,p]=g.useState(!1);async function v(){if(!(!a.trim()||h)){p(!0);try{await ve("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"dashboard"})}),d(""),s.invalidateQueries({queryKey:["memory"]})}catch(x){console.error(x)}finally{p(!1)}}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Go,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsx("textarea",{value:a,onChange:x=>d(x.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),r.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[r.jsxs("select",{value:u,onChange:x=>f(x.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[r.jsx("option",{value:"stable",children:"🔵 Fakt"}),r.jsx("option",{value:"instruction",children:"📋 Regel"}),r.jsx("option",{value:"user",children:"👤 User"}),r.jsx("option",{value:"versioned",children:"🟡 Version"})]}),r.jsxs("button",{onClick:v,disabled:!a.trim()||h,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[r.jsx(Rm,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),r.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[r.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),r.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:o.length===0?r.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):o.map(x=>r.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[r.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:x.category}),r.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:x.content,children:x.content})]},x.id))})]})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}function Kb(){var o;const{data:s}=xh(3e3);return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(C0,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),s?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),r.jsxs("div",{className:"text-base font-bold text-emerald-400 mt-0.5 tracking-tight font-space",children:[s.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," €"]}),r.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",s.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),r.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:s.total_tokens.toLocaleString("de-DE")}),r.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),r.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Input (Prompts):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Output (Antworten):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),r.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet ggü. Cloud-APIs",(o=s==null?void 0:s.pricing)!=null&&o.heavy?` (Ø ${(s.pricing.heavy.in??0).toFixed(2).replace(".",",")} $ / ${(s.pricing.heavy.out??0).toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function Qb(){return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),r.jsx(Ub,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[r.jsx(Bb,{}),r.jsx(Hb,{})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[r.jsx(Gb,{}),r.jsx(Vb,{}),r.jsx(Wb,{}),r.jsx(Kb,{})]})]})}function qb(){const s=cn(),{data:o=[]}=hh(2e3),{showAlert:a,dialogElement:d}=Bn();async function u(p){try{await ve(`/api/jobs/${p}/cancel`,{method:"POST"}),s.invalidateQueries({queryKey:Qe.jobs})}catch(v){a("Fehler",v.message)}}const f=o.filter(p=>p.state==="running"||p.state==="queued"),h=o.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&h.length===0?null:r.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),f.map(p=>r.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:p.label}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-muted-foreground font-mono",children:[p.progress??0,"% • ",dc(p.done_bytes),"/",dc(p.total_bytes),p.eta_s?` • ETA ${ob(p.eta_s)}`:""]}),r.jsx("button",{onClick:()=>u(p.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),r.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:r.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${p.progress??0}%`}})})]},p.id)),h.map(p=>r.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[r.jsx("span",{className:"truncate",children:p.label}),r.jsx("span",{className:J("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",p.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:p.state})]},p.id)),d]})}function _n({children:s,tone:o="muted"}){const a={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return r.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${a[o]}`,children:s})}function em({caps:s}){return s?r.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&r.jsx(_n,{children:"💻 Code"}),s.vision&&r.jsx(_n,{children:"👁 Bild"}),s.reasoning&&r.jsx(_n,{children:"🧠 Reason"}),s.moe&&r.jsxs(_n,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&r.jsx(_n,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&r.jsx(_n,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&r.jsx(_n,{children:"🔢 Embed"})]}):null}function Zb({model:s,onClose:o,onChanged:a}){var _,k;const{data:d,isLoading:u}=sb(s.gguf_path),[f,h]=g.useState(null),[p,v]=g.useState(""),x=d==null?void 0:d.target_vocab,b=(d==null?void 0:d.drafts)??[],w=b.filter(C=>C.compatible===!0),P=s.spec_draft_model;async function R(C){h(C??"__clear__"),v("");try{await ve(`/api/models/${encodeURIComponent(s.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:C})}),a(),o()}catch(O){v(String((O==null?void 0:O.message)||O)),h(null)}}const L=C=>{var O;return C?`${C.pre??"?"} · ${((O=C.n_vocab)==null?void 0:O.toLocaleString())??"?"} Tokens`:"—"};return r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[r.jsx(Ko,{className:"h-4 w-4"})," Speculative Draft"]}),r.jsx("button",{onClick:o,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',r.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),r.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[r.jsx("span",{className:"text-muted-foreground",children:(_=s.name.split("/").pop())==null?void 0:_.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-foreground",children:["Vocab: ",L(x)]})]}),s.spec_active&&P&&r.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[r.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[r.jsx(ir,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",P]}),r.jsx("button",{onClick:()=>R(null),disabled:f!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(d!=null&&d.target_exists)&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[r.jsx(nc,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),r.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:u?r.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):b.length===0?r.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",r.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):b.map(C=>{var z,$;const O=C.filename===P,B=C.compatible===!0;return r.jsxs("div",{className:J("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",B?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",O&&"border-primary/40 bg-primary/10"),children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:C.filename}),r.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[$t(C.size_bytes)," · Vocab: ",L(C.vocab)]})]}),B?O?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[r.jsx(ir,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("button",{onClick:()=>R(C.path),disabled:f!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):r.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:C.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(z=C.vocab)==null?void 0:z.pre}/${($=C.vocab)==null?void 0:$.n_vocab} ≠ Modell ${x==null?void 0:x.pre}/${x==null?void 0:x.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[r.jsx(nc,{className:"h-3.5 w-3.5"})," ",C.compatible===!1?"Vocab ≠":"n/a"]})]},C.path)})}),!u&&(d==null?void 0:d.target_exists)&&b.length>0&&w.length===0&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",r.jsx("span",{className:"font-mono",children:x==null?void 0:x.pre}),", n_vocab=",r.jsx("span",{className:"font-mono",children:(k=x==null?void 0:x.n_vocab)==null?void 0:k.toLocaleString()}),")."]}),p&&r.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:p})]})})}function Yb(){var Ks,Qs,qs,Kn,fn,Zs,Cr,Er;const s=cn(),{data:o,isLoading:a,error:d}=Hs(4e3),{data:u}=tb(4e3),{data:f}=vh(),{data:h}=kc(4e3),{data:p}=rb(),{data:v}=La(),{showAlert:x,showConfirm:b,showPrompt:w,dialogElement:P}=Bn(),R=(o==null?void 0:o.models)??[],L=(o==null?void 0:o.running)??[],_=d?String(d):"",k=()=>{s.invalidateQueries({queryKey:Qe.models}),s.invalidateQueries({queryKey:Qe.routing})},[C,O]=g.useState(null),[B,z]=g.useState(null),[$,I]=g.useState(null),[H,ne]=g.useState(!1),[oe,ye]=g.useState(!1),[be,le]=g.useState(null),[Ae,_e]=g.useState("grid"),[Re,Te]=g.useState("all"),Ce=R.filter(D=>Re==="in_use"?!!D.role||L.includes(D.name):!0),[Z,de]=g.useState({width:800,height:360}),Y=g.useRef(null),M=g.useCallback(D=>{if(Y.current&&(Y.current.disconnect(),Y.current=null),D){const ee=new ResizeObserver(je=>{if(!je||je.length===0)return;const De=je[0].contentRect;de({width:De.width,height:De.height})});ee.observe(D),Y.current=ee}},[]),S=Z.width,q=Z.height,X=D=>{const ee=S*.1,je=q*D,De=S*.5,Be=q*.5,Yt=S*.3,pn=je,mn=S*.3;return`M ${ee} ${je} C ${Yt} ${pn}, ${mn} ${Be}, ${De} ${Be}`},W=D=>{const ee=S*.5,je=q*.5,De=S*.9,Be=q*D,Yt=S*.7,pn=je,mn=S*.7;return`M ${ee} ${je} C ${Yt} ${pn}, ${mn} ${Be}, ${De} ${Be}`};async function ae(D){try{await ve(`/api/models/${encodeURIComponent(D)}/load`,{method:"POST"}),k()}catch(ee){x("Fehler",`Fehler beim Laden des Modells: ${ee.message}`)}}async function fe(D){try{await ve(`/api/models/${encodeURIComponent(D)}/unload`,{method:"POST"}),k()}catch(ee){x("Fehler",`Fehler beim Entladen des Modells: ${ee.message}`)}}async function we(){try{await ve("/api/models/unload",{method:"POST"}),k()}catch(D){x("Fehler",`Fehler beim Entladen aller Modelle: ${D.message}`)}}async function U(D,ee){try{await ve(`/api/models/${encodeURIComponent(ee)}/role`,{method:"POST",body:JSON.stringify({role:D||null})}),k()}catch(je){x("Fehler",`Fehler beim Zuweisen der Rolle: ${je.message||je}`)}}async function me(D,ee){w("Kontextlänge anpassen","Gib die gewünschte Kontextlänge in Tokens an:",String(ee||32768),async je=>{if(je)try{await ve(`/api/models/${encodeURIComponent(D)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(je,10)})}),k()}catch(De){x("Fehler",`Fehler beim Setzen des Kontexts: ${De.message||De}`)}})}async function xt(D){b("Modell löschen?",`Modell '${D}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await ve(`/api/models/${encodeURIComponent(D)}`,{method:"DELETE"}),k()}catch(ee){x("Fehler",`Fehler beim Löschen: ${ee.message||ee}`)}})}async function sl(D,ee,je,De){try{await ve("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:ee,quant:je,jinja:De})}),x("Herunterladen gestartet",`Download für '${D}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Be){x("Fehler",`Fehler beim Starten des Upgrades: ${Be.message||Be}`)}}async function Hn(D){const ee=p==null?void 0:p.budget,je=ee&&!ee.fits?` + +⚠ Speicher-Warnung: Dieses Brain (~${ee.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${ee.largest_ondemand_gb} GB) sprengt das das Budget (${ee.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";b("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${D.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${je}`,async()=>{try{await ve("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:"hermes",quant:"Q4_K_M",jinja:!0})}),x("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),k()}catch(De){x("Fehler",`Update fehlgeschlagen: ${De.message||De}`)}})}async function Vs(D){b("Agent-Hirn wechseln?",`'${D.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await ve("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:D})}),x("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),ne(!1),k()}catch(ee){x("Fehler",`Wechsel fehlgeschlagen: ${ee.message||ee}`)}})}async function ol(D){D&&(await navigator.clipboard.writeText(D),ye(!0),setTimeout(()=>ye(!1),1500))}if(a)return r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(_)return r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",_,")."]});const Gn=R.filter(D=>L.includes(D.name)),un=Gn.reduce((D,ee)=>D+(ee.size_bytes||0),0),Ws=((Ks=v==null?void 0:v.gpu)==null?void 0:Ks.gtt_total)||((Qs=v==null?void 0:v.gpu)==null?void 0:Qs.vram_total)||0,Vn=((qs=v==null?void 0:v.gpu)==null?void 0:qs.gtt_used)||0,Nr=16*1024**3,dr=Ws>2*1024**3?Ws:un>Nr?un*1.2:Nr,Wn=D=>R.find(ee=>ee.role===D),Sr=D=>{const ee=Wn(D);return ee?L.includes(ee.name):!1};return r.jsxs("div",{className:"space-y-8",children:[r.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ca,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",$t(un)," Gewichte",Vn>0?` · ${$t(Vn)} real belegt (inkl. KV)`:""," / ",$t(dr)]}),L.length>0&&r.jsx("button",{onClick:we,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),r.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:Gn.length===0?r.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):Gn.map((D,ee)=>{var Be;const je=(D.size_bytes||0)/dr*100,De=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][ee%4];return r.jsxs("div",{style:{width:`${je}%`},className:J("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",De),title:`${D.name} (${$t(D.size_bytes)})`,children:[r.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[D.role?`[${D.role}] `:"",(Be=D.name.split("/").pop())==null?void 0:Be.replace(".gguf","")]}),r.jsx("span",{className:"text-[8px] font-mono opacity-80",children:$t(D.size_bytes)})]},D.name)})})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),r.jsxs("div",{ref:M,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:X(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(be==="roocode"||C==="roocode")&&r.jsx("path",{d:X(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:X(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(be==="cursor"||C==="cursor")&&r.jsx("path",{d:X(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:X(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(be==="opencode"||C==="opencode")&&r.jsx("path",{d:X(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:X(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(be==="zed"||C==="zed")&&r.jsx("path",{d:X(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:X(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(be==="continue"||C==="continue")&&r.jsx("path",{d:X(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:W(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("fast")&&r.jsx("path",{d:W(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:W(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("heavy")&&r.jsx("path",{d:W(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:W(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("coder")&&r.jsx("path",{d:W(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:W(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("vision")&&r.jsx("path",{d:W(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:W(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("scout")&&r.jsx("path",{d:W(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>le("roocode"),onMouseLeave:()=>le(null),onClick:()=>O(D=>D==="roocode"?null:"roocode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Roo Code"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>le("cursor"),onMouseLeave:()=>le(null),onClick:()=>O(D=>D==="cursor"?null:"cursor"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Cursor IDE"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>le("opencode"),onMouseLeave:()=>le(null),onClick:()=>O(D=>D==="opencode"?null:"opencode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"OpenCode"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>le("zed"),onMouseLeave:()=>le(null),onClick:()=>O(D=>D==="zed"?null:"zed"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Zed"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>le("continue"),onMouseLeave:()=>le(null),onClick:()=>O(D=>D==="continue"?null:"continue"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Continue"})]}),r.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[r.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",u!=null&&u.heavy_threshold_chars?u.heavy_threshold_chars/1e3:"4","k Zeichen"]}),r.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),Ch.map(D=>{var Yt;const ee=["12%","31%","50%","69%","88%"],je=Wn(D),De=je?L.includes(je.name):!1;if(D==="agent")return null;const Be={fast:0,heavy:1,coder:2,vision:3,scout:4}[D];return r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",De?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":je?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:ee[Be]},onClick:()=>z(D),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:D}),De&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:je?(Yt=je.name.split("/").pop())==null?void 0:Yt.replace(".gguf",""):"Keine Zuweisung"})]},D)}),C&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[C==="roocode"&&"Roo Code Setup",C==="cursor"&&"Cursor Setup",C==="opencode"&&"OpenCode Setup",C==="zed"&&"Zed Setup",C==="continue"&&"Continue Setup"]}),r.jsx("button",{onClick:()=>O(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[C==="roocode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),r.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",r.jsx("strong",{children:"OpenAI Compatible"}),"."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",r.jsx("code",{children:"settings.json"})," ein."]})]}),C==="cursor"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne Cursor Settings ➔ ",r.jsx("strong",{children:"Models"}),"."]}),r.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",r.jsx("strong",{children:"OpenAI API"})," auf."]}),r.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",r.jsx("strong",{children:"auto"}),"."]})]}),C==="opencode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die ",r.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),r.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",r.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),C==="zed"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die Zed Settings (",r.jsx("code",{children:"ctrl+,"}),")."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",r.jsx("code",{children:"language_models"})," ein."]})]}),C==="continue"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),r.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",r.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),f.tools&&r.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),r.jsxs("button",{onClick:()=>{var D,ee,je,De,Be;return ol(C==="roocode"?(D=f.tools.cline)==null?void 0:D.snippet:C==="cursor"?(ee=f.tools.cursor)==null?void 0:ee.snippet:C==="opencode"?(je=f.tools.opencode)==null?void 0:je.snippet:C==="zed"?(De=f.tools.zed)==null?void 0:De.snippet:(Be=f.tools.continue)==null?void 0:Be.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[oe?r.jsx(ir,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Pm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:oe?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:r.jsxs("code",{children:[C==="roocode"&&((Kn=f.tools.cline)==null?void 0:Kn.snippet),C==="cursor"&&((fn=f.tools.cursor)==null?void 0:fn.snippet),C==="opencode"&&((Zs=f.tools.opencode)==null?void 0:Zs.snippet),C==="zed"&&((Cr=f.tools.zed)==null?void 0:Cr.snippet),C==="continue"&&((Er=f.tools.continue)==null?void 0:Er.snippet)]})})]}),r.jsx("button",{onClick:()=>O(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),r.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(D=>{var De;const ee=R.find(Be=>Be.role===D),je=ee?L.includes(ee.name):!1;return r.jsxs("div",{onClick:()=>z(D),className:J("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",je?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":ee?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:J("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",Sc(D)),children:D}),je&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:ee==null?void 0:ee.name,children:ee?(De=ee.name.split("/").pop())==null?void 0:De.replace(/\.gguf$/i,""):"nicht zugewiesen"}),r.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},D)})})]}),(p==null?void 0:p.current)&&r.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Is,{className:"h-4.5 w-4.5 text-indigo-400"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),p.current.version!=null&&r.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",p.current.version]})]}),r.jsx("button",{onClick:()=>ne(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:p.current.name,children:p.current.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsx("span",{children:p.current.params_b?`${p.current.params_b}B`:"—"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:p.current.quant||"GGUF"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:$t(p.current.size_bytes||0)})]})]}),p.update_available&&p.recommended?r.jsxs("button",{onClick:()=>Hn(p.recommended.repo),className:J("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",p.budget&&!p.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[r.jsx(an,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):r.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[r.jsx(ir,{className:"h-4 w-4"})," Neueste Generation"]})]}),p.update_available&&p.recommended&&r.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",r.jsx("span",{className:"font-mono font-bold",children:p.recommended.name.replace(/-GGUF$/i,"")}),"(v",p.recommended.version,", ",p.recommended.params_b,"B) — von NousResearch."]}),p.budget&&r.jsxs("div",{className:J("text-[10px] flex items-start gap-1.5 leading-relaxed",p.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[r.jsx(Ca,{className:"h-3 w-3 shrink-0 mt-0.5"}),r.jsxs("span",{children:["Always-On-Brain ~",p.budget.brain_gb," GB + größtes on-demand (~",p.budget.largest_ondemand_gb," GB) = ",(p.budget.brain_gb+p.budget.largest_ondemand_gb).toFixed(1)," / ",p.budget.gtt_gb," GB",p.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[r.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",Ce.length," von ",R.length,")"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>Te("all"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Re==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),r.jsx("button",{onClick:()=>Te("in_use"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Re==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>_e("grid"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Ae==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),r.jsx("button",{onClick:()=>_e("list"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Ae==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),Ae==="grid"?r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Ce.length===0?r.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:Re==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Ce.map(D=>{const ee=L.includes(D.name),je=h==null?void 0:h.model_list.find(Be=>Be.role===D.role),De=Xp(D.name);return r.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",ee?"border-primary/45 shadow-primary/5":D.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"flex items-start justify-between gap-3",children:r.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[r.jsx("div",{className:J("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",De.color),title:De.name,children:De.initial}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:D.name,children:D.name.split("/").pop()}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:D.quant||"GGUF"}),ee&&r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[r.jsx(Ho,{className:"h-3 w-3 animate-pulse"})," Warm"]}),D.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:D.role}),D.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),D.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${D.spec_draft_model})`,children:"SPEC"}):D.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${D.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,D.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${D.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",D.parallel_slots]}),D.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),r.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:r.jsx(em,{caps:D.capabilities})})]}),r.jsxs("div",{className:"space-y-3 pt-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(Ca,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),r.jsx("div",{className:"text-foreground font-semibold",children:$t(D.size_bytes)})]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(z0,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),r.jsx("div",{className:"text-foreground font-semibold",children:Zp(D.ctx)})]})]})]}),je&&r.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),r.jsxs("span",{children:["Upgrade verfügbar: ",je.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>sl(je.repo,D.role,D.quant||"Q4_K_M",D.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[r.jsx(an,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[r.jsx("button",{onClick:()=>ee?fe(D.name):ae(D.name),disabled:D.incomplete&&!ee,className:J("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",D.incomplete&&!ee?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ee?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:ee?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>me(D.name,D.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>I(D),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",D.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":D.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Ko,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>xt(D.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:r.jsx(rc,{className:"h-3.5 w-3.5"})})]})]})]},D.name)})}):r.jsx("div",{className:"space-y-2",children:Ce.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:Re==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Ce.map(D=>{const ee=L.includes(D.name),je=Xp(D.name);return r.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",ee?"border-primary/45":D.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:J("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",je.color),title:je.name,children:je.initial}),r.jsxs("div",{className:"min-w-0 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:D.name,children:D.name.split("/").pop()}),D.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:D.role}),D.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),D.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${D.spec_draft_model})`,children:"SPEC"}):D.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${D.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,D.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${D.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",D.parallel_slots]}),D.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),ee&&r.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsxs("span",{children:["Größe: ",$t(D.size_bytes)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Kontext: ",Zp(D.ctx)]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:"font-mono text-[9px]",children:D.quant||"GGUF"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[r.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:r.jsx(em,{caps:D.capabilities})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("button",{onClick:()=>ee?fe(D.name):ae(D.name),disabled:D.incomplete&&!ee,className:J("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",D.incomplete&&!ee?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ee?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:ee?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>me(D.name,D.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>I(D),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",D.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":D.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Ko,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>xt(D.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:r.jsx(rc,{className:"h-3.5 w-3.5"})})]})]})]},D.name)})})]}),B&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",B,"' konfigurieren"]}),r.jsx("button",{onClick:()=>z(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell aus deiner Bibliothek für die Rolle ",r.jsx("strong",{className:"text-foreground",children:B}),":"]}),r.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[r.jsx("button",{onClick:()=>{U(B,""),z(null)},className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:r.jsx("span",{children:"Zuweisung entfernen"})}),R.map(D=>{var ee;return r.jsxs("button",{onClick:()=>{U(B,D.name),z(null)},className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",D.role===B?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"truncate max-w-[280px] font-semibold",children:(ee=D.name.split("/").pop())==null?void 0:ee.replace(".gguf","")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[$t(D.size_bytes)," · ",D.quant]})]}),D.role===B&&r.jsx(ir,{className:"h-4 w-4 shrink-0 text-primary"})]},D.name)})]})]})}),$&&r.jsx(Zb,{model:$,onClose:()=>I(null),onChanged:k}),H&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Is,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),r.jsx("button",{onClick:()=>ne(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",r.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",r.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),r.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:R.map(D=>{var je;const ee=D.role==="hermes";return r.jsxs("button",{onClick:()=>!ee&&Vs(D.name),disabled:ee||D.incomplete,className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",ee?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":D.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(je=D.name.split("/").pop())==null?void 0:je.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[D.capabilities.params_b?`${D.capabilities.params_b}B`:"?"," · ",$t(D.size_bytes),D.role&&` · Rolle: ${D.role}`,D.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),ee?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[r.jsx(ir,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},D.name)})}),r.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[r.jsx("span",{children:"💡"}),r.jsxs("span",{children:["Für einen ",r.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),P]})}function Jb(){const[s,o]=g.useState(""),[a,d]=g.useState([]),[u,f]=g.useState("Q4_K_M"),[h,p]=g.useState(""),[v,x]=g.useState(""),[b,w]=g.useState(""),[P,R]=g.useState([]),L=["fast","heavy","coder","vision","scout"];async function _(O){const B=O??s;if(B.trim()){p("Analysiere HuggingFace Repository...");try{const z=await ve(`/api/hf/quants?repo=${encodeURIComponent(B)}`);o(z.repo),d(z.quants),z.quants.length&&f(z.quants.includes("Q4_K_M")?"Q4_K_M":z.quants[0]),p(z.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden.")}catch(z){p(`Fehler: ${z}`)}}}async function k(){if(b.trim()){p("Durchsuche HuggingFace...");try{const O=await ve(`/api/hf/search?q=${encodeURIComponent(b)}`);R(O.results),p(O.results.length?"":"Keine Ergebnisse gefunden.")}catch(O){p(`Suche fehlgeschlagen: ${O}`)}}}async function C(){if(s.trim()){p("Download-Job wird initiiert...");try{await ve("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:u,role:v||void 0,jinja:!0})}),p(`Download gestartet: ${s} (${u})${v?`, Rolle: ${v}`:""}. Fortschritt oben.`+(v==="fast"||v==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(O){p(`Download-Fehler: ${O}`)}}}return r.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsx("input",{value:s,onChange:O=>o(O.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:()=>_(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),a.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("select",{value:u,onChange:O=>f(O.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:a.map(O=>r.jsx("option",{value:O,className:"bg-popover text-foreground",children:O},O))}),r.jsxs("select",{value:v,onChange:O=>x(O.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration wie parallele Slots",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[r.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),L.map(O=>r.jsx("option",{value:O,className:"bg-popover text-foreground",children:O},O))]}),r.jsxs("button",{onClick:C,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer flex items-center gap-1.5",children:[r.jsx(an,{className:"h-3.5 w-3.5"})," Herunterladen"]})]})]})]}),r.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:b,onChange:O=>w(O.target.value),onKeyDown:O=>O.key==="Enter"&&k(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(vc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsx("button",{onClick:k,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),P.length>0&&r.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:P.map(O=>r.jsxs("button",{onClick:()=>{o(O.repo),R([]),w(""),_(O.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[r.jsx("span",{className:"font-semibold truncate",children:O.repo}),r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[r.jsx(an,{className:"h-3 w-3"})," ",O.downloads.toLocaleString()]})]},O.repo))}),h&&r.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:h})]})}const Xb={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:Ko},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Go},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Xd},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:tc},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:ec}};function e1(){const{data:s,isLoading:o,error:a}=nb(),{data:d}=Hs(),{data:u}=kc(),f=(d==null?void 0:d.models)??[],h=a?String(a):"",[p,v]=g.useState({}),[x,b]=g.useState({}),[w,P]=g.useState(!1);async function R(L,_,k,C){v(O=>({...O,[L]:"Starte..."}));try{await ve("/api/models/install",{method:"POST",body:JSON.stringify({repo:L,role:_,quant:k,jinja:C})}),v(O=>({...O,[L]:"Download läuft"}))}catch{v(B=>({...B,[L]:"Fehler"}))}}return o?r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):h||!s?r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",h,")."]}):r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[r.jsxs("div",{children:["Modell-Registry geladen für ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.sys_ram_gb," GB"]})," System-RAM."]}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Dm,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),r.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),r.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:s.categories.map(L=>{const _=Xb[L.role]||{title:L.title||L.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Vo},k=_.icon,C=f.find(H=>H.role===L.role),O=u==null?void 0:u.model_list.find(H=>H.role===L.role),B=L.models.find(H=>H.repo===L.recommended)||L.models[0];if(!B)return null;const z=p[B.repo],$=L.models.filter(H=>H.repo!==L.recommended),I=!!x[L.role];return r.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",C?"border-border/60":"border-primary/20 shadow-primary/5"),children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:r.jsx(k,{className:"h-5.5 w-5.5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:_.title}),r.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",L.role]})]})]}),C?r.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):r.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:_.desc}),r.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:C?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:C.name,children:C.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[r.jsxs("span",{children:["Größe: ",dc(C.size_bytes||0)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",C.quant||"GGUF"]})]})]}):r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:B.name,children:B.name}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{children:["Ersteller: ",B.author]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",B.quant]})]}),r.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:r.jsx($b,{fit:B.fit})})]})}),r.jsx("div",{className:"pt-1",children:C?O?r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),r.jsxs("span",{children:["Bessere Version in der Registry: ",O.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>R(O.repo,L.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[O.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[r.jsx(an,{className:"h-3.5 w-3.5"}),p[O.repo]||"Auf neue Version aktualisieren"]})]}):r.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[r.jsx(ir,{className:"h-4 w-4"})," Auf neuestem Stand"]}):r.jsxs("button",{onClick:()=>R(B.repo,L.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!z,className:J("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",z?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[r.jsx(an,{className:"h-3.5 w-3.5"}),z||"Optimales Modell einsetzen"]})})]}),$.length>0&&r.jsxs("div",{className:"border-t border-border/20 pt-3",children:[r.jsxs("button",{onClick:()=>b(H=>({...H,[L.role]:!I})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[I?r.jsx(k0,{className:"h-3 w-3"}):r.jsx(b0,{className:"h-3 w-3"}),r.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",$.length,")"]})]}),I&&r.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:$.map(H=>r.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:H.name,children:H.name}),r.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[r.jsxs("span",{children:["Quant: ",H.quant]}),r.jsx("span",{children:"•"}),r.jsx("span",{children:H.fit.text})]})]}),r.jsx("button",{onClick:()=>R(H.repo,L.role,H.quant||"Q4_K_M",H.caps.tools!=="no"),disabled:!!p[H.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:p[H.repo]||"Installieren"})]},H.repo))})]})]},L.role)})}),r.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[r.jsxs("button",{onClick:()=>P(!w),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(vc,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),r.jsx("span",{className:"text-[10px] text-primary hover:underline",children:w?"Ausblenden ▲":"Anzeigen ▼"})]}),w&&r.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:r.jsx(Jb,{})})]})]})}function t1(){const[s,o]=g.useState("cockpit");return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),r.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(a=>r.jsx("button",{onClick:()=>o(a),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===a?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:a==="cockpit"?"Cockpit":"Modelle finden"},a))})]}),r.jsx(qb,{}),r.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?r.jsx(Yb,{}):r.jsx(e1,{})})]})}function Na({label:s,percent:o,detail:a,icon:d}){const u=o>90?"bg-red-500 shadow-md shadow-red-500/20":o>75?"bg-amber-500 shadow-md shadow-amber-500/20":"bg-primary shadow-md shadow-primary/20";return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/30 transition-all duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(d,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:s})]}),r.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(o),"%"]})]}),r.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:r.jsx("div",{className:J("h-full transition-all duration-700 ease-out",u),style:{width:`${Math.min(o,100)}%`}})}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function r1(){const{data:s,error:o}=La(3e3),{data:a}=eb(3e3),{showAlert:d,dialogElement:u}=Bn(),f=o?String(o):"",[h,p]=g.useState(""),[v,x]=g.useState({});async function b(){p("Backup snapshotted...");try{const P=await ve("/api/system/backup",{method:"POST"});p(P.ok?`Snapshot erzeugt: ${P.snapshot} (${P.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(P){p(`Fehler: ${P.message}`)}}async function w(P){x(R=>({...R,[P]:!0}));try{const R=await ve("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:P})});R.ok?d("Erfolgreich",`Dienst ${P} wurde erfolgreich neu gestartet.`):d("Fehler beim Neustart",`Fehler beim Neustart: ${R.err||"Unbekannter Fehler"}`)}catch(R){d("Fehler",`Fehler: ${R.message}`)}finally{x(R=>({...R,[P]:!1}))}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"System-Diagnose & Status"}),r.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),f&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["System-Status nicht lesbar (",f,")."]}),s&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(Na,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Dt}),r.jsx(Na,{label:"RAM",percent:s.ram.percent,detail:`${St(s.ram.used)} / ${St(s.ram.total)} GB`,icon:Ho}),s.gpu&&s.gpu.busy_percent!=null&&r.jsx(Na,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${St(s.gpu.vram_used)} / ${St(s.gpu.vram_total)} GB VRAM`:void 0,icon:Dt}),s.disk&&r.jsx(Na,{label:"Disk",percent:s.disk.percent,detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`,icon:Ca})]}),s.temp&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"flex gap-3 text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-2.5 rounded-xl self-start w-fit",children:[s.temp.cpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.cpu," °C"]})]}),s.temp.cpu!=null&&s.temp.gpu!=null&&r.jsx("span",{children:"|"}),s.temp.gpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.gpu," °C"]})]})]})]}),a&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"h-7 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",children:"System-Logs anzeigen"})]}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:a.services.map(P=>r.jsxs("div",{className:"flex items-center justify-between p-3.5 rounded-xl bg-background/20 border border-border/30 hover:border-primary/20 transition-all group",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",P.ok?"bg-emerald-500":"bg-amber-500")}),r.jsxs("div",{className:"truncate",children:[r.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:P.name}),r.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:P.url})]})]}),r.jsx("button",{onClick:()=>w(P.name),disabled:v[P.name],className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-primary hover:bg-primary/5 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",title:"Dienst neu starten",children:r.jsx(In,{className:J("h-3.5 w-3.5",v[P.name]&&"animate-spin")})})]},P.name))}),r.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[r.jsxs("a",{href:Zo(a.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(Pa,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),r.jsxs("a",{href:Zo(a.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(Pa,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),r.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),r.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:r.jsxs("button",{onClick:b,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(F0,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),h&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:h}),u]})}function n1(){const[s,o]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[a,d]=g.useState(localStorage.getItem("mc_mcp_path")||""),[u,f]=g.useState("cline"),[h,p]=g.useState(!1),v=new URLSearchParams({host:s});a&&v.set("mcp_path",a);const{data:x,error:b}=vh(v.toString()),w=b?String(b):"";function P(k){o(k),k&&localStorage.setItem("mc_host",k)}function R(k){d(k),localStorage.setItem("mc_mcp_path",k)}const L=x==null?void 0:x.tools[u];async function _(){L&&(await navigator.clipboard.writeText(L.snippet),p(!0),setTimeout(()=>p(!1),1500))}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(P0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),r.jsx("input",{value:s,onChange:k=>P(k.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(M0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),r.jsx("input",{value:a,onChange:k=>R(k.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),w&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",w]}),x&&r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(x.tools).map(([k,C])=>r.jsx("button",{onClick:()=>f(k),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",u===k?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:C.label},k))}),L&&r.jsxs("div",{className:"space-y-3",children:[L.note&&r.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[r.jsx(R0,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),r.jsx("span",{children:L.note})]}),r.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[r.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[r.jsx(Ra,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{children:u==="cline"||u==="cursor"?"config.json":"settings.json"})]}),r.jsxs("button",{onClick:_,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[h?r.jsx(ir,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Pm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:h?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:r.jsx("code",{children:L.snippet})})]})]})]})]})}const tm=["user","instruction","stable","versioned","ephemeral"],Ld={user:{label:"User",icon:G0,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:I0,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:$s,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:H0,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:S0,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},rm={label:"Gedächtnis",icon:Mm,bg:"bg-muted/10",text:"text-muted-foreground"},s1={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function o1(){const[s,o]=g.useState(""),[a,d]=g.useState(""),[u,f]=g.useState(""),[h,p]=g.useState("stable"),[v,x]=g.useState(!1),b=cn(),{showAlert:w,showConfirm:P,dialogElement:R}=Bn(),{data:L=[],error:_}=yh({q:a,category:s}),k=_?String(_):"",C=()=>b.invalidateQueries({queryKey:["memory"]});async function O(){u.trim()&&(await ve("/api/memory",{method:"POST",body:JSON.stringify({content:u,category:h,source:"ui"})}),f(""),C())}async function B($){await ve(`/api/memory/${$}`,{method:"DELETE"}),C()}async function z(){x(!0);try{const $=await ve("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if($.duplicate_count===0){w("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}P("Deduplizierung bestätigen",`${$.duplicate_count} Dublette(n) in ${$.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await ve("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),C()}catch(I){w("Fehler",`Fehler beim Löschen: ${I.message}`)}})}catch($){w("Fehler",`Fehler bei der Deduplizierung: ${$.message}`)}finally{x(!1)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),r.jsxs("button",{onClick:z,disabled:v,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[r.jsx(B0,{className:"h-4 w-4 text-primary animate-pulse"}),r.jsx("span",{children:"Deduplizieren"})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),r.jsx("textarea",{value:u,onChange:$=>f($.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),r.jsx("select",{value:h,onChange:$=>p($.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:tm.map($=>{var I;return r.jsx("option",{value:$,className:"bg-popover text-foreground",children:((I=Ld[$])==null?void 0:I.label)||$},$)})})]}),r.jsxs("button",{onClick:O,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(Rm,{className:"h-4 w-4"})," Speichern"]})]})]}),r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:a,onChange:$=>d($.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(vc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[r.jsx("button",{onClick:()=>o(""),className:J("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",s?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),tm.map($=>{const I=Ld[$]||rm,H=I.icon;return r.jsxs("button",{onClick:()=>o($),className:J("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",s===$?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{children:I.label})]},$)})]})]}),k&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",k]}),r.jsx("div",{className:"space-y-3",children:L.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):L.map($=>{const I=Ld[$.category]||rm,H=I.icon;return r.jsxs("div",{className:J("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",s1[$.category]||"border-l-muted"),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsxs("span",{className:J("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",I.bg,I.text),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{className:"hidden sm:inline",children:I.label})]}),r.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:$.content})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:$.source}),r.jsx("button",{onClick:()=>B($.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:r.jsx(rc,{className:"h-3.5 w-3.5"})})]})]},$.id)})}),R]})}function Sa({label:s,ok:o,detail:a,icon:d,onClick:u}){return r.jsxs("div",{onClick:u,className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",o?"border-border/60":"border-amber-500/30",u&&"cursor-pointer hover:bg-card/70"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:s}),r.jsx(d,{className:J("h-4.5 w-4.5",o?"text-primary":"text-amber-500")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full ring-2 ring-black/40",o?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:o?"Bereit / Online":"Offline / Inaktiv"})]}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:a,children:a})]}),u&&r.jsxs("button",{onClick:f=>{f.stopPropagation(),u()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[r.jsx(Dt,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Gehirn wechseln"})]})]})}function l1(){const{data:s,error:o}=gh(5e3),{data:a}=Hs(),{showAlert:d,dialogElement:u}=Bn(),f=cn(),h=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((a==null?void 0:a.models)??[]).map($=>{var I;return((I=$.name.split("/").pop())==null?void 0:I.replace(".gguf",""))||$.name})],[a]),[v,x]=g.useState(null),[b,w]=g.useState(!1),[P,R]=g.useState({width:800,height:360}),L=g.useRef(null),_=g.useCallback(z=>{if(L.current&&(L.current.disconnect(),L.current=null),z){const $=new ResizeObserver(I=>{if(!I||I.length===0)return;const H=I[0].contentRect;R({width:H.width,height:H.height})});$.observe(z),L.current=$}},[]),k=P.width,C=P.height,O=(z,$,I,H)=>{const ne=(z+I)/2;return`M ${z} ${$} C ${ne} ${$}, ${ne} ${H}, ${I} ${H}`};async function B(z){try{await ve("/api/agent/brain",{method:"POST",body:JSON.stringify({model:z})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${z}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:Qe.agentStatus}),w(!1)}catch($){d("Fehler",`Fehler beim Wechseln des Gehirns: ${$.message}`)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",r.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(s==null?void 0:s.webui_url)&&r.jsxs("a",{href:Zo(s.webui_url),target:"_blank",rel:"noopener",className:J("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",s.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[r.jsx(Pa,{className:"h-4 w-4"}),r.jsx("span",{children:"AnythingLLM öffnen"})]})]}),h&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",h,")."]}),s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(Sa,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:Is}),r.jsx(Sa,{label:"AnythingLLM",ok:s.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:Ho}),r.jsx(Sa,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Dt,onClick:()=>w(!0)}),r.jsx(Sa,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:Wo})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),r.jsxs("div",{ref:_,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:O(k*.15,C*.5,k*.5,C*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="webui"||s.webui_reachable)&&r.jsx("path",{d:O(k*.15,C*.5,k*.5,C*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:O(k*.5,C*.5,k*.85,C*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="brain"||s.gateway_reachable)&&r.jsx("path",{d:O(k*.5,C*.5,k*.85,C*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:O(k*.5,C*.5,k*.85,C*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="wiring"||s.gateway_reachable)&&r.jsx("path",{d:O(k*.5,C*.5,k*.85,C*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>x("webui"),onMouseLeave:()=>x(null),onClick:()=>s.webui_reachable&&window.open(Zo(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[r.jsx(Ho,{className:J("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),r.jsx("span",{children:"AnythingLLM"}),r.jsx("span",{className:J("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",s.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),r.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>x("gateway"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(Is,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),r.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),r.jsx("div",{className:J("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",s.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:s.gateway_reachable?"Online":"Offline"})]}),r.jsxs("div",{className:J("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",s.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>x("brain"),onMouseLeave:()=>x(null),onClick:()=>w(!0),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Dt,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),s.gateway_reachable&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:s.brain_model,children:s.brain_model||"auto"})]}),r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",s.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>x("wiring"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Wo,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.has_config&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[r.jsxs("span",{children:["Config: ",s.has_config?"✓":"—"]}),r.jsxs("span",{children:["Skills: ",s.has_skills?"✓":"—"]}),r.jsxs("span",{children:["Memory: ",s.has_memories?"✓":"—"]})]})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(A0,{className:"h-5 w-5 text-primary"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",s.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:s.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("p",{children:["Der ",r.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),r.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),r.jsx("div",{className:"space-y-3",children:s.pc_executor_reachable?r.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[r.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),r.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",r.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",r.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",r.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),r.jsxs("p",{children:["Starte ",r.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",r.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),r.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!s.gateway_reachable&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($s,{className:"h-5 w-5 text-amber-500"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[r.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),r.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",r.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),r.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[r.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),r.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",r.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),s&&b&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>w(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:p.map(z=>{const $=["auto","fast","heavy"].includes(z);return r.jsxs("button",{onClick:()=>B(z),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",s.brain_model===z||!s.brain_model&&z==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:z}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:$?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===z||!s.brain_model&&z==="auto")&&r.jsx(ir,{className:"h-4 w-4 shrink-0 text-primary"})]},z)})})]})}),u]})}function a1(){const[s,o]=g.useState("connect"),[a,d]=g.useState("roocode"),[u,f]=g.useState(null),h="192.168.178.151",[p,v]=g.useState(!1),[x,b]=g.useState(null);function w(){v(!0),ve("/api/health").then(P=>{f(P),b(P.engine_reachable?"success":"partial")}).catch(()=>{f(null),b("fail")}).finally(()=>v(!1))}return g.useEffect(()=>{w()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),r.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[r.jsx("button",{onClick:()=>o("connect"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),r.jsx("button",{onClick:()=>o("concepts"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),s==="connect"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:J("h-3 w-3 rounded-full ring-2 ring-black/40",x==="success"&&"bg-emerald-500 animate-pulse",x==="partial"&&"bg-amber-500",x==="fail"&&"bg-red-500",!x&&"bg-muted")}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),r.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[x==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(u==null?void 0:u.version)||""}).`,x==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",x==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!x&&"Verbindung wird geprüft..."]})]})]}),r.jsxs("button",{onClick:w,disabled:p,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[r.jsx(In,{className:J("h-3.5 w-3.5",p&&"animate-spin")}),r.jsx("span",{children:"Testen"})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Mm,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4 text-cyan-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Vo,{className:"h-4 w-4 text-violet-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",r.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Go,{className:"h-4 w-4 text-indigo-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Xd,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),r.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[r.jsxs("button",{onClick:()=>d("roocode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",a==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[r.jsx(Dm,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),r.jsx("button",{onClick:()=>d("cursor"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),r.jsx("button",{onClick:()=>d("opencode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[a==="roocode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),r.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),r.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),r.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),r.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",r.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",r.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),a==="cursor"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),r.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),r.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",r.jsx("strong",{children:"Models"}),"."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),r.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",r.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),r.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",r.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),a==="opencode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),r.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),r.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),r.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),r.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ra,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),r.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",r.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",r.jsx("strong",{children:"Restart"}),"."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[r.jsx(ec,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),r.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Vo,{className:"h-5 w-5 text-cyan-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),r.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",r.jsx("em",{children:"Experts"}),"). Ein intelligenter ",r.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[r.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(ec,{className:"h-5 w-5 text-violet-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),r.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Go,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",r.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",r.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),r.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- +name: tdd-pro +description: Drive development with strict TDD practices +--- +# Instructions +...`}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",r.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",r.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills find"}),r.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Globaler Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",r.jsx("i",{children:"code-simplification"}),", ",r.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Projekt-Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",r.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Dt,{className:"h-5 w-5 text-indigo-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),r.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),r.jsx("p",{children:r.jsx("strong",{children:"Best Practices für Hermes:"})}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",r.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Wo,{className:"h-5 w-5 text-amber-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),r.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Ra,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),r.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",r.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Xd,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),r.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",r.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Wo,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),r.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx($s,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[r.jsxs("p",{children:["Mission Control 2 ist als ",r.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),r.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(Pp,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),r.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),r.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(Pp,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),r.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[r.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function i1({title:s,hint:o}){return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold",children:s}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),r.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[r.jsx(_0,{className:"h-8 w-8 text-muted-foreground"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const d1=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function Fd(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function c1({open:s,onClose:o,defaultTab:a="maintenance"}){const[d,u]=g.useState(null),[f,h]=g.useState([]),[p,v]=g.useState("llama-swap"),[x,b]=g.useState(""),[w,P]=g.useState(!1),[R,L]=g.useState(null),[_,k]=g.useState({}),[C,O]=g.useState("maintenance"),[B,z]=g.useState(!1),[$,I]=g.useState(null);function H(U,me,xt){I({type:"alert",title:U,message:me,onConfirm:()=>{I(null),xt&&xt()}})}function ne(U,me,xt){I({type:"confirm",title:U,message:me,onConfirm:()=>{I(null),xt()},onCancel:()=>I(null)})}function oe(U){return U?new Date(U*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[ye,be]=g.useState(""),[le,Ae]=g.useState(""),[_e,Re]=g.useState(!1),[Te,Ce]=g.useState(!1);g.useEffect(()=>{s&&(be(localStorage.getItem("mc_sudo_password")||""),Ae(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&a&&O(a)},[s,a]);const Z=g.useRef(null);function de(){ve("/api/maintenance/updates").then(u).catch(U=>console.error("Error loading updates",U))}function Y(){ve("/api/jobs").then(U=>h(U.jobs||[])).catch(U=>console.error("Error loading jobs",U))}function M(U){P(!0),L(null),ve(`/api/maintenance/logs?service=${U}&lines=150`).then(me=>{me.ok?b(me.text):(b(`Fehler beim Laden der Logs: ${me.err||"Unbekannter Fehler"}`),(me.status==="incorrect_password"||me.status==="password_required")&&L(me.status))}).catch(me=>b(`Fehler: ${me.message}`)).finally(()=>{P(!1),setTimeout(()=>{Z.current&&(Z.current.scrollTop=Z.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;de(),Y();const U=setInterval(()=>{Y(),de()},3e3);return()=>clearInterval(U)},[s]),g.useEffect(()=>{!s||C!=="logs"||M(p)},[s,C,p]);async function S(){try{await ve("/api/maintenance/os-update",{method:"POST"}),Y(),O("maintenance")}catch(U){H("Fehler",`Fehler beim Starten des OS-Updates: ${U.message}`)}}async function q(){try{await ve("/api/maintenance/engine-update",{method:"POST"}),Y(),O("maintenance")}catch(U){H("Fehler",`Fehler beim Engine-Update: ${U.message}`)}}async function X(){z(!0);try{await ve("/api/maintenance/check-updates",{method:"POST"}),Y(),O("maintenance")}catch(U){H("Fehler",`Fehler bei der Update-Suche: ${U.message}`)}finally{z(!1)}}async function W(U,me){try{await ve("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:me})}),H("Gestartet",`Modell-Upgrade für '${me}' (${U}) gestartet.`),Y(),O("maintenance")}catch(xt){H("Fehler",`Fehler beim Starten des Modell-Upgrades: ${xt.message}`)}}async function ae(){ne("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await ve("/api/maintenance/reboot",{method:"POST"}),H("Reboot","Reboot ausgelöst. System startet neu...",()=>{o()})}catch(U){H("Fehler",`Fehler beim Reboot: ${U.message}`)}})}async function fe(U){k(me=>({...me,[U]:!0}));try{const me=await ve("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:U})});me.ok?H("Dienst neu gestartet",`Dienst ${U} wurde erfolgreich neu gestartet.`,()=>{C==="logs"&&p===U&&M(U)}):H("Fehler",`Fehler beim Neustart: ${me.err||"Unbekannter Fehler"}`)}catch(me){H("Fehler",`Fehler beim Neustart: ${me.message}`)}finally{k(me=>({...me,[U]:!1}))}}async function we(U){try{await ve(`/api/jobs/${U}/cancel`,{method:"POST"}),Y()}catch(me){H("Fehler",`Fehler beim Abbrechen: ${me.message}`)}}return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:J("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:o}),r.jsxs("div",{className:J("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",s?"translate-x-0":"translate-x-full"),children:[r.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Dt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),r.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[r.jsx("button",{onClick:()=>O("maintenance"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",C==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),r.jsx("button",{onClick:()=>O("logs"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",C==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),r.jsx("button",{onClick:()=>O("settings"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",C==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[C==="maintenance"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),r.jsxs("div",{className:"flex items-center gap-2",children:[(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",oe(d.last_check)]}),r.jsxs("button",{onClick:X,disabled:B,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[r.jsx(In,{className:J("h-3 w-3",B&&"animate-spin")}),"Nach Updates suchen"]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:S,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx($s,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:d!=null&&d.os?`${d.os} Updates verfügbar`:"Auf neuestem Stand"})]}),r.jsxs("button",{onClick:q,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx($0,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:d!=null&&d.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),r.jsxs("button",{onClick:ae,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[r.jsx(Om,{className:"h-4.5 w-4.5"}),r.jsxs("div",{children:[r.jsx("div",{children:"Host-System neu starten (Reboot)"}),r.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(d==null?void 0:d.model_list)&&d.model_list.length>0&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",oe(d.last_check)]})]}),r.jsx("div",{className:"space-y-2",children:d.model_list.map(U=>r.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-semibold",children:U.title}),r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:U.repo}),r.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",U.role]})]}),r.jsxs("button",{onClick:()=>W(U.repo,U.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[r.jsx(an,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},U.role))})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),r.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter(U=>U.state==="running"||U.state==="queued").length," Aktiv"]})]}),r.jsx("div",{className:"space-y-3",children:f.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):f.map(U=>{const me=U.state==="running"||U.state==="queued";return r.jsxs("div",{className:J("p-3 rounded-xl border transition-all duration-300",me?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[me&&r.jsxs("span",{className:"flex h-2 w-2 relative",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),U.label]}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[r.jsxs("span",{children:["ID: ",U.id]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:J(U.state==="done"&&"text-emerald-400",U.state==="failed"&&"text-red-400",U.state==="running"&&"text-primary",U.state==="queued"&&"text-amber-400",U.state==="canceled"&&"text-muted-foreground"),children:U.state})]})]}),me&&r.jsx("button",{onClick:()=>we(U.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),U.state==="running"&&r.jsxs("div",{className:"mt-3 space-y-1",children:[r.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${U.progress??0}%`}})}),r.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[r.jsxs("span",{children:[U.progress??0,"%"]}),U.done_bytes!=null&&U.total_bytes!=null&&r.jsxs("span",{children:[Fd(U.done_bytes)," / ",Fd(U.total_bytes),U.rate_bps!=null&&` (${Fd(U.rate_bps)}/s)`]}),U.eta_s!=null&&r.jsxs("span",{children:["ETA: ",U.eta_s,"s"]})]})]})]},U.id)})})]})]}),C==="logs"&&r.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{value:p,onChange:U=>v(U.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:d1.map(U=>r.jsxs("option",{value:U.id,children:[U.label," (",U.type==="system"?"systemd-root":"user",")"]},U.id))}),r.jsxs("button",{onClick:()=>fe(p),disabled:_[p],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[r.jsx(In,{className:J("h-3.5 w-3.5",_[p]&&"animate-spin")}),"Restart"]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[r.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[r.jsx(Ra,{className:"h-3 w-3 text-primary"}),r.jsxs("span",{children:["stdout/stderr - ",p]})]}),r.jsx("button",{onClick:()=>M(p),disabled:w,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(In,{className:J("h-3 w-3",w&&"animate-spin")})})]}),r.jsx("pre",{ref:Z,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:R==="password_required"||R==="incorrect_password"?r.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[r.jsx(nc,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),r.jsx("div",{className:"text-xs font-semibold text-amber-300",children:R==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),r.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",p," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),r.jsx("button",{onClick:()=>O("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):w&&!x?r.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):x||r.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),C==="settings"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),r.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx($s,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:_e?"text":"password",value:ye,onChange:U=>be(U.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Re(!_e),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:_e?r.jsx(Rp,{className:"h-4 w-4"}):r.jsx(tc,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(O0,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Te?"text":"password",value:le,onChange:U=>Ae(U.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Ce(!Te),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Te?r.jsx(Rp,{className:"h-4 w-4"}):r.jsx(tc,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),r.jsxs("div",{className:"flex gap-3 pt-2",children:[r.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",ye),localStorage.setItem("mc_hf_token",le),H("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),r.jsx("button",{onClick:()=>{be(""),Ae(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),H("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})]})]}),$&&r.jsx(Eh,{type:$.type,title:$.title,message:$.message,onConfirm:$.onConfirm,onCancel:$.onCancel})]})}function u1(){var w,P,R,L,_;const[s,o]=g.useState("dashboard"),[a,d]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[u,f]=g.useState(!1),[h,p]=g.useState("maintenance"),{data:v}=Xy(),{data:x}=La(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const k=C=>{var B;p(((B=C.detail)==null?void 0:B.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",k),()=>window.removeEventListener("open-system-drawer",k)},[]);const b=sc.find(k=>k.id===s);return r.jsxs("div",{className:"flex h-full relative",children:[r.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[r.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),r.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),r.jsx(Jy,{onNavigate:o}),r.jsx(c1,{open:u,onClose:()=>f(!1),defaultTab:h}),r.jsxs("aside",{className:J("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",a?"w-16":"w-60"),children:[r.jsxs("div",{className:J("flex items-center py-4 border-b border-border/40 shrink-0",a?"flex-col gap-3 px-2":"justify-between px-5"),children:[r.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[r.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!a&&r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r.jsx("button",{onClick:()=>{d(k=>{const C=!k;return localStorage.setItem("mc_sidebar_collapsed",C.toString()),C})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:a?"Maximieren":"Minimieren",children:a?r.jsx(j0,{className:"h-4 w-4"}):r.jsx(w0,{className:"h-4 w-4"})})]}),r.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:sc.map(k=>r.jsxs("button",{onClick:()=>o(k.id),className:J("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",a?"justify-center p-2.5":"gap-3 px-3 py-2",s===k.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:a?k.label:void 0,children:[r.jsx(k.icon,{className:"h-4.5 w-4.5 shrink-0"}),!a&&r.jsx("span",{className:"truncate",children:k.label})]},k.id))}),r.jsx("div",{className:J("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",a?"px-2 text-center":"px-5"),children:a?r.jsx("div",{className:"flex justify-center",children:r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",v?v.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:v?`Engine ${v.engine_reachable?"online":"offline"}`:"Backend offline"})}):r.jsxs("div",{className:"space-y-2 text-left",children:[v?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full animate-pulse",v.engine_reachable?"bg-emerald-500":"bg-amber-500")}),r.jsxs("span",{className:"truncate",children:["Engine ",v.engine_reachable?"online":"offline"]})]}):r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",r.jsx("span",{className:"truncate",children:"Backend offline"})]}),(x==null?void 0:x.versions)&&r.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[r.jsxs("div",{className:"truncate",title:x.versions.mc2?`${x.versions.mc2.branch}-${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""} (${x.versions.mc2.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"MC2:"})," ",x.versions.mc2?`${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:((w=x.versions.engine)==null?void 0:w.type)==="git"?`${x.versions.engine.branch}-${x.versions.engine.hash}${x.versions.engine.dirty?"*":""} (${x.versions.engine.date})`:((P=x.versions.engine)==null?void 0:P.version_text)||"unbekannt",children:[r.jsx("strong",{children:"Engine:"})," ",((R=x.versions.engine)==null?void 0:R.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((_=(L=x.versions.engine)==null?void 0:L.version_text)==null?void 0:_.split(" ").pop())||"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_ui?`${x.versions.hermes_ui.branch}-${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""} (${x.versions.hermes_ui.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes UI:"})," ",x.versions.hermes_ui?`${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_agent?`${x.versions.hermes_agent.branch}-${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""} (${x.versions.hermes_agent.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes Agent:"})," ",x.versions.hermes_agent?`${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[r.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),r.jsxs("button",{onClick:()=>{const k=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(k)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[r.jsx(E0,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Suchen"}),r.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),r.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[s==="dashboard"&&r.jsx(Qb,{}),s==="models"&&r.jsx(t1,{}),s==="system"&&r.jsx(r1,{}),s==="connect"&&r.jsx(n1,{}),s==="memory"&&r.jsx(o1,{}),s==="agent"&&r.jsx(l1,{}),s==="guide"&&r.jsx(a1,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&r.jsx(i1,{title:b.label,hint:b.hint})]})]})]})}const f1=new n0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Rg.createRoot(document.getElementById("root")).render(r.jsx(mm.StrictMode,{children:r.jsx(s0,{client:f1,children:r.jsx(u1,{})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 55b9e17..f668859 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,8 +7,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/src/views/models/Cockpit.tsx b/frontend/src/views/models/Cockpit.tsx index 93254be..7878952 100644 --- a/frontend/src/views/models/Cockpit.tsx +++ b/frontend/src/views/models/Cockpit.tsx @@ -1,7 +1,7 @@ import { useState, useRef, useCallback } from "react" import { Download, Trash2, Edit3, Activity, HardDrive, X, Check, Copy, Zap, Bot } from "lucide-react" import { api, type ModelInfo } from "@/lib/api" -import { useModels, useRouting, useConnect, useUpdates, useHermesBrain, useQueryClient, qk } from "@/lib/queries" +import { useModels, useRouting, useConnect, useUpdates, useHermesBrain, useSystemStatus, useQueryClient, qk } from "@/lib/queries" import { useDialog } from "@/lib/useDialog" import { CapsChips } from "@/components/CapsChips" import { cn } from "@/lib/utils" @@ -16,6 +16,7 @@ export function Cockpit() { const { data: connectData } = useConnect() const { data: updates } = useUpdates(4_000) const { data: brain } = useHermesBrain() + const { data: sysStatus } = useSystemStatus() const { showAlert, showConfirm, showPrompt, dialogElement } = useDialog() const models = modelsResp?.models ?? [] const running = modelsResp?.running ?? [] @@ -233,11 +234,15 @@ export function Cockpit() { ) } - // VRAM calculation: APU fallback 16GB if sysfs returns 0 + // Speicher-Pool = echtes GTT-Budget (unified memory, ~124 GB), nicht der alte 16-GB-Fallback. const runningWithInfo = models.filter((m) => running.includes(m.name)) const totalRunningSize = runningWithInfo.reduce((acc, m) => acc + (m.size_bytes || 0), 0) - const virtualMax = 16 * 1024 ** 3 // 16 GB Default - const capacity = totalRunningSize > virtualMax ? totalRunningSize * 1.2 : virtualMax + const gttTotal = sysStatus?.gpu?.gtt_total || sysStatus?.gpu?.vram_total || 0 + const gttUsed = sysStatus?.gpu?.gtt_used || 0 + const virtualMax = 16 * 1024 ** 3 // Fallback, falls sysfs nichts liefert + const capacity = gttTotal > 2 * 1024 ** 3 + ? gttTotal + : (totalRunningSize > virtualMax ? totalRunningSize * 1.2 : virtualMax) // Find model by role const getModelForRole = (role: string) => models.find((m) => m.role === role) @@ -270,7 +275,7 @@ export function Cockpit() {
- Llama Swap VRAM-Pool: {fmtSize(totalRunningSize)} / {fmtSize(capacity)} geladen + Speicher-Pool: {fmtSize(totalRunningSize)} Gewichte{gttUsed > 0 ? ` · ${fmtSize(gttUsed)} real belegt (inkl. KV)` : ""} / {fmtSize(capacity)} {running.length > 0 && (